Tổng quan về VLAN (VLAN Overview)

3rd floor

• Segmentation

2nd floor

• Flexibility

1st floor

• Security

SALES

HR

ENG

A VLAN = A broadcast domain = Logical network (subnet)

Tổng quan về VLAN (VLAN Overview)

Nội Dung

 Khái niệm về VLAN

Khái niệm về Trunking

 VLAN Trunking Protocol (VTP)

Cấu hình switch for trunking

Thay đổi kết nối VLAN

 Thay đổi spanning­tree

Tổng quan về VLAN (VLAN Overview)

t b m ng ế ị ạ

i h n v đ a lý Là m t nhóm các thi ộ không b gi ị ớ ạ ề ị

M i công vi c c u hình Vlan đ u ệ ấ ọ c th c hi n b ng ph n m m đ ệ ằ ượ ự ề ầ

M i Vlan là m t mi n qu ng bá ộ ề ả ỗ

Có kh năng m r ng và b o m t ậ ở ộ ả ả

Hoạt Động của VLAN (VLAN Operations)

Switch A

Red VLAN

Black VLAN

Green VLAN

• Each logical VLAN is like a separate physical bridge

Hoạt Động của VLAN (VLAN Operations)

Switch A

Switch B

Red VLAN

Black VLAN

Green VLAN

Red VLAN

Black VLAN

Green VLAN

• Each logical VLAN is like a separate physical bridge • VLANs can span across multiple switches

Hoạt Động của VLAN (VLAN Operations)

Switch A

Switch B

Trunk

Fast Ethernet

Red VLAN

Black VLAN

Green VLAN

Red VLAN

Black VLAN

Green VLAN

• Each logical VLAN is like a separate physical bridge • VLANs can span across multiple switches • Trunks carries traffic for multiple VLANs

Các loại Vlan

Static VLAN

Dynamic VLAN

Trunk

Port e0/4

Port e0/9

VLAN5

VLAN10

VMPS 1111.1111.1111 = vlan 10

MAC = 1111.1111.1111

VMPS=Vlan Management plicy sever

Hoạt động của đường Trunk

Hoạt động của đường Trunk

Hoạt động của đường Trunk

Hoạt động của đường Trunk

ISL Tagging

ISL trunks enable VLANs across a backbone

 Performed with ASIC

(Application specific integrated  circuits)

 Not intrusive to client stations,  client does not see the ISL  header

VLAN Tag added by incoming port

Inter-Switch Link carries VLAN identifier

 Effective between switches,

routers and switches, switches  and servers with ISL network  interface cards

VLAN Tag stripped by forwarding port

ISL Tagging

ISL Encapsulation

Encapsulated Ethernet frame

CRCCRC 4 bytes 4 bytes

ISL Header ISL Header 26 bytes 26 bytes

 Frames encapsulated with ISL header and CRC

 Support for many VLANs (1024)

Giao thức Vlan trunking (VTP)

VTP Domain

3.Sync to the latest vlan information

2

1.“new vlan added”

Giao thức Vlan trunking (VTP)

ề ả ấ ấ ộ ố

Duy trì c u hình Vlan th ng nh t trong m t mi n qu n tr ị

ộ ệ ử ụ ứ

 VTP là m t giao th c thông đi p s d ng gói trunk l p 2 đ qu n lý s thêm xoá và đ t tên các Vlan trong ớ ự ể ả m t mi n nh t đ nh ấ ị ề ộ

H tr trunks trên môi tr ng m ng h n h p ỗ ợ ườ ạ ợ ỗ

t c các ậ ề ự t ổ ừ ấ ả

T p trung các thông tin v s thay đ i t Switch trong m ngạ

Các ch đ ho t đ ng c a VTP

ạ ộ

ế ộ

Server

•Create vlans •Modify vlans •Delete vlans •Sends/forwards •advertisements •Synchronize •Saved in NVRAM

• Sends/forwards advertisements

• Synchronize • Not saved in

Transparent

Client

NVRAM

•Forwards advertisements •Does not synchronize •Saved in NVRAM

Ho t đ ng c a VTP

ạ ộ

VTP advertisement đ c g i ra nh là multicast frames ượ ử ư

VTP servers và clients đ ng b hoá ch s thay đ i c u ổ ấ ỉ ố ồ ộ

hình theo ch ỉ s m i ố ớ

C sau 5 phút ho c khi có thay đ i c u hình thì VTP ứ

ổ ấ i các switch advertisement đ ặ c g i t ượ ử ớ

Ho t đ ng c a VTP

ạ ộ

1.Add new VLAN 2.Rev 3 --> Rev 4

Server

3

3

4.Rev 3 --> Rev 4 5.Sync new vlan info

4.Rev 3 --> Rev 4 5.Sync new vlan info

Client

Client

VTP Pruning

Tăng băng thông bằng cách giảm và cắt bỏ  những tải không  cần thiết

Example: Station A gửi broadcast, broadcast  chỉ  được chuyển đến các port được gán cho red VLAN

VTP Pruning

Port 2

B

Switch 4

Flooded traffic is pruned

Switch 2

Red VLAN

Switch 5

Port 1

A

Switch 6

Switch 3

Switch 1

Cấu Hình VLAN

Cấu Hình Vlan trên Catalyst  1900  và 2950

External Configuration Sources

Telnet

Interfaces

Virtual terminal

Console port

TFTP

Auxiliary port

PC or Unix server

• Configurations can come

from many sources

Web or Network Management server

• Configurations will act in

device memory

Rcs-Sud-Est

K t n i vào c ng qu n lý trên router

ế ố

K t n i vào c ng qu n lý trên router

ế ố

1900 switch

>en Switch#config t Switch(config)#hostname 1900 1900(config)#vlan 2 name khoatoan 1900(config)#vlan 3 name khoaly 1900(config)#exit

2950 Switch

Switch>en Switch#config t Switch(config)#hostname 2950 2950#vlan database 2950(vlan)#vlan 2 2950(vlan)#name khoatoan 2950(vlan)#vlan 3  2950(vlan)#name khoaLy 2950(vna)#exit

Xem thông tin cấu hình Vlan

1900#sh vlan 1900#sh vlan brief

Switch_2# show vlan  Status  VLAN   Name  active    default  1

Ports  e0/1 e0/2, e0/3, e0/4, e0/5, … e0/10, e0/11, e0/12

active

active

2 3 4 5 khoatoan Khoaly vlan0004 vlan0005 active active

Cấu hình vlan cố định đối với switch 1900

1900(config)#int e0/2 1900(config­if)#vlan­membership static 2 1900(config)#int e0/3 1900(config­if)#vlan­membership static 2 1900(config)#int e0/4 1900(config­if)#vlan­membership static 3

Cấu hình vlan cố định đối với switch 2950

2950(config)#int port 2950(config-if)#switchport acess vlan vlan-id Ví dụ

2950(config)#int e0/2 2950(config­if)#switchport acess vlan 2 2950(config)#int e0/3 2950(config­if)#switchport acess vlan 2 2950(config)#int e0/4 2950(config­if)#switchport acess vlan 3

Xem thông tin cấu hình Vlan

1900#sh vlan 1900#sh vlan brief

Switch_2# show vlan  Status  VLAN   Name  active    default  1

active

active Ports  e0/1, e0/5, …e0/10, e0/11,  Fa0/12  e0/2, e0/3 e0/4

2 3 4 5 khaotoan Khoaly vlan0004 vlan0005 active active

C u hình c ng trunk trên switch 1900 và ấ 2950

1900(config)#int f0/10 1900(config­if)#trunk on

2950(config)#int f0/10 2950(config­if)#switchport mode trunk

Interface fa0/1.1 Encapsulation dot1q 1 Ip address 192.168.1.65 255.255.255.192

Interfact fa0/1.2 Encapsulation dot1q 2 Ip address 192.168.1.129 255.255.255.224

Port1    dot1q Trunk Port 2, 3 Vlan1, Port 4 Vlan2

Khai báo ki u đóng gói trên trunk port

ỉ ỗ ợ ể

ặ ị gói ISL, và 2950 ch h ch 802.1q (dot1q)

M c đ nh thì catalyst 1900 ch h ch ki u đóng ỉ ỗ ợ Catalyst 3550 h ch c hai vì th b n có th s ể ử

ỗ ợ ả

ế ạ

d ng ki u đóng gói thích h p

switch(config-if)# switchport encapsulation dot1q Ho cặ switch(config-if)# switchport encapsulation isl

C u hình ki u đóng gói trên các c ng logic ấ c a router ủ

2600# config t 2600(config)# int f0/0.1 2600(config-subif)# encapsulation dot1q vlan-number Ho cặ 2600(config-subif)# encapsulation isl vlan-number

Ví dụ

2950#vlan database 2950(vlan)#vlan 2 2950(vlan)#exit

2950#config t 2950(config)#int fa0/1 2950(config­if)#switchport mode trunk 2950(config­if)#

Ví dụ

2950#config t 2950(config)#int fa0/2 2950(config­if)#switchport acess vlan 1

2950#config t 2950(config)#int fa0/3 2950(config­if)#switchport acess vlan 2

2950#config t 2950(config)#int vlan 1 2950(config-if)# ip address 172.16.10.2 255.255.255.128

Ví dụ

Router#config t Router(config)# int f0/0 Router(config-if)#no ip address Router(config-if)#no shutdown Router(config-if)# int f0/0.1 Router(config-subif)# encapsulation dot1q 1 Router(config-subif)# ip address 172.16.10.1 255.255.255.128 Router(config-if)# int f0/0.2 Router(config-subif)# encapsulation dot1q 2 Router(config-subif)# ip address 172.16.10.254 255.255.255.128

Cấu hình VTP

2950#vtp domain dhbk         2950#vtp password abcd 2950#vtp mode client 2950#vtp mode  server  2950#vtp mode transparent