配置BasicNAT,地址池多的情况下,末尾加上no-pat
nat address-group 1
address 178.76.28.10 178.76.28.15
interface GigabitEthernet0/1
ip address 178.76.28.1 255.255.255.0
nat outbound 2000 address-group 1 no-pat
acl number 2000
rule 0 permit source 10.0.0.0 0.0.0.255
配置NAPT:私网客户端需要访问外网服务器,但由于公网地址有限,在RTA上配置的公网地址池范围198.76.28.11-198.76.28.11,因此配置NAPT,动态为私网客户端分配公网地址和协议。
[R1]int g0/1
[R1-GigabitEthernet0/1]undo nat out 2000
[R1-GigabitEthernet0/1]qui
[R1]undo nat ad
[R1]undo nat address-group 1
[R1]nat address-group 1
[R1-address-group-1]address 178.76.28.3 178.76.28.3
[R1-GigabitEthernet0/1]nat outbound 2000 address-group 1
配置easy Nat:私网客户端需要访问外网服务器Server,使用公网接口IP地址动态为私网客户端