From 58b3a577e5386e52ccfade8c5d9c3d5bc36f2839 Mon Sep 17 00:00:00 2001 From: rebortg Date: Mon, 9 Nov 2020 21:30:06 +0100 Subject: Bridge: convert address to cmdinclude --- docs/_include/interface-address.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/_include/interface-address.txt (limited to 'docs/_include') diff --git a/docs/_include/interface-address.txt b/docs/_include/interface-address.txt new file mode 100644 index 00000000..1de05c31 --- /dev/null +++ b/docs/_include/interface-address.txt @@ -0,0 +1,21 @@ +.. cfgcmd:: set interfaces {{ var0 }} address
+ + Configure interface `` with one or more interface + addresses. + + * **address** can be specified multiple times as IPv4 and/or IPv6 + address, e.g. 192.0.2.1/24 and/or 2001:db8::1/64 + * **dhcp** interface address is received by DHCP from a DHCP server + on this segment. + * **dhcpv6** interface address is received by DHCPv6 from a DHCPv6 + server on this segment. + + Example: + + .. code-block:: none + + set interfaces {{ var0 }} {{ var1 }} address 192.0.2.1/24 + set interfaces {{ var0 }} {{ var1 }} address 192.0.2.2/24 + set interfaces {{ var0 }} {{ var1 }} address 2001:db8::ffff/64 + set interfaces {{ var0 }} {{ var1 }} address 2001:db8:100::ffff/64 \ No newline at end of file -- cgit v1.2.3 From b7e61a03f09b93cdaa91a3c6b13d967621483f5c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 10 Nov 2020 20:02:47 +0100 Subject: interfaces: extend usage of new cmdinclude directive for bridge, bond, eth, peth, vxlan Commit c46473a ("docs: add ..cmdinclude:: directive") added support for including common text but only replacing individual labels so there can be source of truth also for the documentation. --- docs/_include/interface-ipv6-addr-autoconf.txt | 20 +++++++++++++ docs/_include/interface-ipv6-addr-eui64.txt | 8 +++++ docs/interfaces/bond.rst | 41 ++++++-------------------- docs/interfaces/bridge.rst | 21 ++++--------- docs/interfaces/common-ip-ipv6-addr.txt | 8 ----- docs/interfaces/common-ipv6-addr-autoconf.txt | 12 -------- docs/interfaces/ethernet.rst | 32 ++++++-------------- docs/interfaces/pseudo-ethernet.rst | 23 ++++++--------- docs/interfaces/vxlan.rst | 36 ++++++---------------- 9 files changed, 70 insertions(+), 131 deletions(-) create mode 100644 docs/_include/interface-ipv6-addr-autoconf.txt create mode 100644 docs/_include/interface-ipv6-addr-eui64.txt delete mode 100644 docs/interfaces/common-ip-ipv6-addr.txt delete mode 100644 docs/interfaces/common-ipv6-addr-autoconf.txt (limited to 'docs/_include') diff --git a/docs/_include/interface-ipv6-addr-autoconf.txt b/docs/_include/interface-ipv6-addr-autoconf.txt new file mode 100644 index 00000000..22f9ee59 --- /dev/null +++ b/docs/_include/interface-ipv6-addr-autoconf.txt @@ -0,0 +1,20 @@ +.. cfgcmd:: set interfaces {{ var0 }} ipv6 address autoconf + + + :abbr:`SLAAC (Stateless Address Autoconfiguration)` + :rfc:`4862`. IPv6 hosts can configure themselves automatically when connected + to an IPv6 network using the Neighbor Discovery Protocol via :abbr:`ICMPv6 + (Internet Control Message Protocol version 6)` router discovery messages. + When first connected to a network, a host sends a link-local router + solicitation multicast request for its configuration parameters; routers + respond to such a request with a router advertisement packet that contains + Internet Layer configuration parameters. + + .. note:: This method automatically disables IPv6 traffic forwarding on the + interface in question. + + Example: + + .. code-block:: none + + set interfaces {{ var0 }} {{ var1 }} ipv6 address autoconf diff --git a/docs/_include/interface-ipv6-addr-eui64.txt b/docs/_include/interface-ipv6-addr-eui64.txt new file mode 100644 index 00000000..40f22e5f --- /dev/null +++ b/docs/_include/interface-ipv6-addr-eui64.txt @@ -0,0 +1,8 @@ +.. cfgcmd:: set interfaces {{ var0 }} 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 diff --git a/docs/interfaces/bond.rst b/docs/interfaces/bond.rst index 9e67809a..78099f01 100644 --- a/docs/interfaces/bond.rst +++ b/docs/interfaces/bond.rst @@ -16,40 +16,17 @@ Configuration Address ------- -.. cfgcmd:: set interfaces bonding address
+.. cmdinclude:: ../_include/interface-address.txt + :var0: bonding + :var1: bond0 - Configure interface `` with one or more interface addresses. - - * **address** can be specified multiple times as IPv4 and/or IPv6 address, - e.g. 192.0.2.1/24 and/or 2001:db8::1/64 - * **dhcp** interface address is received by DHCP from a DHCP server on this - segment. - * **dhcpv6** interface address is received by DHCPv6 from a DHCPv6 server on - this segment. - - Example: - - .. code-block:: none - - set interfaces bonding bond0 address 192.0.2.1/24 - set interfaces bonding bond0 address 192.0.2.2/24 - set interfaces bonding bond0 address 2001:db8::ffff/64 - set interfaces bonding bond0 address 2001:db8:100::ffff/64 - - -.. cfgcmd:: set interfaces bonding ipv6 address autoconf - - .. include:: common-ipv6-addr-autoconf.txt - -.. cfgcmd:: set interfaces bonding 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 bonding bond0 ipv6 address eui64 2001:db8:beef::/64 +.. cmdinclude:: ../_include/interface-ipv6-addr-autoconf.txt + :var0: bonding + :var1: bond0 +.. cmdinclude:: ../_include/interface-ipv6-addr-eui64.txt + :var0: bonding + :var1: bond0 Link Administration ------------------- diff --git a/docs/interfaces/bridge.rst b/docs/interfaces/bridge.rst index 26e67690..aec1c5d8 100644 --- a/docs/interfaces/bridge.rst +++ b/docs/interfaces/bridge.rst @@ -24,22 +24,13 @@ Address :var0: bridge :var1: br0 +.. cmdinclude:: ../_include/interface-ipv6-addr-autoconf.txt + :var0: bridge + :var1: br0 -.. cfgcmd:: set interfaces bridge ipv6 address autoconf - - .. include:: common-ipv6-addr-autoconf.txt - -.. cfgcmd:: set interfaces bridge 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 bridge br0 ipv6 address eui64 2001:db8:beef::/64 - +.. cmdinclude:: ../_include/interface-ipv6-addr-eui64.txt + :var0: bridge + :var1: br0 .. cfgcmd:: set interfaces bridge aging