Routing & Switching Interview Questions Computer Networks (original) (raw)

Last Updated : 1 Sep, 2025

Routing and switching are functions of computer networks that determine how data travels from source to destination. Switching operates within a network to forward frames based on MAC addresses, while routing selects optimal paths across networks using IP addresses and routing protocols.

1. Differentiate between store-and-forward switching and cut-through switching. How does each impact network latency and error handling?

**Store-and-Forward Switching:

**Cut-Through Switching:

2. Explain how routing loops occur and discuss mechanisms to prevent them in distance-vector protocols.

**Cause: Routing loops occur when routers have inconsistent or outdated routing information, causing packets to circulate endlessly.

**Prevention in Distance-Vector Protocols (e.g., RIP):

**Benefit: These mechanisms reduce count-to-infinity problems and improve network stability.

3. In what scenario would you choose static routing over dynamic routing despite network growth? Justify your answer.

**Scenarios:

**Example: A branch office with one uplink to HQ can use static routing since topology changes are rare and security/simplicity are prioritize

4. How does VLAN tagging work in switches, and what problem does the 802.1Q standard solve?

**VLAN Tagging:

**802.1Q Standard:

**Distance-Vector (e.g., RIP, EIGRP in hybrid mode):

**Link-State (e.g., OSPF, IS-IS):

**Convergence Speed:

6. Explain the role of ARP in a switched network and how ARP spoofing can be mitigated.

**Role of ARP:

**ARP Spoofing Attack:

**Mitigation Techniques:

7. How do routers perform path selection when multiple routes to the same destination exist? Explain with administrative distance and metric.

**Administrative Distance (AD):

**Metric:

**Tie Case: If both AD and metrics match, routers can perform Equal-Cost Load Balancing (ECMP), distributing traffic across multiple paths.

8. What is ECMP (Equal-Cost Multi-Path) routing, and when can it cause packet reordering?

**Definition:

**Packet Reordering Issue:

**Mitigation: Use per-flow (hash-based) load balancing, ensuring packets of the same flow always follow the same path.

9. Describe the Spanning Tree Protocol (STP) and how Rapid STP improves upon it.

**Spanning Tree Protocol (STP):

**Rapid Spanning Tree Protocol (RSTP, IEEE 802.1w):

10. In a multi-router setup, how does route redistribution work, and what problems can it introduce?

**Route Redistribution:

**Problems Introduced:

**Solutions:

11. How does ECMP (Equal-Cost Multi-Path) routing improve network performance, and what are its limitations?

**Improvement:

**Limitations:

12. Why is TTL (Time-to-Live) important in IP packets, and how can it help in detecting routing loops?

13. How does MPLS (Multiprotocol Label Switching) differ from traditional IP routing, and why is it preferred in large service provider networks?

Traffic Engineering (TE) -> optimized path selection.
VPN support (L3VPN, L2VPN).
QoS prioritization.

14. Explain how VLAN trunking works and why tagging is necessary.

**VLAN Trunking:

**Tagging (IEEE 802.1Q):

**Why Necessary:

15. Why is OSPF considered a hierarchical routing protocol, and what advantages does this hierarchy provide?

**Scalability: Reduces size of LSDB (Link State Database).
**Faster convergence: Changes are contained within an area.
**Efficient routing: Summarization at ABRs reduces routing table size.

16. Why can asymmetric routing cause issues in stateful firewalls, and how is it mitigated?

**Asymmetric Routing:

**Problem in Stateful Firewalls:

**Mitigation:

17. How do L3 switches differ from routers in packet forwarding, and when would you choose one over the other?

**Layer 3 Switches:

**Routers:

**Choice:

18. What is route flapping, and how do routing protocols minimize its impact?

**Route Flapping:

**Mitigation Techniques:

**Trade-off:

19. Explain the difference between Layer 2 and Layer 3 switching loops and how each is prevented.

**Layer 2 Loops:

**Layer 3 Loops:

TTL (Time-to-Live) expiration in IP packets.
Route poisoning & split horizon in distance-vector protocols.
Loop-free algorithms in link-state protocols

20. How does BGP handle routing policy compared to IGPs, and why is it preferred for inter-domain routing?

**BGP (Border Gateway Protocol):

AS-Path (loop prevention, path length)
Local Preference (preferred exit point)
MED (Multi-Exit Discriminator) (preferred entry point)
Communities (policy grouping).

**IGPs (OSPF, EIGRP, IS-IS, RIP):

**Why BGP for Inter-Domain: