BGP advertising route question

Unanswered Question
May 12th, 2008
User Badges:

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?







  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (14 ratings)
Loading.
cisco_lad2004 Mon, 05/12/2008 - 05:56
User Badges:
  • Gold, 750 points or more

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

Harold Ritter Mon, 05/12/2008 - 06:10
User Badges:
  • Cisco Employee,

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,

cisco_lad2004 Mon, 05/12/2008 - 06:16
User Badges:
  • Gold, 750 points or more

Harold,


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


Sam



Harold Ritter Mon, 05/12/2008 - 06:24
User Badges:
  • Cisco Employee,

Sam,


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


Regards,

cisco_lad2004 Mon, 05/12/2008 - 06:29
User Badges:
  • Gold, 750 points or more

Harold,


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


I am back to the drawing board.


Regards


Sam

guruprasadr Mon, 05/12/2008 - 05:57
User Badges:
  • Gold, 750 points or more

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

bvsnarayana03 Mon, 05/12/2008 - 06:00
User Badges:
  • Silver, 250 points or more

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
User Badges:

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

Harold Ritter Mon, 05/12/2008 - 07:41
User Badges:
  • Cisco Employee,

Wilson,


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


Why couldn't you just advertise the /16?


Regards,

cisco_lad2004 Mon, 05/12/2008 - 07:42
User Badges:
  • Gold, 750 points or more

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
User Badges:

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
User Badges:
  • Cisco Employee,

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,

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

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
User Badges:
  • Cisco Employee,

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,

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

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
User Badges:
  • Green, 3000 points or more

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


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

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?

sundar.palaniappan Mon, 05/12/2008 - 13:00
User Badges:
  • Green, 3000 points or more

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

cisco_lad2004 Mon, 05/12/2008 - 12:33
User Badges:
  • Gold, 750 points or more

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


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

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.

cisco_lad2004 Mon, 05/12/2008 - 22:21
User Badges:
  • Gold, 750 points or more

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

Actions

This Discussion