P-VLAN 应用

拓扑:

image

需求:

创建vlan 45,335,401

DNS主备可以通信并属于VLAN335,WWW服务器不能与FTP服务器互通并属于VLAN401,

 

配置:

vtp domain CCIE
vtp mode transparent
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
vlan 45

  private-vlan primary
  private-vlan association 335,401
!
vlan 335

  private-vlan community

!

vlan 401

  private-vlan isolated

!
interface Ethernet0/1
switchport
switchport private-vlan mapping 45 335,401
switchport mode private-vlan promiscuous
duplex auto
spanning-tree portfast edge
!
interface Ethernet0/2
switchport
switchport private-vlan host-association 45 335
switchport mode private-vlan host
duplex auto
spanning-tree portfast edge
!
interface Ethernet0/3
switchport
switchport private-vlan host-association 45 335
switchport mode private-vlan host
duplex auto
spanning-tree portfast edge
!
interface Ethernet1/1
switchport
switchport private-vlan host-association 45 401
switchport mode private-vlan host
duplex auto
spanning-tree portfast edge
!
interface Ethernet1/2
switchport
switchport private-vlan host-association 45 401
switchport mode private-vlan host
duplex auto
spanning-tree portfast edge

 

查看命令:

show vlan private-vlan

show int x/x switchport

本文出自 “forest” 博客,转载请与作者联系!

你可能感兴趣的:(安全)