summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-23 17:32:11 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-23 17:32:11 +0100
commit6588e905512e80e6038fd210837b52f43a7632ad (patch)
tree90f0b2fb985ebd2901301b2638912e3e42a42268 /docs
parent55b77175b4824384f5540a17f53f4e18fbedbce0 (diff)
downloadvyos-documentation-6588e905512e80e6038fd210837b52f43a7632ad.tar.gz
vyos-documentation-6588e905512e80e6038fd210837b52f43a7632ad.zip
interfaces: add generic VLAN documentation
Diffstat (limited to 'docs')
-rw-r--r--docs/_include/interface-address-with-dhcp.txt10
-rw-r--r--docs/_include/interface-description.txt4
-rw-r--r--docs/_include/interface-disable-link-detect.txt2
-rw-r--r--docs/_include/interface-disable.txt12
-rw-r--r--docs/_include/interface-ipv6-addr-autoconf.txt4
-rw-r--r--docs/_include/interface-ipv6-addr-eui64.txt4
-rw-r--r--docs/_include/interface-mac.txt4
-rw-r--r--docs/_include/interface-mtu.txt4
-rw-r--r--docs/_include/interface-vlan.txt53
-rw-r--r--docs/_include/interface-vrf.txt4
-rw-r--r--docs/interfaces/bond.rst7
-rw-r--r--docs/interfaces/bridge.rst61
-rw-r--r--docs/interfaces/ethernet.rst7
-rw-r--r--docs/interfaces/pseudo-ethernet.rst7
-rw-r--r--docs/interfaces/wireless.rst8
15 files changed, 116 insertions, 75 deletions
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 }} <interface> address <address | dhcp |
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }} {{ var4 }} address <address | dhcp |
dhcpv6>
Configure interface `<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 }} <interface> description <description>
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }} {{ var4 }} description <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 }} <interface> disable-link-detect
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ 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 }} <interface> disable
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }} {{ var4 }} disable
- Disable given `<interface>`. It will be placed in administratively down
- (``A/D``) state.
+ Disable given `<interface>`. 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 }} <interface> ipv6 address autoconf
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ 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 }} <interface> ipv6 address eui64 <prefix>
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }} {{ var4 }} ipv6 address eui64 <prefix>
: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 }} <interface> mac <xx:xx:xx:xx:xx:xx>
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }} {{ var4 }} mac <xx:xx:xx:xx:xx:xx>
Configure user defined :abbr:`MAC (Media Access Control)` address on given
`<interface>`.
@@ -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 }} <interface> mtu <mtu>
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }} {{ var4 }} mtu <mtu>
Configure :abbr:`MTU (Maximum Transmission Unit)` on given `<interface>`. 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: <vlan-id>
+ :var4: 10
- .. code-block:: none
+.. cmdinclude:: ../_include/interface-description.txt
+ :var0: {{ var0 }}
+ :var1: {{ var1 }}
+ :var2: vif
+ :var3: <vlan-id>
+ :var4: 10
- set interfaces {{ var0 }} {{ var1 }} vif 10
+.. cmdinclude:: ../_include/interface-disable.txt
+ :var0: {{ var0 }}
+ :var1: {{ var1 }}
+ :var2: vif
+ :var3: <vlan-id>
+ :var4: 10
-.. cmdinclude:: ../_include/interface-address-with-dhcp.txt
+.. cmdinclude:: ../_include/interface-disable-link-detect.txt
+ :var0: {{ var0 }}
+ :var1: {{ var1 }}
+ :var2: vif
+ :var3: <vlan-id>
+ :var4: 10
+
+.. cmdinclude:: ../_include/interface-mac.txt
+ :var0: {{ var0 }}
+ :var1: {{ var1 }}
+ :var2: vif
+ :var3: <vlan-id>
+ :var4: 10
+
+.. cmdinclude:: ../_include/interface-mtu.txt
+ :var0: {{ var0 }}
+ :var1: {{ var1 }}
+ :var2: vif
+ :var3: <vlan-id>
+ :var4: 10
+
+.. cmdinclude:: ../_include/interface-ipv6-addr-autoconf.txt
+ :var0: {{ var0 }}
+ :var1: {{ var1 }}
+ :var2: vif
+ :var3: <vlan-id>
+ :var4: 10
+
+.. cmdinclude:: ../_include/interface-ipv6-addr-eui64.txt
:var0: {{ var0 }}
:var1: {{ var1 }}
:var2: vif
:var3: <vlan-id>
: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 }} <interface> vrf <vrf>
+.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }} {{ var4 }} vrf <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
diff --git a/docs/interfaces/bond.rst b/docs/interfaces/bond.rst
index 21088c02..eea35e2c 100644
--- a/docs/interfaces/bond.rst
+++ b/docs/interfaces/bond.rst
@@ -256,6 +256,13 @@ Bond options
The maximum number of targets that can be specified is 16. The default value
is no IP addresses.
+VLAN
+====
+
+.. cmdinclude:: ../_include/interface-vlan.txt
+ :var0: bond
+ :var1: bond0
+
*******
Example
*******
diff --git a/docs/interfaces/bridge.rst b/docs/interfaces/bridge.rst
index 058d7b01..045ae2a8 100644
--- a/docs/interfaces/bridge.rst
+++ b/docs/interfaces/bridge.rst
@@ -113,56 +113,27 @@ links providing fault tolerance if an active link fails.
Designated Bridges. Hello packets are used to communicate information
about the topology throughout the entire Bridged Local Area Network.
-Enable VLAN-aware bridge
--------------------------
+VLAN
+====
-.. cfgcmd:: set interfaces bridge <interface> member interface <member> native-vlan <vlan-id>
-
- Set the native VLAN ID flag of the interface. When a data packet without a VLAN tag enters
- the port, the data packet will be forced to add a tag of a specific vlan id. When the vlan
- id flag flows out, the tag of the vlan id will be stripped
-
-.. cfgcmd:: set interfaces bridge <interface> member interface <member> allowed-vlan <vlan-id>
-
- Allows specific VLAN IDs to pass through the bridge member interface
-
-.. cfgcmd:: set interfaces bridge <interface> member interface <member> allowed-vlan <n-m>
-
- `n` and `m` represent a VLAN ID, which identifies a VLAN ID range and allows all VLAN IDS in this range to pass through the bridge member interface
-
-VLAN (802.1q) configuration
----------------------------
-
-IEEE 802.1q, often referred to as Dot1q, is the networking standard that supports
-virtual LANs (VLANs) on an IEEE 802.3 Ethernet network. The standard defines a
-system of VLAN tagging for Ethernet frames and the accompanying procedures to be
-used by bridges and switches in handling such frames. The standard also contains
-provisions for a quality-of-service prioritization scheme commonly known as IEEE
-802.1p and defines the Generic Attribute Registration Protocol.
-
-Portions of the network which are VLAN-aware (i.e., IEEE 802.1q conformant) can
-include VLAN tags. When a frame enters the VLAN-aware portion of the network, a
-tag is added to represent the VLAN membership. Each frame must be distinguishable
-as being within exactly one VLAN. A frame in the VLAN-aware portion of the network
-that does not contain a VLAN tag is assumed to be flowing on the native VLAN.
-
-The standard was developed by IEEE 802.1, a working group of the IEEE 802
-standards committee, and continues to be actively revised. One of the notable
-revisions is 802.1Q-2014 which incorporated IEEE 802.1aq (Shortest Path Bridging)
-and much of the IEEE 802.1d standard.
-
-802.1q VLAN interfaces are represented as virtual sub-interfaces in VyOS. The
-term used for this is ``vif``.
+.. cmdinclude:: ../_include/interface-vlan.txt
+ :var0: bridge
+ :var1: br0
-.. cfgcmd:: set interfaces bridge <interface> vif <vlan-id>
+.. cfgcmd:: set interfaces bridge <interface> member interface <member>
+ native-vlan <vlan-id>
- Create a new VLAN interface on interface `<interface>` using the VLAN number
- provided via `<vlan-id>`.
+ Set the native VLAN ID flag of the interface. When a data packet without a
+ VLAN tag enters the port, the data packet will be forced to add a tag of a
+ specific vlan id. When the vlan id flag flows out, the tag of the vlan id
+ will be stripped
- You can create multiple VLAN interfaces on a physical interface. The VLAN ID
- range is from 1 to 4094.
+.. cfgcmd:: set interfaces bridge <interface> member interface <member>
+ allowed-vlan <vlan-id>
- .. note:: Only 802.1Q-tagged packets are accepted on Bridge vifs.
+ Allows specific VLAN IDs to pass through the bridge member interface. This
+ can either be an individual VLAN id or a range of VLAN ids delimited by a
+ hyphen.
*******
Example
diff --git a/docs/interfaces/ethernet.rst b/docs/interfaces/ethernet.rst
index 71a340b1..343a7d59 100644
--- a/docs/interfaces/ethernet.rst
+++ b/docs/interfaces/ethernet.rst
@@ -49,6 +49,13 @@ Ethernet options
VyOS default will be `auto`.
+VLAN
+====
+
+.. cmdinclude:: ../_include/interface-vlan.txt
+ :var0: ethernet
+ :var1: eth0
+
*********
Operation
*********
diff --git a/docs/interfaces/pseudo-ethernet.rst b/docs/interfaces/pseudo-ethernet.rst
index b373a617..d4eb8eff 100644
--- a/docs/interfaces/pseudo-ethernet.rst
+++ b/docs/interfaces/pseudo-ethernet.rst
@@ -56,3 +56,10 @@ Pseudo Ethernet/MACVLAN options
Specifies the physical `<ethX>` Ethernet interface associated with a Pseudo
Ethernet `<interface>`.
+
+VLAN
+====
+
+.. cmdinclude:: ../_include/interface-vlan.txt
+ :var0: pseudo-ethernet
+ :var1: peth0
diff --git a/docs/interfaces/wireless.rst b/docs/interfaces/wireless.rst
index 75c42f29..b51eb274 100644
--- a/docs/interfaces/wireless.rst
+++ b/docs/interfaces/wireless.rst
@@ -274,7 +274,6 @@ VHT (Very High Throughput) capabilities (802.11ac)
Station supports receiving VHT variant HT Control field
-
Wireless options (Station/Client)
=================================
@@ -373,6 +372,13 @@ Resulting in
}
+VLAN
+====
+
+.. cmdinclude:: ../_include/interface-vlan.txt
+ :var0: wireless
+ :var1: wlan0
+
*********
Operation
*********