Chapter 9: Routing fundamentals
Introduces routing as both the building of a router’s routing table and the forwarding of packets between networks.
After this chapter you will be able to
- Two meanings of routing. Distinguish building a router’s routing table from forwarding packets, and describe the routing table as a database of known destinations and how to forward packets toward them.
- Same-network packet delivery. Explain that a host sends an IP packet inside a frame, and that a packet for a host in the same network is framed with the destination host’s MAC address rather than sent through a router.
- Other-network packet delivery. Trace how a host sends a packet for another network: it keeps the destination host’s IP address in the packet but addresses the frame to its default gateway’s MAC address. Describe R1 forwarding the example packet in a new frame toward PC3.
- Router packet forwarding decisions. Trace how a router handles a received frame: it checks the frame’s destination MAC address, examines the enclosed packet, and either processes the packet for itself or looks for a route to forward it.
- Routing table purpose and state. Explain that the routing table tells a router what to do with packets for known destinations, and that an unconfigured router has no routes to use for forwarding.
- Connected network routes. Describe when a connected route is added and how it directs packets addressed to hosts on that network.
- Local host routes. Distinguish a local route from a connected route by its destination, /32 prefix, and effect on packets addressed to the router.
- Most specific matching route. Explain how a router matches a packet’s destination IP address to routes and selects the matching route with the longest prefix. Use the /24 and /32 example to explain why a matching /32 wins.
- No matching route outcome. Explain that a router drops a packet if no routing-table route matches its destination IP, rather than flooding it as a switch may do with an unknown unicast frame.
- Routes to remote networks. Distinguish automatically added connected and local routes from routes to remote networks, and explain how a router can learn the latter.
- Next hop forwarding. Explain what a router needs to know to forward a packet toward a remote destination and how it sends the packet to the next router.
- Routes for two-way communication. Determine which destination-network routes R1, R2, and R3 need for packets to travel between PC1 and PC3 in both directions.
- Static route command forms. Describe the three forms of the global-configuration `ip route` command and identify which arguments specify the destination, next hop, and exit interface.
- Recursive next-hop lookup. Trace how a router uses a next-hop-only static route to determine the outgoing interface.
- Exit-interface route drawbacks. Explain why an exit-interface-only static route can depend on proxy ARP and why that dependence is undesirable.
- Fully specified route tradeoff. Explain what a fully specified static route supplies and compare it with the other two forms.
- Default route selection and purpose. Explain that 0.0.0.0/0 matches every IPv4 destination but is selected only when no more specific route matches. Describe why a router can use it to send otherwise unmatched traffic toward an ISP instead of storing routes to internet destinations.
- Default route configuration and recognition. Describe how to configure a default route with the ip route command and how the routing-table display indicates whether one is present.
What it builds on
- Destination and source (chapter 6) · The destination MAC address in an Ethernet frame.
- Attributes of an IPv4 network (chapter 7) · Identifying whether addresses belong to the same IPv4 network.
- Routers (chapter 2) · Routers connect networks.
- Address Resolution Protocol (chapter 6) · Address Resolution Protocol.
- Frame flooding and forwarding (chapter 6) · Switch forwarding uses destination MAC addresses and a MAC address table.
Section by section
Introduction
Introduces routing as both the building of a router’s routing table and the forwarding of packets between networks.
- Two meanings of routing: Distinguish building a router’s routing table from forwarding packets, and describe the routing table as a database of known destinations and how to forward packets toward them.
Why it matters: This distinction helps keep information about where packets can go separate from the act of forwarding them.
Key terms: routing, routing table, forwarding packets
9.1 How end hosts send packets
Explains how an end host chooses the frame’s destination MAC address when sending an IP packet within its network or to another network.
- Same-network packet delivery: Explain that a host sends an IP packet inside a frame, and that a packet for a host in the same network is framed with the destination host’s MAC address rather than sent through a router.
Why it matters: This distinguishes delivery within a network from delivery through a router. - Other-network packet delivery: Trace how a host sends a packet for another network: it keeps the destination host’s IP address in the packet but addresses the frame to its default gateway’s MAC address. Describe R1 forwarding the example packet in a new frame toward PC3.
Why it matters: The packet’s ultimate IP destination and the frame’s next-hop MAC destination serve different purposes. - Gateway configuration and MAC lookup: Explain that a host has its default gateway configured as an IP address, usually learned automatically through DHCP or set manually, and uses ARP to learn the MAC address needed for a frame.
Why it matters: A host needs the appropriate MAC address before it can send the frame.
Key terms: packet, frame, destination MAC address, same network, default gateway, destination IP address, new frame, DHCP, manual configuration, ARP
9.2 The basics of routing
Explains how a router handles an incoming frame and decides whether to process its packet or forward it toward another network.
- Router packet forwarding decisions: Trace how a router handles a received frame: it checks the frame’s destination MAC address, examines the enclosed packet, and either processes the packet for itself or looks for a route to forward it.
Why it matters: This explains how a packet addressed to another network gets past its default gateway—or why it may be dropped there.
Key terms: default gateway, de-encapsulate, destination IP address, routing table, suitable route
9.2.1 The routing table
Explains how a router’s routing table represents destinations and how configured, enabled interfaces automatically create connected routes for forwarding and local routes for receiving packets.
- Routing table purpose and state: Explain that the routing table tells a router what to do with packets for known destinations, and that an unconfigured router has no routes to use for forwarding.
Why it matters: The table is the starting point for explaining why a router forwards or receives a packet. - Connected network routes: Describe when a connected route is added and how it directs packets addressed to hosts on that network.
Why it matters: Connected routes explain how a router can reach hosts on its own attached networks without manually adding those routes. - Local host routes: Distinguish a local route from a connected route by its destination, /32 prefix, and effect on packets addressed to the router.
Why it matters: Local routes explain why a packet for a router’s interface is received rather than sent back out toward the attached network.
Key terms: routing table, next hop, show ip route, connected route, network route, up/up, outgoing interface, local route, host route, /32 prefix length
9.2.2 Route selection
This section explains how a router chooses the most specific matching route and what it does when no route matches.
- Most specific matching route: Explain how a router matches a packet’s destination IP address to routes and selects the matching route with the longest prefix. Use the /24 and /32 example to explain why a matching /32 wins.
Why it matters: This lets you predict which route a router will use when several routes include the destination. - Router and switch lookup distinction: Distinguish a router’s destination-IP lookup from a switch’s destination-MAC lookup: the router seeks the most specific matching route, while the switch seeks an exact MAC-address match.
Why it matters: The distinction prevents you from applying switch lookup rules to router forwarding. - No matching route outcome: Explain that a router drops a packet if no routing-table route matches its destination IP, rather than flooding it as a switch may do with an unknown unicast frame.
Why it matters: This explains why a router cannot deliver a packet simply by trying every port when it has no matching route.
Key terms: route selection, matching route, most specific, prefix length, /32 route, Layer 3 forwarding, Layer 2 forwarding, routing table, MAC address table, exact match
9.3 Static routing
This section explains why routers need routes to remote networks and how next-hop static routes enable two-way communication without giving every router a route to every network.
- Routes to remote networks: Distinguish automatically added connected and local routes from routes to remote networks, and explain how a router can learn the latter.
Why it matters: It explains why a router can reach nearby networks yet still drop a packet for a remote one. - Next hop forwarding: Explain what a router needs to know to forward a packet toward a remote destination and how it sends the packet to the next router.
Why it matters: It shows why a route to the destination network can work without describing the entire journey. - Routes for two-way communication: Determine which destination-network routes R1, R2, and R3 need for packets to travel between PC1 and PC3 in both directions.
Why it matters: It helps you identify the routes actually needed for a round trip rather than configuring every possible network on every router.
Key terms: connected routes, local routes, static routing, dynamic routing, next hop, MAC address, frame, 192.168.3.0/24, 192.168.1.0/24, connected route
9.3.1 Configuring static routes
This section explains how to configure three forms of IPv4 static route and compares how each identifies the next hop and exit interface.
- Static route command forms: Describe the three forms of the global-configuration `ip route` command and identify which arguments specify the destination, next hop, and exit interface.
Why it matters: The arguments you choose determine how the router forwards packets toward the destination. - Recursive next-hop lookup: Trace how a router uses a next-hop-only static route to determine the outgoing interface.
Why it matters: It explains why naming a next hop does not, by itself, identify the interface used to send a packet. - Exit-interface route drawbacks: Explain why an exit-interface-only static route can depend on proxy ARP and why that dependence is undesirable.
Why it matters: It explains the section’s recommendation to avoid exit-interface-only static routes in a real network. - Fully specified route tradeoff: Explain what a fully specified static route supplies and compare it with the other two forms.
Why it matters: It connects the three configuration choices to the author’s practical recommendation.
Key terms: ip route, destination network, netmask, next hop, exit interface, recursive static route, next-hop IP address, connected route, ARP, directly connected static route
9.3.2 Configuring a default route
Explains how a default route forwards traffic without a more specific match, how to configure and recognize one, and how to classify static routes in exam examples.
- Default route selection and purpose: Explain that 0.0.0.0/0 matches every IPv4 destination but is selected only when no more specific route matches. Describe why a router can use it to send otherwise unmatched traffic toward an ISP instead of storing routes to internet destinations.
Why it matters: This explains how a router can reach destinations it has no specific route for. - Default route configuration and recognition: Describe how to configure a default route with the ip route command and how the routing-table display indicates whether one is present.
Why it matters: You can both create a catch-all route and check whether the router has one. - Static route type classifications: Distinguish network from host routes by their destinations, and recursive, directly connected, and fully specified static routes by whether they specify a next-hop IP address, an exit interface, or both.
Why it matters: These distinctions let you identify what kind of static route an exam command creates.
Key terms: default route, 0.0.0.0/0, more specific route, ISP, ip route, 0.0.0.0, gateway of last resort, show ip route static, network route, host route
9.4 Summary
Where this is used later
- PC1 to R1 (chapter 10) · Provides the local-delivery case against which the first hop of a routed packet can be understood.
- Layer 2 segmentation with VLANs (chapter 12) · How hosts send packets to destinations outside their local network.
- (chapter intro) (chapter 19) · How end hosts send packets toward destinations outside their network.
- (chapter intro) (chapter 21) · Introduces the basics of routing from an IPv4 perspective.
- Dynamic routing vs. static routing (chapter 17) · Routers use routing tables to determine routes.
- R1 to R2 (chapter 10) · Tracing a packet through R1 depends on understanding how a router chooses a route.
- Route selection examples (chapter 17) · Route selection examples build on the distinction between matching routes and the most specific match.
- R3 to PC3 (chapter 10) · Selecting a matching route from a routing table
Concepts explained in this chapter
- static routeIPv6 static routing is a routing method in which IPv6 routes are manually configured on routers.
- host routeA host route is a route to a single destination IP address, represented in IPv6 by a /128 prefix length.
- directly connected static routeA directly connected route is a route that specifies an exit interface without specifying a next-hop IP address.
- fully specified static routeA fully specified route is a route that specifies both a next-hop IP address and an exit interface.
- ip routeip route is a Cisco IOS configuration command that creates a static route in a router's routing table.
- default gatewayA default gateway is the router or forwarding path used to send traffic toward destinations outside a device's known networks.
- connected routeA connected route is a route to a network directly attached to an interface with an IP address that is operationally up.
- local routeA local route is a route to the exact IP address configured on a router interface, represented with a /32 prefix.
- next hopA next hop is the adjacent router or forwarding address to which a packet is sent on its path toward a destination network.
- routing tableA routing table is a data structure containing routes that describe reachable network destinations and how to forward packets toward them.
- exit interfaceAn exit interface is the router interface through which a packet is forwarded toward its destination.
- proxy arpProxy ARP is a router feature that replies to an ARP request on behalf of another host and supplies the router's own MAC address.
- recursive static routeA recursive static route is a static route that specifies a next-hop IP address and requires an additional lookup to determine the forwarding interface.
- default routeA default route is a route with destination prefix 0.0.0.0/0 that matches every IPv4 address when no more specific route matches.
- dynamic routingDynamic routing is a routing method in which routers exchange reachability information through routing protocols and automatically build routing tables.
- recursive routeA recursive route is a route that specifies a next-hop IP address without specifying the outgoing interface.
- arp requestAn ARP request is a broadcast protocol message that asks the host using a specified IP address to provide its MAC address.
- routerA network device that forwards packets between different networks based on network-layer addressing.
- most specific matching routeThe most specific matching route is the route whose network prefix has the greatest number of bits matching a packet's destination IP address.
- show ip routeshow ip route is a Cisco IOS command that displays a router's IP routing table.
- ipconfigipconfig is a Windows command-line utility that displays network interface configuration such as IP addresses, subnet masks, and default gateways.
- switchingA forwarding decision is a router's selection of the next forwarding action for a packet based on its destination and routing information.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
