WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] PV DomUs can't get ip via dhcp

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] PV DomUs can't get ip via dhcp
From: X Waple <xwaple@xxxxxxxxx>
Date: Tue, 01 Nov 2011 14:19:28 +0800
Delivery-date: Mon, 31 Oct 2011 23:20:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=bZuaijE3RkRMWQVhwH96oAMhpwca2CD+45bvZVIvPro=; b=PoXuc3/M402X6xxsGEOxCZxpnDdFw/S+iLSx8HQYDFHrJryh8uheJEnLtG4dxsowmS RVHE+LFKdYdCNisdHgm3eGhM8JMBYToVhQ35lRaxeY+gP8FdvYgegXqRDlj3cfLqW0A9 ySCxl05ustc9ACTSZx1xkAiZ5XQk+i+hOsxSY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Thunderbird/3.1.14
Hi guys,

I'm trying xen with Fedora (Xen 4.1.2 + Linux 3.1.0-5.fc16.x86_64), but hit some issue with getting dhcp ip for PV DomUs.

[1] host setup is like this (MACs and ip are substituted due to privacy):

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-em1
DEVICE="em1"
HWADDR="02:23:7D:1A:2B:16"
BRIDGE=xenbr1
BOOTPROTO="dhcp"
ONBOOT="yes"
NM_CONTROLLED="no"
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-xenbr1
DEVICE=xenbr1
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes

so I get the bridge topo as:

[root@localhost ~]# brctl show
bridge name    bridge id        STP enabled    interfaces
xenbr1        8000.02237d1a2b16    no        em1

[root@localhost ~]# ifconfig -a
em1       Link encap:Ethernet  HWaddr 02:23:7D:1A:2B:16
          inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:220585 errors:0 dropped:0 overruns:0 frame:0
          TX packets:65020 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21377675 (20.3 MiB)  TX bytes:12133827 (11.5 MiB)
          Interrupt:20 Memory:fe400000-fe420000

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:107 errors:0 dropped:0 overruns:0 frame:0
          TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7596 (7.4 KiB)  TX bytes:7596 (7.4 KiB)

xenbr1    Link encap:Ethernet  HWaddr 02:23:7D:1A:2B:16
          inet addr:192.168.0.20  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:218102 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61087 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:17253427 (16.4 MiB)  TX bytes:11510311 (10.9 MiB)

[2] after I started a centos 5 pv guest:

[root@localhost ~]# cat /etc/xen/centos-5-pv
name = "centos-5-pv"
maxmem = 1024
memory = 1024
vcpus = 1
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "preserve"
vfb = [ 'type=vnc,vncunused=1,keymap=en-us,vnclisten=0.0.0.0' ]
disk = [ "tap:aio:/var/lib/xen/images/centos-5-pv.img,xvda,w" ]
vif = [ "mac=00:16:36:1e:2d:01,bridge=xenbr1,script=vif-bridge" ]
serial = "pty"

[root@localhost ~]# xl create -c /etc/xen/centos-5-pv

[root@localhost ~]# xl list
Name ID Mem VCPUs State Time(s) Domain-0 0 4638 4 r----- 403.0 centos-5-pv 1 1024 1 -b---- 166.8

I got the network interfaces like this:

[root@localhost ~]# brctl show
bridge name    bridge id        STP enabled    interfaces
xenbr1        8000.02237d1a2b16    no        em1

[root@localhost ~]# ifconfig -a
em1       Link encap:Ethernet  HWaddr 02:23:7D:1A:2B:16
          inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:220585 errors:0 dropped:0 overruns:0 frame:0
          TX packets:65020 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21377675 (20.3 MiB)  TX bytes:12133827 (11.5 MiB)
          Interrupt:20 Memory:fe400000-fe420000

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:107 errors:0 dropped:0 overruns:0 frame:0
          TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7596 (7.4 KiB)  TX bytes:7596 (7.4 KiB)

vif1.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1046 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:339763 (331.7 KiB)  TX bytes:7308 (7.1 KiB)

xenbr1    Link encap:Ethernet  HWaddr 02:23:7D:1A:2B:16
          inet addr:192.168.0.20  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:218102 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61087 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:17253427 (16.4 MiB)  TX bytes:11510311 (10.9 MiB)

After the PV guest boot up, it can't get ip from dhcp, I tried to capture the dhcp packets on the interfaces of em1, xenbr1 and vif1.0 by:
[root@localhost ~]#  tcpdump -i em1 port 67 or port 68

I can only see dhcp request packets on vif1.0, no request packets visible on em1 or xenb1. (selinux and iptables are disabled in both Dom0 and DomU).

[3] Then I started a HVM guest (DomId = 3), it can get ip successfully on the same host. I only see it's different that there are tap3.0 and vif3.0 interfaces created for the HVM guest, and tap3.0 is added in the bridge:

[root@localhost ~]# brctl show
bridge name    bridge id        STP enabled    interfaces
xenbr1        8000.02237d1a2b16    no        em1
                            tap3.0

Could someone tell me what I need to do further or explain to me how xen setup the network interfaces for PV guests compare to the HVM guests when using bridge mode?

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] PV DomUs can't get ip via dhcp, X Waple <=