前言:
眼前你们对“交换网络的种类”大体比较看重,小伙伴们都想要剖析一些“交换网络的种类”的相关内容。那么小编也在网上汇集了一些有关“交换网络的种类””的相关内容,希望兄弟们能喜欢,看官们快快来学习一下吧!某企业网,想要管控内网流量,想要实现业务部的vlan2 to 4走Trunk1口,其他管理部门的数据vlan192 走19口,实现降低带宽压力,分流。
拓扑示意如图: PC1 PC2 模拟业务部门设备,IP 10.2.2.200/24 10.2.3.200/24
PC3 PC4模拟管理部门 IP 192.168.1.200/24 192.168.1.100/24
网关配置在核心交换机LSW1
解决方法:利用MSTP多实例解决需求。
核心交换机SW1配置
SW1
vlan batch 2 to 4 192
stp instance 10 root primary
stp instance 20 root primary
//手工配置核心为实例10、20根桥
stp region-configuration
region-name HUAWEI
revision-level 12
instance 10 vlan 192
instance 20 vlan 2 to 4
active region-configuration
//region-name revision-level 唯一确定一个MSTP域,同一个域内VLAN实例映射必须一致
interface Vlanif2
ip address 10.2.2.254 255.255.255.0
interface Vlanif3
ip address 10.2.3.254 255.255.255.0
interface Vlanif192
ip address 192.168.1.254 255.255.255.0
interface Eth-Trunk12
port link-type trunk
port trunk allow-pass vlan 2 to 4
interface GigabitEthernet0/0/1
eth-trunk 12
#
interface GigabitEthernet0/0/2
eth-trunk 12
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 192
interface GigabitEthernet0/0/19
port link-type trunk
port trunk allow-pass vlan 192
接入交换机SW2配置
vlan batch 2 to 4 192
stp instance 10 root secondary
stp instance 20 root secondary
stp region-configuration
region-name HUAWEI
revision-level 12
instance 10 vlan 192
instance 20 vlan 2 to 4
active region-configuration
interface Eth-Trunk12
port link-type trunk
port trunk allow-pass vlan 2 to 4
interface GigabitEthernet0/0/1
eth-trunk 12
interface GigabitEthernet0/0/2
eth-trunk 12
interface GigabitEthernet0/0/3
port link-type access
port default vlan 2
interface GigabitEthernet0/0/4
port link-type access
port default vlan 3
interface GigabitEthernet0/0/5
port link-type access
port default vlan 192
interface GigabitEthernet0/0/19
port link-type trunk
port trunk allow-pass vlan 192
配置完成后检查端口状态
设备互通正常,流量按要求走指定端口转发。