Basic actions

It is possible to set up a specific action for packets being processed by a segment endpoint. They can be configured with the following command:

# ip sr action add ACTSEG type TYPE [args]

The ACTSEG parameter is the IPv6 address corresponding to the active segment of the packets (i.e., the action will be performed for packets having the corresponding active segment).

The TYPE parameter can (currently) take the following values, with the corresponding arguments:

  • override_next ADDR: overwrite the next segment with the given address. Note that it must not be used with an HMAC field as it will invalidate the HMAC.
  • nexthop ADDR: force the processed packet to be routed through the given nexthop, instead of the resolved nexthop for the next segment.

A list of the currently mapped actions can be displayed with the following command:

# ip sr action show

Advanced actions

It is possible for a program to receive all packets corresponding to a given active segment through a special memory-mapped netlink interface. This type of action effectively implement a service segment. For more information, please look at the page ServicesDevelopment.


Page last modified on March 02, 2016, at 01:30 PM