What is IP Routing? How Routers Transmit Data Over the Internet

How does information get from point A to point B on the internet? IP routing describes the path that data takes as it travels from its original address to its final destination. If you're having a hard time understanding how IP routing works, we'll break it down into language anyone can understand. This minHour article will teach you what IP routing is, how it works, and why it's important. We'll also show you how to use the traceroute tool to see IP routing in action.

IP Routing Basics

IP stands for “Internet Protocol.”

This is the protocol that determines how to send data between hosts (like computers and routers) on a network. IP routing describes the process that routers use to transmit data from one host to another.

Think of IP routing like the postal service centers around the world.

When someone sends a letter through the mail to someone on the other side of the world, how does it get to their address? The letter must pass through a series of different postal service centers, each of which routes the letter to the next stop on the way to its final destination.

  • A host computer has an IP packet of data it needs to send to another computer that’s on the other side of the world—how does it get there?
  • Like the workers at postal service hubs, routers look at the incoming and outgoing locations of the IP packet so they can determine the shortest and fastest route to the final destination.
  • Just like our homes and businesses have mailing addresses, each host on a network has its own IP address. Your computer’s IP address is assigned to you by a router, which is connected to another larger router on the internet. A router routes data from IP address to IP address, just like the postal workers route letters from address to address.

How does IP routing work?

The host computer or device sends a packet of data over the internet.

Every computer and device on the internet has its own IP address. Each time you do something on your computer that requires the internet (such as visiting wikiHow in your web browser), data is sent as “packets” from your computer to your router.

  • All routers and hosts on the internet are connected through different paths, and each of these stops has its own IP address.

Your router receives the packets of data.

When you go to https://www.wikihow.com in your web browser, the first thing that happens is that your router receives packets of data requesting the website to be delivered to your browser. To figure out what sort of data you need and where to send that data, the router looks at the packets’ headers—the headers contain the IP address of the destination.

The router consults its routing table to determine the best path.

This is sort of like how Google Maps or Waze will provide you the best route to avoid traffic—the router checks its routing table to find the shortest path just as Google Maps or Waze checks regional traffic reports before showing you a route to drive.

  • Each router has its own routing table that records the paths each packet of data should take to travel to its destination. Routes in these tables can be static or dynamic.
  • A static route is a route that doesn’t change—meaning, if you send data from one address to another, that data always takes the same path. For example, if you always drive to the grocery store on the freeway and never take the backroads, you drive a static route to the grocery store.
  • If you choose your route to the grocery store based on traffic conditions, you drive a dynamic route. A dynamic routing table updates automatically based on the shortest and fastest path to a destination.

The next router on the path receive the data and forward it accordingly.

When the next router receives the data, it checks the packet headers just like the first router, and then consults its own routing tables to determine where to send that data. The data continues to pass through different routers until it reaches its final destination.

  • Once a router determines that the address is on its own network, it will deliver the data. Then, if requested, the destination computer will send data back to the original address—a process that also uses IP routing.
  • The path between two IP addresses might be different from one moment to the next based on different factors, including latency—if a router detects that the shortest path isn’t the fastest, the data may travel through more routers to get to its destination.

Use Traceroute to See IP Routing in Action

You can use the “traceroute” or “tracert” command on your computer to find the route between addresses.

Traceroute not only shows you each IP address your data passes through as it reaches your destination, but it also shows you how long it takes for your test packet to reach that router and return to your computer (round trip time, or RTT) This makes traceroute a valuable took for troubleshooting slow connections. To get started, open the Windows Command Prompt or your Mac’s Terminal.

Perform a traceroute to wikiHow.com.

If you’re using Windows, type tracert www.wikihow.com and press . On a Mac, type traceroute www.wikihow.com and press . This sends test packets of data to wikiHow.com so you can see the path they’ll take to get there.

Interpret the results.

Each stop along the way is called a “hop,” and each hop has its own address. Some hops appear as hostnames (such as x.comcast.net) while others display as IP addresses.

  • The first IP address on the route is the IP address of your own router, also known as your default gateway IP address. You can also find this address by going into the Command Prompt and typing ipconfig/all.
  • The second address is the router that your own router decided to send the packets next. This IP address likely belongs to your ISP, although if you’re on a larger network (such as your work or school), your packets may go through several internal routers before reaching your ISP.
  • The three columns with numeric values display the time (RTT) it took for your packet to reach that router and return to your computer. The values are displayed in milliseconds (ms). If some hops have significantly larger times, that could indicate latency at that locations. In general, anything less than 150ms is considered acceptable.
  • If you see an asterisk instead of a numeric value, that usually indicates packet loss, or dropped data. However, if you see nothing but asterisks at the destination and the traceroute completes successfully, this could mean the target address’s firewall is blocking the request.

Run another traceroute to the same address.

Did the test packets take the same path or did they pass through different routers? Try doing a traceroute to a different address—notice any differences in the paths? That’s IP routing in action!

Leave a Comment