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

[求助] 新手又来求助来啦!求NAT转发实例配置怎么弄?

[复制链接]
发表于 2016-9-23 08:17:56 | 显示全部楼层 |阅读模式
7鸿鹄币
110.png

就是以上这个实例,没有模拟外网的那个路由器时,我会NAT内网转发到模拟外网。


就是添加了模拟外网的一台路由器就不知道该怎么配置了。


我把我配置的实例的压缩包放在下面了。


求大神帮帮忙。解决下。


十分感谢!

游客,如果您要查看本帖隐藏内容请回复

最佳答案

查看完整内容

你这个问题昨天我已经做出来了 教程 你可以看看 就是按照你这个来的 只是IP不同而已 地址 http://user.qzone.qq.com/444716255/blog/1474609365
 楼主| 发表于 2016-9-25 18:38:44 | 显示全部楼层
西门吹雪· 发表于 2016-9-24 09:47
你这个问题昨天我已经做出来了 教程 你可以看看 就是按照你这个来的   只是IP不同而已 地址  http://user.q ...

R1

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R1
R1(config)#int g0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int g0/1
R1(config-if)#ip add 10.1.1.1 255.192.0.0
R1(config-if)#no sh
R1(config-if)#exi
R1(config)#ip route 0.0.0.0 0.0.0.0 g0/1


R2

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R2
R2(config)#int g0/0
R2(config-if)#ip add 10.1.1.2 255.192.0.0
R2(config-if)#no sh
R2(config-if)#int g0/1
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exi
R2(config)#ip route 0.0.0.0 0.0.0.0 g0/0

测试  

R2开启debug模式

R2#debug ip icmp
ICMP packet debugging is on

主机1ping R2的边界路由器接口

PC>ping 10.1.1.2

Pinging 10.1.1.2 with 32 bytes of data:

Reply from 10.1.1.2: bytes=32 time=0ms TTL=254
Reply from 10.1.1.2: bytes=32 time=1ms TTL=254
Reply from 10.1.1.2: bytes=32 time=0ms TTL=254
Reply from 10.1.1.2: bytes=32 time=1ms TTL=254

Ping statistics for 10.1.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms


ICMP: echo reply sent, src 10.1.1.2, dst 192.168.1.2

ICMP: echo reply sent, src 10.1.1.2, dst 192.168.1.2

ICMP: echo reply sent, src 10.1.1.2, dst 192.168.1.2

ICMP: echo reply sent, src 10.1.1.2, dst 192.168.1.2


R1
R1(config)#ip nat inside source static 192.168.1.2 10.1.1.10
R1(config)#ip nat inside source static 192.168.1.3 10.1.1.20
R1(config)#
R1(config)#int g0/0
R1(config-if)#ip nat in
R1(config-if)#ip nat inside
R1(config-if)#int g0/1
R1(config-if)#ip na
R1(config-if)#ip nat ou
R1(config-if)#ip nat outside

测试
主机1ping边界接口

PC>ping 10.1.1.2

Pinging 10.1.1.2 with 32 bytes of data:

Request timed out.
Reply from 10.1.1.2: bytes=32 time=0ms TTL=254
Reply from 10.1.1.2: bytes=32 time=1ms TTL=254
Reply from 10.1.1.2: bytes=32 time=0ms TTL=254

Ping statistics for 10.1.1.2:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms


ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.10

ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.10

ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.10

ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.10



主机2ping边界接口

PC>ping 10.1.1.2

Pinging 10.1.1.2 with 32 bytes of data:

Request timed out.
Reply from 10.1.1.2: bytes=32 time=0ms TTL=254
Reply from 10.1.1.2: bytes=32 time=1ms TTL=254
Reply from 10.1.1.2: bytes=32 time=1ms TTL=254

Ping statistics for 10.1.1.2:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms



ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.20

ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.20

ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.20

ICMP: echo reply sent, src 10.1.1.2, dst 10.1.1.20
来自 2# 2016-9-25 18:38:44 回复 收起回复
回复

使用道具 举报

发表于 2016-9-23 08:17:57 | 显示全部楼层
你这个问题昨天我已经做出来了 教程 你可以看看 就是按照你这个来的   只是IP不同而已 地址  http://user.qzone.qq.com/444716255/blog/1474609365
板凳 2016-9-23 08:17:57 回复 收起回复
回复

使用道具 举报

发表于 2016-9-23 12:07:18 | 显示全部楼层
怎么还有隐藏内容呀
地板 2016-9-23 12:07:18 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-9-23 12:47:38 | 显示全部楼层
Rockyw 发表于 2016-9-23 12:07
怎么还有隐藏内容呀

那是我配的实例,弄错了。好像改不了了。
5# 2016-9-23 12:47:38 回复 收起回复
回复

使用道具 举报

发表于 2016-9-23 16:34:34 | 显示全部楼层
看下~居然还回复可见,。。。
6# 2016-9-23 16:34:34 回复 收起回复
回复

使用道具 举报

发表于 2016-9-24 09:48:21 | 显示全部楼层
你这个问题昨天我已经做出来了 教程 你可以看看 就是按照你这个来的   只是IP不同而已 地址  http://user.qzone.qq.com/444716255/blog/1474609365
7# 2016-9-24 09:48:21 回复 收起回复
回复

使用道具 举报

发表于 2016-9-24 09:50:03 | 显示全部楼层
你这个问题昨天我已经做出来了 教程 你可以看看 就是按照你这个来的   只是IP不同而已 地址  http://user.qzone.qq.com/444716255/blog/1474609365
8# 2016-9-24 09:50:03 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-8 02:52 , Processed in 0.078318 second(s), 17 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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