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

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


  • To: Ted Kaczmarek <tedkaz@xxxxxxxxxxxxx>
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.