标签:style blog http strong 2014 for
静态NAT(一对一)
1.定义转换规则
Gateway(config)# ip nat inside source static [Inside local IP address] [Inside global IP address]
*1.1 具体端口映射
Gateway(config)# ip nat inside source static tcp\udp [Inside local IP address] [local tcp\udp port] [Inside global IP address] [global tcp\udp port]
for example:
Gateway(config)# ip nat inside source static tcp 192.168.1.1 80 12.1.1.1 8080
将本地内网192.168.1.1的80端口映射到本地公网12.1.1.1的8080端口
2.定义接口的内外方向
int f0/0 ----f0/0口为内
Router(config-if)# ip nat inside
int f0/1 ----f0/1口为外
Router(config-if)# ip nat outside
动态NAT(多对多) ---- 轮询
1.定义公网的NAT池
Gateway(config)# ip nat pool [池名] [起始IP] [终止IP] netmask [掩码]
2.用ACL抓取要进行转换的ip
Gateway(config)# access-list [列表编号] permit [内网ip] [通配符](反掩码)
3.定义转换规则
Gateway(config)# ip nat inside source list [列表编号](参考2) pool [池名](参考1)
4.定义接口的内外方向(参考静态NAT)
端口映射PAT(一对多)
1.用ACL抓取要进行转换的ip
Gateway(config)# access-list [列表编号] permit [内网ip] [通配符](反掩码)
2.定义转换规则
Gateway(config)# ip nat inside source list [列表编号](参考1) interface [出接口] overload
3.定义接口的内外方向(参考静态NAT)
NAT练习题
标签:style blog http strong 2014 for
原文地址:http://www.cnblogs.com/kba977/p/Cisco.html