Skip to main content

What does a router do?

A router is a network device that forwards IP packets between different networks and chooses the path those packets will take next.

Short and clear: a router connects different networks and decides where to send a packet next.


Main tasks of a router

1. Connects different networks

A router works when:

  • devices are located in different subnets
  • data needs to be passed beyond the local network

Without a router, communication between subnets is impossible.


2. Analyzes the destination IP address

A router:

  • looks at the destination IP address in the packet
  • determines which network the recipient belongs to

It does not analyze application data, only the IP header.


3. Chooses a route

Using the routing table, a router determines:

  • through which interface to send the packet
  • to which next hop

If there are several routes, the most suitable one is chosen.


4. Forwards the packet further

After choosing a route, a router:

  • decreases the TTL value
  • wraps the IP packet in a new data link layer frame
  • sends it to the next network

This process repeats at every router along the path.


5. Separates broadcast domains

A router:

  • does not pass broadcast traffic
  • limits it to the boundaries of a single subnet

This improves the network's stability and scalability.


What a router does NOT do

Important for an interview A router:

  • does not forward frames by MAC addresses (that is L2)
  • does not guarantee packet delivery
  • does not manage TCP connections
  • does not analyze application data

At what layer a router operates

  • main layer: the network layer (L3)
  • works with:
    • IP addresses
    • packets
    • routes

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.