华为NAT基本配置实例详解

实验需求:
PC-1/2 要 ping 通 PC-3 ;
华为NAT基本配置实例详解

实验步骤:
1.设备互联、IP地址规划、加电;
2.设备配置
#内网设备
终端设备
PC1:
ip 192.168.10.1
mask 255.255.255.0
gateway 192.168.10.254
PC2:
ip 192.168.10.2
mask 255.255.255.0
gateway 192.168.10.254
网络设备br/>&2层设备-SW
@创建VLAN
@将互联端口加入到指定的VLAN中

         [SW]vlan 10 
             quit 
         [SW]port-group group-member gi0/0/1 to gi0/0/3 
             port link-type access
             port default vlan 10 
             quit         
      &3层设备-Router
         [R1]interface gi0/0/2 
             ip address 192.168.10.254 255.255.255.0
             quit
         [R1]interface gi0/0/0 
             ip address 12.1.1.1 255.255.255.0
             quit                
         [R1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2     
#外网设备
         [R2]interface gi0/0/1 
             ip address 12.1.1.2 255.255.255.0
             quit 
             interface gi0/0/0 
             ip address 23.1.1.2 255.255.255.0
             quit 
         [R2]#ip nat inside source static 23.1.1.3  12.1.1.3

         PC3:
            ip-23.1.1.3 
            mask-255.255.255.0
            gateway-23.1.1.2

测试:
PC1:
192.168.10.1 --> 23.1.1.3

猜你喜欢

转载自blog.51cto.com/11806823/2158265