I need help getting tagged VLAN working on SwitchBlox Industrial

– Copied from customer email –

Can you please help me to configure the industrial switch for VLAN.

Please find attached a diagram of the network we are trying to make. If it is not enough or unclear, let me know.

Assuming you’re using ARIES, here are the relevant settings on the VLAN > Tag Based VLAN tab.

VLAN Classification
Select "Enable Tag-Based VLAN”

VLAN Port Classification
Select “Use PVID to classify VLAN” for ports 2-4.
Select “Use VID to classify VLAN” for port 1

Default VLAN info
Set port 2 to have “1” (PVID value).

Set port 3 to have “2” (PVID value).
Set port 4 to have “3” (PVID value).

VLAN tag control
Set Port 1 to add the tag.
Set Port 2-4 to remove the tag

VLAN table

Reset the VLAN table. Set “VID0” to have ports 1, 2 as members. Set “VID1” to have ports 1, 3 as members. Set “VID2” to have ports 1, 4 as members.

Also, I noticed that you configured a VLAN group with VID = 1. VID=1 is the default PVID used in almost all switch chips and is generally not recommended to use as a configurable VLAN. I’ve done the register settings above with VID = 1 as in your diagram but I would recommend using VID=2, VID=3, VID=4 for ports 2, 3 and 4 respectively.

Thank you for the configuration and the advice about VID = 1, I have made an adjustment into diagram.

However, after trying and changing settings it did not work out for me. To make sure I have a connection, if I turn on the flooding, it is working.

Can you please take a look at the configurations. Should the VID in the VLAN Table match the VLAN ID exactly or is it VLAN ID -1?

Please find attached new diagram, configuration, host (ubuntu netplan config) and dev1 (windows ip config, vlan is not set).
image



image

No problem it’s a good question.

So the VID in the VLAN table are ordinal, i.e. VID0=first configurable VLAN, VID1= second, etc in order of VID size - up to a maximum number of 16 configurable VLANs. For example, for your setup, the first VLAN has ID=2, hence that is VID0 in the table. ID=3 is VID1, etc.

To summarise, try:

VID0: ports 1, 2

VID1: ports 1, 3

VID2: ports 1, 4

In the VLAN table.

I appreciate this may be confusing as it isn’t mentioned in the GUI. I’ll look into how I can we make this clearer.

Tried with new VLAN table, still no result. If I turn off Enable Tag-Based VLAN or turn on Uknown VID Mode, then it is working. But I think flooding is not an option.

Just to check, did you erase the existing firmware before flashing the new configuration?

You can also use Raw Reg Access tab to print register values for me to inspect. If you get a printout of the current values, send them to me to check

Another thing are pcap files taken from network captures on your ethernet interfaces on your host and devX devices. Is it possible for you to provide those? You’ll be able to see whether frames are tagged with 801.2Q tags. Wireshark is a good place to start if you haven’t done network captures on your devices.

I never erased/upload firmware, what I do is:

Connect serial and power to the switch (out of the box)
Open tab VLAN > Tagged Based VLAN
Setup configuration as on the image provided before
Press Write VLAN Config

I can read Raw Reg Access, can you please specify which parameters to put for it?

Apologies when I said “erased firmware”, I meant to say “erased EEPROM”. The EEPROM is used for storing configurations you want to be non-volatile.

In this case, the PHY and REG to read are as follows:

PHY, REG

23, 1 - VLAN group control register

23, 7 - port 1 PVID

23, 8 - port 2 PVID

23, 9 - port 3 PVID

23, 11 - port 4 PVID

23, 12 - port 5 PVID

23, 13 - VLAN add tag

23, 14 - VLAN remove tag

24, 0 - VLAN valid entries

24, 1 - VID0

24, 2 - VID1

24, 3 - VID2

24, 17 - VLAN member of VID0 and VID1

24, 18 - VLAN member of VID2 and VID3

If you could send me those values after both a power cycle and writing the VLAN configuration as you currently have it, that would be great.

I have never stored EEPROM and it is all zero if I read it.

After power cycle and writing config, these are the values:

PHY, REG
23, 1 - VLAN group control register = 22748
23, 7 - port 1 PVID = 1
23, 8 - port 2 PVID = 2
23, 9 - port 3 PVID = 3
23, 11 - port 4 PVID = 4
23, 12 - port 5 PVID = 1
23, 13 - VLAN add tag = 4
23, 14 - VLAN remove tag = 88

24, 0 - VLAN valid entries = 0
24, 1 - VID0 = 1
24, 2 - VID1 = 2
24, 3 - VID2 = 3
24, 17 - VLAN member of VID0 and VID1 = 5132
24, 18 - VLAN member of VID2 and VID3 = 68

I think I know the issue.

You’ll see that in ‘Raw Reg Access’, you can write back the same configuration manually. In this case I’d like you to write back the same values you sent me with the following changes:

24, 0 - VLAN valid entries = 7 (decimal)

24, 1 - VID0 = 2

24, 2 - VID1 = 3

24, 3 - VID2 = 4

One thing I forgot to ask earlier, when writing the VLAN configuration, did you click “Set VLAN Table” as well as “Write VLAN Config” after setting the values in the GUI?

I have written the changes you proposed, and it has started to work as expected. Will keep testing …

Before when booting the switch and going to VLAN settings, I only press Reset VLAN Table (to clear table from green to grey), setup configuration as on the image and after that press Write VLAN Config.
So what should be the procedure not to manually write Raw Access Memory?

Also, how can I save my current configuration to EEPROM so I don’t need to configure it every boot?

Please follow the example below which explains how to capture the specific commands sent, and then send them to the EEPROM on SwitchBlox Industrial so they will run at bootup automatically.

Essentially, you first click “record user input for EEPROM”, then you go and do the specific configurations you need in VLAN. Those configurations are captured in the ARIES software, and then you write them to the EEPROM on SwitchBlox Industrial.

Welcome. I realise the documentation on setting VLANs isn’t present in our notion page, so we’ve now added that, see the link below.

I have tried to Record User Input:

Turn On Record in EEPROM tab
Apply VLAN Config
Write Raw Reg Access values

Please find recorded values below. However , it is more than can be saved. Is there is a way to save these config on EEPROM?

1 17 00 00 00
2 17 01 DC 58
3 17 02 DC 04
4 17 07 01 00
5 17 08 02 00
6 17 09 03 00
7 17 0B 04 00
8 17 0C 01 00
9 17 0D 04 00
10 17 0E 58 00
11 18 11 0C 14
12 18 12 44 00
13 18 13 00 00
14 18 14 00 00
15 18 15 00 00
16 18 16 00 00
17 18 17 00 00
18 18 18 00 00
19 18 00 07 00
20 18 01 02 00
21 18 02 03 00
22 18 03 04 00

Yes I believe you can shorten it.

Try:

17 01 DC 58
17 02 DC 04
17 08 02 00
17 09 03 00
17 0B 04 00
17 0D 04 00
17 0E 58 00
18 11 0C 14
18 12 44 00
18 00 07 00
18 01 02 00
18 02 03 00
18 03 04 00

The other values can rely on the existing defaults within the chip.

Unfortunately, I cannot modify or edit “EEPROM Configuration to write” table. Is there is a way to do it?

Go to the “Raw Reg Access” tab and you can write each of those values, one by one. The values Aaron sent are in Hexadecimal format, so make sure you select that in “Display Format”.

I got this. However, are you planning to make a feature to upload config file or make this table editable? Imagine I have many switches and all need to be configured.

Ah I see. Yeah that’s currently not possible and I can see that’s going to be a pain for bulk uploads. That’s a very easy software change, I’ll push that through this weekend and come back with an updated ARIES executable.

We’ve now added the ability to modify the “EEPROM to write” directly, and released a new version of ARIES which can be downloaded in the link below.

To use this feature, follow the steps below.

  1. Open ARIES and navigate to the EEPROM tab. Click “Record input for EEPROM”

  1. Go to the other tabs to perform the writes needed to configure the switch as required. Then go back to the EEPROM tab to view the captured configuration commands.

  1. Click “Hide tables” to display the raw commands that are to be sent. Right click the box and click “Copy Data”

  1. Click “Manual EEPROM Control”. A pink box will appear that can be edited.

  2. Right-click in the pink box and click “Paste Data” to paste the commands you just copied.

  1. Now click “Write to EEPROM” as before.

You can repeat from step 5 onwards to quickly program other boards in succession.