1.R1-R3为区域0,R3-R4为区域1,其中R3的环回也在区域0
2.R1-R3 R3为DR设备 没有BDR
3.R4环回地址固定 其他网络均使用192.168.1.0/24进行合理分配
4.R4环回地址不能宣告,全网可达,保障更新安全,避免环路,减少路由条目数量
1.配置ip地址并进行测试,宣告ospf路由
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 29
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.41 29
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.17 28
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.41 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.17 0.0.0.0
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.49 29
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.57 29
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.18 28
[r2-GigabitEthernet0/0/0]ping 192.168.1.17
PING 192.168.1.17: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.17: bytes=56 Sequence=1 ttl=255 time=90 ms
Reply from 192.168.1.17: bytes=56 Sequence=2 ttl=255 time=80 ms
Reply from 192.168.1.17: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 192.168.1.17: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 192.168.1.17: bytes=56 Sequence=5 ttl=255 time=40 ms
--- 192.168.1.17 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/60/90 ms
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.18 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.49 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.57 0.0.0.0
[r3]interface LoopBack 0
[</