路由器NAT映射
1、搭建实验环境,进行NAT映射测试,将内部服务器192.168.160.53映射为10.38.200.18,具体拓扑如下:
2、R1:
interface FastEthernet0/0
ip address 10.38.191.38 255.255.255.252
ip route 10.38.200.18 255.255.255.255 10.38.191.37
R2:
interface FastEthernet0/0
ip address 10.38.191.37 255.255.255.252
ip nat outside
interface FastEthernet1/0
ip address 192.168.164.65 255.255.255.252
ip nat inside
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
ip route 192.168.160.53 255.255.255.255 192.168.164.66
ip nat pool aaa 10.38.200.18 10.38.200.18 netmask 255.255.255.0
ip nat inside source list 1 pool aaa
access-list 1 permit 192.168.160.53
R3:
interface FastEthernet0/0
ip address 192.168.164.66 255.255.255.252
ip route 0.0.0.0 0.0.0.0 192.168.164.65
做NAT时需要,ping或者访问流量激活后才有转换项:sh ip nat trans
在R2上:Debug ip nat查看具体NAT转换信息