4 PVLAN的配置步骤 (1)Put switch in VTP transparent mode set vtp mode transparent (2) Create the primary private VLAN set vlan vlan pvlan-type primary (3)Set the isolated or community VLAN(s) set vlan vlan pvlan-type {isolated community} (4)Map the secondary VLAN(s) to the primary VLAN set pvlan primary_vlan {isolated_vlan community_ vlan} {mod/port sc0} (5)Map each secondary VLAN to the primary VLAN on the promiscuous port(s) set pvlan mapping primary_vlan {isolated_vlan community_vlan} {mod/port} [mod/port …] (6)Show PVLAN configuration show pvlan [primary_vlan] show pvlan mapping show vlan [primary_vlan] show port
5 例子 下面给出一个正在网络中运行的交换机的PVLAN的相关配置,仅供参考。其中,VLAN 100是Primary VLAN,VLAN 101是Isolated VLAN,VLAN 102和VLAN 103是Community VLAN。 N8-CssW-2> (enable) show running-config This command shows non-default configurations only. set system name N8-CSSW-2 #vtp set vtp domain sdunicom set vtp mode transparent
set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 100 name VLAN0100 type ethernet pvlantype primary mtu 1500 said 100100 state active set vlan 101 name VLAN0101 type ethernet pvlantype isolated mtu 1500 said 100101 state active set vlan 102 name VLAN0102 type ethernet pvlantype community mtu 1500 said 100102 state active set vlan 103 name VLAN0103 type ethernet pvlantype community mtu 1500 said 100103 state active #module 2 : 50-port 10/100/1000 Ethernet set pvlan 100 101 2/26-29,2/35-36,2/42-43 set pvlan mapping 100 101 2/49 set pvlan 100 102 2/1-13,2/30-34 set pvlan mapping 100 102 2/49 set pvlan 100 103 2/14-25 set pvlan mapping 100 103 2/49 end N8-CSSW-2> (enable) show pvlan Primary Secondary Secondary-Type Ports ------- --------- ---------------- 100 101 isolated 2/26-29,2/35-36,2/42-43 100 102 community 2/1-13,2/30-34 100 103 community 2/14-25