IP Routing

Posted: March 4, 2011 in Internet Protocol, Networking, System Basics, System Information
Tags: ,

Routing is the process of moving information along a path from a source to a destination.

On a TCP/IP network, the source and destination are called hosts and the information is broken apart into small packets that are transmitted between these hosts. The IP handles the routing of all these packets for the network.

 

Remember that a protocol such as TCP or UDP hands down a packet of data to the IP protocol for transmission to a remote host. IP must determine where the packet goes.

First, it compares the network ID of the local host with the network ID of the destination host identified in the packet. If the two network IDs match, the two hosts are on the same network segment and the packet can be sent directly to the destination host.

 

If IP determines that the network IDs of the local host and the remote host do not match, that means that the two hosts are on different network segments and the packet cannot be sent directly. Instead, IP must send the packet to a gateway, which is a router connecting one network segment to another. When this gateway receives the packet, its IP protocol goes through the process of comparing network IDs to determine the best place to send the packet. If the destination host is on one of the network segments to which the gateway is directly connected, the gateway can forward the packet straight to the destination host. Otherwise, the gateway forwards the packet on to another gateway, and then perhaps another, until the packet finally reaches its destination. Each time a packet crosses a gateway that is referred to as a hop. For example, if a packet must cross three routers to reach its destination that is considered three hops.

 

Usually, the source host is configured with the IP address of a default gateway, a router to which all packets are sent if the destination host is not found on the same network segment. Routers (and all devices with IP installed, for that matter) are able to consult routing tables that are stored in the router’s memory. A routing table holds information on preferred routes for various network IDs. This way, the router can determine the best gateway to which to send a packet based on the network ID of the packet’s destination host. There are two ways in which a router can build its routing table:

 

Static A static router has a routing table that is constructed and updated manually.

In other words, someone must actually access the routing table to create

routes the router can use.

 

Dynamic A dynamic router builds and updates its own routing table as it finds

appropriate routes. When it finds shorter routes, it favors those over longer routes.

Most important, dynamic routers can also share their information with other

routers on the network. Almost all the routers in use today are dynamic routers—

manual routers are just too much work. Dynamic routers use one of two common

routing protocols: Routing Information Protocol (RIP) and Open Shortest Path First

(OSPF).

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s