r1
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 29
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.65 26
[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.65 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf dr-priority 2
<r1>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:y
r2
[r2]interface lo 0
[r2-LoopBack0]ip address 192.168.1.129 26
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 29
[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.129 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0
r3
[r3]interface g0/0/
[r3-GigabitEthernet0/0/0]ip address 192.168.1.3 29
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.3 0.0.0.0
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 192.168.1.9 0.0.0.0
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123
r4
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.10 0.0.0.0
[r4-ospf-1-area-0.0.0.1]network 192.168.1.13 0.0.0.0
[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]default-route-advertise
r5
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.1.193 26
[r5]in g 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.14 30
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 1
[r5-ospf-1-area-0.0.0.1]network 192.168.1.14 0.0.0.0
验证
r1>ping 192.168.1.13
PING 192.168.1.13: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.13: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 192.168.1.13: bytes=56 Sequence=2 ttl=254 time=60 ms
Reply from 192.168.1.13: bytes=56 Sequence=3 ttl=254 time=40 ms
Reply from 192.168.1.13: bytes=56 Sequence=4 ttl=254 time=50 ms
Reply from 192.168.1.13: bytes=56 Sequence=5 ttl=254 time=40 ms
--- 192.168.1.13 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/44/60 ms
<r1>ping 192.168.1.14
PING 192.168.1.14: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.14: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 192.168.1.14: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.1.14: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 192.168.1.14: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 192.168.1.14: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 192.168.1.14 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/40/50 ms