Previous Table of Contents Next


The AS_Path Approach

The AS_path manipulation approach is the same as was discussed for multihoming to different providers, under "Customer Inbound Traffic (AS_Path Manipulation)." It is straightforward and has proven to be one of the the most efficient methods of influencing a provider's routing decisions. Figure 6-22 illustrates an environment in which AS_path manipulation is used to direct routing processes.


Figure 6-22  AS_path manipulation example.


Troubleshooting:  
Ch. 11, pp. 398-399. The AS_Path Approach

For the case illustrated in figure 6-22>, assume that all local preference attributes are kept at their default values to avoid overriding the AS_path attribute. With this assumption in mind, ISP1 will use the direct link to AS1 for AS1's local traffic and the direct link to ISP2 to reach ISP2's traffic. This is done based on the shorter AS_path.

For traffic going to AS2, ISP1 has an equal path via ISP2 and AS1. ISP1's AS_path to AS2 via AS1 is 1 2 and the AS_path via ISP2 is 500 2, which are of equivalent length.

To influence ISP1's decision, AS1 must increase the AS_path length when advertising AS2's routes to ISP1 by prepending an additional AS number to the AS_path list. Normally, AS1 will repeat its own AS number. ISP1's new AS_path to reach AS2 via AS1 will be 1 1 2, which is longer than ISP1's AS_path to reach AS2 via ISP2 500 2. As a result, ISP1 will use ISP2 to reach AS2.

Looking Ahead

Mastering routing at the edges of your domain gives you full control over traffic in and out of your autonomous system. Still, another piece of the puzzle is how the traffic flows inside the AS before it gets out. Not all routers inside the AS run BGP. IGP-only routers usually do not carry a full list of Internet routes due to memory constraints. Running defaults inside the AS to reach external routes is one of the most common ways for internal routers to reach destinations outside the AS. With defaults comes the threat of routing loops if conflicting policies exist between your BGP and your IGP. The following chapter discusses these issues of how to make BGP policies flow hand-in-hand with IGP defaults. The chapter also discusses the use of policy routing in achieving total control over routing behaviors based on the sources of IP addresses rather than the traditional destination-based routing.

Frequently Asked Questions

Q—I statically defined a default toward my provider by pointing toward a network I am learning via BGP. What happens if that network goes up and down?

A—Your default will appear and disappear. That is why you should not point your default to a specific subnet. Always point to an aggregate or supernet because they are less likely to flip-flop.

Q—I have the option of getting the 0/0 default via BGP or defining a static default. What do you think is best?

A—For the border router, both methods are the same as long as the aggregate you are pointing to is stable. On the other hand, after you receive the 0/0 via BGP, it will get flooded to all your IBGP peers and there is a chance that you will end up sending it out to your other EBGP peers. When you define the default statically, you will have better control.

Q—I need to have a primary link where all my traffic flows and a backup link in case of failure. I also need to load balance my traffic. Is that possible?

A—That is not possible. If you are using your primary link for all inbound and outbound traffic, this would dictate that no other traffic will flow on the other link. These are two contradicting requirements.

Q—My AS is connected to two providers, one in SF and one in NY. I want the traffic from and toward my SJ site to go in and out on the SF link. All other traffic should flow over the NY link. What do I need to do to achieve this behavior?

A—For your inbound traffic toward San Jose, you can use the AS_path manipulation technique to make your path longer for all SJ routes advertised on the NY link. The problem is with your outbound traffic. If you know exactly what networks the SJ users are trying to reach, you can give those destinations better local preference on the SF exit. If the SJ site needs to reach any destination, then setting a better local preference on the SF link will cause all your outbound traffic to leave via the SF link. That doesn't meet your requirement about the NY link carrying all other traffic.

Another way of dealing with this scenario is policy routing, where a router can track source addresses and direct traffic accordingly. This is described in Chapter 7, "Controlling Routing Inside the Autonomous System."

Q—I am prepending AS numbers to my routes to tip the balance of my traffic. I am not seeing any effect. Why?

A—Remember that your updates are exchanged by multiple providers. A provider along the way can use local preference to override your path length. Check with your provider.

Q—Do I have to set BGP policies? Why can't I leave it to BGP to figure out the correct path?

A—You do not have to set policies. Remember, though, that BGP is not taking into account the speed of your links and your user traffic requirements. If you are happy with your traffic pattern the way it is, then you do not need to change any attributes.


Previous Table of Contents Next