PVLAN技术:
  现在有了一种新的VLAN机制,所有服务器在同一个子网中,但服务器只能与自己的默认网关通信。这一新的VLAN特性就是专用VLAN(Private VLAN)。在Private VLAN的概念中,交换机端口有三种类型:Isolated port,Community port, Promisc-uous port;它们分别对应不同的VLAN类型:Isolated port属于Isolated PVLAN,Community port属于Community PVLAN,而代表一个Private VLAN整体的是Primary VLAN,前面两类VLAN需要和它绑定在一起,同时它还包括Promiscuous port。在Isolated PVLAN中,Isolated port只能和Promiscuous port通信,彼此不能交换流量;在Community PVLAN中,Community port不仅可以和Promiscuous port通信,而且彼此也可以交换流量。Promiscuous port 与路由器或第3层交换机接口相连,它收到的流量可以发往Isolated port和Community port。PVLAN的应用对于保证接入网络的数据通信的安全性是非常有效的,用户只需与自己的默认网关连接,一个PVLAN不需要多个VLAN和IP子网就提供了具备第2层数据通信安全性的连接,所有的用户都接入PVLAN,从而实现了所有用户与默认网关的连接,而与PVLAN内的其他用户没有任何访问。PVLAN功能可以保证同一个VLAN中的各个端口相互之间不能通信,但可以穿过Trunk端口。这样即使同一VLAN中的用户,相互之间也不会受到广播的影响。
  
  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
   例子:
  下面给出一个正在网络中运行的交换机的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