summaryrefslogtreecommitdiff
path: root/docs/configuration
diff options
context:
space:
mode:
authorAdam Korab <ak@mid.net>2024-08-20 16:12:47 -0500
committerChristian Breunig <christian@breunig.cc>2024-08-21 08:03:10 +0200
commit4d6e71ea0338a7c9d3a4bc279f65189ecb109bb6 (patch)
tree226c1975e8a46c0fdc91e80e47bf44a1a16c18b7 /docs/configuration
parent9ef6d851be2ff2dc643a59c100b6aeca439abf00 (diff)
downloadvyos-documentation-4d6e71ea0338a7c9d3a4bc279f65189ecb109bb6.tar.gz
vyos-documentation-4d6e71ea0338a7c9d3a4bc279f65189ecb109bb6.zip
Update prefix-list.rst
add IPv4 prefix-list example (cherry picked from commit 7600f55643458fb84f2018d35acbd00eceb7a4fe)
Diffstat (limited to 'docs/configuration')
-rw-r--r--docs/configuration/policy/prefix-list.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/configuration/policy/prefix-list.rst b/docs/configuration/policy/prefix-list.rst
index 05229757..cc0d8441 100644
--- a/docs/configuration/policy/prefix-list.rst
+++ b/docs/configuration/policy/prefix-list.rst
@@ -46,6 +46,22 @@ Prefix Lists
Netmask less than length
+Example: Prefix Lists
+============
+
+This example creates an IPv4 prefix-list named PL4-EXAMPLE-NAME, defines 3
+rules each with 1 prefix, and matches le (less than/equal to) /32.
+
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 10 action 'permit'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 10 le '32'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 10 prefix '192.0.2.0/24'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 20 action 'permit'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 20 le '32'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 20 prefix '198.51.100.0/24'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 30 action 'permit'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 30 le '32'
+.. cfgcmd:: set policy prefix-list PL4-EXAMPLE-NAME rule 30 prefix '203.0.113.0/24'
+
IPv6 Prefix Lists
=================