设为首页收藏本站language 语言切换
查看: 2534|回复: 6
收起左侧

[求助] EIGRP与OSPF双点双向重分布细节问题~~~请大神帮忙

[复制链接]
发表于 2016-4-18 10:46:28 | 显示全部楼层 |阅读模式
10鸿鹄币
本帖最后由 405759601 于 2016-4-18 10:57 编辑

拓扑如图,矩形内是运行OSPF的,双点双向重分布坐在上联A和上联B。下面是配置(区、上联A、上联B)
区:

qu_sw#show run
Building configuration...
Current configuration : 1717 bytes
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname qu_sw
!
boot-start-marker
boot-end-marker
!
!
logging discriminator EXCESS severity drops 6 msg-body drops EXCESSCOLL
logging buffered 50000
logging console discriminator EXCESS
!
no aaa new-model
no ip icmp rate-limit unreachable
!
ip cef
!
!
no ip domain-lookup
no ipv6 cef
ipv6 multicast rpf use-bgp
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
no switchport
ip address 192.168.1.1 255.255.255.252
!
interface Ethernet0/1
no switchport
ip address 192.168.1.5 255.255.255.252

!
interface Ethernet0/2
duplex auto
!
interface Ethernet0/3
duplex auto
!
interface Ethernet1/0
duplex auto
!
interface Ethernet1/1
duplex auto
!
interface Ethernet1/2
duplex auto
!
interface Ethernet1/3
duplex auto
!
interface Ethernet2/0
duplex auto
!
interface Ethernet2/1
duplex auto
!
interface Ethernet2/2
duplex auto
!
interface Ethernet2/3
duplex auto
!
interface Ethernet3/0
duplex auto
!
interface Ethernet3/1
duplex auto
!
interface Ethernet3/2
duplex auto
!
interface Ethernet3/3
duplex auto
!
interface Vlan1
no ip address
shutdown
!
!
router eigrp 1
redistribute connected
network 192.168.1.0 0.0.0.3
network 192.168.1.4 0.0.0.3

!
!
no ip http server
!
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
end
---------------------------------------------------分-------------割-----------------------线-------------------------------------------
上联A:
shanglian_A#show run
Building configuration...
Current configuration : 2068 bytes
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname shanglian_A
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
!
no aaa new-model
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
no ip icmp rate-limit unreachable
!
!
!
!
!
!
!
!

!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
ip address 192.168.1.2 255.255.255.252
!
interface Ethernet0/1
ip address 192.168.1.9 255.255.255.252
!
interface Ethernet0/2
ip address 192.168.1.17 255.255.255.252

!
interface Ethernet0/3
no ip address
!
interface Ethernet1/0
no ip address
shutdown
!
interface Ethernet1/1
no ip address
shutdown
!
interface Ethernet1/2
no ip address
shutdown
!
interface Ethernet1/3
ip address 192.168.1.13 255.255.255.252
!

interface Serial2/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/3
no ip address
shutdown
serial restart-delay 0
!
!
router eigrp 1
network 192.168.1.0 0.0.0.3
network 192.168.1.8 0.0.0.3
network 192.168.1.12 0.0.0.3
redistribute ospf 1 metric 10000 100 255 1 1500
!
router ospf 1
redistribute eigrp 1 subnets
network 192.168.1.16 0.0.0.3 area 1

!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
transport input none
!
!
end
---------------------------------------------------分-------------割-----------------------线-------------------------------------------

上联B:
shanglian_B#show run
Building configuration...
Current configuration : 2033 bytes
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname shanglian_B
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
!
no aaa new-model
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
no ip icmp rate-limit unreachable
!
!
!
!
!
!
!
!

!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
ip address 192.168.1.6 255.255.255.252
!
interface Ethernet0/1
ip address 192.168.1.10 255.255.255.252
!
interface Ethernet0/2
ip address 192.168.1.21 255.255.255.252

!
interface Ethernet0/3
no ip address
shutdown
!
interface Ethernet1/0
no ip address
shutdown
!
interface Ethernet1/1
no ip address
shutdown
!
interface Ethernet1/2
no ip address
shutdown
!
interface Ethernet1/3
no ip address
shutdown
!
interface Serial2/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial3/3
no ip address
shutdown
serial restart-delay 0
!
!
router eigrp 1
network 192.168.1.4 0.0.0.3
network 192.168.1.8 0.0.0.3
redistribute ospf 1 metric 10000 100 255 1 1500
!
router ospf 1
redistribute eigrp 1 subnets
network 192.168.1.20 0.0.0.3 area 1

!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
transport input none
!
!
end
---------------------------------------------------分-------------割-----------------------线-------------------------------------------

然后在上联A和上联B中 ,得到的路由结果是
上联A:
Gateway of last resort is not set
      1.0.0.0/32 is subnetted, 1 subnets
D EX     1.1.1.1 [170/307200] via 192.168.1.10, 00:00:44, Ethernet0/1
      172.168.0.0/16 is variably subnetted, 5 subnets, 2 masks
O        172.168.1.0/24 [110/11] via 192.168.1.18, 00:28:19, Ethernet0/2
D        172.168.2.1/32 [90/409600] via 192.168.1.14, 00:29:03, Ethernet1/3
D        172.168.2.2/32 [90/435200] via 192.168.1.14, 00:29:03, Ethernet1/3
O        172.168.2.3/32 [110/31] via 192.168.1.18, 00:28:19, Ethernet0/2
D        172.168.3.1/32 [90/435200] via 192.168.1.14, 00:29:03, Ethernet1/3
      192.168.1.0/24 is variably subnetted, 17 subnets, 2 masks
C        192.168.1.0/30 is directly connected, Ethernet0/0
L        192.168.1.2/32 is directly connected, Ethernet0/0
D        192.168.1.4/30 [90/307200] via 192.168.1.10, 00:29:03, Ethernet0/1
                        [90/307200] via 192.168.1.1, 00:29:03, Ethernet0/0
C        192.168.1.8/30 is directly connected, Ethernet0/1
L        192.168.1.9/32 is directly connected, Ethernet0/1
C        192.168.1.12/30 is directly connected, Ethernet1/3
L        192.168.1.13/32 is directly connected, Ethernet1/3
C        192.168.1.16/30 is directly connected, Ethernet0/2
L        192.168.1.17/32 is directly connected, Ethernet0/2
O        192.168.1.20/30 [110/21] via 192.168.1.18, 00:27:50, Ethernet0/2
O        192.168.1.24/30 [110/11] via 192.168.1.18, 00:27:50, Ethernet0/2
O        192.168.1.28/30 [110/20] via 192.168.1.18, 00:28:19, Ethernet0/2
O        192.168.1.32/30 [110/21] via 192.168.1.18, 00:27:50, Ethernet0/2
O        192.168.1.36/30 [110/30] via 192.168.1.18, 00:28:19, Ethernet0/2
D        192.168.1.40/30 [90/307200] via 192.168.1.14, 00:29:03, Ethernet1/3
O        192.168.1.44/30 [110/30] via 192.168.1.18, 00:28:19, Ethernet0/2
O        192.168.1.48/30 [110/31] via 192.168.1.18, 00:27:50, Ethernet0/2


上联B:
Gateway of last resort is not set
      1.0.0.0/32 is subnetted, 1 subnets
O E2     1.1.1.1 [110/20] via 192.168.1.22, 00:01:19, Ethernet0/2
      172.168.0.0/16 is variably subnetted, 5 subnets, 2 masks
O        172.168.1.0/24 [110/11] via 192.168.1.22, 00:28:54, Ethernet0/2
D        172.168.2.1/32 [90/435200] via 192.168.1.9, 00:29:35, Ethernet0/1
D        172.168.2.2/32 [90/460800] via 192.168.1.9, 00:29:35, Ethernet0/1
O        172.168.2.3/32 [110/31] via 192.168.1.22, 00:28:54, Ethernet0/2
D        172.168.3.1/32 [90/460800] via 192.168.1.9, 00:29:35, Ethernet0/1
      192.168.1.0/24 is variably subnetted, 16 subnets, 2 masks
D        192.168.1.0/30 [90/307200] via 192.168.1.9, 00:29:37, Ethernet0/1
                        [90/307200] via 192.168.1.5, 00:29:37, Ethernet0/0
C        192.168.1.4/30 is directly connected, Ethernet0/0
L        192.168.1.6/32 is directly connected, Ethernet0/0
C        192.168.1.8/30 is directly connected, Ethernet0/1
L        192.168.1.10/32 is directly connected, Ethernet0/1
D        192.168.1.12/30 [90/307200] via 192.168.1.9, 00:29:35, Ethernet0/1
O        192.168.1.16/30 [110/21] via 192.168.1.22, 00:28:25, Ethernet0/2
C        192.168.1.20/30 is directly connected, Ethernet0/2
L        192.168.1.21/32 is directly connected, Ethernet0/2
O        192.168.1.24/30 [110/11] via 192.168.1.22, 00:28:54, Ethernet0/2
O        192.168.1.28/30 [110/21] via 192.168.1.22, 00:28:25, Ethernet0/2
O        192.168.1.32/30 [110/20] via 192.168.1.22, 00:28:54, Ethernet0/2
O        192.168.1.36/30 [110/30] via 192.168.1.22, 00:28:54, Ethernet0/2
D        192.168.1.40/30 [90/332800] via 192.168.1.9, 00:29:35, Ethernet0/1
O        192.168.1.44/30 [110/31] via 192.168.1.22, 00:28:25, Ethernet0/2
O        192.168.1.48/30 [110/30] via 192.168.1.22, 00:28:54, Ethernet0/2

---------------------------------------------------分-------------割-----------------------线-------------------------------------------

想问一下,为什么上联A的1.1.1.1的eigrp的外部路由下一跳是指向上联B,不是区交换机?因为EIGRP的外部路由管理距离是170,所以上联B学到的1.1.1.1的路由是OSPF的外部路由(管理距离为110),同理那为什么上联A不能这么学到?两台设备的配置可以说的基本相同的呢~请大神帮忙解释一下!



QQ图片20160418102524.png

最佳答案

查看完整内容

你的前端分析是正确的。 这里有个时延问题。在区直连1.1.1.1 重分布到eigrp时,到达A和B的时间是不一致的。假设先到达了A,则A上有个AD=170的ex 路由,这个路由立即被重分布到ospf域,ospf域里有5类LSA。到达了B后,B上会有个OE2的条目,这个条目AD=110,因为它优于eigrp域来的ex, AD=170的条目。所以B上会是ospf的条目。 下面的事情就需要理解重分布了。现在在B上关于1.1.1.1 的条目是ospf条目。则在B上eigrp向ospf 重分布 ...
发表于 2016-4-18 10:46:29 | 显示全部楼层
你的前端分析是正确的。

这里有个时延问题。在区直连1.1.1.1 重分布到eigrp时,到达A和B的时间是不一致的。假设先到达了A,则A上有个AD=170的ex 路由,这个路由立即被重分布到ospf域,ospf域里有5类LSA。到达了B后,B上会有个OE2的条目,这个条目AD=110,因为它优于eigrp域来的ex, AD=170的条目。所以B上会是ospf的条目。

下面的事情就需要理解重分布了。现在在B上关于1.1.1.1 的条目是ospf条目。则在B上eigrp向ospf 重分布时,不会有关于1.1.1.1 网段进入ospf域,所以A上的1.1.1.1 条目不会变动。还是只有一个eigrp 域来的那个ex条目


当然你下一次做实验 ,估计又是先到达B了。 这个是随机的。
沙发 2016-4-18 10:46:29 回复 收起回复
回复

使用道具 举报

发表于 2016-4-20 08:48:27 | 显示全部楼层
板凳 2016-4-20 08:48:27 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-4-21 09:25:35 | 显示全部楼层
smallszg 发表于 2016-4-21 00:21
你的前端分析是正确的。

这里有个时延问题。在区直连1.1.1.1 重分布到eigrp时,到达A和B的时间是不一致 ...

谢谢大神帮忙~

关于A上的1.1.1.1的路由,他是eigrp的EX条目,但他指向的是B。这个结果按我的理解是,B将他的1.1.1.1的OSPF外部路由条目又注入到了EIGRP中,并发给了A,我的理解是否正确?按照正常,指向区交换机的metric应该是最优,但是我实验看到的结果却不是,为什么?
地板 2016-4-21 09:25:35 回复 收起回复
回复

使用道具 举报

发表于 2016-4-22 01:06:01 | 显示全部楼层
405759601 发表于 2016-4-21 09:25
谢谢大神帮忙~

关于A上的1.1.1.1的路由,他是eigrp的EX条目,但他指向的是B。这个结果按我的理解是,B ...

哦  我只注意到了你的第二个问题。第一个问题还真的没有注意到。

但就逻辑来讲不太可能, A上因为有DEX 的条目,才有了B上的 oe2 条目,又因为这B上的这个OE2 条目,才有了A上的 DEX 条目。 一个循环了 。

你可以在A上看一下啊   show ip eigrp to   看看有那几个路径,那个路径的FD 和 路由metric一样吗。这个问题多研究下, 就这么看,的确是没头绪
5# 2016-4-22 01:06:01 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-4-22 10:05:08 | 显示全部楼层
本帖最后由 405759601 于 2016-4-22 10:08 编辑
smallszg 发表于 2016-4-22 01:06
哦  我只注意到了你的第二个问题。第一个问题还真的没有注意到。

但就逻辑来讲不太可能, A上因为有DE ...

确实是有两条路径的,一个指向区交换机,一个指向B,我奇怪的是为什么metric会是这样,是那一部分因素影响了他的计算~我看过EIGRP的算法,五大因素是带宽、延迟、可靠性、负载、MTU,并且全是默认设定,那在这里这些因素是否是受OSPF的影响?


P 1.1.1.1/32, 1 successors, FD is 307200
        via 192.168.1.10 (307200/281600), Ethernet0/1
        via 192.168.1.1 (409600/128256), Ethernet0/0
6# 2016-4-22 10:05:08 回复 收起回复
回复

使用道具 举报

发表于 2016-4-22 13:05:34 | 显示全部楼层
公式:

(10000000/最小带宽+延迟之和/10)*256

b来的:
{10000000/10000+(1000+1000)/10}*256=307200

区来的:
{10000000/10000+(5000+1000)/10}*256=409600

就metric而言,的确是B传递来的更优些。但是这又和我上面分析的一样了啊。产生了先有鸡还是先有蛋的循环。你观察一下   是不是这个条目有在翻动啊  。

关于上面metric的计算,你把重分布时的参数看做是当前路由器路由条目传递来方向的接口的参数就好了,不清楚的留言
7# 2016-4-22 13:05:34 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-11 13:06 , Processed in 0.322136 second(s), 26 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表