NAT网络地址转换常见四种配置
网络拓扑图
配置
静态NAT:
路由器R1的配置:
sysname R1
interface GigabitEthernet0/0/0
ip address 200.1.1.1 255.255.255.0
nat static global 200.1.1.3 inside 192.168.1.1 netmask 255.255.255.255
nat static global 200.1.1.4 inside 192.168.1.2 netmask 255.255.255.255
interface GigabitEthernet0/0/1
ip address 192.168.1.254 255.255.255.0
动态NAT:
地址池:
nat address-group 1 200.1.1.10 200.1.1.20
抓取感兴趣的流量:
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
interface GigabitEthernet0/0/0
ip address 200.1.1.1 255.255.255.0
nat outbound 2000 address-group 1 no-pat
interface GigabitEthernet0/0/1
ip address 192.168.1.254 255.255.255.0
注释:G-SIP是动态变化的。
easy IP的配置:
interface GigabitEthernet0/0/0
ip address 200.1.1.1 255.255.255.0
nat outbound 2000
NAPT的配置:
interface GigabitEthernet0/0/0
ip address 200.1.1.1 255.255.255.0
nat outbound 2000 address-group 1
nat-server的配置:
interface GigabitEthernet0/0/0
ip address 200.1.1.1 255.255.255.0
nat server global 200.1.1.3 inside 192.168.1.1