Routing: How paths between networks are chosen
A router chooses a route and next hop for the destination address, then forwards the packet to another network. Start with manually configured routes, then explore how OSPF and BGP learn and select routes, followed by redistribution between protocols. Finally, examine the effect on normal service when routing controls are used to respond to attacks.
The introduction separates route selection from actual packet forwarding. Continue from static routing to OSPF, BGP, and redistribution.
Attack response comes last. Use the links below for background on address planning and connections to external networks.
Read with a distinction between finding a route that matches a destination and being able to communicate over it. For static routes and failover, note the configured next hop and the condition that makes the route usable. When you reach OSPF and BGP, separate the information learned from other routers from the criteria used to select a route. A route learned through a protocol and one selected for forwarding are not necessarily the same.
In redistribution, follow which routes cross into another protocol and how their origin is identified. For attack-response examples, check not only which traffic is discarded or redirected, but also how normal service is affected. Connected tools can help with range and containment calculations; they do not inspect a live routing table. If you cannot tell whether a problem is an address, link, or route issue, return to the related address-planning and incident-response articles to organize what needs checking.
Four sections in this chapter
Explore four sections covering route selection and static routing, OSPF, BGP and redistribution, and responses to attack traffic.
How does a router choose a path for a packet?
Follow route-source and metric selection into the RIB/FIB, then longest prefix match, next-hop resolution, and adjacency-based packet forwarding.
Choose routes and prepare static routes for failures
Distinguish the routing table from the information used for forwarding, and learn how to detect failures beyond a directly connected link.
Calculate routes from connectivity within an organization
Follow OSPF neighbor formation, link-state exchange, route calculation, and updates to forwarding information, in that order.
Apply policy to routes learned from other networks
Examine BGP route attributes and policies. Track the source of redistributed routes and control which ones are allowed, so they do not cause problems by reentering their original network.
Use routing controls to limit the impact of attacks
Decide where to act before the link becomes saturated. Distinguish how blocking, observation, and traffic scrubbing affect normal service.
Background reading
These related articles are outside the core reading sequence.
- How do devices on different VLANs communicate? — Review how a gateway connects different networks
- How do your IP address needs determine subnet size? — Calculate the address range covered by a route's prefix
Explore further after the core articles
These related articles are outside the core reading sequence.
- How do multiple PCs share one public IP address? — Distinguish route selection from address translation
- How do enterprise networks connect to branches, clouds and the internet? — See which external connections require BGP and which do not
- Who allocates public IP addresses worldwide without overlap? — Understand the relationship between address-use rights and route advertisement
- How do you plan enterprise private IP addresses without overlap? — Plan private address space that supports route summarization
- What should you check and restore first when a network fails? — Connect attack response with isolation, recovery, and incident closure