level 1
1.基础配置
根据拓扑图完成设备VLAN划分及IP地址配置,IP地址自行规划。
CORE1
vlan batch 10 20 11 21 100
int LoopBack 0
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 100
interface Vlanif 100
ip address 12.1.1.1 255.255.255.0
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface Vlanif 10
ip address 192.168.10.251 255.255.255.0
interface Vlanif 20
ip address 192.168.20.251 255.255.255.0
CORE2
vlan batch 10 20 11 21 200
interface LoopBack 0
ip address 2.2.2.2 255.255.255.255
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 200
interface Vlanif 200
ip address 12.2.2.1 255.255.255.0
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface Vlanif 10
ip address 192.168.10.252 255.255.255.0
interface Vlanif 20
ip address 192.168.20.252 255.255.255.0
2026年06月21日 08点06分
3
level 1
ACC1
vlan batch 10 11 20 21
interface E 0/0/1
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface E 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface Ethernet 0/0/3
port link-type access
port default vlan 10
ACC2
vlan batch 10 11 20 21
interface E 0/0/1
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface E 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 11 20 21
interface Ethernet 0/0/3
port link-type access
port default vlan 20
interface Ethernet 0/0/4
port link-type access
port default vlan 20
AR1
interface LoopBack 0
ip address 3.3.3.3 255.255.255.255
interface GigabitEthernet 0/0/1
ip address 12.1.1.2 255.255.255.0
interface GigabitEthernet 0/0/2
ip address 12.2.2.2 255.255.255.0
interface GigabitEthernet 0/0/0
ip address 203.0.0.1 255.255.255.0
2026年06月21日 08点06分
4
level 1
ISP_R
interface GigabitEthernet 0/0/0
ip address 203.0.0.2 255.255.255.0
ip route-static 192.168.10.0 255.255.255.0 203.0.0.1
ip route-static 192.168.20.0 255.255.255.0 203.0.0.1
interface LoopBack 1
ip address 114.114.114.114 255.255.255.255
2.链路聚合配置
在CORE1和CORE2之间部署链路聚合Eth-Trunk 1。要求使用LACP模式,最大活动端口数为4,根据拓扑图将相应端口加入聚合组,通过display eth-trunk 1查看聚合状。
CORE1/CORE2
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan all
mode lacp-static
max active-linknumber 4
interface GigabitEthernet 0/0/8
eth-trunk 1
interface GigabitEthernet 0/0/9
eth-trunk 1
2026年06月21日 08点06分
5
level 1
CORE2
dhcp enable
ip pool pool_vlan10
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.254
dns-list 114.114.114.114
lease 3
ip pool pool_vlan20
network 192.168.20.0 mask 255.255.255.0
gateway-list 192.168.20.254
dns-list 114.114.114.114
lease 3
interface Vlanif 10
dhcp select global
interface Vlanif 20
dhcp select global
display ip pool查看地址池配置并截图
4.MSTP+VRRP配置
(1)在CORE1、CORE2、ACC1、ACC2上配置MSTP域配置,域名姓名缩写,实例10绑定VLAN 10 11,实例20绑定VLAN 20 21。指定CORE1为实例10的根桥,CORE2为实例20的根桥。查看STP端口状态并截图。display stp brief
CORE1
stp mode mstp
stp region-configuration
region-name shn
instance 10 vlan 10 11
instance 20 vlan 20 21
active region-configuration
stp instance 10 root primary
stp instance 20 root secondary
2026年06月21日 08点06分
6
level 1
CORE2
stp mode mstp
stp region-configuration
region-name shn
instance 10 vlan 10 11
instance 20 vlan 20 21
active region-configuration
stp instance 20 root primary
stp instance 10 root secondary
ACC1/ACC2
stp mode mstp
stp region-configuration
region-name shn
instance 10 vlan 10 11
instance 20 vlan 20 21
active r
查看STP端口状态并截图。display stp brief
2026年06月21日 08点06分
7
level 1
(2)在CORE1、CORE2上配置VRRP,虚拟IP为各VLAN网关地址。CORE1为VLAN 10的Master,CORE2为VLAN 20的Master,查看主备关系并截图。)display vrrp brief
CORE1
interface Vlanif 10
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 120
interface Vlanif 20
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 100
CORE2
interface Vlanif 10
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 100
interface Vlanif 20
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 120
2个都写完后查看主备关系并截图display vrrp brief
5.OSPF路由协议配置
(1) 在CORE1、CORE2、AR1之间配置OSPF进程1,area 0,实现企业内网路由互通。
通过AR1向OSPF下发默认路由指向ISP。要求使用network命令精确宣告互联接口地址,Loopback0接口也宣告入OSPF。
(2)查看邻居状态、查看路由表并截图。display ospf peer brief display ip routing-table
CORE1
ospf 1 router-id 1.1.1.1
area 0
network 1.1.1.1 0.0.0.0
network 12.1.1.1 0.0.0.0
network 192.168.10.251 0.0.0.0
network 192.168.20.251 0.0.0.0
default-route-advertise
CORE2
ospf 1 router-id 2.2.2.2
area 0
network 2.2.2.2 0.0.0.0
network 12.2.2.1 0.0.0.0
network 192.168.10.252 0.0.0.0
network 192.168.20.252 0.0.0.0
default-route-advertise
AR1
ospf 1 router-id 3.3.3.3
area 0
network 3.3.3.3 0.0.0.0
network 12.1.1.2 0.0.0.0
network 12.2.2.2 0.0.0.0
ip route-static 0.0.0.0 0 203.0.0.2
ospf 1
default-route-advertise always
q
输入并截图在AR1中
display ospf peer brief
display ip routing-table
2026年06月21日 08点06分
8