cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
331
Views
1
Helpful
3
Replies

How to filter advertising Connected routes to other L3VPN routers?

Hej
We have some ASR9903s version 24.2.2

We want to advertise connected routes in a L3VPN to other routers with same VRF in our network except few routes. 

For example, how can I advertise all connected routes except anything within 16.0.0.0/16 in a VRF to rest of our routers that have the same VRF?
 

1 Accepted Solution

Accepted Solutions

Ok I had to change destination-prefix to destination, then it worked

View solution in original post

3 Replies 3

You can use two methods 

1- using route-map (rpl) to match next-hop 0.0.0.0' as you know connect next-hop is 0.0.0.0

2- using route-map (rpl) match route type local <<- this new cisco feature not all router support it 

MHM

I try something like this but I get error

prefix-set BNG-NNI101-IPv4
  101.101.0.0/16,
  101.102.0.0/16,
  101.103.0.0/16
end-set
!

route-policy INTERNET_BNG_101_REDIST_CONNECTED
  if destination-prefix in BNG-NNI101-IPv4 then
    drop
  else
    done
  endif
end-policy
!
router bgp 65000
 vrf INTERNET
  address-family ipv4 unicast
   redistribute connected route-policy INTERNET_BNG_101_REDIST_CONNECTED
  !
 !

The Error

% Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed [inheritance]' from this session to view the errors
RP/0/RP0/CPU0:pe1.koeb3.dk(config)#show configuration failed inheritance 
Wed Dec  4 11:50:18.794 CET
!! SEMANTIC ERRORS: This configuration was rejected by 
!! the system due to semantic errors. The individual 
!! errors with each failed configuration command can be 
!! found below.


prefix-set BNG-NNI101-IPv4
  101.101.0.0/16,
  101.102.0.0/16,
  101.103.0.0/16
end-set
!
!!% Could not find entry in list: Policy [INTERNET_BNG_101_REDIST_CONNECTED] uses the 'destination-prefix' attribute. There is no 'destination-prefix' attribute at the bgp redistribution-vrf attach point.
route-policy INTERNET_BNG_101_REDIST_CONNECTED
  if destination-prefix in BNG-NNI101-IPv4 then
    drop
  else
    done
  endif
end-policy
!
!!% Could not find entry in list: Policy [INTERNET_BNG_101_REDIST_CONNECTED] uses the 'destination-prefix' attribute. There is no 'destination-prefix' attribute at the bgp redistribution-vrf attach point.
router bgp 65000
 vrf INTERNET
  address-family ipv4 unicast
   redistribute connected route-policy INTERNET_BNG_101_REDIST_CONNECTED
!!% Could not find entry in list: Policy [INTERNET_BNG_101_REDIST_CONNECTED] uses the 'destination-prefix' attribute. There is no 'destination-prefix' attribute at the bgp redistribution-vrf attach point.
  !
 !
!
end

Ok I had to change destination-prefix to destination, then it worked