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
 
 

你可能感兴趣的:(职场,休闲,EIGRP)