Ubuntu 10.04 LTS on hosts and quests, quest VLAN problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

For the last few days we've been trying to set up ubuntu guest with vlans - until now no success. Here is the story: 

a) host is ubuntu 10.04 with one eth interface and bridge on it... host is called bdc1 

# The primary network interface 
auto eth0 
iface eth0 inet manual 

auto br0 
iface br0 inet static 
# Static assign the IP, netmask, default gateway 
address 192.168.89.99 
netmask 255.255.255.0 
gateway 192.168.89.1 
dns-nameservers 192.168.89.4 
# Bind one or more interfaces to the bridge 
bridge_ports eth0 
# Tune the bridge for a single interface 
bridge_stp on 
bridge_fd 0 
bridge_maxwait 0 

b) guest is bridged to br0 and it's called dns1 with the following xml conf file: 

<domain type='kvm'> 
<name>dns1</name> 
<uuid>79c9080e-65df-cdc5-2973-2c5ea97db872</uuid> 
<memory>1048576</memory> 
<currentMemory>1048576</currentMemory> 
<vcpu>2</vcpu> 
<os> 
<type arch='x86_64' machine='pc-0.12'>hvm</type> 
<boot dev='hd'/> 
</os> 
<features> 
<acpi/> 
<apic/> 
<pae/> 
</features> 
<clock offset='utc'/> 
<on_poweroff>destroy</on_poweroff> 
<on_reboot>restart</on_reboot> 
<on_crash>restart</on_crash> 
<devices> 
<emulator>/usr/bin/kvm</emulator> 
<disk type='file' device='disk'> 
<driver name='qemu' type='raw'/> 
<source file='/opt/virt-images/dns1.qcow'/> 
<target dev='hda' bus='ide'/> 
</disk> 
<disk type='block' device='cdrom'> 
<driver name='qemu' type='raw'/> 
<target dev='hdc' bus='ide'/> 
<readonly/> 
</disk> 
<interface type='network'> 
<mac address='52:54:00:11:d1:22'/> 
<source network='vlan0'/> 
<model type='e1000'/> 
</interface> 
<console type='pty'> 
<target port='0'/> 
</console> 
<console type='pty'> 
<target port='0'/> 
</console> 
<input type='mouse' bus='ps2'/> 
<graphics type='vnc' port='-1' autoport='yes' keymap='pl'/> 
<video> 
<model type='cirrus' vram='9216' heads='1'/> 
</video> 
</devices> 
</domain> 

c) on the guest network interfaces are as follows: 

auto eth0 
iface eth0 inet static 
address 192.168.89.180 
netmask 255.255.255.0 
gateway 192.168.89.1 

auto eth0.87 --->>> VLAN 87 -> vconfig add eth0 87 
iface eth0.87 inet static 
address 192.168.87.4 
netmask 255.255.255.0 

d) guest's both interfaces are up, + switches are configured to handle VLAN87 + VLAN1 on the port "the host" is connected to -> we use HP ProCurve 

e) let ping this eth0.87 address 

1st try from 192.168.87.2 to 192.168.87.4 

sysadmin@dns1:~$ sudo tshark -i eth0.87 
3.457098 192.168.87.2 -> 192.168.87.4 ICMP Echo (ping) request 
3.457125 192.168.87.4 -> 192.168.87.2 ICMP Echo (ping) reply 
3.458939 192.168.87.2 -> 192.168.87.4 ICMP Echo (ping) request 
3.458957 192.168.87.4 -> 192.168.87.2 ICMP Echo (ping) reply 
3.460546 192.168.87.2 -> 192.168.87.4 ICMP Echo (ping) request 
3.460563 192.168.87.4 -> 192.168.87.2 ICMP Echo (ping) reply 
3.462261 192.168.87.2 -> 192.168.87.4 ICMP Echo (ping) request 
3.462278 192.168.87.4 -> 192.168.87.2 ICMP Echo (ping) reply 
3.463659 192.168.87.2 -> 192.168.87.4 ICMP Echo (ping) request 
3.463676 192.168.87.4 -> 192.168.87.2 ICMP Echo (ping) reply 

looks fine 

2nd try from 192.168.87.4 (eth0.87) to 192.168.87.2 

sysadmin@dns1:~$ ping 192.168.87.2 
PING 192.168.87.2 (192.168.87.2) 56(84) bytes of data. 
64 bytes from 192.168.87.2: icmp_seq=1 ttl=255 time=0.619 ms 
64 bytes from 192.168.87.2: icmp_seq=2 ttl=255 time=0.670 ms 

3rd try from "the host" 192.168.89.99 to 192.168.87.2 

sysadmin@dns1:~$ sudo tshark -i eth0.87 -f 'icmp' 
Running as user "root" and group "root". This could be dangerous. 
Capturing on eth0.87 

0.000000 192.168.89.99 -> 192.168.87.4 ICMP Echo (ping) request 
0.999936 192.168.89.99 -> 192.168.87.4 ICMP Echo (ping) request 
1.999826 192.168.89.99 -> 192.168.87.4 ICMP Echo (ping) request 
2.999800 192.168.89.99 -> 192.168.87.4 ICMP Echo (ping) request 
3.999770 192.168.89.99 -> 192.168.87.4 ICMP Echo (ping) request 

upsss I can see request BUT no replay!!!! 

f) I thought that maybe forward is not set but 

sysadmin@dns1:~$ cat /proc/sys/net/ipv4/ip_forward 
1 

sysadmin@bdc1:~$ cat /proc/sys/net/ipv4/ip_forward 
1 

g) of course pings between VLAN1 (.89.0) work great. 

What can be the problem? Do we miss something like VLAN should be set on host not on guest or something else... 

please help ;) 

Many thanks, 
Marcin 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux