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

[求助] 关于EIGRP默认路由

[复制链接]
发表于 2014-9-8 00:37:47 | 显示全部楼层 |阅读模式
3鸿鹄币
QQ截图20140908002204.jpg
设想环境,R2是边界网关,通过默认路由与外网连接,并且通告默认路由给内部路由器R1,R3与R4写了条静态路由到R4的环回口4.4.4.4,R3能PING通R4环回口4.4.4.4,R1与R2做EIGRP,R2写一条默认路由到R3,并且通告默认路由给R1,现在是R2可以PING通4.4.4.4,  R1不能,测试发现R1也ping不通23.1.1.3
配置如下

R1配置
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router eigrp 100
network 1.1.1.0 0.0.0.255
network 12.1.1.0 0.0.0.255
no auto-summary
!
ip http server
ip classless



R1路由表
Gateway of last resort is 12.1.1.2 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/156160] via 12.1.1.2, 00:32:46, FastEthernet0/0
     23.0.0.0/24 is subnetted, 1 subnets
D       23.1.1.0 [90/30720] via 12.1.1.2, 00:18:06, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, FastEthernet0/0
D*   0.0.0.0/0 [90/30720] via 12.1.1.2, 00:18:06, FastEthernet0/0



R2配置
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
!
router eigrp 100
network 2.2.2.0 0.0.0.255
network 12.1.1.0 0.0.0.255
network 0.0.0.0
no auto-summary
!
ip http server
ip classless
ip route 0.0.0.0 0.0.0.0 FastEthernet0/1


路由表


Gateway of last resort is 0.0.0.0 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/156160] via 12.1.1.1, 00:34:31, FastEthernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.1.1.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 is directly connected, FastEthernet0/1


R3配置
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 34.1.1.3 255.255.255.0
duplex auto
speed auto
!
ip http server
ip classless
ip route 4.4.4.0 255.255.255.0 FastEthernet0/1
ip route 23.1.1.0 255.255.255.0 FastEthernet0/0  (这条不管写不写,都PING不通)


R4配置
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
ip address 34.1.1.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip http server
ip classless
ip route 23.1.1.0 255.255.255.0 FastEthernet0/0





最佳答案

查看完整内容

R2可以ping通R4原因是: 1、R2有默认路由,所有R2可以发送出去数据包,到R3之后,R3查询路由表有去往R4的环回路由,R4收到了R2发往自己的数据包 2、R4查看数据包的源IP地址是R2的接口IP地址:23.1.1.2,查询路由表有去往23.1.1.0网段的路由:23.1.1.0 255.255.255.0 FastEthernet0/0,所以从F0/0口发送出去,R3收到之后,23.1.1.0网段是自己的直连网段,所以R3将R4发回的数据包发送给R2,ping通!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ...
发表于 2014-9-8 00:37:48 | 显示全部楼层
R2可以ping通R4原因是:
1、R2有默认路由,所有R2可以发送出去数据包,到R3之后,R3查询路由表有去往R4的环回路由,R4收到了R2发往自己的数据包
2、R4查看数据包的源IP地址是R2的接口IP地址:23.1.1.2,查询路由表有去往23.1.1.0网段的路由:23.1.1.0 255.255.255.0 FastEthernet0/0,所以从F0/0口发送出去,R3收到之后,23.1.1.0网段是自己的直连网段,所以R3将R4发回的数据包发送给R2,ping通!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

同理:R1ping不通R3的原因是因为:R3上没有去往R1的路由,如果在R3上写静态路由:
         ip route 12.1.1.0 255.255.255.0 23.1.1.2 此时R1#ping 23.1.1.3是可以ping通!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
沙发 2014-9-8 00:37:48 回复 收起回复
回复

使用道具 举报

发表于 2014-9-8 11:53:04 | 显示全部楼层
路过了解一下
板凳 2014-9-8 11:53:04 回复 收起回复
回复

使用道具 举报

发表于 2014-9-8 13:50:18 | 显示全部楼层

R2 上 network 23.1.1.0 试一下 。没有实验,不知道对不。
如果不行,就逐个检查路由表中是否有路由条目,保证去和回的路由都存在
地板 2014-9-8 13:50:18 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2014-9-8 14:03:04 | 显示全部楼层
Love萌 发表于 2014-9-8 13:50
R2 上 network 23.1.1.0 试一下 。没有实验,不知道对不。
如果不行,就逐个检查路由表中是否有路由条目 ...

兄弟可以自己试验下,肯定不行的
5# 2014-9-8 14:03:04 回复 收起回复
回复

使用道具 举报

发表于 2014-9-8 14:05:50 | 显示全部楼层
中场队员 发表于 2014-9-8 14:03
兄弟可以自己试验下,肯定不行的

R3 上是否有回程路由?
6# 2014-9-8 14:05:50 回复 收起回复
回复

使用道具 举报

发表于 2014-9-8 14:10:24 | 显示全部楼层
R3上写一条默认指给23.1.1.2 ,手配R4环回
R4上写一条默认指给34.1.1.3
7# 2014-9-8 14:10:24 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2014-9-8 15:49:44 | 显示全部楼层
糊里糊涂 发表于 2014-9-8 14:25
R2可以ping通R4原因是:
1、R2有默认路由,所有R2可以发送出去数据包,到R3之后,R3查询路由表有去往R4的 ...

谢谢,的确是,请帮忙看下这个,与此内容类似,但是涉及桥接问题
http://bbs.hh010.com/thread-407157-1-1.html
8# 2014-9-8 15:49:44 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-8 22:39 , Processed in 0.061684 second(s), 26 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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