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

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


  • To: Anand <xen.mails@xxxxxxxxx>
  • From: Jayesh Salvi <jayeshsalvi@xxxxxxxxx>
  • Date: Tue, 3 Jan 2006 16:02:44 +1800
  • Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 02 Jan 2006 22:07:51 +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=loohs6DqLCoG80/SNIlrhGLyJ84CmkH3rMdu2Xiz/vdyfMNX9TY6vIlvLMp8hlPjlzX5HCQR1ugS4MrNtmhSEMu5u/riTUA1LboI6tWuLLIvY4O7AdtqdX5EbnxDigBzcbC4D/f7w3qc/Z+hM/6PWsooIvO68cGo5dK+hDGpNe0=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Thanks to your sample file, I got a little success.

I used those values in my ifcfg-eth0, and one first reboot it did not work. Then I changed IP address to something else and halted domU, started again and it gave error even before:
Bringing up interface eth0:  RTNETLINK answers: Network is unreachable
[  OK  ]

So I reverted the change of IP address, halted domU and started again. And now I think the changes have taken effect. Immediately after booting up, if I do ifconfig, I see the IP address assigned:
[root@localhost ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr AA:00:00:00:00:11
          inet addr:192.168.1.240  Bcast:192.168.1.255  Mask: 255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:250 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16907 (16.5 KiB)  TX bytes:210 (210.0 b)

However pings still fail. Ping from dom0 to domU fails as before. ping from domU to outside world at least sends some packets and then says host unreachable.
[root@localhost ~]# ping 24.118.198.46
PING 24.118.198.46 (24.118.198.46) 56(84) bytes of data.
From 192.168.1.240 icmp_seq=0 Destination Host Unreachable
From 192.168.1.240 icmp_seq=1 Destination Host Unreachable

Previously it used to just say network unreachable. I think it has to do with the IP assignment.

Thanks Anand for patiently following this thread :)

I will post more updates as I play around. If you have any more ideas, kindly suggest.

Thanks,
Jayesh

On 1/3/06, Anand <xen.mails@xxxxxxxxx> wrote:
You need to setup eth0 from inside domU and not from outside.

Here is a sample ifcfg-eth0 for your domU. I still errors in your ifcfg-eth0 for domU.

TYPE=Ethernet
DEVICE=eth0
BOOTPROTO=static

BROADCAST=192.168.1.255
IPADDR= 192.168.1.240
NETMASK=255.255.255.0
NETWORK= 192.168.1.0
GATEWAY=192.168.1.1

Substitute the ip address you want to allocate to the domU in the above settings.


On 1/3/06, Jayesh Salvi <jayeshsalvi@xxxxxxxxx> wrote:
Yeah, I thought 192.168.*.* are private addresses so any will do. My ISP has provided me a single IP address that too dynamic, so I guess I can only use IP addresses that are reserved for private use. So now I am using 192.168.20.20 (maybe 192.168.1.1 is a special (router) address, not sure)

In addition, I tried some other thing. Instead of configuring eth0 from inside domU I configured vifx.0 from dom0. So it looked like:

[root@orion hotplug]# ifconfig vif11.0 192.168.20.20 netmask 255.255.254.0
(I used this netmask because that's what is set in my dom0)
[root@orion hotplug]# ifconfig vif11.0 up
[root@orion hotplug]# ifconfig
...
vif11.0   Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet addr: 192.168.20.20  Bcast: 192.168.21.255  Mask: 255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2169 errors:0 dropped:164 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1878 (1.8 KiB)  TX bytes:141298 (137.9 KiB)
...

I had also updated /etc/sysconfig/network-scripts/ifcfg-eth0 as follows:
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
>TYPE=Ethernet
GATEWAY= 24.118.198.1
IPADDR= 192.168.20.20
NETMASK=255.255.254.0


Then the ping of domU from dom0 was successful, but telnet failed:
[root@orion hotplug]# ping 192.168.20.20
PING 192.168.20.20 ( 192.168.20.20) 56(84) bytes of data.
64 bytes from 192.168.20.20: icmp_seq=0 ttl=64 time= 0.046 ms
64 bytes from 192.168.20.20: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 192.168.20.20: icmp_seq=2 ttl=64 time=0.037 ms
64 bytes from 192.168.20.20: icmp_seq=3 ttl=64 time=0.039 ms
64 bytes from 192.168.20.20: icmp_seq=4 ttl=64 time=0.038 ms

--- 192.168.20.20 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4017ms
rtt min/avg/max/mdev = 0.031/0.038/0.046/0.006 ms, pipe 2
[root@orion hotplug]# telnet 192.168.20.20
Trying 192.168.20.20...
telnet: connect to address 192.168.20.20: Connection refused
telnet: Unable to connect to remote host: Connection refused

And this did not help the view from within domU. It still has network unreachable.

Thanks for giving the idea about ifcfg-eth0.


Jayesh

On 1/3/06, Anand < xen.mails@xxxxxxxxx> wrote:
The 192.168.1.1 was an example. You should use the ip address which you wanted to assign to the interface (and provided to you by your isp).

Also ensure that proper gateway is setup inside /etc/sysconfig/network-scripts/ifcfg-eth0.

No need for dhcp if you want to assign a static ip. The hostname and other options are not required.


On 1/3/06, Jayesh Salvi < jayeshsalvi@xxxxxxxxx> wrote:
OK. Now both firewall and SELinux are disabled. I created a domU with MAC AA:00:00:00:00:11.
Then I did manual configuration of eth0 as you told.
Here is the trace:
[root@localhost ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr AA:00:00:00:00:11
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:895 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:58557 (57.1 KiB)  TX bytes:2394 (2.3 KiB)

lo        Link encap:Local Loopback
          inet addr: 127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

[root@localhost ~]# ifconfig eth0 192.168.1.1 netmask 255.255.255.0
[root@localhost ~]# ifconfig eth0 up
[root@localhost ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr AA:00:00:00:00:11
          inet addr:192.168.1.1  Bcast: 192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1191 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:78311 (76.4 KiB)  TX bytes:2436 (2.3 KiB)

lo        Link encap:Local Loopback
          inet addr: 127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)


Even after this I can't see dom0 from domU. My dom0's IP is 24.118.198.46

So when I ping my dom0 from domU, I can't reach it:
[root@localhost ~]# ping 24.118.198.46
connect: Network is unreachable

When I ping the IP address 192.168.1.1 from dom0, I get
[root@orion xen]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 10.230.64.1 icmp_seq=3 Packet filtered
From 10.230.64.1 icmp_seq=6 Packet filtered
From 10.230.64.1 icmp_seq=8 Packet filtered

--- 192.168.1.1 ping statistics ---
11 packets transmitted, 0 received, +3 errors, 100% packet loss, time 10137ms
, pipe 2

Thanks Anand for your suggestions so far.

I want to clarify few more thing:
In my domain config file, I now set mac address myself, instead of default.  So my vif is now:
vif = [ 'mac=aa:00:00:00:00:11, bridge=xenbr0' ]
What about DHCP option? Should I turn it on/off? I tried it both ways, but that didn't help - my dom0 gets its IP by DHCP from my ISP provider.
I don't set nics, because by default it is 1.
I also don't set netmask, gateway, hostname in my domain config file. Should I set these variables?

Let me know.
Thanks,
Jayesh

On 1/3/06, Anand <xen.mails@xxxxxxxxx> wrote:
Make sure your firewall is disabled. Disable selinux.

Manual configuration of eth0 can be done as follows:

ifconfig eth0 192.168.1.1 netmask 255.255.255.0

ifconfig eth0 up

Now try to ping the interface.

Which version of xen are you using ?


On 1/3/06, Jayesh Salvi < jayeshsalvi@xxxxxxxxx> wrote:
> Try to manually configure the eth0 inside domU and see if it helps.
Sorry, I don't know exactly how to do it. Could you elaborate on how to manually configure eth0?

Thanks for pointing out the custom mac address question.

Can anyone tell me about these error messages from xend-hotplug.log

xenstore-read: couldn't read path backend/vbd/5/777/physical
-device
xenstore-read: couldn't read path backend/vif/5/0/ip
xenstore-read: couldn't read path backend/vif/5/0/bridge
xenstore-read: couldn't read path backend/vbd/5/777/physical-device
[After I shutdown the domain I further get]
xenstore-read: couldn't read path backend/vif/5/0/ip
xenstore-read: couldn't read path backend/vif/5/0/bridge
interface vif5.0 does not exist!

I think "couldn't read path backend/vif/5/0/ip "  should really have to do with this IP problem. But I don't understand which path is this? Is it  a path somewhere on root file system?

On 1/3/06, Anand < xen.mails@xxxxxxxxx> wrote:
>I have started domU successfully. I am using the default xend-config.sxp, it uses >(network-script network-bridge). But my domU doesn't get any IP information, and it's >disconnected from dom0 and rest of the world.

Try to manually configure the eth0 inside domU and see if it helps.

>(Also I don't understand where the domU gets its MAC address 00:16:3E:56:79:71? Could >anyone explain that as well?)

You can setup a custom mac address by using the option vif = ['mac=FF:FE:00:18:98:FB, bridge=xenbr0'] inside the domU config file. Substitute the mac address after the mac= for the desired mac address.

--

regards,

Anand



--
Jayesh




--

regards,

Anand



--
Jayesh




--

regards,

Anand



--
Jayesh




--

regards,

Anand



--
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®.