cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1280
Views
49
Helpful
19
Replies

bgp announce route

leungcm
Level 1
Level 1

Hi,

we would like to announce routes to provider A and B. detail please refer following.

for provider A

200.1.0.0/23

200.1.2.0/24

200.1.3.0/24

for provider B

200.1.0.0/24

200.1.1.0/24

200.1.2.0/24

200.1.3.0/24

We find that, we always anounce 4 routes to provider A. what wrong is it? please advice.

Best regards

----

router bgp 30x

!

neighbor 202.1.1.1 route-map Set_ASN_PA out

!

!

!

access-list 45 permit 200.1.0.0 0.0.1.255

!

access-list 55 permit 200.1.2.0 0.0.0.255

access-list 55 permit 200.1.3.0 0.0.0.255

!

ip as-path access-list 300 deny .*

ip as-path access-list 300 permit ^$

!

!

route-map Set_ASN_PA permit 10

match ip address 45

set as-path prepend 30x

!

route-map Set_ASN_PA permit 20

match ip address 55

!

route-map Set_ASN_PA permit 30

match as-path 300

!

19 Replies 19

Harold Ritter
Cisco Employee
Cisco Employee

ACL 45 allows 200.1.0.0/24 and 200.1.1.0/24 because of the wildcard mask 0.0.1.255. This is why provider A received the 4 routes.

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,

how do we force it to /23? pls advise

best regards

Prior to announcing the /23 to your SP, you first need to inject the /23 into BGP a network statement and a static route to null0 as follow:

router bgp x

network 2000.1.0.0 mask 255.255.254.0

ip route 200.1.0.0 255.255.254.0 null0

Also, if you want to only allow the /23 (200.1.0.0/23) towards provider A and not the two /24s (200.1.0.0/24 and 200.1.1.0/24), you should use a prefix-list or an extended ACL instead of the standard ACL.

ip prefix-list test permit 200.1.0.0/23

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

Dear Hritter,

Thanks. We would like to use extended ACL to announce /23. Is it

access list 101 permit ip 200.1.0.0 0.0.1.255 255.255.254.0 0.0.0.0.

pls advise

Your ACL would work but I would rather configure it as follow:

access list 101 permit ip 200.1.0.0 0.0.0.0 255.255.254.0 0.0.0.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,

We add the access but it displays as:

access-list 101 permit ip host 200.1.0.0 host 255.255.254.0

when I re-start the bgp, it does not announce 200.1.0.0/23 out but it announce 200.1.2.0/24, 200.1.3.0/24. It means that it announce two routes only. Any idea?

Best regards

It is normal behavior for the ACL to display as host as this means perfect match (or match all bits).

Can you post the new route-map and ACL and

the output of a "show ip bgp route-map Set_ASN_PA"

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

Hi,

config is following:

---

access-list 145 permit ip 203.x.2.0 0.0.0.0 255.255.254.0 0.0.0.0

access-list 55 permit 203.x.0.0 0.0.0.255

access-list 55 permit 203.x.1.0 0.0.0.255

---

route-map Set_ASN_PA permit 10

match ip address 145

set as-path prepend 30x

!

route-map Set_ASN_PA permit 20

match ip address 55

!

route-map Set_ASN_PA permit 30

match as-path 200

---

BGP table version is 17687614, local router ID is 202.x.x.xx

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 203.x.0.0 203.x.y.94 0 32768 i

*> 203.x.1.0 0.0.0.0 0 32768 i

*> 203.x.2.0 203.x.y.95 0 32768 i

*> 203.x.3.0 0.0.0.0 0 32768 i

----

Did you generate the /23 using a network statement as I recommended previously? Can you post a "show ip bgp 203.x.2.0 255.255.254.0"

Also, note that the instance 30 in your routemap will allow everything that hasn't been allowed by the two previous instances.

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

hi,

do we use

---

ip as-path access-list 300 deny .*

ip as-path access-list 300 permit ^$

route-map Set_ASN_PA permit 30

match as-path 300

---

Sorry. I meant to say everything that matches the as-path. Is 203.*.2.0/23 present in the BGP table?

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

hi,

we check it, the result is

--

% Network not in table

---

it is because the network is inside our network

best regards

Did you use a network statement to generate 203.x.2.0/23 and also did you configure a matching route to null0?

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

hi,

the network statement is /24, total 4 network statement there.

Do I change it to /23 and two /24?

If so, do it affect the provider B? please advise

Best regards

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