Knowledge Base

How to configure VLANs and associate ports to VLANs on FTOS


Article description: This article explains how to configure VLANs on FTOS

Table of Contents

  1. Switchport
  2. Hybrid switchport
  3. Creating VLANs
  4. Applying VLANs to interfaces
  5. Useful show commands

Switchport

When an interface is in switchport mode, it will pass multiple tagged VLANs, or one untagged VLAN. It cannot accept both untagged and tagged traffic.

To configure Switchport
FTOS#config
FTOS(conf)#Interface Te0/5
FTOS(conf-if-te-0/5)#switchport

To remove switchport
FTOS(conf-if-te-0/5)#no switchport

Note:To configure switchport mode, make sure any existing configuration on the interface is removed. For instance, the system will not allow you to configure switchport on an interface that is assigned an IP address, as the interface is already in Layer 3 mode.


Hybrid switchport

When an interface is in hybrid switchport mode, the interface may pass both untagged and tagged VLANs.
To configure Hybrid switchport
FTOS#config
FTOS(conf)#Interface Te0/5
FTOS(conf-if-te-0/5)#portmode hybrid
FTOS(conf-if-te-0/5)#switchport

To remove Hybrid switchport
FTOS(conf-if-te-0/5)#no switchport
FTOS(conf-if-te-0/5)#no portmode hybrid
Note:To configure hybrid switchport mode, make sure any existing configuration on the interface is removed. For instance, the system will not allow you to configure switchport on an interface that is assigned an IP address, as the interface is already in Layer 3 mode.


Creating VLANs

To create a VLAN, input the following commands. This example creates VLANs 414 and 515
FTOS#config
FTOS(conf)#Interface Vlan 414
FTOS(conf-if-vl-414)#exit
FTOS(conf)#Interface Vlan 515

You will only be able to create VLANs one at a time.


Applying VLANs to interfaces

To add a VLAN to an interface untagged, input the following commands.
FTOS#config
FTOS(conf)#Interface Vlan 414
FTOS(conf-if-vl-414)#untagged te0/5

To add a VLAN to an interface with an 802.1Q tag, input the following command.
FTOS(conf-if-vl-414)#
tagged te0/9

To apply Multiple VLANs to an interface
FTOS(conf)#interface range Vlan 414 – 515
% Warning: Non-existing ports (not configured) are ignored by interface-range

Note: The above error message is stating that within the range of 414 to 515, only the VLANs we have already created will be configured. This is useful for creating a link to a Trunk Cisco port. Interface range Vlan 2-4094 will allow you to add all existing VLANs to an interface to simulate a Trunk port without creating excess configuration. This command will not create new VLANs.

To apply the VLAN to a range of interfaces

FTOS(conf-if-vl-414)#tagged te0/5-10

To remove the VLAN from the interface
FTOS(conf-if-vl-414)#no tagged te0/5-10

Useful show commands

show vlan Shows the existing VLANs and their ports
show run interface te0/5 Shows configuration of Interface te0/5
show run interface vlan 414 Shows configuration of VLAN 414
show interface switchport te0/5 Shows the tagged and untagged VLANs on a port





Article ID: HOW10706

Last Date Modified: 10/19/2017 05:56 AM


Rate this article

Accurate
Useful
Easy to understand
Was this article helpful?
Yes No
Send us feedback
Comments cannot contain these special characters: <>()\
Sorry, our feedback system is currently down. Please try again later.

Thank you for your feedback.