Switch VLAN Interview Questions

  • By
  • March 6, 2020
  • Networking
Switch VLAN Interview Questions

Cisco | CCNA | Switch | VLAN | Interview Questions

Hello friends, welcome back to my Networking Interview Questions Blog series. This is my fifth blog in this series. Before this, I covered interview questions on Basic Networking, Routing Part-I and Part-II, and Subnetting.  Now, in this blog, I am going to cover another domain of CCNA, the Switching interview questions, and answers. With this, I am also covering questions on a very interesting and useful topic in this switching domain i.e. VLAN.

So let’s start with Switching –

What is Switching?
Switching is a function to switch data frames between nodes on the same network.

Define Switch?
A Switch is a device that is used as a central device in Star Topology to connect multiple devices inside the Local Area Network (LAN). A switch examines each frame using source and destination MAC address and process it accordingly. Hence it works on Unicast rather than simply broadcasting the data. Switches operate at Data Link Layer (Layer Two) of the OSI model where they divide the collision domain.

Explain the functions of a Switch?
The Switch performs the following three main functions:-
1. Address learning – Learn the sender’s MAC address from the received frame and enters it into the MAT.
2. Frame forwarding/filtering – Using MAC Address Table (MAT).
3. Loop avoidance by Spanning Tree Protocol (STP).

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

Give the difference between a HUB, Switch & Router?
Hub is designed to connect hosts to each other in Star topology. Hub has no understanding of what it is transferring. When it receives data from a connected device, it broadcasts that data to all other ports regardless of the destination port. HUB operates at the first Layer (1- Physical Layer) of the OSI model. It is a non-intelligent network device.

Switch also connects hosts to each other like a hub in a Star Topology. But, Switch varies from a hub in the way it handles data. When a switch receives a frame, it determines what hosts the packet is intended for using the MAC address and sends it to that hosts only. It does not broadcast the packet to all the hosts like Hub, which means bandwidth is not shared and the network becomes more efficient. A switch operates at the second layer (2- Data Link Layer) of the OSI model.

A Router provides WAN connectivity. Unalike from a switch or hub, it connects two or more different networks using source and destination IP addresses. Its function is to route data packets to other networks, using the best route among all available routes. Routers operate at the third Layer (3- Network Layer) of the OSI model.

What is a MAC address table (MAT) and how a switch will build a MAT?
One of the functions of a Switch is to filter and forward the frames. To switch frames between LAN ports efficiently, the switch maintains an address table called MAT – MAC address Table or CAM – Content Addressable Memory Table. 

By using the Source MAC address of the frames received, the switch dynamically builds this MAC address table. When the switch receives a frame, the source MAC address is learned and recorded in the MAT along with the port of entrance, timestamp, and VLAN. The switch then used this table to determine where to forward frames on a LAN.

How does Switch learn Mac Address to build MAT?
When a frame approaches the port of a switch, the switch reads the MAC address of the source node from the Ethernet frame. The switch then compares it to its MAC address table entries. If the switch does not find a matching entry in the MAC address table, a switch will add the address to the table along with the port number at which the Ethernet frame is reached.
If the switch finds a match of the MAC address in the MAC address table, then it compares the incoming port with the port already available in the CAM table. If the ports are the same, the switch starts frame forwarding function. But, if the port numbers are a mismatch, then switch updates the MAC address table with the new port number.

How does Switch perform forwarding function?
When a Layer 2 Ethernet frame receives on a port to the switch, it reads the source MAC address of the Ethernet frame as a part of the learning function. After updating the MAT, the switch also reads the destination MAC address for the next forwarding function. By using this destination MAC address switch has to determine the port to which the destination device is connected to forward the frame. The Switch compares the destination MAC address on the MAC address table and forwards the Ethernet frame via the corresponding port of that MAC address.

What is Flooding?
The flooding will happen when a switch does not find any match for the destination MAC address in the MAC address table. In this situation, the switch will forward the frame to all of its ports except the port on which the frame was received. 

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

What is a CD – Collision Domain and a BD – Broadcast Domain?
Collision Domain – It is a group of nodes such that if two or multiple nodes try to transmit data at the same time, it will lead to a collision after which those nodes must retransmit data, one at a time. This happens in a hub and repeater environment as each port is connected with the same link. Hence repeater and hub create a single collision domain. 

If two nodes transmit data simultaneously without collision, then they are work in different collision domains. Hence, each port on a bridge, a switch or router is in a separate collision domain or in other words they create multiple Collison domains.

Broadcast Domain – It is a group of nodes such that if any node transmits the broadcast packet, it will be delivered to every other node in the Broadcast domain. If any node will not receive that packet, it is in the different Broadcast domain.

On-device level, Repeater, Hub, and Switch work in the same Broadcast domain by default. In contrast, the Router’s main property is that it does not forwards broadcast packets. And hence all ports on a router are in the different broadcast domains.

Compare HUB and Switch with reference to collision and broadcast domain?
Hub is a multiport but a single link device. It does always broadcasting and hence more collision are there with a hub. So with the hub, there is one collision domain and one broadcast domain.
The Switch is a multiport and multilink device. It works on unicasting using MAC address and hence fewer collisions are there with switch. So with Switches, there are multiple collision domains and one broadcast domain.

What is a VLAN and what are the advantages of VLAN?
A logical grouping of network nodes and resources connected to administratively managed ports on a catalyst switch is called a VLAN. Only Manageable or Catalyst switches support VLAN. No two VLANs can communicate i.e. VLAN separates the broadcast domain. So the broadcasted frames on the network will be only switched between the ports logically grouped within the same VLAN. 

As VLAN is logically grouping the nodes, hence there is no need to change physical position or IP address. Broadcast traffic will reduce to a great extent. Along with this network security will also improve.

Explain the difference between an Access port and a Trunk port?
Switch ports can be configured as an Access or a Trunk port. By default, all ports of the switch are Access ports.

Access port – Access port belongs to and transmit the traffic of only one VLAN at a time. Any data frame received on an access port is simply supposed to belong to the VLAN configured on that port. As VLANs cannot communicate directly with each other, Access-link nodes cannot communicate with nodes outside their VLAN unless the packet is routed. Switches remove any VLAN information from the frame before it will have forwarded out to an access-link node. Hence any device attached to an access link is unaware of a VLAN membership.

Trunk Port – Trunk port is not belonging to any particular VLAN. It can transmit the data traffic of multiple VLANs simultaneously. Generally, a Trunk link is configured between the switch to switch or switch to the router. Switches add VLAN number to the frame before it will have forwarded out to a trunk-link. Trunk ports can transmit tagged traffic to configured VLAN and untagged traffic to native VLAN simultaneously.

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

What is Frame Tagging?
Frame tagging is a process that uniquely assigns a VLAN ID to each frame that will be forwarded out from the trunk link. When frame transmits between different switches or between switch and router for routing, this tagging is used to identify the VLAN that the frame belongs to. 

What are the different types of Frame Tagging?
Frame Tagging Method has mainly two types, given as below:-
1.Inter-Switch Link (ISL)
2.802.1Q or dot1q
These methods are also called Frame Encapsulation Protocols.

Give the difference between ISL and 802.1Q?
Inter-Switch Link (ISL) – This is the Cisco proprietary protocol, which means unlike the other one, it can be configured only between Cisco switches. In the ISL method, 26 Bytes Header and 4 Bytes Trailer is added with Original Ethernet Frame.

802.1Q (dot1q) – This is an open standard protocol created by the IEEE (Institute of Electrical and Electronics Engineers). It can be used by any vendor’s switch. Compare to ISL, it is a Light Weighted Protocol.  In the dot1q method, only 4 Byte field is inserted within Frame’s Header.

What is a Native VLAN?
A default VLAN ID is configured on the Trunk port. This VLAN is called the Native VLAN. Generally, by default VLAN 1 (default VLAN) is Native VLAN, but can be changed to any VLAN number.

What type of traffic will be transmitted through Native VLAN?
Through Native VLAN, usually, all untagged traffic will be transmitted. When any frame transmitted through the trunk port, it will be tagged with a VLAN ID. But any untagged or tagged frame with the unassigned VLAN ID is supposed to belong to the Native VLAN.

What is Inter-VLAN Routing?
As we know, VLANs divide broadcast domains in a LAN environment. So, by default, only nodes of the same VLAN can communicate and there will no direct communication within the different VLANs. 

Whenever we want that nodes in one VLAN need to communicate with hosts in other different VLANs, the data traffic must be routed between them. This means we need to configure the Router to communicate between different VLANs. This is referred to as Inter-VLAN routing.

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

What are Sub Interfaces on Router?
To support Inter-VLAN i.e. Dot1Q or ISL routing on a Fast Ethernet interface, the router’s interface is divided into logical interfaces—one for each VLAN. These are called subinterfaces and numbered according to the VLAN number.

Here I am concluding my first part of questions on Switching and VPN. We will meet soon with interview questions on STP, VTP, and EtherChannel. Till then, All the Best!!

IF you google for CCNA classes in Pune, you will definitely get SevenMentor in the topmost searches. Here we cover the CCNA global certification syllabus with hands-on practice on physical devices. We are the best CCNA training in Pune with 24*7 lab availability and extra exposure to the industrial requirements. In SevenMentor you can get classes for advance courses also like CCNA security training, CCNP training, CCIE training, SD-WAN training, Juniper training, and many more in other domains also like Microsoft, Linux, Cloud Computing.

 

Author:- Sumaiyya Suhail Bagwan
Department Name:- Networking
Designation:- Technical Trainer

Call the Trainer and Book your free demo Class for now!!!

call icon© Copyright 2020 | Sevenmentor Pvt Ltd.

 

Submit Comment

Your email address will not be published. Required fields are marked *

*
*