EIGRP等价负载均衡
实验拓扑图:
实验过程
1.R1的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line console 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R1 R1(config)#interface f0/0 R1(config-if)#no shut R1(config-if)#ip add 192.168.1.1 255.255.255.0 R1(config-if)#exit R1(config)#interface f1/0 R1(config-if)#no shut R1(config-if)#ip add 192.168.3.1 255.255.255.0 R1(config-if)#exit |
2.R2的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line console 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R2 R2(config)#interface f0/0 R2(config-if)#no shut R2(config-if)#ip add 192.168.1.2 255.255.255.0 R2(config-if)#exit R2(config)#interface f1/0 R2(config-if)#no shut R2(config-if)#ip add 192.168.2.1 255.255.255.0 R2(config-if)#exit |
3.R3的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line console 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R3 R3(config)#interface f1/0 R3(config-if)#no shut R3(config-if)#ip add 192.168.3.2 255.255.255.0 R3(config-if)#exit R3(config)#interface f0/0 R3(config-if)#no shut R3(config-if)#ip add 192.168.4.1 255.255.255.0 R3(config-if)#exit |
4.R4的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line console 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R4 R4(config)#interface f1/0 R4(config-if)#no shut R4(config-if)#ip add 192.168.2.2 255.255.255.0 R4(config-if)#exit R4(config)#interface lo0 R4(config-if)#ip add 1.1.1.1 255.255.255.0 R4(config-if)#exit R4(config)#interface f0/0 R4(config-if)#no shut R4(config-if)#ip add 192.168.4.2 255.255.255.0 R4(config-if)#exit |
5.R1的EIGRP配置
R1(config)#router eigrp 100 R1(config-router)#network 192.168.1.0 R1(config-router)#network 192.168.3.0 R1(config-router)#no auto R1(config-router)#end |
6.R2的 EIGRP配置
R2(config)#router eigrp 100 R2(config-router)#network 192.168.1.0 *Jan 5 20:17:54.731: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 192.168.1.1 (FastEthernet0/0) is up: new adjacency //发现了邻居路由器R1 R2(config-router)#network 192.168.2.0 R2(config-router)#no auto R2(config-router)#end |
7.R3 EIGRP配置
R3(config)#router eigrp 100 R3(config-router)#network 192.168.3.0 *Jan 5 20:19:31.859: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 192.168.3.1 (FastEthernet1/0) is up: new adjacency R3(config-router)#network 192.168.4.0 R3(config-router)#no auto R3(config-router)#end |
8.R4 EIGRP配置
R4(config)#router eigrp 100 R4(config-router)#network 192.168.2.0 *Jan 5 20:20:44.123: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 192.168.2.1 (FastEthernet1/0) is up: new adjacency R4(config-router)#network 192.168.4.0 R4(config-router)#network 1.1.1.0 *Jan 5 20:20:49.787: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 192.168.4.1 (FastEthernet0/0) is up: new adjacency R4(config-router)#no auto R4(config-router)#end |
9.在R1上查看eigrp的拓扑表和路由表
R1#show ip eigrp topology IP-EIGRP Topology Table for AS(100)/ID(192.168.3.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - reply Status, s - sia Status
P 1.1.1.0/24, 2 successors, FD is 158720 via 192.168.1.2 (158720/156160), FastEthernet0/0 via 192.168.3.2 (158720/156160), FastEthernet1/0 P 192.168.1.0/24, 1 successors, FD is 28160 via Connected, FastEthernet0/0 P 192.168.2.0/24, 1 successors, FD is 30720 via 192.168.1.2 (30720/28160), FastEthernet0/0 P 192.168.3.0/24, 1 successors, FD is 28160 via Connected, FastEthernet1/0 P 192.168.4.0/24, 1 successors, FD is 30720 via 192.168.3.2 (30720/28160), FastEthernet1/0 R1#show ip route eigrp 1.0.0.0/24 is subnetted, 1 subnets D 1.1.1.0 [90/158720] via 192.168.3.2, 00:03:18, FastEthernet1/0 [90/158720] via 192.168.1.2, 00:03:18, FastEthernet0/0 //R1到R4有两条有效路径,这里R1实现了等价负载均衡 D 192.168.4.0/24 [90/30720] via 192.168.3.2, 00:07:02, FastEthernet1/0 D 192.168.2.0/24 [90/30720] via 192.168.1.2, 00:07:00, FastEthernet0/0 |