|
<- Previous Message | Next Message -> Thread Index [isp-bgp] RE: "equal" routes
You could do the following: conf t access-list <aaa> permit ip <netblock> <wildcard bits> router bgp <your ASN> route-map <provider #1> permit 10 match ip address <aaa> set local-preference 100 set community <your ASN>:100 <your ASN>:<provider #1 ASN> route-map <provider #1> permit 20 match ip address <bbb> set local-preference 90 set community <your ASN>:90 <your ASN>:<provider #1 ASN> route-map <provider #1> permit 30 set community <your ASN>:<provider #1 ASN> route-map <provider #2> permit 10 match ip address <aaa> set local-preference 90 set community <your ASN>:90 <your ASN>:<provider #2 ASN> route-map <provider #2> permit 20 match ip address <bbb> set local-preference 100 set community <your ASN>:100 <your ASN>:<provider #2 ASN> route-map <provider #2> permit 30 set community <your ASN>:<provider #2 ASN> Finally apply the route maps to their respective BGP session and do a soft clear: neighbor <IP address of provider #1> route-map <provider #1> in neighbor <IP address of provider #2> route-map <provider #2> in clear bgp <IP address of provider #1> soft in clear bgp <IP address of provider #2> soft in An explaination of the above cammands: access-list <aaa> permit ip <netblock> <wildcard bits> 'define what IP address(es) you want to be applied to the route map that will prefer provider #1 over provider #2. route-map <provider #1> permit 10 'config a route map that will change local pref for the prefixes that match ACL <aaa>. match ip address <aaa> 'matches incoming prefix announcements with the prefixes in ACL <aaa>. set local-preference 100 ' set the local pref on the prefix to 100. set community <your ASN>:100 <your ASN>:<provider #1 ASN> 'tags the route with communities so you can look up routes easily. route-map <provider #1> permit 20 'config a route map that will change local pref for the prefixes that match ACL <bbb>. match ip address <bbb> 'matches incoming prefix announcements with the prefixes in ACL <bbb>. set local-preference 90 'set the local pref on the prefix to 90. set community <your ASN>:90 <your ASN>:<provider #1 ASN> 'tags the route with communities so you can look up routes easily. route-map <provider #1> permit 30 'config a route map that will handle all other prefixes advertised by provider #1. set community <your ASN>:<provider #1 ASN> 'tags the routes again. access-list <bbb> will be used in the future that will define what IP address(es) you want to be applied to the route map that will prefer provider #2 over provider #1. route-map <provider #2> permit 10 'config a route map that will change local pref for the prefixes that match ACL <aaa>. match ip address <aaa> 'matches incoming prefix announcements with the prefixes in ACL <aaa>. set local-preference 90 'set the local pref on the prefix to 90. set community <your ASN>:90 <your ASN>:<provider #2 ASN> 'tags the route with communities so you can look up routes easily. route-map <provider #2> permit 20 'config a route map that will change local pref for the prefixes that match ACL <bbb>. match ip address <bbb> 'matches incoming prefix announcements with the prefixes in ACL <bbb>. set local-preference 100 'set the local pref on the prefix to 100. set community <your ASN>:90 <your ASN>:<provider #2 ASN> 'tags the route with communities so you can look up routes easily. route-map <provider #2> permit 30 'config a route map that will handle all other prefixes advertised by provider #1. set community <your ASN>:<provider #2 ASN> 'tags the routes again. The command below will show you what prefixes have the local pref set to 100 in your network. When you run the command you will see the next hop IP address, Metric, LocalPref, Weight, and AS Path. The net blocks that come up in this should have a next hop IP address of the preferred provider you want for that given net block. sh ip bgp community <your ASN>:100 You can also perform the command below and again you should see the prefixes that have a next hop IP address of the provider you want to use only if the other preferred connection for that given net block goes down. sh ip bgp community <your ASN>:90 There are many advantages of using communities in your network, they can be a powerful tool to manipulate how you want traffic to flow out of your network and they can be scaled very easily. There is information on Cisco's site and there are a few RFC's on using BGP communities that you may want to look up for more explainations. Carmen -----Original Message----- From: Bill Pitz [mailto:pitz@...] Sent: Friday, March 05, 2004 5:46 PM To: isp-bgp@isp-bgp.com Subject: [isp-bgp] "equal" routes I've got a simple network running BGP with two upstreams. This is on a Cisco 3662 running IOS 12.2. I'm in a position where I want to give incoming advertisements only for a certain block of IP addresses (possibly several blocks later) precedence in the BGP selection process when they are received from my second upstream. The situation is this.. Upstream #1 and Upstream #2 are both providing me with advertisements for a netblock. The AS Paths are the same length from both upstreams, so upstream #1 is getting chosen because my peer at #1 has a lower IP address. However, Upstream #2 generally has better connectivity to this particular netblock so I would like to give it priority. I don't want to add a static route because I still want normal BGP selection to take over in the event that my link to Upstream #2 goes down. What's the easiest way to accomplish this? Thanks, -Bill To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with. ------------------------ANNOUNCEMENT--------------------------------- --------------------------------------------------------------------- - ISPCON Spring 2004 - Washington DC Hilton & Towers - - The ISP and WISP event - www.ispcon.com - - Informative. Substantive. Instructive - ---------------------------------------------------------------------- ---------------------------------------------------------------------- To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with. ------------------------ANNOUNCEMENT--------------------------------- --------------------------------------------------------------------- - ISPCON Spring 2004 - Washington DC Hilton & Towers - - The ISP and WISP event - www.ispcon.com - - Where the industry shares its formulas for success!. ---------------------------------------------------------------------- ---------------------------------------------------------------------- <- Previous Message | Next Message -> Thread Index |