静态nat
[RTA]interface GigabitEthernet0/0/1
[RTA-GigabitEthernet0/0/1]ip address 192.168.1.254 24
[RTA-GigabitEthernet0/0/1]interface Serial1/0/0
[RTA-Serial1/0/0]ip address 200.10.10.2 24
[RTA-Serial1/0/0]nat static global 202.10.10.1 inside 192.168.1.1
[RTA-Serial1/0/0]nat static global 202.10.10.2 inside 192.168.1.2
动态nat
[RTA]nat address-group 1 200.10.10.1 200.10.10.200 创建外网地址池组200...
[RTA]acl 2000 使用acl工具,将内网映射地址池创建筛选出来
[RTA-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[RTA-acl-basic-2000]quit
[RTA]interface serial1/0/0
[RTA-Serial1/0/0]nat outbound 2000 address-group 1 no-pat 创建nat 对访问控制列表2001上的进行地址转换(outbound), 转换的地址组是address-group 1 将ACL与地址池关联no-pat表示不可反复使用
Easy IP配置
[RTA]acl 2000
[RTA-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[RTA-acl-basic-2000]quit
[RTA]interface serial1/0/0
[RTA-Serial1/0/0]nat outbound 2000
NAT服务器配置
[RTA]interface GigabitEthernet0/0/1
[RTA-GigabitEthernet0/0/1]ip address 192.168.1.254 24
[RTA-GigabitEthernet0/0/1]interface Serial1/0/0
[RTA-Serial1/0/0]ip address 200.10.10.2 24
[RTA-Serial1/0/0]nat server protocol tcp global 202.10.10.1 www inside 192.168.1.1 8080