whycx2013 发表于 2013-12-29 11:02:59

pVLAN的配置

pVLAN(Private VLAN,私用VLAN)是能够为相同VLAN内不同端口之间提供隔离的VLAN。通过隔离相同VLAN之中的网络设备之间的流量,Cisco所提出的pVLAH能够提高路由器端口,备分交换机配置为VTP透明模式.
http://cisco.chinaitlab.com/UploadFiles_6776/201312/2013120811264012.jpg  步骤1:在开始配置PVLAN之前,首先将交换机VTP模式为透明模式.
  AS1(config-vlan)#vtp mode transparent
  步骤2:在交换机AS1,创建主Pvlan 100,团体Pvlan 101 和隔离Pvlan 102。此外,建立辅助Pvlan和主pvlan 的关联.
  AS1(config-vlan)#vlan 100
  AS1(config-vlan)#private-vlan primary //将VLAN100配置为主pVLAN
  AS1(config-vlan)#private-vlan association 101-102 //建立辅助pVLAN与主pVLAN的关联
  AS1(config-vlan)#vlan 101
  AS1(config-vlan)#private-vlan community //将VLAN101配置为团体pVLAN
  AS1(config-vlan)#vlan 102
  AS1(config-vlan)#private-vlan isolated //将VLAN102配置为隔离pVLAN
  步骤3:将VLAN100配置为主PVLAN,并且将其映射到辅助PVLAN101 和102.
  AS1(config)#interface vlan 100
  AS1(config-if)#no shut
  AS1(config-if)#private-vlan mapping 101,102 //将辅助pVLAN映射到第3层VLAN接口以实现路由功能
  步骤4:在交换机AS1上,将主机A的接口配置为Pvlan 101的成员,将主机B的接口配置为Pvlan 102的成员.
  AS1(config)#interface fastEtherne t 2/3
  AS1(config-if)#description Host_A
  AS1(config-if)#swithport
  AS1(config-if)#swithport mode private-vlan host //将端口配置为主机端口
  AS1(config-if)#swithport private-vlan host-association 100 101 //建立第2层接口与pVLAN的关联
  AS1(config-if)#no shutdown
  AS1(config-if)#interface fastethernet 2/4
  AS1(config-if)#description Host_B
  AS1(config-if)#swithport
  AS1(config-if)#swithport mode private-vlan host //将端口配置为主机端口
  AS1(config-if)#swithport private-vlan host-association 100 102 //建立第2层接口与pVLAN的关联
  AS1(config-if)#no shutdown
  步骤5:验证私用VLAN配置,并且确认主机A不能成功ping通主机B
页: [1]
查看完整版本: pVLAN的配置