Skip to content

Commit

Permalink
Update the documentation for Arista Traffic Policy to include the gen…
Browse files Browse the repository at this point in the history
…eration using field-sets.

PiperOrigin-RevId: 720636293
  • Loading branch information
Capirca Team committed Jan 28, 2025
1 parent 49fb654 commit 50da2e1
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions doc/generators/arista_tp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 50da2e1

Please sign in to comment.