Switch VLAN Configuration Commands Step by Step


OBJECT: Simulation of Switch Configuration VLAN.
REQUIRED SOFTWARE: Cisco Packet Tracer 8.1.1

Network Diagram

Setup this network:

Switch VLAN Configuration Commands Step by Step
Switch#config t
Switch(config)#hostname SW1
SW1(config)#do show vlan
SW1#vlan database
% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.
SW1(vlan)#vlan 2 name Sales
VLAN 2 added:
    Name: Sales
SW1#show vlan
SW1#config t
SW1(config)#vlan 3
SW1(config-vlan)#name Accounts
SW1(config)#int fa 0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport  access vlan 2
SW1(config)#int fa 0/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport  access vlan 2
SW1(config-if)#int range fa 0/3- 6
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport  access vlan 3
SW1#show vlan

What is VLAN

A virtual LAN or VLAN is a concept by which we can split the device on layer two ie data link layer.

Normally the broadcast domain is divided into level 3 layers but here also we can do this by using switches from the concept of VLANs.

A broadcast domain is a network segment in which all devices in the same broadcast domain will receive it if the device broadcasts a packet.

All devices in the same broadcast domain will receive all broadcast packets but are limited to switches because routers do not forward out broadcast packets.

That’s why inter-VLAN routing is needed to forward packets to a different VLAN (from one VLAN to another VLAN) or to broadcast the domain.

VLANs create various small-sized sub-networks that are relatively easy to handle.
VLAN Ranges

To understand VLANs and their range, consider this table carefully:

by VTP
0, 4095Reserved
For system use only. You cannot see and use these VLANs.
1NormalDefault VLAN 1 can use it but cannot delete it.Yes
2-1001NormalEthernet is used for VLANs. You can create, use and delete them.Yes
1002-1005NormalCisco Default and Token Ring for FDDI. You cannot delete these VLANs.Yes
1006-4094ExtendedFor Ethernet VLANs only. Keep these things in mind when configuring extended VLANs: • Layer 3 ports and some software features require internal VLANs. Internal VLANs are allowed at 1006 and above. You cannot use a VLAN allocated for such use. Internal users To display VLANs, enter the show VLAN brief command. • The configuration of VLANs 1006-1024 does not support the witch running on the catalyst product family. If you configure VLANs 1006-1024, make sure that VLANs are not extended to any switch that runs on the catalyst product family. Huh. • You must enable the Extended System ID so that you can use Extended Range VLANs. 

VLAN Configuration

If you want to create a VLAN, you can do this by giving the name and id directly:

Switch(config)#int fa0/0
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access Vlan 2

Now you can also assign the range of switch ports to whatever VLAN you want:

Switch(config)#int range fa0/0-2
Switch(config-if)#switchport mode access
Switch(config-if) #switchport access Vlan 2

Now switchport fa0 / 0, fa0 / 1, fa0-2 will be assigned to vlan2.

Advantages of VLAN

Now we are telling you some benefits of VLAN which are as follows:

  • Performance
    Network traffic is filled with broadcast and multicast. VLAN eliminates the need to send such traffic to the location where we are not required. As an example, suppose traffic is designed for two devices but if there are ten devices in the same broadcast domain, then traffic will reach everywhere and this will lead to waste of bandwidth. But if we create a VLAN then the multicast and broadcast packet will go to the device where we want to send it.
  • Making of Virtual Group– Just as all organizations or companies have many departments like sales, management etc.
  • VLAN devices can be grouped into different logically created groups according to their need and department.
  • Security– In the same network, if the sensitive data is broadcast, then any external can access it, but after creating a VLAN we can control the broadcast domain and also Restricted Access by creating a firewall. Not only this, it is also capable of giving any kind of external access information to the network manager. That’s why VLAN also increases network security
  • Flexibility– It also allows us to increase or decrease the number of hosts
  • Cost-Deduction– Broadcast domains can also be created using VLANs that do not require expensive routers.

·         In addition, using VLANs, the number of smaller broadcast domains can also be increased, which is easier to handle than larger broadcast domains.

Download Cisco Packet Tracer 6.22
Download Cisco Packet Tracer 8.1.1


Dear Students, This Purpose of Preparation of Computer Network Online Test is in 30 Questions English. There is a collection of questions asked in the CCNA Exam. On answering each question one point will be given. And it is mandatory to bring 50% marks to pass. To start the test you have to click on Start Button. All the questions will have to be answered. Go to Last and click on Finish Button, after which your Result will appear on the screen. After clicking Finish, there will be three option shows below 1.Restart Quiz 2.View Question 3.Show Leader-board. After filling your name and e-mail id by clicking on the show leader-board, click on send, after which your result will be shown.



1. The method of communication in which transmission takes place in both directions, but only one direction at a time is called

Answer is A)
Half Duplex

2.Error detection at the data link level is achieved by
Answer is D)
Cyclic Redundancy Code

3. Protocols are

Answer is D)
Agreements on how communication components and DTE

4.Which of the following is a wrong example of network layer?

Answer is C)
X.25 level 2-ISO

5. The topology with highest reliability is:

Answer is C)
Mesh topology

6. “BAUD” rate means

Answer is B)
The number of bytes transmitted per unit time.

7.Start and stop bits are used in serial communication for

Answer is D)

8. Unmodulated signal coming from a transmitter is know as

Answer is B)
Baseband signal

9.How many Character per sec(7bits + 1parity) can be transmitted over a 2400 bps line if the transfer is synchronous (1 “Start” and 1 “stop” bit)?

Answer is B

10.Which one of the following network uses dynamic or adaptive routing?

Answer is A)

11. The number of cross point needed for 10 lines in a cross point switch which is full duplex in nature and there are no self connection is

Answer is A)

12. A terminal multiplexer has six 1200 bps terminals and ‘n’ 300bps terminals connected to it. The outgoing line is 9600bps. What is the maximum value of n?

Answer is D)

13. If one link fails, only that link is affected. All other links remain active. Which topology does this?

Answer is D)
Star topology

14. Maximum data rate of a channel for a noiseless 3-kHz binary channel is

Answer is C)
6000 bps

15. The ________ measures the number of lost or garbled messages as a fraction of the total sent in the sampling period.

Answer is B)
Residual Error Rate.

16. In session layer, during data transfer, the data stream responsible for the “control” purpose (i.e control of the session layer itself) is

Answer is B)
Capability Data

17.A high speed communication equipment typically would not be needed for

Answer is C)

18. Which of the following ISO level is more closely related to the physical communications facilities?

Answer is C)
Data Link

19. which of the following is not a field in the Ethernet Message packet?

Answer is D)

20. The Network topology that supports bi-directional links between each possible node is

Answer is C)

21. In a broad Sense, a railway track is an example of

Answer is C)
Half Duplex

22. Which network has connectivity range up to 10 meters?

Answer is C)

23. What is Unicode?

Answer is B)
Represents symbol or characters used in any langua

24.For data communications to occur, the communicating devices must be part of a communication system made up of a combination of?

Answer is A)
Hardware and software

25. Correct method for full duplex mode of communication is:

Answer is D)
Both stations can transmit and receive data at the

26. Data communications system depends on four fundamental characteristics

Answer is D)

27. A data communications system has:

Answer is D)
5 Components

28. Select correct type of line configuration:

Answer is D)

29. Select the wrong data communication system component:

Answer is A)

30. Time required for a message to travel from one device to another is known as:

Answer is D)
Transit time

About me