[j-nsp] As-path filtering via policy

Junoguy junoguy at earthlink.net
Sat Apr 12 02:23:17 EDT 2003

Hi all.  I am up late studying and perhaps I am not seeing this
correctly but here it goes:

I have a customer router, call it C1, its AS# is 11.  Because I do not
have any other routers to advertise this route (among other things) so
that it shows up in my local router with a different as-path, I have it
configured to advertise the route and ADD the as-path "99
66" before adding the local AS # which is 11.  C1 also has other routes
being advertised to my local router whos AS path have not been modified.

My local router that is peering to C1 has the following policies and bgp

lab at SJ-R1#
policy-statement EBGP-Import-0 {
    term Customer-AS-Only {
        from as-path C1;
        then next policy;
policy-statement EBGP-Import-1 {

as-path C1 ".* 11";

lab at SJ-R1# show protocols bgp 
group Customer-Peer {
    type external;
    import [ EBGP-Import-0 EBGP-Import-1 ];
    export EBGP-Export;
    neighbor {
        peer-as 11;

Now, I am trying to filter out any routes that do not originate in AS
11.  I define the as-path for which I am filtering on  but the end
results are not what I expect, here it is:

lab at SJ-R1# run show route protocol bgp 200.200/23 detail 

inet.0: 29 destinations, 29 routes (25 active, 0 holddown, 5 hidden)
+ = Active Route, - = Last Active, * = Both (1 entry, 1 announced)
        *BGP    Preference: 170/-101<<<<<<< NOTICE THAT IT IS ACTIVE
                Nexthop: via fxp2.0, selected
                State: <Active Ext>
                Local AS:    77 Peer AS:    11
                Age: 30:43
                Task: BGP_11.
                Announcement bits (3): 0-KRT 4-BGP. 5-Resolve
                AS path: 11 99 66 I <<<<<<<< NOTICE THE AS-PATH
                Communities: 77:200
                Localpref: 100
                Router ID:

lab at SJ-R1#   

So as you can see, the route is still being accepted.  What am I doing



More information about the juniper-nsp mailing list