Docstoc

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
Routing




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




                                          2
 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
     http://www.arin.net/index.shtml




                                                            3
Routing‫‏‬Inside‫‏‬and‫‏‬Outside‫‏‬AS’s
• Once‫‏‬we‫‏‬have‫‏‬level‫‏‬of‫‏‬AS’s
  • Routing‫‏‬can‫‏‬be‫‏‬thought‫‏‬of‫‏‬as‫‏‬routing‫‏‬between‫‏‬AS’s‫‏‬
    and‫‏‬routing‫‏‬within‫‏‬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‫‏‬
       larger‫‏‬ISP’s
     • With some only providing service to end users     4
IGP
• Interior Gateway Protocol
• Within a network/autonomous system
• Carries information about internal infrastructure
  prefixes
• Examples – OSPF, ISIS, EIGRP




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




                                               8
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




                                                  9
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 ...


                                                       10
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



                                                    12
• Path Vector to the rescue ....




  BGP is a Path Vector Protocol!!!
                                     13
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
    together


                                                             17
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
    efficiency




                                                                18
Internet Backbone and
Relationships




                        19
AS’s‫‏‬Have‫‏‬Business‫‏‬Relationships
• 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
AS’s‫‏‬Have‫‏‬Business‫‏‬Relationships
 Peering (equal)‫‏‬
• Voluntary interconnection of administratively separate
  Internet networks
• Exchange traffic between customers of each
  network
• 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
                                                           21
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
     (CIDR)‫‏‬
 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




                                                               24
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
                                                     25
Border Gateway Protocol (BGP)‫‏‬
• No metrics
• Not about optimizing anything
• All‫‏‬about‫‏‬policy‫(‏‬business‫‏‬and‫‏‬politics)‫…‏‬




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




                                                27
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
     slightly
     • For this reason
     • Some people refer to IBGP and EBGP as
       two separate protocols




                                                28
Border Gateway Protocol (BGP)‫‏‬
• Border routers in each AS communicate with
  neighboring‫‏‬routers‫‏‬in‫‏‬other‫‏‬AS’s
• 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

                                                          29
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.?




                                                         30
                                                      P

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

                                                        32
  BGP Operations (Simplified)

Establish session on   AS1
  TCP port 179


                                    BGP session
     Exchange all
     active routes
                                          AS2

                       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 ...



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


              AS1      BGP Sessions
                                      AS3



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

• BGP provides mechanisms for policy-based
  routing
   • 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
                                                                    39
Attributes are Used to Select Best
              Routes
                 192.0.2.0/24
                 pick me!




  192.0.2.0/24                  192.0.2.0/24
  pick me!                      pick me!



                                    Given multiple
                 192.0.2.0/24       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
• ORIGIN
  • Who originated the announcement?
  • IGP, EGP or Incomplete (often used for static routes)‫‏‬
• AS-PATH
  • List‫‏‬of‫‏‬AS’s‫‏‬through‫‏‬which‫‏‬announcement‫‏‬for‫‏‬a‫‏‬prefix‫‏‬has‫‏‬
    passed
  • 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
   128.73.4.21/21     232.14.63.4       1239 701 3985 631
Local Preference
• Next slide ...
• AS 100 is receiving two advertisements for
  network 172.16.1.0 from AS 200
  • When Router A receives the advertisement for network
    172.16.1.0,
     • Local preference is set to 50
  • When Router B receives the advertisement for network
    172.16.1.0,
     • 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 172.16.1.0 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,0)‫‏‬
   1                2       1                2

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

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

                                                   (3,2,0)‫‏‬

                                             3
                                                         50
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

                                                                 51
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‫‏…‏‬




                                                    53
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
     networks
• 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!
                                                        55
Routing Table Sizes
• 2009, BGP routing table has around 240,000 routes,
  up from 195,000 a year ago and 100,000 six years
  ago

• Trend over last year and a half has been exponential
  growth

• 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




                                           57
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
  altogether
       •“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
       changes”
• 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
     lightly”
  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
  agree.
   • 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:
   http://www.infoworld.com/archives/emailPrint.jsp?R=printThis&
      A=/article/07/09/27/radical-rethink-of-internet-routing_2.html
                                                                       60
Summary
• Hierarchy continues as a design principle at
  the Global Internet
  • Networks organized into Autonomous Systems
  • Independently managed with independent
    connections‫‏‬to‫‏‬other‫‏‬AS’s
• 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

                                                        61
References
• Network Peering and Exchange Points
http://www.infocellar.com/networks/internet/nap-ixp.htm


• BGP Overview and Tutorials
http://www.estoile.com/


• BGP Statistics
http://bgp.potaroo.net/
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
    Internet?
Next Lecture


Read: Chapter 5
Wed. IPV6

                  64

				
DOCUMENT INFO