Skip to content

Commit

Permalink
docs: fixed typos, added example for reactivation
Browse files Browse the repository at this point in the history
  • Loading branch information
fdizazzo committed Nov 7, 2023
1 parent b51dbdb commit 0f6af3d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions docs/gateway-configuration/vlan-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ For devices configured to use [NetworkManager](https://networkmanager.dev), it i
A VLAN, or Virtual Local Area Network, is a network segmentation technology that allows a single physical network to be logically divided into multiple isolated networks. These virtual networks operate as if they are independent, even though they share the same physical infrastructure.
This is achieved via a VLAN ID, or VLAN tag, a numerical label added to network frames to identify the specific Virtual Local Area Network (VLAN) to which they belong. It's a critical component in VLAN technology, allowing network switches and routers to differentiate and route traffic within a VLAN. VLAN tags are added to the Ethernet frame's header, indicating which virtual network a data packet should be directed to when it traverses the physical network infrastructure. Therefore, VLANs must also be supported and configured on the network equipment a device is connected to.

A VLAN can be named freely, as long as it's 15 or less characters. A typical VLAN naming format is '<physicalInterfaceName>.<vlanId>' (eg. a vlan with id 100 on the interface eth0 would be named eth0.100).
A VLAN can be named freely, as long as it's 15 or less characters. A typical VLAN naming format is `physicalInterfaceName`.`vlanId` (eg. a vlan with id 100 on the interface eth0 would be named eth0.100).

This is achieved by NetworkManager by creating a virtual device bound to the underlying physical interface when Kura sets up a new VLAN connection.

Expand All @@ -15,9 +15,9 @@ Currently, VLAN configuration is supported via uploading snapshot.xml fragments.
!!! warning
When creating a new VLAN be sure to include the net.interfaces parameter, containing both the previously existing network interface and the name of the new vlan to be created.

### Basic VLAN configuration
### Basic VLAN configuration example

The following example creates a VLAN with ID 40 over the ethernet interface ens33, using a predefined IP address, enabled for LAN.
The following example creates a VLAN with ID 40 over the ethernet interface ens33, naming it `ens33.40`, using a predefined IP address, enabled for LAN.

```xml
<?xml version="1.0" encoding="UTF-8"?><esf:configurations xmlns:esf="http://eurotech.com/esf/2.0" xmlns:ocd="http://www.osgi.org/xmlns/metatype/v1.2.0">
Expand Down Expand Up @@ -58,9 +58,9 @@ The following example creates a VLAN with ID 40 over the ethernet interface ens3
</esf:configurations>
```

### Complete VLAN configuration
### Complete VLAN configuration example

The following example creates a VLAN with ID 41 over the ethernet interface ens33, using a predefined IP address, enabled for LAN.
The following example creates a VLAN with ID 41 over the ethernet interface ens33, naming it `ens33.41`, using a predefined IP address, enabled for WAN.
This example also sets the 'flags' and 'traffic priority' optional parameters as described in [Network Manager API documentation](https://networkmanager.dev/docs/api/latest/settings-vlan.html)

```xml
Expand Down Expand Up @@ -123,4 +123,18 @@ Once a VLAN is created it can be managed via the Kura UI just like an Ethernet i
![VLAN UI management](./images/vlan-example.png)

!!! warning
Setting a VLAN status to Disabled deletes it in NetworkManager and no longer visible on the UI all the configurations are left in Kura. In can be restored by setting the `net.interface.<interface>.config.ip4.status` to `netIPv4StatusEnabledLAN` via snapshot upload, then resume configuration via UI.
Setting a VLAN status to Disabled deletes its configuration in NetworkManager and is no longer visible on the UI but all the configurations are left in Kura. In can be restored by setting the `net.interface.<interface>.config.ip4.status` to `netIPv4StatusEnabledLAN` or `netIPv4StatusEnabledWAN` via snapshot upload, then resume configuration via UI.

As an example, the configuration to reactivate a disabled VLAN named ens33.40 would be as follows:

```xml
<?xml version="1.0" encoding="UTF-8"?><esf:configurations xmlns:esf="http://eurotech.com/esf/2.0" xmlns:ocd="http://www.osgi.org/xmlns/metatype/v1.2.0">
<esf:configuration pid="org.eclipse.kura.net.admin.NetworkConfigurationService">
<esf:properties>
<esf:property array="false" encrypted="false" name="net.interface.ens33.40.config.ip4.status" type="String">
<esf:value>netIPv4StatusEnabledLAN</esf:value>
</esf:property>
</esf:properties>
</esf:configuration>
</esf:configurations>
```

0 comments on commit 0f6af3d

Please sign in to comment.