VLANs inside VE

Probably because I'm using Cent instead of Debian.

VM131 root:/# ifconfig
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
vmbr0 Link encap:Ethernet HWaddr 00:23:54:C1:53:FA
inet addr:10.1.5.7 Bcast:10.1.5.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
VM131 root:/#


10.1.5.7 is my host's IP address.

When I make a Debian 5 VE, there's no interfaces at all (other than loopback).
 
[root@ntop network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:18:51:12:17:40
inet addr:10.1.5.131 Bcast:10.1.5.255 Mask:255.255.255.0
inet6 addr: fe80::218:51ff:fe12:1740/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3614 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:205086 (200.2 KiB) TX bytes:552 (552.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

[root@ntop network-scripts]# ifup eth0.2
Device eth0.2 does not seem to be present, delaying initialization.
[root@ntop network-scripts]# ifup vlan2
Device vlan2 does not seem to be present, delaying initialization.
[root@ntop network-scripts]# ls -al ifcfg*
-rw-r--r-- 1 root root 203 Sep 20 02:59 ifcfg-eth0
-rw-r--r-- 1 root root 108 Sep 20 03:02 ifcfg-eth0.2
-rw-r--r-- 1 root root 254 Sep 24 2008 ifcfg-lo
-rw-r--r-- 1 root root 156 Sep 20 02:59 ifcfg-vlan2

I have both vlan methods because the first attempt didn't work.
 
It is still not clear what you are trying to do. Please try to formulate the problem exactly, post your network configs and the error messages you get.
 
It is still not clear what you are trying to do. Please try to formulate the problem exactly, post your network configs and the error messages you get.

*sigh*

[root@ntop network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:18:51:12:17:40
inet addr:10.1.5.131 Bcast:10.1.5.255 Mask:255.255.255.0
inet6 addr: fe80::218:51ff:fe12:1740/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3614 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:205086 (200.2 KiB) TX bytes:552 (552.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

[root@ntop network-scripts]# ifup eth0.2
Device eth0.2 does not seem to be present, delaying initialization.
[root@ntop network-scripts]# ifup vlan2
Device vlan2 does not seem to be present, delaying initialization.

[root@ntop network-scripts]# ls -al ifcfg*
-rw-r--r-- 1 root root 203 Sep 20 02:59 ifcfg-eth0
-rw-r--r-- 1 root root 108 Sep 20 03:02 ifcfg-eth0.2
-rw-r--r-- 1 root root 254 Sep 24 2008 ifcfg-lo
-rw-r--r-- 1 root root 156 Sep 20 02:59 ifcfg-vlan2

I have both vlan methods because the first attempt didn't work.

[root@ntop network-scripts]# cat ifcfg-eth0
DEVICE=eth0 # use real interface name here
BOOTPROTO=static
HWADDR=00:18:51:12:17:40 # use real MAC address here
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.1.5.131
NETMASK=255.255.255.0
[root@ntop network-scripts]# cat ifcfg-eth0.2
VLAN=yes
DEVICE=eth0.2
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
IPADDR=65.182.165.39
NETMASK=255.255.254.0
[root@ntop network-scripts]# cat ifcfg-vlan2
VLAN=yes
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
DEVICE=vlan2
PHYSDEV=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
IPADDR=65.182.165.39
NETMASK=255.255.254.0
 
Here is what we did,

Created a startup script that did:

modprobe 8012q

vconfig add eth0 10 //this creates eth0.10

ifconfig eth0.10 up

Then in the proxmox website under network interfaces, created a new bridge that bridge to eth0.10. Just make sure your switch is programmed up with vlan 10 as tagged or trunked.

Reboot, it should work.
Jon
 
Here is what we did,

Created a startup script that did:

modprobe 8012q

vconfig add eth0 10 //this creates eth0.10

ifconfig eth0.10 up

First, this is to configure vlan on the host. Second, those steps are not necessary (it is done by the debian bridge/vlan configuration scripts automatically).
 
Is your eth0 up? VLAN wil not work if not.

ifconfig eth0 0.0.0.0 up
 
I have since then installed CentOS 5.4 and Debian 5.03 from DVD. In both cases, VLANs worked exactly how they were supposed to. Later today I'll reinstall ProxMox to figure out why VLANs just don't work in ProxMox.
 

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!