实验
R1的配置
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info
[Huawei]undo info-center en
Info: Information center is disabled.
[Huawei]sys r1
[r1]inter g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.11.1 24
[r1-GigabitEthernet0/0/0]inter loopback 0
[r1-LoopBack0]ip address 1.1.1.1 32
[r1-LoopBack0]ospf 1
[r1-ospf-1]ospf 1
[r1-ospf-1]ospf 1 router-id 1.1.1.1
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 192.168.11.0 0.0.0.255
[r1-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.1]
[r1]ospf 1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]stub
[r1-ospf-1-area-0.0.0.1]
R2的配置
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info
[Huawei]undo info-center en
Info: Information center is disabled.
[Huawei]sys r2
[r2]inter g0/0/2
[r2-GigabitEthernet0/0/2]ip address 192.168.12.2 24
[r2-GigabitEthernet0/0/2]inter g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.13.2 24
[r2-GigabitEthernet0/0/1]inter g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.11.2 24
[r2-GigabitEthernet0/0/0]inter loopback 2
[r2-LoopBack2]ip address 192.168.2.1 24
[r2-LoopBack2]ospf 1
[r2-ospf-1]ospf 1 router-id 2.2.2.2
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]area 4
[r2-ospf-1-area-0.0.0.4]network 192.168.13.0 0.0.0.255
[r2-ospf-1-area-0.0.0.4]area 1
[r2-ospf-1-area-0.0.0.1]network 192.168.11.0 0.0.0.255
[r2-ospf-1-area-0.0.0.1]
[r2]ospf 1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]area 1
[r2-ospf-1-area-0.0.0.1]stub
[r2-ospf-1-area-0.0.0.1]q
[r2-ospf-1]area 4
[r2-ospf-1-area-0.0.0.4]abr-summary 192.168.0.0 255.255.248.0
[r2-ospf-1-area-0.0.0.4]q
[r2-ospf-1]q
R3的配置
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info
[Huawei]undo info-center en
Info: Information center is disabled.
[Huawei]sys r3
[r3]inter g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.13.1 24
[r3-GigabitEthernet0/0/0]inter loopback 3
[r3-LoopBack3]ip address 192.168.3.1 24
[r3-LoopBack3]ospf 1
[r3-ospf-1]ospf 1 router-id 3.3.3.3
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r3-ospf-1]area 4
[r3-ospf-1-area-0.0.0.4]network 192.168.13.0 0.0.0.255
[r3-ospf-1-area-0.0.0.4]
[r3]ospf 1
[r3-ospf-1]area 4
[r3-ospf-1-area-0.0.0.4]network 192.168.3.0 0.0.0.255
[r3-ospf-1-area-0.0.0.4]
R4的配置
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info
[Huawei]undo info-center en
Info: Information center is disabled.
[Huawei]sys r4
[r4]inter g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.14.2 24
[r4-GigabitEthernet0/0/1]inter g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.12.1 24
[r4-GigabitEthernet0/0/0]ospf 1
[r4-ospf-1]ospf 1 router-id 4.4.4.4
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r4-ospf-1]area 2
[r4-ospf-1-area-0.0.0.2]network 192.168.14.0 0.0.0.255
[r4-ospf-1-area-0.0.0.2]vlink-peer 5.5.5.5
[r4-ospf-1-area-0.0.0.2]area 0
[r4-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]inter loopback 4
[r4-LoopBack4]ip address 192.168.4.1 24
[r4-LoopBack4]q
[r4]q
<r4>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y
<r4>
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]ospf 1
[r4-ospf-1]area 2
[r4-ospf-1-area-0.0.0.2]network 192.168.4.0 0.0.0.255
[r4-ospf-1-area-0.0.0.2]
R5的配置
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei] undo info
[Huawei]undo info-center en
Info: Information center is disabled.
[Huawei]sys r5
[r5]inter g0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.15.2 24
[r5-GigabitEthernet0/0/1]inter g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.14.1 24
[r5-GigabitEthernet0/0/0]ospf 1
[r5-ospf-1]ospf 1 router-id 5.5.5.5
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r5-ospf-1]area 3
[r5-ospf-1-area-0.0.0.3]network 192.168.15.0 0.0.0.255
[r5-ospf-1-area-0.0.0.3]area 2
[r5-ospf-1-area-0.0.0.2]network 192.168.14.0 0.0.0.255
[r5-ospf-1-area-0.0.0.2]vlink-peer 4.4.4.4
[r5-ospf-1-area-0.0.0.2]inter loopback 5
[r5-LoopBack5]ip address 192.168.5.1 24
[r5-LoopBack5]q
[r5]q
<r5>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y
<r5>
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<r5>dis ospf vlink
OSPF Process 1 with Router ID 5.5.5.5
Virtual Links
Virtual-link Neighbor-id -> 4.4.4.4, Neighbor-State: Full
Interface: 192.168.14.1 (GigabitEthernet0/0/0)
Cost: 1 State: P-2-P Type: Virtual
Transit Area: 0.0.0.2
Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
GR State: Normal
<r5>sys
Enter system view, return user view with Ctrl+Z.
[r5]ospf 1
[r5-ospf-1]area 3
[r5-ospf-1-area-0.0.0.3]network 192.168.5.0 0.0.0.255
[r5-ospf-1-area-0.0.0.3]nssa
[r5-ospf-1-area-0.0.0.3]
R6的配置
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info
[Huawei]undo info-center en
Info: Information center is disabled.
[Huawei]sys r6
[r6]inter g0/0/1
[r6-GigabitEthernet0/0/1]ip address 192.168.16.2 24
[r6-GigabitEthernet0/0/1]inter g0/0/0
[r6-GigabitEthernet0/0/0]ip address 192.168.15.1 24
[r6-GigabitEthernet0/0/0]rip 1
[r6-rip-1]version 2
[r6-rip-1]network 192.168.16.0
[r6-rip-1]network 192.168.15.0
[r6-rip-1]ospf 1
[r6-ospf-1]ospf 1 router-id 6.6.6.6
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r6-ospf-1]area 3
[r6-ospf-1-area-0.0.0.3]network 192.168.15.0 0.0.0.255
[r6-ospf-1-area-0.0.0.3]inter loopback 6
[r6-LoopBack6]ip address 192.168.6.1 24
[r6-LoopBack6]
[r6]rip 1
[r6-rip-1]import-route ospf 1
[r6-rip-1]ospf 1
[r6-ospf-1]import-route rip 1
[r6-ospf-1]q
[r6]rip 1
[r6-rip-1]network 192.168.6.0
[r6-rip-1]ospf 1
[r6-ospf-1]area 3
[r6-ospf-1-area-0.0.0.3]nssa
[r6-ospf-1-area-0.0.0.3]q
[r6-ospf-1]import-route rip 1
[r6-ospf-1]rip 1
[r6-rip-1]import-route ospf 1
[r6-rip-1]
R7的配置
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info
[Huawei]undo info-center en
Info: Information center is disabled.
[Huawei]sys r7
[r7]inter g0/0/1
[r7-GigabitEthernet0/0/1]ip address 192.168.1.254 24
[r7-GigabitEthernet0/0/1]inter g0/0/0
[r7-GigabitEthernet0/0/0]ip address 192.168.16.1 24
[r7-GigabitEthernet0/0/0]rip 1
[r7-rip-1]version 2
[r7-rip-1]network 192.168.1.0
[r7-rip-1]network 192.168.16.0
[r7-rip-1]inter loopback 7
[r7-LoopBack7]ip address 192.168.7.1 24
[r7-LoopBack7]
[r7]rip 1
[r7-rip-1]network 192.168.7.0
[r7-rip-1]
部分情况下会出现OSPF设置了router-id,但是路由器仍然使用接口id作为router-id导致虚接口无法对应上出现错误,这个时候回到用户试图输入
reset ospf 1 process 刷新一下ospf进程就行了。