Ch6:Routing and Routing Table
Routing via IP address
IP is a connectionless protocol In a connectionless service, the network layer protocol treats each packet independently. The packets may or may not travel the same path to their destination. In a connectionless service, the decision about the route of packet is made individually by each router.
occurs when the source and destination of a packet are located in the same physical network or if the delivery is between the last router and the destination host.
the packet goes from router to router until it reaches the one connected to the same physical network as its final destination. In an indirect delivery, the sender uses the destination IP address and the routing table to find the IP address of the next router to which the packet should be delivered. In an indirect delivery the address mapping between the IP address of the next router and the physical address of the next router is done by the .
Host-specific method: The destination host address is given in th routing table. (too large) Network-specific method: Instead of having an entry for every destination host connected to the same physical network. We have only one entry that defines the address of the destination network itself. (much smaller) Default routing method: There is still too much networks to fit into a routing table. Router R1 route the packet to host connected to network N2. For the rest of the Internet router R2 is used instead of using all networks in the entire Internet, Host A can just have one entry called
Problem: IP address in the packet is of the destination Host, Routing table only stores some network address. Next-hop address is IP address Most times hop is a router
Forwarding with classful addressing:
- forwarding without subnetting: each routing table has three columns:
- The network address of the destination network tells us where the destination host is located.
- The next-hop address tells us to which router the packet must be delivered for an indirect delivery. For direct delivery it is empty.
- The interface number defines the outgoing interface from which the packet is sent out. The router is usually connected to several networks. Each connection has a different interface.
- The algorithm implemented:
- The destination address of the packet is extracted.
- The destination address is used to find the class of the address. This is done by shifting the address 28 bit to the right. The result is 4 bit number between 0 and 15. 0-7 Class A 8-11 Class B 12-13 Class C 14 Class D 15 Class E
- Find the network address.
- The class of the address and the network address are used to find the next-hop address and the interface number.
Routing in Classful address
Figure above shows an imaginary part of the Internet. Show the routing tables for router R1. Figure above shows the three tables used by router R1. Note that some entries in the next-hop address column are empty because in these cases, the destination is in the same network to which the router is connected (direct delivery). In these cases, the next-hop address used by ARP is simply the destination address of the packet.
Forwarding with subnetting: Subnetting happens inside the organization. The model for fixed length subnetting:
- The model extract the destination address of the packet from the Header.(without the mask!)
- The destination address and the mask are used to extract the subnet address.
- The table is searched using your subnet address to find the next hop address and the interface number. If no match is found the default is used. If the column is empty, it means the next hop is the destination Host.
- The next hop address and the interface number are given to ARP.
Routing for classless addressing
In Classless Addressing We need at least four columns. Mask, Network address, Next-hop address, Interface: Sort the mask from the longer to shorter. The last one will be default. For each row, mask is applied to the destination address, get the result, compare the result with the network address in the row. If it matches, we can get the next-hop address and interface and do ARP. If not matches, we need to go to the next row.
Address Aggregation: To reduce the size of routing table, the idea of address aggregation was introduced. The blocks of addresses for many organization are aggregated into one larger block.
Routing in classless addressing uses . The routing table is sorted from the longest mask to the shortest mask.
Hierarchical routing with ISPs ISP: Internet service provider. Regional ISP -> Local ISP -> Small ISP Large block => Small blocks
To Solve the problem of Gigantic routing tables we can create a sense of Hierarchical in the routing tables.
Searching in classful address The routing table is divided into three tables (Called “Buckets”) one for each class. When a packet arrives, the router applies the default mask to find the corresponding bucket(A,B,C) the router then searches the corresponding bucket.
Searching in classless address The routing table is divided into “Buckets”, one for each prefix, the router first tries the longest prefix. If the destination address is found in this bucket, the search is complete. If the address is not found, the next prefix is searched.
static routing table
It contains information entered manually. The administrator enters the route for each destination into the table. When the table is created, it can not update automatically, when there is a change in the internet.
Dynamic Routing Table
It is updated periodically using one of the dynamic routing protocols whenever there is a change in the internet, such as shut down of a router or breaking of a link. The dynamic routing protocols update the tables in the router.
Comments