- 积分
- 372
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 最后登录
- 1970-1-1
- 阅读权限
- 30
- 听众
- 收听
初级工程师
  
|
3鸿鹄币
设想环境,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通!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
...
|