What is IP routing?

Deciding which path packets take to reach their destination on an IP network. Each router holds a routing table, picks the route that matches the destination IP address with the longest prefix (longest-prefix match) and passes the packet to the next router. The table is built by static routing, configured by hand, or by dynamic routing, built automatically with routing protocols such as OSPF, RIP and BGP.

Japanese name: ルーティング(経路制御)

IP routing appears in 3 practice questions across 1 topic, including Computer Networking Basics.

Field: Computer Networking Basics

Try it: questions about IP routing

A router's routing table has four routes: 0.0.0.0/0 (next hop router A), 10.0.0.0/8 (router B), 10.1.0.0/16 (router C) and 10.1.2.0/24 (router D). To which router is a packet for 10.1.5.9 sent?

  1. ARouter B
  2. BRouter D
  3. CRouter C
Show answer and explanation

Answer: C. Router C

Of the routes that match the destination address, a router chooses the one with the longest (most specific) prefix. This is called longest prefix match. 10.1.5.9 matches 0.0.0.0/0, 10.0.0.0/8 and 10.1.0.0/16, but it is not in the 10.1.2.0/24 range (10.1.2.0 to 10.1.2.255). The longest of the matches is /16, so the packet goes to router C. 0.0.0.0/0 is the default route that matches every destination and is used only when no other route matches.

Which correctly describes dynamic routing?

  1. AAn administrator configures routes on each router by hand, and the same routes stay in use after a failure until the configuration is changed
  2. BRouters exchange route information using routing protocols and automatically switch to another path when a failure makes a route unusable
  3. CA route is chosen at random for each packet to spread the load evenly over several paths
Show answer and explanation

Answer: B. Routers exchange route information using routing protocols and automatically switch to another path when a failure makes a route unusable

Static routing means an administrator configures routes by hand. It is simple and predictable, and suits small networks or the default route of a site with only one exit, but it does not switch over automatically after a failure. In dynamic routing, routers exchange information with routing protocols such as OSPF or BGP to build their routing tables automatically, and recalculate another path when a link fails. On the internet, routes between organizations' networks (autonomous systems) are exchanged with BGP. Real networks commonly combine both.

IP routing in the explanations

Questions that mention IP routing (3)

  1. A router's routing table has four routes: 0.0.0.0/0 (next hop router A), 10.0.0.0/8 (router B), 10.1.0.0/16 (router C) and 10.1.2.0/24 (router D). To which router is a packet for 10.1.5.9 sent?
  2. Which correctly describes dynamic routing?
  3. What is the role of the TTL (Time To Live) field in the IPv4 header?

Books on Computer Networking Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

Router Packet IPv4 ICMP (Internet Control Message Protocol) IPv6 ARP ARQ (automatic repeat request) CIDR Congestion control CSMA/CA

Back to the glossary