Routing Concepts Flashcards

1
Q

IP Routing Process

A

Packet routing involves three main steps:

  1. Routing
    1. Find the outgoing interface for the packet
  2. Switching
    1. Move the packet between interfaces
  3. Encapsulation
    1. Rebuild the packet’s layer 2 header
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Step 1 - routing process

Find the outgoing interface

A

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
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Metric vs Distance

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Step 2 - switching process

Move the packet between interfaces

A
  • 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]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Step 3 - encapsulation process

Build the Layer 2 Header

A
  • Build the layer 2 header
    • Header type depends on egress interface
      • E.g. Ethernet vs. PPP
  • For multipoint interfaces, layer 3 to layer 2 resolution is required
    • Ethernet
    • Frame Relay Multipoint
    • ATM Multipoint
    • mGRE (DMVPN)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Encapsulation on Ethernet

Resolve the next-hop IP to next-hop MAC

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Encapsulation on mGRE (DMVPN)

Resolve the tunnel IP to the NBMA IP

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Routing to a Next-Hop

If multipoint (Ethernet), find MAC of next-hop

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Routing to a Multipoint Interface

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Routing to a Point-to-Point Interface

A
  • Recursion not required
  • Layer 2 resolution not required
  • Example
    • ip route 10.0.0.0 255.0.0.0 Serial0/0.1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Default Routing

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Other Default Routing

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Reliable Static Routing?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Configuring Reliable Static Routing

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What Is Policy Based Routing (PBR)?

Normal IP routing is destination based.

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How Policy Based Routing Works

A
  • Traffic criteria defined by a route-map match
    • Permit means to policy route
    • Deny means to use normal forwarding
    • match [interface | ip address | …]
  • Action defined by route-map set
    • set ip [default] next-hop
    • set [default] interface
  • Policy can be verified with…
    • debug ip policy
17
Q

Policy Routing Variations

A

PBR can apply to two types of traffic:

  • Incoming traffic
    • PBR applied at the link level
    • ip policy route-map [route-map]
  • Locally originated traffic
    • PBR applied globally
    • ip local policy route-map [route-map]
    • Be careful, some versions don’t have control plane checks
18
Q

Policy Routing Caveats

A
  • Most platforms can’t hardware accelerate PBR
  • Platforms that do have strict criteria limits
  • Outside of this PBR should be used sparingly
    • High CPU due to interrupts means process switching problem