CCNP Day5 EIGRP默认路由三

1、网络拓扑

2、基础Eigrp配置

R1>
R1>enable
R1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface f0/0
R1(config-if)#ip add 172.16.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#no shu
R1(config-if)#no shutdown 
R1(config-if)#exit
R1(config)#router eigrp 100
R1(config-router)#network 172.16.12.1 0.0.0.0
R1(config-router)#network 1.1.1.1 0.0.0.0
R1(config-router)#exit
R1(config)#
R1(config)#interface s1/1
R1(config-if)#ip add 1.1.13.1 255.255.255.0
R1(config-if)#no shutdown 
R1(config-if)#exit
R1(config)#router eigrp 100
R1(config-router)#1.1.13.1 255.255.255.0
R1(config-router)#network 1.1.13.1 255.255.255.0
R1(config-router)#
R1(config-router)#
R1(config-router)#
R1(config-router)#end
R1#
R1#
R1(config)#router eigrp 100
R1(config-router)#no auto-summary 


R2>
R2>enable
R2#config t
R2(config)#interface f0/0
R2(config-if)#ip add 172.16.12.2 255.255.255.0
R2(config-if)#no shutdown 
R2(config-if)#exit
R2(config)#
R2(config)#interface s1/0
R2(config-if)#ip add 192.168.23.1 255.255.255.0
R2(config-if)#no shutdown 
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#network 192.168.23.1 0.0.0.0
R2(config-router)#network 172.16.12.2 0.0.0.0
R2(config-router)#end
R2(config)#router eigrp 100
R2(config-router)#no auto
R2(config-router)#no auto-summary 
R2(config-router)#
R2(config-router)#
R2(config-router)#
R2(config-router)#
R2(config-router)#end
R2#show ip eigrp topology 
IP-EIGRP Topology Table for AS(100)/ID(192.168.23.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 1.1.1.0/24, 1 successors, FD is 156160
        via 172.16.12.1 (156160/128256), FastEthernet0/0
P 3.3.3.0/24, 1 successors, FD is 2297856
        via 192.168.23.2 (2297856/128256), Serial1/0
P 1.1.13.0/24, 1 successors, FD is 2172416
        via 172.16.12.1 (2172416/2169856), FastEthernet0/0
        via 192.168.23.2 (2681856/2169856), Serial1/0
P 192.168.23.0/24, 1 successors, FD is 2169856
        via Connected, Serial1/0
P 172.16.12.0/24, 1 successors, FD is 28160
        via Connected, FastEthernet0/0
R2#


R3>enable
R3#config t
R3(config)#
R3(config)#interface s1/0
R3(config-if)#ip add 192.168.23.2 255.255.255.0
R3(config-if)#no shutdown 
R3(config-if)#exit
R3(config)#interface loopback 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#no shutdown 
R3(config)#router eigrp 100
R3(config-router)#network 3.3.3.3 0.0.0.0
R3(config-router)#network 192.168.23.2 0.0.0.0
R3(config-router)#end
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

D    1.0.0.0/8 [90/2300416] via 192.168.23.1, 00:00:11, Serial1/0
     3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       3.3.3.0/24 is directly connected, Loopback0
D       3.0.0.0/8 is a summary, 00:00:16, Null0
D    172.16.0.0/16 [90/2172416] via 192.168.23.1, 00:00:11, Serial1/0
C    192.168.23.0/24 is directly connected, Serial1/0
R3#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/75/88 ms
R3#
R3#
R3#
R3(config)#interface s1/1
R3(config-if)#ip add 1.1.13.2 255.255.255.0
R3(config-if)#exit
R3(config)#router eigrp 100
R3(config-router)#network 1.1.13.2 0.0.0.0
R3(config-router)#end
R3#
R3#
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

D    1.0.0.0/8 [90/2300416] via 192.168.23.1, 00:30:48, Serial1/0
     3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       3.3.3.0/24 is directly connected, Loopback0
D       3.0.0.0/8 is a summary, 00:30:53, Null0
D    172.16.0.0/16 [90/2172416] via 192.168.23.1, 00:30:48, Serial1/0
C    192.168.23.0/24 is directly connected, Serial1/0
R3#
R3#
R3#show ip eigrp topology 
IP-EIGRP Topology Table for AS(100)/ID(3.3.3.3)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 1.0.0.0/8, 1 successors, FD is 2300416
        via 192.168.23.1 (2300416/156160), Serial1/0
P 3.0.0.0/8, 1 successors, FD is 128256
        via Summary (128256/0), Null0
P 3.3.3.0/24, 1 successors, FD is 128256
        via Connected, Loopback0
P 192.168.23.0/24, 1 successors, FD is 2169856
        via Connected, Serial1/0
P 172.16.0.0/16, 1 successors, FD is 2172416
        via 192.168.23.1 (2172416/28160), Serial1/0
R3#
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   1.1.13.1                Se1/1             13 00:00:01    1  2000  2  5
0   192.168.23.1            Se1/0             13 00:33:34  614  3684  
R3(config)#router eigrp 100
R3(config-router)#no aut
R3(config-router)#no auto-summary 
R3(config-router)#end
R3#
R3#
R

2、其它命令

R3#show ip route 1.1.1.0   
Routing entry for 1.1.1.0/24
  Known via "eigrp 100", distance 90, metric 2297856, type internal
  Redistributing via eigrp 100
  Last update from 1.1.13.1 on Serial1/1, 00:22:32 ago
  Routing Descriptor Blocks:
  * 1.1.13.1, from 1.1.13.1, 00:22:32 ago, via Serial1/1
      Route metric is 2297856, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1

R3#ping 1.1.1.1 re
R3#ping 1.1.1.1 repeat 60

Type escape sequence to abort.
Sending 60, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (60/60), round-trip min/avg/max = 20/34/52 ms
R3#
R3#

 

3、Eigrp的非等价路由

R3#show ip eigrp topology 
IP-EIGRP Topology Table for AS(100)/ID(3.3.3.3)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 1.1.1.0/24, 1 successors, FD is 2297856
        via 1.1.13.1 (2297856/128256), Serial1/1           /***这里显示R3到1.1.1.0****/网段有两条路径****/
        via 192.168.23.1 (2300416/156160), Serial1/0
P 3.3.3.0/24, 1 successors, FD is 128256
        via Connected, Loopback0
P 1.1.13.0/24, 1 successors, FD is 2169856
        via Connected, Serial1/1
P 192.168.23.0/24, 1 successors, FD is 2169856
        via Connected, Serial1/0
P 172.16.12.0/24, 2 successors, FD is 2172416
        via 192.168.23.1 (2172416/28160), Serial1/0
        via 1.1.13.1 (2172416/28160), Serial1/1
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, 2 subnets
D       1.1.1.0 [90/2297856] via 1.1.13.1, 00:04:51, Serial1/1   /***在Show IP route这里只显示一条successor路由****/
C       1.1.13.0 is directly connected, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     172.16.0.0/24 is subnetted, 1 subnets
D       172.16.12.0 [90/2172416] via 1.1.13.1, 00:04:51, Serial1/1
                    [90/2172416] via 192.168.23.1, 00:04:51, Serial1/0
C    192.168.23.0/24 is directly connected, Serial1/0
R3#

R3#show ip eigrp topology all-links
IP-EIGRP Topology Table for AS(100)/ID(3.3.3.3)


Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status


P 1.1.1.0/24, 1 successors, FD is 2297856, serno 5
via 1.1.13.1 (2297856/128256), Serial1/1       /****可以放在拓扑表的路由,必须满足:successor路由;Feasible successor路由*****/
via 192.168.23.1 (2300416/156160), Serial1/0   /××××这里的successor路由FD:2297856,大于Feasible successor AD值:156160××××/
P 3.3.3.0/24, 1 successors, FD is 128256, serno 1
via Connected, Loopback0
P 1.1.13.0/24, 1 successors, FD is 2169856, serno 3
via Connected, Serial1/1
via 192.168.23.1 (2684416/2172416), Serial1/0
P 192.168.23.0/24, 1 successors, FD is 2169856, serno 2
via Connected, Serial1/0
via 1.1.13.1 (2684416/2172416), Serial1/1
P 172.16.12.0/24, 2 successors, FD is 2172416, serno 6
via 192.168.23.1 (2172416/28160), Serial1/0
via 1.1.13.1 (2172416/28160), Serial1/1
R3#

 

4、把R3 到1.1.1.0网络的Feasible Successor路由也加入路由表中

R3#show ip protocols 
Routing Protocol is "eigrp 100"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Incoming routes in FastEthernet0/0 will have 2141697 added to metric if on list 1
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
  EIGRP maximum hopcount 100
  EIGRP maximum metric variance 1
  Redistributing: eigrp 100
  EIGRP NSF-aware route hold timer is 240s
  Automatic network summarization is not in effect
  Maximum path: 4
  Routing for Networks:
    1.1.13.2/32
    3.3.3.3/32
    192.168.23.2/32
  Routing Information Sources:
    Gateway         Distance      Last Update
    1.1.13.1              90      01:26:05
    192.168.23.1          90      01:26:05
  Distance: internal 90 external 170
          
R3#
如果需要把Feasible successor路由加入路由表,需满足如下条件:
successor FD *
variance > Feasible successor FD 故在R3上调整variance的值如下:

R3(config)#router eigrp 100
R3(config-router)#variance 2
R3(config-router)#end
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, 2 subnets 
D 1.1.1.0 [90/2297856] via 1.1.13.1, 00:00:09, Serial1/1          /*****这里管理距离并不一样,但依然可以负载均衡****/
          [90/2300416] via 192.168.23.1, 00:00:09, Serial1/0
C 1.1.13.0 is directly connected, Serial1/1
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 1 subnets
D 172.16.12.0 [90/2172416] via 1.1.13.1, 00:00:09, Serial1/1
[90/2172416] via 192.168.23.1, 00:00:09, Serial1/0
C 192.168.23.0/24 is directly connected, Serial1/0
R3#

R3#show ip route 1.1.1.0
Routing entry for 1.1.1.0/24
Known via "eigrp 100", distance 90, metric 2297856, type internal
Redistributing via eigrp 100
Last update from 192.168.23.1 on Serial1/0, 00:03:46 ago
Routing Descriptor Blocks:
* 1.1.13.1, from 1.1.13.1, 00:03:46 ago, via Serial1/1    /***星号显示为Successor路由***/
Route metric is 2297856, traffic share count is 1         /***各条路由链路承担流量,遵循Metric值之比****/
Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
192.168.23.1, from 192.168.23.1, 00:03:46 ago, via Serial1/0
Route metric is 2300416, traffic share count is 1
Total delay is 25100 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2

R3#

5、确保路由从Metric值小的路径传输

R3#config t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router eig
R3(config)#router eigrp 100
R3(config-router)#traffic-share min across-interfaces       /**转发数据时走Metric最小的路径×××/
R3(config-router)#

 

posted @ 2022-11-27 21:52  倔犟的石头  阅读(24)  评论(0)    收藏  举报