程序员人生 网站导航

探究Router-ID在EIGRP路由协议中的作用

栏目:服务器时间:2013-12-01 22:19:19

众所周知,Router-ID在OSPF这样的链路状态路由协议中的作用是巨大的,DR/BDR的选举都是依靠RID来进行的,但是今天看书发现Router-ID在EIGRP中同样存在,只是平时都没有怎么用过,它的作用是什么呢?

经过一番研究,可以得到以下2个结论:

1、EIGRP中的Router-ID选举规则同OSPF一样,有Loopback接口先选Loopback接口,没有的话再选择当前最大的活跃接口,当然,通过 eigrp router-id 命令指定的Router-ID最优先。

2、EIGRP中的Router-ID起到的也是标记作用,这在解决重分布路由导致环路问题上起到了重要的作用。可以这样理解,当一台运行EIGRP的路由器收到一个外部路由更新,发现这条路由更新的起源Router-ID与自己的Router-ID相同,那么它将会忽略这条路由更新,避免产生环路

下面利用一个实验来观察这个现象:

【实验环境】

C3640-IK9O3S-M Version 12.4(10)

【实验拓扑】

EIGRP ROUTER-ID

【实验描述】

R1回环接口1.1.1.1

R2、R3回环接口2.2.2.2

R1、R2跑RIP

R2、R3跑EIGRP 110

在R2上将RIP重分布进EIGRP

【实验步骤】

1、R1基本配置

!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
router rip
version 2
network 1.0.0.0
network 12.0.0.0
!

2、R2基本配置

!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface FastEthernet1/0
ip address 23.23.23.2 255.255.255.0
!
router eigrp 110
redistribute rip metric 100000 1000 255 1 1500
network 23.23.23.0 0.0.0.255
no auto-summary
!
router rip
version 2
network 12.0.0.0
!

3、R3基本配置

!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 23.23.23.3 255.255.255.0
!
router eigrp 110
network 23.23.23.0 0.0.0.255
no auto-summary
!

【实验结果】

R3#sh ip route
2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/0

R3上没有收到重分布进来的RIP路由信息(关于1.0.0.0网段)

R2#sh ip eigrp topology
IP-EIGRP Topology Table for AS(110)/ID(2.2.2.2)

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 281600
via Redistributed (281600/0)
P 12.12.12.0/24, 1 successors, FD is 281600
via Redistributed (281600/0)
P 23.23.23.0/24, 1 successors, FD is 28160
via Connected, FastEthernet1/0

可以看到R2的拓扑表中是存在1.0.0.0/8这条路由更新的,而且也是重分布进来的

R2#sh ip eigrp topology 1.0.0.0
IP-EIGRP (AS 110): Topology entry for 1.0.0.0/8
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 281600
Routing Descriptor Blocks:
12.12.12.1, from Redistributed, Send flag is 0x0
Composite metric is (281600/0), Route is External
Vector metric:
Minimum bandwidth is 100000 Kbit
Total delay is 10000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 0
External data:
Originating router is 2.2.2.2 (this system)
AS number of route is 0
External protocol is RIP, external metric is 1
Administrator tag is 0 (0x00000000)

仔细观察这条路由更新,可以看到它的起源RID是2.2.2.2(其实就是自己)

下面我们看看在R3上发生了什么:

R3#sh ip eigrp event
Event information for AS 110:
1    00:00:08.691 Ignored route, metric: 1.0.0.0 284160
2    00:00:08.691 Ignored route, neighbor info: 23.23.23.2 Loopback0
3    00:00:08.691 Ignored route, dup router: 2.2.2.2
4    00:00:08.691 Ignored route, metric: 12.12.12.0 284160
5    00:00:08.691 Ignored route, neighbor info: 23.23.23.2 Loopback0
6    00:00:08.691 Ignored route, dup router: 2.2.2.2

可以看到,R3忽略了1.0.0.0和12.12.12.0的路由更新,原因是这些路由更新的起源RID与自己的RID相同了,为了避免产生环路,因此R3忽略了它们。

由此可以看到EIGRP中的Router-ID的作用了。

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐