R1路由telnet路由R4是怎么通的一直没看明白!
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
看不明白。你说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:59 编辑
journey-sx 发表于 2013-4-17 19:41 static/image/common/back.gif
看不明白。你说telnetR4(192.168.0.1)能通?可R2只有一条到达192.168.4.0的路由啊?它怎么送到R4上呢?假 ...
只能在R1上 telnet 192.168.4.1去R4谢谢! R3和R4有直连路由! 建议贴配置的时候,写上关键配置即可。另外,IP地址表示的时候,位置可以更清晰些。 andersen 发表于 2013-4-18 09:20 static/image/common/back.gif
建议贴配置的时候,写上关键配置即可。另外,IP地址表示的时候,位置可以更清晰些。
小白求指教! 建议楼主简化帖子,将关键配置贴上即可。 蓝小猴 发表于 2013-4-18 08:57 static/image/common/back.gif
只能在R1上 telnet 192.168.4.1去R4谢谢! R3和R4有直连路由!
那按你的描述的话只有可能跟ip nat inside/outside source static 这个命令相关了。。。不过即便地址解析后
那应该就是这样了,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 outsidestatic这条指令转换),之后送到R3之后再查看数据包的目的IP刚好为S1/1出口直连的R4地址,因此就可以送到R4上了。回的时候因为数据包的源IP是转换后的192.168.1.1,所以R4送到R3后,R3可以根据自己的静态路由再把数据包送到R2,然后再转换。最终送回给R1。这是我的理解,还需高人确认。 http://www.doc88.com/p-668123192641.html这里有你需要的答案 journey-sx 发表于 2013-4-18 22:25 static/image/common/back.gif
http://www.doc88.com/p-668123192641.html这里有你需要的答案
谢谢!我去看看!
页:
[1]