cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2112
Views
0
Helpful
9
Replies

How to originate a prefix from own AS when the prefix is received from a neighbour AS.

Svante Bolander
Level 1
Level 1

R1 in AS 65544 is originating 198.18.0.0/24 and that prefix is received to R2 which is running AS 197308(public AS). R2 has a peer in AS 3(upstream ISP) and I would like to forward 198.18.0.0/24 as originated in AS197308 to AS 2.

I have tried using aggregate-address but that command only works with more specifics. Otherwise it will do the trick. Now we have the same mask.

The commad remove-private-as does not work as AS65544 is a four byte AS dedicated for documentation purpuses(RFC5398) and is left untuched. We use this AS number in our corporate internal MPLS network in the same way as private AS number from RFC1930.

Any suggestions how to accomplish the above mentioned?

1 Accepted Solution

Accepted Solutions

Hi,

just an idea:

What about to use the BGP Conditional Route Injection feature?

http://www.cisco.com/en/US/docs/ios/12_2s/feature/guide/fsbgpri.html

And to inject 2x /25 under the condition the /24 is received from your AS65544 neighbor?

(You would need the same configured for the second AS65544 neighbor, I guess.)

Best regards,

Milan

View solution in original post

9 Replies 9

daniel.bloom
Level 1
Level 1

You could try setting the route as a static route and redistributing it into bgp. Might not be ideal but could work.

Sent from Cisco Technical Support iPad App

Currently that is what we are doing. A static route to the next hop at the AS65544 ebgp peer and a matching network statement in bgp in AS197308. But the topology is that there is two EBGP peerings between AS65544 and AS197308 and we want to have this work dynamically.

If the command remove-private-as also had been able to cover AS65544(RFC 5398, in addition to RFC 1930) it should have been a clever solutioin. But it does not, feature or bug?

Svante

I think it is just that the remove private-as has not been updated to support 32-bit ASNs.

I was thinking of a static route as well although there are complications. It sounds like from your description though that R1 is under your control ?

If it is could you not just get R1 to advertise 2 x /25 instead of a /24 and then use the summary address.

Jon

Hi,

as I understand you are configuring all the routers involved?

In that case you could try

a) change your peering using

neighbor ... local-as ...  no-prepend  replace-as

command.

I'm not sure though how it works with 4-Byte AS numbers, I never tested with them.

b) Worst case you could try to configure another IGP (like OSPF).

And redistribute the prefix to it from your  65544 neighbor - this would remove the AS_PATH completely.

And redistributing it again to BGP on your 197308 router.

Quite complicated, I know.

Bets regards,

Milan

The problem with creating more specifics to satisfy aggregate-address is that my prefix is directly connected to the AS65544 router. The /24 comes from a server subnet and dividing it into two /25 would include a lot of server reconfiguration, or using secondary IP which will cause problems to reach the default gw. So I don´t see this as a good practical  solution, even if it theoretically is a workaround to satisfy bgp.

Use of replace-as is impacting all prefixes over the ebgp, isn´t it. As I have several other prefixes frpm AS65544, which are more specifics to a null route with shorter mask at R2, and not advertised to the ISP, I would like to not change them.

Svante

Currently that is what we are doing. A static route to the next hop at the AS65544 ebgp peer and a matching network statement in bgp in AS197308. But the topology is that there is two EBGP peerings between AS65544 and AS197308 and we want to have this work dynamically.

Can you elaborate on this ?

Jon

Hi,

just an idea:

What about to use the BGP Conditional Route Injection feature?

http://www.cisco.com/en/US/docs/ios/12_2s/feature/guide/fsbgpri.html

And to inject 2x /25 under the condition the /24 is received from your AS65544 neighbor?

(You would need the same configured for the second AS65544 neighbor, I guess.)

Best regards,

Milan

This works! I had read that the feature was for injecting more specifics. But after your suggestion I tried it in my home network and even that I have the same mask on the learned prefix as on the one I want to inject, it works.

Tule7640#sh bgp ipv4 u 198.18.0.0      

BGP routing table entry for 198.18.0.0/24, version 683

Paths: (2 available, best #1, table default)

Multipath: iBGP

  Advertised to update-groups:

     1          6        

  Local, (injected path from 198.18.0.0/24)

    83.219.200.93 from 83.219.200.93 (83.219.200.5)

      Origin IGP, localpref 100, valid, external, best

  767626043

    83.219.200.93 from 83.219.200.93 (83.219.200.5)

      Origin IGP, metric 0, localpref 100, valid, external

      Community: no-export

Checking in the next AS I see 198.18.0.0/24 as originated in AS7640(Tule7640).

That is a little contradictory that the same mask is OK here but not in the aggregate-address command.

Thanks for your valuable help,

Hi,

my feeling also was this feature was invented to inject more specific prefixes.

But reading the feature description

http://www.cisco.com/en/US/docs/ios/12_2s/feature/guide/fsbgpri.html

carefully, it says:

"Only prefixes that are equal to or more specific than the original prefix may be injected."

The funny thing is it even permits to inject less specific prefixes!

I tested in my lab with a /23 injected using a /24 in the exist-map.

So you can create an aggregated address without the atomic-aggregate attribute this way...

Quite a powerful command!

Best regards,

Milan

Review Cisco Networking for a $25 gift card