Intro to BGP All Day Tutorial Avi Freedman freedman netaxs com Index Internet Connectivity Overview Multihoming Concepts Multihoming Without BGP Multihoming Address Space Complications Index Basic BGP The BGP Route Basic BGP Inserting Routes into BGP Basic BGP Advertising Routes Basic BGP Other BGP Route Attributes Basic BGP Selecting Routes Index Multihoming with BGP an Introduction Interlude Hardware for BGP Multihoming with BGP with a Cheap Router Multihoming with BGP Taking Just Customer Routes Multihoming with BGP Taking Full Routes Default Routing in BGP Internet Connectivity Overview Having Internet Connectivity To have complete Internet connectivity you must be able to reach all destinations on the net Your packets have to get delivered to every destination This is easy default routes Packets from everywhere else have to find you This is done by having your ISP s advertise routes for you Multihoming Without BGP Multihoming Without BGP To get Internet connectivity you can just default route your traffic to your upstream providers To get traffic back from the Internet you need to have your providers tell all of the rest of the Internet where you are BGP Route Advertisement 1 Think of a BGP route as a promise If I advertise 207 8 128 0 17 I promise that if you deliver traffic to me for anywhere in 207 8 128 0 17 I know how to deliver it at least as well as anyone else If my customer has 207 8 140 0 24 I generally will not announce that route separately since it is covered by my 207 8 128 0 17 aggregate route BGP Route Advertisement 2 By making sure these routes or promises are heard by ALL providers on the net your provider ensures a return path for all of your packets Remember sending packets OUT is easier than getting them back Also remember sending routes OUT causes IP traffic to come IN BGP Route Advertisement 3 But the most specific route wins so if one of my customers ISPs is advertising 207 8 240 0 24 all incoming traffic from other networks will start flowing in that pipe So I must punch a hole in my aggregate announcement and advertise 207 8 128 0 17 and 207 8 240 0 24 BGP Route Advertisement 4 The complete set of routes advertised by all BGP speakers on the net is about 55 000 routes as of 10 98 If your route is missing in the view of any major provider you will not have connectivity to them Multihoming Without BGP How it Works Customer Side Outbound All you need to do is to put in static default route s To prefer two upstreams equally ip route 0 0 0 0 0 0 0 0 s4 0 ip route 0 0 0 0 0 0 0 0 s4 1 To use one link as a backup only for outbound packtes ip route 0 0 0 0 0 0 0 0 s4 0 ip route 0 0 0 0 0 0 0 0 s4 1 10 why S4 1 could be a 56k or backup link Cisco Load Balancing The way Ciscos except for big new ones running CEF work if there are two equal cost routes to the same place is Option 1 Round robin the packets without route caching This goes through the slowest sections of the router s OS Bad Also if you are connected to different ISPs packets can arrive out of order etc Option 2 Use route caching default Traffic to the same dest IP will always use the same interface until the cache entry expires Customer Side Inbound Just tell your ISP what address space you are bringing if any Your ISP may allocate you space out of their larger address blocks If so they need to announce your space more specifically But you do no work other than tell your ISP what to do Provider Side 1 If both providers don t advertise your routes with the same specificity you might have netaxs saying 4969 sez 207 8 128 0 17 uunet saying 701 sez 207 8 195 0 24 Bad because almost all traffic on the net will come into you via UUNET note talk about address filters Provider Side 2 What you need is netaxs saying 4969 sez 207 8 128 0 17 netaxs saying 4969 sez 207 8 195 0 24 uunet saying 701 sez 207 8 195 0 24 Good because 1 Because the two 207 8 195 0 24 routes are of the same specificity providers CAN choose btwn netaxs and uunet to get to you and 2 For some people who don t listen to 24s and such in new address space they still have the 207 8 128 0 17 route to use to get to you Address Space Complications So in the case of netaxs saying 4969 sez 207 8 128 0 17 netaxs saying 4969 sez 207 8 195 0 24 uunet saying 701 sez 207 8 195 0 24 Some people won t listen to the 24 so what happens if my netaxs connection goes down Not a problem Because netaxs will hear the UUNET 24 Sprint send traffic to netaxs netaxs to uunet and uunet to you Disadvantages of not using BGP You gain a bit more control of your destiny when you speak BGP yourself You can break up your routes in an emergency or to tune traffic You can pad your announcements to de prefer one or more upstreams Also you lose the ability to fine tune outbound traffic flow to the best upstream Why BGP BGP is a multi vendor open protocol with multiple implementations all mostly interoperable It is the only actively used EGP on the Internet The main design feature of BGP was to allow ISPs to richly express their routing policy both in selecting outbound paths and in announcing internal routes Keep this in mind as we progress What is BGP BGP is 1 An Exterior Gateway Protocol EGP used to propagate tens or hundreds of thousands of routes between networks ASs The only protocol used to do this on the Internet today BGP is 2 The Border Gateway Protocol currently Version 4 defined in RFC 1771 and extended with additional optional attributes in other RFCs A distance vector routing protocol running over TCP port 179 Supports modern classless routing BGP3 RIPv1 and some others do NOT Purpose of BGP Purpose of BGP To allow networks to tell other networks about routes parts of the IP address space that they are responsible for Using route advertisements or promises also called NLRI or network layer reachability information Networks are Autonomous Systems Identified in BGP by a number called the ASN Autonomous System Number Basic BGP Concepts Basic BGP Concepts 1 BGP exchanges routes between ASs When routes are exchanged ASNs are stamped on the routes on the way out adding one AS hop per network traversed 0 65535 No concept of pipe size internal router hop count congestion in some sense BGP treats all ASs the same ASs allow administrative debugging policy routing and loop detection BGP AND ASNs AS 12001 AS 4969 AS 6461 AS …
View Full Document
Unlocking...