动态NAT
利用地址池实现私网转公网
拓扑ENSP
- 配置主机IP
PC1:
IP:192.168.1.1/24
子网掩码:255.255.255.0
网关:192.168.1.254
PC2:
IP:192.168.2.1/24
子网掩码:255.255.255.0
网关:192.168.2.254
PC1:
IP:192.168.3.1/24
子网掩码:255.255.255.0
网关:192.168.3.254
服务器
IP:200.200.200.2/30
子网掩码:255.255.255.252
网关:200.200.200.1
2.AR1配置网关
int g0/0/0
ip address 192.168.1.254 24
int g0/0/1
ip address 192.168.2.254 24
int g0/0/2
ip address 192.168.3.254 24
int g4/0/0
ip address 100.100.100.1 24
3.AR2配置IP地址
int g0/0/1
ip address 100.100.100.2 24
int g0/0/2
ip address 200.200.200.1 30
4.在AR1上配置地址池
nat address-group 1 100.100.100.3 100.100.100.254
地址池范围100.3到100.254
5.配置acl条件
acl 2000
rule 5 permit source 192.168.1.0 0.0.0.255
rule 10 permit source 192.168.2.0 0.0.0.255
rule 15 permit source 192.168.3.0 0.0.0.255
6.在端口g4/0/0上使用
nat outbound 2000 address-group 1 no-pat
7.验证是否ping通
8.抓包查看地址是否转变
地址成功转换,实验完成。