华为ensp模拟器NAT实验

只配置了静态NAT和动态NAT,未配置Easy IP未配置
华为ensp模拟器NAT实验_第1张图片
配置LSW1

LSW1命令
[sw]undo info-center enable
Info: Information center is disabled.
[sw]vlan bat 2 3 4
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw]int e0/0/1
[sw-Ethernet0/0/1]port link-type access
[sw-Ethernet0/0/1]port deflaut vlan 2
[sw-Ethernet0/0/1]int e0/0/2
[sw-Ethernet0/0/2]port link-type access
[sw-Ethernet0/0/2]port deflaut vlan 3
[sw-Ethernet0/0/2]int e0/0/3
[sw-Ethernet0/0/3]port link-type access
[sw-Ethernet0/0/3]port deflaut vlan 3

[sw-Ethernet0/0/3]int g0/0/1
[sw-GigabitEthernet0/0/1]port link-type access
[sw-GigabitEthernet0/0/1] port deflaut vlan 4
[sw-GigabitEthernet0/0/1]dis this

[sw]int vlanif2
[sw-Vlanif2]ip ad 	
[sw-Vlanif2]ip address 192.168.2.1 24
[sw-Vlanif2]int vlanif3
[sw-Vlanif3]ip ad 192.168.3.1 24
[sw-Vlanif3]int vlanif4
[sw-Vlanif4]ip ad 	
[sw-Vlanif4]ip address 192.168.1.2 24
[sw-Vlanif4]quit
	
[sw]ip route-static 0.0.0.0 0.0.0.0 192.168.1.3

配置AR1,R1采用AR1220路由器,需要自行添加serial接口

[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.3 24 
[R1-GigabitEthernet0/0/1]quit
[R1]int s2/0/0	
[R1-Serial2/0/0]ip address 202.103.225.1 24
[R1-Serial2/0/0]quit
[R1]ip route-static 192.168.2.0 24 192.168.1.2
[R1]ip route-static 192.168.3.0 24 192.168.1.2
[R1]ip route-static 0.0.0.0 0.0.0.0 202.103.225.2
//静态NAT配置
[R1]nat static global 8.8.8.8 inside 192.168.2.2 //静态NAT 8.8.8.8 与192.168.2.2转换  一个私网IP地址对应一个公网IP地址
[R1]int s2/0/0
[R1-Serial2/0/0]nat static enable 
[R1-Serial2/0/0]quit
[R1]dis session all
  Session Table Information:

  Total : 0
//vlan 3的动态NAT配置 地址池212.173.141.1 - 212.173.141.3 共三个地址
多个私网IP地址对应多个公网IP地址  地址池按个人需求分配
[R1]nat address-group 1 212.173.141.1 212.173.141.3
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[R1-acl-basic-2000]int s2/0/0
[R1-Serial2/0/0]nat outbound 2000 address-group 1 no-pat 

ISP部分配置,同样添加serial接口

[ISP]int s2/0/0 
[ISP-Serial2/0/0]ip address 202.103.225.2 24
[ISP-Serial2/0/0]quit
[ISP]int LoopBack 0
[ISP-LoopBack0]ip ad 	
[ISP-LoopBack0]ip address 220.173.80.1 32
[ISP-LoopBack0]quit
[ISP]ip route-static 8.8.8.8 32 202.103.225.1
[ISP]ip route-static 212.173.141.0 24 202.103.225.1

vlan 2 静态NAT
华为ensp模拟器NAT实验_第2张图片
vlan 3 动态NAT
华为ensp模拟器NAT实验_第3张图片

你可能感兴趣的:(华为ensp模拟器,华为网络)