All of lore.kernel.org
 help / color / mirror / Atom feed
* QEMU networking
@ 2011-05-12 16:10 Gary Thomas
  2011-05-12 16:16 ` Gary Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Gary Thomas @ 2011-05-12 16:10 UTC (permalink / raw)
  To: Poky Project

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]

I'm having a devil of a time getting networking to work when
I run qemu (a Poky derived image, of course!)  I'm running this
on a box which itself is NAT'd to the real internet, like this:

    +-------------+        +------------------+
    |   QEMUarm   |<------>|   My_Desktop     |<----> Internet
    | 192.168.7.2 |        |   192.168.7.1    |
    +-------------+        |   192.168.1.125  |
                           +------------------+

Firstly, something is messing with the routing tables over time
and I can't get past the first hop.  If I reconfigure the network
on the QEMU system like this:
   # ifconfig eth0 down
   # ifconfig eth0 up
   # route add default gw 192.168.7.1
I can then access past "My_Desktop", e.g.
   # ping 192.168.1.101
      -or-
   # ping 74.125.225.19    (www.google.com)
This works fine and the routing table (route.good) is correct.

A little while later (minutes), the routing changes and now I can't
get past 'My_Desktop' (i.e. I can ping 192.168.1.125, but not 192.168.1.101)
The routing table has changed (route.bad)

What causes this?  I don't have avahi running anywhere and I've explicitly
disabled that daemon on the QEMU system.

Finally, there seems to be no name resolution - /etc/resolv.conf comes
up as:
   nameserver 127.0.0.1
If I want to resolve any real names, I have to update it manually.

Note: I'm running core-image-sato with web-webkit added using zypper.

Are others actually using the network with QEMU images?  like this?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

[-- Attachment #2: route.bad --]
[-- Type: text/plain, Size: 416 bytes --]

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.7.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 eth0
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 eth0
0.0.0.0         192.168.7.1     0.0.0.0         UG    0      0        0 eth0

[-- Attachment #3: route.good --]
[-- Type: text/plain, Size: 260 bytes --]

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.7.1     0.0.0.0         UG    0      0        0 eth0

[-- Attachment #4: qemu.ps --]
[-- Type: application/postscript, Size: 6302 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: QEMU networking
  2011-05-12 16:10 QEMU networking Gary Thomas
@ 2011-05-12 16:16 ` Gary Thomas
  2011-05-12 16:23 ` Mark Hatle
  2011-05-19 22:50 ` Joshua Lock
  2 siblings, 0 replies; 8+ messages in thread
From: Gary Thomas @ 2011-05-12 16:16 UTC (permalink / raw)
  To: Poky Project

On 05/12/2011 10:10 AM, Gary Thomas wrote:
> I'm having a devil of a time getting networking to work when
> I run qemu (a Poky derived image, of course!) I'm running this
> on a box which itself is NAT'd to the real internet, like this:
>
> +-------------+ +------------------+
> | QEMUarm |<------>| My_Desktop |<----> Internet
> | 192.168.7.2 | | 192.168.7.1 |
> +-------------+ | 192.168.1.125 |
> +------------------+
>
> Firstly, something is messing with the routing tables over time
> and I can't get past the first hop. If I reconfigure the network
> on the QEMU system like this:
> # ifconfig eth0 down
> # ifconfig eth0 up
> # route add default gw 192.168.7.1
> I can then access past "My_Desktop", e.g.
> # ping 192.168.1.101
> -or-
> # ping 74.125.225.19 (www.google.com)
> This works fine and the routing table (route.good) is correct.
>
> A little while later (minutes), the routing changes and now I can't
> get past 'My_Desktop' (i.e. I can ping 192.168.1.125, but not 192.168.1.101)
> The routing table has changed (route.bad)

Actually, I can only ping 192.168.7.1 - nothing outside of that subnet works.

>
> What causes this? I don't have avahi running anywhere and I've explicitly
> disabled that daemon on the QEMU system.
>
> Finally, there seems to be no name resolution - /etc/resolv.conf comes
> up as:
> nameserver 127.0.0.1
> If I want to resolve any real names, I have to update it manually.
>
> Note: I'm running core-image-sato with web-webkit added using zypper.
>
> Are others actually using the network with QEMU images? like this?
>
>
>
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: QEMU networking
  2011-05-12 16:10 QEMU networking Gary Thomas
  2011-05-12 16:16 ` Gary Thomas
@ 2011-05-12 16:23 ` Mark Hatle
  2011-05-12 16:28   ` Gary Thomas
  2011-05-19 22:50 ` Joshua Lock
  2 siblings, 1 reply; 8+ messages in thread
From: Mark Hatle @ 2011-05-12 16:23 UTC (permalink / raw)
  To: poky

I had the same problem on my Fedora host.  It turned out that the iptables rules
were prohibiting the forwarding of packets from one network to another, causing
the route to the internet to black hole.

Check that you don't have any IP tables that are preventing the routing from
working.

--Mark

On 5/12/11 11:10 AM, Gary Thomas wrote:
> I'm having a devil of a time getting networking to work when
> I run qemu (a Poky derived image, of course!)  I'm running this
> on a box which itself is NAT'd to the real internet, like this:
> 
>     +-------------+        +------------------+
>     |   QEMUarm   |<------>|   My_Desktop     |<----> Internet
>     | 192.168.7.2 |        |   192.168.7.1    |
>     +-------------+        |   192.168.1.125  |
>                            +------------------+
> 
> Firstly, something is messing with the routing tables over time
> and I can't get past the first hop.  If I reconfigure the network
> on the QEMU system like this:
>    # ifconfig eth0 down
>    # ifconfig eth0 up
>    # route add default gw 192.168.7.1
> I can then access past "My_Desktop", e.g.
>    # ping 192.168.1.101
>       -or-
>    # ping 74.125.225.19    (www.google.com)
> This works fine and the routing table (route.good) is correct.
> 
> A little while later (minutes), the routing changes and now I can't
> get past 'My_Desktop' (i.e. I can ping 192.168.1.125, but not 192.168.1.101)
> The routing table has changed (route.bad)
> 
> What causes this?  I don't have avahi running anywhere and I've explicitly
> disabled that daemon on the QEMU system.
> 
> Finally, there seems to be no name resolution - /etc/resolv.conf comes
> up as:
>    nameserver 127.0.0.1
> If I want to resolve any real names, I have to update it manually.
> 
> Note: I'm running core-image-sato with web-webkit added using zypper.
> 
> Are others actually using the network with QEMU images?  like this?
> 
> 
> 
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: QEMU networking
  2011-05-12 16:23 ` Mark Hatle
@ 2011-05-12 16:28   ` Gary Thomas
  2011-05-12 16:32     ` Mark Hatle
  2011-05-19 14:06     ` Scott Garman
  0 siblings, 2 replies; 8+ messages in thread
From: Gary Thomas @ 2011-05-12 16:28 UTC (permalink / raw)
  To: Mark Hatle; +Cc: poky

On 05/12/2011 10:23 AM, Mark Hatle wrote:
> I had the same problem on my Fedora host.  It turned out that the iptables rules
> were prohibiting the forwarding of packets from one network to another, causing
> the route to the internet to black hole.
>
> Check that you don't have any IP tables that are preventing the routing from
> working.

I don't have any tables that would cause this on my box other than what is
set up by runqemu (it adds some NAT/MASQUERADE rules).  I have the same behaviour
on Fedora and Ubuntu hosts.

That said, it's the configuration on the target that's causing problems.
I don't know what's getting in there and changing the routing periodically.

> On 5/12/11 11:10 AM, Gary Thomas wrote:
>> I'm having a devil of a time getting networking to work when
>> I run qemu (a Poky derived image, of course!)  I'm running this
>> on a box which itself is NAT'd to the real internet, like this:
>>
>>      +-------------+        +------------------+
>>      |   QEMUarm   |<------>|   My_Desktop     |<---->  Internet
>>      | 192.168.7.2 |        |   192.168.7.1    |
>>      +-------------+        |   192.168.1.125  |
>>                             +------------------+
>>
>> Firstly, something is messing with the routing tables over time
>> and I can't get past the first hop.  If I reconfigure the network
>> on the QEMU system like this:
>>     # ifconfig eth0 down
>>     # ifconfig eth0 up
>>     # route add default gw 192.168.7.1
>> I can then access past "My_Desktop", e.g.
>>     # ping 192.168.1.101
>>        -or-
>>     # ping 74.125.225.19    (www.google.com)
>> This works fine and the routing table (route.good) is correct.
>>
>> A little while later (minutes), the routing changes and now I can't
>> get past 'My_Desktop' (i.e. I can ping 192.168.1.125, but not 192.168.1.101)
>> The routing table has changed (route.bad)
>>
>> What causes this?  I don't have avahi running anywhere and I've explicitly
>> disabled that daemon on the QEMU system.
>>
>> Finally, there seems to be no name resolution - /etc/resolv.conf comes
>> up as:
>>     nameserver 127.0.0.1
>> If I want to resolve any real names, I have to update it manually.
>>
>> Note: I'm running core-image-sato with web-webkit added using zypper.
>>
>> Are others actually using the network with QEMU images?  like this?
>>
>>
>>
>>
>> _______________________________________________
>> poky mailing list
>> poky@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/poky
>
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: QEMU networking
  2011-05-12 16:28   ` Gary Thomas
@ 2011-05-12 16:32     ` Mark Hatle
  2011-05-19 14:06     ` Scott Garman
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Hatle @ 2011-05-12 16:32 UTC (permalink / raw)
  To: Gary Thomas; +Cc: poky

On 5/12/11 11:28 AM, Gary Thomas wrote:
> On 05/12/2011 10:23 AM, Mark Hatle wrote:
>> I had the same problem on my Fedora host.  It turned out that the iptables rules
>> were prohibiting the forwarding of packets from one network to another, causing
>> the route to the internet to black hole.
>>
>> Check that you don't have any IP tables that are preventing the routing from
>> working.
> 
> I don't have any tables that would cause this on my box other than what is
> set up by runqemu (it adds some NAT/MASQUERADE rules).  I have the same behaviour
> on Fedora and Ubuntu hosts.
> 
> That said, it's the configuration on the target that's causing problems.
> I don't know what's getting in there and changing the routing periodically.

Ahh, sorry, my reading comprehension has gone away today.

Check if you have a dhcp client running on the target side.  It's possible that
it keeps requesting updates and there is a bug (or "feature") in the client that
resets your routes automatically?

--Mark

>> On 5/12/11 11:10 AM, Gary Thomas wrote:
>>> I'm having a devil of a time getting networking to work when
>>> I run qemu (a Poky derived image, of course!)  I'm running this
>>> on a box which itself is NAT'd to the real internet, like this:
>>>
>>>      +-------------+        +------------------+
>>>      |   QEMUarm   |<------>|   My_Desktop     |<---->  Internet
>>>      | 192.168.7.2 |        |   192.168.7.1    |
>>>      +-------------+        |   192.168.1.125  |
>>>                             +------------------+
>>>
>>> Firstly, something is messing with the routing tables over time
>>> and I can't get past the first hop.  If I reconfigure the network
>>> on the QEMU system like this:
>>>     # ifconfig eth0 down
>>>     # ifconfig eth0 up
>>>     # route add default gw 192.168.7.1
>>> I can then access past "My_Desktop", e.g.
>>>     # ping 192.168.1.101
>>>        -or-
>>>     # ping 74.125.225.19    (www.google.com)
>>> This works fine and the routing table (route.good) is correct.
>>>
>>> A little while later (minutes), the routing changes and now I can't
>>> get past 'My_Desktop' (i.e. I can ping 192.168.1.125, but not 192.168.1.101)
>>> The routing table has changed (route.bad)
>>>
>>> What causes this?  I don't have avahi running anywhere and I've explicitly
>>> disabled that daemon on the QEMU system.
>>>
>>> Finally, there seems to be no name resolution - /etc/resolv.conf comes
>>> up as:
>>>     nameserver 127.0.0.1
>>> If I want to resolve any real names, I have to update it manually.
>>>
>>> Note: I'm running core-image-sato with web-webkit added using zypper.
>>>
>>> Are others actually using the network with QEMU images?  like this?
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> poky mailing list
>>> poky@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/poky
>>
>> _______________________________________________
>> poky mailing list
>> poky@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/poky
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: QEMU networking
  2011-05-12 16:28   ` Gary Thomas
  2011-05-12 16:32     ` Mark Hatle
@ 2011-05-19 14:06     ` Scott Garman
  2011-05-19 14:48       ` Gary Thomas
  1 sibling, 1 reply; 8+ messages in thread
From: Scott Garman @ 2011-05-19 14:06 UTC (permalink / raw)
  To: poky

On 05/12/2011 09:28 AM, Gary Thomas wrote:
> On 05/12/2011 10:23 AM, Mark Hatle wrote:
>> I had the same problem on my Fedora host. It turned out that the
>> iptables rules
>> were prohibiting the forwarding of packets from one network to
>> another, causing
>> the route to the internet to black hole.
>>
>> Check that you don't have any IP tables that are preventing the
>> routing from
>> working.
>
> I don't have any tables that would cause this on my box other than what is
> set up by runqemu (it adds some NAT/MASQUERADE rules). I have the same
> behaviour
> on Fedora and Ubuntu hosts.
>
> That said, it's the configuration on the target that's causing problems.
> I don't know what's getting in there and changing the routing periodically.

Hi Gary,

Did you ever find out what was causing this? I'd like to know for reference.

Thanks,

Scott

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: QEMU networking
  2011-05-19 14:06     ` Scott Garman
@ 2011-05-19 14:48       ` Gary Thomas
  0 siblings, 0 replies; 8+ messages in thread
From: Gary Thomas @ 2011-05-19 14:48 UTC (permalink / raw)
  To: Scott Garman; +Cc: poky

On 05/19/2011 08:06 AM, Scott Garman wrote:
> On 05/12/2011 09:28 AM, Gary Thomas wrote:
>> On 05/12/2011 10:23 AM, Mark Hatle wrote:
>>> I had the same problem on my Fedora host. It turned out that the
>>> iptables rules
>>> were prohibiting the forwarding of packets from one network to
>>> another, causing
>>> the route to the internet to black hole.
>>>
>>> Check that you don't have any IP tables that are preventing the
>>> routing from
>>> working.
>>
>> I don't have any tables that would cause this on my box other than what is
>> set up by runqemu (it adds some NAT/MASQUERADE rules). I have the same
>> behaviour
>> on Fedora and Ubuntu hosts.
>>
>> That said, it's the configuration on the target that's causing problems.
>> I don't know what's getting in there and changing the routing periodically.
>
> Hi Gary,
>
> Did you ever find out what was causing this? I'd like to know for reference.

No, I only saw it on QEMU and not a native build.  I've not had
time to look at it since - using the native build helped me diagnose
the problem I was checking, so I didn't need QEMU any more.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: QEMU networking
  2011-05-12 16:10 QEMU networking Gary Thomas
  2011-05-12 16:16 ` Gary Thomas
  2011-05-12 16:23 ` Mark Hatle
@ 2011-05-19 22:50 ` Joshua Lock
  2 siblings, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2011-05-19 22:50 UTC (permalink / raw)
  To: poky

On Thu, 2011-05-12 at 10:10 -0600, Gary Thomas wrote:
> I'm having a devil of a time getting networking to work when
> I run qemu (a Poky derived image, of course!)  I'm running this
> on a box which itself is NAT'd to the real internet, like this:
> 
>     +-------------+        +------------------+
>     |   QEMUarm   |<------>|   My_Desktop     |<----> Internet
>     | 192.168.7.2 |        |   192.168.7.1    |
>     +-------------+        |   192.168.1.125  |
>                            +------------------+
> 
> Firstly, something is messing with the routing tables over time
> and I can't get past the first hop.  If I reconfigure the network
> on the QEMU system like this:
>    # ifconfig eth0 down
>    # ifconfig eth0 up
>    # route add default gw 192.168.7.1
> I can then access past "My_Desktop", e.g.
>    # ping 192.168.1.101
>       -or-
>    # ping 74.125.225.19    (www.google.com)
> This works fine and the routing table (route.good) is correct.
> 
> A little while later (minutes), the routing changes and now I can't
> get past 'My_Desktop' (i.e. I can ping 192.168.1.125, but not 192.168.1.101)
> The routing table has changed (route.bad)
> 
> What causes this?  I don't have avahi running anywhere and I've explicitly
> disabled that daemon on the QEMU system.
> 
> Finally, there seems to be no name resolution - /etc/resolv.conf comes
> up as:
>    nameserver 127.0.0.1
> If I want to resolve any real names, I have to update it manually.
> 
> Note: I'm running core-image-sato with web-webkit added using zypper.

I suspect ConnMan may have something to do with it. Though that's only a
suspicion based on some past experience.

Cheers,
Joshua
-- 
Joshua Lock
        Yocto Project Build Monkey
        Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-19 22:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-12 16:10 QEMU networking Gary Thomas
2011-05-12 16:16 ` Gary Thomas
2011-05-12 16:23 ` Mark Hatle
2011-05-12 16:28   ` Gary Thomas
2011-05-12 16:32     ` Mark Hatle
2011-05-19 14:06     ` Scott Garman
2011-05-19 14:48       ` Gary Thomas
2011-05-19 22:50 ` Joshua Lock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.