This site requires JavaScript for navigation. Please enable JavaScript for the best learning experience.
 

Default Route
A default route is the route of last resort, the last route the computer tries when attempting to reach a computer it doesn't know how to reach and which is not on the local network.

Routing is the process of forwarding a packet hop by hop to its destination. Default routes are used to identify the next hop. A default route is also known as the route of last resort. Default routes are used by all hosts running Internet Protocol. The default gateway is the location to send all IP packets that are destined for another network. The default route is used to determine what the default gateway address is and where to send traffic. On a home PC, this is the default gateway setting. On a router, this may be a single static route.

Verifying the Default Route

Windows Systems

A default route points all IP packets not destined for a local computer to the default gateway. Here is a copy of the output of the netstat -r command showing the routing table for a Windows computer. The default route is in bold. Note that the default route points to the default gateway.

netstat -r output

Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 13 d4 b9 1c 82 ...... NVIDIA nForce Networking Controller
0x20003 ...00 ff af af c3 97 ...... TAP-Win32 Adapter V8
0x20005 ...00 ff a4 0f 3a ec ...... TAP-Win32 Adapter V8 #2
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
0.0.0.0 0.0.0.0 192.168.67.1 192.168.67.8 30
10.67.0.0 255.255.255.252 10.67.0.1 10.67.0.1 30
10.67.0.0 255.255.255.0 10.67.0.2 10.67.0.1 1
10.67.0.1 255.255.255.255 127.0.0.1 127.0.0.1 30
10.67.1.0 255.255.255.252 10.67.1.1 10.67.1.1 30
10.67.1.0 255.255.255.0 10.67.1.2 10.67.1.1 1
10.67.1.1 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.67.0.1 10.67.0.1 30
10.255.255.255 255.255.255.255 10.67.1.1 10.67.1.1 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.67.0 255.255.255.0 192.168.67.8 192.168.67.8 30
192.168.67.8 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.67.255 255.255.255.255 192.168.67.8 192.168.67.8 30
224.0.0.0 240.0.0.0 10.67.0.1 10.67.0.1 30
224.0.0.0 240.0.0.0 10.67.1.1 10.67.1.1 30
224.0.0.0 240.0.0.0 192.168.67.8 192.168.67.8 30
255.255.255.255 255.255.255.255 10.67.0.1 10.67.0.1 1
255.255.255.255 255.255.255.255 10.67.1.1 10.67.1.1 1
255.255.255.255 255.255.255.255 192.168.67.8 192.168.67.8 1
Default Gateway: 192.168.67.1
===========================================================================
Persistent Routes:
None

Below is the output of the ipconfig command on a Windows computer, showing the default gateway entry. When the default gateway is set via DHCP, a default route is automatically created.

ipconfig /all

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : NVIDIA nForce Networking Controller
   Physical Address. . . . . . . . . : 00-0C-E3-B7-91-82
   Dhcp Enabled. . . . . . . . . . . : Yes
   IP Address. . . . . . . . . . . . : 192.168.67.8
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.67.1
   DNS Servers . . . . . . . . . . . : 192.168.67.254

Linux & UNIX Based Systems

Linux, UNIX, BSD and Mac OS X systems also utilize default routes. Below is the output of the netstat -r command on a Linux box showing the default route. This same command works on all the other operating systems as well, but you may, or may not have permission to run the command.

netstat -r output:

[inetdaemon@centos01 ~]$ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.67.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default gate.lair.local 0.0.0.0 UG 0 0 0 eth0

 


Bookmark this page and SHARE:  

Search

Support InetDaemon.Com

Get Tutorials in your INBOX!

Free Training