EIGRP配置

 
 
#R1
R1(config)#int loo 0
R1(config-if)#ip add 10.1.1.1 255.255.255.255
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int f0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int s1/1
R1(config-if)#ip add 192.168.11.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#enc ppp
R1(config-if)#exit
R1(config)#router eigrp 86
R1(config-router)#net 10.0.0.0
R1(config-router)#net 192.168.1.0
R1(config-router)#net 192.168.11.0
R1(config-router)#exit
#R2
R2(config)#int f0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#int s1/0
R2(config-if)#ip add 192.168.11.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#enc ppp
R2(config-if)#clock rate 64000
R2(config-if)#exit
R2(config)#int s1/1
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#enc ppp
R2(config-if)#clock rate 64000
R2(config-if)#exit
R2(config)#router eigrp 86
R2(config-router)#net 192.168.1.0
R2(config-router)#net 192.168.11.0
R2(config-router)#net 192.168.2.0
R2(config-router)#exit
#R3
R3(config)#int loo 0
R3(config-if)#ip add 10.1.2.3 255.255.255.255
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#int s1/0
R3(config-if)#ip add 192.168.2.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#enc ppp
R3(config-if)#exit
R3(config)#router eigrp 86
R3(config-router)#net 10.0.0.0
R3(config-router)#net 192.168.2.0
R3(config-router)#exit
 
在配置完以後,在R1上ping R3的loopback 0接口
R1#ping 10.1.2.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
 
我們可以看到,是無法ping通的!我們在R1上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
     192.168.11.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.11.2/32 is directly connected, Serial1/1
C       192.168.11.0/24 is directly connected, Serial1/1
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       10.0.0.0/8 is a summary, 00:02:52, Null0
C       10.1.1.1/32 is directly connected, Loopback0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
D       192.168.2.2/32 [90/2172416] via 192.168.1.2, 00:02:18, FastEthernet0/0
D       192.168.2.0/24 [90/2172416] via 192.168.1.2, 00:02:18, FastEthernet0/0
問題就出在這裏,EIGRP在默認的情況下是自動彙總的.所以導致路由不知道該怎麼走.我們需要關閉自動彙總.
R1(config)#router eigrp 86
R1(config-router)#no auto-summary
R1(config-router)#exit
 
R2(config)#router eigrp 86
R2(config-router)#no auto-summary
R2(config-router)#exit
 
R3(config)#router eigrp 86
R3(config-router)#no auto-summary
R3(config-router)#exit
 
此時我們再ping 一次.
R1#ping 10.1.2.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/62/124 ms
這樣就通了,讓我們開看一下路由表.
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
     192.168.11.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.11.2/32 is directly connected, Serial1/1
C       192.168.11.0/24 is directly connected, Serial1/1
     10.0.0.0/32 is subnetted, 2 subnets
D       10.1.2.3 [90/2300416] via 192.168.1.2, 00:02:49, FastEthernet0/0
C       10.1.1.1 is directly connected, Loopback0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
D       192.168.2.2/32 [90/2172416] via 192.168.1.2, 00:07:48, FastEthernet0/0
D       192.168.2.0/24 [90/2172416] via 192.168.1.2, 00:07:48, FastEthernet0/0
路由條目已經包含了子網掩碼!但大家注意看一下!所有R2,R3的路由條目都是從FastEthernet0/0進行更新與路由的.這就涉及到一個EIGRP的默認度量的問題.EIGRP的默認度量參數爲帶寬和時延.FastEthernet0/0的帶寬與時延都要比Serial接口的要小,所以FastEthernet就被作爲後繼,Serial就被作爲可行後繼.
 
在這裏,EIGRP還支持等值或不等值的負載均衡.首先我們先來看一這EIGRP的託撲表.
R1#show ip eigrp 86 top
IP-EIGRP Topology Table for AS(86)/ID(10.1.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 10.1.2.3/32, 1 successors, FD is 2300416
        via 192.168.1.2 (2300416/2297856), FastEthernet0/0
        via 192.168.11.2 (2809856/2297856), Serial1/1

P 10.1.1.1/32, 1 successors, FD is 128256
        via Connected, Loopback0
P 192.168.11.2/32, 1 successors, FD is 2169856
        via Rconnected (2169856/0)
P 192.168.11.1/32, 0 successors, FD is Inaccessible
        via 192.168.1.2 (2172416/2169856), FastEthernet0/0
        via 192.168.11.2 (2681856/2169856), Serial1/1
P 192.168.11.0/24, 1 successors, FD is 2169856
        via Connected, Serial1/1
P 192.168.2.2/32, 1 successors, FD is 2172416
        via 192.168.1.2 (2172416/2169856), FastEthernet0/0
        via 192.168.11.2 (2681856/2169856), Serial1/1

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 2172416
         
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
        via 192.168.1.2 (2172416/2169856), FastEthernet0/0
        via 192.168.11.2 (2681856/2169856), Serial1/1
 
有幾個路由條目是存在兩條路可以到達目的的.但由於默認情況下EIGRP的負載均衡是等值負載均衡,所以路由表只出現一條路.輸入以下的命令使之成爲不等值負載均衡:
R1(config)#router eigrp 86
R1(config-router)#variance 10
 
R2(config)#router eigrp 86
R2(config-router)#variance 10
 
R3(config)#router eigrp 86
R3(config-router)#variance 10
 
這下我們在來看一下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
     192.168.11.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.11.2/32 is directly connected, Serial1/1
C       192.168.11.0/24 is directly connected, Serial1/1
     10.0.0.0/32 is subnetted, 2 subnets
D       10.1.2.3 [90/2809856] via 192.168.11.2, 00:01:16, Serial1/1
                 [90/2300416] via 192.168.1.2, 00:01:16, FastEthernet0/0

C       10.1.1.1 is directly connected, Loopback0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
D       192.168.2.2/32 [90/2681856] via 192.168.11.2, 00:01:16, Serial1/1
                       [90/2172416] via 192.168.1.2, 00:01:16, FastEthernet0/0
D       192.168.2.0/24 [90/2681856] via 192.168.11.2, 00:01:16, Serial1/1
                       [90/2172416] via 192.168.1.2, 00:01:16, FastEthernet0/0
 
這時爲了給大家看清楚到底有沒有起到均衡作用,我們跟蹤一下!
R1#traceroute 10.1.2.3
Type escape sequence to abort.
Tracing the route to 10.1.2.3
  1 192.168.11.2 24 msec
    192.168.1.2 72 msec
    192.168.11.2 40 msec
  2 192.168.2.2 52 msec *  84 msec
 
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章