In this guide, I will show you how to configure VLANs, access ports, and trunks on Aruba CX switches. We will utilize a GNS3 lab environment to demonstrate the connectivity between PCs across different switches using trunking protocols.
For this demonstration, we are using GNS3 with an Aruba CX switch image and two Virtual PCs (VPCS) connected to Port 1 and Port 2. Before configuring the switch, we need to assign static IP addresses to these virtual PCs to verify connectivity later.
Open the console for the first PC (PC1) and assign an IP address in the 10.0.0.0/24 range.
ip 10.0.0.101/24
Repeat this process for PC2, assigning it a unique IP (e.g., 10.0.0.102).
Access the Aruba switch console. The default login is admin with a blank password.
By default, interfaces on the Aruba CX virtual image may be in "routed" (Layer 3) mode. To use them for Layer 2 switching (VLANs), we must disable routing and enable the interfaces.
configure terminal
interface 1/1/1-1/1/52
no routing
no shutdown
exit
You can verify this by running show interface brief. The ports should now show as "up" and be in access mode on the default VLAN 1.
To segment the network, we will create a new VLAN. For this example, we will use VLAN ID 123.
Enter the VLAN configuration context and optionally assign a descriptive name.
vlan 123
name IT-Dept
exit
Now we need to assign the ports connected to our PCs (Port 1 and Port 2) to the newly created VLAN 123.
Select the range of interfaces and set the mode to VLAN access.
interface 1/1/1-1/1/2
vlan access 123
exit
To connect this switch to another switch (for example, in another building or floor), we use a trunk port. This allows multiple VLANs to traverse a single link.
[Image of network diagram showing VLAN trunking and access ports]We will configure interface 1/1/3 as our uplink trunk. You can specify exactly which VLANs are allowed, or simply allow all current and future VLANs.
interface 1/1/3
vlan trunk allowed all
exit
Using allowed all ensures that any new VLANs you create will automatically be permitted across the trunk.
Always remember to save your configuration to persistent memory.
write memory
To verify the setup, you can duplicate the lab setup (create a second switch and two more PCs). Connect the two switches via their trunk ports (1/1/3). Configure the second switch identically.
From PC1 (on Switch A), ping a PC located on Switch B. If the trunk is configured correctly, the traffic will pass through, allowing communication between the two distinct physical locations on the same VLAN.
ping 10.0.0.103