系统集成论坛

标题: 配置基于MAC 地址的VLAN 划分示例 [打印本页]

作者: 胡振宇    时间: 2015-11-23 13:44
标题: 配置基于MAC 地址的VLAN 划分示例
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 100 200 //创建VLAN 100和VLAN 200
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type trunk //交换机之间相连接口类型建议使用trunk,接口
默认类型不是trunk,需要手动配置为trunk
[SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 200 //接口GE1/0/2加入VLAN 100和
VLAN 200
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] vlan 100
[SwitchA-vlan100] mac-vlan mac-address 0001-00ef-00c0 //MAC地址为0001-00ef-00c0的报文在VLAN
100内转发
[SwitchA-vlan100] quit
S7700&S9700 系列交换机
典型配置举例3 基础特性典型配置
文档版本 04 (2015-10-23) 华为专有和保密信息
版权所有 &copy; 华为技术有限公司
200
[SwitchA] vlan 200
[SwitchA-vlan200] mac-vlan mac-address 0001-00ef-00c1 //MAC地址为0001-00ef-00c1的报文在VLAN
200内转发
[SwitchA-vlan200] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type hybrid //基于MAC划分VLAN只能应用在类型为hybrid的
接口,V200R005C00及之后版本,默认接口类型不是hybrid,需要手动配置
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 100 200 //对VLAN为100、200的报文,剥
掉VLAN Tag
[SwitchA-GigabitEthernet1/0/1] mac-vlan enable //使能接口的MAC-VLAN功能
[SwitchA-GigabitEthernet1/0/1] quit
步骤2 配置Switch。接口GE1/0/2、GE1/0/3和GE1/0/4的配置与GE1/0/1相同,不再赘述
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 100 200
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] port link-type trunk
[Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 200 //将接口GE1/0/1加入VLAN 100和
VLAN 200
[Switch-GigabitEt




欢迎光临 系统集成论坛 (http://bbs.xtjc.com/) Powered by Discuz! X3.1