CISCO-EIGRP路由协议(未完)

EIGRP的决策重要参数

SRTT (平均往返时间)

当EIGRP建立邻居关系时候会进行可靠性的确认,共三次交换(update,update,ACK)过程中路由器会计算平均往返时间的总时长记录为SRTT的值

RTO(重传超时计时器)

思科设备是通过SRTT计算出RTO的时间。当设备发了Update或Query对方并没有发送ACK,设备会立马再次发送数据包

如果初次没有建立到关系默认重传时间为5000ms

Queue count (队列数)

EIGRP的十六次重传机制

当路由器超过RTO时间的时候会再次发送数据包

路由器重新传输了16次数据包的时候依然没有受到过数据包 就认为对端设备已经失联链路不可用

影响EIGRP的关系

1.区域的AS号相同

2.源IP地址检测,如果路由表中存在对应源地址的直连路由。如果是的话就可以相互认证

   两个路由器可以两两互相起邻居,不能跨越路由器

   一台设备一个物理接口只能配置一个IPv4地址

   一台设备一个物理接口可以配置多个辅助地址

R1(config-if)#ip add 172.16.12.1 255.255.255.0 secondary ?             //添加地址后加上secondary让地址作为辅助地址存在

 <cr>

 查看路由表

R2#show ip route 
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
D        10.10.1.0/24 
           [90/130816] via 172.16.12.1, 00:48:58, GigabitEthernet0/0
C        10.10.2.0/24 is directly connected, Loopback1
L        10.10.2.2/32 is directly connected, Loopback1
      172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C        172.16.12.0/24 is directly connected, GigabitEthernet0/0
L        172.16.12.2/32 is directly connected, GigabitEthernet0/0
C        172.16.13.0/24 is directly connected, GigabitEthernet0/0
L        172.16.13.2/32 is directly connected, GigabitEthernet0/0
      192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.23.0/24 is directly connected, GigabitEthernet0/1
L        192.168.23.2/32 is directly connected, GigabitEthernet0/1

3.同一AS区域当值的key value的数值需要一致

   eigrp当中有六个Key Value值(K1 K2 K3 K4 K5 K6),这些K值将用于计算EIGRP的Mertric数值

   六个K值分别代表路由条目时候所需要的(带宽、延迟、可靠性、负载、MTU、电力)参数这些参数将用于计算最精确的

Metric,从而做出最优选路

K值默认值影响的度量组件说明
K11带宽(Bandwidth)路径中最慢链路的带宽
K20负载(Load)接口负载(0-255)
K31延迟(Delay)路径总延迟
K40可靠性(Reliability)链路可靠性(1-255)
K50MTU最大传输单元

K6现如今不被使用

key值所牵扯的是EIGRP的扩撒更新算法

修改key的命令为

R1(config-router)#metric weights ?
  <0-8>  Type (Only TOS 0 supported)

R1(config-router)#metric weights 0 1 2 3 4 5   //设备的数值可以更改大于1但是实际上并没有被使用只有0/1有用
R1(config-router)#
*Nov 20 09:34:56.175: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 172.16.12.2 (GigabitEthernet0/0) is down: metric changed   //可以看到立马就down了
// 默认的metric数值为metric weights 0 1 0 1 0 0

4.EIGRP的邻居关系,单播对单薄 组播对组播(224.0.0.10)

R1(config-router)#neighbor 172.16.12.2 g0/0
//g0/0端口后续的hello包将只会发送给172.16.12.2发送,不会向组播地址(224.0.0.10)
//g0/0端口后续值接受172.16.12.2发送来的EIGRP单薄数据包,不再接受组播 地址发送过来的数据包
R1(config-router)#
*Nov 20 09:58:58.634: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 172.16.12.2 (GigabitEthernet0/0) is down: Static peer replaces multicast           //可以看到很快就down了

让我们查看一下接口的信息

R1(config)#do show interfaces g0/0
GigabitEthernet0/0 is up, line protocol is up 
  Hardware is iGbE, address is 5000.0003.0000 (bia 5000.0003.0000)
  Internet address is 172.16.12.1/24
  MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Auto Duplex, Auto Speed, link type is auto, media type is RJ45
  output flow-control is unsupported, input flow-control is unsupported
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:00, output 00:00:01, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1546 packets input, 176818 bytes, 0 no buffer
     Received 51 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles 
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast, 0 pause input
     2503 packets output, 226611 bytes, 0 underruns
     0 output errors, 0 collisions, 2 interface resets
     0 unknown protocol drops
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 pause output
     0 output buffer failures, 0 output buffers swapped out
//可以看到接口的224.0.0.10的地址已经没有了

我们在对端设备也开始单播

R2(config-router)#neighbor 172.16.12.1 g0/0
R2(config-router)#do 
*Nov 20 10:07:22.274: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 172.16.12.1 (GigabitEthernet0/0) is up: new adjacency //链路马上就通

5.EIGRP的认证(MD5认证)

这是一个安全的机制 只有双方的密钥相同才能够双方成功建立邻居

EIGRP的更新扩散机制

EIGRP的metric数值计算

主要计算公式

Metric = [K1 × Bandwidth + (K2 × Bandwidth) ÷ (256 – Load) + K3 × Delay] × [K5 ÷ (Reliability + K4)]

在默认的key value值计算下默认的数值计算可以简化为

Metric = 256 × [ (10⁷ ÷ Min-Bandwidth) + (Sum-of-Delays ÷ 10) ]

你会发现公式是有问题的 K5/REL+K4 = 0 在官方文档中有备注 当 [K5 ÷ (Reliability + K4)] = 0 时候 这个部分当作1计算

min-bandwidth 最小带宽:路由条目传递方向入方向的最小带宽(路由从源头传递向本设备的路径上的最小带宽kbps)

sum-of-delays(total delay):路由条目传递方向入方向的延迟之和

我们在做一个小小的计算

vLOS2向vIOS1的Lo1的metric数值

查看一下lo1的带宽

R3(config)#do show interfaces lo1
Loopback1 is up, line protocol is up 
  Hardware is Loopback
  Internet address is 10.10.3.3/24
  MTU 1514 bytes, BW 8000000 Kbit/sec, DLY 5000 usec, //BW 8000000 Kbit/sec
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation LOOPBACK, loopback not set
  Keepalive set (10 sec)
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/0 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles 
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 unknown protocol drops
     0 output buffer failures, 0 output buffers swapped out


R1(config)#do show interfaces g0/0
GigabitEthernet0/0 is up, line protocol is up 
  Hardware is iGbE, address is 5000.0003.0000 (bia 5000.0003.0000)
  Internet address is 172.16.12.1/24
  MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,   //BW 1000000 Kbit/sec
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Auto Duplex, Auto Speed, link type is auto, media type is RJ45
  output flow-control is unsupported, input flow-control is unsupported
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:01, output 00:00:02, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1934 packets input, 214661 bytes, 0 no buffer
     Received 51 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles 
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast, 0 pause input
     3057 packets output, 274479 bytes, 0 underruns
     0 output errors, 0 collisions, 2 interface resets
     0 unknown protocol drops
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 pause output
     0 output buffer failures, 0 output buffers swapped out

所以我们的计算公式为

256*10的七次方/10的六次方+5000+10+10/10

256*(10+502)

所以数值为131072

EIGRP的路径选择原理

我们首先要了解几个词语

Forward Distance (FD) :转发距离

自身前往目标方向的metric值为FD

Report Distance (RD) / Advertise Distance(AD) :通告距离

前往路径方向下一跳路由的metric数值(下一跳路由的FD值)

Successor route : 即为备份路由(与次优路由有一定区别)

本路由前往目的网段的FD值最小的路由即为最优路由(successor路由)

Feasible Successor路由:次优路由 满足另一条路径的AD数值小于当前Successor路由FD值的就是Feaseble Successor路由

当除了最优路由以外的其它路由已经满足了Feasible Successor路由的条件 ,则可以和Successor同时存放
一旦最优路由出现故障路由器会第一时间切换到Feasible Successor路由路由表当中
Feasible Successor路由最为备份链路,不一定是FD最小的路由,但一定是一条无环路由

满足

在这张拓扑中 我们如果要去vIOS3的loopback地址我们会选择哪条路径

我们下面路径的FD/AD为130816/128256

我们上面路径的FD/AD为131072/130815

我们查看一下路由器的数据库

R1#show ip eigrp topology 
EIGRP-IPv4 Topology Table for AS(90)/ID(10.10.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 172.16.12.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/0
P 10.10.1.0/24, 1 successors, FD is 128256
        via Connected, Loopback1

EIGRP-IPv4 Topology Table for AS(100)/ID(10.10.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 192.168.23.0/24, 2 successors, FD is 3072
        via 1.1.13.3 (3072/2816), GigabitEthernet0/3
        via 172.16.12.2 (3072/2816), GigabitEthernet0/0
P 1.1.13.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/3
P 172.16.12.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/0
P 10.10.2.0/24, 1 successors, FD is 130816
        via 172.16.12.2 (130816/128256), GigabitEthernet0/0
P 10.10.1.0/24, 1 successors, FD is 128256
        via Connected, Loopback1
P 10.10.3.0/24, 1 successors, FD is 130816
        via 1.1.13.3 (130816/128256), GigabitEthernet0/3                //可以看到我们去10.10.3.3/24我们走的是gig0/3端口

因为下面路由的FD的metric数值都比他小 所以选择下面的路径

这是选择Successor路由的原则 Feasible Successor路由则是通过AD数值来选择的

这下我们同时会发现我们以前的路由条目没有了(这是为什么?)

因为我们看到的输出结果是路由器筛选玩输出的结果 我们使用下面的命令查看完整的命令

R1#show ip eigrp topology all-links 
EIGRP-IPv4 Topology Table for AS(90)/ID(10.10.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 172.16.12.0/24, 1 successors, FD is 2816, serno 1
        via Connected, GigabitEthernet0/0
P 10.10.1.0/24, 1 successors, FD is 128256, serno 2
        via Connected, Loopback1

EIGRP-IPv4 Topology Table for AS(100)/ID(10.10.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 192.168.23.0/24, 2 successors, FD is 3072, serno 9
        via 1.1.13.3 (3072/2816), GigabitEthernet0/3
        via 172.16.12.2 (3072/2816), GigabitEthernet0/0
P 1.1.13.0/24, 1 successors, FD is 2816, serno 8
        via Connected, GigabitEthernet0/3
P 172.16.12.0/24, 1 successors, FD is 2816, serno 1
        via Connected, GigabitEthernet0/0
P 10.10.2.0/24, 1 successors, FD is 130816, serno 4
        via 172.16.12.2 (130816/128256), GigabitEthernet0/0
        via 1.1.13.3 (131072/130816), GigabitEthernet0/3
P 10.10.1.0/24, 1 successors, FD is 128256, serno 3
        via Connected, Loopback1
P 10.10.3.0/24, 1 successors, FD is 130816, serno 10
        via 1.1.13.3 (130816/128256), GigabitEthernet0/3
        via 172.16.12.2 (131072/130816), GigabitEthernet0/0

Feasible Successor路由 非最优路径 AD小于Successor路由的FD就会被选择为 Feasible Successor路由

有人就要疑问了 为什么要求路径必须AD小于最优路由的FD呢?

我们要思考一下

AD 代表什么 AD我们前面说到了 就是下一跳的FD

我们想一个道理 如果下一跳的metric数值比你大的话 就说明 他的下一跳有可能是指向你的 这样就一去不复反了 而且会形成路由环路

// 发明天才的人真是一个EIGRP

R1#show ip eigrp topology 10.10.3.0 255.255.255.0     
//我们可以使用命令show ip eigrp topology <目标地址> 查看计算详细参数
EIGRP-IPv4 Topology Entry for AS(90)/ID(10.10.1.1)
%Entry 10.10.3.0/24 not in topology table
EIGRP-IPv4 Topology Entry for AS(100)/ID(10.10.1.1) for 10.10.3.0/24
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 130816
  Descriptor Blocks:
  1.1.13.3 (GigabitEthernet0/3), from 1.1.13.3, Send flag is 0x0
      Composite metric is (130816/128256), route is Internal
      Vector metric:
        Minimum bandwidth is 1000000 Kbit
        Total delay is 5010 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 1
        Originating router is 10.10.3.3
  172.16.12.2 (GigabitEthernet0/0), from 172.16.12.2, Send flag is 0x0
      Composite metric is (131072/130816), route is Internal
      Vector metric:
        Minimum bandwidth is 1000000 Kbit
        Total delay is 5020 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
        Originating router is 10.10.3.3

调整EIGRP的选路(修改EIGRP的Metric值)

比较路由管理条目的管理距离,小的优先,比较路由条目的Metric值,小的优先,最小的Metric成为最优路由

修改链路带宽

speed 10/100/1000 (老板快乐小妙招)

修改链路的延时之和

R1(config)#int g0/3
R1(config-if)#delay ?
  <1-16777215>  Throughput delay (tens of microseconds)  //以十为单位的微秒,也是不太建议的方法呢~

通过偏移列表修改数据库条目的Metric(Offset-list)

Offset-list:使用范围为距离使用动态路由协议(RIP、EIGRP)当中专用于修改Metric值的工具

Offset-list可以使得专注于某些指定条目修改Metric

offset-list <access0list_num> <in/out> <offset> <interface>

利用ACL匹配路由

Access-list <1-99> permit(匹配) <network number> <wildcard bits>

我们来个示例

R1(config)#access-list 1 permit 10.10.3.0     //匹配路由
R1(config)#router eigrp 90
R1(config-router)#offset-list 1 in 257 g0/3       //使用偏移列表为入的匹配路由metric增加257(只再g0/3上) 只能加不能减

//我们查看路由表
R1(config-router)#do show ip eigrp to
EIGRP-IPv4 Topology Table for AS(90)/ID(10.10.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 10.10.3.0/24, 1 successors, FD is 131072
        via 172.16.12.2 (131072/130816), GigabitEthernet0/0
        via 1.1.13.3 (131073/128512), GigabitEthernet0/3

注意同一个方向上只能同时使用一个访问控制列表

EIGRP的汇总

我们给R1加上几条路由先

R1(config-if)#do show ip int br                                                 //添加几个地址
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         172.16.12.1     YES NVRAM  up                    up      
GigabitEthernet0/1         unassigned      YES NVRAM  administratively down down    
GigabitEthernet0/2         unassigned      YES NVRAM  administratively down down    
GigabitEthernet0/3         unassigned      YES NVRAM  administratively down down    
Loopback1                  10.10.1.1       YES NVRAM  up                    up      
Loopback100                100.1.0.1       YES manual up                    up      
Loopback101                100.1.1.1       YES manual up                    up      
Loopback102                100.1.2.1       YES manual up                    up      
Loopback103                100.1.3.1       YES manual up                    up      
Loopback104                unassigned      YES unset  up                    up     

R1(config)#router eigrp 90
R1(config-router)#network 100.1.0.0 0.0.3.0                                     //这里不能结尾为0?很神奇的问题
%EIGRP: Discontiguous mask is not supported
R1(config-router)#network 100.1.0.0 0.0.3.255                                   //宣告刚刚配置的东西

R1(config)#do show ip eigrp topology                                            //现在我们的路由条目就太臃肿了,占用内存,转发占用性能
EIGRP-IPv4 Topology Table for AS(90)/ID(10.10.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 192.168.23.0/24, 1 successors, FD is 3072
        via 172.16.12.2 (3072/2816), GigabitEthernet0/0
P 100.1.2.0/24, 1 successors, FD is 128256
        via Connected, Loopback102
P 100.1.0.0/24, 1 successors, FD is 128256
        via Connected, Loopback100
P 100.1.1.0/24, 1 successors, FD is 128256
        via Connected, Loopback101
P 172.16.12.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/0
P 100.1.3.0/24, 1 successors, FD is 128256
        via Connected, Loopback103
P 10.10.2.0/24, 1 successors, FD is 130816
        via 172.16.12.2 (130816/128256), GigabitEthernet0/0
P 10.10.1.0/24, 1 successors, FD is 128256
        via Connected, Loopback1
P 10.10.3.0/24, 1 successors, FD is 131072
        via 172.16.12.2 (131072/130816), GigabitEthernet0/0

我们可以去使用汇总功能

汇总方法有很多 比如类似RIP的auto-summery

自动汇总
R1(config)#do show run all | section router eigrp
router eigrp 90
 timers active-time 3
 timers graceful-restart purge-time 240
 metric maximum-hops 100
 metric weights 0 1 0 1 0 0
 traffic-share balanced
 variance 1
 network 10.0.0.0
 network 10.10.1.1 0.0.0.0
 network 100.1.0.0 0.0.3.255
 network 172.16.12.1 0.0.0.0
 distance eigrp 90 170
 no auto-summary                                    //默认关闭了自动修剪 IOS12.4版本以上默认关闭
 no passive-interface default
 eigrp log-neighbor-changes
 eigrp log-neighbor-warnings 10
 eigrp event-log-size 500
 no shutdown

我们尝试一下开启自动汇总

R1(config-router)#auto-summary 
R1(config-router)#
*Nov 26 11:16:47.712: %DUAL-5-NBRCHANGE: EIGRP-IPv4 90: Neighbor 172.16.12.2 (GigabitEthernet0/0) is resync: summary configured
*Nov 26 11:16:47.714: %DUAL-5-NBRCHANGE: EIGRP-IPv4 90: Neighbor 172.16.12.2 (GigabitEthernet0/0) is resync: summary up, remove components
*Nov 26 11:16:47.714: %DUAL-5-NBRCHANGE: EIGRP-IPv4 90: Neighbor 172.16.12.2 (GigabitEthernet0/0) is resync: summary up, remove components                //可以看到条目更新了
R1(config-router)#

//我们查看一下路由表
R1#show ip route 
``````

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
D        10.0.0.0/8 is a summary, 00:00:51, Null0                              //唉朋友你怎么把我的10.0.0.0/8汇总了
C        10.10.1.0/24 is directly connected, Loopback1
L        10.10.1.1/32 is directly connected, Loopback1
D        10.10.2.0/24 
           [90/130816] via 172.16.12.2, 00:10:39, GigabitEthernet0/0
D        10.10.3.0/24 
           [90/131072] via 172.16.12.2, 00:08:37, GigabitEthernet0/0
      100.0.0.0/8 is variably subnetted, 9 subnets, 3 masks
D        100.0.0.0/8 is a summary, 00:00:51, Null0                             //他自动汇总成了100.0.0.0/8范围太大了~!!!
``````

一旦路由器开启汇总,则路由器通告EIGRP数据库条目的时候,会检查 明细路由的主类与通告数据库条目出接口的主类相同(主类汇总) 如果不是则修剪为主类路由

自动汇总的缺点

汇总范围太大了,全部汇总成主类,你想干什么???

不能够人工指定汇总的地址网段,只要满足了条件只要满足了条件都会被汇总

手工汇总

可以人为指定哪些明细路由将被汇总以及将被汇总成多少网段的明细路由

最简单的方法就是匹配相同的网络位

//我们的自动汇总在端口中进行(我们的修剪在出接口进行)
R1(config)#int g0/0   
R1(config-if)#ip summary-address eigrp 90 100.1.0.0 255.255.255.252
R1(config-if)#
*Nov 26 11:30:48.661: %DUAL-5-NBRCHANGE: EIGRP-IPv4 90: Neighbor 172.16.12.2 (GigabitEthernet0/0) is resync: summary configured          //可以看到数据库更新了
特点

1. 当接口从接口数据库条目通告时,被汇总的网段所包含的明细路由会被 抑制明细 只会通告汇总路由

2. 相同的明细路由可以被重复汇总成不同网段的汇总路由
它可以重复性的汇总,只要包含在明细路由之中

3. 只要存在一条明细路由,汇总就可以存在
汇总是我的路由器要从端口通告出明细路由的时候,路由才会被汇总,如果一条明细都没了,那汇总也就不存在了

4. 当EIGRP汇总成功之后,将会在路由表中插入一条防环路由(Null接口)
汇总范围比较大的时候超出了路由器已有的网段,可能会产生了路由环路

EIGRP 注入默认路由(通告默认路由)

我们在使用动态路由的时候我们需要访问外网也会写一条默认路由,但是我们这条路由不会在数据库中

所以我们在这里可以把默认路由宣告到数据库中

Network命令在EIGRP中的左右是激活端口运行eigrp,使端口的直连路由被放进eigrp的数据库

Network命令可以用来宣告路由条目静茹动态路由协议库
Network命令后续通过网络号和掩码匹配路由就可以静茹EIGRP的数据库
EIGRP当中,只有跟 出接口 静态路由 才能被宣告进入EIGRP的数据库

R3(config)#ip route 0.0.0.0 0.0.0.0 gigabitEthernet 0/3
%Default route without gateway, if not a point-to-point interface, may impact performance
R3(config)#do show ip route 
Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S*    0.0.0.0/0 is directly connected, GigabitEthernet0/3
``````
R3(config)#router eigrp 90
R3(config-router)#network 0.0.0.0 0.0.0.0
R3(config-router)#do show ip eigrp to
EIGRP-IPv4 Topology Table for AS(90)/ID(10.10.3.3)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 192.168.23.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/1
P 1.1.123.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/3
P 100.1.0.0/20, 1 successors, FD is 131072
        via 192.168.23.2 (131072/130816), GigabitEthernet0/1
P 0.0.0.0/0, 1 successors, FD is 2816                                                      //我们配置出接口的静态路由可以看到宣告的默认路由
        via Rstatic (2816/0)
P 172.16.12.0/24, 1 successors, FD is 3072
        via 192.168.23.2 (3072/2816), GigabitEthernet0/1
P 10.10.2.0/24, 1 successors, FD is 130816
        via 192.168.23.2 (130816/128256), GigabitEthernet0/1
P 10.10.1.0/24, 1 successors, FD is 131072
        via 192.168.23.2 (131072/130816), GigabitEthernet0/1
P 10.10.3.0/24, 1 successors, FD is 128256
        via Connected, Loopback1

EIGRP注入默认路由进入EIGRP的第二种方式(重发布)

通过重分布将默认路由引入到EIGRP数据库

首先我们要分清一个概念
内部路由:使用合法方式宣告进入到EIGRP数据库当中的条目,被使用network引入的数据库条目就是内部路由
外部路由:通过外部路由从引入的数据库条目,被重分布进入数据库条目的就是外部路由

R3(config)#router eigrp 90
R3(config-router)#redistribute static ?           //如果直接回车,将会重分布所有静态路由
  metric     Metric for redistributed routes
  route-map  Route map reference
  <cr>

R2(config)#do show ip route | include D
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
D*EX  0.0.0.0/0 [170/3072] via 192.168.23.3, 00:02:30, GigabitEthernet0/1                //注意这里的管理距离不一样 本地人90外地人170卧槽这EIGRP怎么这么坏啊!
D        8.8.8.0 [90/3072] via 192.168.23.3, 00:12:41, GigabitEthernet0/1
D        10.10.1.0/24 
D        10.10.3.0/24 
D        100.1.0.0 [90/130816] via 172.16.12.1, 00:54:27, GigabitEthernet0/0

通过汇总 产生默认路由

R3(config)#no ip route 0.0.0.0 0.0.0.0 gigabitEthernet 0/3            //我不跟你玩了,我默认路由都不想要了!
R3(config)#int g0/1
R3(config-if)#ip summary-address eigrp 90 0.0.0.0 0.0.0.0             //我把所有的EIGRP明细路由都不要了,我直接全部汇总掉!太残暴了,不建议使用

4.有类方式注入默认路由(已经弃用)

EIGRP的等价和非等价负载

默认情况下,cisco开启了CEF(思科快速转发)


基于相同目的地址的负载转发(默认情况)
基于同一个路由条目,思科设备会有一个随机的hash算法计算,当匹配上一条等价路由的时候,则访问同一个目标ipv4地址的数据流量,将会仅按照同一个路径进行转发
也就是当一个包选择了一个路径转发的时候,以后访问这个ip的所有包都会走相同的路径转发
基于数据包的负载转发(很少见)
在路由条目的详细信息中,等价的路由条目会有计数器,如果启用基于数据包的负载转发 计数器将被启用,路由器将会平等的分配每一个数据包到出接口上

使用这个方法会产生两个严重问题
1.转发时候反复查表导致性能损耗加大
2.会导致数据包延时不一致,收到的顺序会乱

非等价负载分担

在EIGRP中,我们可以把一条不同metric的路由提交到路由表,只需要他满足:
只有Success路由和Feasiable Successor路由可以实现非等价负载分担
这是为了确保路由没有环路(备份路由AD小于主路由FD)
只需要满足 Successor路由的FD值 * Variance(Value 正整数) > Feasible Successor的FD

怎么看我们的Variance,他默认为1

3(config)#router eigrp 90
R3(config-router)#variance <num>        //修改variance

EIGRP的路由条目过滤

使用工具

Access-list 可以用来匹配或禁止对应的路由
distrbu-list 即为分发列表,大多数距离矢量动态路由协议都可以使用[RIP EIGRP]有的协议比如ospf也可以使用但是有条件限制,这是作为路由条目过滤时候使用的工具

我们做个示范在R1入接口丢弃10.10.3.0

R1(config)#access-list 1 deny 10.10.3.0          //匹配对应路由
R1(config)#router eigrp 90
R1(config-router)#distribute-list 1 in g0/0       //把设置应用在接口

限制EIGRP查询范围方式

前情提要:EIGRP一旦丢失了主要路由,就会发送qury消息,发送多少请求就需要收到多少回复,知道查询到当前AS的边界。如果网络范围越大,我们需要等待的时间也会越长

方法一:汇总

汇总可以帮助我们限制EIGRP的查询范围
我们请出四大金刚

100.1.0.1/24
100.1.1.1/24
100.1.2.1/24
100.1.3.1/24

R1(config)#do show ip int b
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         172.16.12.1     YES NVRAM  up                    up      
GigabitEthernet0/1         unassigned      YES NVRAM  administratively down down    
GigabitEthernet0/2         unassigned      YES NVRAM  administratively down down    
GigabitEthernet0/3         unassigned      YES NVRAM  administratively down down    
Loopback1                  10.10.1.1       YES NVRAM  up                    up      
Loopback100                100.1.0.1       YES manual up                    up      
Loopback101                100.1.1.1       YES manual up                    up      
Loopback102                100.1.2.1       YES manual up                    up      
Loopback103                100.1.4.1       YES manual up                    up                         

原因是因为EIGRP查询机制中,设备发送的EIGRP查询消息一定是一模一样的明细路由,如果被查询的路由器中没有一模一样的明细就告知没有该路由的条目。

也就是手动汇总之后,汇总邻居收到的路由,当需要查询的时候,邻居查询到自己路由条目里没有一模一样的,那就不知道

方法二:设置EIGRP边界路由器

路由器知道对方是EIGRP的边界路由器,直接不给他发

边界路由器:
就是有也仅仅只有一个邻居,常常是这个区域的边界设备
他没有第二个EIGRP邻居,意味着他对别的路由没有别的途径
他的所有的的路由条目都是学习过来的

可以将某一个EIGRP路由器,配置为EIGRP的边界路由器

被配置的路由器,会说:

全体目光,向我看齐!!!我宣布个事!!!我是边界路由!

当EIGRP丢失了successor路由的时候,路由器就不会向其发送查询消息

注意!!!注意!!!

就算一台路由器,不是边界路由,但他也可以被配置成边界路由器(STUB)

说了这么多,怎么配置呢?

R3(config)#router eigrp 90
R3(config-router)#eigrp stub

一旦,一台路由器成为了eigrp stub,他的所有邻居关系都会被重新建立。
命令会自动补全 eigrp stub connected summary
一旦成为边界路由,他会默认只通告组件数据库的直连和自己产生汇总路由

R3(config-router)#eigrp stub ?          //我们来看看选项
  connected      Do advertise connected routes        //只会通告自己数据库的直连路由
  leak-map       Allow dynamic prefixes based on the leak-map    //只会通告route-map的匹配路由
  receive-only   Set receive only neighbor                        //只会学习,不会发送
  redistributed  Do advertise redistributed routes               //只会通告重分布的路由
  static         Do advertise static routes                       //只会通告静态路由    
  summary        Do advertise summary routes                         //只会通告汇总路由
  <cr>

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇