利用NAT扩展网络
配置静态NAT :
ip nat inside source static 192.168.10.254 209.165.200.225
建立内部本地地址与内部全局地址之间的静态转换
inter s0/0/0
ip nat inside
将S0/0/0识别为内部NAT接口
inter s0/1/0
ip nat outside
将S0/1/0识别为外部NAT接口
配置动态NAT:
ip nat pool NAT-POOL1 209.165.200.226 209.165.200.240 netmask 255.255.255.224
使用NAT-POOL1作为池名称 定义公有IP地址池
access-list 1 permit 192.168.0.0 0.0.255.255
定义可转化的地址
ip nat inside source list 1 pool NAT-POOL1
将NAT地址池与ACL1绑定起来
inter s0/0/0
ip nat inside
inter s0/1/0
ip nat outside
配置NAT过载:
access-list 1 permit 192.168.0.0 0.0.255.255
定义可转化的地址
ip nat inside source list 1 inter s0/1/0 overload
将外部接口S0/1/0 识别为用于过载的内部全局地址
inter s0/0/0
ip nat inside
inter s0/1/0
ip nat outside
清除NAT转换: clear ip nat translation
转载于:https://blog.51cto.com/2372805/417213