Network Layer – 8 Routing
Shri Mare
[email protected]
CSCI 367: Computer Networks I
Thanks to Aran Clauson, Dustin O'Hara, Michael Meehan, Michael Tsikerdekis, Ratul Mahajan, Brian
Hutchinson, and many others for sample slides and materials ...
From last class – Routing within a network
Distance-Vector (Bellman-Ford) Routing
Distance-Vector (Bellman-Ford) Routing
• Advantage
• In a static environment, distance-vector algorithms compute shortest paths and correctly propagate routes to all destinations.
• Disadvantage:
• Slow to converge
• When routes change rapidly, the computations may not stabilize.
• They don’t not scale well:
• Requires the exchange of large messages, proportional to the total number of networks in an internet
• Requires every router to participate.
• Routing Information Protocol (RIP)
• Widely used routing protocol in early days
• Uses Distance-Vector routing algorithm
Link-State Routing (1)
• Link state, link status, or Shortest Path First (SPF) is the main alternative to distance-vector algorithms.
• Variations of this routing algorithm are used in practice
• Basic idea of link state routing:
Each router must do the following things 1. Discover neighbors and set their costs
2. Construct a link-state packet with information from (1) 3. Sent the link-state packet to all other routers
4. Receive link-state packets from other routers
5. Computer shortest path from available information
• (Steps 3-4) Reliable Flooding
• Broadcast to all neighbors downstream
• (Step 5) Route calculation
• Calculate shortest path from the received information
• Use Dijkstra’s algorithm to calculate shortest path
• Open Shortest Path First Protocol (OSPF)
Link-State Routing (2)
• A link-state packet (LSP) contains the following information
1. The ID of the node that created the LSP
2. A list of directly connected neighbors of that node, with the cost of the link to each one 3. A sequence number
4. A time to live for this packet
• LSP is broadcasted only downstream
Routing Across Networks
What is routing across networks?
Why we need it?
There are three reasons that routers must be divided:
Traffic. No routing protocol can accommodate an arbitrary number of sites, the routing traffic becomes overwhelming.
Distance-vector protocols require routers to exchange the entire set of networks Link-state protocols periodically broadcast announcements of connectivity.
Indirect Communication. Routers in the global Internet cannot communicate directly.
Intermediate hops are required to reach most routers.
Administrative Boundaries. In the Internet, networks and routers are not all owned and managed by a single entity.
Shortest paths are not always used. Large ISPs route traffic along paths that generate revenue or have lower financial cost.
A routing architecture must provide control for each administrative group.
Design principle for Routing Architecture:
1. No routing update protocol can scale to allow all routers in the global Internet to exchange routing information.
2. Routers must be divided into separate groups, and routing protocols designed to operate within a group.
Key takeaway: To scale routing, we divided networks into groups/domains called
Autonomous Systems (ASes) Each AS is managed by one entity
Autonomous System Concept
Networks and routers owned by a given entity fall under a single administrative authority.
single administrative authority
- guarantees that internal routes remain consistent & viable.
- chooses one or more of its routers to notify the outside world of networks within the organization - chooses one or more of its routers to learn about networks that are outside the organization.
In the context of routing, we refer to this single administrative authority as an Autonomous System (AS).
AS choose their own mechanisms for discovering, propagating, validating, and checking the consistency of routes.
AS summarize routing information and send the summary to neighboring AS.
AS can be an ISP, corporate or university intranet, etc…
AS are defined by precise boundaries.
AS are defined by distinct policies.
Exterior Gateway Protocols and Reachability
An autonomous system configures one or more of its routers to communicate with routers in other autonomous systems (AS).
Information flows in two directions.
Exterior Gateway Protocol (EGP)
Passes network reachability information between two autonomous systems (AS).
Border Gateway Protocol (BGP) - most common EGP
(1) The router collects information about networks inside its AS and then “advertises” or passes the information out.
(2) The router accepts information about networks in other AS(s) and disseminate the information inside.
Goal is reachability – finding a reachable path, not necessarily an
optimal/shortest path.
Basics of BGP
1. Border router:
• An IP router that forwards packets between Autonomous Systems (ASes)
2. BGP speaker:
• An IP router that “speaks” BGP to BGP speakers in other ASes
• This is typically the border router
3. BGP does not use either the distance-vector algorithm or the link-state algorithm.
Instead, BGP uses a modification known as a path-vector algorithm
• Path-vector: Why knowing full path is essential?
12
How are BGP routes advertised?
• Route announcements have:
• IP prefix
• Path vector
• Next hop
• Route announcements move in the opposite direction to traffic
13
BGP routing policies between ASes
• A routing policy is implemented by deciding what traffic flows over which links between ASes Two common policies:
• Transit policy
• ISP accepts traffic for customers from/to the rest of the internet
• Peer policy
• ISP accepts traffic only from/to their customers.
14