Commit c5622193 authored by Maciej Lipinski's avatar Maciej Lipinski Committed by Grzegorz Daniluk

[DOC] further update of the VLAN description, re-done to encourage using itwrs menuconfig

parent fde34759
......@@ -1790,30 +1790,29 @@ Modes and their behaviour are summarized in the table below:
@center @image{VLAN_modes, 14cm,, VLAN_modes}
From the firmware v5.0, it is possible to configure VLANs in the
@t{dot-config} file (for an example configuration please see
@ref{Example VLAN configuration by dot-config}). Not all possible configuration
are allowed.
From the firmware v6.0, all possible configuration can be set via dot-config,
for more exotic configurations, "raw ports configuration" must be enabled.
As an alternative it is possible to use @i{wrs_vlans} tool
described in @ref{wrs_vlans} together with a custom config file for @i{PPSi} -
this method is error-prone.
Another alternative working on pre-v5.0 to set VLANs is to use the web
interface. However, as it is in v5.0, the web-interface is not capable to store
VLANs configuration into a @t{dot-config}.
@b{For VLAN configuration, it is highly recommended to use dot-config
generated by @t{wrs_menuconfig} command} (PPSi configuration is generated from
the @t{dot-config}).
To have synchronization working with VLANs, the preferred way is to provide proper
PTP VIDs in configuration options @t{CONFIG_VLANS_PORT@i{xx}_PTP_VID}. As an alternative you can
write a custom @i{PPSi} configuration file with VLANs specified per-port.
@b{The best and recommended way to configure VLANs is to use the @i{wrs_menuconfig}
tool for generating the @t{dot-config} file.} The @t{dot-config} file is used at
startup to set:
@itemize
@item @i{per-port and per-VLAN} configuration - the @t{dot-config} is read
by the @i{wrs_vlans} tool at startup
@item @i{PPSi PTP VLAN configuration} - the @t{ppsi.conf} file is generated
at startup from the @t{dot-config} file, it is then read by PPSi.
@end itemize
For an example configuration using @i{wrs_menuconfig} and @t{dot-config},
please see @ref{Example VLAN configuration by dot-config}).
An alternative for VLAN configuration, especially when experimenting with VLANs,
is to use the @i{wrs_vlans} tool directly and to provide a custom @t{ppsi.conf}.
Beware that this method is more error-prone.
To have synchronization working with VLANs, a proper PTP VID needs to be
provided for ports in TRUNK, DISABLED and UNQUALIFIED mode. In the @t{dot-config}
file, it is the @t{CONFIG_VLANS_PORT@i{xx}_PTP_VID} configuration option. For
ports in ACCESS mode, the PTP VID is derived from the VID
(@t{CONFIG_VLANS_PORT@i{xx}_VID} in the @t{dot-config} file).
As an alternative you can write a custom @i{PPSi} configuration file with
VLANs specified per-port.
You can simply copy the file generated in the WRS filesystem
(@i{/etc/ppsi.conf}) to a central @t{tftp}/@t{http}/@t{ftp} server where
@t{dot-config} files for your switches are stored and fetched on boot time or
......@@ -1821,6 +1820,7 @@ permanently store it in the flash (for details, please check the
configuration options @t{CONFIG_PTP_*} in the
@ref{Configuration Items that Apply at Run Time}).
In the @i{PPSi} config file, for every VLAN-enabled port you should add
the following line:
@example
......@@ -1831,16 +1831,26 @@ where @i{VID} is a VLAN ID configured on the port.
For an example configuration please see
@ref{Example VLAN configuration by tools}).
From the firmware v5.0, configuration of VLANs via the @t{dot-config} file was
possible with some limitations/simplifications which made the life of the user easier
but prevented some exotic VLAN configurations. From the firmware v6.0, all
possible configuration can be set via dot-config. By default, the more
user-friendly configuration is used (similar to the one in v5.0). To have
full control over VLAN configuratin, "raw ports configuration" must be enabled.
Another alternative working on pre-v5.0 to set VLANs is to use the web
interface. However, as it is in v5.0, the web-interface is not capable to store
VLANs configuration into a @t{dot-config}.
@c =-------------------------------------------------------------------------
@node Example VLAN configuration
@subsection Example VLAN configuration
This section describes how to configure VLANs on a switch using the
@t{dot-config} and available command line tools.
An example configuration of VLANs for ports (@t{wri}) 1-3 is provided in
@ref{Example VLAN configuration by dot-config}.
The description assumes, that switch has only these 3 ports.
The description assumes that switch has only these 3 ports.
In this configuration, port 1 is synchronised to an upstream WR device. This
device does not need to have any VLAN configuration. Port 1 is in @t{ACCESS} mode,
......@@ -1872,8 +1882,17 @@ frames with VID=2 are forwarded to PTP daemon and to port 3.
@subsubsection Example VLAN configuration by dot-config
To configure the switch in the way descibed in the
@ref{Example VLAN configuration}, the @t{dot-config} has to contain the
following config options:
@ref{Example VLAN configuration}, the @i{wrs_menuconfig} tool should
be used to generate the @t{dot-config} file. In the @i{wrs_menuconfig} tool,
VLANs needs to be enabled in the VLANs submenu. Then, the Ports and VLANs
configurations need to be filled in properly, as can be seen in the figure
below.
@center @image{Example_VLAN_config, 16cm,, Example_VLAN_config}
Such generated @t{dot-config} file will contain the following config options
(and much more, of course):
@smallexample
PTP_OPT_EXT_PORT_CONFIG_ENABLED=yes
......@@ -1927,13 +1946,17 @@ CONFIG_VLANS_VLAN0001="fid=1,prio=4,drop=n,ports=1"
CONFIG_VLANS_VLAN0002="fid=2,prio=4,drop=n,ports=2;3"
@end smallexample
NOTE: It is highly discouraged to modify the @t{dot-config} file by hand.
It is very error-prone.
@c =-------------------------------------------------------------------------
@node Example VLAN configuration by tools
@subsubsection Example VLAN configuration by tools
To configure the switch in the way described in the
@ref{Example VLAN configuration}, using the command line tools please perform
the following actions:
@ref{Example VLAN configuration}, using the @i{wrs_vlans} command line tool
and custom @t{ppsi.conf} file, please perform the following actions:
Clear the current configuration:
@smallexample
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment