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] Re: PV DomUs can't get ip via dhcp

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Re: PV DomUs can't get ip via dhcp
From: X Waple <xwaple@xxxxxxxxx>
Date: Thu, 3 Nov 2011 19:35:40 +0800
Delivery-date: Thu, 03 Nov 2011 04:37:31 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HlWPvTPXovBFIcgUEIInNuczXTkKwM6gVWH22cMZldY=; b=ZvM8Ugezz1zgJc2qT+teA1teu1zVi6r8TFPcf5dqk1YPEfUD7pdnrFdEhhKow2OVub IJa2bTMTTLfD0pTYHTn8J2oDd/DMV4970AN2vcP1oeO9DLeGMuyP9tbqZGj1K/gnf06l HAuKt4T7XejrCEYsv3TRYSSgFGVxBHtUTFXJI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4EAF8F70.1020209@xxxxxxxxx>
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>
References: <4EAF8F70.1020209@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
I have fixed it by adding the PV DomU's vifX.0 interface to the bridge manually.
Could anybody tell which script/code should be responsible for doing this? then I can do further investigate.

# brctl addif xenbr1 vif1.0


On Tue, Nov 1, 2011 at 2:19 PM, X Waple <xwaple@xxxxxxxxx> wrote:
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"
> NM_CONTROLLED="no"
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-xenbr1
DEVICE=xenbr1
TYPE=Bridge
BOOTPROTO=dhcp
>
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"
> > > 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] Re: PV DomUs can't get ip via dhcp, X Waple <=