Jump to content

VLAN Setup step by step


Gerald

Recommended Posts

I am trying to setup my Odroid-XU4 with Armbian 20.05.2 booting from MMC and no SDCard in slot. It took me a while but finally I found what I needed.
Next I've installed OpenMediaVault using armbian-config, that worked well.
Within OMV I've tried to setup VLANs which I could define but they didn't work, so I had to take a deeper look into it.
 

I've found that the interface name needed to be reverted back to eth0 since the new naming convention enx<MAC-address without ":"> uses the max available number of characters already:
In my case "enx001e06320261" , so if you add a vlan "enx001e06320261.1" the name is to long, it will not start.
This could be solved by reverting back to the old behaviour by adding
extraargs = "net.ifnames = 0 biosdevname = 0" above "# final boot args"
in "/boot/boot.ini" and did a
"update-initramfs -u" afterwards.

 

That worked well, after purging and reinstalling OMV it was no longer bound to the enx<MAC> naming convention and was finally using the new name eth0 instead.
After that I've added 4 additional VLANs by editing /etc/network but using the Web-GUI from OMV worked now as well to do that.

 

The Problem now, to bring them up with "systemctl start networking" I had to modify the line:
from: "ExecStart=/sbin/ifup -a --read-environment"
to: "ExecStart=/sbin/ifup -a --ignore-errors --read-environment"

in: networking.service

This doesn't eliminate the error: "Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config"
but at least brings the service up.


Does anyone have an idea how to get around that issue or do it some other way right?

Thanks, Gerald

Link to comment
Share on other sites

You need to do a bit more...

 

sudo apt-get install vlan

load kernel module

sudo modprobe 8021q

Create a new interface that is a member of a specific VLAN, VLAN id 100

 

Use the physical interface eth0 in this example. This command will add an additional interface next to the interfaces which have been configured already

sudo vconfig add eth0 100

Assign an address to the new interface.

sudo ip addr add 10.0.0.1/24 dev eth0.100

To make this setup permanent. Add the module to the kernel on boot

sudo su -c 'echo "8021q" >> /etc/modules'

Create the interface and make it available when the system boots. Add the following lines to /etc/network/interfaces

auto eth0.100 iface eth0.100 inet dhcp vlan-raw-device eth0

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines