ensp基础实验(三层交换+单臂路由+nat+dns解析+静态路由)


单臂路由部分
配置LSW6
sys
sys LSW6
vlan batch 5 6
int e0/0/1
port link-type trunk
port trunk all vlan 5 6
int e0/0/2
port link-type access
port default vlan 5
int e0/0/3
port link-type access
port default vlan 6
配置LSW5
sys
sys LSW5
vlan batch 5 6
int g0/0/1
port link-type trunk
port trunk all vlan 5 6
int g0/0/2
port link-type trunk
port trunk all vlan 5 6
配置AR2
sys
sysname AR2
acl number 2000
rule 5 permit source 172.16.5.0 0.0.0.255
rule 10 permit source 172.16.6.0 0.0.0.255
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
nat outbound 2000
interface GigabitEthernet0/0/1.1
dot1q termination vid 5
ip address 172.16.5.254 255.255.255.0
arp broadcast enable
interface GigabitEthernet0/0/1.2
dot1q termination vid 6
ip address 172.16.6.254 255.255.255.0
arp broadcast enable
quit
ip route-static 0.0.0.0 0.0.0.0 12.1.1.1
三层交换部分
AR1配置
sys
sysname AR1
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
rule 10 permit source 192.168.2.0 0.0.0.255
rule 15 permit source 192.168.3.0 0.0.0.255
rule 20 permit source 192.168.4.0 0.0.0.255
interface GigabitEthernet0/0/0
ip address 11.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 12.1.1.1 255.255.255.0
nat outbound 2000
quit
ip route-static 0.0.0.0 0 0 12.1.1.2
ip route-static 192.168.1.0 255.255.255.0 11.1.1.1
ip route-static 192.168.2.0 255.255.255.0 11.1.1.1
ip route-static 192.168.3.0 255.255.255.0 11.1.1.1
ip route-static 192.168.4.0 255.255.255.0 11.1.1.1
LSW1配置
sys
sysname LSW1
vlan batch 10 to 11 20 30 40 100
interface Vlanif10
ip address 192.168.1.254 255.255.255.0
interface Vlanif11
ip address 11.1.1.1 255.255.255.0
interface Vlanif20
ip address 192.168.2.254 255.255.255.0
interface Vlanif30
ip address 192.168.3.254 255.255.255.0
interface Vlanif40
ip address 192.168.4.254 255.255.255.0
interface Vlanif100
ip address 10.1.1.254 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/3
port link-type access
port default vlan 11
interface GigabitEthernet0/0/4
port link-type access
port default vlan 100
quit
ip route-static 0.0.0.0 0.0.0.0 11.1.1.2
LSW2配置
sys
sysname LSW2
vlan batch 10 20
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
LSW3配置
sysname LSW3
vlan batch 30 40
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/2
port link-type acc
port default vlan 30
interface GigabitEthernet0/0/3
port link-type acce
port default vlan 40