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

[求助] 为什么在R3上做了NAT端口过载,R1,R2无法ping外网

[复制链接]
发表于 2016-8-15 22:08:05 | 显示全部楼层 |阅读模式
3鸿鹄币
首先上拓扑,用GNS3弄得。
R1,R2,R3的fa1/0为内网口,S0/0为外网口。
路由用OSPF。
现在的问题是,在R3上做了NAT的端口过载,允许192.168.0.0 0.0.255.255 的地址复用端口S0/0,但是现在的问题是无法从内网ping外网,既R4。
其实这些实验很久以前,1年多前,做过好几遍了,现在回顾一下发现做不来,我隐约感觉到问题出在了路由层面,因为模拟因特网的R4路由器以及R3的外网口并没加入ospf,没有向ospf域内传递路由条目。我如果在内网中ping外网,无法ping通。。。。请各位帮忙解答一下。不胜感激。

每一台路由器的run-config如下(一些没用的感叹号删了):
R1:
Router#show running-config
Building configuration...

Current configuration : 621 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef


interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.0.0 0.0.255.255 area 0
!
no ip http server
!
control-plane
!
        
line con 0
line aux 0
line vty 0 4
!
!
end


R2
Router#show running-config
Building configuration...


Current configuration : 669 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!

interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.23.2 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.12.2 0.0.0.0 area 0
network 192.168.23.2 0.0.0.0 area 1
!
no ip http server
!

control-plane
!   
line con 0
line aux 0
line vty 0 4
!
!
end



R3
Router#show running-config
Building configuration...

Current configuration : 1108 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!


interface Serial0/0
ip address 202.100.10.1 255.255.255.0
ip nat outside
ip virtual-reassembly
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 192.168.23.3 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.0.0 0.0.255.255 area 1
!         
no ip http server
!
ip route 0.0.0.0 0.0.0.0 202.100.10.2
!
ip nat source list 1 interface Serial0/0 overload
ip nat inside source list 1 interface Serial0/0 overload
!
access-list 1 permit 192.168.0.0 0.0.255.255
!

control-plane
!

line con 0
line aux 0
line vty 0 4
!
!
end

R4
Router#show running-config
Building configuration...

Current configuration : 670 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!

interface Serial0/0
ip address 202.100.10.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!         
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
no ip http server
!

control-plane
!

!
line con 0
line aux 0
line vty 0 4
!
!
end


附件: 您需要 登录 才可以下载或查看,没有账号?论坛注册

最佳答案

查看完整内容

R1和R2没有默认路由,肯定没有办法到R4,你R3上写了条默认路由,可以用ospf下发默认路由的命令 default imformation origin ,这样就搞定了
发表于 2016-8-15 22:08:06 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

 楼主| 发表于 2016-8-16 08:19:46 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

 楼主| 发表于 2016-8-16 11:03:44 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

 楼主| 发表于 2016-8-16 20:52:28 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-8-9 02:19 , Processed in 0.061584 second(s), 10 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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