端口网络地址转换

  • A+
所属分类:思科教程

通过动态网络地址转换,我们可以实现多台终端同时访问外网,但是我们可以发现,随着终端数量增加,外网IP的需求也会增加。在现实中,一个外网的IP是相当昂贵的,也就是说,当使用动态网络地址转换时,成本很高。那如何低成本解决外网访问问题?我们学习一下端口网络地址转换。

端口网络地址转换

第一步当然是配置网络环境,因为我们使用的拓扑与《动态网络地址转换》相同,所以可以参考那篇教程方法配置。

接下来我们开始配置基于端口的网络地址转换,在R1路由上面:

R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255
R1(config)#ip nat inside source list 1 interface fastEthernet 1/0 overload
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip nat inside
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ip nat outside

我们再来测试一下:

端口网络地址转换

同样我们在R2上增加一条ACL,然后测试下C2可否PING通:

端口网络地址转换

最后我们查看一下R1路由器的NAT转换列表,可以看出多台终端使用一个外网IP转发出,但是后面的端口号不同!

端口网络地址转换

  • 问答中心
  • 微信小程序扫一扫
  • weinxin
  • 微信公众
  • 微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

上传图片

目前评论:2   其中:访客  2   博主  0

    • avatar firtukloimutrzas

      I’m impressed, I must say. Actually rarely do I encounter a blog that’s each educative and entertaining, and let me let you know, you’ve hit the nail on the head. Your thought is outstanding; the issue is one thing that not sufficient people are speaking intelligently about. I’m very blissful that I stumbled throughout this in my search for something referring to this.

      • avatar firtukloimutrzas

        hey there and thank you to your info – I have certainly picked up anything new from proper here. I did however expertise several technical issues using this website, as I experienced to reload the website a lot of instances previous to I may just get it to load properly. I were thinking about in case your web host is OK? Now not that I’m complaining, but slow loading circumstances instances will sometimes impact your placement in google and can injury your quality rating if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Well I’m including this RSS to my e-mail and could glance out for much extra of your respective intriguing content. Ensure that you update this once more soon..