CCNA培训课总结笔记--RIPv1负载均衡(六)
2009-08-18 10:11
344 查看
实验目的: 验证RIP负载均衡,而RIP的负载均衡是由跳数决定,如果跳数相同则起到负载均衡. 实验拓扑图: 实验内容: 路由器的基本配置 R上的 Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. 照样粘贴上基本的命令 Router(config)#enable password cisco Router(config)#no ip domain-lookup Router(config)#line con 0 Router(config-line)# exec-timeout 0 0 Router(config-line)# logging synchronous Router(config-line)# Router(config-line)#line aux 0 Router(config-line)# exec-timeout 0 0 Router(config-line)# logging synchronous Router(config-line)#line vty 0 4 Router(config-line)# Router(config-line)# Router(config-line)# exec-timeout 0 0 Router(config-line)# password cisco Router(config-line)# Router(config-line)# login Router(config-line)# Router(config-line)# Router(config-line)#alias exec a sh ip int bri Router(config)#alias exec b sh ip route Router(config)#alias exec c sh ip route rip Router(config)#alias exec d sh run 配置好名称,接口地址 Router(config)#hostname R1 R1(config)#interface loopback 1 R1(config-if)#ip address 1.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#interface e0/0 R1(config-if)#ip address 172.16.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface s1/0 R1(config-if)#ip address *Mar 1 00:14:04.503: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up *Mar 1 00:14:05.503: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up R1(config-if)#ip address 172.16.2.1 255.255.255.0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown R2上的 Router(config)#hostname R2 R2(config)#interface s1/0 R2(config-if)#ip address 172.16.2.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface s1/1 R2(config-if)#ip address 172.16. *Mar 1 00:14:57.579: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up R2(config-if)#ip address 172.16.3.1 *Mar 1 00:14:58.583: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up R2(config-if)#ip address 172.16.3.1 255.255.255.0 R2(config-if)#clock rate 64000 R2(config-if)#no shutdown R2(config-if)#exit R3上的 Router(config)#hostname R3 R3(config)#interface loopback 0 R3(config-if)#ip address 3.3.3.3 255.255.255.0 R3(config-if)#exit R3(config)#interface e0/0 R3(config-if)#ip address 172.16.1.2 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#interface s1/1 R3(config-if)#ip address 172.16.3.2 255.255.255.0 R3(config-if)#no shutdown 好了,现在开始配置RIP 先在R1上,宣告接口网络 R1(config)#router rip R1(config-router)#network 1.0.0.0 R1(config-router)#network 172.16.2.0 R1(config-router)#network 172.16.1.0 R2上的,两样的格式 R2(config)#router rip R2(config-router)#network 172.16.2.0 R2(config-router)#network 172.16.3.0 R3上的 R3(config)#router rip R3(config-router)#network 3.0.0.0 R3(config-router)#network 172.16.1.0 R3(config-router)#network 172.16.3.0 配置好后,查看一下路由表 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, Loopback1 R 3.0.0.0/8 [120/1] via 172.16.1.2, 00:00:03, Ethernet0/0 172.16.0.0/24 is subnetted, 3 subnets C 172.16.1.0 is directly connected, Ethernet0/0 C 172.16.2.0 is directly connected, Serial1/0 R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:10, Serial1/0 [120/1] via 172.16.1.2, 00:00:03, Ethernet0/0 注意最后的一条RIP路由,可以看到去172.16.3.0的路由已经产生了负载均衡的现象,因为它们的跳数是相同的. R2上的路由表 R2#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 R 1.0.0.0/8 [120/1] via 172.16.2.1, 00:00:24, Serial1/0 R 3.0.0.0/8 [120/1] via 172.16.3.2, 00:00:03, Serial1/1 172.16.0.0/24 is subnetted, 3 subnets R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:24, Serial1/0 [120/1] via 172.16.3.2, 00:00:03, Serial1/1 C 172.16.2.0 is directly connected, Serial1/0 C 172.16.3.0 is directly connected, Serial1/1 很清楚也显示了所有的链路. R3的路由表 R3#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 R 1.0.0.0/8 [120/1] via 172.16.1.1, 00:00:03, Ethernet0/0 3.0.0.0/24 is subnetted, 1 subnets C 3.3.3.0 is directly connected, Loopback0 172.16.0.0/24 is subnetted, 3 subnets C 172.16.1.0 is directly connected, Ethernet0/0 R 172.16.2.0 [120/1] via 172.16.3.1, 00:00:17, Serial1/1 [120/1] via 172.16.1.1, 00:00:03, Ethernet0/0 C 172.16.3.0 is directly connected, Serial1/1 最后,用扩展的ping命令来测试负载均衡 先从R1的loopback 0 接口上pingR3的S1/1口 R1#ping Protocol [ip]: Target IP address: 172.16.3.2 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands : y Source address or interface: 1.1.1.1 Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: r Number of hops [ 9 ]: Loose, Strict, Record, Timestamp, Verbose[RV]: Sweep range of sizes : Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds: Packet sent with a source address of 1.1.1.1 Packet has IP options: Total option bytes= 39, padded length=40 Record route: <*> (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) Reply to request 0 (136 ms). Received packet has options Total option bytes= 40, padded length=40 Record route: (172.16.2.1) (172.16.3.1) (172.16.3.2) (172.16.1.2) (1.1.1.1) <*> (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) End of list Reply to request 1 (112 ms). Received packet has options Total option bytes= 40, padded length=40 Record route: (172.16.1.1) (172.16.3.2) (172.16.1.2) (1.1.1.1) <*> (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) End of list Reply to request 2 (160 ms). Received packet has options Total option bytes= 40, padded length=40 Record route: (172.16.2.1) (172.16.3.1) (172.16.3.2) (172.16.1.2) (1.1.1.1) <*> (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) End of list Reply to request 3 (112 ms). Received packet has options Total option bytes= 40, padded length=40 Record route: (172.16.1.1) (172.16.3.2) (172.16.1.2) (1.1.1.1) <*> (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) End of list Reply to request 4 (160 ms). Received packet has options Total option bytes= 40, padded length=40 Record route: (172.16.2.1) (172.16.3.1) (172.16.3.2) (172.16.1.2) (1.1.1.1) <*> (0.0.0.0) (0.0.0.0) (0.0.0.0) (0.0.0.0) End of list 可以注意到数据包的路径可以发现,来回的路径不同,也就是说数据包是走了负载均衡的. 本文出自 “孤帆远影碧空尽” 博客,请务必保留此出处/article/4226479.html本文出自 51CTO.COM技术博客 |
相关文章推荐
- CCNA培训课总结笔记--RIPv1负载均衡(六)
- CCNA培训课总结笔记--RIPv1负载均衡(六)
- CCNA培训课总结笔记--静态路由实现负载均衡(四)
- CCNA培训课总结笔记--静态路由实现负载均衡(四)
- CCNA培训课总结笔记--静态路由实现负载均衡(四)
- CCNA培训课总结笔记(一)
- CCNA培训课总结笔记--RIP的基本配置(五)
- CCNA培训课总结笔记--RIPv2的汇总实验(七)
- CCNA培训课总结笔记--配置EIGRP实验(十)
- CCNA培训课总结笔记--标准访问控制列表实验(八)
- CCNA培训课总结笔记--路由器基本配置(二)
- CCNA培训课总结笔记--路由器基本配置(二)
- CCNA培训课总结笔记(一)
- CCNA培训课总结笔记--扩展访问控制列表实验(九)
- CCNA培训课总结笔记--静态路由配置(三)
- CCNA培训课总结笔记--NAT转换实验(十二)
- CCNA培训课总结笔记--交换机的基本配置(十三)
- CCNA培训课总结笔记--路由器基本配置(二)
- CCNA培训课总结笔记--配置EIGRP实验(十)
- CCNA培训课总结笔记(一)