All routers abide by the following rules in order to determine where to send traffic. Staying with the spider web example, lets define the rules for our spider..
If the router knows of one or more paths between point A and point B it will show the spider the shortest path.
If the router does not know how to get to point B it will kill the spider.
This is essentially how routers work. Instead of a spiders web we have network links and instead of a spider we have IP packets. Note: We have omitted an additional rule for brevity. This rule is related to showing the spider the most specific path first, then the shortest path. But that is not relevant in this case because we are not touching on network masks at this point.
The problem that a default IP address solves...
Because most networks only have one link to the outside world, it does not make sense to announce every network in the world to every router - that would be an inefficient solution. So engineers have come up with the concept of an ip default route.
Networks and Spider Webs
Think of a network as a spiders web, there are interconnections in many directions and there are many ways to get from point A to point B simply by following different strands.
Think of routers as the devices that connect the intersections between the strands of the spiders web. Now imagine that every time a spider wanted to walk from point A to point B it would need to stop at each intersection and ask the router directions to its destination
Point A
Point B
Default GW for the PC
is this interface with IP address 192.168.0.254
On most home networks, the default IP address is the IP address of the broadband modem LAN inteface
INTERNET >
www.it-pathways.com? Not sure where that is, I'll send my packets to the default gateway at 192.168.0.254
Definition of a Default IP Address
Also known as a 'default gateway, 'default route' or an 'ip default gateway', a default IP address is an address that is used as a last resort when the routing device does not have more specific information about the best direction to forward the packet in order to reach the destination.
Routed IP Home Network
So instead of telling your router about every network in the world, a default route is used to allow the router to keep track of only local networks – every other network that is unknown to the router is routed according to the default route.
The default route simply states that ‘if I don’t have your destination network in my routing table I will match it against the ip default route’.
Technical Details
A default ip address is one component of a default route that uses as special network mask that consists of all ‘don’t care bits’.
An IP default route for the example above: 0.0.0.0 0.0.0.0 via 192.168.0.254
The last four octets (0.0.0.0) is the network mask. This is the critical component of a default route. The 192.168.0.254 is the address of the device that connects to the rest of the world.
Binary representation of the network mask: 00000000.00000000.00000000.00000000
Every bit is 0 – this mask is specific to a default route.
IP Network Mask
An IP network mask is used to define which portion of the IP address is the network part of the IP address and which portion is the host part of the IP address. The network portion of the address is set to binary 1’s and the host bits are set to binary 0’s. The 0’s are also known as ‘don’t care’ bits because as far as routing goes they are not used until the very last hop.
In the case of an IP default route every bit is set to 0’s (don’t care). In other words, the default route is telling the router not to worry about matching specific networks – The router is told to just send everything network that it don’t specifically know about using this rule
.
Default GW for the router is determined by the ISP.