vLan how do you do it?

Zorin is the first distro that I feel like moving away from windows. I simply love it, and want to change the whole organization to it, because I feel this really makes it easier for users that are not familiar with Linux (like me), be more familiar with the OS.

However, after a month trying, I cannot figure out how to setup network to access the vlan. The main network works just fine, but I need to actually be in the vlan.

With Debian and other distros, I can simply go into connections, go to the VLAN tab, and add the VLAN number, then manually input the ipv4 tab ip address. But I cannot figure out what to do with Zorin. Searched the forums and google, still no luck... its been a month trying.

Could anyone help please?

Thanks!!

Hi and welcome to the forum.
There is not many posts re VLAN here on t.he Zorin forum, but you can extend websearch using Ubuntu 22.04 on which Z17 is based. e.g. search "VLAN Ubuntu 22.04"

You will find this and more:

https://wiki.ubuntu.com/vlan

Thank you. I did find this online, but my knowledge on Linux does not allow me to understand or apply that. On the other distros I tried, you can do this on the graphical interface and honestly, I have no idea how to to make this work. I did follow the below, but it does not work. I guess my system has a different names for 8021q or eth1.10, etc... anyway. Hopefully graphical configuration will come one day. For now, I will keep enjoying Zorin personally only.

Installation

sudo apt-get install vlan

Configuration

  1. Load the 8021q module into the kernel.

sudo modprobe 8021q

  1. Create a new interface that is a member of a specific VLAN, VLAN id 10 is used in this example. Keep in mind you can only use physical interfaces as a base, creating VLAN's on virtual interfaces (i.e. eth0:1) will not work. We use the physical interface eth1 in this example. This command will add an additional interface next to the interfaces which have been configured already, so your existing configuration of eth1 will not be affected.

sudo vconfig add eth1 10

vconfig is deprecated and might be removed in the future, please migrate to ip(route2) as soon as possible! The ip(route2) replacement command is:

sudo ip link add link eth1 name eth1.10 type vlan id 10

  1. Assign an address to the new interface.

sudo ip addr add 10.0.0.1/24 dev eth1.10

  1. Starting the new interface.

sudo ip link set up eth1.10

Making it permanent

To make this setup permanent, the following lines have to be added a couple of configuration files.

  1. Add the module to the kernel on boot:

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

  1. Create the interface and make it available when the system boots. Add the following lines to /etc/network/interfaces (change the values according to your scenario):

auto eth1.10 iface eth1.10 inet static address 10.0.0.1 netmask 255.255.255.0 vlan-raw-device eth1

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.