Categories
Networking Uncategorized

Route – How the IP packets are sent?

A computer system or any SOC (System on chip) device with network interfaces uses routing tables to connect to other networks.  A routing table is system wide (tabular) configuration which take cares how the IP packets would be send to another system.

Usually, every network device (laptops, routers, switches) has routing table configured manually or automatically.

At a ubuntu machine, routing table looks something like below. Every entry says which Interface (Iface) would be used to send an network packet with certain IP. The machine in the snapshot has two network interface (eth0 & tun0).

ubuntu_route

The default route (0.0.0.0 in windows) is used for all the non-matching IP , i.e, All the internet traffic goes via default interface. A windows routing table looks like below.

windows_route.jpg

You can add a new route (static routing) to windows machine using route ADD command. (You need admin privilege ).

route ADD 192.167.173.0 MASK 255.255.255.0 192.168.0.191

Now, if you ping 192.168.173.1, it would be routed to interface having IP address 192.168.0.191).  The interface would further transfer the packet to its default gateway.

You reach internet server via multiple gateways, switches and routers. All of them have a routing table configured. Windows trace route command can tell which systems have been used to reach the internet server.

 

By Abhishek Kumar

My name is Abhishek Kumar. I am a Software Engineer from India. I stay in Pune a city in south western India. Pune is a city known for IT services companies.

The main purpose of the writing this blog is to keep collection of my projects done by me.

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 )

Connecting to %s