Routing
Reply
Contributor
Iglu
Posts: 69
Registered: ‎11-12-2008
0
Accepted Solution

bgp filter does not work

Hi

As you can see below is my bgp filter not working.

I still get full bgp table including default route.

does anybody have any idea? 

 

best regards

IGLU

 

***************************************

protocols {
    bgp {
        group ISP-A{
            type external;
            import ACC-DEFAULT-ONLY;
            peer-as xxxx;
            neighbor xxx.xxx.xxx.xxx;
        }
    }
}
policy-options {
    policy-statement ACC-DEFAULT-ONLY {
        from {
            route-filter 0.0.0.0/0 exact accept;
        }
    }

***************************************

Super Contributor
davidjdv
Posts: 114
Registered: ‎02-26-2008

Re: bgp filter does not work

Hi,

 

The reason you are still accepting the full BGP table is that the default policy for BGP is to accept all routes learnt via BGP.

 

To achieve what you want, use something like the following:

 

policy-statement ACC-DEFAULT-ONLY {

    term accept-default {

        from {

            route-filter 0.0.0.0/0 exact accept;

        }

    }

    term reject-others {

        then reject;

    }

}

 

HTH,

/david 

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.