通信人家园
标题: 路由协议迁移(EIGRP—OSPF)实验实例 [查看完整版帖子] [打印本页]
时间: 2015-12-15 15:39
作者: steftdance
标题: 路由协议迁移(EIGRP—OSPF)实验实例
路由协议迁移
RT1、RT2、RT3上运行EIGRP路由协议,现因业务需要,需要改为运行OSPF路由协议,要求不能影响全网连通性。
拓扑如下:
EIGRP配置:
RT1
router eigrp 1
network 1.1.1.1 0.0.0.0
network 192.168.1.0 0.0.0.3
network 192.168.1.4 0.0.0.3
no auto-summary
eigrp router-id 1.1.1.1
RT2
router eigrp 1
network 2.2.2.2 0.0.0.0
network 192.168.1.0 0.0.0.3
noauto-summary
eigrp router-id 2.2.2.2
RT3
router eigrp 1
network 3.3.3.3 0.0.0.0
network 192.168.1.4 0.0.0.3
noauto-summary
eigrp router-id 3.3.3.3
查看EIGRP邻居:
RT1#showip eigrp neighbors
IP-EIGRPneighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 192.168.1.6 Se0/1 12 00:05:09 125 750 0 18
0 192.168.1.2 Se0/0 13 00:05:29 63 378 0 20
在RT1、RT2、RT3上查看路由表:
RT1#showip route
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2[90/2297856] via 192.168.1.2, 00:13:53, Serial0/0
3.0.0.0/32 is subnetted,1 subnets
D 3.3.3.3[90/2297856] via 192.168.1.6, 00:13:38, Serial0/1
192.168.1.0/30 issubnetted, 2 subnets
C 192.168.1.0 is directly connected,Serial0/0
C 192.168.1.4 is directly connected,Serial0/1
RT2# showip route
1.0.0.0/32 is subnetted, 1 subnets
D 1.1.1.1[90/2297856] via 192.168.1.1, 00:13:29, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 issubnetted, 1 subnets
D 3.3.3.3[90/2809856] via 192.168.1.1, 00:13:46, Serial0/0
192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.0 is directly connected,Serial0/0
D 192.168.1.4[90/2681856] via 192.168.1.1, 00:21:54, Serial0/0
RT3#showip route
1.0.0.0/32 issubnetted, 1 subnets
D 1.1.1.1[90/2297856] via 192.168.1.5, 00:13:36, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2[90/2809856] via 192.168.1.5, 00:14:08, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
192.168.1.0/30 is subnetted, 2 subnets
D 192.168.1.0[90/2681856] via 192.168.1.5, 00:19:16, Serial0/0
C 192.168.1.4 is directly connected,Serial0/0
此时都为D的路由,即EIGRP的路由。
配上OSPF路由进程:
RT1
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 192.168.1.0 0.0.0.3 area 0
network 192.168.1.4 0.0.0.3 area 0
RT2
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.3 area 0
RT3
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 192.168.1.4 0.0.0.3 area 0
可以看到OSPF邻居:
RT1#showip ospf neighbor
NeighborID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:32 192.168.1.6 Serial0/1
2.2.2.2 0 FULL/ - 00:00:29 192.168.1.2 Serial0/0
OSPF的邻居状态为FULL,链路状态信息也完成同步。
但路由表不会发生变化:
RT2# showip route
1.0.0.0/32 issubnetted, 1 subnets
D 1.1.1.1[90/2297856] via 192.168.1.1, 00:13:29, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 issubnetted, 1 subnets
D 3.3.3.3[90/2809856] via 192.168.1.1, 00:13:46, Serial0/0
192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.0 is directly connected,Serial0/0
D 192.168.1.4[90/2681856] via 192.168.1.1, 00:21:54, Serial0/0
因为OSPF的AD值(110)大于EIGRP内部AD值(90),根据路由选择原则,在路由表中无法看到OSPF的路由。
路由协议迁移的方法:可将EIGRP的AD值改大且大于OSPF的AD值,即可使OSPF的路由出现在全局路由表中。
修改EIGRP的AD值:
RT1、RT2、RT3:
router eigrp 1
distance eigrp 130 200
在修改的过程中,查看RT3的路由表。
RT3#showip route
D 1.1.1.1[90/2297856] via 192.168.1.5, 00:00:05, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/129] via 192.168.1.5,00:00:09, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
192.168.1.0/30 is subnetted, 2 subnets
D 192.168.1.0[90/2681856] via 192.168.1.5, 00:00:05, Serial0/0
C 192.168.1.4 is directly connected,Serial0/0
在RT3上可以看到D和O的路由,表示路由协议正在进行切换。
一段时间之后,在RT1、RT2、RT3查看路由表:
RT1#showip route
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 issubnetted, 1 subnets
O 2.2.2.2[110/65] via 192.168.1.2, 00:00:29, Serial0/0
3.0.0.0/32 issubnetted, 1 subnets
O 3.3.3.3[110/65] via 192.168.1.6, 00:00:29, Serial0/1
192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.0 is directly connected,Serial0/0
C 192.168.1.4 is directly connected, Serial0/1
RT2#showip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1[110/65] via 192.168.1.1, 00:00:20, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3[110/129] via 192.168.1.1, 00:00:36, Serial0/0
192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.0 is directly connected,Serial0/0
O 192.168.1.4[110/128] via 192.168.1.1, 00:00:20, Serial0/0
RT3#showip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1[110/65] via 192.168.1.5, 00:00:11, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2[110/129] via 192.168.1.5, 00:00:43, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
192.168.1.0/30 is subnetted, 2 subnets
O 192.168.1.0[110/128] via 192.168.1.5, 00:00:11, Serial0/0
C 192.168.1.4 is directly connected,Serial0/0
路由表中只有O的路由,表示路由协议已经切换完成。此过程中并没有影响全网连通性,因为D和O路由都有自己本身的路由表,进入全局路由表是根据路由选择条件来进入的。
在RT1、RT2、RT3将EIGRP的进程删除:
配置
no router eigrp 1
在RT1上看到如下信息:
RT1(config)#norouter eigrp 1
*Mar 1 00:49:58.011: %DUAL-5-NBRCHANGE:IP-EIGRP(0) 1: Neighbor 192.168.1.2 (Serial0/0) is down: interface down
*Mar 1 00:49:58.051: %DUAL-5-NBRCHANGE:IP-EIGRP(0) 1: Neighbor 192.168.1.6 (Serial0/1) is down: interface down
显示EIGRP的邻居down。查看邻居,显示为空:
RT1#showip eigrp neighbors
再查看路由表,路由表正常:
RT1#showip route
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2[110/65] via 192.168.1.2, 00:01:17, Serial0/0
3.0.0.0/32 issubnetted, 1 subnets
O 3.3.3.3[110/65] via 192.168.1.6, 00:01:17, Serial0/1
192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.0 is directly connected,Serial0/0
C 192.168.1.4 is directly connected,Serial0/1
删除EIGRP的进程的过程中也不会影响全网的连通性。
完成了路由协议的迁移,由EIGRP迁移到OSPF,并没有影响全网连通性。
总结:
路由协议迁移可通过修改协议的AD值来改变其进入全局路由表的顺序,从而可以删除,来达到路由协议迁移的目的。
在迁移过程中,要等进入全局路由表的路由协议的信息达到同步之后,并且在路由表中学到了所有的路由,才可删除没有进入全局路由表的路由协议的配置。
附件: 路由协议迁移.doc (2015-12-15 15:38, 91.5 KB) / 下载次数 7
https://www.txrjy.com/forum.php?mod=attachment&aid=Mjc0ODczfGJkYTI2NGJkfDE3NTMxOTEzODF8MHww
时间: 2016-3-9 00:50
作者: daisyw89
时间: 2018-5-23 16:22
作者: gaoleizi1986
非常感谢,项目正好需要,学习一下啊
时间: 2021-9-24 14:33
作者: darcy_wu
感谢分享,下载学习
通信人家园 (https://www.txrjy.com/) |
Powered by C114 |