屏幕截图 2021-08-03 174140.png

路由器R1的配置:

system-view
sysname R1
interface GigabitEthernet0/0/0
 ip address 200.1.1.1 255.255.255.0 
interface GigabitEthernet0/0/1
 ip address 192.168.1.254 255.255.255.0 
interface GigabitEthernet0/0/2
 ip address 15.1.1.1 255.255.255.0 

路由器R2的配置:

system-view
sysname R2
interface GigabitEthernet0/0/0
 ip address 200.1.1.2 255.255.255.0 
interface GigabitEthernet0/0/1
 ip address 201.1.1.1 255.255.255.0 

路由器R3的配置:

system-view
sysname R3
interface GigabitEthernet0/0/0
 ip address 201.1.1.2 255.255.255.0 
interface GigabitEthernet0/0/1
 ip address 192.168.2.254 255.255.255.0 
interface GigabitEthernet0/0/2
 ip address 35.1.1.2 255.255.255.0 

路由器R5的配置:

system-view
sysname R5
interface GigabitEthernet0/0/0
 ip address 15.1.1.2 255.255.255.0 
interface GigabitEthernet0/0/1
 ip address 35.1.1.1 255.255.255.0 


路由器R1

ip route-static 192.168.2.0 255.255.255.0 200.1.1.2 

注释:可以把静态路由优先级调高一些,目的是切换到RIP协议下工作:
ip route-static 192.168.2.0 255.255.255.0 200.1.1.2 preference 200

路由器R2

ip route-static 192.168.1.0 255.255.255.0 200.1.1.1
ip route-static 192.168.2.0 255.255.255.0 201.1.1.2
#
ip route-static 192.168.1.0 255.255.255.0 200.1.1.1 preference 200
ip route-static 192.168.2.0 255.255.255.0 201.1.1.2 preference 200

路由器R3

ip route-static 192.168.1.0 255.255.255.0 201.1.1.1
#
ip route-static 192.168.1.0 255.255.255.0 201.1.1.1 preference 200

路由器R1

rip 1
 version 2
 network 192.168.1.0
 network 15.0.0.0
 network 200.1.1.0

路由器R5

rip 1
 version 2
 network 15.0.0.0
 network 35.0.0.0

路由器R3

rip 1
 version 2
 network 192.168.2.0
 network 201.1.1.0
 network 35.0.0.0

路由器R1

ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 15.1.1.0 0.0.0.255 
  network 192.168.1.0 0.0.0.255 

路由器R3

ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 35.1.1.0 0.0.0.255 
  network 192.168.2.0 0.0.0.255 

路由器R5

ospf 1 router-id 5.5.5.5 
 area 0.0.0.0 
  network 15.1.1.0 0.0.0.255 
  network 35.1.1.0 0.0.0.255 

注释:基于第一个实验,使用undo rip 1清楚之前的配置。

注释:

1、dis ospf peer b
2、dis ospf lsdb
3、dis ospf lsdb router 1.1.1.1
4、dis ospf routing
5、dis ip routing-table
6、dis ip routing-table protocol ospf
7、dis ip routing-table | include 192.168.2.0
8、tracert 192.168.2.1

最后修改:2021 年 08 月 23 日
如果觉得我的文章对你有用,请随意赞赏