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

Re: [Xen-users] domU network doesn't get IP

To: Ted Kaczmarek <tedkaz@xxxxxxxxxxxxx>
Subject: Re: [Xen-users] domU network doesn't get IP
From: Jayesh Salvi <jayeshsalvi@xxxxxxxxx>
Date: Wed, 4 Jan 2006 23:29:56 +1800
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 04 Jan 2006 05:35:17 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=NjuF2U2OlxHaxzIQVIWzYJZszOg7d1mQLoZeCqKnlltBcC7nzaWfEpfN3xHhY4RNSF3O4k02N2JlsTjpWuzmxiJGPdDLLoi11apZUzcEYXHOO3ZLpb45CqwNoyacfu2dyoZLVEhmScgGLC48Crx8aQUWEl3prm9Q0J4cdOLcd5Q=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <871640aa0601031140p2291942bscab66e0ae4c9978f@xxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <871640aa0601020941h6861b505vb83c5c7ec1f73d59@xxxxxxxxxxxxxx> <871640aa0601021305o7f386a22iad88e9db4c11cb2f@xxxxxxxxxxxxxx> <acb757c00601021313o2d7bf098yd747d232c1959abc@xxxxxxxxxxxxxx> <871640aa0601021402y8ddbc7fw7452af2cbeb61f9a@xxxxxxxxxxxxxx> <1136242653.5455.53.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <871640aa0601021504x32770516tdb19bc04ccf81cbc@xxxxxxxxxxxxxx> <871640aa0601022052v47b37421ucec4b3f884d0a754@xxxxxxxxxxxxxx> <871640aa0601022138i5ce21cdajcaa2ca15ef36d8a8@xxxxxxxxxxxxxx> <1136293216.12907.8.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <871640aa0601031140p2291942bscab66e0ae4c9978f@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi,
I resolved this issue. I could not get it working using network-bridge script, but NAT worked.

So I changed the xend-config.sxp so that it would execute:
(network-script network-nat)
(vif-script     vif-nat)

Restarted xend, launched domU.

I found that this script uses dhcp and vif interface got an IP address when seen from dom0. i.e. 'route -n' from dom0 shows:
[root@orion ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.8.1        0.0.0.0         255.255.255.255 UH    0      0        0 vif8.0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
24.118.198.0    0.0.0.0         255.255.254.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         24.118.198.1    0.0.0.0         UG    0      0        0 eth0

And I can ping to 10.0.8.1  even though my domU doesn't have its IP yet.

When I booted domU however it did not get the IP address at boot time.
Determining IP information for eth0... failed.
[FAILED]

ifconfig showed eth0, but with now ip.
So I manually assigned IP to eth0 by running: ifconfig eth0 10.0.8.1 netmask 255.255.255.0
Further I added a route in the IP routing table:
route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.8.1
So now my IP table looks like:
[root@localhost ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.8.0        0.0.0.0          255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0      U     0      0        0 lo
0.0.0.0         10.0.8.1        0.0.0.0         UG    0      0        0 eth0

Now I can ping to dom0 from domU, as well as I can ping to IPs of google and yahoo. So now domU can see the world.

Interesting thing is, if I assign an IP of 10.0.8.20 to eth0 in domU and add a route 'route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.8.1', that doesn't work. pings won't work to dom0. I will figure that out later.

Thanks for all the suggestions.

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