From 6588e905512e80e6038fd210837b52f43a7632ad Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 23 Nov 2020 17:32:11 +0100 Subject: interfaces: add generic VLAN documentation --- docs/_include/interface-address-with-dhcp.txt | 10 ++--- docs/_include/interface-description.txt | 4 +- docs/_include/interface-disable-link-detect.txt | 2 +- docs/_include/interface-disable.txt | 12 +++--- docs/_include/interface-ipv6-addr-autoconf.txt | 4 +- docs/_include/interface-ipv6-addr-eui64.txt | 4 +- docs/_include/interface-mac.txt | 4 +- docs/_include/interface-mtu.txt | 4 +- docs/_include/interface-vlan.txt | 53 ++++++++++++++++++++++--- docs/_include/interface-vrf.txt | 4 +- 10 files changed, 72 insertions(+), 29 deletions(-) (limited to 'docs/_include') diff --git a/docs/_include/interface-address-with-dhcp.txt b/docs/_include/interface-address-with-dhcp.txt index 10838e72..45bc9b03 100644 --- a/docs/_include/interface-address-with-dhcp.txt +++ b/docs/_include/interface-address-with-dhcp.txt @@ -1,4 +1,4 @@ -.. cfgcmd:: set interfaces {{ var0 }} address
{{ var2 }} {{ var3 }} {{ var4 }} address
Configure interface `` with one or more interface addresses. @@ -14,7 +14,7 @@ .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} address 192.0.2.1/24 - set interfaces {{ var0 }} {{ var1 }} address 2001:db8::1/64 - set interfaces {{ var0 }} {{ var1 }} dhcp - set interfaces {{ var0 }} {{ var1 }} dhcpv6 \ No newline at end of file + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} address 192.0.2.1/24 + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} address 2001:db8::1/64 + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} dhcp + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} dhcpv6 \ No newline at end of file diff --git a/docs/_include/interface-description.txt b/docs/_include/interface-description.txt index 1c6a870f..50c08d45 100644 --- a/docs/_include/interface-description.txt +++ b/docs/_include/interface-description.txt @@ -1,4 +1,4 @@ -.. cfgcmd:: set interfaces {{ var0 }} description +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} description Set a human readable, descriptive alias for this connection. Alias is used by e.g. the :opcmd:`show interfaces` command or SNMP based monitoring tools. @@ -7,4 +7,4 @@ .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} description 'This is an awesome interface running on VyOS' \ No newline at end of file + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} description 'This is an awesome interface running on VyOS' \ No newline at end of file diff --git a/docs/_include/interface-disable-link-detect.txt b/docs/_include/interface-disable-link-detect.txt index a9c0e85f..1cc97146 100644 --- a/docs/_include/interface-disable-link-detect.txt +++ b/docs/_include/interface-disable-link-detect.txt @@ -1,4 +1,4 @@ -.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} disable-link-detect +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} disable-link-detect Use this command to direct an interface to not detect any physical state changes on a link, for example, when the cable is unplugged. diff --git a/docs/_include/interface-disable.txt b/docs/_include/interface-disable.txt index 83ef3e53..f0d22563 100644 --- a/docs/_include/interface-disable.txt +++ b/docs/_include/interface-disable.txt @@ -1,10 +1,10 @@ -.. cfgcmd:: set interfaces {{ var0 }} disable +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} disable - Disable given ``. It will be placed in administratively down - (``A/D``) state. + Disable given ``. It will be placed in administratively down + (``A/D``) state. - Example: + Example: - .. code-block:: none + .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} disable \ No newline at end of file + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} disable \ No newline at end of file diff --git a/docs/_include/interface-ipv6-addr-autoconf.txt b/docs/_include/interface-ipv6-addr-autoconf.txt index e16cff0e..c0c5650d 100644 --- a/docs/_include/interface-ipv6-addr-autoconf.txt +++ b/docs/_include/interface-ipv6-addr-autoconf.txt @@ -1,4 +1,4 @@ -.. cfgcmd:: set interfaces {{ var0 }} ipv6 address autoconf +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} ipv6 address autoconf :abbr:`SLAAC (Stateless Address Autoconfiguration)` :rfc:`4862`. IPv6 hosts can configure themselves automatically when connected to an IPv6 network using @@ -15,4 +15,4 @@ .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} ipv6 address autoconf + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} ipv6 address autoconf diff --git a/docs/_include/interface-ipv6-addr-eui64.txt b/docs/_include/interface-ipv6-addr-eui64.txt index 5f32ccad..2e044b9d 100644 --- a/docs/_include/interface-ipv6-addr-eui64.txt +++ b/docs/_include/interface-ipv6-addr-eui64.txt @@ -1,8 +1,8 @@ -.. cfgcmd:: set interfaces {{ var0 }} ipv6 address eui64 +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} ipv6 address eui64 :abbr:`EUI-64 (64-Bit Extended Unique Identifier)` as specified in :rfc:`4291` allows a host to assign iteslf a unique 64-Bit IPv6 address. .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} ipv6 address eui64 2001:db8:beef::/64 + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} ipv6 address eui64 2001:db8:beef::/64 diff --git a/docs/_include/interface-mac.txt b/docs/_include/interface-mac.txt index de7f2d83..ca2b71e6 100644 --- a/docs/_include/interface-mac.txt +++ b/docs/_include/interface-mac.txt @@ -1,4 +1,4 @@ -.. cfgcmd:: set interfaces {{ var0 }} mac +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} mac Configure user defined :abbr:`MAC (Media Access Control)` address on given ``. @@ -7,4 +7,4 @@ .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} mac '00:01:02:03:04:05' \ No newline at end of file + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} mac '00:01:02:03:04:05' \ No newline at end of file diff --git a/docs/_include/interface-mtu.txt b/docs/_include/interface-mtu.txt index e727c3e9..fd232f5d 100644 --- a/docs/_include/interface-mtu.txt +++ b/docs/_include/interface-mtu.txt @@ -1,4 +1,4 @@ -.. cfgcmd:: set interfaces {{ var0 }} mtu +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} mtu Configure :abbr:`MTU (Maximum Transmission Unit)` on given ``. It is the size (in bytes) of the largest ethernet frame sent on this link. @@ -7,4 +7,4 @@ .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} mtu 1450 \ No newline at end of file + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} mtu 1450 \ No newline at end of file diff --git a/docs/_include/interface-vlan.txt b/docs/_include/interface-vlan.txt index c1472018..7b87c3eb 100644 --- a/docs/_include/interface-vlan.txt +++ b/docs/_include/interface-vlan.txt @@ -29,20 +29,63 @@ term used for this is ``vif``. .. note:: Only 802.1Q-tagged packets are accepted on Ethernet vifs. - Example: +.. cmdinclude:: ../_include/interface-address-with-dhcp.txt + :var0: {{ var0 }} + :var1: {{ var1 }} + :var2: vif + :var3: + :var4: 10 - .. code-block:: none +.. cmdinclude:: ../_include/interface-description.txt + :var0: {{ var0 }} + :var1: {{ var1 }} + :var2: vif + :var3: + :var4: 10 - set interfaces {{ var0 }} {{ var1 }} vif 10 +.. cmdinclude:: ../_include/interface-disable.txt + :var0: {{ var0 }} + :var1: {{ var1 }} + :var2: vif + :var3: + :var4: 10 -.. cmdinclude:: ../_include/interface-address-with-dhcp.txt +.. cmdinclude:: ../_include/interface-disable-link-detect.txt + :var0: {{ var0 }} + :var1: {{ var1 }} + :var2: vif + :var3: + :var4: 10 + +.. cmdinclude:: ../_include/interface-mac.txt + :var0: {{ var0 }} + :var1: {{ var1 }} + :var2: vif + :var3: + :var4: 10 + +.. cmdinclude:: ../_include/interface-mtu.txt + :var0: {{ var0 }} + :var1: {{ var1 }} + :var2: vif + :var3: + :var4: 10 + +.. cmdinclude:: ../_include/interface-ipv6-addr-autoconf.txt + :var0: {{ var0 }} + :var1: {{ var1 }} + :var2: vif + :var3: + :var4: 10 + +.. cmdinclude:: ../_include/interface-ipv6-addr-eui64.txt :var0: {{ var0 }} :var1: {{ var1 }} :var2: vif :var3: :var4: 10 -.. cmdinclude:: ../_include/interface-common.txt +.. cmdinclude:: ../_include/interface-vrf.txt :var0: {{ var0 }} :var1: {{ var1 }} :var2: vif diff --git a/docs/_include/interface-vrf.txt b/docs/_include/interface-vrf.txt index 92bfae93..ca715fb2 100644 --- a/docs/_include/interface-vrf.txt +++ b/docs/_include/interface-vrf.txt @@ -1,4 +1,4 @@ -.. cfgcmd:: set interfaces {{ var0 }} vrf +.. cfgcmd:: set interfaces {{ var0 }} {{ var2 }} {{ var3 }} {{ var4 }} vrf Place interface in given VRF instance. @@ -9,4 +9,4 @@ .. code-block:: none - set interfaces {{ var0 }} {{ var1 }} vrf red \ No newline at end of file + set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} vrf red \ No newline at end of file -- cgit v1.2.3