0% found this document useful (0 votes)
67 views8 pages

Switching 100 Interview Questions and Answers

The document provides a comprehensive Q&A format covering various concepts related to network switches, including differences between hubs and switches, VLANs, STP, port security, EtherChannel, and multicast traffic management. It addresses commands used for configuration and monitoring, as well as troubleshooting techniques for issues like MAC address flapping and VLAN mismatches. Overall, it serves as a quick reference guide for networking professionals dealing with Cisco switches.

Uploaded by

Sipho Mofokeng
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)
67 views8 pages

Switching 100 Interview Questions and Answers

The document provides a comprehensive Q&A format covering various concepts related to network switches, including differences between hubs and switches, VLANs, STP, port security, EtherChannel, and multicast traffic management. It addresses commands used for configuration and monitoring, as well as troubleshooting techniques for issues like MAC address flapping and VLAN mismatches. Overall, it serves as a quick reference guide for networking professionals dealing with Cisco switches.

Uploaded by

Sipho Mofokeng
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/ 8

💡 Switching Questions with Answers

1.​ Q: What is the difference between a hub and a switch?​


A: A hub broadcasts data to all ports, while a switch sends data only to the destination
MAC address.​

2.​ Q: Which layer of the OSI model does a switch operate on?​
A: Layer 2 (Data Link Layer), though multilayer switches can operate at Layer 3.​

3.​ Q: What is the default VLAN on Cisco switches?​


A: VLAN 1.​

4.​ Q: What is the purpose of VLANs?​


A: To segment a network into smaller, isolated broadcast domains.​

5.​ Q: What is the range of VLAN IDs?​


A: 1–4094. VLANs 1–1005 are normal range; 1006–4094 are extended.​

6.​ Q: What is VLAN Trunking Protocol (VTP)?​


A: A Cisco proprietary protocol used to manage VLANs across switches.​

7.​ Q: What command is used to create a VLAN on a Cisco switch?​


A: vlan <vlan-id> in global configuration mode.​

8.​ Q: What is the function of a trunk port?​


A: It carries multiple VLAN traffic between switches.​

9.​ Q: Which command enables trunking on a Cisco interface?​


A: switchport mode trunk.​

10.​Q: What is the native VLAN?​


A: The VLAN that is untagged on a trunk link (usually VLAN 1 by default).​

11.​Q: What happens if native VLANs mismatch on both ends of a trunk?​


A: It can cause VLAN leakage and security issues.​

12.​Q: How many broadcast domains exist in a 24-port switch with all ports in
different VLANs?​
A: 24 broadcast domains.​

13.​Q: What is MAC address learning in switches?​


A: Switches learn MAC addresses and map them to specific ports to forward frames
efficiently.​

14.​Q: Explain port security and its importance.​


A: Port security restricts input to an interface based on MAC addresses to prevent
unauthorized access.​

15.​Q: What are the different port security violation modes?​


A: Protect, Restrict, and Shutdown.​

16.​Q: What command is used to set port security on a switchport?​


A:

switchport port-security
switchport port-security maximum 1
switchport port-security violation restrict

17.​Q: What is STP and why is it used?​


A: Spanning Tree Protocol prevents Layer 2 loops in switched networks.​

18.​Q: What are the different STP port states?​


A: Blocking, Listening, Learning, Forwarding, and Disabled.​

19.​Q: What is the default STP mode on Cisco switches?​


A: PVST+ (Per-VLAN Spanning Tree Plus).​

20.​Q: Explain BPDU and its purpose.​


A: Bridge Protocol Data Units are messages exchanged by switches to maintain STP
topology.​

21.​Q: What is the role of a root bridge in STP?​


A: It is the central switch from which all path calculations are made.​

22.​Q: How is the root bridge elected in STP?​


A: The switch with the lowest bridge ID (priority + MAC address) becomes the root.​

23.​Q: What happens during a topology change in STP?​


A: STP recalculates the topology, which may cause temporary traffic disruption.​

24.​Q: What is the purpose of EtherChannel?​


A: To bundle multiple physical links into one logical link for redundancy and increased
bandwidth.​
25.​Q: Name two protocols used for EtherChannel negotiation.​
A: PAgP (Cisco proprietary) and LACP (IEEE 802.3ad standard).​

26.​Q: What is the difference between access and trunk ports?​


A: Access ports carry traffic for a single VLAN, while trunk ports carry traffic for multiple
VLANs.​

27.​Q: How can we prevent Layer 2 loops in a switch network?​


A: By using STP (Spanning Tree Protocol).​

28.​Q: What is the purpose of the "switchport mode access" command?​


A: It forces the interface to be an access port, disabling trunking.​

29.​Q: What does “show mac address-table” command display?​


A: It shows the MAC addresses learned by the switch and their associated interfaces.​

30.​Q: How do switches handle unknown unicast frames?​


A: They flood the frame out all ports except the one it was received on.

31.​Q: What is Rapid Spanning Tree Protocol (RSTP) and how does it improve
convergence time?​
A: RSTP (IEEE 802.1w) is a faster version of STP that provides sub-second
convergence.​

32.​Q: Explain the difference between PVST+ and RPVST+.​


A: PVST+ runs a separate STP instance per VLAN; RPVST+ does the same with faster
convergence using RSTP.​

33.​Q: What are the different STP port roles in RSTP?​


A: Root, Designated, Alternate, and Backup.​

34.​Q: How does MSTP (Multiple Spanning Tree Protocol) improve scalability?​
A: It maps multiple VLANs into a single STP instance, reducing CPU/memory usage.​

35.​Q: What are the steps to configure MST in a switch network?​


A: Define region name, revision number, VLAN-to-instance mapping, and enable MST
mode.​

36.​Q: What is root guard and how does it work?​


A: It prevents a port from becoming root port if BPDUs are received on it unexpectedly.​

37.​Q: What is BPDU guard and why is it used?​


A: It disables a port if any BPDU is received on a port that shouldn’t be participating in
STP (like access ports).​

38.​Q: How does loop guard help prevent STP failures?​


A: It prevents alternate or root ports from becoming designated when BPDUs stop being
received.​

39.​Q: What is FlexLink and how is it different from STP?​


A: FlexLink is a Cisco feature providing fast Layer 2 redundancy without using STP.​

40.​Q: What is the effect of UDLD (Unidirectional Link Detection)?​


A: It detects one-way links and disables the affected interface to prevent loops.​

41.​Q: Explain VLAN hopping and how to prevent it.​


A: An attack where traffic is injected into VLANs it doesn't belong to. Prevent by
disabling DTP and setting native VLAN to unused.​

42.​Q: How does DHCP snooping work in a Layer 2 network?​


A: It prevents rogue DHCP servers by allowing DHCP responses only from trusted
ports.​

43.​Q: What is DAI (Dynamic ARP Inspection) and where is it used?​


A: It validates ARP packets against DHCP snooping bindings to prevent ARP spoofing.​

44.​Q: How does storm control protect a switch?​


A: It limits the broadcast, multicast, and unknown unicast traffic rate on an interface.​

45.​Q: Explain the use of SPAN and RSPAN in monitoring.​


A: SPAN mirrors traffic to a local port; RSPAN does the same across switches using a
special VLAN.​

46.​Q: What are the limitations of EtherChannel load balancing?​


A: Load balancing is per flow, not perfect; depends on hashing method (e.g.,
source/destination MAC/IP).​

47.​Q: What are the conditions for forming an EtherChannel?​


A: Same speed/duplex, same VLANs, trunking mode, and compatible EtherChannel
protocol.​

48.​Q: What is FEX (Fabric Extender) in Cisco Nexus architecture?​


A: It extends a parent switch fabric and is managed as a single logical switch.​

49.​Q: What is MAC address flapping and how can you troubleshoot it?​
A: It occurs when a MAC address keeps changing its associated port—usually due to
loops or misconfigurations.​

50.​Q: How do switches handle multicast traffic using IGMP snooping?​


A: By listening to IGMP messages and forwarding multicast traffic only to interested
receivers.​

51.​Q: What is the command to view VLAN information on a switch?​


A: show vlan brief.​

52.​Q: What does the command switchport mode dynamic desirable do?​
A: It initiates trunk negotiation using DTP.​

53.​Q: Can two switches form a trunk if both ports are set to access mode?​
A: No, both ports must support and negotiate trunking.​

54.​Q: What is the maximum number of secure MAC addresses you can configure per
port by default?​
A: One.​

55.​Q: What does the command errdisable recovery cause do?​


A: It configures recovery from err-disabled state for specific causes like BPDU Guard.​

56.​Q: How can you manually recover a port from an err-disabled state?​
A: Shut and then no shut the interface.​

57.​Q: Which command shows STP topology information for all VLANs?​
A: show spanning-tree.​

58.​Q: What causes a port to enter blocking state in STP?​


A: To prevent loops if it receives a superior BPDU.​

59.​Q: What’s the default STP bridge priority?​


A: 32,768.​

60.​Q: How do you manually set a switch as the root bridge?​


A: Use spanning-tree vlan <vlan-id> priority 0.​

61.​Q: How does a switch handle broadcast frames?​


A: Broadcasts them to all ports except the source.​

62.​Q: What is the command to verify if a port is in trunk mode?​


A: show interfaces trunk.​
63.​Q: Can port security be applied on a trunk port?​
A: No, it’s only for access ports.​

64.​Q: What’s the purpose of VTP pruning?​


A: To restrict VLAN broadcast traffic on trunk links to only VLANs in use.​

65.​Q: What’s the default VTP mode of a Cisco switch?​


A: Server mode.​

66.​Q: Which command disables DTP negotiation?​


A: switchport nonegotiate.​

67.​Q: What’s the use of the command switchport trunk allowed vlan?​
A: It specifies which VLANs are permitted on a trunk.​

68.​Q: How does a switch prevent MAC flooding attacks?​


A: By enabling port security with MAC address limits.​

69.​Q: What is an orphan port in MST?​


A: A port that loses connectivity to its MST root bridge.​

70.​Q: What is the result of a VLAN mismatch on trunk ports?​


A: Connectivity issues and possibly VLAN leakage.​

71.​Q: What command shows learned MAC addresses per VLAN?​


A: show mac address-table vlan <vlan-id>.​

72.​Q: What is the role of the Designated Port in STP?​


A: It forwards traffic toward and away from a segment.​

73.​Q: What protocol is used by STP to detect loops?​


A: BPDU (Bridge Protocol Data Unit).​

74.​Q: What’s the effect of using the spanning-tree portfast command?​


A: Port transitions to forwarding state immediately, ideal for end devices.​

75.​Q: Can PortFast be used on trunk ports?​


A: No, only on access ports.​

76.​Q: What’s the difference between PAgP and LACP?​


A: PAgP is Cisco proprietary, LACP is IEEE standard.​
77.​Q: What command shows EtherChannel status?​
A: show etherchannel summary.​

78.​Q: What is the minimum number of links required to form EtherChannel?​


A: Two.​

79.​Q: What could cause an EtherChannel to fail?​


A: Mismatched configurations on member interfaces (speed, duplex, VLAN).​

80.​Q: What is SPAN used for?​


A: Monitoring and analyzing traffic on a switch port.​

81.​Q: What happens if two switches are connected with mismatched trunk settings?​
A: Trunk may not form, or VLAN leakage may occur.​

82.​Q: What is meant by “sticky” MAC addresses in port security?​


A: Dynamically learned MACs are stored in config.​

83.​Q: Which port security mode sends logs but doesn't shut the port?​
A: Restrict.​

84.​Q: What is the command to set a native VLAN?​


A: switchport trunk native vlan <vlan-id>.​

85.​Q: How can you verify if a port is in error-disabled state?​


A: show interfaces status err-disabled.​

86.​Q: What type of traffic is filtered by Dynamic ARP Inspection (DAI)?​


A: Spoofed ARP packets.​

87.​Q: What feature limits the rate of ARP messages per port?​
A: ARP rate limiting.​

88.​Q: What causes MAC address flapping?​


A: The same MAC address is seen on multiple ports, possibly due to loops.​

89.​Q: How does storm control work?​


A: It limits the amount of broadcast, multicast, and unknown unicast traffic.​

90.​Q: What’s the command to configure storm control?​


A: storm-control broadcast level 50.​
91.​Q: What is the purpose of IGMP Snooping?​
A: Controls multicast traffic delivery to only interested hosts.​

92.​Q: How does a switch forward multicast traffic without IGMP snooping?​
A: It floods multicast traffic like broadcast.​

93.​Q: What command shows if IGMP snooping is enabled?​


A: show ip igmp snooping.​

94.​Q: What is a CAM table?​


A: Content Addressable Memory table stores MAC-to-port mappings.​

95.​Q: What happens if a switch’s CAM table is full?​


A: It floods all incoming frames, similar to a hub.​

96.​Q: What is FHRP and how does it relate to switching?​


A: First Hop Redundancy Protocol; ensures default gateway redundancy.​

97.​Q: Can EtherChannel load balance across VLANs?​


A: Yes, depending on hashing algorithm used.​

98.​Q: What hashing methods are available in EtherChannel?​


A: Source IP, Destination IP, Source MAC, Destination MAC, etc.​

99.​Q: What’s a floating static MAC address?​


A: A MAC address learned dynamically on more than one port — usually due to
misconfiguration.​

100.​ Q: How do you clear a MAC address from the MAC table?​
A: clear mac address-table dynamic.​

You might also like