有时候单位网络升级需要把路由协议迁移如:rip向ospf rip向eigrp 我们这里就好好说下这个问题
如图所示:我们把原来的rip协议迁移到ospf
首先完成初始配置
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.0
serial restart-delay 0
no fair-queue
!
interface Serial0/1
ip address 192.168.2.1 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.2.2 102 broadcast
frame-relay map ip 192.168.2.4 104 broadcast
no frame-relay inverse-arp
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router rip
version 2
network 1.0.0.0
network 192.168.1.0
network 192.168.2.0
no auto-summary
r2配置
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial0/0
ip address 192.168.1.2 255.255.255.0
serial restart-delay 0
no fair-queue
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
ip address 192.168.2.2 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.2.1 201 broadcast
frame-relay map ip 192.168.2.4 204 broadcast
no frame-relay inverse-arp
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router rip
version 2
network 2.0.0.0
network 192.168.1.0
network 192.168.2.0
no auto-summary
r3;
no ip domain lookup
!
!
frame-relay switching
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
no ip address
shutdown
serial restart-delay 0
no fair-queue
!
interface Serial0/1
no ip address
encapsulation frame-relay
serial restart-delay 0
clock rate 64000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 102 interface Serial0/2 201
frame-relay route 104 interface Serial0/3 401
!
interface Serial0/2
no ip address
encapsulation frame-relay
serial restart-delay 0
clock rate 64000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 201 interface Serial0/1 102
frame-relay route 204 interface Serial0/3 402
!
interface Serial0/3
no ip address
encapsulation frame-relay
serial restart-delay 0
clock rate 64000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 401 interface Serial0/1 104
frame-relay route 402 interface Serial0/2 204
r4:
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface Serial0/0
ip address 192.168.3.4 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
ip address 192.168.2.4 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.2.1 401 broadcast
frame-relay map ip 192.168.2.2 402 broadcast
no frame-relay inverse-arp
!
router rip
version 2
network 4.0.0.0
network 192.168.2.0
network 192.168.3.0
no auto-summary
r5:
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface Serial0/0
ip address 192.168.3.5 255.255.255.0
serial restart-delay 0
no fair-queue
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router eigrp 1
no auto-summary
!
router rip
version 2
network 5.0.0.0
network 192.168.3.0
no auto-summary
r1的路由表
r1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
R 2.2.2.0 [120/1] via 192.168.2.2, 00:00:10, Serial0/1
[120/1] via 192.168.1.2, 00:00:10, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets
R 4.4.4.0 [120/1] via 192.168.2.4, 00:00:18, Serial0/1
5.0.0.0/24 is subnetted, 1 subnets
R 5.5.5.0 [120/2] via 192.168.2.4, 00:00:03, Serial0/1
C 192.168.1.0/24 is directly connected, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/1
R 192.168.3.0/24 [120/1] via 192.168.2.4, 00:00:18, Serial0/1
r3的show fr r
r3#show frame-relay r
Input Intf Input Dlci Output Intf Output Dlci Status
Serial0/1 102 Serial0/2 201 active
Serial0/1 104 Serial0/3 401 active
Serial0/2 201 Serial0/1 102 active
Serial0/2 204 Serial0/3 402 active
Serial0/3 401 Serial0/1 104 active
Serial0/3 402 Serial0/2 204 active
我们用distance修改管理距离,先降低ospf管理距离
例子:router ospf 1
distance 130
network ip地址 反掩码 area 0
O 1.1.1.0 [110/65] via 192.168.1.1, 00:14:53, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets
O 4.4.4.0 [110/65] via 192.168.3.4, 00:00:06, Serial0/0
5.0.0.0/24 is subnetted, 1 subnets
C 5.5.5.0 is directly connected, Loopback0
O 192.168.2.0/24 [110/128] via 192.168.3.4, 00:00:06, Serial0/0
C 192.168.3.0/24 is directly connected, Serial0/0
本文出自 “cisco network” 博客,转载请与作者联系!