Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

BGP advertising route question

I have an edge router that I will adveretise my ethernet subnet to Verizon via BGP.

My ethernet interface is:

10.10.10.254/16

My BGP config currently is:

router bgp 1

no synchronization

bgp log-neighbor-changes

neighbor 6.1.2.9 remote-as 65000

no auto-summary

If I want to advertise my router etherent interface network to the third octet:

10.10.10.0/24

and not

10.10.0.0/16

Can I do this by adding the statement:

network 10.10.10.0 mask 255.255.255.0

I am asking because my understanding is that the network has to be in the route table in order for BGP to advertise the route and at the moment 10.10.10.0/24 is not in the route table.

It shows up as a connected route of 10.10.0.0/16.

Or will the "no auto summary" take care of that for me?

21 REPLIES

Re: BGP advertising route question

usually it is the other way around. meaning the interface has longer mask, and we need to advertise a summary.

anyways, you can add a more specific route to Null0.

ip route 10.10.10.0 255.255.255.0 null0

and under BGP

network 10.10.10.0 mask 255.255.255.0

pls help all helpful posts

Sam

Cisco Employee

Re: BGP advertising route question

Sam,

This will cause traffic to that /24 to be sent to null0 rather than on the Ethernet interface as it is more specific than the /16 configured on the Ethernet interface.

My question to the original poster would be why not configure the ethernet interface as a /24.

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Re: BGP advertising route question

Harold,

I stand corrected, but would adding AD 200 to null static route avoid this ?

Sam

Cisco Employee

Re: BGP advertising route question

Sam,

No. The AD would only come into play for two routes with the same prefix length.

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Re: BGP advertising route question

Harold,

Thanks for pointing this out, I missed one of the basic routing rules.

I am back to the drawing board.

Regards

Sam

Re: BGP advertising route question

HI Wilson, [Pls Rate if HELPS]

The following example permits routes with prefix length up to 24 in network 10.10/16:

ip prefix-list abc permit 10.10.0.0/16 le 24

That was a mis-understanding of Question from my side, add a Route for the Network /24 pointing to NULL0 Interface and advertise with network statement. Because normally BGP will originate the Route for a prefix only if the Route for the same Prefix exists in the Global Routing Table.

Hope I am Informative.

Pls RATE if HELPS

Best Regards,

Guru Prasad R

Re: BGP advertising route question

Yes for BGP to advertise the network, the subnet of network should be in routing table.

As Sam told, this can be done by adding a static route the the subnet pointing to null interface. now you should be able to see the network in bgp table.

New Member

Re: BGP advertising route question

Wow, seven replys, you people must love BGP.

To answer the question about why a 16 bit mask.

We have servers that are using the SVI on the switch that this router is connected to and the SVI is 16 bit mask.

The servers are 10.10.50.0/16, the SVI is 10.10.10.254/16.

There is also a bridged connection to our DR side using this subnet.

Was it determined that I could not use the null route and if not then this will work?:

ip prefix-list abc permit 10.10.0.0/16 le 24

Cisco Employee

Re: BGP advertising route question

Wilson,

Configuring the /24 static route to null0 will definitely not work.

Why couldn't you just advertise the /16?

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Re: BGP advertising route question

It's cos you started a good thread !

no, Null0 not only wont work, but it woudl cause an outage. Apologies for misinfo.

The challenge here is to create a longer prefix ( /24) without affecting ur setup.

2 options:

1-why not advertise the whole /16 and block subnet you wish to secure.

2-"a shot from the hip"...are you able to split /16 and use secondary IP addresses under ethernet. so you create one line for teh /24 you need and few more using summarization to cover the remaining part of /16.

I hope there will be more input from other Netpros regarding option 2

New Member

Re: BGP advertising route question

Cause an outage huh, is that bad? It sounds kind of bad.

I could advertise the whole 16 bit mask, it just seemed to be better not to.

In reality, I will only be receiving SIP and RTP traffic from Verizon's SBC router, so I should be able to clamp it down pretty well.

I appreciate all the replys.

What about "redistribute connected", will this do the same thing as adding the "network" statement under BGP?

Cisco Employee

Re: BGP advertising route question

Wilson,

Another way would be to have the following configuration, which is kind of a hack.

interface Ethernet0/0

ip address 10.10.10.253 255.255.255.0 secondary

ip address 10.10.10.254 255.255.0.0

This way you could have a network statement for the /24 and it would be advertised as such.

I still prefer advertising the entire /16 though.

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: BGP advertising route question

Thanks hritter,

What about "redistribute connected", will this do the same thing as adding the "network" statement under BGP?

Cisco Employee

Re: BGP advertising route question

Wilson,

"redistribute connected" without any filter would redistribute all of the connected subnets on the box. I generally prefer to use the network statement in a case where you only have that one specific subnet to advertise.

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: BGP advertising route question

Update to this:

Verizon is telling me I cannot use a 16 bit mask, they need a 24 bit mask.

Is there a way to do this without creating a secondary interface?

The router will not let me create the 24 bit subnet on the same network

Re: BGP advertising route question

Sure, you can do this without a secondary address or redistribute connected. Add a static route for /24 mask and point it to the ethernet interface and use the network statement under BGP routing process. Because the /24 mask is more specific the router would accept the route despite the fact it's a directly connected network (less specific mask).

R1#show run int e0/0

Building configuration...

Current configuration : 75 bytes

!

interface Ethernet0/0

ip address 10.2.2.1 255.255.0.0

half-duplex

end

R1#show ip route 10.2.2.0

Routing entry for 10.2.0.0/16

Known via "connected", distance 0, metric 0 (connected, via interface)

Routing Descriptor Blocks:

* directly connected, via Ethernet0/0

Route metric is 0, traffic share count is 1

R1#config t

Enter configuration commands, one per line. End with CNTL/Z.

R1(config)#ip route 10.2.2.0 255.255.255.0 e0/0

R1(config)#do show ip route 10.2.2.0

Routing entry for 10.2.2.0/24

Known via "static", distance 1, metric 0 (connected)

Routing Descriptor Blocks:

* directly connected, via Ethernet0/0

Route metric is 0, traffic share count is 1

HTH

Sundar

New Member

Re: BGP advertising route question

Sundar,

You came to the rescue again!

I see the route in the route table now.

But, if I am advertising this network and the edge router that is advertising to Verizon, also needs to forward inbound traffic to an IP2IP gateway router that has a 16 bit mask, will the traffic get forwarded ok?

Verizon-->CE router-->IP2IP gateway

I mean, what would the logical traffic flow be if Verizon is trying to send traffic to the IP2IP Gateway (sitting on the edge router's etherent interface and subnet) that has an IP Address of 10.10.10.10\16, if I have the static route on the edge router?

Re: BGP advertising route question

That should be fine. The CE router would ARP for any host, on the /24 subnet, on the wire and IP2IP gateway would send proxy ARP response on behalf of any host on the /24 subnet and you should be OK.

Let us know if you have any problems.

HTH

Sundar

Re: BGP advertising route question

you don't need to create a secondary interface, it's a secondary ip address under same interface.

pls refer to Harold's concrete example.

HTH

Sam

New Member

Re: BGP advertising route question

Sorry,

I tried to do the "secondary" address under the same interface and got an overlap error.

I just tried again and worked ok, must have had incorrect syntax the first time.

But Sundar's suggestion of static route worked as far as getting the route in the route table as 24 bit to advertise it.

Re: BGP advertising route question

The other suggestion is that you redesign your setup as I think this solution will lock u and ur IP plan. It would be good to have smaller subnets for each purpose. Imagine if u had to pull the same stunt each time :-)

HTH

Sam

Sam

221
Views
70
Helpful
21
Replies
CreatePlease to create content