To a better understanding of what IP routing is, let’s get acquainted with the basic terms:
IP (Internet Protocol) is the network protocol used to send user data through the Internet and other smaller networks (LAN or WAN).
IP operates at layer 3 of the OSI model and is often used together with the Transport Control Protocol (TCP) and is referred basically as TCP/IP.
Internet Protocols (IP) uses a unique addressing assigned to computers and other devices interface that helps to determine the source and destination of packets on a network. An example of IP is the Internet Protocol version 4 (IPv4) and the newer Internet Protocol version 6 (IPv6).
Routing is the process of taking a packet from one device sending it through the network to another device in a different network.
Communications across the Internet is one of the best examples of routing. The internet helps to move data from your computer, across several networks, to reach a destination network.
A device that specializes in routing function is called router. Routers perform routing function if it knows the destination address. Routers choose best routes to remote networks from a list of routes which it stores in its routing table. If routers are not involved in your network, then you are not routing.
Routers use two ways to know the destination of packets; these are Static and Dynamic Routing.
Routers are intermediary network devices. Routers operate at the network layer (OSI Model’s layer 3).
The primary function of a router is to move data from one network to another and to help to control broadcast or unnecessary traffic. For a router to be able to do this, it must know the following:
i. Destination address
ii. Possible routes to all networks
iii. Neighboring routers from which it will learn about remote networks
iv. The best route to reach a network
v. How to maintain and verify routing information.
Routing protocols are used by routers to dynamically learn remote paths to set of networks and forward data between the networks. These protocols include:
Routing Information Protocol (RIP)
Enhanced Internal Gateway Routing Protocol (EIGRP)
OSPF (Open Shortest Path First)
BGP (Border Gateway Protocol)
The example below shows how a Network router connects other networks :
R2#show IP route
Gateway of last resort is not set
C 192.168.1.32/27 is directly connected, fastEthernet0/1
C 192.168.1.0/27 is directly connected, fastEthernet0/2
C 10.10.1.0/30 is directly connected serial 0/0/0
Let’s explain this:
The C in the routing table means the networks are directly connected. Remote networks are not found and displayed in the routing table because, we have not added a routing protocol – such as RIP, EIGRP, OSPF etc. etc or configured Static routes.
Also in the output above, when the network router receives a packet with the destination address of 192.168.1.10 which is part of the host/subnet in network B, the router will send the packet to interface fastEthernet0/2, and this interface will frame the packet and then send it out on the network segment to Network B.