Skip to main content
added 335 characters in body
Source Link
ytti
  • 9.8k
  • 43
  • 53

test policy PS-Filter-Prefix-Size 0.0.0.0/0

This should display routes passing the policy

There isn't direct way to ask the opposite, but you could create policy which calls 'PS-Filter-Prefix-Size' and then rejects and accepts rest.
Testing this policy would yield opposite results, showing routes not passing 'PS-Filter-Prefix-Size'.

As far as I understand your 'PS-Filter-Prefix-Size' does nothing, as there is no action, so existing 'default-action' is honored.
You should have 'then accept' or 'then reject', and preferably after that explicit catch-all rule.

In your situation I'd do something like this

term bogus_size {
    from {
        family inet;
        route-filter 0.0.0.0/0 prefix-length-range /25-/32;
        route-filter 0.0.0.0/0 prefix-length-range /1-/7;
    }
    then reject;
}
term accept {
    then accept;
}

test policy PS-Filter-Prefix-Size 0.0.0.0/0

This should display routes passing the policy

There isn't direct way to ask the opposite, but you could create policy which calls 'PS-Filter-Prefix-Size' and then rejects and accepts rest.
Testing this policy would yield opposite results, showing routes not passing 'PS-Filter-Prefix-Size'.

As far as I understand your 'PS-Filter-Prefix-Size' does nothing, as there is no action, so existing 'default-action' is honored.
You should have 'then accept' or 'then reject', and preferably after that explicit catch-all rule.

test policy PS-Filter-Prefix-Size 0.0.0.0/0

This should display routes passing the policy

There isn't direct way to ask the opposite, but you could create policy which calls 'PS-Filter-Prefix-Size' and then rejects and accepts rest.
Testing this policy would yield opposite results, showing routes not passing 'PS-Filter-Prefix-Size'.

As far as I understand your 'PS-Filter-Prefix-Size' does nothing, as there is no action, so existing 'default-action' is honored.
You should have 'then accept' or 'then reject', and preferably after that explicit catch-all rule.

In your situation I'd do something like this

term bogus_size {
    from {
        family inet;
        route-filter 0.0.0.0/0 prefix-length-range /25-/32;
        route-filter 0.0.0.0/0 prefix-length-range /1-/7;
    }
    then reject;
}
term accept {
    then accept;
}
Source Link
ytti
  • 9.8k
  • 43
  • 53

test policy PS-Filter-Prefix-Size 0.0.0.0/0

This should display routes passing the policy

There isn't direct way to ask the opposite, but you could create policy which calls 'PS-Filter-Prefix-Size' and then rejects and accepts rest.
Testing this policy would yield opposite results, showing routes not passing 'PS-Filter-Prefix-Size'.

As far as I understand your 'PS-Filter-Prefix-Size' does nothing, as there is no action, so existing 'default-action' is honored.
You should have 'then accept' or 'then reject', and preferably after that explicit catch-all rule.