思科配置VLAN

SW(config)#vlan 10

SW(config-vlan)#name xxx

SW(config)#vlan 99

SW(config-vlan)#name yyy

SW(config)#interface g0/1

SW(config-if)#switchport mode trunk

SW(config-if)#switchport trunk allowed vlan all (默认所有vlan通过,可以限制、放行相关vlan)

SW(config-if)#switchpor trunk native vlan 99 (有需要可以配置本征vlan,类似于华为的PVID)

SW(config)#interfaceerface g0/2

SW(config-if)#switchport mode access

SW(config-if)#switchport access vlan 10


常用VLAN show命令

show vlan brief


华为配置VLAN

[SW-HUAWEI]vlan 10

[SW-HUAWEI-vlan10]name xxx

[SW-HUAWEI]vlan 20

[SW-HUAWEI-vlan20]name yyy

[SW-HUAWEI]vlan 99

[SW-HUAWEI-vlan99]name zzz

[SW-HUAWEI]interface g0/0/1

[SW-HUAWEI-GigabitEthernet0/0/2]port link-type trunk

[SW-HUAWEI-GigabitEthernet0/0/2]port trunk allow-pass vlan all(手动敲入,也可以限制、放行相关vlan)

[SW-HUAWEI-GigabitEthernet0/0/2]port trunk pvid vlan 99(有需要可以配置PVID,类似于思科的本征vlan)

[SW-HUAWEI]interface g0/0/2       

[SW-HUAWEI-GigabitEthernet0/0/1]port link-type access

[SW-HUAWEI-GigabitEthernet0/0/1]port default vlan 10

特殊hybird

[SW]interface G0/0/3   

[SW-Gthernet0/0/3]port link-type hybrid

[SW-Gthernet0/0/3]port hybrid pvid vlan 10 (将G0/0/3接口以hybrid端口加入到vlan10)

[SW-Gthernet0/0/3]port hybrid untagged(tagged) vlan 30


常用VLAN show命令

display vlan brief

display vlan summary 

display port vlan


华三配置VLAN

[SW-H3C]vlan 10

[SW-H3C-vlan10]name xxx

[SW-H3C]vlan 20

[SW-H3C-vlan20]name yyy

[SW-H3C]vlan 99

[SW-H3C-vlan99]name zzz

[SW-H3C]interface g1/0/1

[SW-H3C-GigabitEthernet1/0/1]port link-type-type trunk

[SW-H3C-GigabitEthernet1/0/1]port trunk permit vlan all (手动敲入,也可以限制、放行相关vlan)

[SW-H3C-GigabitEthernet1/0/1]port trunk pvid vlan 99 (有需要可以配置PVID,类似于思科的本征vlan)

[SW-H3C-GigabitEthernet1/0/1]interface g1/0/2

[SW-H3C-GigabitEthernet1/0/2]port link-type-type access

[SW-H3C-GigabitEthernet1/0/2]port access vlan 10

特殊hybird

[SW]interface g1/0/3

[SW-GigabitEthernet1/0/3]port link-type hybrid

[SW-GigabitEthernet1/0/3]port hybrid pvid vlan 10 (将G0/0/3接口以hybrid端口加入到vlan10)

[SW-GigabitEthernet1/0/3]port hybrid vlan 30 untagged(tagged)



常用VLAN show命令

display vlan brief

display vlan all


发表评论 已发布 0

还可以输入 800 个字
 
 
评论 打印