AS path-prepend

Answered Question
Jan 20th, 2010
User Badges:

Hi,


I have a subnet 192.168.1.x/24 which is in AS : 64512.  Find below the network topology :



( AS :64512 ) ----------------------- ( ISP AS : XXXX) -----------------------(AS:64513)

Branch 1                                         |                                      Branch 2

192.168.1.x/24                                  |

          |                                             |

          |                                   ( AS : 64514)

          |__ OSPF______________  Head Office 3



There is a backup link running ospf which carries 192.168.1.x/24. Normally the traffic flows via ISP. When the ISP link goes down we normally advertise this subnet ( of AS 64512) from Branch 3 ( AS 64514) for rechability from AS 64513.


Is it possible to do AS path prepend from AS 64514 for this subnet instead of manually advertising in BGP?


I have another option where I can do conditional advertising but not sure if the subnet list is long enough then it will work.



Regards,

Santosh

Correct Answer by Mohamed Sobair about 7 years 2 months ago

Hi Santosh,


Is there any reason prevents you from redistributing from

OSPF into BGP  &   BGP into OSPF. at AS 64514?


Or if redistribution is not an option, you could have static route pointing to null 0 with Higer AD value than the OSPF in order not to drop the traffic, but you will have also to advertise The network in AS:64513 to AS: 64512 through IBGP or normal bgp to ospf redistribution in order for the return traffic to pass successfuly.



At this point, I dont see any reason for having conditional advertisment configured, as routing decision is handled by AS 64512 and the ISP has a single path to AS 64513. and the outgoing and return traffic is alwways going to prefer the EBGP link over the OSPF.



HTH

Mohamed

Correct Answer by Giuseppe Larosa about 7 years 2 months ago

Hello Santosh,

static route to null0 is not needed and would create problems (a routing black hole !)

BGP network command can be used to advertise a route learned by OSPF.


>> The route is showing to be advertised to the ISP peer but unavailable any other branches.


This can mean two different things:

a) ISP does not accept prepended routes on the eBGP session. check with them


b) ISP PE accepts the route but the route is not visible until primary route fails.

The second is more probable.

if this is a L3 MPLS VPN each CE router peers with the directly connected PE,

PE connected to Branch2 advertises only best path that is the advertisement coming from Branch1 CE.

To verify if this is true you should shut the Link branch1 to ISP and to wait some time to see if a  different BGP route appears at Branch2 CE router.

That is the route can be seen only when primary route disappears.

I would expect this.


Hope to help

Giuseppe

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Mohamed Sobair Wed, 01/20/2010 - 07:29
User Badges:
  • Gold, 750 points or more

Hi Santosh,



Its not advisable to implement AS-path prepend at AS 64514, as this subnet doesnt belong to that AS, however ,  you could use conditional advertisment instead of that at AS 64514.




However, Outgoing path from AS 64512 is always decided by thier config.



what exactly you want to accomplish?



Mohamed

Giuseppe Larosa Wed, 01/20/2010 - 07:27
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Santosh,

on branch 3 how are you getting the net advertised in BGP?

Are you using a network command or you are redistributing OSPF into BGP?


network command accepts a route-map as a parameter where you can set AS path prepending

red ospf can also use a  route-map.

if in this way is not effective or not accepted by IOS CLI, you can use a route-map applied to ISP neighbor (outbound)


Be aware that ISP can perform AS override placing its own AS number where it is the customer private ASN.


You need to verify also what happens when branch1 to ISP link is restored, branch3 should stop to advertise its subnet or should be less preferred (here AS path prepending can play a role if preserved by ISP)


Hope to help

Giuseppe

santoshdpawar Wed, 01/20/2010 - 07:43
User Badges:

Thanks for your replies guys,


We have ospf running over VPN tunnels thru internet. If the connectivity to ISP fails, the Branch1 gets isolated from ISP due to which Branch 2 is not able to reach Branch 1. The subnet 192.168.1.x/24 is available thru ospf at Branch 3 ( head office) but not to Branch 2 and other branches not showed in the topology.


The only concern is other branches ( in this topology, Branch 2) should be able to reach Branch 1 through Branch 3 in case branch 1 looses ISP connectivity. We have tried AS path prepending on Branch 3 where we put a static route to null0 & adevertised in BGP using network command. The route is showing to be advertised to the ISP peer but unavailable any other branches.


We are not doing any BGP to OSPF redistribution for this subnet.


Regards,

Santosh

Correct Answer
Giuseppe Larosa Wed, 01/20/2010 - 11:44
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Santosh,

static route to null0 is not needed and would create problems (a routing black hole !)

BGP network command can be used to advertise a route learned by OSPF.


>> The route is showing to be advertised to the ISP peer but unavailable any other branches.


This can mean two different things:

a) ISP does not accept prepended routes on the eBGP session. check with them


b) ISP PE accepts the route but the route is not visible until primary route fails.

The second is more probable.

if this is a L3 MPLS VPN each CE router peers with the directly connected PE,

PE connected to Branch2 advertises only best path that is the advertisement coming from Branch1 CE.

To verify if this is true you should shut the Link branch1 to ISP and to wait some time to see if a  different BGP route appears at Branch2 CE router.

That is the route can be seen only when primary route disappears.

I would expect this.


Hope to help

Giuseppe

Correct Answer
Mohamed Sobair Thu, 01/21/2010 - 00:51
User Badges:
  • Gold, 750 points or more

Hi Santosh,


Is there any reason prevents you from redistributing from

OSPF into BGP  &   BGP into OSPF. at AS 64514?


Or if redistribution is not an option, you could have static route pointing to null 0 with Higer AD value than the OSPF in order not to drop the traffic, but you will have also to advertise The network in AS:64513 to AS: 64512 through IBGP or normal bgp to ospf redistribution in order for the return traffic to pass successfuly.



At this point, I dont see any reason for having conditional advertisment configured, as routing decision is handled by AS 64512 and the ISP has a single path to AS 64513. and the outgoing and return traffic is alwways going to prefer the EBGP link over the OSPF.



HTH

Mohamed

Actions

This Discussion