1

On the given router, my objective is to configure as-path-access-list so it doesn’t accept any prefixes originated by AS 1. Below are the command outputs:

Coarse#sho ip bgp
BGP table version is 7, local router ID is 44.44.44.44
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
*> 1.1.1.0/24       192.168.34.3                           0 3 2 1 i
*> 3.3.3.0/24       192.168.34.3             0             0 3 i
*> 4.4.4.0/24       0.0.0.0                  0         32768 i
*> 11.11.11.0/24    192.168.34.3                           0 3 2 1 i
*> 33.33.33.0/24    192.168.34.3             0             0 3 i
*> 44.44.44.0/24    0.0.0.0                  0         32768 i

Now i need to match all prefixes originated in AS 1,

Coarse#sho ip bgp regexp 1$
BGP table version is 7, local router ID is 44.44.44.44
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
*> 1.1.1.0/24       192.168.34.3                           0 3 2 1 i
*> 11.11.11.0/24    192.168.34.3                           0 3 2 1 i

Configuring this as-path-access-list

Coarse#sho ip as-path-access-list 1
AS path access list 1
    deny 1$

Coarse#sho run | sec router bgp
router bgp 4
 no synchronization
 bgp log-neighbor-changes
 network 4.4.4.0 mask 255.255.255.0
 network 44.44.44.0 mask 255.255.255.0
 neighbor 192.168.14.1 remote-as 1
 neighbor 192.168.14.1 filter-list 1 in
 neighbor 192.168.34.3 remote-as 3
 no auto-summary
Coarse#

But still i see that, these prefixes (originated from AS 1) are present in BGP table

Coarse#sho ip bgp
BGP table version is 7, local router ID is 44.44.44.44
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
*> 1.1.1.0/24       192.168.34.3                           0 3 2 1 i
*> 3.3.3.0/24       192.168.34.3             0             0 3 i
*> 4.4.4.0/24       0.0.0.0                  0         32768 i
*> 11.11.11.0/24    192.168.34.3                           0 3 2 1 i
*> 33.33.33.0/24    192.168.34.3             0             0 3 i
*> 44.44.44.0/24    0.0.0.0                  0         32768 i

Can you please guide where i went wrong?

2
  • 3
    You've attached filter-list to wrong peer. It's supposed to be neighbor 192.168.34.3 filter-list 1 in instead of neighbor 192.168.14.1 filter-list 1 in. – Daniel Blazek Feb 11 '18 at 19:19
  • 3
    You should also change regex from 1$ to _1$. Without the underscore you deny all prefixies originated in AS(s) which last digit is 1. Like 61, ... – Daniel Blazek Feb 11 '18 at 19:44
3

You are receiving your routes from 192.168.34.3, so you need to apply the filter list on that neighbor, instead of 192.168.14.1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.