CCNA- Switching: VLAN Interview Questions & Answers

What is VLAN?

By default, all ports on a switch are in the same broadcast domain. A Virtual Local Area Network, Virtual LAN, or VLAN, can be used to divide a single broadcast domain to multiple broadcast domains in a layer 2 switched network.


What are the VLAN membership types?

Static VLANs & Dynamic VLANs


What is Static VLAN?

In a static VLAN, the network administrator creates a VLAN and then assigns switch ports to the VLAN. Static VLANs are also called port based VLANs. The association with the VLAN does not change until the administrator changes the port assignment. End-user devices become the members of VLAN based on the physical switch port to which they are connected.

  • Ø The ports on a single switch can be assigned multiple VLANs. Even though two devices are connected to different ports on a same switch, traffic will not pass between them if the connected ports are on different VLANs. We need a layer 3 device (typically a Router) to enable communication between two VLANs.


What is Dynamic VLAN?

In a dynamic VLAN, the switch automatically assigns the port to a VLAN using information from the user device like MAC address, IP address etc. When a device is connected to a switch port the switch queries a database to establish VLAN membership. A network administrator must configure VLAN database of a VLAN Membership Policy Server (VMPS).


What are the types of VLAN connection links?

There are two types of VLAN connection links and they are Access link and Trunk link.

access and trunk linksClick on the Image to see it

The solid lines in above picture are access links and dotted line connecting two switches together is a trunk link. The access links are part of only one VLAN and carry traffic to only the end devices connected to that particular VLAN. But a trunk link is used to connect switches to other switches or to routers and can carry traffic from multiple VLANs.


What is VLAN Frame Tagging?

To identify the VLAN that a frame belongs to, Cisco switches support different identification techniques (VLAN Frame tagging).


What are the different VLAN Frame tagging techniques?

• Inter-Switch Link (ISL): Cisco proprietary VLAN frame tagging. No much support from other vendors. Supported only in old Cisco Switch models.

• IEEE 802.1Q: IEEE industry standards VLAN frame tagging.

• LAN Emulation (LANE): LANE is used to communicate with multiple VLANs over ATM.

• 802.10 (FDDI): Protocol for sending VLAN information over FDDI.


What is Native VLAN?

Normally a Switch port configured as a trunk port send and receive IEEE 801.q VLAN tagged Ethernet frames.

If a switch receives untagged Ethernet frames on its Trunk port, they are forwarded to the VLAN that is configured on the Switch as native VLAN. Both sides of the trunk link must be configured to be in same native VLAN.


What is VTP?

VLAN Trunking Protocol (VTP) is used to communicate VLAN information between switches in the same VTP domain.


What is VTP Domain?

  • Ø A VLAN Trunking Protocol (VTP) domain is one switch or several interconnected switches sharing the same VLAN Trunking Protocol (VTP) environment.
  • Ø A switch can be configured only in one VLAN Trunking Protocol (VTP) domain.
  • Ø Switches in different VTP domains do not share VLAN Trunking Protocol (VTP) information.


What are the VLAN Trunking Protocol (VTP) Modes?

A network switch, which is participating in VLAN Trunking Protocol (VTP), can have three different modes.

• Server Mode

• Client Mode

• Transparent Mode


What is VTP Server Mode?

VLAN Trunking Protocol (VTP) Server mode is the default VTP mode for all Catalyst switches.

At least one Server is required in a VTP domain to propagate VLAN information within the VTP domain.

We can create, add, or delete VLANs of a VTP domain in a Switch which is in VTP Server mode.

The changes made in a switch in server mode are advertised to the entire VTP domain.


What is VTP Client Mode?

VLAN Trunking Protocol (VTP) client mode switches listen to VTP advertisements from other switches and modify their VLAN configurations accordingly.


What is VTP Transparent Mode?

VLAN Trunking Protocol (VTP) transparent mode switches do not participate in the VTP domain, but VTP transparent mode switches can receive and forward VTP advertisements through the configured trunk links.


What is VTP Pruning?

VLAN Trunking Protocol (VTP) pruning is a feature in Cisco switches, which stops VLAN update information traffic from being sent down trunk links if the updates are not needed.



CCNA- Switching: STP Interview Question & Answers

What is STP?

  • Ø The function of Spanning Tree Protocol (STP) is to prevent Layer 2 switching loops and broadcast storms in a Local Area Network (LAN) because of redundant links.
  • Ø STP allows redundant links in a network to prevent complete network failure if an active link fails.


Who developed STP?

  • Ø Spanning Tree Protocol (STP) is based on an algorithm, which was developed by Radia Perlman at DEC (Digital Equipment Corporation, now part of HP).
  • Ø The Spanning Tree Protocol (STP) was then standardized by IEEE as IEEE 802.1D.


What is the reason for developing another version STP i.e. RSTP?

Because of the slow convergence time of Spanning Tree Protocol (STP) IEEE 802.1D, another version of Spanning Tree Protocol (STP IEEE 802.1W) is developed, which is also known as Rapid Spanning Tree Protocol (RSTP), which has much better convergence time.


What is Bridge Protocol Data Unit (BPDU) frame?

  • Ø The Spanning Tree Protocol (STP) enabled switches in a redundant Local Area Network (LAN) need to exchange information between each other for Spanning Tree Protocol (STP) to work properly.
  • Ø Bridge Protocol Data Units (BPDUs) are messages exchanged between the switches inside an interconnected redundant Local Area Network (LAN).
  • Ø Bridge Protocol Data Units (BPDUs) frames contain information regarding the Switch ID, originating switch port, MAC address, switch port priority, switch port cost etc.
  • Ø When Bridge Protocol Data Units (BPDUs) are received, the Switch uses a mathematical formula called the Spanning Tree Algorithm (STA) to know when there is a Layer2 Switch loop in network and determines which of the redundant ports needs to be shut down.


What is the destination MAC address used by Bridge Protocol Data Units (BPDUs)?

Bridge Protocol Data Units (BPDUs) frames are sent out as multicast messages regularly at multicast destination MAC address 01:80:c2:00:00:00.


What are the different types of BPDUs?

Three types of Bridge Protocol Data Units (BPDUs) are

  1. Configuration BPDU (CBPDU),
  2. Topology Change Notification (TCN) BPDU
  3. Topology Change Notification Acknowledgment (TCA) BPDU


What is the basic purpose of the BPDUs and STA?

The basic purpose of the Bridge Protocol Data Units (BPDUs) and the Spanning Tree Algorithm (STA) is to avoid Layer2 Switching loops and Broadcast storms.


What is Configuration BPDU?

What is TCN BPDU?

What is TCA BPDU?

What is Bridge Protocol Data Unit (BPDU) Frame Format?


What is Switch Priority Value (Bridge Priority)?

  • Ø Every Switch Participating in a Spanning Tree Protocol network is assigned with a numerical value called Switch Priority Value.
  • Ø Switch Priority Value is a 16-bit binary number.
  • Ø The Switch Priority, which is a numerical value defined by IEEE 802.1D, which is equal to 32,768 by default.
  • Ø Switch Priority value decides which Switch can become Root Bridge (Root Switch).
  • Ø The Switch Priority value is used to find the Switch ID.


What is Switch ID (Bridge ID)?

  • Ø Switch ID decides which Switch can become Root Switch. A Switch with lowest Switch ID will become the Root Switch.

The Switch ID (Bridge ID) is made from two values.

  • Ø The Switch Priority which is a numerical value defined by IEEE 802.1D, which is equal to 32,768 by default.
  • Ø The MAC Address of the Switch.


What is Root Switch (Root Bridge)?

  • Ø The root bridge function is only for the spanning tree protocol.
  • Ø The other switches refer to the root switch to find redundant paths so as to ensure NO Layer 2 Loops exist.
  • Ø The main function of the root switch is to broadcast network topology changes to all the switches in the network.
  • Ø When a switch detects a topology change (i.e., a trunk goes down) it sends a topology change notification (TCN) BPDU to the root switch. The root switch then broadcasts that topology change out to the other switches.
  • Ø If each switch could broadcast change notifications to the other switches it would be total chaos.


What is Path Cost or Spanning Tree Path Cost value?

  • Ø Spanning Tree Path Cost value can be defined as the accumulated port costs from a Switch to reach the Root Switch.
  • Ø The Spanning Tree Cost Value is inversely proportional to the associated bandwidth of the path and therefore a path with a low cost value is more preferable than a path with high cost value.

The following table lists the Port Cost value for different bandwidths.

Link Speed or Link Bandwidth Cost Value
10 Gbps   2
1 Gbps   4
100 Mbps   19
10 Mbps   100


What is Root Port?

  • Ø Once the Root Switch is elected, every other Switch in the network must select a single port on itself to reach the Root Switch.
  • Ø The single selected port on a Switch with least Path Cost to reach the Root Bridge is called the Root Port.
  • Ø Root Bridge (Switch) will never have a Root Port.


See the Diagram for Root Port

root portClick on the Image to see it

The above layout of Switches shows that Switch 4 has two ports to reach the Root Bridge. If there are multiple ports present in a Switch to reach the Root Bridge (Switch). Spanning Tree Protocol Algorithm must select the best port from them to reach the Root Bridge. Here the port with least path cost (4+4=8) is marked as Root Port.


What is Spanning Tree Port Priority?

Each port of a Switch has a Spanning Tree Port Priority value associated with it, which is equal to 128 by default.


What is Spanning Tree Port ID?

  • Ø Spanning Tree Port ID is formed by adding the 4-bit port priority value (the default value of 128) to 12-bit interface identifier (total 16 bits).
  • Ø Normally, a Port ID is denoted in Hexadecimals similar as 0x8015, which is equivalent to 128.21 in decimals, where the first part is the default Port Priority number and second part is the switch interface identifier.


What is Extended System ID?

extended system idClick on Image to see it

The Extended System ID is utilized by spanning-tree to include the VLAN ID information inside 16-bit STP Bridge Priority value. Extended System ID is the least significant 12-bits in 16-bit STP Bridge Priority value.


What is PVST or PVST+?

Per-VLAN spanning tree protocol plus (PVST+) is a Cisco proprietary protocol that expands on the Spanning Tree Protocol (STP) by allowing a separate spanning tree for each VLAN.

Cisco first developed this protocol as PVST, which worked with the Cisco ISL trunking protocol, and

then later developed PVST+ which utilizes the 802.1Q trunking protocol.


What is PVST?

Cisco first developed a protocol that expands on the Spanning Tree Protocol (STP) as PVST, which worked with the Cisco ISL trunking protocol.


What is PVST+?

Cisco later developed PVST+ which utilizes the 802.1Q trunking protocol.


What is the working of PVST or PVST+?

By creating a separate spanning tree for each VLAN, data traffic from the different VLANs can take different paths across the network, as opposed to all switched traffic taking the same path. This can effectively create a load balancing situation and improve network efficiency.

By default the Cisco switches in Packet Tracer appear to be using PVST+ as the default implementation of spanning tree protocol.


What is RSTP?

Rapid Spanning Tree Protocol (RSTP) is an enhancement of the original STP 802.1D protocol. The RSTP 802.1w protocol is an IEEE open implementation.


What is Rapid-PVST+?

Cisco has its own proprietary implementation of RSTP, that includes the benefits of its Per-VLAN spanning tree protocols, called Rapid-PVST+.


What is the working of RSTP and Rapid-PVST+?

Rapid-PVST+ and RSTP are important enhancements to the original STP protocol because they can switch ports from blocking to forwarding without relying on timers, execute spanning tree calculations and converge the network faster than STP.

In STP, network convergence can take up to 50 seconds, with RSTP and Rapid-PVST+ network convergence can happen in just over 6 seconds.


CCNA- Basic Switching Interview Question & Answers

What is Switch?

A Network Switch is a device which is used to connect multiple computers inside Local Area Network (LAN).

Network Switches operate at Layer Two (Data Link Layer) of the OSI model.


What is LAN?

Local Area Network (LAN) is a network, which is limited to a small office, single building, multiple buildings, college campus etc.


What is the basic function of a Switch?

The basic function of a Switch is to forward Layer 2 packets (Ethernet frames) from source device to destination device.


What are the features of a Switch?

ü Switches are used to connect network devices together in a Local Area Network (LAN).

ü Switches can learn Layer 2 (MAC) addresses and forward Layer 2 packets (Ethernet frames) to exact destination.

ü Switches can control of who has access to various parts of the network.

ü Switches have provision to monitor network usage.


What are the differences between a Switch and Bridge?

switch and bridgeClick on the Image


What is a Switching method?

A Switching Method determines how a switch receives, processes, and forwards a Layer 2 Ethernet frame.


What are the diff Switching Methods?

Important Switching Methods are

  1. Store & Forward
  2. Cut-Through
  3. Fragment-Free


What is Store and Forward Switching?

  • Ø In Store and Forward Switching, Switch copies each complete Ethernet Frame into the switch memory and computes a Cyclic Redundancy Check (CRC) for errors.
  • Ø If a Cyclic Redundancy Check (CRC) error is found, the Ethernet Frame is dropped and if there is no Cyclic Redundancy Check (CRC) error, the switch forwards the Ethernet frame to the destination device.


What is the disadvantage of Store and Forward Switching?

Store and Forward Switching can cause delay in switching since Cyclic Redundancy Check (CRC) is calculated for each Ethernet frame.


What is Cut-Through Switching?

  • Ø In Cut-Through switching, the switch copies into its memory only the destination MAC address (first 6 bytes of the frame) of the frame before making a switching decision.
  • Ø A switch operating in cut-through switching mode reduces delay because the switch starts to forward the Ethernet frame as soon as it reads the destination MAC address and determines the outgoing switch port.


What is the disadvantage of Cut-Through Switching?

Problem related with Cut-Through switching is that the switch may forward bad frames.


What are Ethernet runt frames?

Ethernet frames smaller than 64 bytes are called Ethernet runt frames.


What is Fragment-free (runt-less switching) switching?

  • Ø Fragment-free (runt-less switching) switching is an advanced form of cut-through switching. The switches operating in cut-through switching read only up to the destination MAC address field in the Ethernet frame before making a switching decision.
  • Ø The switches operating in fragment-free switching read at least 64 bytes of the Ethernet frame before switching it to avoid forwarding Ethernet runt frames (Ethernet frames smaller than 64 bytes).


What is Half-Duplex?

  • Ø In a half-duplex Local Area Network (LAN) a device can only, either send or receive frames at a time but not both at the same time.
  • Ø In a half-duplex mode, one device sends the frame and all other devices in the collision domain listen for the frame. Collision is a problem in half duplex networks.
  • Ø Half-duplex Local Area Networks (LANs) are networks of the past.


What is Full-Duplex?

  • Ø In a Local Area Network (LAN) operating in full duplex mode, a device can send and receive frames simultaneously at the same time.
  • Ø In a full-duplex mode, there are separate channels to send and receive frames. There is no collision detection in devices operating in full duplex mode, since collision detection is not required.
  • Ø Almost all current networks operate in full-duplex mode.


What are the Basic functions of a Switch?

Three basic functions of a switch are

1. Learning; 2. Forwarding;  3. Preventing Layer2 Loops.


What is the Learning function of a Switch?

  • Ø Learning is the process of obtaining the MAC address of connected devices.
  • Ø When a frame reaches into the port of a switch, the switch reads the MAC address of the source device from Ethernet frame and compares it to its MAC address table (also known as CAM (Content Addressable Memory) table). If the switch cannot find a corresponding entry in MAC address table, the switch will add the address to the table with the port number via the Ethernet frame arrived.
  • Ø If the MAC address is already available in the MAC address table, the switch compares the incoming port with the port already available in the MAC table. If the port numbers are different, the switch updates the MAC address table new port number. This will normally happen when network administrators remove the cable from one port and attach it to another port.


What is the Forwarding function of a Switch?

  • Ø Forwarding is the process of passing network traffic of a device connected to one port of a Switch to another device connected to another port on the switch.
  • Ø When a Layer2 Ethernet frame reaches a port on the Switch, it not only reads the source MAC address of the Ethernet frame as a part of learning function, but also reads the destination MAC address as a part of forwarding function. The destination MAC address is important to determine the port number which the destination device is connected.
  • Ø As the destination MAC address is found on the MAC address table, the switch forwards the Ethernet frame via the corresponding port of the MAC address.


What is Flooding?

  • Ø If the destination MAC address is not found on the MAC address table, the switch forwards the Ethernet frame through all its ports except the source port. This is known as flooding.
  • Ø When the destination device receives the Ethernet frame and sends a reply frame to the source device, the switch reads the MAC address of the destination device and adds it to the MAC address table, which is the function of learning process.


What is Filtering?

If the source MAC address is same as the destination MAC address, the switch will drop the Ethernet frame. This is known as filtering.


What is a Redundant Link?

In practical Local Area Networking, Redundant links are created to avoid complete network failure in an event

of failure of one link.

redundant links Click on the Image


What is Disadvantage of a Redundant Link?

Redundant links can cause Layer2 Switching Loops and Broadcast Storms.


What is Layer2 Switching Loop?


What is Broadcast Storm?


What is Management VLAN?

  • Ø Management VLAN is used for managing the switch from a remote location by using protocols such as telnet, SSH, SNMP, syslog etc.
  • Ø Normally the Management VLAN is VLAN 1, but you can use any VLAN as a management VLAN.
  • Ø Cisco recommends not to use VLAN 1 and not to use any VLAN that carries user data traffic as Management VLAN.
  • Ø You must configure IP address and default gateway for Management VLAN.


Configuring Management VLAN:-


Switch#configure terminal

Switch(config)#interface vlan 1

Switch(config-if)#ip address

Switch(config-if)#no shutdown


Switch(config)#ip default-gateway