静态NAT

1. 实验拓扑

   使用GNS3模拟器版本 0.8.5

思科 GNS3 配置 静态 NAT

2.实验需求

1C1通过静态nat上公网

思科 GNS3 配置 静态 NAT

3. 实验拓扑

  IP规划

 

R1(config)#int f0/0

R1(config-if)#ip add 12.0.0.1 255.255.255.0

R1(config-if)#no sh

R1(config-if)#int f0/1

R1(config-if)#ip add 192.168.10.1 255.255.255.0

R1(config-if)#no sh

R1(config-if)#exit

R2#conf t  

R2(config)#int f0/0

R2(config-if)#ip add 12.0.0.2 255.255.255.0

R2(config-if)#no sh

 

 配置脚本

 

R1(config)#ip nat inside source static 192.168.10.100 12.0.0.1 把192.168.10.100替换成12.0.0.1

R1(config)#int f0/0

R1(config-if)#ip nat outside                            外网口     

R1(config-if)#int f0/1 

R1(config-if)#ip nat inside                             内网口 

R1(config)#router ospf 1                               做动态路由OSPF

R1(config-router)#network 12.0.0.0 0.0.0.255 area 0

R1(config-router)#network 192.168.10.0 0.0.0.255 area 0

R1(config-router)#end

R2(config)#router ospf 1

R2(config-router)#network 12.0.0.0 0.0.0.255 area 0

R2(config)#ip route 0.0.0.0 0.0.0.0 12.0.0.1