AR1:
int g0/0/0
ip add 192.168.12.1 24
int g0/0/1
ip add 192.168.1.254 24
int LoopBack0
ip add 1.1.1.1 32
ospf 1 route-id 1.1.1.1
area 0
network 192.168.1.0 0.0.0.255
network 192.168.12.0 0.0.0.255复制
AR2:
int g0/0/0
ip add 192.168.12.2 24
int g0/0/1
ip add 192.168.23.2 24
int LoopBack0
ip add 2.2.2.2 32
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 192.168.12.0 0.0.0.255
area 0.0.0.1
network 192.168.23.0 0.0.0.255复制
AR3:
int g0/0/0
ip add 192.168.23.3 24
int g0/0/1
ip add 192.168.2.254 24
int LoopBack0
ip add 3.3.3.3 32
ospf 1 route-id 3.3.3.3
area 1
network 192.168.2.0 0.0.0.255
network 192.168.23.0 0.0.0.255复制
AR2查看路由表dis ip routing-table
<Huawei>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 2 D 192.168.12.1 GigabitEthernet0
/0/0
192.168.2.0/24 OSPF 10 2 D 192.168.23.3 GigabitEthernet0
/0/1
192.168.12.0/24 Direct 0 0 D 192.168.12.2 GigabitEthernet0
/0/0
192.168.12.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0
/0/0
192.168.12.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0
/0/0
192.168.23.0/24 Direct 0 0 D 192.168.23.2 GigabitEthernet0
/0/1
192.168.23.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0
/0/1
192.168.23.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0
/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0复制
AR2查看邻居dis ospf peer
<Huawei>dis ospf peer
OSPF Process 1 with Router ID 2.2.2.2
Neighbors
Area 0.0.0.0 interface 192.168.12.2(GigabitEthernet0/0/0)'s neighbors
Router ID: 192.168.1.254 Address: 192.168.12.1
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.12.1 BDR: 192.168.12.2 MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00:10:03
Authentication Sequence: [ 0 ]
Neighbors
Area 0.0.0.1 interface 192.168.23.2(GigabitEthernet0/0/1)'s neighbors
Router ID: 192.168.23.3 Address: 192.168.23.3
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.23.3 BDR: 192.168.23.2 MTU: 0
Dead timer due in 40 sec
Retrans timer interval: 5
Neighbor is up for 00:10:00
Authentication Sequence: [ 0 ]复制
OSPF修改router-id并重启命令
命令如下:
ospf 1 router-id x.x.x.x (x.x.x.x为修改后的router-id)
用户模式下:
reset ospf process (重置进程即可)
复制
文章转载自云自由,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。