4th Edition Chapter 1

Document Sample
4th Edition Chapter 1 Powered By Docstoc
					CSCD 433/533
Network Programming
Winter 2011

Lecture 9
Global Address Space
Autonomous Systems, BGP Protocol

More structure for Global Address Space
  • How to create yet more hierarchy
  • Benefits of more hierarchy
  • BGP – Interdomain routing

 Autonomous System Defined

• A collection of routers under same technical and
 administrative domain
•Eash AS, has globally unique number assigned to
them from a centralized authority (ARIN)‫‏‬
   • The American Registry for Internet Numbers (ARIN) is
     the authority responsible for tracking and assigning
     these numbers

• Once‫‏‬we‫‏‬have‫‏‬level‫‏‬of‫‏‬AS’s
  • Routing‫‏‬can‫‏‬be‫‏‬thought‫‏‬of‫‏‬as‫‏‬routing‫‏‬between‫‏‬AS’s‫‏‬
  • Created another level of hierarchy
     • Manage the complexity of routing in such a
       huge environment
  • Today’s‫‏‬Internet
     • Number of backbone networks operated by
       private companies
     • Smaller‫‏‬ISP’s‫‏‬have‫‏‬service‫‏‬agreements‫‏‬with‫‏‬
     • With some only providing service to end users     4
• Interior Gateway Protocol
• Within a network/autonomous system
• Carries information about internal infrastructure
• Examples – OSPF, ISIS, EIGRP

• Exterior Gateway Protocol
• Used to convey routing information between
• De-coupled from the IGP
• Current EGP is BGP4

EGP is Currently BGP
• Why do we need a separate routing protocol
  for interAS routing?
  •   Make routing decisions
  •   Protocol that scales to Internet
  •   Compute distances or hops to all routers
  •   Hierarchy fosters aggregation, efficiency

EGP is Currently BGP
• Why do we need a separate routing protocol
  for interAS routing?
  • Many reasons ... but
  • AS's route based on business relationships
  • Not about optimizing routes
  • Need to have built-in policy to recognize above
  • Want to be able to change routing tables and not
    disrupt internal routing
  • More in following slides ...

Link-State Routing is Problematic
• Topology information is flooded
  • High bandwidth and storage overhead
  • Forces nodes to divulge sensitive information

• Entire path computed locally per node
  • High processing overhead in a large network

• Minimizes some notion of total distance
  • Works only if policy is shared and uniform

• Path Vector to the rescue ....

  BGP is a Path Vector Protocol!!!
Interior vs. Exterior Routing Protocols

• Interior                     • Exterior
  – Automatic neighbor           – Specifically configured
    discovery                      peers
  – Generally trust your IGP     – Connecting with outside
    routers                        networks
  – Routes go to all IGP         – Set administrative
    routers                        boundaries
  – Binds routers in an AS       – Binds ASes together

Interior vs. Exterior Routing Protocols

• Interior                      • Exterior
  – Carries ISP                   – Carries customer
    infrastructure                  prefixes
    addresses only                – Carries Internet prefixes

  – ISPs aim to keep IGPs         – EGPs are independent
    small for scalability and       of ISP network topology

Internet Backbone and

• Neighboring‫‏‬AS’s‫‏‬have‫‏‬business‫‏‬contracts‫‏‬with‫‏‬
  each other
  • How much traffic to carry
  • Which destinations to reach
  • How much money to pay for transport of traffic
• Common business relationships
  • Customer-provider
     • E.g., Princeton is a customer of AT&T, the provider
  • Peer-peer
     • E.g., AT&T is a peer of Sprint
  .                                                          20
 Peering (equal)‫‏‬
• Voluntary interconnection of administratively separate
  Internet networks
• Exchange traffic between customers of each
• Requires physical interconnection of networks
• Often accompanied by peering agreements from
"handshake" to thick contracts
Transit (or pay)‫‏‬
•   You pay money to another network for Internet access
Customer (or sell)‫‏‬
• Another network pays you money to provide them with
Internet access
BGP Border Gateway Protocol
History of BGP
•    BGP first became an Internet standard in 1989
    Originally defined in RFC 1105
• Current version, BGP-4, was adopted in 1995
     and is defined in RFC 1771
• BGP-4 supports Classless Inter Domain Routing
 It is the routing protocol that people use today to
 route between autonomous systems
Who Can Run BGP?
• If you want to run BGP,
  • Ask Internet Service Providers to see if they will agree
    to communicate with you via BGP
  • You will have to show your need to run BGP
  • Only lines that run BGP are T1 speeds and above
  • The only providers that will allow you to exchange
    BGP routes with them are major (Tier 1 or Tier 2)
    Internet Service Providers

Border Gateway Protocol (BGP)‫‏‬
• Core routing protocol of the Internet
  • Maintains a table of IP networks or 'prefixes'
    which designate network reachability among
    autonomous systems (AS)‫‏‬
  • Described as a path vector protocol
     • Instead‫‏‬of‫‏‬hop‫‏‬count,‫‏‬uses‫‏‬AS’s‫‏‬as‫‏‬hops
  • BGP makes routing decisions based
     • On path,
     • Network policies and/or
     • Rulesets
Border Gateway Protocol (BGP)‫‏‬
• No metrics
• Not about optimizing anything
• All‫‏‬about‫‏‬policy‫(‏‬business‫‏‬and‫‏‬politics)‫…‏‬

BGP Has Two Versions
• Two versions of BGP
  • Routers‫‏‬between‫‏‬AS’s‫‏‬use‫‏‬EBGP
  • Routers within AS use iBGP to synchronize

BGP Has Two Versions
• BGP uses the same types of message on
  IBGP and EBGP sessions
   • But rules for when to send which message
     and how to interpret each message differ
     • For this reason
     • Some people refer to IBGP and EBGP as
       two separate protocols

Border Gateway Protocol (BGP)‫‏‬
• Border routers in each AS communicate with
• BGP route announcements say:
  • “I‫‏‬can‫‏‬reach‫‏‬this‫‏‬network,‫‏‬and‫‏‬this‫‏‬is‫‏‬the‫‏‬path‫‏‬of‫‏‬
    AS Numbers I heard this from
  • Plus some attributes I choose to tell you
  • Can’t‫‏‬accept‫‏‬route‫‏‬if‫‏‬your‫‏‬AS‫‏‬Number‫‏‬is‫‏‬in‫‏‬it”

  • Prevents‫‏‬loops,‫‏‬can’t‫‏‬route‫‏‬back‫‏‬through‫‏‬the‫‏‬AS‫‏‬it‫‏‬
    got the route from

Border Gateway Protocol
• BGP‫‏‬works‫‏‬by‫‏‬advertising‫‏‬a‫‏‬complete‫‏‬path‫‏‬of‫‏‬AS’s‫‏‬to‫‏‬
  reach a particular network
• Example‫‏‬network‫‏…‏‬Details‫‏‬follow‫‏‬
   •How to get to 128.96, 192.4.153 etc.?


BGP Protocol                                          Q

• Example: Details
• BGP works by electing at least one speaker
  router for the entire AS of Provider A (AS2)‫‏‬
  • Able to advertise reachability info for each network
    assigned to customers P an Q
  • Thus it would say
     • Network 128.96, 192.4.153, 192.4.32 and
       192.4.3 can be reached directly from AS2
     • Backbone network can advertise 128.96,
       192.4.153, 192.4.32, 192.4.3 can be reached
       along path (AS1, AS2)‫‏‬                              31
More BGP Details
• Uses TCP as its transport protocol
  • Uses port 179
  • Use of TCP as BGP's transport protocol
     • Guarantees transport reliability
     • Eliminates additional complexity related to
       designing reliability into the protocol itself
  • BGP data enclosed within TCP packets
     • After setting up a BGP session and exchanging
       initial routes, BGP peers trade incremental
       routing and notification updates

  BGP Operations (Simplified)

Establish session on   AS1
  TCP port 179

                                    BGP session
     Exchange all
     active routes

                       While connection
Exchange incremental   is ALIVE exchange
                       route UPDATE messages
     updates                                   33
More BGP Details
• Routers that run a BGP routing process
  referred to as BGP speakers
  • Pair of BGP-speaking routers that form a TCP
    connection to exchange routing information
    between them
     • BGP neighbors or peers
     •A single router can participate in many peering
     sessions at any given time
  • See next slide ...

 BGP Sessions
• One router can participate in many BGP
• Initially …‫‏‬node‫‏‬advertises‫‏‬ALL‫‏‬routes‫‏‬it‫‏‬
  wants neighbor to know about
• Ongoing …‫‏‬only‫‏‬inform‫‏‬neighbor‫‏‬of‫‏‬changes

              AS1      BGP Sessions

Four Basic Messages
• Open:
  Establishes BGP session (TCP port #179)‫‏‬
• Notification:
  Report unusual conditions
• Update:
  Inform neighbor of new routes that become
  Inform neighbor of old routes that become
• Keepalive:
  Inform neighbor that connection is still viable
BGP Enables Policy Based Routing

• BGP provides mechanisms for policy-based
   • BGP routers can rank routes and control information
     redistribution according to their administrator's preference
   • BGP carries out policy routing by filtering certain routes,
     based attributes
• Policies are not part of the protocol!!!
   • Decisions made by AS administrator, and are
     specified to BGP by AS administrator in
     configuration files
   • Routing policies are often coupled to security,
     economic, or political considerations
Attributes are Used to Select Best
                 pick me!        
  pick me!                      pick me!

                                    Given multiple
              routes to the same
                                    prefix, a BGP speaker
                 pick me!

                                    must pick at most
                                    one best route

                                    (Note: it could reject
                                    them all!)‫‏‬
Policy Attributes
  • Who originated the announcement?
  • IGP, EGP or Incomplete (often used for static routes)‫‏‬
  • List‫‏‬of‫‏‬AS’s‫‏‬through‫‏‬which‫‏‬announcement‫‏‬for‫‏‬a‫‏‬prefix‫‏‬has‫‏‬
  • Each AS prepends its AS # to the AS-PATH attribute when
    forwarding an announcement
  • Useful to detect and prevent loops

   Prefix             Next hop          AS Path       1239 701 3985 631
Local Preference
• Next slide ...
• AS 100 is receiving two advertisements for
  network from AS 200
  • When Router A receives the advertisement for network,
     • Local preference is set to 50
  • When Router B receives the advertisement for network,
     • Local preference is set to 100
  • Because Router B has a higher local preference than
    Router A, Router B will be used as exit point from AS
    100 to reach network in AS 200
Local Preference
  BGP Path Selection
• Example of the complexity in BGP
• BGP uses the following criteria, in the order presented, to select a path
  for a destination:
   •   If the path specifies a next hop that is inaccessible, drop the update.
   •   Prefer the path with the largest weight.
   •   If the weights are the same, prefer the path with the largest local preference.
   •   If the local preferences are the same, prefer the path that was originated by BGP
       running on this router.
   •   If no route was originated, prefer the route that has the shortest AS_path.
   •   If all paths have the same AS_path length, prefer the path with the lowest origin type
       (where IGP is lower than EGP, and EGP is lower than incomplete).
   •   if the origin codes are the same, prefer the path with the lowest MED attribute.
   •   If the paths have the same MED, prefer the external path over the internal path.
   •   If the paths are still the same, prefer the path through the closest IGP neighbor.
   •   Prefer the path with the lowest IP address, as specified by the BGP router ID.

• Kind‫‏‬of‫‏‬complicated‫‏‬as‫‏‬you‫‏‬can‫‏‬see‫.…‏‬
• But, very flexible, a lot of choices for AS administrators                                    46
BGP Route Failures
BGP Session Failure
• BGP runs over TCP
   • BGP only sends updates AS1
     when changes occur
   • TCP‫‏‬doesn’t‫‏‬detect‫‏‬lost‫‏‬
     connectivity on its own
• Detecting a failure
   • Keep-alive: 60 seconds
   • Hold timer: 180 seconds
• Reacting to a failure
   • Discard all routes learned
     from the neighbor            AS2
   • Send new updates for any
     routes that change                 48
Routing Change: Before and After

           0                       0
(1,0)‫‏‬             (2,0)‫‏‬                    (2,0)‫‏‬

   1                2       1                2

(3,1,0)‫‏‬                                   (3,2,0)‫‏‬

               3                       3
Routing Change: Path Exploration
• AS 1
  • Delete the route (1,0)‫‏‬
  • Switch to next route (1,2,0)‫‏‬
  • Send route (1,2,0) to AS 3
• AS 3
  • Sees (1,2,0) replace (1,0)‫‏‬
  • Compares to route (2,0)‫‏‬
                                    1                2
  • Switches to using AS 2


BGP Converges Slowly
• Path vector avoids count-to-infinity
   • But, ASes still must explore many alternate paths
   • …‫‏‬to‫‏‬find‫‏‬the‫‏‬highest-ranked path that is still available

• Fortunately, in practice
   • Most popular destinations have very stable BGP routes
   • And most instability lies in a few unpopular destinations

• Still, lower BGP convergence delay is a goal
   • Can be tens of seconds to tens of minutes
   • High for important interactive applications
   • …‫‏‬or‫‏‬even‫‏‬conventional‫‏‬application,‫‏‬like‫‏‬Web‫‏‬browsing

Status and Future of BGP
Scale still a Problem
• CIDR helped with control of distinct network
  numbers within router tables
  • Yet, backbone routers still have over 200,000
    network prefixes as of 2007
  • Its‫‏‬causing‫‏‬concern‫‏…‏‬

Long Term Growth Trends
in Internet Routing
• Question???
• Will this routing system be able to scale and
  meet the growth of the Internet and its ever-
  expanding level of demands?
  • Are there any inherent limitations?
  • As more devices connect to Internet and consume
    addresses, the need to maintain reachability to
    these addresses implies larger routing tables
• What is the ability of the system to produce a
  stable view of the overall network topology?
• What about security or privacy?
 Router Table Growth

• BGP routing tables are master lists of network
  destinations stored in backbone routers
   • Used to determine best available path between
• Experts currently worried about explosive growth in
  BGP routing tables
   • Strains processing and memory requirements of
     Internet's core routers
   • BGP table growth drives up carrier costs
   • Everyone worries about costs!
Routing Table Sizes
• 2009, BGP routing table has around 240,000 routes,
  up from 195,000 a year ago and 100,000 six years

• Trend over last year and a half has been exponential

• Experts worried that some older routers could fail
  when the routing table tops 244,000 entries

   • They are saying,
   "We are at the point where some of the deployed
     hardware‫‏‬is‫‏‬hitting‫‏‬its‫‏‬limits‫”…‏‬                   56
BGP Router Table Entries by Year to 2007

BGP Router Table Entries by Year to 2011
Solutions from Internet Research Task
Force (IRTF)‫‏‬
• IRTF's Routing Research Group
   • Soliciting proposals from academic and corporate
     researchers for alternative routing architectures.
• Possible Research Group recommend scrapping BGP
       •“Trying to look at fundamental routing architecture and make
       appropriate changes to that," Zhang from Routing Research
       Group says.
       •"Once we've decided what the new routing architecture should
       look like, we can look at whether BGP may also require
• IRTF says change to BGP will have a huge affect,
   • "BGP exists on hundreds of thousands of routers and
     changing BGP is not something that is going to be done       59
  Solutions from Internet Research
  Task Force (IRTF)‫‏‬
• Recommend keeping BGP tweaking it so that it carries different,
  preferably less, information
   • "Maybe BGP won't carry entire noise of Internet and all the
      destinations, but instead it may carry a much smaller set of
      visible landmarks," he says.
• Any solution that the Routing Research Group comes up with is
  at least five years away from commercial availability, experts
   • IRTF cautiously optimistic about group's ability to solve the
      routing table growth problem
   • They agree that whatever solution they come up with must
      be incrementally deployable and transparent to end users.
• Reference:
• Hierarchy continues as a design principle at
  the Global Internet
  • Networks organized into Autonomous Systems
  • Independently managed with independent
• Routing between them using BGP
• Routing becomes not just an exercise in
  shortest path delivery
  • But,‫‏‬incorporates‫‏‬policy‫‏‬decisions‫‏‬between‫‏‬ISP’s‫‏‬
    based on political (monetary) alliances

• Network Peering and Exchange Points

• BGP Overview and Tutorials

• BGP Statistics
Extra Credit - Egypt Discussion
• Want more Extra Credit?
  • Answer these questions and come prepared to
    discuss this next time ...
  1. How did the Egyptian government shut down the
    Internet? Did they push a big red button?
  2. Does this have anything to do with BGP routing?
  3. Could the US shut down the Internet in the same
    way it was done in Egypt?
  4. Are there any bill pending in Congress or proposed
    that gives Obama the power to shut down the
Next Lecture

Read: Chapter 5
Wed. IPV6