Notes8:InteriorRoutingandOSPF - echadbourne/NET-330 GitHub Wiki
What do routers do?
- Find path
- Forward packet...
- Find alternate path
- Forward packet
- Repeat until powered off
Routing vs forwarding
- Routing = building maps and giving directions
- Forwarding = moving packets between interfaces according to the "directions"
IP Routing - Finding the Path
- Path delivered from information received from a routing protocol
- Several alternative paths may exist (best are stored in a forwarding table)
- Decisions are updated periodically or as a topology changes (event driven)
Decisions are based on:
- topology
- policies
- metrics (hop count, filtering, delay, bandwidth, etc)
IP route lookup
Based on desination IP address
Longest match routing
- More specific prefix preferred over less specific prefix
- Example: packet with destination of 10.1.1.1/32 is sent to the router announcing 10.1/16 rather than the router announcing 10/8
IP Forwarding
- Router decides which interface a packet is sent to
- Forwarding table populated by routing process
- Forwarding is usually aided by special hardware
Forwarding decisions
- Destination address
- Class of service (fair queuing, precedence, others)
- Local requirements (packet filtering)
FIB is the forwarding table
- It containts destination and the interfaces to get to those destinations
- Used by the router to figure out where to send the packet
- Careful! some people still call this a route
RIB is the routing table
- It contains a list of all the destinations and the various next hops used to get to those destinations - and lots of other information too
- One destination can have lots of possible next hops - only the best next hop goes into the FIB
Routing Protocols
routers use "routing protocols" to exchange routing information with each other
- IGB is used to refer to the process running on routers inside an organization's network
- EGP is used to refer to the process running between routers bordering directly connected ISP networks
IGP
- Interior Gateway Protocol
- OSPF, ISIS
EGP
- External Gateway Protocol
- Used to convey routing information between organizations
- De-Coupled from IGP
- Current widely-use EGP is BGP (Border Gateway Protocol)
Why do we need an EGP?
Scaling to large network
- Heirarchy
- Limit scop of failure
Define Administrative Boundary
Policy
- Control reachability of prefixes
- Merge separate organizations
- Connect multiple IGPs
Dynamic IGP Types
Distance vector
-
Routers send out broadcasts/multicasts with their routing table
-
Other routers listen, and update their tables accordingly
-
Typically send tables every 30-60 seconds
-
Routing preference is based solely on Hops (how many routers between networks_
-
Noisy (lots of broadcasts), slow to converge, does not scale to large or complex networks
-
RIPv2 is common
Link State
- More popular for IGP
- Routers figure out who they neighbor
- After initial convergence - Only send Hellos (keep-alives) and Link State updates with changes
- Uses more advances route-selection metrics (notably - bandwidth)
- Open Shortest Path First (OSPF) is most popular IGP
OSPF
- Does not use a transport protocol (UDP or TCP) - It is its own layer 4 - IP Protocol 89
- Uses "Area" to determine which routers listen/talk to each other
- Can just be one, or many if you have a large network
Configuring OSPF
Relatively easy on Cisco
-
Create an OSPF instance: the process ID specific to that router
#(config) router ospf [instance_number]
(usually just one)- Do not confuse "instance" and "area"
- Instance: A router can have multple OSPF processes running. Imagine a router connecting two totally different organizations and configuring OSPF for both
- Area: Must be the same among all routers that need to share info within a particular instance
-
Add all of the directly connected networks on that router
- Network address with wildcard mask and area #
#(config-router) network 192.168.3.0 0.0.0.255 area 0