O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

There's more

In step 8, we left scope for including a locally-defined function that could apply extra logic to determining whether or not an interface was eligible for RPF checking. Let's look at an example function that could help with that logic.

In this case, the function gets called with information about the interface under scrutiny. It gets a copy of the physical interface name, the logical unit number, the description and the result set from the current configuration. Based on whether the template function returns a Y or a N we determine if we want to exclude the interface from RPF checking or not.

template local-policy-exclusions($physical, $logical,                $unit, $description, $currentConfiguration) { /* No interfaces where the physical ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required