1

I am configuring some policy statements on JunOS 11. I am filtering inbound BGP prefixes using the below syntax. It's fairly simply and self explanatory, you can guess whats it's doing just by looking at it. However I am unsure of the route-filter keyword.

Routes come in from a BGP neighbor and go through the various tables and processes etc (too much to expand on here), is the route-filter a part of the OS that all received prefixes are passed through before hitting a process RIB (like BGP RIP of ISIS RIB) or the main FIB? By creating this policy statement does it create hooks inside the route-filter ?

policy-statement PS-Deny-Some-Prefixes-Mwuhahaha {
    term 1 {
        from {
            route-filter 1.2.3.0/24 orlonger reject;
            route-filter 7.7.7.0/7 orlonger reject;
        }
        then reject;
    }
}

As a side question; JunOS allowed be to write the reject keyword on the end of the prefix statements, will his have any effect as I have a then clause? Is either place preferred over the other? I would say the then clause is neater but is there any other benefit?

0
4

I think (and someone please correct me if my thinking is wrong). Your prefixes come to RIBin where they filtered and put in RIBlocal, and if you want them advertised/exported and filtered maybe ,they are put in RIBout. You can view this with 'show route [receive-protocol | advertising-protocol]'.

On the side question, reject/accept keyword takes preference over the then clause, you can have for example one reject route filter and one route filter that is accepted in the then clause. Policy statements with such route filters should be read carefully.

1
  • This is correct – mellowd Oct 12 '13 at 14:56

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.