BSCI: BGP Concepts I
Posted by Aragoen Celtdra on December 4th, 2008
Border Gateway Protocol (BGP)
- BGP is categorized as an advanced distance vector protocol.
- It is defined in RFC 4271, A Border Gateway Protocol (BGP-4).
- It uses Transmission Control Protocol (TCP) as its transport protocol.
- It uses TCP protocol 179 to deliver BGP information.
- These TCP segments are carried inside IP packets.
- By contrast:
- RIP uses UDP as its transport mechnism
- IS-IS resides on the network layer.
- OSPF and EIGRP reside directly above the IP layer.
- TCP somewhat simplifies the delivery mechanism of BGP by handling acknowledgment, retransmission, and secquencing of packets.
- TCP uses the concept of sliding windows when handling deliveries of packets. This allows a larger number of update packets to be received at one time. This can be a difference of an OSPF, for example, that will handle routing for 100 subnetsm while BGP can easily handle 200,000 subnets.
- In contrast with BGP, OSPF and EIGRP use a one-for-one windowing, such as when OSPF or EIGRP has to send multiple packets, the next packet cannot be sent until an acknowledgment from the last packet sent is received.
- TCP uses a dynamic window, which allows for up to 65,576 bytes to be outstanding before it stops and waits for an acknowledgment.
- In contrast with BGP, OSPF and EIGRP use a one-for-one windowing, such as when OSPF or EIGRP has to send multiple packets, the next packet cannot be sent until an acknowledgment from the last packet sent is received.
- BGP is an Interdomain Routing Protocol (IDRP), which is also an EGP.
- The main goal of BGP is to provide inter-domain routing system that guarantees the loop-free exchange of routing information between autonomous systems. BGP routers exchange information about paths to destination networks.
Autonomous System
A set of routers under the single technical administration, using an Interior Gateway Protocol (IGP) and common metrics to determine how to route packets within the AS, and using an inter-AS routing protocol to determine how to route packets to other [autonomous systems].
-RFC 4271
- Interior Gateway Protocol (IGP)
- A routing protocol that exchanges routing information within an autonomous system (AS). Examples are: RIP, OSPF, EIGRP, IS-IS.
- Exterior Gateway Protocol (EGP)
- A routing protocol that exchanges routing information between different autonomous systems. BGP is the most predominant example.
- The Internet Assigned Numbers Authority (IANA) allocates the AS numbers
- Within IANA, several regional corporations administer and registers IP addresses and AS for their respective region.
- African Network Information Centre (AfriNIC) – African continent.
- Asia Pacific Network Information Centre (APNIC) – Asia/Pacific.
- American Registry for Internet Numbers (ARIN) – Canada, US, parts of Caribbean and islands in North Atlantic Ocean.
- Latin American and Caribbean IP Address Regional Registry (LACNIC) – Latin America and parts of the Caribbean.
- Reseaux IP Europeens Network Coordination Centre (RIPE NCC) – Europe, Middle East, and Central Asia.
- The AS designator is a 16-bit number ranging from 1 to 65535.
- RFC 1930, Guidelines for creation, selection, and registration of an Autonomous System (AS), provides guidelines for the use of AS numners.
- AS range numbers 64512 to 65535 is reserved for private use.
Comparing BGP to Other Routing Protocols
- Most link-state routing protocols such as OSPF and IS-IS require a hierachical design – it allows a large network to be broken down into smaller networks called areas.
- EIGRP and BGP do not require a hierarchical topology.
- Internal routing protocols such as RIP, OSPF, EIGRP, and IS-IS use path costs (quickest path) to get to their destination, using certain metrics.
- RIP uses hop-counts. The fewer the better
- OSPF uses cost, based on bandwidth as its metric.
- IS-IS uses a metric based on bandwidth, which defaults to 10.
- EIGRP uses a composite metric, with bandwidth and accumulated delay considered by default.
- BGP, in contrast to the protocols mentioned, does not look at speed for the best path. Rather, it uses multiple BGP attributes to influence traffic flow between Autonomous Systems.
- BGP-enabled routers use path vectors or attributes – network reachability information.
BGP in an Enterprise Network
- BGP is more suitable in an enterprise if using multiple ISPs to connect to the Internet.
- If the enterprise has only one connection to one ISP, BGP might not be the best choice.
- BGP allows an enterprise with multiple connections to decide the best and optimal path by manipulating BGP path attributes.
- External BGP (EBGP) – when BGP is running between routers in different AS.
- Internal BGP (IBGP) – when BGP is running between routers in the same AS.
Multihoming
- Multihoming is when an autonomous system has more than one connection to the Internet.
- Typical reasons for multihoming are:
- Reliability – If one connection to the Internet fails, the other connection is available.
- Performance – By using better paths for certain destinations, performance may be increased.
- Multihoming can be accomplished with multiple connections to a single ISP or multiple connections to mulitple different ISPs.
- It is preferable to multihome with multiple ISPs instead of one:
- It has redundancy with multiple connections
- It is not limited to the policy of a single ISP
- Has more paths to the same networks for better policy manipulation.
- Three common ways to multihome with BGP are:
- Passing only a default route to the AS – each ISP passes only defualt route to the internal routers
- Passing only a default route + specific routes owned by the ISP - each ISP passes defualt route and their own routes to the AS internal routers, or all internal router in the trqansit path can run BGP and pass routes between them.
- Passing all routes to the AS - Each ISP passes all route to the AS, with all internal routers int he transit path running BGP and passing all the routes between them.
Option 1: Only Default Route
- With this option, a router within an AS learns about multiple default routes – these are routes sent by the ISPs.
- In this case the local IGP chooses the best default route for this router and installs it to the routing table. From its perspective, the router takes the default route with the least-cost IGP metric.
- The IGP default route will then route packets destined to the external networks to an edge router of this AS, which is running EBGP with the ISPs.
- The edge router will use the BGP default route to reach all external networks.
- For incoming traffic, the decision about which route to take is decided within the ISP
- Some limitations of this option are:
- Path manipulation cannot be performed because only a single route is being recieved from each ISP
- It is extremely difficult to manipulate bandwidth. It can be accomplished only by manipulating the IGP metric of the default route.
- Diverting some of the traffic from one exit point to another is challenging because all destinations are using the same default route for path selection.
Option 2: Send Default Routes and Partial Routes
- With this option all ISPs pass default routes and select specific routes to the AS.
- Generally, the partial routing table that is sent to the AS include the networks that the ISP and its customers own.
- If an ISP passes the partial route information to a customer, this customer can redeistribute these routes into its IGP. By doing this, packets destined to an outside network can take the nearest exit point based on the best metric of the specific network- as opposed to taking the nearest exit point base on the default route.
- Routes to other autonomous systems that were not passed by the ISPs are decided by the IGP metric that is used to reach the default route within the AS.
Option 3: Full Routes From All Providers
- All ISPs pass all routes to the AS, and IBGP is run on at least all the routers in the transit path in the AS.
- This option allows the internal routers of the AS to take the path through the best ISP for each route.
- Uses a lot of resources within the AS because it must process all the external routers.
Resources:
- Border Gateway Protocol – Wikipedia
- RFC 4271: A Border Gateway Protocol (BGP-4)
- RFC 1930, Guidelines for creation, selection, and registration of an Autonomous System (AS)
This entry is not an authoritative guide. These are merely notes and rehash of the primary text materials and resources that I use. For a thorough guide of the BSCI course, consider purchasing Building Scalable Cisco Internetworks (BSCI) (Authorized Self-Study Guide) (3rd Edition) by Diane Teare and Catherine Paquet, as well as following the links on the resources section of this entry.

December 4th, 2008 at 2:43 pm
Nice, i have been following your progress, keep up the spirit. i will soon start my blog too
December 4th, 2008 at 5:13 pm
@Nwachonky: Thanks for visiting.. Let me know what you’re blog is so I can add it to my feed and blogroll.