首页 > 代码库 > NAT

NAT

路由器上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 *







NAT