资源描述
通过动态路由协议实现链路备份【实验名称】 通过动态路由协议实现链路备份【实验目的】 掌握通过在不同链路上配置不同的路由协议实现链路备份。【背景描述】 你是公司高级网络管理员,公司内部有一个很重要的服务器所在网段为192.168.12.0/24,平常访问通过R1,R3的OSPF路由协议,为了保证该网段随时能够访问,不能因为链路故障出问题,要求你实现一个备份冗余的功能,请给予支持。【实现功能】 保证在拥有冗余链路的时候,主链路失效,备份链路工作。【实验拓扑】 【实验设备】 R2624(3台) V35DCE(2根)、V35DTE(2根)【实验步骤】 第一步:基本配置 Red-Giant(config)#hos R3R3(config)#int s0R3(config-if)#ip add 192.168.13.3 255.255.255.0R3(config-if)#clock rate 64000R3(config-if)#no shR3(config-if)#int f0R3(config-if)#ip add 192.168.4.1 255.255.255.0R3(config-if)#no shR3(config)#int f1R3(config-if)#ip add 192.168.3.1 255.255.255.0R3(config-if)#no shR3(config)#int s1R3(config-if)#ip add 192.168.23.3 255.255.255.0R3(config-if)#cl ra 64000R3(config-if)#no shR3(config-if)#endRed-Giant(config)#Red-Giant(config)# hos R2R2(config)#int s0R2(config-if)# int s0R2(config-if)#ip add 192.168.23.2 255.255.255.0R2(config-if)#no shR2(config-if)#int f0R2(config-if)#ip add 192.168.12.2 255.255.255.0R2(config-if)#no shR2(config-if)#endRed-Giant(config)#hos R1R1(config)#int s0R1(config-if)#ip add 192.168.12.1 255.255.255.0R1(config-if)#no shR1(config-if)#int s0R1(config-if)#no shR1(config-if)#endR1#conf tR1(config)#int f0R1(config-if)#ip add 192.168.12.1 255.255.255.0R1(config-if)#no sh验证测试:R1#ping 192.168.13.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echoes to 192.168.13.3, timeout is 2 seconds:!R2#ping 192.168.23.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echoes to 192.168.23.3, timeout is 2 seconds:!第二步:配置主链路路由以及备份链路路由R1(config)#router os 1R1(config-router)#net 192.168.13.0 0.0.0.255 area 0R1(config-router)#net 192.168.12.0 0.0.0.255 area 2R3(config)#router os 1R3(config-router)#net 192.168.13.0 0.0.0.255 area 0R3(config-router)#net 192.168.4.0 0.0.0.255 area 1R3(config-router)#net 192.168.3.0 0.0.0.255 area1R3(config)#router rip ! 配置RIP协议作为备份,RIP协议管理距离大于OSPF,OSPF自动成为主路由协议R3(config-router)#ver 2 R3(config-router)# net 192.168.23.0 R3(config-router)#no auto-summaryR2(config)#router ripR2(config-router)#version 2 R2(config-router)#net 192.168.23.0R2(config-router)#net 192.168.12.0 R2(config-router)#no auto-summary 验证测试:R3#sh ip roCodes: C - connected, S - static, R - RIP O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not setO IA 192.168.12.0/24 110/49 via 192.168.13.1, 00:00:42, Serial0C 192.168.13.0/24 is directly connected, Serial0C 192.168.3.0/24 is directly connected, FastEthernet1C 192.168.4.0/24 is directly connected, FastEthernet0C 192.168.23.0/24 is directly connected, Serial1第三步:当主链路down的时候,可以通过备份链路通信R3(config)#int s0R3(config-if)#shutR3#sh ip roCodes: C - connected, S - static, R - RIP O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not setR 192.168.12.0/24 120/1 via 192.168.23.2, 00:00:13, Serial1C 192.168.3.0/24 is directly connected, FastEthernet1C 192.168.4.0/24 is directly connected, FastEthernet0C 192.168.23.0/24 is directly connected, Serial1第四步:当主链路up的时候,仍然用主链路通信R3(config)#int s0R3(config-if)#no shR3#sh ip roCodes: C - connected, S - static, R - RIP O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not setO IA 192.168.12.0/24 110/49 via 192.168.13.1, 00:14:45, Serial0C 192.168.13.0/24 is directly connected, Serial0C 192.168.3.0/24 is directly connected, FastEthernet1C 192.168.4.0/24 is directly connected, FastEthernet0C 192.168.23.0/24 is directly connected, Serial1 【注意事项】配置备份路由的管理距离必须大于主路由的管理距离。【参考配置】R3#sh runCurrent configuration:!version 6.14(2)!hostname R3!ip subnet-zero!interface FastEthernet0 ip address 192.168.4.1 255.255.255.0!interface FastEthernet1 ip address 192.168.3.1 255.255.255.0!interface FastEthernet2 no ip address shutdown!interface FastEthernet3 no ip address shutdown!interface Serial0 ip address 192.168.13.3 255.255.255.0 clock rate 64000!interface Serial1 ip address 192.168.23.3 255.255.255.0 clock rate 64000!router ospf 1 network 192.168.13.0 0.0.0.255 area 0 network 192.168.4.0 0.0.0.255 area 1 network 192.168.3.0 0.0.0.255 area 1!router rip version 2 network 192.168.23.0 no auto-summary!ip classless!line con 0line aux 0line vty 0 4 login!endR1#sh runCurrent configuration:!version 6.14(2)!hostname R1!ip subnet-zero!interface FastEthernet0 ip address 192.168.12.1 255.255.255.0!interface FastEthernet1 no ip address shutdown!interface FastEthernet2 no ip addressshutdown!interface FastEthernet3 no ip address shutdown!interface Serial0 ip address 192.168.13.1 255.255.255.0!interface Serial1 no ip address shutdown!router ospf 1 network 192.168.13.0 0.0.0.255 area 0 network 192.168.12.0 0.0.0.255 area 2!ip classless!line con 0line aux 0line vty 0 4 no login!endR2#sh runCurrent configuration:!version 6.14(2)!hostname R2!ip subnet-zero!interface FastEthernet0 ip address 192.168.12.2 255.255.255.0!interface FastEthernet1 no ip address shutdown!interface FastEthernet2 no ip addressno ip address shutdown!interface FastEthernet3 no ip address shutdown!interface Serial0 ip address 192.168.23.2 255.255.255.0!interface Serial1 no ip address shutdownrouter rip version 2 network 192.168.23.0 network 192.168.12.0 no auto-summary!ip classless!line con 0line aux 0line vty 0 4 loginend
展开阅读全文