사설 vlan
동일한 VLAN 내의 포트간에 상호 데이터 통신을 제어하는 기능이다. . 같은 VLAN을 사용하고서도 서로 다른 VLAN을 사용하는 것처럼 서로간의 트래픽을 제어할 수 있기 때문에 불필요한 서브넷 낭비를 줄일 수 있다.(VLAN한계:1-4096)
Primary Vlan ⇒ 주 VLAN
프로미스큐어스 포트 → 부 VLAN에 접속된 장비와 외부간의 통신
Secondary Vlan⇒ 부 VLAN
독립포트(isolated)→ 독립 포트간 통신 불가 커뮤니티 포트(community) → 동일 커뮤니티 포트간 통신 가능
<L2-1>
vtp mode transparent
interface GigabitEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
switchport private-vlan host-association 100 201
switchport mode private-vlan host
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
switchport private-vlan host-association 100 202
switchport mode private-vlan host
media-type rj45
negotiation auto
vlan 100
private-vlan primary
private-vlan association 201-202
!
vlan 201
name V201
private-vlan isolated
!
vlan 202
name V202
private-vlan community
<L2-2>
vtp mode transpar
interface GigabitEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
switchport private-vlan host-association 100 202
switchport mode private-vlan host
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
switchport mode private-vlan host
switchport private-vlan host-association 100 201
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
switchport private-vlan mapping 100 201-202
**switchport mode private-vlan promiscuous**
media-type rj45
negotiation auto
vlan 100
name V100
private-vlan primary
private-vlan association 201-202
!
vlan 201
name v201
private-vlan isolated
!
vlan 202
private-vlan community
L2-1과 L2-2 primary vlan 100을 설정해 줄때, mapping 해줄때 201-203으로 적는다면 vlan 201-203 을 모두 만들어 주어야 한다.
=⇒ trunk모드로 했을 경우 vlan의 태그가 달려서 나가게 되는데, 각각의 스위치에 vlan을 적어주면 문제없이 지나갈 수 있다.