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

[求助] nat转换的问题,求排错

[复制链接]
发表于 2016-12-25 17:32:41 | 显示全部楼层 |阅读模式
3鸿鹄币
图上是我做的一个简单的nat实验,r9通过nat转换成10.0.0.1地址。10网段和r11直连,nat转换表有,但就是ping不通 我用r9ping10.0.0.1,都ping不通,但是r8上已经有nat转换表了,为什么?

r8配置


Current configuration : 1037 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R8
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
ip address 192.168.1.254 255.255.255.0
ip nat inside
ip virtual-reassembly
half-duplex
!
interface Ethernet0/1
no ip address
shutdown
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
ip address 10.0.0.10 255.255.255.0
ip nat outside
ip virtual-reassembly
half-duplex
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 10.0.0.7
!
ip nat inside source static 192.168.1.1 10.0.0.2
!
!
!
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




r8的转换表
R8#sh ip nat tr
Pro Inside global      Inside local       Outside local      Outside global
--- 10.0.0.2           192.168.1.1        ---                ---


q1.png

最佳答案

查看完整内容

PC 设置默认网关 NAT 1.定义外网口,内网卡 2.定义访问控制列表 3.定义地址池 4.设置动态或者端口复用
发表于 2016-12-25 17:32:42 | 显示全部楼层
PC 设置默认网关
NAT 1.定义外网口,内网卡
        2.定义访问控制列表
        3.定义地址池
        4.设置动态或者端口复用
沙发 2016-12-25 17:32:42 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-12-25 17:40:26 | 显示全部楼层
本帖最后由 huchina 于 2016-12-25 19:08 编辑

打错了,是ping10.0.0.2 ping不通, 求解答
板凳 2016-12-25 17:40:26 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-12-25 22:24:52 | 显示全部楼层
jim.hou 发表于 2016-12-25 19:55
PC 设置默认网关
NAT 1.定义外网口,内网卡
        2.定义访问控制列表

我配置的是静态的,默认网关配置了,nat转换表都有,就是不通
地板 2016-12-25 22:24:52 回复 收起回复
回复

使用道具 举报

发表于 2016-12-26 08:34:19 | 显示全部楼层
你R11的e0/3的接口地址是什么?10.0.0.2 ?ping的话你要pinge0/3的接口
5# 2016-12-26 08:34:19 回复 收起回复
回复

使用道具 举报

发表于 2016-12-26 08:34:56 | 显示全部楼层
R11要有一条默认路由回来
6# 2016-12-26 08:34:56 回复 收起回复
回复

使用道具 举报

发表于 2016-12-26 08:35:51 | 显示全部楼层
huchina 发表于 2016-12-25 22:24
我配置的是静态的,默认网关配置了,nat转换表都有,就是不通

R8 ping 10.0.0.2   10.0.0.2是什么地址 配置在哪里了?
7# 2016-12-26 08:35:51 回复 收起回复
回复

使用道具 举报

发表于 2016-12-26 08:45:55 | 显示全部楼层
网关应该指向e0/0口的IP  ip nat inside source static 192.168.1.1 10.0.0.10
8# 2016-12-26 08:45:55 回复 收起回复
回复

使用道具 举报

发表于 2016-12-26 14:12:15 | 显示全部楼层
因为你的PC是用路由器模拟的默认开启了路由功能,你在ping10.0.0.2的时候路由器会先查路由表看到没有去10.0.0.2的路由条目,又因为R9没有去10.0.0.2的路由所以导致你ping不通 。

最好的解决办法是进入R9配置模式no ip routing关闭路由功能。
9# 2016-12-26 14:12:15 回复 收起回复
回复

使用道具 举报

发表于 2016-12-27 18:04:41 | 显示全部楼层
应该是模拟器问题, 你可以试试其他模拟器,或者用真实设备做。
  有问题找何老师【Q 1052887325】
10# 2016-12-27 18:04:41 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-7 21:20 , Processed in 0.109041 second(s), 15 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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