Title: Routing Architecture and Protocols
1Routing Architecture and Protocols
2Outline
- Intro concepts
- Issues
- Architecture
- Routing protocols
- Distance-vector
- Link-state
- Autonomous System and Exterior Gateway Protocol
- BGP
- Interior Gateway Protocol
- RIP1 and RIP2
- OSPF
3Review - Internet Routing
- IP implements datagram forwarding
- Both hosts and routers
- Have an IP module
- Forward datagrams
- IP forwarding is table-driven
- Table known as routing table
4Elements of Routing
- routing protocols that allow info to be gathered
and distributed routers communicate with these
protocols - routing algorithms compute good routes based on
gathered data (like Bellman-Ford and Dijkstra) - routing table database of routes
5Its Classic problem!
6How / When Are IP Routing Tables Built?
- Depends on size / complexity of internet
- Static routing
- Fixes routes at boot time
- Useful only for simplest cases
- Dynamic routing
- Table initialized at boot time
- Values inserted / updated by protocols that
propagate route information - Necessary in large internets
7Routing Tables
- Two sources of information
- Initialization (e.g., from disk)
- Update (e.g., from protocols)
- Hosts tend to freeze the routing table after
initialization - But, routers use protocols to learn new
information and update their routing table
dynamically
8Original Arpanet Routing Architecture
- Small set of core routers with complete
information about all destinations - Other routers know local destinations and use the
core as central router (default route) - Disadvantages of original core
- Central bottleneck for all traffic
- No shortcut routes possible
- Does not scale
9General Idea Better!
- Have a set of core routers know routes to all
locations - Devise a mechanism that allows other routers to
contact the core to learn routes (spread
necessary routing information automatically) - Continually update routing information
10Automatic Route Propagation
- Two basic algorithms used by routing update
protocols - Distance-vector
- Link-state
- Many variations in implementation details
11Distance-Vector Algorithm
- Initialize routing table with one entry for each
directly connected network - Periodically run a distance-vector update to
exchange information with routers that are
reachable over directly connected networks - Each router sends list of its routes to another
12DV algorithm
- examples RIP, BGP
- Its algorithm elements
- send every N seconds out all connected
interfaces broadcast 2-tuples (to network X,
hop count Y) ... - recv if new tuple, add to routing table if
better tuple, change existing if dead tuple,
remove - timeout if no refresh, timeout entry in N Y
seconds
13Example Of DV Update
- Router K received an update from router J
- (a) is existing routing table at K
- (b) incoming update (marked items cause change)
14slow convergence/count to infinity
- DVs big problem!
- changes can be sent when they occur, but must
recompute a bit so convergence takes time (made
worse by possible loops) - count to infinity problem can occur too - routing
loop until hopcount reaches impossible value
15Count to infinity
- C crashes, B knows C crashed but hasnt told A,
but unfortunately A talks to B first B is told by
A - I can get to C in two hops (and note it doesnt
mention to B that the path is thru B) - B says AHA!, that means I can get to C in three
hops and reports that to A - A says AHA!, its now four hops to B and tells B
etc...
16split-horizon and poison reverse fixup
- Split-horizon
- A does not tell B that it can reach C (white lie)
- Because its through B
- Poison reverse
- When B loses connection to C, its distance to C
is changed to infinity - An immediate update is triggered, without wait
for regular update - when link goes away, B will know that there is no
path to C, and tell A - Still doesnt work in all cases
17Link-State Algorithm
- Alternative to distance-vector
- Distributed computation
- Broadcast information
- Allow each router to compute shortest paths
- Avoids problem where one router can damage the
entire internet by passing incorrect information - Also called Shortest Path First (SPF)
18Link-State Update
- Participating routers learn internet topology
- Think of routers as nodes in a graph, and
networks connecting them as edges or links - Pairs of directly-connected routers periodically
- Test link between them
- Propagate (broadcast) status of link
- All routers
- Receive link status messages
- Recompute routes from their local copy of
information
191 - Determine link-state
202 - Send LS-update
213 - Compute shortest path
22link-state pros/cons
- pros
- converges faster, no count to infinity problem
router can forward LSP immediately - more functionality e.g., each router has map of
net, can make network debugging easier - cons
- more compute than DV (does this matter?)
23ROUTING EXTERIOR GATEWAYPROTOCOLS AND
AUTONOMOUSSYSTEMS (BGP)
24General Principle for Internet Routing
- Although it is desirable for routers to exchange
routing information, it is impractical for all
routers in an arbitrarily large internet to
participate in a single routing update protocol - Consequence routers must be divided into groups
25A Practical Limit On Group Size
- Up to a dozen routers to participate in a single
routing area across a WAN - approximately five times as many can safely
participate across a set of LANs
26Router Outside A Group
- Does not participate directly in groups routing
information propagation algorithm - Problems
- Will not choose optimal routes if it uses a
member of the group for general delivery - May not know all networks from other groups
27The Extra HopProblem
- Non-participating router picks one participating
router to use (e.g., R2) - Non-participating router routes all packets to R2
across backbone - Router R2 routes some packets back across
backbone to R1 - So, a mechanism is needed that allows
nonparticipating routers to learn routes from
participating routers - so they can choose optimal routes.
28The Hidden Networks Problem
- Group must learn routes from nonparticipating
routers - Example owner of networks 1 and 3 must tell
group that there is a route to network 4
29Autonomous System Concept (AS)
- Group of networks under one administrative
authority - Free to choose internal routing update mechanism
- Connects to one or more other autonomous systems
30EGPs Exterior GatewayProtocols
- A protocol for communicating routes between two
autonomous systems - Solves two problems
- Allows router outside a group to advertise
networks hidden in another autonomous system - Allows router outside a group to learn
destinations in the group
31Border Gateway Protocol
- The most popular (virtually the only) EGP in use
in the Internet - Current version is BGP-4
- Supports CIDR (mask accompanies each route)
- Each AS designates a border router to speak on
its behalf - Two border routers become BGP peers
32Key Characteristics Of BGP
- Provides inter-autonomous system communication
- Propagates reachability information
- Follows next-hop paradigm
- Provides support for policies
- Sends path information
- Permits incremental updates
- Allows route aggregation
- Allows authentication
33Additional BGP Facts
- Uses reliable transport (i.e., TCP)
- Unusual most routing update protocols use
connectionless transport (e.g., UDP) - Sends keepalive messages so other end knows
connection is valid (even if no new routing
information is needed)
34Four BGP Message Types
35BGP Message Header
- Each BGP message starts with this header
- Marker is used by peers to indicate message
boundary gt synchronisation
36BGP Open Message
- Used to start a connection
- HOLD TIME specifies max time that can elapse
between BGP messages
37BGP Update Message
- Sender can advertise new routes or withdraw old
routes - Each route entry consists of address and mask
- Entry can be compressed to eliminate zero bytes
38BGP Must Consider Receivers Perspective
- Two issues are considered policies and optimal
routes - Advertise not just destinations but report
reachability too
39Path Metric Interpretation
- Each AS use own IGP may be with different metric
(hop count, delay, policy-based values) - So, an exterior gateway protocol does not
communicate or interpret metrics, even if metrics
are available! - BGP only propagates reachability information
- a receiver can implement policy constraints
- BUT cannot choose a least cost route.
40ROUTING INSIDE ANAUTONOMOUS SYSTEM(RIP, OSPF)
- Static routes
- Initialized at startup
- Never change
- Typical for host
- Sometimes used for router
- Dynamic routes
- Initialized at startup
- Updated by route propagation protocols
- Typical for router
- Sometimes used in host
41Exchanging Routing Information Within An
Autonomous System
- Mechanisms called interior gateway protocols,
IGPs - Choice of IGP is made by autonomous system
42Example Of Two Autonomous SystemsAnd the Routing
Protocols Used
RIP
OSPF
43Routing Information Protocol (RIP)
- Implemented by UNIX program routed
- Uses hop count metric
- Distance-vector protocol
- Relies on broadcast
- Assumes low-delay LAN
- Uses split horizon and poison reverse techniques
to solve inconsistencies - Current standard is RIP2
44Two Forms Of RIP
- Active
- Form used by routers
- Broadcasts routing updates periodically
- Uses incoming messages to update routes
- Passive
- Form used by hosts
- Uses incoming messages to update routes
- Does not send updates
45RIP Operation
- Each router sends update every 30 seconds
- Update contains pairs of
- (destination address, distance)
- Distance of 16 is infinity (i.e., no route)
- This limits span of its internet to 16 hops
- Any 2 nodes have at most 15 routers between
46Illustration Of HostsUsing Passive RIP
- Host routing table initialized to
Destination Route
128.10.0.0 default Direct 128.10.0.200
- Host listens for RIP broadcast and uses data to
update table - Eliminates ICMP redirects
47Changes To RIP In Version 2
- RIP1 does not include subnet mask
- Only suitable for classful or fixed-len subnets
- Update includes subnet mask
- Authentication supported
- Explicit next-hop information
- Messages can be multicast (optional)
- IP multicast address is 224.0.0.9
48RIP2 Update Format
49Open Shortest Path First (OSPF)
- Developed by IETF in response to vendors
proprietary protocols - Uses link-state algorithm
- More powerful than most predecessors
- Permits hierarchical topology
- More complex to install and manage
50OSPF Features
- Type of service routing the first to offer
- Load balancing across multiple paths
- Networks partitioned into subsets called areas
- Designated router per area
- Message authentication
- Virtual network topology abstracts away details
- Can import external routing information
51OSPF Message Header
- Each message starts with same header
- OSPF Message Types
- 1 Hello (used to test reachability)
- 2 Database description (topology)
- 3 Link status request
- 4 Link status update
- 5 Link status acknowledgement
52OSPF HELLO Message Format
- Used to establish and test reachability
53OSPF Database Description Message Format
Router Network Summary of nets AS boundary
- Initialises network topology database
- One serve as a Master other slave
- Can be large gt separate into different msgs
- I is 1 for first message, M is 1 for more messages
54Summary
- Internet is too large for all routers to
participate in one routing update protocol - Group of networks and routers under one
administrative authority is called Autonomous
System (AS) - EGP is used to communicate routing information
between two autonomous systems - Each AS chooses its own interior routing update
protocol - Popular IGPs include
- RIP (distance vector algorithm)
- OSPF (link-state algorithm)