華為NAT基本配置實例詳解
阿新 • • 發佈:2018-08-12
步驟 pc2 quit ip nat add 設備互聯 ext roc 配置實例 實驗需求:
PC-1/2 要 ping 通 PC-3 ;
PC-1/2 要 ping 通 PC-3 ;
實驗步驟:
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
網絡設備&2層設備-SW
@創建VLAN
br/>&2層設備-SW
@創建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
華為NAT基本配置實例詳解