config vlandynamic

4
Bạn sẽ tìm hiểu kỹ hơn về Dynamic VLAN khi học về môn Switching (CCNP) Dynamic VLAN Reference: Chapter 4 - Academy – Semester 7 Cisco CD Documentation http://www.cisco.com/univercd/cc/td/...g/mascvmps.htm Static VLAN (port-based VLAN) là loại VLAN thường gặp nhất, trong đó các port trên switch được gán trực tiếp và cố định vào VLAN. Dynamic VLAN là loại VLAN mà trong đó các thành viên của VLAN được xác định bằng MAC address của thiết bị gắn vào switch. Quá trình này dựa vào bảng địa chỉ “MAC address to VLAN” lưu trong VMPS database. Khi đổi host sang switch khác, switch sẽ thực hiện chỉ định VLAN cho host đó. - Mỗi dynamic port chỉ thuộc 1 VLAN. Traffic sẽ không lưu thông qua port này cho đến khi VMPS server chỉ định VLAN cho port này. -Khi kích hoạt VMPS, VMPS database từ TFTP server sẽ download vào VMPS server trên switch(nếu reset VMPS server thì sẽ thực hiện download lại từ TFTP). - Khi host được gắn vào dynamic port, VMPS client sẽ nhận được source MAC address. Sau đó, VMPS client sẽ tiến hành kiểm tra MAC này bằng cách gửi VQP request đến VMPS server, VMPS server sẽ gửi về VLAN number cho VMPS client. VMPS Client sẽ cấu hình port vào đúng VLAN dựa trên những thông tin nhận từ VMPS Server. Lưu ý: - Nhiều host có thể hoạt động trên cùng 1 dynamic port khi chúng cùng chung VLAN. Tối đa là 20 host (đối với 29xx XL) và 50 host (Catalyst 5xxx), dynamic port sẽ bị shutdown => Cần thực hiện lệnh no shut để reenable a shutdown dynamic port. - Cần cấu hình VMPS trước khi cấu hình dynamic port. - VMPS server và VMPS client phải cùng chung management VLAN. - Khi cấu hình dynamic port sẽ tự động kích hoạt spanning-tree PortFast(PortFast là 1 tính năng của STP cho phép port gửi frame ngay khi physical link active), do đó chú ý disable portfast mode khi cần thiết. - Static secure port không thể làm dynamic port => cần turn off security trên static secure port trước khi cấu hình dynamic. - Trunk port không thể làm dynamic port => cần turn off trunking trên trunk port trước khi cấu hình dynamic.

Upload: thienng

Post on 22-Dec-2015

214 views

Category:

Documents


1 download

DESCRIPTION

d

TRANSCRIPT

Page 1: Config Vlandynamic

Bạn sẽ tìm hiểu kỹ hơn về Dynamic VLAN khi học về môn Switching (CCNP)

Dynamic VLANReference: Chapter 4 - Academy – Semester 7Cisco CD Documentationhttp://www.cisco.com/univercd/cc/td/...g/mascvmps.htm

Static VLAN (port-based VLAN) là loại VLAN thường gặp nhất, trong đó các port trên switch được gán trực tiếp và cố định vào VLAN. 

Dynamic VLAN là loại VLAN mà trong đó các thành viên của VLAN được xác định bằng MAC address của thiết bị gắn vào switch. Quá trình này dựa vào bảng địa chỉ “MAC address to VLAN” lưu trong VMPS database. Khi đổi host sang switch khác, switch sẽ thực hiện chỉ định VLAN cho host đó. 

- Mỗi dynamic port chỉ thuộc 1 VLAN. Traffic sẽ không lưu thông qua port này cho đến khi VMPS server chỉ định VLAN cho port này. 

-Khi kích hoạt VMPS, VMPS database từ TFTP server sẽ download vào VMPS server trên switch(nếu reset VMPS server thì sẽ thực hiện download lại từ TFTP).

- Khi host được gắn vào dynamic port, VMPS client sẽ nhận được source MAC address. Sau đó, VMPS client sẽ tiến hành kiểm tra MAC này bằng cách gửi VQP request đến VMPS server, VMPS server sẽ gửi về VLAN number cho VMPS client. VMPS Client sẽ cấu hình port vào đúng VLAN dựa trên những thông tin nhận từ VMPS Server.

Lưu ý:- Nhiều host có thể hoạt động trên cùng 1 dynamic port khi chúng cùng chung VLAN. Tối đa là 20 host (đối với 29xx XL) và 50 host (Catalyst 5xxx), dynamic port sẽ bị shutdown => Cần thực hiện lệnh no shut để reenable a shutdown dynamic port.- Cần cấu hình VMPS trước khi cấu hình dynamic port.- VMPS server và VMPS client phải cùng chung management VLAN.- Khi cấu hình dynamic port sẽ tự động kích hoạt spanning-tree PortFast(PortFast là 1 tính năng của STP cho phép port gửi frame ngay khi physical link active), do đó chú ý disable portfast mode khi cần thiết.- Static secure port không thể làm dynamic port => cần turn off security trên static secure port trước khi cấu hình dynamic.- Trunk port không thể làm dynamic port => cần turn off trunking trên trunk port trước khi cấu hình dynamic.

Các bước cấu hình VMPS và dynamic port

Bước 1: Tạo VMPS database(text file) & lưu trên TFTP server 

- Định nghĩa VMPS domain - Định nghĩa security mode (default mode = open mode, VMPS operate both)- Định nghĩa MAC-to-VLAN mapping - Định nghĩa port group- Định nghĩa VLAN group- Định nghĩa VLAN port policy

Page 2: Config Vlandynamic

vmps domain WBU!vmps mode open!vmps-mac-addrs!address 0012.2233.4455 vlan-name hardwareaddress 0000.6509.a080 vlan-name hardwareaddress aabb.ccdd.eeff vlan-name Greenaddress 1223.5678.9abc vlan-name ExecStaffaddress fedc.ba98.7654 vlan-name --NONE--address fedc.ba23.1245 vlan-name Purple

!Port groupsvmps-port-group WiringCloset1device 192.168.1.1 port Fa1/3device 172.16.1.1 port Fa1/4vmps-port-group "Executive Row"device 192.168.2.2 port es5%Fa0/1device 192.168.2.2 port es5%Fa0/2device 192.168.2.3 all-ports

!VLAN groupsvmps-vlan-group Engineeringvlan-name hardwarevlan-name software

!VLAN port Policiesvmps-port-policies vlan-group Engineeringport-group WiringCloset1vmps-port-policies vlan-name Greendevice 192.168.1.1 port Fa0/9vmps-port-policies vlan-name Purpledevice 192.168.2.2 port Fa0/10port-group "Executive Row"

Bước 2: Cấu hình VMPS ServerVMPS Server chỉ chạy trên 2926G series và Catalyst 5000 (more…?) => Tập lệnh set-based.

1- Chỉ định cách thức download VMPS database(set vmps tftpserver ip-address [filename])Console> (enable) set vmps tftpserver 172.16.254.222 vmps_config.db Console> (enable)

2- Enable VMPSConsole> (enable) set vmps state enableVlan Membership Policy Server enable is in progress.Console> (enable)Sau khi thực hiện lệnh này file vmps_config.db sẽ download xuống Switch, switch trở thành VMPS server. Khi muốn update thông tin, có thể thực hiện lệnh download vmps (dùng để troubleshoot)

3- Chỉ định Primary/Secondary VMPS server Console> (enable) set vmps server 172.20.26.150 primary

Page 3: Config Vlandynamic

Console> (enable) set vmps server 172.20.26.152Console> (enable) set vmps server 172.20.26.159

4. Kiểm tra VMPS server addressConsole> (enable) show vmps server

Bước 3: Cấu hình VMPS Client

Switch(config)# interface fa0/1Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan dynamicSwitch(config-if)# end

Switch# show interface fa0/1 switchportName: Fa0/1Switchport: EnabledAdministrative mode: dynamic accessOperational Mode: dynamic accessAdministrative Trunking Encapsulation: islOperational Trunking Encapsulation: islNegotiation of Trunking: DisabledAccess Mode VLAN: 0 ((Inactive))Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: NONEPruning VLANs Enabled: NONE 

Bước 4 optional) Cấu hình Retry, Reconfirm Interval The default reconfirm interval is 60 minutes. The default number of retries on a VQP query are 3Switch# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)# vmps reconfirm 60Switch(config)# vmps retry 10Switch(config)# end

Switch# show vmpsVQP Client Status:--------------------VMPS VQP Version: 1

Reconfirm Interval: 60 minServer Retry Count: 10VMPS domain server: 172.20.130.50 (primary, current)

Reconfirmation status---------------------VMPS Action: No Host 

Để đảm bảo các dynamic port nhận được VLAN Membership ta thực hiện lệnh VMPS reconfim

Switch# vmps reconfirmSwitch# show vmps 

Page 4: Config Vlandynamic

VQP Client Status:--------------------VMPS VQP Version: 1Reconfirm Interval: 60 minServer Retry Count: 10VMPS domain server: 172.20.130.50 (primary, current)

Reconfirmation status---------------------VMPS Action: Success 

Cheers!