I'm trying to setup graceful-shutdown community but it looks I cannot make it working.

community-set comm-graceful-shutdown
route-policy SOMEIX-IN
  ! tried set local-preference 0 here to test, useless because it is rewritten
  set community (65535:0) additive
  if community matches-any comm-graceful-shutdown then
    set local-preference 0
    set local-preference 95
  ! if I put set local-preference 0 here, I can achieve to have localpref 0

In the end I got:

  Origin IGP, metric 0, localpref 95, valid, external, best, group-best
  Received Path ID 0, Local Path ID 0, version 416851127
  Community: <some communities, then:> graceful-shutdown

Has someone an Idea on what point(s) I'm wrong please ?

  • Is the route-policy correctly applied to the peer?
    – Ron Trunk
    Mar 12 '19 at 15:33
  • Yes it is, because the localpref 95 is applied, or the 0 one if I put it in the end. Mar 12 '19 at 16:04
  • I suspect (but can't test) that you can't set a community on a received route, then test for it.
    – Ron Trunk
    Mar 12 '19 at 16:06
  • Communities cannot be set on inbound routes Jan 4 '20 at 0:16

The issue here is the community string needs to be set by the sender, not the route policy. The route policy sets the community at the end of the processing, so the if test never sees the community string and sets local pref to 95. The result is local pref 95 and community 65535:0 being added.

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.