CCNP-2 EIGRP试验2(BSCI)

CCNP-2 EIGRP试验2

实验拓扑:
CCNP-2 EIGRP试验2(BSCI)
试验要求:1-R1R4全部起EIGRP路由协议,配置bandwidth,观察EIGRP的等价负载均衡和非等价负载均衡。
试验目的:掌握EIGRP等价负载均衡和非等价负载均衡的基本配置。

试验配置:
R1
R1(config)#int s1/0
R1(config-if)#ip add 199.99.1.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shu
R1(config-if)#bandwidth 56
R1(config-if)#exit
R1(config)#int s1/1
R1(config-if)#ip add 199.99.2.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 56
R1(config-if)#no shu
R1(config-if)#exit
R1(config)#router eigrp 100
R1(config-router)#net
R1(config-router)#network 199.99.1.0
R1(config-router)#network 199.99.2.0
 
R2
R2(config)#int s1/0
R2(config-if)#ip add 199.99.1.2 255.255.255.0
R2(config-if)#no shu
R2(config-if)#bandwidth 56
R2(config-if)#exit
R2(config)#int s1/1
R2(config-if)#ip add 199.99.3.1 255.255.255.0
R2(config-if)#no shu
R2(config-if)#bandwidth 56
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#net 199.99.1.0
R2(config-router)#net 199.99.3.0
 
R3
R3(config)#int s1/0
R3(config-if)#ip add 199.99.2.2 255.255.255.0
R3(config-if)#bandwidth 56
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#int s1/1
R3(config-if)#ip add 199.99.4.1 255.255.255.0
R3(config-if)#no shu 
R3(config-if)#bandwidth 56
R3(config-if)#exit
R3(config)#router eigrp 100
R3(config-router)#net 199.99.2.0
R3(config-router)#net 199.99.4.0
 
R4
R4(config)#int s1/0
R4(config-if)#ip add 199.99.3.2 255.255.255.0
R4(config-if)#bandwidth 56
R4(config-if)#clock rate 64000
R4(config-if)#no shu
R4(config-if)#exit
R4(config)#int s1/1
R4(config-if)#ip add 199.99.4.2 255.255.255.0
R4(config-if)#bandwidth 56
R4(config-if)#clock rate 64000
R4(config-if)#no shu
R4(config-if)#exit
R4(config)#int loop0
R4(config-if)#ip add 100.100.100.100 255.255.255.0
R4(config-if)#exit
R4(config)#router eigrp 100
R4(config-router)#net 199.99.3.0
R4(config-router)#net 199.99.4.0
R4(config-router)#net 100.100.100.0
以上是基本配置,我们在没个接口上都用到了一条命令bandwidth 56来指定带宽为56Kbps,下面我们在R1show ip route查看路由表:
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
 
D    100.0.0.0/8 [90/46866176] via 199.99.2.2, 00:00:02, Serial1/1
                 [90/46866176] via 199.99.1.2, 00:00:02, Serial1/0
D    199.99.3.0/24 [90/46738176] via 199.99.1.2, 00:00:04, Serial1/0
C    199.99.2.0/24 is directly connected, Serial1/1
C    199.99.1.0/24 is directly connected, Serial1/0
D    199.99.4.0/24 [90/46738176] via 199.99.2.2, 00:00:04, Serial1/1
可以看到有两条到100.0.0.0/8的路由(EIGRP自动汇总),再用show ip eigrp topology查看拓扑表:
R1#show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(199.99.2.1)
 
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
 
P 100.0.0.0/8, 2 successors, FD is 46866176
        via 199.99.1.2 (46866176/46354176), Serial1/0
        via 199.99.2.2 (46866176/46354176), Serial1/1
P 199.99.4.0/24, 1 successors, FD is 46738176
        via 199.99.2.2 (46738176/46226176), Serial1/1
P 199.99.1.0/24, 1 successors, FD is 46226176
        via Connected, Serial1/0
P 199.99.2.0/24, 1 successors, FD is 46226176
        via Connected, Serial1/1
P 199.99.3.0/24, 1 successors, FD is 46738176
        via 199.99.1.2 (46738176/46226176), Serial1/0
可以发现到100.0.0.0/8的两条路径的FD都是46354176,这样就可以实现等价负载均衡的目的,注意:EIGRP等价负载均衡默认启用,并且支持4条不同的等价路径,可以使用路由协议配置模式下的maximum-paths命令修改,最多支持6条;下面在R1上起loopback接口,并用eigrp宣告接口IP地址,再进行ping测试:
R1(config)#int loop0
R1(config-if)#ip add 200.200.200.200 255.255.255.0
R1(config)#end
R1#ping
Protocol [ip]:
Target IP address: 100.100.100.100
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 200.200.200.200
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 [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 200.200.200.200
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:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.4.2)
   (199.99.2.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Reply to request 1 (232 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (199.99.1.1)
   (199.99.3.1)
   (100.100.100.100)
   (199.99.3.2)
   (199.99.1.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Reply to request 2 (88 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.4.2)
   (199.99.2.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Reply to request 3 (232 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (199.99.1.1)
   (199.99.3.1)
   (100.100.100.100)
   (199.99.3.2)
   (199.99.1.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Reply to request 4 (136 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.4.2)
   (199.99.2.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/164/232 ms
注意结果中用红色标记的部分说明了通过两条路径都可以到达目的
下面我们把R1R3的带宽修改为55
R1(config)#int s1/1
R1(config-if)#bandwidth 55
过一会我们可以发现R1100.0.0.0/8的路由就剩下1条了,就是通过R2的路由,为了实现非等价负载均衡,我们需要用到variance命令在路由协议配置模式下修改(有关非等价负载均衡的计算方法这里略),如下:
R1(config-router)#variance 2
修改完等一会后,使用命令show ip route查看路由表:
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
 
C    200.200.200.0/24 is directly connected, Loopback0
D    100.0.0.0/8 [90/47697408] via 199.99.2.2, 00:00:03, Serial1/1
                 [90/46866176] via 199.99.1.2, 00:00:03, Serial1/0
D    199.99.3.0/24 [90/46738176] via 199.99.1.2, 00:00:03, Serial1/0
C    199.99.2.0/24 is directly connected, Serial1/1
C    199.99.1.0/24 is directly connected, Serial1/0
D    199.99.4.0/24 [90/47569408] via 199.99.2.2, 00:00:03, Serial1/1
                   [90/47250176] via 199.99.1.2, 00:00:03, Serial1/0
可以看到有两条到100.0.0.0/8的路由,并且它们的metric值是不相等的,通过199.99.2.2的路由得metric要比通过199.99.1.2的路由的metric大,因为我们把出口带宽改成了55,在看一下show ip eigrp topology
R1#show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(200.200.200.200)
 
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
 
P 100.0.0.0/8, 1 successors, FD is 46866176
        via 199.99.1.2 (46866176/46354176), Serial1/0
        via 199.99.2.2 (47697408/46354176), Serial1/1
P 199.99.4.0/24, 1 successors, FD is 47250176
        via 199.99.1.2 (47250176/46738176), Serial1/0
        via 199.99.2.2 (47569408/46226176), Serial1/1
P 199.99.1.0/24, 1 successors, FD is 46226176
        via Connected, Serial1/0
P 199.99.2.0/24, 1 successors, FD is 47057408
        via Connected, Serial1/1
P 199.99.3.0/24, 1 successors, FD is 46738176
        via 199.99.1.2 (46738176/46226176), Serial1/0
P 200.200.200.0/24, 1 successors, FD is 128256
        via Connected, Loopback0
然后进行ping测试:
R1#ping
Protocol [ip]:
Target IP address: 100.100.100.100
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 200.200.200.200
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 [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 200.200.200.200
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 (236 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.4.2)
   (199.99.2.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Reply to request 1 (280 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.3.2)
   (199.99.1.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Reply to request 2 (112 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.4.2)
   (199.99.2.2)
   (200.200.200.200) <*>
   (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:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.3.2)
   (199.99.1.2)
   (200.200.200.200) <*>
   (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:
   (199.99.2.1)
   (199.99.4.1)
   (100.100.100.100)
   (199.99.4.2)
   (199.99.2.2)
   (200.200.200.200) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list
 
Success rate is 100 percent (5/5), round-trip min/avg/max = 112/180/280 ms
我们可以与前面等价负载均衡的ping结果相比较,发现走的路径不同。
特别注意:在EIGRP进行负载均衡的时候,如果是PROCESS-SWITCHING的话,那么是根据每个数据包来进行负载均衡的,如果是FAST-SWITCHING的话,则是根据目的地进行负载均衡的!
 
实验总结:通过本试验可以掌握在EIGRP中进行等价负载均衡和非等价负载均衡的基本配置方法。还应该知道EIGRPmetric的计算是根自己接口的带宽和链路上总的延迟计算出来的。(书上说带宽是链路上的最小带宽,但是在做试验的时候发现试验结果与书上说的有冲突,请读者自己证实!)。



















本文转自loveme2351CTO博客,原文链接: http://blog.51cto.com/loveme23/45383,如需转载请自行联系原作者