Vlan Command on CISCO Router/Switch

Command

Vlan

Use

This is the modern way to configure VLANs. A useful feature of this command is that you can configure a range of VLANs with a single command.

Syntax

Switch(config)#vlan <vlan range>

Options

<name>Set VLAN name
<exit>Apply changes and leave VLAN configuration mode

Example

In the below example we will configure VLAN 25 and name it MANAGEMENT.

Cat1(config)#vlan 25
Cat1(config-vlan)#name MANAGEMENT
Cat1(config-vlan)#exit
Cat1(config)#do show vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Gi0/2
25 MANAGEMENT active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

Now we will configure a VLAN range to configure many VLANs at once.

Cat1(config)#vlan 55-70,101-103
Cat1(config-vlan)#exit
Cat1(config)#do show vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Gi0/2
25 MANAGEMENT active
55 VLAN0055 active
56 VLAN0056 active
57 VLAN0057 active
58 VLAN0058 active
59 VLAN0059 active
60 VLAN0060 active
61 VLAN0061 active
62 VLAN0062 active
63 VLAN0063 active
64 VLAN0064 active
65 VLAN0065 active
66 VLAN0066 active
67 VLAN0067 active
68 VLAN0068 active

VLAN Name Status Ports
—- ——————————– ——— ——————————-
69 VLAN0069 active
70 VLAN0070 active
101 VLAN0101 active
102 VLAN0102 active
103 VLAN0103 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

Related Articles

guest
0 Comments
Inline Feedbacks
View all comments