two connections with two devices with networkmanager

I’m trying to get two different connections on two different devices (eth0 and wlan0) :
one pc to pc connection (with crossover cable)
one pc to router connection (via wlan)

The problem is that I can’t ping remote servers when connected to both networks (but I can ping my router and resolve domain names).

Here are my routing tables

Am I right? Is there a simple way to change this? I guess I should not edit the routing table manually because I see that it is being changed automatically when I connect / disconnect eth0. Can I tell Networkmanager to give wlan0 priority over eth0?

You need to pet them 2 different networks, like say, and each with it’s own settings.
Routing table: U 0 0 0 eth0 U 0 0 0 wlan0

It is correct that there should be two different networks. But there are: one is and the other is
The thing is that the default router is switching from the one to the other. In vort3x1337s’ case it should stay pointed at gateway (the router) and not switch to (a non existing, self invented router).

Now the bad news, I do not know why this happens (maybe other come to your rescue here). I do not use a networkmanager, but only traditional with ifup and no DHCP, so I can can configure exactly what I want. When your wlan connection is allways the same one in your home, you could consider doing likewise.

Everything works with ifup (static address for eth0 and dhcp for wlan0).
Thank you I didn’t even think about giving ifup a try…

I can switch between this ifup configuration for home use and networkmanager, so it’s a good workaround.