A "route"(when used as a noun), in networking terminology, refers to list of the possible next hops (IP addresses of intermediate routers(layer 3 devices)) which can be taken to reach a particular destination(identified by an IP address).
As a verb, "route" is same as "send".
Suppose, you want to send IP packets from host1 to host2:
So, your "route" or path to host2 from host 1 is: 184.108.40.206>220.127.116.11>18.104.22.168
- From a given source, there can be several "routes" to a destination. This happens because each router decides where to send the packet next(ie, it decides who will be the next hop router). And these next hops form the "route" to the destination.
- In Routing Table, a "route" refers to the network. A Routing table basically contains "networks" and the "next hop addresses" for those networks. It also contains other info like cost(used generally when multiple next hops are available for a given network).
Answer to Q1: Routes are "written" in the packet forwarding engines(ASICs) of routing devices. It is stored in the form of bits and when a packets comes for routing, the following things happen:
a Basic checks of the different checksums and Ethertype are done.
b If the DMAC(destination MAC) in the received frame matches the MAC address of the port on which it was received, then the packet is considered for routing.
c The forwarding table(it is same as Routing table with only one "next hop" for each "network") is used to decide where to send the packet next. The DIP(destination IP) in the incoming packet is used to perform bit wise AND operation on the "network" entry present in the forwarding table. [For more details, see Answer to Q2]
Answer to Q2: A sample Routing table is shown below:
IPv4 Route Table
Network Destination Netmask Gateway Metric
22.214.171.124 255.255.255.0 126.96.36.199 25
This implies that all packets which have their DIP(destination IP) in the network 188.8.131.52/24, will be forwarded(routed) to the router 184.108.40.206.
Suppose an incoming packet arrives with DIP: 220.127.116.11. To "route" this packet, Destination Network is detected:
18.104.22.168 AND Netmask for the first Routing table entry(ie, 255.255.255.0)
0001 0100.0000 0000.0000 0000.0000 0010 AND 1111 1111.1111 1111.1111 1111.0000 0000 = 0001 0100.0000 0000.0000 0000.0000 0000 ie, 22.214.171.124 [This matches the "network" entry in the Routing table and the packet is sent to router with address 126.96.36.199
Answer to Q3: Static routes are used when you explicitly want a particular next hop to be taken instead of leaving it to the configured routing protocol(like, ospf). Moreover, scaling of the network with static routing is difficult as more effort is required. Also, as MaQleod said, it is not fault tolerant.