Traffic Management: General Configuration

Set Traffic Management JSON configuration

{
    "active_ruleset": 5
}

Get Traffic Management JSON configuration

{
    "active_ruleset": null,
    "state": {
        "rule_counters": [],
        "resource_use": 0,
        "resource_use_entries": 0,
        "ingress_resource_use": 0,
        "ingress_resource_use_entries": 0,
        "ptp_state": {
            "active": true,
            "ptp_master_mac": "aa:aa:aa:aa:aa:aa",
            "ptp_master_ip": "10.10.10.33",
            "clock_offset": 0,
            "path_delay": 0,
            "time_sync": 1231231231,
            "clk_id": 12312,
            "sync_state": "sync_freerun"
        }
    },
    "available_filters": {
        "vlan_group": true,
        "ipv4_fragments": false,
        "l4_group": true,
        "configurable_filters": true
    },
    "available_actions": [
        "drop",
        "vlan_tag",
        "vlan_strip",
        "slicing",
        "gtp_ip_drop",
        "gtp_ip6_drop",
        "gtp_ip_allow",
        "gtp_ip6_allow",
        "erspan_strip",
        "erspan_tunnel",
        "vxlan_strip",
        "mpls_strip"
    ],
    "available_ingress_actions": [
        "ingress_vlan_tag",
        "ingress_vlan_strip"
    ],
    "available_time_port": false,
    "available_deduplication": false,
    "family": "x2",
    "max_ingress_vlan_tag_id": 4035,
    "max_resource_entries": 511,
    "max_ingress_resource_entries": 0
}

The vlan_group and l4_group entries of available_filters always read true, on every platform: group-based VLAN and L4 filtering is the daemon's own work (the groups are expanded before the rules reach the network module), so the flags describe the software, not the hardware. Clients can rely on them to tell this group-based API apart from the value-mask one of older XX devices, which report them false.

The state.resource_use* fields report the live hardware TCAM usage of the active ruleset. Predicted per-ruleset values (what a ruleset would consume if activated) are available on the Rule-Set endpoints.

Change applied through a full redeployment

An edit of the active rule set is pushed to the network module as a differential update, which keeps the untouched rules and their counters. When the network module rejects that update, the whole rule set is redeployed instead: every rule counter restarts and traffic is briefly interrupted. The response then carries the text of a warning next to nm_response (the result of the full redeployment):

{
    "message": "...",
    "nm_response": {"id": 116894, "code": 0},
    "warning": "Applied with a full redeployment: rule counters were reset."
}

The rejected batch is written to the application log. warning is always present in the response of an edit of a rule set, and null when there is nothing to warn about: a differential update that succeeds, a failed deployment, or an edit that deploys nothing.