静态,动态NAT 配置
拓扑图
需求
拓扑中PC 都已经设置好IP 地址、网关 , NAT 的配置分为静态NAT、动态NAT
配置命令
R1:
undotermosyssysnameR1intg0/0/0ipadd200.0.0.124intg0/0/1ipadd192.168.1.25424intg0/0/2ipadd192.168.2.25424qiproute-static0.0.0.00.0.0.0200.0.0.2
R2:
undotermosyssysnameR2intloo0ipadd200.0.20.124intg0/0/0ipadd200.0.0.224qiproute-static0.0.0.00.0.0.0200.0.0.1
==========
配置静态NAT
R1:
intg0/0/0natstaticglobal200.0.0.3inside192.168.1.1natstaticglobal200.0.0.4inside192.168.1.2
/
验证
displaynatstatic
PC1 ping R2 的环回口
R1:displaynatsessionall
==========
配置动态NAT
R1:
删掉上面配置的静态NATintg0/0/0undonatstaticglobal200.0.0.3inside192.168.1.1undonatstaticglobal200.0.0.4inside192.168.1.2nataddress-group1200.0.0.9200.0.0.200acl2000rulepermitsource192.168.1.00.0.0.255rulepermitsource192.168.2.00.0.0.255intg0/0/0natoutbound2000address-group1no-pat不做端口转换或者natoutbound2000address-group1做端口转换
R1: 验证
displaynataddress-group1
displaynatoutbound
displaynatsessionall
==========
配置 easy ip
intg0/0/0undonatoutbound2000address-group1natoutbound2000