************************************************
* Description: Knowledge of network route table
* Date: 06:58 PM EST, 06/30/2017
************************************************


<1> Route Table:
     |
     |__ o. The routing table stores information about IP networks and how they can be reached (either directly or indirectly). 
     |      Because all IP nodes perform some form of IP routing, routing tables are not exclusive to IP routers. Any node loading the TCP/IP protocol has a routing table. 
     |      There are a series of default entries according to the configuration of the node and additional entries can be entered either manually through TCP/IP utilities 
     |      or dynamically through interaction with routers. A routing table is present on all IP nodes.
     |
     |__ o. When an IP packet is to be forwarded, the routing table is used to determine:
             |
             |__ o. The forwarding or next-hop IP address [ Determinate the through path to delivery a data packet between devices ]: 
             |      For a direct delivery, the forwarding IP address is the destination IP address in the IP packet. 
             |      For an indirect delivery, the forwarding IP address is the IP address of a router.			 
             |
             |__ o. The interface to be used for the forwarding [ Decide the interface within one device, such as eth0, eth1, eht2, etc ]:
                     The interface identifies the physical or logical interface such as a network adapter that is used to forward the packet to either its destination, 
                     or the next router.
					 

					 
<2> Entries within one route table:
     |
     |__ o. Network ID. The network ID or destination corresponding to the route. The network ID can be class-based, subnet, or supernet network ID, or an IP address for a host route.
     |
     |__ o. Network Mask. The mask that is used to match a destination IP address to the network ID.
     |
     |__ o. Next Hop. The IP address of the next hop.
     |
     |__ o. Interface. An indication of which network interface is used to forward the IP packet
     |
     |__ o. Metric. A number used to indicate the cost of the route so the best route among possible multiple routes to the same destination can be selected. 
                    A common use of the metric is to indicate the number of hops (routers crossed) to the network ID.



<3> Route Determination Process [Critical]:
     |
     |__ 1) Determin if destination server is in the same LAN:
     |      For each entry in a routing table, perform a bit-wise logical AND between the destination IP address and the network mask. 
     |	    Compare the result with the network ID of the entry for a match.
     |     
     |__ 2) The route that has the longest match (the route that matched the most amount of bits with the destination IP address) is chosen. 
            The longest matching route is the most specific route to the destination IP address. 
            If multiple entries with the longest match are found (multiple routes to the same network ID, for example), the router uses the lowest metric to select the best route. 
            If multiple entries exist that are the longest match and the lowest metric, the router is free to choose which routing table entry to use. 

            Large IP ranges are allocated as needed by IANA to each of the Regional Internet Registries.
            The regions are generally continental in size - IP addresses are not assigned on a per-country basis.
            The RIRs in turn then allocate IP addresses to ISPs, who in turn assign them to end-users.
            Each of the RIRs maintain a whois server which can be queried to find out not only which ISP has been assigned any netblock, 
            but to a certain extent which end-user, and that end-user's address.
					 

					 
<4> Reference:
     |
     |__ https://technet.microsoft.com/en-us/library/cc958823.aspx