1.配置端口:
int s0/0
ip nat outside ;s0/0为外部端口
int f0/0
ip nat inside ;f0/0为内部端口
2.配置合法外部地址池:
ip nat pool natpool1 211.96.193.1 211.96.193.10 netmask 255.255.255.0
3.配置内部ip地址允许nat的地址范围:
access-list 1 permit 192.168.1.1 0.0.0.255
4.允许NAT:
ip nat inside source list 1 pool natpool1 overload
5.设置内部服务器映射:
ip nat inside source static 192.168.1.250 211.96.193.250
6.要取消NAT,需先clear ip nat trans