HCIP---作业

1.vlan配置
![]()
所有的交换机:
vlan batch 2 3 100
2.接入层配置
SW1
sys
sysname SW1
vlan batch 2 3 100
description PC-Business-VLAN2
qu
vlan 3
description PC-Business-VLAN3
qu
vlan 100
description Management-VLAN
quit
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan 2 3 100
mode lacp-static
qu
interface GigabitEthernet 0/0/1
eth-trunk 1
qu
interface GigabitEthernet 0/0/2
eth-trunk 1
quit
# 连接LSW3的Trunk端口
interface GigabitEthernet 0/0/1
description To-LSW3
port link-type trunk
port trunk allow-pass vlan 2 3 100
port trunk pvid vlan 2
undo negotiation auto
speed 1000
duplex full
undo shutdown
quit
interface GigabitEthernet 0/0/3
description To-AR1
port link-type access
port default vlan 100
qu
interface Vlanif 2
ip address 172.16.2.2 255.255.255.0
vrrp vrid 1 virtual-ip 172.16.2.1
stp instance 1 root primary
stp instance 2 root secondary
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan 2 3 100
sw3
interface GigabitEthernet0/0/1
stp edged-port enable
stp bpdu-protection
interface GigabitEthernet0/0/3
port trunk pvid vlan 2
AR1
ip pool vlan2
gateway-list 172.16.2.1
network 172.16.2.0 mask 255.255.255.0
excluded-ip-address 172.16.2.1 172.16.2.10
dns-list 8.8.8.8
SW2
sys
sysname SW2
vlan batch 2 3 100
vlan 2
description PC-Business-VLAN2
qu
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan 2 3 100
mode lacp-static
quit
interface GigabitEthernet 0/0/1
eth-trunk 1
quit
int gt 0/0/2
eth-trunk 1
qu
int g0/0/4
description To-SW4
port link-type trunk
port trunk allow-pass vlan 2 3 100
port trunk pvid vlan 2
qu
interface Vlanif 2
ip address 172.16.2.3 255.255.255.0
vrrp vrid 1 virtual-ip 172.16.2.1
qu
interface Vlanif 3
ip address 172.16.3.3 255.255.255.0
vrrp vrid 2 virtual-ip 172.16.3.1
vrrp vrid 2 priority 120
vrrp vrid 2 preempt-mode timer delay 5
vrrp vrid 2 track interface GigabitEthernet 0/0/5 reduced 30
quit
stp region-configuration
region-name come
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
qu
stp instance 2 root primary
stp instance 1 root secondary
dhcp enable
SW4
sys
sysname SW4
vlan batch 2 3 100
interface GigabitEthernet 0/0/1
description PC3-VLAN2
port link-type access
port default vlan 2
stp edged-port enable
qu
interface GigabitEthernet 0/0/3
description To-SW1
port link-type trunk
port trunk allow-pass vlan 2 3 100
port trunk pvid vlan 2
undo shutdown
qu
PC1-PC4




SW1-SW4



















PCping测试






