Tuesday, April 21, 2015

BGP: Internet Routing Architectures, Part III

Optimal routing solution:
  1. Redundancy: providing multiple alternative paths for the traffic.
  2. Symmetry: having traffic that leaves the AS from an exit point return through the same point.
  3. Load balancing: dividing traffic optimally over multiple links. Extremely challenging because multiple providers control and manipulate traffic that transits any AS.

REDUNDANCY

  • Connectivity is not the responsibility of one entity.
  • At any time, human error, software errors, physical errors, or adverse unforeseen conditions can jeopardize connectivity. Hence, redundancy is desirable.
  • However, the more redundancy a network has, the more unpredictable the traffic entrance and exit points are.
  • Traffic might exit on one point and come back on another.
  • Alternate routes translate into additional routing overhead.
  • Default routes become viable because they minimize resource consumption and provide "maximum" redundancy.
  • Any router advertising the universally known default route 0.0.0.0/0 represents itself as a gateway of last resort for other systems.
  • Default routes can be static or dynamic and they can point to a network or an exit interface.
  • It is important for defaults to disappear dynamically if what they point to disappears.
  • Selected default networks should not be specific subnets.
  • A subnet that is flip-flopping might cause your default to come and go constantly. It is much better to point the default to a major aggregate or supernet that reflects the stability of a whole provider rather than a particular link.
  • Multiple default routes can be used simultaneously.
  • One way to set multiple static defaults is to point to multiple networks (using aggregates if possible for stability reasons) and establish a degree of preference by using the local preference BGP attribute.
  • Another way is to use the distance parameter (the lower distance wins).
  • The distance parameter is not exchanged between routers, so this would work only in the case of one router connected via multiple connections.
  • If a route is associated with an interface, the interface must be unavailable before the route becomes invalid. In some cases, the interface will still be active, even if the virtual circuit has failed.

SYMMETRY

  • Traffic leaving from a given exit point and coming back through the same point.
  • Easy to achieve with a single point.
  • With redundancy (multiple connections), traffic tends to be asymmetrical.
  • In some situations, asymmetrical traffic is acceptable and does not pose significant problems.
  • In general, symmetrical routing is better because it minimizes potential delays that could result otherwise.
  • To accommodate symmetry, you should designate a primary link and make the utmost effort to direct the majority of traffic to flow on this link.

LOAD BALANCING

  • The capability to divide data traffic over multiple connections.
  • A common misconception about balancing is that it means an equal distribution of the load.
  • Equal distribution is difficult, if not impossible to achieve in most scenarios.
  • Load balancing tries to achieve a traffic distribution pattern that will best utilize the multiple links that provide redundancy.
  • Traffic should be thought of as two separate entities: inbound and outbound.
  • Inbound traffic is affected by how the AS advertises its networks to the outside world, whereas outbound traffic is affected by the routing updates coming in from outside ASes.


SCENARIO 1: SINGLE-HOMING

  • A single connection to a service provider.
  • Only a default route required.
  • The least expensive and the most effective method.
  • No need for BGP between the customer and the service provider.
  • Symmetric routing but no redundancy.
  • Obviously, not suitable for satisfying mission-critical data communication requirements.


SCENARIO 2: MULTIHOMING TO A SINGLE PROVIDER

  • Multiple connections to the same service provider.
  • Although not necessary in all cases, BGP will provide the most flexibility.
  • Possible to use a private AS.

Default Only, One Primary Link, and One Backup Link

  • Preference over the default route can be set with administrative distance or local preference if BGP is used.
  • Load balancing is not an option.
  • Inbound traffic is out of the customer's control.
  • The customer could affect incoming traffic by advertising different metrics.

Default, Primary and Backup, Plus Partial Routing

  • Same scenario as before but the customer also accepts partial routing information from the service provider.
  • Local preference is used to manipulate the preference based on AS path or IP prefix.
  • For all other Internet routes not known to the customer, default will be taken in the primary and backup default manner.
  • A totally different approach is for the provider to send its metrics (MED) toward the customer.
  • Less configuration on customer site but totally dependent on the provider delivering accurate MEDs.
  • The customer can influence inbound traffic by advertising different metrics on different links.
  • Some providers encourage their customers to send their internal IGP metrics as BGP metrics.

Default, Primary and Backup, Plus Full and Partial Routing

  • Multihomed to a single provider.
  • Local preference is used to control the customer's outbound traffic, and the metric is used to control the inbound traffic.
  • CAUTION: When dealing with outbound traffic, manipulating exit points for specific routes is dangerous. Routing loops can occur if outbound traffic following an IGP default toward the customer's BGP router is directed toward another router following default to the BGP router.


AUTOMATIC LOAD BALANCING

  • Cisco IOS software supports dynamic load balancing on a single router for identical destinations learned via EBGP that are sourced from the same autonomous system.
  • A Cisco router will keep (locally in its IP routing table) up to six identical BGP routes to the same destination (dictated by the maximum-paths command).
  • However, BGP installs only a single best route by default. BGP Multipath can be used to install multiple paths.
  • When passing on the EBGP updates to the IBGP peers, however, the router will pass only its singular best route for a particular destination.
  • By default, a Cisco router will load balance on a per-destination (host) basis in a round-robin fashion.
  • Does not work in a multiprovider environment.


SCENARIO 3: MULTIHOMING TO DIFFERENT PROVIDERS

Redundancy and geographical restrictions are strong motivations for multihoming.

Default Only, Primary and Backup

  • A customer can set or learn the default routes to the two providers either through static routes or through both providers' dynamic advertisements of default routes.
  • The customer can prefer one default over another by using administrative distance or local preference.

 

Default, Primary and Backup, Plus Partial Routing

  • By accepting partial routing from the providers, the customer does not need to see all Internet routes and can still make best routing decisions.
  • For the more specific routes, BGP will choose the provider link closer to the destination.
  • For other Internet routes, the basic principle of primary and backup default route can be used.

 

Default, Primary and Backup, Plus Full and Partial Routing

  • Accepting full routes from either or both providers is not really necessary unless the customer plans to be a provider itself and advertise full routes to its customers.
  • For effective load balancing, the customer can accept full routing from one or both providers.
  • In some cases, the customer might want to accept full routing from one provider and implement partial/default routing with the other provider

Customer Inbound Traffic

  • In a multiprovider scenario, sending different metrics from the customer's end will not have any effect because the MED value is non-transitive.
  • Only the customer's direct upstream provider will learn the MED value but it is not passed along.
  • Instead, the AS path attribute could be manipulated. By adding bogus AS entries to affect the length would make the route less desirable.

No comments:

Post a Comment