配置ospf 虚拟链路(华为版)
1.为各路由器配置ip
R1: inter loop 1
ip add 192.168.2.1/24
inter e1
ip add 192.168.1.1/24
R2:: inter e1
ip add 192.168.1.2/24
inter s0
ip add 192.168.23.1/24
R3 : inter s0
ip add 192.168.3.2/24
inter s1
ip add 192.168.4.1/24
R4:inter s1
ip add 192.168.4.2/24
inter loop 1
ip add 192.168.5.1/24
2.开启ospf功能
R1:ospf enable
inter loop1 ospf enable area 0
inter e1 ospf enable area 0
R2:ospf enable
inter e1 ospf enable area 0
inter s0 ospf enable area 1
R3: ospf enable
inter s0 ospf enable area 1
inter s1 ospf enable area 2
R4:ospf enable
inter loop1 ospf enable area 2
inter s1 ospf enable area 2
3.配置虚拟链路
R2:ospf
vlink peer-id 192.168.1.2 transit-area 0
R3:ospf
vlink peer-id 192.168.3.2 transit-area 1