Routing Concepts Flashcards
IP Routing Process
Packet routing involves three main steps:
-
Routing
- Find the outgoing interface for the packet
-
Switching
- Move the packet between interfaces
-
Encapsulation
- Rebuild the packet’s layer 2 header
Step 1 - routing process
Find the outgoing interface
What does the router do when a packet enters?
-
Find the longest match to the destination
- show ip route 1.2.3.4
- 1.0.0.0/8
- 1.2.0.0/16
- 1.2.3.0/24
- show ip route 1.2.3.4
-
Recurse to the outgoing interface
- 1.2.3.4 via 5.6.7.8
- 5.6.7.8 via 9.0.1.2
- 9.0.1.2 via 3.4.5.6
- 3.4.5.6 directly connected, GigabitEthernet1
- Note: a route cannot be installed in the routing table unless the recursive lookup is successful.
Metric vs Distance
What if there are multiple longest matches?
-
Same protocol
- Choose lowest metric
- Rules vary per protocol
- E.g. OSPF internal over external
-
Different protocols
- Choose lowest Administrative Distance
Step 2 - switching process
Move the packet between interfaces
-
Move the packet between interfaces
- Called the “switching path”
- Process, Fast, CEF, etc.
-
This is where load balancing occurs
- Ideally per flow, not per packet
-
Verification
- show ip interface
- show ip cef [address] [detail]
- show ip cef exact-route [source] [destination]
Step 3 - encapsulation process
Build the Layer 2 Header
-
Build the layer 2 header
- Header type depends on egress interface
- E.g. Ethernet vs. PPP
- Header type depends on egress interface
- For multipoint interfaces, layer 3 to layer 2 resolution is required
- Ethernet
- Frame Relay Multipoint
- ATM Multipoint
- mGRE (DMVPN)
Encapsulation on Ethernet
Resolve the next-hop IP to next-hop MAC
-
Resolve the next-hop IP to next-hop MAC
- Address Resolution Protocol (ARP)
-
Check the ARP cache first
- show ip arp
-
If no match, broadcast the request
- debug arp
Encapsulation on mGRE (DMVPN)
Resolve the tunnel IP to the NBMA IP
-
Resolve the tunnel IP to the NBMA IP
- Next-Hop Resolution Protocol (NHRP)
-
Check the NHRP cache first
- show ip nhrp
-
If no match, ask the next-hop server (NHS)
- debug nhrp
- debug dmvpn
Routing to a Next-Hop
If multipoint (Ethernet), find MAC of next-hop
- Recurse to the interface
- If multipoint, resolve next-hop
- Example
- ip route 10.0.0.0 255.0.0.0 1.2.3.4
- Find interface for 1.2.3.4
- If multipoint, find layer 2 address of 1.2.3.4
Routing to a Multipoint Interface
- Recursion not required
- Resolve layer 2 address for final destination
- Ethernet Proxy-ARP
- NHRP mappings
- Example
- ip route 10.0.0.0 255.0.0.0 FastEthernet0/0
- Find layer 2 address of 10.0.0.1
Routing to a Point-to-Point Interface
- Recursion not required
- Layer 2 resolution not required
- Example
- ip route 10.0.0.0 255.0.0.0 Serial0/0.1
Default Routing
-
To a next-hop
- Use the layer 2 address of the next hop for all layer 3 destinations
-
To a multipoint interface
- All destinations require layer 3 to layer 2 resolution
- Layer 2 mapping table size problems
-
To a point-to-point interface
- No layer 3 to layer 2 resolution required
Other Default Routing
-
ip default-gateway
- Only when IP routing is off
-
ip default-network
- Network flagged as default in routing advertisements
- Must be a classful network that is not directly connected
What is Reliable Static Routing?
- Only criteria for installing a static route is the route recursion process
- Can I find the outgoing interface?
- Static routes don’t know the network conditions on the other end of the link
- Next hop may be reachable or may be down
- Reliable static routes combine static routing with enhanced objects
- Enhanced object calls IP SLA feature to track remote reachability
- If tracked object is down, static route is removed from the routing table
- Allows for more intelligence with floating static routes
- Primary static route tracks remote next hop
- If remote next hop is unreachable, remove the static route
- Floating static replaces it and connectivity can be maintained
Configuring Reliable Static Routing
- Define IP SLA agreement
- E.g. ping the remote end of the link
- Define tracked object
- Tracked object calls IP SLA agreement
- Tie tracked object to static route
What Is Policy Based Routing (PBR)?
Normal IP routing is destination based.
-
Normal IP routing is destination based
- Find the longest match to the destination
- Route the packet towards the next-hop
-
PBR allows forwarding decision to be based on…
- Source
- Destination
- Protocol type (FTP, HTTP, etc.)
- Incoming interface