Tóm tắt nhanh private vlan

Private vlan chắc giờ ít chỗ nào dùng, nhưng vẫn có trong chương trình chính thống.
Mục đích là chặn các host cùng vlan thông nhau, như giờ thì dùng VACL, hoặc chia các server vào các vlan khác nhau rồi để gateway trên firewall là tự nó chặn.


Dưới đây mình tóm tắt Private vlan:
Triển khai private vlan sẽ có 2 loại: 
1- primary vlan
2-secondary vlan: lại chia ra làm 2 loại con là isolated vlan và community vlan

- Các máy trong cùng isolated vlan sẽ không thông đi đâu được, kể cả cùng vlan , ngoại trừ nó thông sang primary vlan
 (ví dụ cho cổng nối lên router vào primary vlan để server isolated có thể thông lên router được)
- Các máy trong community vlan sẽ thông được nhau và cũng thông lên được router (primary vlan)

Cổng thuộc primary vlan thì là promiscuous mode, còn cổng thuộc 2 loại vlan kia là host mode.
 

Ví dụ cấu hình:

! Bật chế độ VLAN và tạo VLAN
vlan 10
 name PRIMARY_VLAN
!
vlan 20
 name ISOLATED_VLAN
 private-vlan isolated
!
vlan 30
 name COMMUNITY_VLAN
 private-vlan community
!

! Gắn VLAN phụ (isolated và community) vào Primary VLAN
vlan 10
 private-vlan primary
 private-vlan association 20,30
!

! Cấu hình các cổng (ports) trên switch
! Cổng kết nối với router (Primary VLAN)
interface GigabitEthernet0/1
 switchport mode private-vlan trunk promiscuous
 switchport private-vlan mapping 10 20,30
!

! Cổng kết nối với isolate1 (Isolated VLAN)
interface GigabitEthernet0/2
 switchport mode private-vlan host
 switchport private-vlan host-association 10 20
!

! Cổng kết nối với isolate2 (Isolated VLAN)
interface GigabitEthernet0/3
 switchport mode private-vlan host
 switchport private-vlan host-association 10 20
!

! Cổng kết nối với community1 (Community VLAN)
interface GigabitEthernet0/4
 switchport mode private-vlan host
 switchport private-vlan host-association 10 30
!

! Cổng kết nối với community2 (Community VLAN)
interface GigabitEthernet0/5
 switchport mode private-vlan host
 switchport private-vlan host-association 10 30
!

==========Lệnh show==============
show interfaces GigabitEthernet0/1 switchport

show vlan private-vlan
Primary Secondary Type              Ports
------- --------- ----------------- --------------------------
10      20         isolated          Gi0/2, Gi0/3
10      30         community    Gi0/4, Gi0/5
10                   primary           Gi0/1


Dưới đây là clip demo

Bài viết cùng danh mục