BGP advertising route question

Unanswered Question
May 12th, 2008

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

My ethernet interface is:

My BGP config currently is:

router bgp 1

no synchronization

bgp log-neighbor-changes

neighbor remote-as 65000

no auto-summary

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

and not

Can I do this by adding the statement:

network mask

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 is not in the route table.

It shows up as a connected route of

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (14 ratings)
cisco_lad2004 Mon, 05/12/2008 - 05:56

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 null0

and under BGP

network mask

pls help all helpful posts


Harold Ritter Mon, 05/12/2008 - 06:10


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.


cisco_lad2004 Mon, 05/12/2008 - 06:16


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


Harold Ritter Mon, 05/12/2008 - 06:24


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


cisco_lad2004 Mon, 05/12/2008 - 06:29


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

I am back to the drawing board.



guruprasadr Mon, 05/12/2008 - 05:57

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 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.


Best Regards,

Guru Prasad R

bvsnarayana03 Mon, 05/12/2008 - 06:00

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.

wilson_1234_2 Mon, 05/12/2008 - 07:31

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, the SVI is

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 le 24

Harold Ritter Mon, 05/12/2008 - 07:41


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

Why couldn't you just advertise the /16?


cisco_lad2004 Mon, 05/12/2008 - 07:42

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

wilson_1234_2 Mon, 05/12/2008 - 08:08

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?

Harold Ritter Mon, 05/12/2008 - 08:12


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

interface Ethernet0/0

ip address secondary

ip address

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.


wilson_1234_2 Mon, 05/12/2008 - 08:19

Thanks hritter,

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

Harold Ritter Mon, 05/12/2008 - 08:22


"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.


wilson_1234_2 Mon, 05/12/2008 - 11:50

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

sundar.palaniappan Mon, 05/12/2008 - 12:06

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



R1#show ip route

Routing entry for

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 e0/0

R1(config)#do show ip route

Routing entry for

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



wilson_1234_2 Mon, 05/12/2008 - 12:33


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\16, if I have the static route on the edge router?

sundar.palaniappan Mon, 05/12/2008 - 13:00

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.



cisco_lad2004 Mon, 05/12/2008 - 12:33

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.



wilson_1234_2 Mon, 05/12/2008 - 12:38


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.

cisco_lad2004 Mon, 05/12/2008 - 22:21

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 :-)





This Discussion