| HowItWorksLab ¡ Systems
English

How IP Packet Routing Across Networks Works

Your data does not travel as one solid wire — it is cut into packets, and every router it meets decides the next hop. Follow one packet across the network, table lookup by table lookup.

IP · PACKET ROUTING ACROSS NETWORKS each router reads the destination address → picks the next hop → forwards the packet onward Sending Host creates the packet Router A local gateway Router B ISP edge Router C backbone Destination Host receives the packet the packet hops from one router to the next Routing table destination prefix → next hop 10.0.0.0/8 → Router A 203.0.113.0/24 → Router B every router looks up the next hop here IP Packet source address · destination address · payload — routers forward it by destination, hop by hop packet hop routing-table lookup
The journey, in order Host makes a packet → Router A lookup → Router B lookup → Router C lookup → Destination reached
Display mode

Detailed Explanation

What is packet routing?

When you send data across a network, it is not transmitted as one continuous stream. It is broken into small units called IP packets, and each packet is forwarded separately by a chain of routers until it reaches its destination.

Routing is the process of choosing, at each step, where a packet should go next. It is what lets a message cross many different networks — each owned and run by someone else — without any of them needing to know the full route.

Why split data into packets?

Because independent packets are far more flexible than one long connection. Different packets can take different paths, share links with other traffic, and route around a failure. If one path becomes unusable, later packets can simply be sent another way.

The trade-off is that the network only does its best: routers forward what they receive but do not guarantee delivery or order. Making the data reliable again is a job for the endpoints.

Components & their role

1. The host creates a packet

The sending host wraps a chunk of data in an IP packet and stamps it with a source address and a destination address. From here on, the packet is self-contained.

2. The first router looks it up

The packet reaches the local gateway, Router A. It reads the destination address and checks its routing table for the entry that best matches, then forwards the packet toward that next hop.

3. Each hop makes its own decision

Router B does the same thing, then Router C. Each one only decides the next hop — not the whole journey — and passes the packet along to a router that is closer to the destination.

4. The routing table chooses the next hop

The routing table is the heart of the decision. It lists destination ranges and the next hop to use for each. The router picks the most specific entry that matches the packet's address.

5. The packet reaches the destination

Eventually a router finds the destination host on a network it is directly connected to and delivers the packet. The same journey happens, in reverse, for any reply.

6. The route is not fixed

Because every hop decides on its own, packets can take different paths, arrive out of order, or be dropped along the way. Reassembly and retransmission are handled by the endpoints, not the network.

What is an IP packet?

It is a small, self-contained chunk of data. Each packet carries its own source and destination address, so routers can forward it independently without knowing the whole message it belongs to.

What does a router actually do?

A router reads the destination address on each packet, looks it up in its routing table, and forwards the packet to the next hop that moves it closer to that destination.

What is a routing table?

It is a list of rules that maps destinations to next hops. When a packet arrives, the router finds the best matching entry and uses it to decide where the packet goes next.

Does a packet travel in one straight line?

Not necessarily. Each hop is a separate decision, so different packets of the same message can take different paths and may even arrive out of order.

Who decides the route?

No single controller does. Each router decides only its own next hop, and the end-to-end path emerges from all those local choices added together.

What happens if a packet is lost?

Routers simply forward what they receive; they do not promise delivery. Recovery is handled by protocols on the endpoints, which detect missing data and ask for it again.

Common Misconceptions

One router plans the whole route. People imagine a single machine deciding the full path.
Every router decides only its next hop. The complete path is built from many small, local choices.
Data travels as one continuous stream. It is pictured flowing like water through a pipe.
Data is cut into independent packets. Each packet is forwarded on its own and can take its own path.
Packets always arrive in order. The network is assumed to keep everything in sequence.
Order is not guaranteed. The endpoints reassemble and re-request data when packets get lost or reordered.
Disclaimer: Diagrams are heavily simplified for educational demonstration only. Real-world systems contain far more variables and complexity. Not for engineering production use. Not financial, political or professional advice.