路由器上ACL与NAT的组合实现
路由器上实现静态SNAT
config t
ip nat inside source static 192.168.0.211 211.0.0.211
ip nat inside source static 192.168.0.212 211.0.0.212
interface fa2/0
ip nat inside
interface s1/0
ip nat outside
end
show ip nat translations *
路由器上实现动态SNAT
config t
access-list 11 permit 192.168.0.0 0.0.0.255
ip nat pool TT 211.0.0.101 211.0.0.150 netmask 255.255.255.0
ip nat inside source list 11 pool TT
interface fa 2/0
ip nat inside
interface s1/4
ip nat outside
end
show ip nat translations *
超载配置
config t
access-list 11 permit 192.168.0.0 0.0.0.255
ip nat pool TT 211.0.0.101 211.0.0.150 netmask 255.255.255.0
ip nat inside source list 11 pool TT overload
interface fa 2/0
ip nat inside
interface s1/4
ip nat outside
end
show ip nat translations *
PAT配置
config t
config t
access-list 11 permit 192.168.0.0 0.0.0.255
ip nat pool TT 211.0.0.101 211.0.0.101 netmask 255.255.255.0
ip nat inside source list 11 pool TT overload
interface fa 2/0
ip nat inside
interface s1/4
ip nat outside
end
show ip nat translations
TCP负载均衡配置
conf t
access-list 2 permit 61.0.0.61
ip nat pool real-srv 61.0.0.201 61.0.0.203 prefix-length 24 type rotary(循环)
ipnat inside destination list 22 pool real-srv
interface serial 1/2
ip nat outside
interface fa 0/2
ip nat inside
end
show ip nat translations