cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2113
Views
10
Helpful
12
Replies

How to advertise /23 on bgp

jeffbriones
Level 1
Level 1

hi guys,

how can i advertise /23 on my bgp config.

like i want to advertise 100.100.100.0/23.

thanks.

jeff

1 Accepted Solution

Accepted Solutions

the network statement has to exactly match a route in the RIB, hence your config not working since you don't have 100.100.100.0/23 in the RIB.

Try configuring the following static route instead of the two static routes you configured already:

ip route 100.100.100.0 255.255.254.0 null0

Hope this helps,

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

View solution in original post

12 Replies 12

Harold Ritter
Cisco Employee
Cisco Employee

Something like this should do the job as long as the route to that /23 is installed in the RIB on the local router:

router bgp xxx

network 100.100.100.0 mask 255.255.254.0

Hope this helps,

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

hi,

i already done that command and also put

router XXX

network 100.100.100.0 mask 255.255.254.0

!

ip route 100.100.100.0 255.255.255.0 null 0

ip route 100.100.101.0 255.255.255.0 null 0

on my config. Failed to advertise the network. Is it possible to advertise them as /23 instead of 2x/24 ?

tnx.

jeff

the network statement has to exactly match a route in the RIB, hence your config not working since you don't have 100.100.100.0/23 in the RIB.

Try configuring the following static route instead of the two static routes you configured already:

ip route 100.100.100.0 255.255.254.0 null0

Hope this helps,

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

got it. tnx a lot.

jeff

a follow up question. if i have two providers and i want to advertise /23 on the 1st one and 2x/24 on the other side. is this possible ?

yes but you have to use prefix-list or route maps

Here is a sample config

router bgp XXXX

neighbor remote-as

neighbor route-map ISP1 out

neighbor remote-as

neighbor route-map ISP2 out

ip prefix-list ISP1 seq 10 permit 10.100.100.0/24

ip prefix-list ISP2 seq 10 permit 10.100.100.0/23

route-map ISP1 permit 10

match ip address prefix-list ISP1

!

route-map ISP1 deny 20

route-map ISP2 permit 10

match ip address prefix-list ISP2

!

route-map ISP2 deny 20

HTH, rate if it does

Narayan

dear ,

Use routemap + prefix list to advertise different subnets to different isp(s)

hope this helps . rate if it does

thxn

I want to break up my subnets and advertise them with separate community values to my upstream ISP's. I?d like to change each one to /24?s so that I have more control. Currently I have a /19 & /20 which appear in the router like:

router bgp 12345

network 123.123.0.0 mask 255.255.224.0

network 234.234.32.0 mask 255.255.240.0

!

ip route 123.123.0.0 mask 255.255.224.0 null0

ip route 234.234.32.0 mask 255.255.240.0 null0

!

If I do a sho ip route 123.123.0.0 it does NOT show the null 0 route. However, if I break up these subnets to /24?s it shows a route to null 0 which drops half or all of the packets. My bgp configuration and routes become identical and it still becomes a problem! For simplicity I tried breaking the /20 into two /21?s and it didn?t work either:

Router bgp 12345

Network 234.234.32.0 mask 255.255.248.0

Network 234.234.40.0 mask 255.255.248.0

!

ip route 234.234.32.0 mask 255.255.248.0 null0

ip route 234.234.40.0 mask 255.255.248.0 null0

!

Router#sho ip route 234.234.40.1

Routing entry for 234.234.40.0/21, supernet

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

Advertised by bgp 12345

Routing Descriptor Blocks:

* xx.yy.zz.6

Route metric is 0, traffic share count is 1

directly connected, via Null0

Route metric is 0, traffic share count is 1

For my setup right now it does NOT show this Null 0 route when doing a ?sho ip route? statement. What am I doing wrong? Do I need to wait for bgp to reset? I tried a soft reset on one of the peers but realistically I don?t think it matters (yet) because my router isn?t recognizing the location of those routes correctly?

BTW: This is tough for me to do since I lose connectivity for those blocks when I make this change!

Help!

Goal: Balance two DS3's more effectively by using different community values.

http://cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801475b2.shtml

If you want to make sure whether the route to null0 is in the routing table, specify the mask when you do the show ip route.

Your explanation is really hard to understand. Here's a few questions for you.

- Do the /19 and /20 show up in your BGP table (show ip bgp)?

- When you configure the /24s, do they show up or not in the BGP table (show ip bgp)?

Hope this helps,

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

Thanks for the response!

Sorry for the confusion I'll post what I'm actually doing.

Problem: I cannot split up my advertised subnets. As soon as I route the subnets to null0 for BGP advertising, the router stops routing those subnets.

Goal: I'd like to change my /19 & /20 to all /24's. Ultimately I am trying balance my 2 DS3?s more effectively. I?m attempting to do this with BGP Community values (http://tinyurl.com/yxbwf5) but I need more subnets for greater control. Thus, I am trying to reduce my subnets to all /24's so I have more control with advertising. For sake of demonstration I am showing what happens when I split my /20 to a /21.

1. The /19 & /20 do show up in the bgp table before I make the split.

1a. Separate question, I'm concerned that it only lists 1 of my peers (67.96.209.62) when looking at my blocks. Doesn't it say it is advertising to 2 groups? (Stat 1)

2. You can see in Stat3 & 4 that the /21 shows up in the route table.

Basically one Stat4 shows any different results. What am I doing wrong? Do I need to reset the BGP tables? It seems unnecessary to reset the peer connections when it is a route problem on my router. When I make the change my router can no longer ping hosts on the 216.105.64.0/21 subnet.

Before:

Stat 1:

Jorge_NPE-G2#sho ip bgp 216.105.64.0

BGP routing table entry for 216.105.64.0/20, version 2166360

Paths: (1 available, best #1, table Default-IP-Routing-Table)

Advertised to update-groups:

1 2

Local

0.0.0.0 from 0.0.0.0 (67.96.209.62)

Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best

Stat 2:

Jorge_NPE-G2#sho ip route 216.105.64.0 255.255.240.0

Routing entry for 216.105.64.0/20, supernet

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

Advertised by bgp 33470

Routing Descriptor Blocks:

* directly connected, via Null0

Route metric is 0, traffic share count is 1

Jorge_NPE-G2#sho ip route 216.105.64.0 255.255.248.0

Routing entry for 216.105.64.0/21, supernet

Known via "static", distance 1, metric 0

Routing Descriptor Blocks:

* 65.182.224.6

Route metric is 0, traffic share count is 1

--------------------------------------------

config t

router bgp 33470

network 216.105.64.0 mask 255.255.248.0

network 216.105.72.0 mask 255.255.248.0

no network 216.105.64.0 mask 255.255.240.0

!

exit

!

ip route 216.105.64.0 255.255.248.0 Null0

ip route 216.105.72.0 255.255.248.0 Null0

no ip route 216.105.64.0 255.255.240.0 Null0

--------------------------------------------

AFTER:

Stat 3:

Jorge_NPE-G2#sho ip bgp 216.105.64.0

BGP routing table entry for 216.105.64.0/21, version 2163961

Paths: (1 available, best #1, table Default-IP-Routing-Table)

Flag: 0x860

Advertised to update-groups:

1 2

Local

0.0.0.0 from 0.0.0.0 (67.96.209.62)

Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best

Stat 4:

Jorge_NPE-G2#sho ip route 216.105.64.0 255.255.248.0

Routing entry for 216.105.64.0/21, supernet

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

Advertised by bgp 33470

Routing Descriptor Blocks:

* 65.182.224.6

Route metric is 0, traffic share count is 1

directly connected, via Null0

Route metric is 0, traffic share count is 1

I want to break up my subnets and advertise them with separate community values to my upstream ISP's. I?d like to change each one to /24?s so that I have more control. Currently I have a /19 & /20 which appear in the router like:

router bgp 12345

network 123.123.0.0 mask 255.255.224.0

network 234.234.32.0 mask 255.255.240.0

!

ip route 123.123.0.0 mask 255.255.224.0 null0

ip route 234.234.32.0 mask 255.255.240.0 null0

!

If I do a sho ip route 123.123.0.0 it does NOT show the null 0 route. However, if I break up these subnets to /24?s it shows a route to null 0 which drops half or all of the packets. My bgp configuration and routes become identical and it still becomes a problem! For simplicity I tried breaking the /20 into two /21?s and it didn?t work either:

Router bgp 12345

Network 234.234.32.0 mask 255.255.248.0

Network 234.234.40.0 mask 255.255.248.0

!

ip route 234.234.32.0 mask 255.255.248.0 null0

ip route 234.234.40.0 mask 255.255.248.0 null0

!

Router#sho ip route 234.234.40.1

Routing entry for 234.234.40.0/21, supernet

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

Advertised by bgp 12345

Routing Descriptor Blocks:

* xx.yy.zz.6

Route metric is 0, traffic share count is 1

directly connected, via Null0

Route metric is 0, traffic share count is 1

For my setup right now it does NOT show this Null 0 route when doing a ?sho ip route? statement. What am I doing wrong? Do I need to wait for bgp to reset? I tried a soft reset on one of the peers but realistically I don?t think it matters (yet) because my router isn?t recognizing the location of those routes correctly?

BTW: This is tough for me to do since I lose connectivity for those blocks when I make this change!

Help!

Goal: Balance two DS3's more effectively by using different community values.

http://cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801475b2.shtml

Hello,

I have read through this thread, and I wonder if you could use conditional route injection in order to get your split subnets advertised. The idea is to originate your subnets 234.234.32.0/21 and 234.234.40.0/21, with the condition that a larger network that includes these subnets exists in the BGP RIB. The configuration would look like this:

router bgp 12345

network 234.234.0.0 mask 255.255.0.0

bgp inject-map ORIGINATE exist-map IF_EXIST

!

route-map IF_EXIST permit 10

match ip address prefix-list ROUTE

!

route-map ORIGINATE permit 10

set ip address prefix-list ORIGINATED_ROUTES

!

ip prefix-list ROUTE permit 234.234.0.0/16

!

ip prefix-list ORIGINATED_ROUTES permit 234.234.32.0/21

ip prefix-list ORIGINATED_ROUTES permit 234.234.40.0/21

!

ip route 234.234.0.0 255.255.0.0 null 0

This should get both your split subnets into the BGP RIB, and you could then advertise them both...

Regards,

GNT

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card