1. Defining paths for the packets through and internetwork.
2. Forwarding data packets based on their predefined paths.
Generally, there are two types of routing.
Routing can be performed by manually defining the routes or paths for packets to reach its destination. This is called static routing.
Stating routing works well for the small networks and when using the static routing, the routing table of the each router should be updated each time there is any change in the network configuration or topology. A router, whose routing table is not regularly updated, cannot communicate with the other routers.
While on the other end in most of the networks, routing is accomplished through the use of the dynamic routing. In the dynamic routing, routing protocols, such as RIP, OSPF etc create and maintain the routing tables of each router. Practically, dynamic routing functions very well than the static routing
A routing table is a set or rules, viewed in a tabular format and this used to define the routes of the data packets. All the network devices, which have IP, enabled functionality such as routers and switches use the routing tables. Routing table stores the information and configurations of every router in the IP enabled network. A routing table contains the information necessary to transmit the packets toward its destination.
When a packet is received, the network devices matches the information contained in the packets and the information in the routing tables and then it defines the shortest possible route for the transmission of the packets towards its destination.
Each packet contains the information of its origin and destination and the routing table contains the following information.
• Destination: The IP address of the packet’s final destination (next hop). Next hop: The IP address to which the packet is forwarded
• Metric: It assigns the cost to each route so that most-effective paths can be picked up.
• Routes: It includes directly attached direct subnets, indirect subnets, that are not directly connected to the device but it can be accesses through one ore more hops
• Interface: The outgoing network interface the device should use when forwarding the packet to its final destination.
Routing tables can be maintained manually by the network administrator or by dynamically (automatically). The static network tables do not change unless the network administrator changes them. Routing tables can be maintained manually or dynamically. Tables for static network devices do not change unless a network administrator manually changes them. In the dynamic routing, the network devices such as routers and switches maintain the routing tables dynamically by using the routing protocols, such as RIP, OSPF etc. In the dynamic routing, the network devices listen and detect any network or devices failure and packet congestions.
Routing in the Internet
Routing is the method in which data finds its destination from one computer to the next. In the Internet there are 3 major aspects of routing.
1. Physical Address Finding
2. Determination of inter-network gateways
3. Numeric and symbolic Addresses
Physical address finding is the method of the Internet Routing and is used when datagram is transmitted from a computer. It is necessary to encapsulate the IP datagram. This encapsulation requires the local network or physical address.
If a computer wishes to transmit IP datagram it needs to encapsulate the physical address of the destination network device in the frame. This address can be achieved by using the table that will map the IP address with the physical address. Such table can be configured into a file that can be read into the memory at the boot up time. Computer normally uses the Address Resolution Protocol (ARP), which operates dynamically to maintain the translation table.
The second method is necessary because the Internet consists of a large number of local networks, which are interconnected with each other by gateways. Such gateways are known as routers, which has physical as well as logical connectivity with many networks.
The determination of the best suitable gateway and port for a particular IP address is called routing.
The third method generally involves the translation of the human friendly form (names) to the number address (IP Address). IP address can’t be remembered due to its numeric form but the simplest names (domain names) are easy to remember e.g www.yahoo.com, www.google.com, www.msn.com are easiest to remember as compared to the IP addresses 126.96.36.199, 188.8.131.52, 184.108.40.206. DNS translates the domain names into the IP address and IP address into the domain name. This domain to IP translation is a must for communicating on the Internet because communication on the Internet is performed by the IP addresses.
Communication between routers
The Internet is a network of networks. The Internet consists of large number of autonomous systems, each of which further consists of routing domains. Such autonomous systems are usually run by the larger companies or universities. Within the Autonomous system, a router communicates with the other router using the best intra domain routing protocols, which are known as interior gateway protocols. Autonomous system are connected via gateways, these exchange information using inter domain routing protocol, which are also called exterior gateway protocols.
The RIP or (Routing Information Protocol) is the commonest interior gateway protocol and the recent protocol such as open shortest path first (OSPF). The purpose of these protocols is to enable routers to exchange locally so that all the routers in the autonomous system must a have coherent and up to date information.
When a host receives the new routing information, it is likely to update not only to it but also sends this new updated information to all the connected hosts so that they can updated themselves. Hence these changes propagate across the entire network.