JHJE (Jan Holst Jensen)
2005-Mar-18 16:18 UTC
[Xen-devel] Trouble getting a DHCP address when booting.
Hi. I spawned a thread last week about the failure of bridged networking and I have gotten a little further. Turns out that I _do_ have network connectivity from inside the domains, but I cannot get the network to come up when I boot. I have to login and start up the network manually. E.g. after installing Debian Sarge according to the debootstrap method outlined in the users manual, I created a config file that goes like this xen-test:~# cat debian.xen kernel = "/boot/vmlinuz-2.4.29-xenU" memory = 256 name = "Debian-Sarge" nics = 1 dhcp = "dhcp" disk = ["file:/root/debian.sarge,sda1,w"] root = "/dev/sda1 ro" xen-test:~# When I start this, the domain hangs upon trying to get a DHCP address: xen-test:~# xm create debian.xen -c Using config file "debian.xen". Started domain Debian-Sarge, console on port 9610 ************ REMOTE CONSOLE: CTRL-] TO QUIT ******** Linux version 2.4.29-xenU (xenod@freefall.cl.cam.ac.uk) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 Thu Mar 10 19:49:06 GMT 2005 On node 0 totalpages: 65536 zone(0): 4096 pages. zone(1): 61440 pages. zone(2): 0 pages. Kernel command line: ip=:1.2.3.4::::eth0:dhcp root=/dev/sda1 ro Initializing CPU#0 Xen reported: 1263.504 MHz processor. Calibrating delay loop... 2523.13 BogoMIPS Memory: 256912k/262144k available (1324k kernel code, 5232k reserved, 238k data, 60k init, 0k highmem) Dentry cache hash table entries: 32768 (order: 6, 262144 bytes) Inode cache hash table entries: 16384 (order: 5, 131072 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 16384 (order: 4, 65536 bytes) Page-cache hash table entries: 65536 (order: 6, 262144 bytes) CPU: L1 I cache: 16K, L1 D cache: 16K CPU: L2 cache: 512K CPU: Intel(R) Pentium(R) III CPU family 1266MHz stepping 01 POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd Journalled Block Device driver loaded Installing knfsd (copyright (C) 1996 okir@monad.swb.de). Event-channel device installed. Xen virtual console successfully installed as tty xen_mem: Initialising balloon driver. pty: 256 Unix98 ptys configured xen_blk: Initialising virtual block device driver RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) SCSI subsystem driver Revision: 1.00 kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 xen_net: Initialising virtual ethernet driver. NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP IP: routing cache hash table of 2048 buckets, 16Kbytes TCP: Hash tables configured (established 16384 bind 32768) Sending DHCP requests ... ************ REMOTE CONSOLE EXITED ***************** I exited the console, since it will hang here forever trying again and again to obtain a DHCP address. It doesn''t even respond to a Ctrl-C - something that seems to be general for the Xen console (rather annoying if you start e.g. ''ping'' without a ''-c'' argument: the console is now useless). If however I uncomment the ''dhcp ='' line in debian.xen and restart, it boots in 5 seconds (Wow!) and I can log in and do ifconfig lo up ifconfig eth0 up dhclient and get a DHCP address without problems. Any hints or solutions ? Best regards -- Jan Holst Jensen, Novo Nordisk A/S ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Ian Pratt
2005-Mar-18 17:26 UTC
RE: [Xen-devel] Trouble getting a DHCP address when booting.
> Sending DHCP requests ... > ************ REMOTE CONSOLE EXITED *****************At this point, try runnning ''tcpdump -i vifXXX.0'' in domain 0 to see if there are any packets being sent.> I exited the console, since it will hang here forever trying again and > again to obtain a DHCP address. It doesn''t even respond to a Ctrl-C - > something that seems to be general for the Xen console > (rather annoying > if you start e.g. ''ping'' without a ''-c'' argument: the console is now > useless).Sounds like your stty settings are messed up. Ctrl-c works for me. Best, Ian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
JHJE (Jan Holst Jensen)
2005-Mar-21 11:59 UTC
RE: [Xen-devel] Trouble getting a DHCP address when booting.
> > Sending DHCP requests ... > > ************ REMOTE CONSOLE EXITED ***************** > > At this point, try runnning ''tcpdump -i vifXXX.0'' in domain 0 > to see if there are any packets being sent.Yup. Loads of them. Even when eth0 is not up in the guest (lots of broadcast packets and such). Is that normal ? This is what happens inside the guest when I bring up the network manually (having uncommented "dhcp = ''dhcp''" from the config file): deb-xenified:~# ifconfig deb-xenified:~# ifconfig lo up deb-xenified:~# ifconfig eth0 up deb-xenified:~# dhclient Internet Software Consortium DHCP Client 2.0pl5 Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved. Please contribute if you find this software useful. For info, please visit http://www.isc.org/dhcp-contrib.html Listening on LPF/eth0/aa:00:00:01:78:b3 Sending on LPF/eth0/aa:00:00:01:78:b3 Sending on Socket/fallback/fallback-net DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 5 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 9 DHCPACK from 10.9.19.254 bound to 10.9.18.44 -- renewal in 345600 seconds. After having received an IP address I find this in the tcpdump trace 14:27:57.612582 IP 10.9.18.44.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from aa:00:00:01:78:b3, length: 300 14:27:57.618531 IP 10.9.19.254.bootps > 10.9.18.44.bootpc: BOOTP/DHCP, Reply, length: 300 When running with "dhcp = ''dhcp''" enabled I find the following in the tcpdump output 14:35:43.891535 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from aa:00:00:60:cd:2a, length: 548 14:46:28.233792 arp who-has 10.9.19.254 tell 10.9.18.131 [ and on and on... ] but never a reply from 10.9.19.254.bootps. I also tried assigning a fixed MAC-address in the config file like xen-test:~# cat debian.xen kernel = "/boot/vmlinuz-2.4.29-xenU" memory = 256 name = "Debian-Sarge" nics = 1 dhcp = "dhcp" vif = [''mac=AA:00:00:01:78:B3, bridge=xen-br0''] disk = ["file:/root/debian.sarge,sda1,w"] root = "/dev/sda1 ro" but that did not help.> > again to obtain a DHCP address. It doesn''t even respond to > a Ctrl-C -[...]> > Sounds like your stty settings are messed up. Ctrl-c works for me.Strange. I did not do anything special when installing domain-0 and the guest domain. These are my stty settings in the guest deb-xenified:~# stty speed 38400 baud; line = 0; -brkint ixoff -imaxbel -iexten and on the host xen-test:~# stty speed 38400 baud; line = 0; -brkint -imaxbel Anything out of the ordinary ? I use a danish keyboard layout if that helps explaining anything. It''s not critical since the console is only for emergency situations, but it would be nice to have it working properly. Cheers -- Jan ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel