0% found this document useful (0 votes)
3K views14 pages

Switching Interview Questions and Answers Vol 1.0

A switch is a networking device that connects devices on a computer network by receiving and forwarding data packets to their destination based on MAC address lookups. It operates at the data link layer (layer 2) of the OSI model. When a switch receives a frame, it determines the destination port based on its MAC address table and sends the frame only to that port, unlike a hub which floods frames to all ports. Switches can create virtual LANs (VLANs) and use spanning tree protocol to prevent loops.

Uploaded by

Eduardo Aguilar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views14 pages

Switching Interview Questions and Answers Vol 1.0

A switch is a networking device that connects devices on a computer network by receiving and forwarding data packets to their destination based on MAC address lookups. It operates at the data link layer (layer 2) of the OSI model. When a switch receives a frame, it determines the destination port based on its MAC address table and sends the frame only to that port, unlike a hub which floods frames to all ports. Switches can create virtual LANs (VLANs) and use spanning tree protocol to prevent loops.

Uploaded by

Eduardo Aguilar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Switching Questions & Answers

Ques 1. What is network switching?

Switching is a process of forwarding the Ethernet frames by doing lookup on the source and
destination MAC address fields of the Ethernet frames.

Ques 2. What is a Switch?

A network switch is a networking device that connects devices together on a computer network
by using packet switching to receive, process, and forward data to the destination device. A
switch operates at the layer 2 of the OSI model and looks up on the Ethernet frames to forward
the frames out from relevant ports. When a switch receives a frame, it determines what end
point the frame is intended to based on mac entry table (mapped to ports where endpoints are
connected) in the switch is intended for and sends it to that endpoint only.

Ques 3. What is difference between Broadcast Storm Control and Flow Control?

 Broadcast Storm Control used in scenarios where we are required to limit broadcast and
multicast traffic to acceptable levels so as to mitigate STP loops. Product manufacturers also
have provision to limit Unicast and Multicast storms.

 Flow Control is used to address the condition where traffic on a link may be generated faster
than the receiver can handle it. Flow control is not intended to address issue of STP loops.
"Ethernet Flow control" is used when one end point on an Ethernet network segment
cannot cope with the rate that pockets are being sent to it.
Ques 4. What is difference between Switch and Hub?

Ques 5. What is Difference between Bridge and Switch?


Ques 6. What are functions of a Switch?

• Forward/Filter decisions - To receive the Ethernet frames from any source device connected
to it and forward it to appropriate destination device.

• Address Learning - To learn the MAC addresses of the source and destinations connected to
it and collate all information into its MAC tables.

• VLANs - Switches are used to create virtual LAN environments at Layer 2 of the OSI model.

 Loop Avoidance - It is the function of a network switch to prevent layer 2 switching loops
and broadcast storms. A network switch running STP uses following port states – Blocking,
Listening, Learning and Forwarding

Ques 7. What is the difference between manageable and unmanageable switches?

 Unmanaged switches have no configuration interface or options. They are plug-and-play.


They are typically the least expensive switches, found in home, SOHO, or small businesses.
They can be desktop or rack mounted.

 Manageable switches have one or more ways, or interfaces, to modify the operation of the
switch. Common management methods include: a serial console or Command Line Interface
accessed via telnet or Secure Shell. You can manage these switches remotely and make the
configuration changes on them.

Ques 8. What is a Broadcast domain and Collision Domain?

Collision domain is that part of the network where a collision can occur. A collision occurs when
two devices send a packet at the same time on the shared network segment. The packets collide
and both devices must send the packets again, which reduces network efficiency. Each hub has
only a single collision domain while number of collision domains in a switch is equal to the
number of ports on the switch.

A broadcast domain is a domain in which a broadcast is forwarded. A broadcast domain


contains all devices that can reach each other at the data link layer (OSI layer 2) by using
broadcast. 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 broadcasts from
one broadcast domain to another.

Ques 9. What is a MAC address table?

MAC address-table also known as the CAM table sometimes is a table in the memory buffers of
the switch containing a database of the MAC addresses that the switch learns from the frames
entering the switch ports. MAC table contains mapping as to what MAC address connects to
which port and in which VLAN. You can check a MAC table on switch using command “show mac
address-table”. Entries of MAC table are aged out every 300 seconds if not refreshed before this
timer.

Ques 10. How will Switch build a MAC Address table?

A switch when receives any layer 2 frame it reads what the source MAC address in the frame is
and on what port it is learnt. Switch stores the source MAC address in the MAC table as
connected to the interface on which the frame is received. Then switch will check what the
destination MAC address on the frame is. If the destination MAC address is found in the MAC
table switch forwards the frame through the port which connects to that MAC address else this
frame is sent out of all ports of the switch in an attempt to find the destination MAC address and
this is also known as unknown unicast flooding.

Ques 11. What are the different Modes of Switch Operations?

Different modes of Switch Operation are –

• Store & Forward


• Cut-Through and

• Fragment Free

In Store-and-forward mode, switch waits for whole of frame to be received and at the end of
that frame, the switch will compare the last field of the datagram against its own frame-check-
sequence (FCS) calculations, to help ensure that the packet is free of physical and data-link
errors. The switch then performs the forwarding process.

In Cut-Through mode, when a frame is received, the switch copies the destination address to its
onboard buffers. The fact that the frame is forwarded as soon as the destination address is read
and the outgoing interface is determined, results in decreasing latency. However, we have
caveat here - With cut-through switching the Switch may forward bad frames.

In Fragment Free mode, the switch first checks the initial 64 bytes of a frame for fragmentation
before the frame is forwarded. This is done to avoid possible collisions. While cut-Through mode
only considers the destination mac address before forwarding the frame , Fragment free checks
the atleast 1st 64 bytes before forwarding the frame towards destination.

Ques 12. How does switch perform forwarding function?

A switch when receives any layer 2 frame it reads what the source MAC address in the frame is
and on what port it is learnt. Switch stores the source MAC address in the MAC table as
connected to the interface on which the frame is received. Then switch will check what the
destination MAC address on the frame is. If the destination MAC address is found in the MAC
table switch forwards the frame through the port which connects to that MAC address else this
frame is sent out of all ports of the switch in an attempt to find the destination MAC address and
this is also known as unknown unicast flooding.

Ques 13. Explain Flooding?

When the switch receives a frame that is destined for an end station that it hasn’t yet seen (not
in CAM table) , the switch will send the frame out all of the ports other than the port on which it
arrived. This process is called flooding.

Ques 14. PC is connected to switch port 23. The switch has learned the mac address of the PC.
The port is now shutdown. Will the switch retain the mac address?

The switch will immediately flush the MAC address entry from the switch instead of waiting for
300 seconds timer to expire.

Ques 15. In layer 2 domain do we need IP Address for communication?

IP address is not required for communication I layer 2 domain.


Ques 16. What is MAC Address?

MAC address is also known as layer 2 address which is burnt in the Network card of a network
device and cannot be altered. MAC address is of 48 bits or 6 bytes. Every NIC (also called LAN
card) has a hardware address that's known as a MAC, for Media Access Control. The MAC
address is sometimes referred to as a networking hardware address, the burned-in address
(BIA), or the physical address

As shown in the above diagram, MAC addresses are 12-digit hexadecimal numbers (48 bits in
length). By convention, MAC addresses are usually written in one of the following formats:

MM:MM:MM:SS:SS:SS or MMMM-MMSS-SSSS format.

Ques 17. What is Store-and-Forward

Store-and-Forward Switching Mode: When store-and-forward switching is enabled, the switch


checks each frame for cyclic redundancy check (CRC) errors before forwarding them to the
network. Each frame is stored until the entire frame has been received and checked. Because it
waits to forward the frame until the entire frame has been received and checked, the switching
speed in store-and-forward switching mode is slower than the switching speed in cut-through
switching mode.
Ques 18. What are different Switch modes of Operation?

Different modes of Switch Operation are –

• Store & Forward

• Cut-Through and

• Fragment Free

In Store-and-forward mode, switch waits for whole of frame to be received and at the end of
that frame, the switch will compare the last field of the datagram against its own frame-check-
sequence (FCS) calculations, to help ensure that the packet is free of physical and data-link
errors. The switch then performs the forwarding process.

In Cut-Through mode, when a frame is received, the switch copies the destination address to its
onboard buffers. The fact that the frame is forwarded as soon as the destination address is read
and the outgoing interface is determined, results in decreasing latency. However, we have
caveat here - With cut-through switching the Switch may forward bad frames.

In Fragment Free mode, the switch first checks the initial 64 bytes of a frame for fragmentation
before the frame is forwarded. This is done to avoid possible collisions. While cut-Through mode
only considers the destination mac address before forwarding the frame , Fragment free checks
the atleast 1st 64 bytes before forwarding the frame towards destination.

Ques 19. Which command will show directly connected neighbors?

‘Show cdp neighbors’ command can be used to fetch the details of directly connected
neighbors. This will work only for the Cisco devices.
Ques 20. A switch port operating in full duplex mode is connected to a PC operating in half
duplex. What would be the effective duplex settings for the communication?

If the both ends don’t have a common duplex setting the switch will fall back to the half-duplex
setting which is the by default for the switch.

Ques 21. A layer 2 switch has 5 PC’s connected to its ports. After restarting the switch, what
would happen to the mac-address table of the switch?

After the switch is restarted all its MAC table entries will be flushed and it will again wait to
receive the frames on its ports from the switches to learn the MAC addresses dynamically.

Ques 22. What is difference between packet switch and circuit switch network?

Ques 23. Your internet work consists entirely of Cisco devices. You have given a command
"show cdp neighbors". In the response, you get "S" under the head "Capability". What does the
letter "S" mean?

‘S’ under capability in show cdp neighbors output stands for Switch connected at far end.

Ques 24. Describe UTP cable?

The UTP cable consists of pairs of wires twisted together. This is one of the most basic methods
used to help prevent electromagnetic interference.
Ques 25. Which layer in OSI model does switch work on?

Switch works on the layer 2 of the OSI model.

Ques 26. A 24 port switch receives a frame with destination mac-address unknown. To how
many ports will the frame be flooded?

The frame will be flooded out of 23 ports and won’t be flooded on the port from which it was
received.

Ques 27. Which LAN switching method is used in CISCO Catalyst switches?

In the today’s world switches use the store-and-forward switching mechanism.

Ques 28. How does cut-through LAN switching work?

Cut-Through Switching Mode: This mode is enabled by default. Switches operating in cut-
through switching mode start forwarding the frame as soon as the switch has read the
destination details in the packet header. A switch in cut-through mode forwards the data before
it has completed receiving the entire frame. The switching speed in cut-through mode is faster
than the switching speed in store-and-forward switching mode.

Ques 29. What is CSMA/CD?

CSMA/CD also known as Carrier Sense Multiple Access/Collision Detection is a collision


avoidance mechanism used in the hubs. In this any host is already transmitting frames on the
wire and at same time another host tries to send a frame a collision occurs and then the new
host stops sending the frames as a back-off algorithm is kicked in which stops the forwarding of
frame from second host for a random interval of time.
Ques 30. What is 10BaseT and 100Base T Ethernet LANs?

10BASET has a transmission speed of 10Mbps.

100BASET has a transmission speeds of 100Mbps.

Ques 31. What is a characteristic of Store and Forward switches?

In Store-and-forward mode, switch waits for whole of frame to be received and at the end of
that frame, the switch will compare the last field of the datagram against its own frame-check-
sequence (FCS) calculations, to help ensure that the packet is free of physical and data-link
errors. The switch then performs the forwarding process.

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 then performs the forwarding process to the
destination device.

Ques 32. Where would you use cross and straight cable?

Straight cable will be used between a switch and a router and a cross cable will be used between
switch and switch. In simple terms –

Straight-Through Cable is used for –

 DCE to DTE

Cross-Through cable is used for –

 DCE to DCE

 DTE to DTE
Ques 33. Which configuration mode would you use to configure a particular port on a switch?

Interface configuration mode under privilege mode will be used to configure a port on switch.

Ques 34. Which LAN switch type waits for the collision window to pass before looking up the
destination hardware address in the MAC filter table and forwarding the frame?

Fragment Free Mode

Ques 35. What does a switch do when a frame is received on an interface and the destination
hardware address is unknown or not in the filter table?

Switch will forward/Broadcast the frame out from all ports except the port on which it has
received the frame.

Ques 36. What is the result of segmenting a network with a bridge or switch?

Bridges break up collision domains, which would increase the number of collision domains in a
network and also make smaller collision domains.

Ques 37. If a switch receives a frame and the source MAC address is not in the MAC address
table but the destination address is, what will the switch do with the frame?

The switch will learn the source MAC address and update its MAC table and will forward the
frame to the destination port without flooding through all ports.

Ques 38. What command will display the forward/filter table?

Show mac address-table is used to check the forward/filter table.

Ques 39. What type of RJ45 UTP cable is used between switches?

RJ45 UTP crossover cable.


Ques 40. You need to allow only one host (any host) to be permitted to attach to each switch
interface. Which commands must you configure on your catalyst switch to meet this policy?

Switch (config-if)# Switchport port-security maximum 1

The above command allows only one host (one MAC address only) on interface to be allowed
communication via each port.

Ques 41. You have created VLAN 10 and would like to place Fast Ethernet port 0/2 in VLAN
10. Which command would you use?

Commands to make Fa0/2 a member of VLAN 20 -

• int fa0/2

• Switchport mode access

• Switchport access vlan 20


Ques 42. You want to ensure that only VLAN 10 and VLAN 20 traffic can pass over a trunk link.
Which command would you use?

Switchport trunk allowed vlan 10, 20

Ques 43. Which LAN switch type only checks the hardware address before forwarding a
frame?

Cut-Through Switching

Ques 44. Which protocol is used to facilitate the management of VLANs?

VTP (VLAN trunking protocol) a cisco proprietary protocol is used for the management of the
VLANs.

Ques 45. Which LAN switch method runs a CRC on every frame?

Store and forward switching will perform CRC on the frame before forwarding it.

Ques 46. You wish to configure an EtherChannel link made up of two Fast Ethernet trunk
ports without any negotiations. What command would you use when configuring the interfaces?

Channel-group 1 mode on

Ques 47. What is difference between half duplex and full duplex mode?

Full-duplex communication between two components means that both can transmit and receive
information between each other simultaneously.

In half-duplex systems, the transmission and reception of information must happen alternately.
While one point is transmitting, the other must only receive. Example Walkie-Talkie.
Ques 48. Your switch has a port status LED that is alternating between green and amber.
What could this indicate?

This condition indicates a STP loop in the switches network. When the port is Amber it is going in
blocked state and green means it is in forwarding state.

Ques 49. How does a host on an Ethernet LAN know when to transmit after a collision has
occurred?

After a collision occurs the time for forwarding the frame again is determined by a back-off
algorithm which selects a random time.

Ques 50. Which fields are contained within an IEEE Ethernet frame header?

An Ethernet frame header has the following fields:

 Preamble: 7 bytes

 SFD (Software Frame Delimiter): 1 byte

 Destination MAC: 6 bytes

 Source MAC: 6 bytes

 Type: 2 bytes

 Data: Minimum should be 46 bytes else padding will be required

 FCS: 4 bytes

You might also like