VLAN Configuration
PLCnext Engineer allows you to configure network devices and ports for the use with VLANs (Virtual Local Area Networks). A VLAN is a group of participants in a large network that form a separate network in a logic manner. This means that several logic groups can be created on a large physical network. A VLAN has an own broadcast domain. Data packets are only transmitted within a VLAN. The participants may physically be far away from each other but have to be on one and the same physical network.
Splitting the network into sets of several VLANs is done using switches. The configuration of the switch specifies which of its ports are a member of the respective VLAN. Each port on the switch is assigned to a specific VLAN. Each VLAN is identified by a unique ID that represents the particular VLAN (the VLAN ID has a range from 1 to 4094).
The VLAN configuration of the network devices and ports is done in the 'VLAN Configurator'. The 'VLAN Configurator' is a subeditor of the 'Physical Topology' editor and only visible in the 'VLAN' view.
Note
The 'VLAN' view and the 'VLAN Configurator ' are not synchronized. This means, VLAN devices and their ports found in the network during a network scan and thus displayed in the 'VLAN' view are not automatically added to the 'VLAN Configurator'. |
Note
Any operation you perform in the 'VLAN Configurator' is validated. In case of an invalid operation, the affected object (device, port, etc.) is marked accordingly. The tooltip on the x symbol (appears in the first table cell of the affected object) gives you information on the error. |
This topic contains the following sections:
- Creating VLANs
- Adding devices to a VLAN and configuring the devices
- Adding ports to the VLAN devices and configuring the VLANs on the port(s)
- Writing the VLAN configuration to one or several devices
Creating VLANs
To create a new VLAN using the 'VLAN Configurator', proceed as follows:
- Open the 'Physical Topology' editor by double-clicking the 'Project' node in the PLANT and activating the 'Physical Topology' tab in the 'Project' editor group in the editors area.
- Select 'VLAN' from the list box at the top left of the 'Physical Topology' editor to switch to the 'VLAN' view. The 'VLAN Configurator' is automatically opened on the right in the view.
- In the 'VLAN Configurator', enter a VLAN ID in the 'Enter new VLAN ID here' field (valid range: 2 to 4094; VLAN 1 is created by default and reserved for the default VLAN) and press <Enter>.
Repeat this step for any VLAN you want to create.
- Optional: Enter an alphanumeric name associated with the VLAN you want to create in the 'VLAN name' field (below the VLAN ID) and press <Enter>.
To remove a VLAN from the current configuration, right-click in the column of the respective VLAN and select 'Remove selected VLAN' from the context menu. (VLAN 1 cannot be deleted.) To delete all VLAN IDs (except VLAN 1), device and port configurations from the 'VLAN Configurator', click the toolbar button.
Adding devices to a VLAN and configuring the devices
There are several ways to add devices to the VLAN configuration and configure them. You can add and configure devices directly in the 'VLAN Configurator' or via the 'VLAN' view.
Adding and configuring devices directly in the 'VLAN Configurator'
- In the 'VLAN Configurator', enter the IP address of the network device in the 'Enter new device here' field and press <Enter>.
- Left-click the 'VLAN mode' field for the added device and choose the VLAN mode from the drop-down list. The modes are:
- Tagged - In 'Tagged' mode, the device forwards the data packets based on the VLAN assignment. Incoming packets are received according to the specified VLAN rules. A VLAN tag is added, if required and the packet is then processed by the device and the management level according to the information in the tag.
- Transparent - In 'Transparent' mode, the VLAN tags are ignored and transparently forwarded, no VLANs can be configured. Neither the structure nor the contents of the data packets are changed. The information about the VLAN assignment from a tag that may be contained in the data packet is ignored.If 'Transparent' mode is selected, all other device settings and port settings (see below) are read-only.
- Unknown - Select this mode for network devices for which it is unknown whether the device supports the VLAN functionality.
Note
The VLAN mode ('Tagged' or 'Transparent') is activated on the device when writing the VLAN configuration to the device (see the description below). In 'Transparent' mode, there are no changes made to the device when writing the VLAN configuration. - For each device, specify whether the device is a member of the configured VLAN(s). In the VLAN ID column of the device, left-click the membership field and choose 'Member' from the drop-down list. To unassign the device from the VLAN, select 'Not Member'.
To delete a device in the current configuration, right-click the device row and select 'Delete' from the context menu or press <Del>. To delete several devices, press the <Shift> or <Ctrl> key, left-click the first cell in the device rows and press <Del>. To delete all VLAN IDs (except VLAN 1), device and port configurations from the 'VLAN Configurator', click the toolbar button.
Adding and configuring devices via the 'VLAN' view
- In the 'VLAN' view, select the device(s) to be added to the 'VLAN Configurator' and choose the command 'Add device(s) to VLAN Configurator' from the context menu of the device(s). For any selected device, a new row is added to the 'VLAN Configurator' with the IP address of the device(s) entered in the 'Name' column.With the context menu command 'Go to VLAN Configurator' of the device you have added you can jump to the device configuration in the 'VLAN Configurator'.
- In the 'VLAN' view, right-click the device(s) you have previously added and choose 'Set VLAN mode for device(s) > VLAN mode' from the devices' context menu to configure the VLAN mode. For a description of the possible VLAN modes, see the procedure above.
- For each device, specify whether the device is a member of the configured VLAN(s). In the 'VLAN' view, right-click the device(s) you have previously added and choose 'Add object(s) to VLAN > VLAN ID' from the devices' context menu (the submenu contains the VLAN IDs for which the membership is set to 'Not Member'). In the 'VLAN Configurator', the membership field is set to 'Member' for all selected devices in the chosen VLAN (see above). To unassign one or several device(s) from a specific VLAN, choose 'Remove object(s) from VLAN > VLAN ID' from the devices' context menu (the submenu contains the VLAN IDs for which the membership is set to 'Member').
To delete one or several devices in the current VLAN configuration, right-click the device(s) in the 'VLAN' view and select 'Remove device(s) from VLAN Configurator'.
Adding ports to the VLAN devices and configuring the VLANs on the port(s)
There are several ways to add device ports to the VLAN configuration and configure them. You can add and configure device ports either directly in the 'VLAN Configurator' or via the 'VLAN' view.
Observe the following notes when configuring device ports:
- The port number must be unique for a device.
- The PVID (Port VLAN Identifier) of the port must be set to an ID of a VLAN of which the port is a 'Tagged' or 'Untagged' member.
- The device must be a member of the VLAN of which the port is a 'Tagged' or 'Untagged' member.
- The port number cannot be edited once confirmed. You can only delete the port and add a new port.
- The port settings cannot be configured if the VLAN mode 'Transparent' is set for the device (see above).
Adding and configuring device ports directly in the 'VLAN Configurator'
- In the 'VLAN Configurator', click the right arrow preceding the networks' IP address to show the ports assigned to the device. Enter the port number in the 'Enter new port here' field and press <Enter> (valid range: 1 to 999999). The port is added and both rows (device and port) are marked red (invalid configuration). To create a valid configuration, see the rules listed above and the following step.
- For each port, set the following values in the corresponding fields:
Property Description PVID The PVID represents the VLAN assignment of the port. Possible values are 1 to 4094. By default, the PVID is 1 for a new port.
Observe the rules listed above when specifying the port number.Valid and invalid configuration examples
Priority The VLAN priority of the port. Possible values are 0 to 7. The value 0 (default value) is the lowest priority and 7 indicates the highest priority. Membership The membership defines whether the port is a 'Tagged' or 'Untagged' member of the VLAN. With the setting 'Off', the port is excluded from the VLAN.
To delete a device port in the current configuration, right-click the port row and select 'Delete' from the context menu or press <Del>. To delete several ports, press the <Shift> or <Ctrl> key, left-click the first cell in the port rows and press <Del>. To delete all VLAN IDs (except VLAN 1), device and port configurations from the 'VLAN Configurator', click the toolbar button.
Adding and configuring device ports via the 'VLAN' view
You can add and configure device ports via the 'VLAN' view using the following commands. The commands are active when you select one or several device ports in the view.
Command | Description |
---|---|
Add object(s) to VLAN > VLAN ID | Adds the selected port(s) as 'Tagged' or 'Untagged' member(s) to the VLAN with the ID selected from the submenu. Ports connecting two switches or routers are added as 'Tagged' members. Other ports are added as 'Untagged' members. |
Set VLAN for port(s) exclusive | Configures the selected port as 'Tagged' or 'Untagged' member in the VLAN with the ID selected from the submenu. Ports connecting two switches or routers are added as 'Tagged' members. Other ports are added as 'Untagged' members. For all other VLANs the port membership is set to 'Off' (port is excluded from the VLAN). The PVID of the port is set to the selected VLAN ID. |
Add port(s) as tagged to VLAN | Adds the selected port(s) as 'Tagged' member(s) to the VLAN with the ID selected from the submenu. |
Add port(s) as untagged to VLAN | Adds the selected port(s) as 'Untagged' member(s) to the VLAN with the ID selected from the submenu. |
Remove object(s) from VLAN | Removes (excludes) the selected port(s) from the VLAN with the ID selected from the submenu. The port membership is set to 'Off'. |
Set PVID for port(s) | Sets the PVID of the port to the VLAN ID selected from the submenu. |
Go to VLAN Configurator | Jump to the port configuration in the 'VLAN Configurator'. |
Writing the VLAN configuration to one or several devices
The VLAN configuration can be written to the devices listed in the 'VLAN Configurator'. You can either write the configuration to a specific device or to all devices. The device(s) and the computer running PLCnext Engineer must be connected to the same network to perform the write operation. If the write operation fails for some reason (for example, the VLAN IDs on the device could not be synchronized), the operation is aborted and a corresponding message is reported in the 'Online Log' in the MESSAGES window.
During the write operation, the current VLAN configuration is read from the network device(s) and compared with the VLAN configuration in your project. If the number of ports is different, a dialog appears in which you must confirm to continue the operation. The dialog lists all unconfigured ports (on network device and project device). If you continue the operation, all unconfigured ports are removed from the VLANs.
Note
The VLAN mode ('Tagged' or 'Transparent') is activated on the device when writing the VLAN configuration to the device. In 'Transparent' mode, there are no changes made to the device when writing the VLAN configuration. |
To write the VLAN configuration to the device(s) click the following buttons in the toolbar. The buttons are only active if the VLAN configuration is valid.