A virtual LAN (VLAN) is used to partition the switch into two or more logical switches to allow for grouping of end devices into logical groups. Such groups typically consist of devices or users running the same applications. VLANs can also span across several switches to allow ports from these switches to be joined to the same logical network group. Creating one or more VLANs keeps broadcast traffic contained within each logical group of devices.
The example below shows the commands to create VLANs 10, 20, and 30, on Switch 1 and Switch 2. The commands are the same on both switches. SmartFabric OS10 supports VLANS 1 through 4093 (VLAN 4094 is reserved for VLT).
Configure a VLAN on switch #1 | Configure a VLAN on switch #2 |
|
|
Once a VLAN is created, ports may be assigned to it. End devices connected to these ports can communicate with each other over this common VLAN.
The commands below show how to add ports 1/1/1 through 1/1/8 to VLAN 10 on switch #1, and ports 1/1/1 through 1/1/4 to VLAN 10 on switch #2. A different set of ports is used on each switch to demonstrate they do not need to be the same. A different number of ports are used on each switch to demonstrate that there is no one-to-one correlation, like in a port channel. In this example, one switch has four ports on VLAN 10, while the other switch has eight.
Add interfaces to the VLAN on switch #1 | Add interfaces to the VLAN on switch #2 |
|
|
To allow devices on a VLAN on one switch to communicate with devices on the same VLAN on another switch, a trunk port has to be created between the two switches. Trunk ports are used to pass VLAN traffic from one switch to the next, and across the entire network. For example, traffic from end devices on VLAN 10 on one switch can be passed across a port or port channel interface in trunk mode to communicate with end devices on VLAN 10 on another switch.
An interface in trunk mode does not forward tagged traffic by default. However, an administrator can restrict a trunk port only to pass specific VLAN traffic, providing more control over where traffic goes in the network. Use the following commands to create a port channel trunk to only pass VLANs 10 and 20 traffic between the switches.
Create port channel trunk to forward VLAN traffic | Create port channel trunk to forward VLAN traffic |
|
|
Use the show vlan command on each switch to confirm the port channel trunk and the access ports assigned to each VLAN. Run the show port-channel summary command to show the member ports of each port channel and the port channel status.
OS10# show vlan 10
Codes: * - Default VLAN, M – Management VLAN, R – Remote Port Mirroring VLANs
Q: A – Access (Untagged), T – Tagged
NUM Status Description Q Ports
10 up T Po1
A Eth1/1/21-1/1/24
OS10# show port-channel summary
Flags: D – Down I – member up but inactive P – member up and active
U – Up (port-channel)
Group Port-Channel Type Protocol Member Ports
1 port-channel1 (U) Eth DYNAMIC 1/1/15(P) 1/1/16(P)