cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4735
Views
5
Helpful
8
Replies

AS-Path Prepend in BGP

kjanakiraman
Level 1
Level 1

Hi,

I have one Cisco router with two T1 lines to different isp and running bgp on the same. I have configured the router to get the udpates from the directly connected route like

Ip as-path access-list 10 permit ^$

ip as-path access-list 20 permit ^isponeASno$

ip as-path access-list 30 permit ^isptwoASno$

neighbor x.x.x.x1 route-map outbound out

neighbor y.y.y.y1 route-map outbound out

neighbor x.x.x.x1 route-map inboundone in

neighbor y.y.y.y1 route-map inboundtwo in

route-map inboundone permit 10

match as-path 20

route-map inboundtwo permit 20

match as-path 30

route-map outbound permit 10

match as-path 10.

All outgoing traffic from my network chooses the best path to go out. I want to force all my outbound traffic from my network to go through one particular isp and choose the other only if the primary goes down. Can i achive this using as-path prepend?

Can any one adive me how to configure the same. Also please let me know if there are any other options to achieve the same.

Thanks in Advance

8 Replies 8

ji.xie
Level 1
Level 1

Ok,you can consider to user weight,Local-preferenc and AS-path Prepend to control your outband traffic.But I would suggest to use weight becasue it is the first attribute used by BGP best route descison process.Addationlly,i want to known if the ISPA and ISPA will oringate a Default BGP route to you.I see that your BGP just receive stright connceted routes from you ISP,if you have no default route,Maybe there is network connectivty problem.

Please correct me if i am wrong.

Thanks for your reply. ISP A is sending me only one default route and ISP B is sending me his directly connected routes. I have static route statements on my router pointing towards both the ISP. For setting weight,Local-preference and AS-path can you suggest me how to proceed or some good links which talks about the same?

Thanks in Advance

A minor correction- AS-path prepend is used to influence inbound traffic. Perhaps it would be better to say that in this case one might want to use both if you want traffic to prefer both to come in and go out of ISPA. Otherwise you might send the traffic out ISPA only to have response to it come back through ISPB.

Harold Ritter
Spotlight
Spotlight

The best way to make sure that all the invound traffic will come through a specific SP is to use BGP conditional Advertisement. For more information on this feature, please refer to the following link:

http://www.cisco.com/warp/customer/459/cond_adv.html

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Thank for your information. So if want to make sure that http://www.verisign.com has to go via isp one i will do

neighbor x.x.x.x1 advertise-map advertise

route-map advertise permit 10

match ip address 15

access-list 15 permit verisign ip address.

Is this correct? Will to force verisign traffic to go through x.x.x.x1?

Also if the ISP one goes down what will happen to this advertised traffic?

Also when i give sh ip bgp

For some i am getting Not advertised to any peer

and for some i am getting available path 2 and best path #2 and for some i am getting available path 1 and best path 1.

Thanks in Advance

What conditional advertisement allows you to do is to advertise your IP block to your backup provider if the primary provider goes down. You can determine that the link to the primary ISP is down if you stop receiving a specific prefix normally received from the primary ISP.

For instance, you would advertise your IP block to the backup provider if a given ip prefix received from the primary provider dissapears from the BGP table.

In the link I posted, R102 advertises 128.16.16.0/24 to its backup provider only if it stops receiving 192.168.50.0/24 from its primary ISP.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Thanks a lot for the information

dreed
Level 1
Level 1

You need to worry about two things for a primary/backup ISP config-

outbound traffic- set weight or local preference to favor ISP A.

inbound traffic- If some traffic over ISP-B is okay, use AS-prepend. If you must avoid traffic to ISP-B unless ISP-A is down, use conditional advertisement as mentioned elsewhere.

If you have a cost or performance factor that makes ISP-A the better choice, you'll want to make sure you cover both directions of traffic.