I am sorry for the delay.
There are two problems in your configuration.
First: kvm's or qemu's vlan command line definition has nothing to do with
ethernet vlans.
I complained several times with qemu developers about this misleading
definition.
> ... -net nic,model=virtio,vectors=4,vlan=4,macaddr=52:54:1C:10:12:24
> -net vde,vlan=4,port=24 ...
this simply means that the two -net definitions match together.
If you have several virtual adapters and you wand to connect two of them to a
vde connection
and three to a tap:
... -net nic...,vlan=1,... -net nic,...,vlan=1.. -net vde.... \
-net nic,....,vlan=2 -net nic,....,vlan=2 -net nic,....,vlan=2 -net tap...
(newer versions of qemu/kvm accept clearer options:
... -net nic...,vlan=1,... -net nic,...,vlan=1.. -netdev vde.... \
-net nic,....,vlan=2 -net nic,....,vlan=2 -net nic,....,vlan=2 -netdev tap...
These definitions has nothing to do with the vlans on the switch...
If you want to connect two machines using vlan 4/untagged there is no need to
specify vlan 4 on kvm.
start kvm in this way:
kvm .... -net nic,model=virtio,vectors=4,macaddr=52:54:1C:10:12:24 -net
vde,port=24
kvm .... -net nic,model=virtio,vectors=4,macaddr=52:54:1C:10:12:01 -net
vde,port=1
and on the switch type the following commands:
vlan/create 4
port/setvlan 1 4
port/setvlan 24 4
port/setvlan sets the vlan for untagged traffic.
if you want to add other 802.1Q tagged vlan on the same ports (say vlan 5) you
can type the following commands:
vlan/create 5
vlan/addport 5 4
On the virtual host, using its operating system commands, you can define vlan 5
tagged virtual interface.
e.g. if it is a GNU-linux you can add the port in this way:
# vconfig add eth0 5
and then you have a new eth0.5 interface.
On debian/ubuntu/mint and similar you can add the 802.1Q tagged port using this
syntax in your
/etc/network/interfaces file:
auto eth0.5
iface eth0.5 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
> Now I'm startin qemu-kvm OS:
> ... -net nic,model=virtio,vectors=4,vlan=4,macaddr=52:54:1C:10:12:24
> -net vde,vlan=4,port=24 ...
>
> Now I would like to have port 1 and 24 only as tagged VLAN 4, so I'm doing:
> vlan/addport 4 1
> vlan/addport 4 24
>
> I'm getting:
> vde[/var/run/vde.ctl/vde.mgmt]: vlan/allprint
>
> VLAN 0000
> -- Port 0001 tagged=0 active=1 status=Forwarding
> -- Port 0024 tagged=0 active=1 status=Forwarding
> VLAN 0004
> -- Port 0001 tagged=1 active=1 status=Forwarding
> -- Port 0024 tagged=1 active=1 status=Forwarding
> Success
>
> How to remove ports 1 and 24 from VLAN 0? I'm trying to do this in such way:
> vde[/var/run/vde.ctl/vde.mgmt]: vlan/delport 0 1
>
> Address already in use
> vde[/var/run/vde.ctl/vde.mgmt]: vlan/delport 0 24
The switch does not delete ports 1 and 24 from vlan0 because port 1 and 24 are
already using vlan 0 for their
untagged traffic.
If you want to define tagged only ports use the following command:
/port/setvlan 1 4095
/port/setvlan 24 4095
Vlan 4095 does not exist, it is used to say that no untagged traffic should pass
through the port.
>
> Address already in use
>
> but I don't know what "Address already in use" means in this context.
> Another question is how to add again working qemu virt machines to vde?
> For example I'm starting vde, next I'm starting qemu OSes, next somthing
> happens and vde is restarted. What next? Should I restart virtual
> machines to add them to vde?
> Thanks for help!
> Regards,
I hope these explanations are not arriving too late....
renzo
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
vde-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vde-users