Networker Interview

Prepare for CCNA, CCNP, CCIE Interview !

header photo

Switching Interview Questions and Answers

What is Switching?
The function of Switching is to switch data packets between devices on the same network.

What is Switch?
A Switch is a device which is used to connect multiple devices inside Local Area Network (LAN). Unlike hubs, a switch examines each packet and process it accordingly rather than simply repeating the signal to all ports. Switches operate at Layer Two (Data Link Layer) of the OSI model.

What is the difference between a HUB, Switch & Router?
Hub is designed to connect hosts to each other with no understanding of what it is transferring. When a Hub receives a packet of data from a connected device, it broadcasts that data packet to all other ports regardless of the destination port. HUB operates at Layer 1 (Physical Layer).

Switch also connects hosts to each other like a hub. Switch differs from a hub in the way it handles packets. When a switch receives a packet, it determines what hosts the packet is intended for and sends it to that hosts only. It does not broadcast the packet to all the hosts as a hub does which means bandwidth is not shared and makes the network more efficient. A switch operates at Layer 2 (Data Link Layer).

A Router is different from a switch or hub since its function is to route data packets to other networks, instead of just the local network. Routers operate at Layer 3 (Network Layer).

What are the functions of a Switch?
The Switch performs three major functions:-
1. Address learning.
2. Packet forwarding/filtering.
3. Loop avoidance by Spanning Tree Protocol.

What is Sub Interface?
To support ISL or 802.1Q routing on a Fast Ethernet interface, the router’s interface is divided into logical interfaces—one for each VLAN. These are called subinterfaces.

What is a Broadcast Domain and a Collision Domain?
Broadcast Domain - Broadcast is a type of communication, where the sending device sends a single copy of data and that copy of data will be delivered to every other device in the network segment. A Broadcast Domain consists of all the devices that will receive every broadcast packet originating from any device within the network segment.  All ports on a hub or a switch are by default in the same broadcast domain. All ports on a router are in the different broadcast domains and routers don't forward broadcast.
Collision Domain - It is a network scenario where one particular device sends a packet on a network segment forcing every other device on that same segment to pay attention to it. At the same time, if a different device tries to transmit simultaneously, it will lead to a collision after which both devices must retransmit, one at a time. This situation is often in a hub environment because each port on a hub is in the same collision domain. By contrast, Each port on a bridge, a switch or router is in a separate collision domain.

Compare HUB and Switch with respect to broadcast and collision domain?
In the hub, there is one collision domain and one broadcast domain.
In a switch, there is multiple collision domains and one broadcast domain.

What is a MAC address table and how a switch will build a MAC table?
To switch frames between LAN ports efficiently, the switch maintains an address table called MAC address Table or CAM Table (Content Addressable Memory Table). When the switch receives a frame, source MAC address is learned and recorded in the CAM table along with the port of arrival, VLAN and time stamp. The switch dynamically builds the MAC address table by using the Source MAC address of the frames received. This table is then used by the switch to determine where to forward traffic on a LAN.

How does Switch learn Mac Address?
When a frame reaches to the port of a switch, the switch reads the MAC address of the source device from the Ethernet frame and compares it to its MAC address table (also known as CAM (Content Addressable Memory) table). If the switch does not find a corresponding entry in the MAC address table, the switch will add the address to the table with the port number at which the Ethernet frame is received.
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 with the new port number.

How does Switch perform forwarding function?
When a Layer 2 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 to 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.

Explain Flooding?
If the destination MAC address is not found in the MAC address table, the switch forwards the frame out all of its ports except the port on which the frame was received. This is known as flooding.

 

Go Back



Comment