雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2289|回复: 9

[讨论/求助] R1路由telnet路由R4是怎么通的一直没看明白!

[复制链接]
发表于 2013-4-17 13:46:36 | 显示全部楼层 |阅读模式

R1 telnet 192.168.4.1出现R4>是为什么呢?

RI的配置:
R1#show run
Building configuration...
Current configuration : 1121 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
ip tcp synwait-time 5
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.0.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
ip route 0.0.0.0 0.0.0.0 192.168.0.2
!
!
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
!
!
end

R2路由配置:
R2#show run
Building configuration...
Current configuration : 1338 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
ip tcp synwait-time 5
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.0.2 255.255.255.0
ip nat inside
ip virtual-reassembly
serial restart-delay 0
clock rate 64000
!
interface Serial1/1
ip address 1.1.23.2 255.255.255.0
ip nat outside
ip virtual-reassembly
serial restart-delay 0
clock rate 64000
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
ip route 192.168.4.0 255.255.255.0 1.1.23.3
!
!
no ip http server
no ip http secure-server
ip nat inside source static 192.168.0.1 192.168.1.1
ip nat outside source static 192.168.0.1 192.168.4.1
!
!
!
!
!
!
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

R3配置:
R3#show run
Building configuration...
Current configuration : 1156 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
ip tcp synwait-time 5
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 1.1.23.3 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/1
ip address 192.168.0.2 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
ip route 192.168.1.0 255.255.255.0 1.1.23.2
!
!
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
!
!
end

R4配置:
R4#show run
Building configuration...
Current configuration : 1124 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
ip tcp synwait-time 5
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.0.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
ip route 0.0.0.0 0.0.0.0 192.168.0.2
!
!
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
no login
!
!
end

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
发表于 2013-4-17 19:41:35 | 显示全部楼层
看不明白。你说telnetR4(192.168.0.1)能通?可R2只有一条到达192.168.4.0的路由啊?它怎么送到R4上呢?假如telnet192.168.4.1,它也只能送到R3,但是R3又是只有一条静态路由,而且不知道192.168.4.1是属于哪个接口的地址。看起来迷惘啊~~~
 楼主| 发表于 2013-4-18 08:57:23 | 显示全部楼层
本帖最后由 蓝小猴 于 2013-4-18 08:59 编辑
journey-sx 发表于 2013-4-17 19:41
看不明白。你说telnetR4(192.168.0.1)能通?可R2只有一条到达192.168.4.0的路由啊?它怎么送到R4上呢?假 ...


只能在R1上 telnet 192.168.4.1去R4谢谢! R3和R4有直连路由!
发表于 2013-4-18 09:20:09 | 显示全部楼层
建议贴配置的时候,写上关键配置即可。另外,IP地址表示的时候,位置可以更清晰些。
 楼主| 发表于 2013-4-18 11:00:51 | 显示全部楼层
andersen 发表于 2013-4-18 09:20
建议贴配置的时候,写上关键配置即可。另外,IP地址表示的时候,位置可以更清晰些。

小白求指教!
发表于 2013-4-18 11:23:24 | 显示全部楼层
建议楼主简化帖子,将关键配置贴上即可。
发表于 2013-4-18 13:36:44 | 显示全部楼层
蓝小猴 发表于 2013-4-18 08:57
只能在R1上 telnet 192.168.4.1去R4谢谢! R3和R4有直连路由!

那按你的描述的话只有可能跟ip nat inside/outside source static 这个命令相关了。。。不过即便地址解析后
发表于 2013-4-18 13:53:39 | 显示全部楼层
那应该就是这样了,R1上telnet192.168.4.1的时候,包先从R1 S1/0口出,到R2 S1/0人后,数据包源IP会被静态映射成192.168.1.1,之后R2路由器查看路由表,发现前往4.1的出口时S1/1,然后把数据包从S1/1发出去,再发出去之前,数据包的目地IP192.168.4.1会被映射表转换成192.168.0.1(由ip nat source outside  static这条指令转换),之后送到R3之后再查看数据包的目的IP刚好为S1/1出口直连的R4地址,因此就可以送到R4上了。回的时候因为数据包的源IP是转换后的192.168.1.1,所以R4送到R3后,R3可以根据自己的静态路由再把数据包送到R2,然后再转换。最终送回给R1。这是我的理解,还需高人确认。
发表于 2013-4-18 22:25:02 | 显示全部楼层
http://www.doc88.com/p-668123192641.html这里有你需要的答案
 楼主| 发表于 2013-4-19 08:45:12 | 显示全部楼层
journey-sx 发表于 2013-4-18 22:25
http://www.doc88.com/p-668123192641.html这里有你需要的答案

谢谢!我去看看!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-9-28 09:54 , Processed in 0.085010 second(s), 19 queries , Gzip On.

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