做的pat不通
http://bbs.spoto.net/forum.php?mod=image&aid=15887&size=300x300&key=b07cf617cb6945a5ed782daa776a7407&nocache=yes&type=fixnone请大家帮我看看上面的拓扑图:已经做了静态路由在R3上可以ping通R1的loopback address(1.1.1.1)也可以ping通R4的loopback address(4.4.4.4),但R1ping不通R4,想做nat让他们相同,,可以无论我做动态nat还是pat都不同,,下面是R3的配置:
interface Loopback0
ip address 3.3.3.3 255.255.255.0
no ip directed-broadcast
!
interface Ethernet0/0
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0/0
ip address 192.168.2.2 255.255.255.0
no ip directed-broadcast
ip nat inside
clockrate 64000
!
interface Serial0/1
ip address 192.168.1.2 255.255.255.0
no ip directed-broadcast
ip nat inside
ignore-dcd
clockrate 64000
!
interface Serial0/2
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0/3
ip address 192.168.3.1 255.255.255.0
no ip directed-broadcast
ip nat outside
clockrate 64000
!
ip nat pool pule 192.168.4.1 192.168.4.2 netmask 255.255.255.0
ip nat inside source list 1 pool pule
ip classless
ip route 1.1.1.0 255.255.255.0 192.168.1.1
ip route 2.2.2.0 255.255.255.0 192.168.2.1
ip route 4.4.4.0 255.255.255.0 192.168.3.2
no ip http server
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
请各位师兄师姐能帮忙看看,,,谢谢有愿意远程帮助更谢谢啊,,
本帖最后由 紫川凌 于 2012-2-20 10:23 编辑
是你路由的问题你做了NAT 之后地址是会转成192.168.4.1 192.168.4.2。你做NAT的这台路由器需要知道去往R4的路由,建议加一条默认路由.而且你做了NAT之后,R4还需要有 去往192.168.4.1 192.168.4.2 的路由。 还有,这个叫动态NAT ,PAT是端口复用。 还有你的访问控制列表也没有写 楼上正解:) hostname r3
!
!
!
!
!
!
ip subnet-zero
!
partition flash 2 8 8
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
no ip directed-broadcast
--More--
13:17:04: %SYS-5-CONFIG_I: Configured from console by console
!
interface Ethernet0/0
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0/0
ip address 192.168.2.2 255.255.255.0
no ip directed-broadcast
ip nat inside
clockrate 64000
!
interface Serial0/1
ip address 192.168.1.2 255.255.255.0
no ip directed-broadcast
ip nat inside
ignore-dcd
clockrate 64000
!
interface Serial0/2
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0/3
ip address 192.168.3.1 255.255.255.0
no ip directed-broadcast
ip nat outside
clockrate 64000
!
ip nat pool pule 192.168.4.1 192.168.4.2 netmask 255.255.255.0
ip nat inside source list 1 pool pule
ip classless
ip route 1.1.1.0 255.255.255.0 192.168.1.1
ip route 2.2.2.0 255.255.255.0 192.168.2.1
ip route 4.4.4.0 255.255.255.0 192.168.3.2
no ip http server
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
acl是写了 R4增加 去往 192.168.4.0网络的路由 到R3 tea 发表于 2012-2-20 11:11 static/image/common/back.gif
R4增加 去往 192.168.4.0网络的路由 到R3
感谢各位的回复,,问题已解决,我原来是在R1的路由是3.3.3.0 255.255.255.0 192.168.1.2替换成默认路由0.0.0.0 0.0.0.0 192.168.1.2就行了相同把R2的路由也替换成默认路由就可以了
本帖最后由 ufd_苜 于 2012-2-20 11:42 编辑
若要使得R1 R2 R3 R4的loo0都能通信
那么在
R1上要加入去往2.2.2.2 3.3.3.3 4.4.4.4的路由
同理R2和R3和R4上也要加入
另外,把ip route 3.3.3.0 255.255.255.0 192.168.1.2替换成默认路由指向192.168.1.2并不是推荐的做法
把R1、R2、R3去往4.4.4.4的路由替换成默认路由
因为实际工程中 R4是外网,设定成默认路由是正确的
在R4上 要设定去往192.168.4.0的静态路由到R3
静态路由:在路由器较少的情况,或者是网络中一些网段需要特殊的转发路径和特殊处理的地方使用。去往内网的地址,最好设定成目标网络地址明确的静态路由。动态NAT:具有一个NAT地址池,在地址池中动态的使用IP地址做内外网地址映射
PAT:利用“IP+端口号”形成唯一映射关系的技术,复用外网出口的端口
所以楼主伙伴本例中,应该是动态NAT
ufd_苜 发表于 2012-2-20 11:41 static/image/common/back.gif
若要使得R1 R2 R3 R4的loo0都能通信
那么在
R1上要加入去往2.2.2.2 3.3.3.3 4.4.4.4的路由
只能在R1和R2上加入默认路由,不能在R4上设置默认路由,,如果R1设置不是默认路由而R4设置的是默认路由还是不同 支持你加分
页:
[1]
2