vlan howto

Yes, just try on the web interface. The web interface does not commit changes to the /etc/network/interfaces file immediately. Instead it writes to file /etc/network/interfaces.new, which gets only activated when you reboot.

The web interface can also display the difference of those two files, so you can see what changed. And sure, you can also discard changes made.
 
Yes, just try on the web interface. The web interface does not commit changes to the /etc/network/interfaces file immediately. Instead it writes to file /etc/network/interfaces.new, which gets only activated when you reboot.

The web interface can also display the difference of those two files, so you can see what changed. And sure, you can also discard changes made.


No, sorry.
It works only if i create first the interface with
vconfig add eth0 51

My question was about another way: the interface.

I though that it was possible to create the interface itself via
interface.

In any case, OK, creating first the interface, it works.

But if you're interested take a look at my post where i said
about Create vlan...

I think that this can be more useful.

Diaolin
 
the truth...

No, sorry.
It works only if i create first the interface with
vconfig add eth0 51

The truth is that the interface let me add the vlan only
if the module 8021q were properly loaded.

If not, the interface says "cannot add interface ....."
please change the message (if possible) in
"Cannot add interface, you should load 8021q module)

Anyway tx. proxmox is a great work.

Diaolin
 
pveversion -v
pve-manager: 1.0-9 (pve-manager/1.0/3461)
qemu-server: 1.0-5
pve-kernel: 2.6.24-4
pve-kvm: 75-1
pve-firmware: 1
vncterm: 0.9-1
vzctl: 3.0.22-14
vzdump: 1.1-1
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1dso1
 
pveversion -v
pve-manager: 1.0-9 (pve-manager/1.0/3461)

please update to 1.0-10

vzctl: 3.0.22-14

Whats this? We use vzctl_3.0.22-3pve3_amd64.deb instead. Please update, else you do not get full functionallity (i.e. logging init output will not work)
 
The truth is that the interface let me add the vlan only
if the module 8021q were properly loaded.

If not, the interface says "cannot add interface ....."
please change the message (if possible) in
"Cannot add interface, you should load 8021q module)

Please try to use the following syntax (instead of vlan1):
Code:
iface eth0.1 inet static
  address 192.168.1.1
  netmask 255.255.255.0

I guess there is a bug in the vlan package which prevents automatic module loading in your case.
 
vlan

Please try to use the following syntax (instead of vlan1):
Code:
iface eth0.1 inet static
  address 192.168.1.1
  netmask 255.255.255.0
I guess there is a bug in the vlan package which prevents automatic module loading in your case.

Seen, you use the name-type DEV_PLUS_VID_NO_PAD, ok no problem.

In any case, i've written the 8021q into /etc/modules and it works ok

Diaolin
 
Hi all,

I'm new to proxmox and this is my first post in this forum. I'm trying to setup a new installation of linux guest. What I want to achieve is the following:

Let's say that vmbr1 has as a bridged port eth0.6 (vlan 6), and vmbr2 has a bridged port eth0.4 (vlan 4). vmbr1 and vmbr2 have no ip address associated.

Is it possible, to create a guest machine linked for example to vmbr1 and assign the IP address into the internal guest ethernet? (so it belongs to the vlan 6 network)

My goal is to have as many bridges as vlans so I can create a guest machine on any vlan on my network without to much effort

How would I do that?

Regards
 
Hi all,

...
Is it possible, to create a guest machine linked for example to vmbr1 and assign the IP address into the internal guest ethernet? (so it belongs to the vlan 6 network)
...
Regards

Hi,
just use no ip-address in the vlans. So, the client use an address in that network, and all is fine.

As example /etc/network/interface:
Code:
auto eth0
iface eth0 inet static
    address  0.0.0.0
    netmask  0.0.0.0

auto eth0.199
iface eth0.199 inet static
    address  0.0.0.0
    netmask  0.0.0.0

auto eth0.20
iface eth0.20 inet static
    address  0.0.0.0
    netmask  0.0.0.0

auto eth0.90
iface eth0.90 inet static
    address  0.0.0.0
    netmask  0.0.0.0

auto vmbr0
iface vmbr0 inet static
    address  172.x.x.xx
    netmask  255.255.255.0
    gateway  172.x.x.xx
    bridge_ports eth0.20
    bridge_stp off
    bridge_fd 0

auto vmbr1
iface vmbr1 inet manual
    bridge_ports eth0.90
    bridge_stp off
    bridge_fd 0

auto vmbr2
iface vmbr2 inet manual
    bridge_ports eth0.199
    bridge_stp off
    bridge_fd 0

Udo
 
Are there any plans to enable this sort of functionality in the web interface?

From an ISP point of view this is a killer feature...

Essentially you could setup a load of proxmox servers - each proxmox host having a 0-4096 vlans assigned to it.

Each client could then effectively have their own vlan tag that is used to limit what they can see on the network. Makes everything much more secure :)
 
you can configure vlan on the web gui already, what do you miss in detail?
 
Well...

I get the fact that you can bridge devices to vlan interfaces...

e.g. br1 => bridge too => eth0.10

But.. from what I can see, I have to enable the vlans by manually editing /etc/sysconfig/network ? (or have I missed something)

Just seems to me... that we should be able to assign vlans on the fly without rebooting etc.. All from the interface?

Rob
 
you can use the GUI, but a reboot is necessary.
 
Ok...

so to clarify...

if we create a new bridge port...

assign eth0.10 to br1... on the reboot it will create the vlan?

Rob
 
yes. any change on the host network writes a temporary file. a reboot of the host activates it.

you can see the change in the gui, just try it with no risk - you can also discard the changes if you do not want to activate them via reboot.
 
you can use the GUI, but a reboot is necessary.

Is the reboot really necessary?

What I tried was to manually create the VLAN 100 interface and bridge:

1. vconfig add eth0 100
2. ifconfig eth0.100 up
3. brctl addbr vmbr1
4. brctl addif vmbr1 eth0.100
5. (vi /etc/network/interfaces):
auto vmbr1
iface vmbr1 inet manual
bridge_ports eth0.100
bridge_stp off
bridge_fd 0
6. ifconfig vmbr1 up

It looks ok. The /proc/net/vlan/config and /proc/net/vlan/eth0.100 looks normal.

When you have a cluster of Hardware Nodes, packed with OpenVZ VE's and want to add another VLAN, reboot of all of host machines is the thing I really would like to avoid :)

Best regards,
Marcin
 
Last edited:
Hello,

I take it you also duplicated the configuration via the proxmox interface to ensure it worked after reboot?

Rob
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!