NAT静态转换配置_第1张图片
SW1
sw1(config)#int f1/2
sw1(config-if)#speed 100 --------------- #调整双工
sw1(config-if)#duplex full
·
R1
R1(config)#int f0/0
R1(config-if)#ip add 192.168.10.1 255.255.255.0
R1(config-if)#speed 100
R1(config-if)#duplex full ----------------------- #调双工,配ip
R1(config-if)#no shutdown
R1(config-if)#int f0/1
R1(config-if)#ip add 12.0.0.1 255.255.255.0
R1(config-if)#no shutdown
·
R1(config)#ip nat inside source static 192.168.10.2 12.0.0.3 ------ #配置静态NAT
R1(config)#ip nat inside source static 192.168.10.3 12.0.0.4
·
R1(config)#int f0/0
R1(config-if)#ip nat inside ------------- #在内部和外部启用NAT
R1(config-if)#int f0/1
R1(config-if)#ip nat outside
·
R1#debug ip nat
IP NAT debugging is on ------------- #使用debug ip nat 查看NAT转换过程
R1#
Mar 1 00:05:50.647: NAT: s=192.168.10.2->12.0.0.3, d=12.0.0.2 [33247]
Mar 1 00:05:50.695: NAT: s=12.0.0.2, d=12.0.0.3->192.168.10.2 [33247]
R1#
Mar 1 00:05:59.243: NAT: s=192.168.10.3->12.0.0.4, d=12.0.0.2 [33257]
Mar 1 00:05:59.307: NAT: s=12.0.0.2, d=12.0.0.4->192.168.10.3 [33257]