Bài viết này sẽ hướng dẫn các bạn cấu hình cơ bản Vlan trên thiết bị switch Aruba CX theo mô hình ví dụ phía dưới. Kết nối đến cổng console trên switch bằng cáp console và dùng phần mềm terminal emulation bạn muốn kết nối đến thiết bị theo thông số sau : Speed: 115200 bps Data bits: 8 Stop bits: 1 Parity: None Flow control: None Khi lần đầu kết nối đến thiết bị, đăng nhập bằng tài khoản admin, mặc định là không có mật khẩu, thiết bị sẽ yêu cầu bạn đặt mật khẩu cho thiết bị. + Trên Switch 1: - Cấu hình Hostname : AOS-CX# configure terminal AOS-CX(config)# hostname Switch1 - Để xem Vlan hiện tại đang có trên Switch dùng lệnh show vlan, mặc định chỉ có Vlan 1. - Ta sẽ tạo thêm Vlan trên Switch 1 bằng lệnh sau : Switch1# configure terminal Switch1(config)# vlan 2 Switch1(config-vlan-2)# name Students Switch1(config-if)#exit - Đưa cổng 1/1/1 và 1/1/2 vào Vlan 2 : Switch1(config)# interface 1/1/1 Switch1(config-if)# vlan access 2 Switch1(config-if)#exit Switch1(config)# interface 1/1/2 Switch1(config-if)# vlan access 2 Switch1(config-if)#exit - Dùng lệnh show vlan để kiểm tra lại : - Cấu hình cổng 1/1/5 trên Switch 1 là Trunk và cho phép Vlan 1,2 trên cổng này : Switch1(config)# interface 1/1/5 Switch1(config-if)# vlan trunk allowed 1-2 Switch1(config-if)#exit - Kiểm tra lại cấu hình bằng lệnh show interface trunk - Để lưu cấu hình bạn dùng lệnh : Switch1# write memory Copying configuration: [Success] + Trên Switch 3 : - Cấu hình Hostname : AOS-CX# configure terminal AOS-CX(config)# hostname Switch3 - Cấu hình Vlan 2 : Switch3(config)# vlan 2 Switch3(config-vlan-2)# name Students Switch3(config-vlan-2)# exit - Cấu hình cổng 1/1/5 là Trunk và cho phép Vlan 1,2 trên cổng này : Switch3(config)# interface 1/1/5 Switch3(config-if)# vlan trunk allowed 1-2 Switch3(config-if)# exit - Tương tự cấu hình cổng 1/1/6 kết nối đến Switch 2 là Trunk và cho phép Vlan 1,2 trên cổng này : Switch3(config)# interface 1/1/6 Switch3(config-if)# vlan trunk allowed 1-2 Switch3(config-if)# exit Switch3# write memory Copying configuration: [Success] - Kiểm tra lại cấu hình bằng lệnh show interface trunk + Trên Switch 2 : - Cấu hình Hostname AOS-CX# configure terminal AOS-CX (config)# hostname Switch2 - Cấu hình Vlan 2 Switch2(config)# vlan 2 Switch2(config-vlan-2)# name Students Switch2(config-vlan-2)# exit - Cấu hình cổng 1/1/3 là access port cho Vlan 2 : Switch2(config-if)# interface 1/1/3 Switch2(config-if)# vlan access 2 Switch2(config-if)# exit - Cấu hình cổng 1/1/6 kết nối đến Switch 3 là Trunk và cho phép Vlan 1,2 trên cổng này : Switch3(config)# interface 1/1/6 Switch3(config-if)# vlan trunk allowed 1-2 Switch3(config-if)# exit Switch3# write memory Copying configuration: [Success] - Tương tự dùng lệnh show vlan và show interface trunk để kiểm tra lại cấu hình : - Dưới đây là cấu hình trên Switch 1,2,3 : + Switch 1 : Current configuration: ! !Version ArubaOS-CX Virtual.10.06.0001 !export-password: default hostname Switch1 user admin group administrators password ciphertext AQBapb6fnmbDQIGLmrKPXU4BvNa9QhXM84hi7TeUihLxeqH+YgAAAG/eHbu9xRrJsMEKwcHJkawr5mf9pnI rVuvuinYt/QbJK8ZRRUPn3ZgI9hyvPNrg+/gaax/A3k+1YSG5+FH6ivF/ZEQ2mxoDQO0//THyGfiKP+wEmEa7QrTRQ6QtLnYw2ykH led locator on ! ! ! ! ssh server vrf mgmt vlan 1 vlan 2 name Studentinterface mgmt no shutdown no lldp transmit no lldp receive ip dhcpinterface 1/1/1 no shutdown description to PC1 no routing vlan access 2 interface 1/1/2 no shutdown description to PC2 no routing vlan access 2 interface 1/1/5 no shutdown no routing vlan trunk native 1 vlan trunk allowed 1-2 ! ! ! ! ! https-server vrf mgmt + Switch 2 : Current configuration: ! !Version ArubaOS-CX Virtual.10.06.0001 !export-password: default hostname Switch2 user admin group administrators password ciphertext AQBapYVY5N8J/2TTUq05kNW0oUstCBlKE6mSK1mIgy6IXX48YgAAAIgovUzeumZ/yemKkbozmJOv50B4upC XE8R9P6tREXgshZBjXXVPk890Ar37xomYs3e2l2GR9vc0jGVvkl8cezBwXABZc57cxHJo+WhO0fKy8sbu7Ax98aSjv3dPybnc0YN9 led locator on ! ! ! ! ssh server vrf mgmt vlan 1 vlan 2 name Studentinterface mgmt no shutdown no lldp transmit no lldp receive ip dhcpinterface 1/1/3 no shutdown description to PC3 no routing vlan access 2 interface 1/1/6 no shutdown no routing vlan trunk native 1 vlan trunk allowed 1-2 ! ! ! ! ! https-server vrf mgmt + Swicth 3 : Current configuration: ! !Version ArubaOS-CX Virtual.10.06.0001 !export-password: default hostname Switch3 user admin group administrators password ciphertext AQBapXUI1o/XDMkjxyL9N8eI9eZNWIHnltVKXqtVdQBfps4DYgAAAFxg/uRJKVFRcCQnr1QkF2GuphdXbDv Mz7l5F4iYNkHW1T+GVmKLV4fdjS9MraYygvaZjT+/KLAn8917or2loK8Lm6XAbfsuGhMBgmczfxDc0KfG6y3XIGH4N1Ir9EsYvD33 led locator on ! ! ! ! ssh server vrf mgmt vlan 1 vlan 2 name Studentinterface mgmt no shutdown no lldp transmit no lldp receive ip dhcpinterface 1/1/5 no shutdown description to Switch1 no routing vlan trunk native 1 vlan trunk allowed 1-2interface 1/1/6 no shutdown description to Switch2 no routing vlan trunk native 1 vlan trunk allowed 1-2! ! ! ! ! https-server vrf mgmt !!! Cám ơn các bạn đã theo dõi bài viết !!!