20IP routing basics configurationIP routing and routing tableRoutingRouting in the Internet is achieved through routers. Upon receiving a packet, a router finds anoptimal route based on the destination address and forwards the packet to the next router in thepath until the packet reaches the last router. The last router forwards the packet to the intendeddestination host.The term router in this document refers to both routers and Layer 3 switches.Routing tableRouting tables play a key role in routing. Each router maintains a routing table. Each entry in thetable specifies which physical interface a packet destined for a certain destination will go out toreach the next hop (the next router) or the directly connected destination.Routes in a routing table can be divided into the following categories by origin:• Direct routes: Routes discovered by data link protocols, also known as interface routes• Static routes: Manually configured routes• Dynamic routes: Routes discovered dynamically by routing protocolsRouting table contentsA routing table includes the following key items:• Destination address: Destination IP address or destination network.• Network mask: Specifies, in company with the destination address, the address of thedestination network. A logical AND operation between the destination address and thenetwork mask yields the address of the destination network. For example, if the destinationaddress is 129.102.8.10 and the mask is 255.255.0.0, then the address of the destinationnetwork is 129.102.0.0. A network mask is made of a certain number of consecutive 1s. Itcan be expressed in dotted decimal format or by the number of the 1s.• Outbound interface: Specifies the interface through which the IP packets are to beforwarded.• IP address of the next hop: Specifies the address of the next router on the path. If only theoutbound interface is configured, its address will be the IP address of the next hop.