h3c vlan配置

发布时间:2019-07-24 09:53:46编辑:auto阅读(1184)

    1、基于端口的VLAN配置命令

    [SWA]vlan 10 #创建VLAN

    [SWA-vlan10]port Ethernet1/0/1 #向当前VLAN添加端口

    [SWA]vlan 20 #创建VLAN

    [SWA-vlan20]port Ethernet1/0/2 #向当前VLAN添加端口

    [SWA]interface Ethernet1/0/24 #进入端口

    [SWA-Ethernet1/0/24]port link-type trunk #配置端口的链路类型为Trunk类型

    [SWA-Ethernet1/0/24]port trunk permit vlan 10 20 #允许指定的VLAN通过当前Trunk端口

    2、基于协议的VLAN配置命令
    [SWA]vlan 10 #创建VLAN

    [SWA-vlan10]protocol-vlan ipv4 #指定协议模板

    [SWA]interface Ethernet 1/0/1 #进入端口

    配置Hybrid端口与基于协议的VLAN关联
    [SWA-Ethernet1/0/1]port link-type hybrid
    [SWA-Ethernet1/0/1]port hybrid vlan 10 20 untagged
    [SWA-Ethernet1/0/1]port hybrid protocol-vlan vlan 10 0

    3、基于IP子网的VLAN配置命令
    [SWA]vlan 10 #创建VLAN

    [SWA-vlan10]ip-subnet-vlan ip 10.10.10.0 255.255.255.0 #配置当前VLAN与指定的IP子网关联

    [SWA]interface Ethernet 1/0/1
    [SWA-Ethernet1/0/1]port link-type hybrid
    [SWA-Ethernet1/0/1]port hybrid vlan 10 20 untagged
    [SWA-Ethernet1/0/1]port hybrid ip-subnet-vlan vlan 10 #配置当前端口与基于IP子网的VLAN关联

    4、配置MVRP

    [SWA]vlan 10

    [SWA]mvrp global enable 开启全局MVRP功能
    [SWA]interface Ethernet 1/0/24
    [SWA-Ethernet1/0/24]port link-type trunk
    [SWA-Ethernet1/0/24]port trunk permit vlan all

    [SWA-Ethernet1/0/24]mvrp enable 开启端口的MVRP功能

    [SWA-Ethernet1/0/24]mvrp registration fixed 配置MVRP注册模式

    **配置Periodic定时器、Join定时器、Leave定时器和Leaveall定时器
    [Switch-Ethernet1/0/1] mrp timer {periodic | join | leave | leaveall} timer-value

关键字