From 50da2e1d8ed787b2c4be330a24b70e6420967c72 Mon Sep 17 00:00:00 2001 From: Capirca Team Date: Tue, 28 Jan 2025 10:56:15 -0800 Subject: [PATCH] Update the documentation for Arista Traffic Policy to include the generation using field-sets. PiperOrigin-RevId: 720636293 --- doc/generators/arista_tp.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/generators/arista_tp.md b/doc/generators/arista_tp.md index ffba617a..2441a123 100644 --- a/doc/generators/arista_tp.md +++ b/doc/generators/arista_tp.md @@ -76,6 +76,34 @@ field-set generated with no prefix, while the ipv6 field-set will have `ipv6` inserted into the field-set name after the direction and before the name. (form: `src|dst-ipv6-term_name`) +## using field-sets + +Arista traffic policies can be generated with source or destination prefixes +directly embedded within the match conditions. If any prefixes are to be +excluded from the match, the generator uses field-sets to contain the prefixes. +Alternatively, a `field-set` flag in the header can force the generator to +always use field-sets for prefix definitions, even when direct nesting under +match conditions would otherwise be possible. + +The generator also removes any duplicate field-sets and their associated +references within the policy. + +### Sample Policy with unique field-sets + + field-set ipv6 prefix src-ipv6-term-1 + 2001:4860:4860::8888/128 + 2001:4860:4860::8844/128 + ! + traffic-policy management-inbound-v6 + match src-ipv6-term-1 ipv6 + destination prefix field-set src-ipv6-term-1 + protocol udp destination port 53 + ! + match src-ipv6-term-2 ipv6 + destination prefix field-set src-ipv6-term-1 + protocol icmp type 0,3,8,11,12 code all + ! + ## ports In EOS traffic-policies, ports can be configured using: