Lab 2 – Virtual Port Chanel
vPC là viết tắt của virtual Port Channel, là một công nghệ ảo hóa cho phép các liên kết vật lý trên hai thiết bị Cisco Nexus 3000 5000 7000 hoặc 9000 khác nhau có thể được gom lại thành 1 cổng logic để kết nối tới các thiết bị Endpoint. Endpoint có thể là một switch, máy chủ, router hoặc bất kỳ thiết bị nào khác có hỗ trợ công nghệ link aggregation LACP (EtherChannel).
vPC sử dụng vPC number để xác định xem các port nào thuộc cùng 1 channel. Các port có cùng số vPC trên 2 thiết bị sẽ tạo thành 1 group. Port channel đó có thể được cấu hình như các port trunk hoặc access vlan tùy từng mô hình.
Trong bài LAB này học viên cấu hình port channel 1000 mode trunk để kết nối 2 Switch Distribution và port channel 3 mode access để kết nối xuống switch access bên dưới.
Bài Lab này được dựng trên lab ảo hoá sử dụng các qemu switch nexus nxosv9k-9.3.1.
Sau khi bật Switch Nexus lên thì switch khởi động lâu, tầm 4 -5 phút, sau khi khởi động xong ta thấy xuất hiện log như bên dưới thì chọn “yes”.
Switch sẽ tiếp tục chạy đến khi xuất hiện log như bên dưới. Hộp thoại này yêu cầu ta sử dụng mật khẩu có độ bảo mật cao, nếu chọn “yes” sẽ phải đặt mật khẩu phức tạp, nếu “no” thì chỉ cần đặt mật khẩu đơn giản. Nếu muốn bỏ qua không đặt mật khẩu thì chọn bất kỳ sau đó nhấn tổ hợp phím Ctrl + D
Sau đó đăng nhập vào switch bằng mật khẩu vừa đặt, nếu không đặt mật khẩu thì dòng mật khẩu để trống. Nếu không được thì thử với admin/admin
Một số lưu ý
- Trường hợp mở NXOS gặp boot loader chứ không vào được cấu hình thì thực hiện:
Gõ dir để xem list file, trong đó có file nén hệ điều hành Nexus
loader > dir
bootflash::
.rpmstore
nxos.9.3.1.bin
.swtam
virtual-instance
virtual-instance.conf
virt_strg_pool_bf_vdc_1
Tìm trong các file thấy file .bin thì boot từ file đó ( trường hợp ở đây nxos.9.3.1.bin )
boot bootflash:nxos.9.3.1.bin
loader > boot bootflash:nxos.9.3.1.bin
Booting bootflash:nxos.9.3.1.bin
Trying diskboot
Filesystem type is ext2fs, partition type 0x83
- Note : Trong boot loader không cho tab, không cho nhấn mũi tên lên, không cho backspace ( gõ sai thì enter gõ lại )
Yêu cầu a:
Sử dụng interface management 0 để gửi các gói tin keepalive nhằm thiết lập và duy trì vPC
Bật các tính năng vPC và Etherchannel LACP lên
Thực hiện cấu hình đường Etherchannel 1000
Thực hiện cấu hình tạo vPC domain, trên NXs1 trỏ peer-keepalive destination tới ip management của NXs2 và trên NXs2 trỏ tới ip management của NXs1. NXs1 sẽ đóng vai trò làm Primary, NXs2 sẽ đóng vai trò làm Secondary nên để role priority NXs1 thấp hơn NXs2
Thực hiện cấu hình đưa interface po1000 vào vPC domain vừa cấu hình ở trên
Thực hiện kiểm tra lại vPC bằng lệnh “show vpc”
Thực hiện kiểm tra lại đường trunk
Yêu cầu b:
Tạo VLAN 1900, thực hiện cấu hình đường Etherchannel 3 và access vào vlan 1900
Cấu hình đưa interface po3 tham gia vào vPC số hiệu 980
Tại switch access bên dưới thực hiện tạo vlan 1900 và cấu hình đường Etherchannel 3
Kiểm tra lại vPC
- Sơ đồ
vPC là viết tắt của virtual Port Channel, là một công nghệ ảo hóa cho phép các liên kết vật lý trên hai thiết bị Cisco Nexus 3000 5000 7000 hoặc 9000 khác nhau có thể được gom lại thành 1 cổng logic để kết nối tới các thiết bị Endpoint. Endpoint có thể là một switch, máy chủ, router hoặc bất kỳ thiết bị nào khác có hỗ trợ công nghệ link aggregation LACP (EtherChannel).
vPC sử dụng vPC number để xác định xem các port nào thuộc cùng 1 channel. Các port có cùng số vPC trên 2 thiết bị sẽ tạo thành 1 group. Port channel đó có thể được cấu hình như các port trunk hoặc access vlan tùy từng mô hình.
Trong bài LAB này học viên cấu hình port channel 1000 mode trunk để kết nối 2 Switch Distribution và port channel 3 mode access để kết nối xuống switch access bên dưới.
Bài Lab này được dựng trên lab ảo hoá sử dụng các qemu switch nexus nxosv9k-9.3.1.
- Yêu cầu
- Trên 2 Switch NXOS1 và NXOS2 sử dụng 2 port vật lý E1/1 và E1/2 tạo thành một group vPC 1000 và thực hiện trunk đường vPC này
- Sử dụng port vật lý E1/3 và E1/4 của 2 Switch NXOS1 và NXOS2 tạo thành group 3 tham gia vào vPC số hiệu 980 và cấu hình mode access vlan 1900 cho port channel này
- Cấu hình
Sau khi bật Switch Nexus lên thì switch khởi động lâu, tầm 4 -5 phút, sau khi khởi động xong ta thấy xuất hiện log như bên dưới thì chọn “yes”.
| Abort Power On Auto Provisioning [yes - continue with normal setup, skip - bypass password and basic configuration, no - continue with Power On Auto Provisioning] (yes/skip/no)[no]: |
| Do you want to enforce secure password standard (yes/no) [y]: |
Một số lưu ý
- Trường hợp mở NXOS gặp boot loader chứ không vào được cấu hình thì thực hiện:
Gõ dir để xem list file, trong đó có file nén hệ điều hành Nexus
loader > dir
bootflash::
.rpmstore
nxos.9.3.1.bin
.swtam
virtual-instance
virtual-instance.conf
virt_strg_pool_bf_vdc_1
Tìm trong các file thấy file .bin thì boot từ file đó ( trường hợp ở đây nxos.9.3.1.bin )
boot bootflash:nxos.9.3.1.bin
loader > boot bootflash:nxos.9.3.1.bin
Booting bootflash:nxos.9.3.1.bin
Trying diskboot
Filesystem type is ext2fs, partition type 0x83
- Note : Trong boot loader không cho tab, không cho nhấn mũi tên lên, không cho backspace ( gõ sai thì enter gõ lại )
Yêu cầu a:
Sử dụng interface management 0 để gửi các gói tin keepalive nhằm thiết lập và duy trì vPC
| NXs1(config)#interface mgmt 0 NXs1(config-if)#vrf member management NXs1(config-if)#ip address 172.16.12.1/24 NXs1(config-if)#exit |
| NXs2(config)#interface mgmt 0 NXs2(config-if)#vrf member management NXs2(config-if)#ip address 172.16.12.2/24 NXs2(config-if)#exit |
| NXs1(config)#feature vpc NXs1(config)#feature lacp |
| NXs2(config)#feature vpc NXs2(config)#feature lacp |
| NXs1(config)#interface e1/1-2 NXs1(config-if)#switchport NXs1(config-if)#switch mode trunk NXs1(config-if)#channel-group 1000 mode active NXs1(config-if)#no shut NXs1(config-if)#exit |
| NXs2(config)#interface e1/1-2 NXs2(config-if)#switchport NXs2(config-if)#switch mode trunk NXs2(config-if)#channel-group 1000 mode active NXs2(config-if)#no shut NXs2(config-if)#exit |
| NXs1(config)#vpc domain 1000 NXs1(config-vpc-domain)#peer-switch NXs1(config-vpc-domain)#role priority 250 NXs1(config-vpc-domain)#peer-keepalive destination 172.16.12.2 source 172.16.12.1 vrf management NXs1(config-vpc-domain)#peer-gateway NXs1(config-vpc-domain)#layer3 peer-router NXs1(config-vpc-domain)#ip arp synch NXs1(config-vpc-domain)#exit |
| NXs2(config)#vpc domain 1000 NXs2(config-vpc-domain)#peer-switch NXs2(config-vpc-domain)#role priority 251 NXs2(config-vpc-domain)#peer-keepalive destination 172.16.12.1 source 172.16.12.2 vrf management NXs2(config-vpc-domain)#peer-gateway NXs2(config-vpc-domain)#layer3 peer-router NXs2(config-vpc-domain)#ip arp synch NXs2(config-vpc-domain)#exit |
| NXs1(config)#interface po1000 NXs1(config-if)#switchport NXs1(config-if)#switch mode trunk NXs1(config-if)#spanning-tree port type network NXs1(config-if)#vpc peer-link NXs1(config-if)#exit |
| NXs2(config)#interface po1000 NXs2(config-if)#switchport NXs2(config-if)#switch mode trunk NXs2(config-if)#spanning-tree port type network NXs2(config-if)#vpc peer-link NXs2(config-if)#exit |
| NXs1#show vpc Legend: (*) - local vPC is down, forwarding via vPC peer-link vPC domain id : 1000 Peer status : peer adjacency formed ok vPC keep-alive status : peer is alive Configuration consistency status : success Per-vlan consistency status : success Type-2 consistency status : success vPC role : primary Number of vPCs configured : 1 Peer Gateway : Enabled Dual-active excluded VLANs : - Graceful Consistency Check : Enabled Auto-recovery status : Disabled Delay-restore status : Timer is off.(timeout = 30s) Delay-restore SVI status : Timer is off.(timeout = 10s) Operational Layer3 Peer-router : Enabled Virtual-peerlink mode : Disabled vPC Peer-link status ---------------------------------------------------------- id Port Status Active vlans -- ---- ------ -------------------------------------- 1 Po1000 up 1 |
| NXs2#show vpc Legend: (*) - local vPC is down, forwarding via vPC peer-link vPC domain id : 1000 Peer status : peer adjacency formed ok vPC keep-alive status : peer is alive Configuration consistency status : success Per-vlan consistency status : success Type-2 consistency status : success vPC role : secondary Number of vPCs configured : 1 Peer Gateway : Enabled Dual-active excluded VLANs : - Graceful Consistency Check : Enabled Auto-recovery status : Disabled Delay-restore status : Timer is off.(timeout = 30s) Delay-restore SVI status : Timer is off.(timeout = 10s) Operational Layer3 Peer-router : Enabled Virtual-peerlink mode : Disabled vPC Peer-link status ---------------------------------------------------------- id Port Status Active vlans -- ---- ------ -------------------------------------- 1 Po1000 up 1 |
| NXs1#show int trunk ---------------------------------------------------------- Port Native Status Port Vlan Channel ---------------------------------------------------------- Eth1/1 1 trnk-bndl Po1000 Eth1/2 1 trnk-bndl Po1000 Po1000 1 trunking -- ---------------------------------------------------------- Port Vlans Allowed on Trunk ---------------------------------------------------------- Eth1/1 1-4094 Eth1/2 1-4094 Po1000 1-4094 |
Tạo VLAN 1900, thực hiện cấu hình đường Etherchannel 3 và access vào vlan 1900
| NXs1(config)#vlan 1900 NXs1(config-vlan)#exit NXs1(config)#interface e1/3 NXs1(config-if)#switchport NXs1(config-if)#switchport access vlan 1900 NXs1(config-if)#channel-group 3 mode active NXs1(config-if)#no shutdown NXs1(config-if)#exit |
| NXs2(config)#vlan 1900 NXs2(config-vlan)#exit NXs2(config)#interface e1/4 NXs2(config-if)#switchport NXs2(config-if)#switchport access vlan 1900 NXs2(config-if)#channel-group 3 mode active NXs2(config-if)#no shutdown NXs2(config-if)#exit |
| NXs1(config-if)#interface po3 NXs1(config-if)#switchport NXs1(config-if)#vpc 980 NXs1(config-if)#no shutdown |
| NXs2(config-if)#interface po3 NXs2(config-if)#switchport NXs2(config-if)#vpc 980 NXs2(config-if)#no shutdown |
| NXs3(config)#feature lacp NXs3(config)#vlan 1900 NXs3(config-vlan)#exit NXs3(config)#interface e1/3-4 NXs3(config-if-range)#switchport NXs3(config-if-range)#switchport access vlan 1900 NXs3(config-if-range)#channel-group 3 mode active NXs3(config-if-range)#no shutdown NXs3(config-if-range)#exit |
| NXs1#show vpc Legend: (*) - local vPC is down, forwarding via vPC peer-link vPC domain id : 1000 Peer status : peer adjacency formed ok vPC keep-alive status : peer is alive Configuration consistency status : success Per-vlan consistency status : success Type-2 consistency status : success vPC role : primary Number of vPCs configured : 1 Peer Gateway : Enabled Dual-active excluded VLANs : - Graceful Consistency Check : Enabled Auto-recovery status : Disabled Delay-restore status : Timer is off.(timeout = 30s) Delay-restore SVI status : Timer is off.(timeout = 10s) Operational Layer3 Peer-router : Enabled Virtual-peerlink mode : Disabled vPC Peer-link status ---------------------------------------------------------- id Port Status Active vlans -- ---- ------ -------------------------------------- 1 Po1000 up 1,1900 vPC status ---------------------------------------------------------- Id Port Status Consistency Reason Active vlans -- ------------ ------ ----------- ------ 980 Po3 up success success 1900 |
| NXs2#show vpc Legend: (*) - local vPC is down, forwarding via vPC peer-link vPC domain id : 1000 Peer status : peer adjacency formed ok vPC keep-alive status : peer is alive Configuration consistency status : success Per-vlan consistency status : success Type-2 consistency status : success vPC role : secondary Number of vPCs configured : 1 Peer Gateway : Enabled Dual-active excluded VLANs : - Graceful Consistency Check : Enabled Auto-recovery status : Disabled Delay-restore status : Timer is off.(timeout = 30s) Delay-restore SVI status : Timer is off.(timeout = 10s) Operational Layer3 Peer-router : Enabled Virtual-peerlink mode : Disabled vPC Peer-link status ---------------------------------------------------------- id Port Status Active vlans -- ---- ------ -------------------------------------- 1 Po1000 up 1,1900 vPC status ---------------------------------------------------------- Id Port Status Consistency Reason Active vlans -- ------------ ------ ----------- ------ 980 Po3 up success success 1900 |