07-16-2007 07:19 AM - edited 03-03-2019 05:53 PM
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
!
07-16-2007 07:27 AM
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,
07-16-2007 07:30 AM
hi,
how do we force it to /23? pls advise
best regards
07-16-2007 07:49 AM
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,
07-16-2007 07:59 AM
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
07-16-2007 08:02 AM
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,
07-16-2007 08:39 AM
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
07-16-2007 08:56 AM
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,
07-16-2007 09:20 AM
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
----
07-16-2007 09:29 AM
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,
07-16-2007 09:38 AM
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
---
07-16-2007 09:41 AM
Sorry. I meant to say everything that matches the as-path. Is 203.*.2.0/23 present in the BGP table?
Regards,
07-16-2007 09:49 AM
hi,
we check it, the result is
--
% Network not in table
---
it is because the network is inside our network
best regards
07-16-2007 09:52 AM
Did you use a network statement to generate 203.x.2.0/23 and also did you configure a matching route to null0?
Regards,
07-16-2007 09:56 AM
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
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: