掌握EIGRP的等价负载均衡的方法,非等价负载的实现方法,修改EIGRP的度量值的方法,理解FD AD FC 的深层含义
Kxe深度3G学院
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.12.0
R1(config-router)#network 192.168.14.0
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.12.0
R1(config-router)#network 192.168.14.0
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R2(config-router)#network 2.2.2.2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R2(config-router)#network 2.2.2.2
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
R(config)#router eigrp
R4(config-router)#no auto-summary
R4(config-router)#network 192.168.34.0
R4(config-router)#net 192.168.14.0
R4(config-router)#no auto-summary
R4(config-router)#network 192.168.34.0
R4(config-router)#net 192.168.14.0
R4#show ip route
Gateway of last resort is not set
Gateway of last resort is not set
D 192.168.12.0/24 [90/3193856] via 192.168.34.3, 00:00:41, Serial2/1
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/2809856] via 192.168.14.1, 00:00:42, F0/0 192.168.14.0/24 is directly connected, FastEthernet0/0
D 192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:00:42, Serial2/1 Kxe
C 192.168.34.0/24 is directly connected, Serial2/
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/2809856] via 192.168.14.1, 00:00:42, F0/0 192.168.14.0/24 is directly connected, FastEthernet0/0
D 192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:00:42, Serial2/1 Kxe
C 192.168.34.0/24 is directly connected, Serial2/
\\说明了R4到R2的loopback 0 口是走的192.168.14.1这条链路,
R4#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(192.168.34.4)
IP-EIGRP Topology Table for AS(1)/ID(192.168.34.4)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
r - reply Status, s - sia Status
P 2.2.2.2/32, 1 successors, FD is 2300416
via 192.168.14.1 (2323456/2297856), FastEthernet0/0 via 192.168.34.3 (2809856/2297856), Serial2/1 P 192.168.34.0/24, 1 successors, FD is 2169856
via Connected, Serial2/1
P 192.168.12.0/24, 1 successors, FD is 2195456
via 192.168.14.1 (2195456/2169856), FastEthernet0/0
P 192.168.14.0/24, 1 successors, FD is 51200
via Connected, FastEthernet0/0
P 192.168.23.0/24, 1 successors, FD is 2681856
via 192.168.34.3 (2681856/2169856), Serial2/1
via 192.168.14.1 (2323456/2297856), FastEthernet0/0 via 192.168.34.3 (2809856/2297856), Serial2/1 P 192.168.34.0/24, 1 successors, FD is 2169856
via Connected, Serial2/1
P 192.168.12.0/24, 1 successors, FD is 2195456
via 192.168.14.1 (2195456/2169856), FastEthernet0/0
P 192.168.14.0/24, 1 successors, FD is 51200
via Connected, FastEthernet0/0
P 192.168.23.0/24, 1 successors, FD is 2681856
via 192.168.34.3 (2681856/2169856), Serial2/1
\\在EIGRP的topology table里看到了到达2.2.2.2 有两条链路。192.168.14.1 和192.168.34.3 。因为192.168.14.1的FD小于192.168.34.3的FD所以在ROUTER TABLE 中只存放了这条,由192.168.34.3 的AD小于192.168.14.1 的FD所以符合了EIGRIP的等价负载条件。
实现等价的负载
R4(config)#int f0/0
R4(config-if)#delay 2000 更改接口的带宽,在计算EIGRP度量值时,不需要在/10所以是2000
R4(config-if)#delay 2000 更改接口的带宽,在计算EIGRP度量值时,不需要在/10所以是2000
R4#show ip route
Gateway of last resort is not set
D 192.168.12.0/24 [90/ 2681856] via 192.168.14.1, 00:04:21, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/ 2809856] via 192.168.14.1, 00:04:21, FastEthernet0/0
[90/ 2809856] via 192.168.34.3, 00:04:21, Serial2/1
C 192.168.14.0/24 is directly connected, FastEthernet0/0
D 192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:04:21, Serial2/1
C 192.168.34.0/24 is directly connected, Serial2/1
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/ 2809856] via 192.168.14.1, 00:04:21, FastEthernet0/0
[90/ 2809856] via 192.168.34.3, 00:04:21, Serial2/1
C 192.168.14.0/24 is directly connected, FastEthernet0/0
D 192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:04:21, Serial2/1
C 192.168.34.0/24 is directly connected, Serial2/1
以上看出了到2.2.2.2 走的是两条链路 且他们的metric值一样的所以实现了等价的负载均衡!
非等价的负载均衡:
先把R4的F0/0就可设置还原。
R4(config)#router eigrp 1
R4(config-router)#variance 2 variance代表了EIGRP支持等价的链路数目。(1-128)默认是一条链路
R4#show ip route
Gateway of last resort is not set
R4(config-router)#variance 2 variance代表了EIGRP支持等价的链路数目。(1-128)默认是一条链路
R4#show ip route
Gateway of last resort is not set
D 192.168.12.0/24 [90/2195456] via 192.168.14.1, 00:00:20, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/2323456] via 192.168.14.1, 00:00:20, FastEthernet0/0
[90/ 2809856] via 192.168.34.3, 00:00:20, Serial2/1
C 192.168.14.0/24 is directly connected, FastEthernet0/0 \\非等价
D 192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:00:20, Serial2/1
C 192.168.34.0/24 is directly connected, Serial2/
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/2323456] via 192.168.14.1, 00:00:20, FastEthernet0/0
[90/ 2809856] via 192.168.34.3, 00:00:20, Serial2/1
C 192.168.14.0/24 is directly connected, FastEthernet0/0 \\非等价
D 192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:00:20, Serial2/1
C 192.168.34.0/24 is directly connected, Serial2/
虽然到2.2.2.2 是走的两条链路但是它们的metric是不一样的。一个是:232456 另一个是:2809856
所以现在我实现了非等价的负载均衡。