2.实验步骤:
1)R1的预配置:
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#no ip do lo
R1(config)#line co 0
R1(config-line)#no exec-t
R1(config-line)#logg s
R1(config-line)#exit
R1(config)#
int lo 0
R1(config-if)#
ip add 1.1.1.1 255.255.255.0
R1(config-if)#
int lo 1
R1(config-if)#
ip add 10.1.1.1 255.255.255.252
R1(config-if)#
int lo 2
R1(config-if)#
ip add 10.1.1.5 255.255.255.252
R1(config-if)#
int lo 3
R1(config-if)#
ip add 10.1.1.9 255.255.255.252
R1(config-if)#
int s2/1
R1(config-if)#
ip add 192.168.0.1 255.255.255.0
R1(config-if)#
no sh
R1(config-if)#
int f0/0
R1(config-if)#
ip add 172.16.0.1 255.255.255.0
R1(config-if)#
no sh
R1(config-if)#^Z
2)R2的预配置:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#no ip do lo
R2(config)#line co 0
R2(config-line)#no exec-t
R2(config-line)#logg s
R2(config-line)#exit
R2(config)#
int lo 0
R2(config-if)#
ip add 2.2.2.2 255.255.255.0
R2(config-if)#
int lo 1
R2(config-if)#
ip add 10.1.2.1 255.255.255.252
R2(config-if)#
int lo 2
R2(config-if)#
ip add 10.1.2.5 255.255.255.252
R2(config-if)#
int lo 3
R2(config-if)#
ip add 10.1.2.9 255.255.255.252
R2(config-if)#
int s2/1
R2(config-if)#
ip add 192.168.0.2 255.255.255.0
R2(config-if)#
no sh
R2(config-if)#
int s2/2
R2(config-if)#
ip add 23.0.0.2 255.255.255.0
R2(config-if)#
no sh
R2(config-if)#^Z
3)R3的预配置:
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#no ip do lo
R3(config)#line co 0
R3(config-line)#no exec-t
R3(config-line)#logg s
R3(config-line)#exit
R3(config)#
int lo 0
R3(config-if)#
ip add 3.3.3.3 255.255.255.0
R3(config-if)#
int lo 1
R3(config-if)#
ip add 10.1.3.1 255.255.255.252
R3(config-if)#
int lo 2
R3(config-if)#
ip add 10.1.3.5 255.255.255.252
R3(config-if)#
int lo 3
R3(config-if)#
ip add 10.1.3.9 255.255.255.252
R3(config-if)#
int s2/1
R3(config-if)#
ip add 23.0.0.3 255.255.255.0
R3(config-if)#
no sh
R3(config-if)#
int f0/0
R3(config-if)#
ip add 172.16.0.3 255.255.255.0
R3(config-if)#
no sh
R3(config-if)#^Z
4)修改R1,R2,R3之间的链路带宽为64Kbps:
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#
int s2/1
R1(config-if)#
bandwidth 64
R1(config-if)#
int f0/0
R1(config-if)#
bandwidth 64
R1(config-if)#^Z
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#
int s2/1
R2(config-if)#
bandwidth 64
R2(config-if)#
int s2/2
R2(config-if)#
bandwidth 64
R2(config-if)#^Z
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#
int s2/1
R3(config-if)#
bandwidth 64
R3(config-if)#
int f0/0
R3(config-if)#
bandwidth 64
R3(config-if)#^Z
5)配置R1,R2,R3的EIGRP协议:
R1(config)#
router eigrp 100
R1(config-router)#
no au
R1(config-router)#
net 1.1.1.1
R1(config-router)#
net 192.168.0.0
R1(config-router)#
net 172.16.0.0
R1(config-router)#
net 10.0.0.0
R1(config-router)#^Z
R2(config)#
router eigrp 100
R2(config-router)#
no au
R2(config-router)#
net 192.168.0.0
R2(config-router)#
net 23.0.0.0
R2(config-router)#
net 10.0.0.0
R2(config-router)#
net 2.2.2.2
R2(config-router)#^Z
R3(config)#
router eigrp 100
R3(config-router)#
no au
R3(config-router)#
net 3.3.3.3
R3(config-router)#
net 23.0.0.0
R3(config-router)#
net 172.16.0.0
R3(config-router)#
net 10.0.0.0
R3(config-router)#
net 10.0.0.0
R3(config-router)#^Z
6)查看EIGRP的邻接关系是否配置正确:
R1#
show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 172.16.0.3 Fa0/0 12 00:04:12 113 2280 0 3
0 192.168.0.2 Se2/1 14 00:05:14 96 2280 0 6
R2#
show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 23.0.0.3 Se2/2 12 00:00:44 1422 5000 0 6
0 192.168.0.1 Se2/1 13 00:07:25 284 2280 0 14
R3#
show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 23.0.0.2 Se2/1 11 00:01:13 148 2280 0 10
0 172.16.0.1 Fa0/0 11 00:06:49 105 2280 0 13
7)查看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
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/40640000] via 192.168.0.1, 00:00:15, Serial2/1
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
3.0.0.0/24 is subnetted, 1 subnets
D 3.3.3.0 [90/40640000] via 23.0.0.3, 00:00:16, Serial2/2
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial2/2
172.16.0.0/24 is subnetted, 1 subnets
D 172.16.0.0 [90/40514560] via 192.168.0.1, 00:00:16, Serial2/1
[90/40514560] via 23.0.0.3, 00:00:16, Serial2/2
10.0.0.0/30 is subnetted, 9 subnets
D 10.1.3.8 [90/40640000] via 23.0.0.3, 00:00:16, Serial2/2
C 10.1.2.8 is directly connected, Loopback3
D 10.1.1.8 [90/40640000] via 192.168.0.1, 00:00:16, Serial2/1
D 10.1.3.0 [90/40640000] via 23.0.0.3, 00:00:16, Serial2/2
C 10.1.2.0 is directly connected, Loopback1
D 10.1.1.0 [90/40640000] via 192.168.0.1, 00:00:16, Serial2/1
D 10.1.3.4 [90/40640000] via 23.0.0.3, 00:00:16, Serial2/2
C 10.1.2.4 is directly connected, Loopback2
D 10.1.1.4 [90/40640000] via 192.168.0.1, 00:00:16, Serial2/1
C 192.168.0.0/24 is directly connected, Serial2/1
R2#
show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(10.1.2.9)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.1.3.8/30, 1 successors, FD is 40640000
via 23.0.0.3 (40640000/128256), Serial2/2
via 192.168.0.1 (40642560/40130560), Serial2/1
P 10.1.2.8/30, 1 successors, FD is 128256
via Connected, Loopback3
P 1.1.1.0/24, 1 successors, FD is 40640000
via 192.168.0.1 (40640000/128256), Serial2/1
via 23.0.0.3 (40642560/40130560), Serial2/2
P 2.2.2.0/24, 1 successors, FD is 128256
via Connected, Loopback0
P 10.1.1.8/30, 1 successors, FD is 40640000
via 192.168.0.1 (40640000/128256), Serial2/1
via 23.0.0.3 (40642560/40130560), Serial2/2
P 3.3.3.0/24, 1 successors, FD is 40640000
via 23.0.0.3 (40640000/128256), Serial2/2
via 192.168.0.1 (40642560/40130560), Serial2/1
P 10.1.3.0/30, 1 successors, FD is 40640000
via 23.0.0.3 (40640000/128256), Serial2/2
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
via 192.168.0.1 (40642560/40130560), Serial2/1
P 10.1.2.0/30, 1 successors, FD is 128256
via Connected, Loopback1
P 10.1.1.0/30, 1 successors, FD is 40640000
via 192.168.0.1 (40640000/128256), Serial2/1
via 23.0.0.3 (40642560/40130560), Serial2/2
P 10.1.3.4/30, 1 successors, FD is 40640000
via 23.0.0.3 (40640000/128256), Serial2/2
via 192.168.0.1 (40642560/40130560), Serial2/1
P 10.1.2.4/30, 1 successors, FD is 128256
via Connected, Loopback2
P 10.1.1.4/30, 1 successors, FD is 40640000
via 192.168.0.1 (40640000/128256), Serial2/1
via 23.0.0.3 (40642560/40130560), Serial2/2
P 23.0.0.0/24, 1 successors, FD is 40512000
via Connected, Serial2/2
P 192.168.0.0/24, 1 successors, FD is 40512000
via Connected, Serial2/1
P 172.16.0.0/24, 2 successors, FD is 40514560
via 23.0.0.3 (40514560/40002560), Serial2/2
via 192.168.0.1 (40514560/40002560), Serial2/1
//R1和R3都宣告了自己的直连接口,现在可以查看到的是从192.168.0.1和23.0.0.3
的Metric都是相同的
8)查看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
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/40130560] via 172.16.0.1, 00:02:02, FastEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/40640000] via 23.0.0.2, 00:02:02, Serial2/1
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial2/1
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, FastEthernet0/0
10.0.0.0/30 is subnetted, 9 subnets
C 10.1.3.8 is directly connected, Loopback3
D 10.1.2.8 [90/40640000] via 23.0.0.2, 00:02:02, Serial2/1
D 10.1.1.8 [90/40130560] via 172.16.0.1, 00:02:02, FastEthernet0/0
C 10.1.3.0 is directly connected, Loopback1
D 10.1.2.0 [90/40640000] via 23.0.0.2, 00:02:02, Serial2/1
D 10.1.1.0 [90/40130560] via 172.16.0.1, 00:02:02, FastEthernet0/0
C 10.1.3.4 is directly connected, Loopback2
D 10.1.2.4 [90/40640000] via 23.0.0.2, 00:02:02, Serial2/1
D 10.1.1.4 [90/40130560] via 172.16.0.1, 00:02:02, FastEthernet0/0
D 192.168.0.0/24 [90/40514560] via 172.16.0.1, 00:02:02, FastEthernet0/0
R3#
show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(10.1.3.9)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.1.3.8/30, 1 successors, FD is 128256
via Connected, Loopback3
P 10.1.2.8/30, 1 successors, FD is 40640000
via 23.0.0.2 (40640000/128256), Serial2/1
P 1.1.1.0/24, 1 successors, FD is 40130560
via 172.16.0.1 (40130560/128256), FastEthernet0/0
P 2.2.2.0/24, 1 successors, FD is 40640000
via 23.0.0.2 (40640000/128256), Serial2/1
P 10.1.1.8/30, 1 successors, FD is 40130560
via 172.16.0.1 (40130560/128256), FastEthernet0/0
P 3.3.3.0/24, 1 successors, FD is 128256
via Connected, Loopback0
P 10.1.3.0/30, 1 successors, FD is 128256
via Connected, Loopback1
P 10.1.2.0/30, 1 successors, FD is 40640000
via 23.0.0.2 (40640000/128256), Serial2/1
P 10.1.1.0/30, 1 successors, FD is 40130560
via 172.16.0.1 (40130560/128256), FastEthernet0/0
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.1.3.4/30, 1 successors, FD is 128256
via Connected, Loopback2
P 10.1.2.4/30, 1 successors, FD is 40640000
via 23.0.0.2 (40640000/128256), Serial2/1
P 10.1.1.4/30, 1 successors, FD is 40130560
via 172.16.0.1 (40130560/128256), FastEthernet0/0
P 23.0.0.0/24, 1 successors, FD is 40512000
via Connected, Serial2/1
P 192.168.0.0/24, 1 successors, FD is 40514560
via 172.16.0.1 (40514560/40512000), FastEthernet0/0
via 23.0.0.2 (41024000/40512000), Serial2/1
P 172.16.0.0/24, 1 successors, FD is 40002560
via Connected, FastEthernet0/0
//R1和R2都宣告了自己的直连接口,现在可以查看到的是从172.16.0.1和23.0.0.2的Metric不同,所以在路由表中只有下一跳为23.0.0.2的路由存在
9)配置R3非等价负载均衡
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#
router eigrp 100
R3(config-router)#
variance 2
R3(config-router)#^Z
10)再次查看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
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/40130560] via 172.16.0.1, 00:00:58, FastEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/40640000] via 23.0.0.2, 00:00:58, Serial2/1
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial2/1
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, FastEthernet0/0
10.0.0.0/30 is subnetted, 9 subnets
C 10.1.3.8 is directly connected, Loopback3
D 10.1.2.8 [90/40640000] via 23.0.0.2, 00:00:58, Serial2/1
D 10.1.1.8 [90/40130560] via 172.16.0.1, 00:00:59, FastEthernet0/0
C 10.1.3.0 is directly connected, Loopback1
D 10.1.2.0 [90/40640000] via 23.0.0.2, 00:00:59, Serial2/1
D 10.1.1.0 [90/40130560] via 172.16.0.1, 00:00:59, FastEthernet0/0
C 10.1.3.4 is directly connected, Loopback2
D 10.1.2.4 [90/40640000] via 23.0.0.2, 00:00:59, Serial2/1
D 10.1.1.4 [90/40130560] via 172.16.0.1, 00:00:59, FastEthernet0/0
D 192.168.0.0/24 [90/40514560] via 172.16.0.1, 00:00:59, FastEthernet0/0
[90/41024000] via 23.0.0.2, 00:00:59, Serial2/1