Building network automation solutions

9 module online course

Start now!

Local-AS has to be matched by incoming filter-list

In a previous post I've described how you can use neighbor local-as feature to fix AS-number mismatch between adjacent autonomous systems. However, without additional options, the local-as is inserted in the AS-path of incoming BGP updates before any inbound filters. Your inbound filters thus have to match the local-as as well. Consider, for example, the following configuration:
router bgp 65001
 neighbor remote-as 10
 neighbor local-as 20
 neighbor filter-list 1 in
ip as-path access-list 1 permit ^10$
Although the configuration looks correct, no routes are accepted from AS 10, as the inbound AS-path always contains locally prepended AS 20 as well as AS 10:
R1#show ip bgp neighbor received-routes | begin ^$
   Network Next Hop Metric LocPrf Weight Path
* 0 0 20 10 i
To fix this problem, you either have to include local AS in the AS-path access-list or use the no-prepend option of the neighbor local-as command.

You can get in-depth information on AS-path access-lists in our Configuring BGP on Cisco Routers e-learning solution. If you just need to practice them together with other BGP configuration tasks, the BGP Remote Lab Bundle is the perfect choice.


  1. hi
    the topic on dual-as was gr8
    Would it be possible for anyone to throw some light on explaining in detail a scrnario wherein dual-as and as-overide is being used and also if possible another scenario where dual-as (using no-prepend / replace-as), as-overide and remove private-as is used ...
  2. Got the message. Will-do :)
Add comment