赞
踩
如有错误,敬请谅解!
此文章仅为本人学习笔记,仅供参考,如有冒犯,请联系作者删除!!!
lsa 链路状态通告(11类lsa) lsdb 链路状态数据库
ospf的5个数据包:
1.hello 发现 维持 创建 邻居关系
2.dbd 数据库摘要
3.lsr 链路状态请求
4.lsu 链路状态更新
5.lsack 链路状态确认包
ospf的配置:
[r2]ospf 100 router-id 2.2.2.2 [r2-ospf-100]area 0 [r2-ospf-100-area-0.0.0.0]network 2.2.2.2 0.0.0.0 [r2-ospf-100-area-0.0.0.0]network 12.1.1.0 0.0.0.255 注意为反掩码第⼆种宣告⽅式:
[r1]interface g0/0/0 [r1-GigabitEthernet0/0/0]ospf enable 100 area 0ospf区域划分的规则:
1.必须满⾜星型结构
2.必须存在abr(区域边界路由器)
ospf的dr/bdr的选举规则:
1.⽐较优先级(越⼤越优)
2.⽐较router-id (越⼤越优)
3.⾮抢占性
以PC1、PC2为例:
- [r1] interface LoopBack 0
- [r1-LoopBack0] ip address 0.0.0.0 32
-
- [r1]interface g0/0/0
- [r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
-
- [r1]dhcp enable
- Info: The operation may take a few seconds. Please wait for a moment.done.
-
- [r1]ip pool 1
- Info: It's successful to create an IP address pool.
- [r1-ip-pool-1]network 192.168.1.0 mask 255.255.255.0
- [r1-ip-pool-1]dns-list 8.8.8.8
- [r1-ip-pool-1]static-bind ip-address 192.168.1.11 mac-address 5489-98AD-75D9
- [r1-ip-pool-1]static-bind ip-address 192.168.1.22 mac-address 5489-9808-2C85
- [r1]interface g0/0/0
- [r1-GigabitEthernet0/0/0]dhcp select global
同样上述操作为PC3、PC4配置IP。
以路由器6为例:
- [r6]interface g0/0/0
- [r6-GigabitEthernet0/0/0]ip address 123.1.1.4 24.
- [r6-GigabitEthernet0/0/0]quit
- [r6]interface g0/0/1
- [r6-GigabitEthernet0/0/1]ip address 46.1.1.2 24
剩余路由器照此操作配置。
配置步骤:
1、 创建并运行OSPF进程
2、创建并进入OSPF区域
3、运行指定的OSPF接口
以r3为例:
- [R3] ospf 1 router-id 2.2.2.2
- [R3-ospf-1] area 1
- [R3-ospf-1-area-0.0.0.0] network 23.1.1.2 0.0.0.255
- [R3-ospf-1-area-0.0.0.0] area 0
- [R3-ospf-1-area-0.0.0.1] network 123.1.1.1 0.0.0.255
设置优先级为0:
- [r4]interface g0/0/0
- [r4-GigabitEthernet0/0/0]ospf dr-priority 0
以路由器r1为例:
- [r1]interface g0/0/0
- [r1-GigabitEthernet0/0/0]ospf timer hello 5
area 1区域明文认证:
- [r2]ospf 100
- [r2-ospf-100]area 1
- [r2-ospf-100-area-0.0.0.1]authentication-mode simple cipher123
area 2区域密文认证:
- [r5]ospf 100
- [r5-ospf-100]area 2
- [r5-ospf-100-area-0.0.0.2]authentication-mode simple cipher 123
- [r5-ospf-100-area-0.0.0.2]authentication-mode md5
- [r4]ospf 100
- [r4-ospf-100]default-route-advertise always
- PC>ping 6.6.6.6
-
- Ping 6.6.6.6: 32 data bytes, Press Ctrl_C to break
- From 6.6.6.6: bytes=32 seq=1 ttl=128 time=31 ms
- From 6.6.6.6: bytes=32 seq=2 ttl=128 time=32 ms
- From 6.6.6.6: bytes=32 seq=3 ttl=128 time=47 ms
- From 6.6.6.6: bytes=32 seq=4 ttl=128 time=31 ms
- From 6.6.6.6: bytes=32 seq=5 ttl=128 time=31 ms
-
- --- 6.6.6.6 ping statistics ---
- 5 packet(s) transmitted
- 5 packet(s) received
- 0.00% packet loss
- round-trip min/avg/max = 31/34/47 ms
以上过程即为所求,欢迎同行朋友予以斧正!万分感谢!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。