2005-02-28 04:59:15

by Jarne Cook

[permalink] [raw]
Subject: Complicated networking problem

Hello all

(I am not subscribed. Please CC me)

Please forgive me if I have posed this message in the wrong place. I have
been searching for the answer for days with no resolve.

The question is:

How do I get eth0 and wlan0 both working together.

They are both using dhcp to the same simple network. That's right. Same
network. They both end up with gateway=192.168.0.1, netmask=255.255.255.0.
But ofcourse they do not have the same IP addresses.

I dont know if this matters but im using ISC's dhclient3.

This is what it looks like when wlan0 is brought up, followed by eth0.
------------------------------------------------------------------------------
i8600:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:11:43:5F:E7:1D
inet addr:192.168.0.238 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::211:43ff:fe5f:e71d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:277 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24784 (24.2 KiB) TX bytes:9278 (9.0 KiB)
Interrupt:11
------------------------------------------------------------------------------
i8600:~# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:11:F5:0C:D9:A3
inet addr:192.168.0.202 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::211:f5ff:fe0c:d9a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1538 errors:0 dropped:0 overruns:0 frame:0
TX packets:1085 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:203213 (198.4 KiB) TX bytes:130588 (127.5 KiB)
Interrupt:7 Memory:faff6000-faff7fff
------------------------------------------------------------------------------
i8600:~# ip rule list
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
------------------------------------------------------------------------------
i8600:~# ip route list table local
local 192.168.0.238 dev eth0 proto kernel scope host src 192.168.0.238
broadcast 192.168.0.255 dev wlan0 proto kernel scope link src 192.168.0.202
broadcast 192.168.0.255 dev eth0 proto kernel scope link src 192.168.0.238
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
local 192.168.0.202 dev wlan0 proto kernel scope host src 192.168.0.202
broadcast 192.168.0.0 dev wlan0 proto kernel scope link src 192.168.0.202
broadcast 192.168.0.0 dev eth0 proto kernel scope link src 192.168.0.238
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
------------------------------------------------------------------------------
i8600:~# ip route list table main
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.202
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.238
default via 192.168.0.1 dev eth0
default via 192.168.0.1 dev wlan0
------------------------------------------------------------------------------
i8600:~# ip route list table default
------------------------------------------------------------------------------
i8600:~# iptables-save
------------------------------------------------------------------------------


So.
Is there a way to allow an application which has bound to wlan0
(192.168.0.202) and an application bound to eth0 (192.168.0.238) both have
access to the internet at the same time, and not require an application to
bind to a different local address?

Thanks

Jarne

--
Jarne Cook <[email protected]>
Siliconriver.com.au


2005-03-01 01:22:13

by Robert Hancock

[permalink] [raw]
Subject: Re: Complicated networking problem

Jarne Cook wrote:
> Is there a way to allow an application which has bound to wlan0
> (192.168.0.202) and an application bound to eth0 (192.168.0.238) both have
> access to the internet at the same time, and not require an application to
> bind to a different local address?

I'm not sure exactly what you want to have happen here.. if an
application is making outbound connections it has to effectively use one
interface or the other. If you want to switch between the two of them
automatically, something like
NetworkManager(http://people.redhat.com/dcbw/NetworkManager/) may work,
however it's not going to be seamless (as in, preserving open
connections), since the IP addresses are different..

--
Robert Hancock Saskatoon, SK, Canada
Home Page: http://www.roberthancock.com/


2005-03-01 02:02:57

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: Complicated networking problem

On Mon, 28 Feb 2005 14:59:31 +1000, Jarne Cook said:

> They are both using dhcp to the same simple network. That's right. Same
> network. They both end up with gateway=192.168.0.1, netmask=255.255.255.0.
> But ofcourse they do not have the same IP addresses.

I don't suppose your network people would be willing to change it thusly:

wired ports: gateway 192.168.0.1, netmask 255.255.255.128.0
wireless: gateway 192.168.128.1, netmask 255.255.255.128.0

Or move the wireless up to 192.168.1.1 if they think that would confuse things
too much.

There's a limit to how far we should bend over backwards to support stupid
networking decisions. 192.168 *is* a /16, might as well use it. ;)

If they won't, you're pretty much stuck with binding applications to one
interface or another.


Attachments:
(No filename) (226.00 B)

2005-03-01 02:35:44

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Complicated networking problem

On Monday 28 February 2005 21:02, [email protected] wrote:
> On Mon, 28 Feb 2005 14:59:31 +1000, Jarne Cook said:
>
> > They are both using dhcp to the same simple network. That's right. Same
> > network. They both end up with gateway=192.168.0.1, netmask=255.255.255.0.
> > But ofcourse they do not have the same IP addresses.
>
> I don't suppose your network people would be willing to change it thusly:
>
> wired ports: gateway 192.168.0.1, netmask 255.255.255.128.0
> wireless: gateway 192.168.128.1, netmask 255.255.255.128.0
>
> Or move the wireless up to 192.168.1.1 if they think that would confuse things
> too much.
>
> There's a limit to how far we should bend over backwards to support stupid
> networking decisions. 192.168 *is* a /16, might as well use it. ;)
>
> If they won't, you're pretty much stuck with binding applications to one
> interface or another.
>

If the goal is to primarily use wired link and seamlessly swith to wireless
then look into bonding driver in failover mode with wired interface as
primary. This way you have only one address and userspace does not notice
anything.

--
Dmitry

2005-03-02 03:24:01

by Jarne Cook

[permalink] [raw]
Subject: Re: Complicated networking problem

On Tuesday 01 March 2005 12:35, you wrote:
> On Monday 28 February 2005 21:02, [email protected] wrote:
> > On Mon, 28 Feb 2005 14:59:31 +1000, Jarne Cook said:
> > > They are both using dhcp to the same simple network. That's right.
> > > Same network. They both end up with gateway=192.168.0.1,
> > > netmask=255.255.255.0. But ofcourse they do not have the same IP
> > > addresses.
> >
> > I don't suppose your network people would be willing to change it thusly:
> >
> > wired ports: gateway 192.168.0.1, netmask 255.255.255.128.0
> > wireless: gateway 192.168.128.1, netmask 255.255.255.128.0
> >
> > Or move the wireless up to 192.168.1.1 if they think that would confuse
> > things too much.
> >
> > There's a limit to how far we should bend over backwards to support
> > stupid networking decisions. 192.168 *is* a /16, might as well use it. ;)
> >
> > If they won't, you're pretty much stuck with binding applications to one
> > interface or another.
>
> If the goal is to primarily use wired link and seamlessly swith to wireless
> then look into bonding driver in failover mode with wired interface as
> primary. This way you have only one address and userspace does not notice
> anything.

Damn

Having to configure the interfaces using bonding was not really the answer I
was expecting.

I did not think linux would be that rigid. I figured if poodoze is able to do
it (seamlessly mind you), surely linux (with some tinkering) would be able to
do it also.

The goal was to have the networking on the laptop work as perfectly as
crapdoze does.

Perhaps I should and this topic to my list of software issues that no-one else
cares about. "man that list is getting big". maybe one day I'll develop the
balls to get deep into the code.

--
Jarne Cook <[email protected]>
Siliconriver.com.au

2005-03-02 03:27:34

by Jarne Cook

[permalink] [raw]
Subject: Re: Complicated networking problem

On Tuesday 01 March 2005 12:35, you wrote:
> On Monday 28 February 2005 21:02, [email protected] wrote:
> > On Mon, 28 Feb 2005 14:59:31 +1000, Jarne Cook said:
> > > They are both using dhcp to the same simple network. That's right.
> > > Same network. They both end up with gateway=192.168.0.1,
> > > netmask=255.255.255.0. But ofcourse they do not have the same IP
> > > addresses.
> >
> > I don't suppose your network people would be willing to change it thusly:
> >
> > wired ports: gateway 192.168.0.1, netmask 255.255.255.128.0
> > wireless: gateway 192.168.128.1, netmask 255.255.255.128.0
> >
> > Or move the wireless up to 192.168.1.1 if they think that would confuse
> > things too much.
> >
> > There's a limit to how far we should bend over backwards to support
> > stupid networking decisions. 192.168 *is* a /16, might as well use it. ;)
> >
> > If they won't, you're pretty much stuck with binding applications to one
> > interface or another.
>
> If the goal is to primarily use wired link and seamlessly swith to wireless
> then look into bonding driver in failover mode with wired interface as
> primary. This way you have only one address and userspace does not notice
> anything.

Damn

Having to configure the interfaces using bonding was not really the answer I
was expecting.

I did not think linux would be that rigid. I figured if poodoze is able to do
it (seamlessly mind you), surely linux (with some tinkering) would be able to
do it also.

The goal was to have the networking on the laptop work as perfectly as
crapdoze does.

Perhaps I should and this topic to my list of software issues that no-one else
cares about. "man that list is getting big". maybe one day I'll develop the
balls to get deep into the code.


--
Jarne Cook <[email protected]>
Siliconriver.com.au

2005-03-02 03:44:37

by Kyle Moffett

[permalink] [raw]
Subject: Re: Complicated networking problem

On Mar 01, 2005, at 22:27, Jarne Cook wrote:
> Damn
>
> Having to configure the interfaces using bonding was not really the
> answer I
> was expecting.
>
> I did not think linux would be that rigid. I figured if poodoze is
> able to do
> it (seamlessly mind you), surely linux (with some tinkering) would be
> able to
> do it also.
>
> The goal was to have the networking on the laptop work as perfectly as
> crapdoze does.
>
> Perhaps I should and this topic to my list of software issues that
> no-one else
> cares about. "man that list is getting big". maybe one day I'll
> develop the
> balls to get deep into the code.

Well, what exactly is the desired behavior for you? If you have two
network
interfaces to the same local network, the default config will pick a
random
one (They're both equal-cost unless you tell it otherwise) and send
ARPs and
everything else through that one interface. If you take it down, it may
require a minute or so to update the rest of the network to the new
hardware
address, but eventually they will figure it out. I suppose if that is
the
expected config, you could tell the box to send out a gratuitous ARP
packet
when you reconfigure interfaces, but that's a userspace issue in any
case.

As far as networking is concerned, a subnet is an atomic networking
unit.
Everything on it is considered directly and equally attached to
everything
else, unless informed otherwise via a switch protocol. Any system that
doesn't follow that rule is broken.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r
!y?(-)
------END GEEK CODE BLOCK------


2005-03-02 04:57:13

by Daniel Gryniewicz

[permalink] [raw]
Subject: Re: Complicated networking problem

On Wed, 2005-03-02 at 13:27 +1000, Jarne Cook wrote:
>On Tuesday 01 March 2005 12:35, you wrote:
>> On Monday 28 February 2005 21:02, [email protected] wrote:
>> > On Mon, 28 Feb 2005 14:59:31 +1000, Jarne Cook said:
>> > > They are both using dhcp to the same simple network. That's right.
>> > > Same network. They both end up with gateway=192.168.0.1,
>> > > netmask=255.255.255.0. But ofcourse they do not have the same IP
>> > > addresses.
>> >
>> > I don't suppose your network people would be willing to change it thusly:
>> >
>> > wired ports: gateway 192.168.0.1, netmask 255.255.255.128.0
>> > wireless: gateway 192.168.128.1, netmask 255.255.255.128.0
>> >
>> > Or move the wireless up to 192.168.1.1 if they think that would confuse
>> > things too much.
>> >
>> > There's a limit to how far we should bend over backwards to support
>> > stupid networking decisions. 192.168 *is* a /16, might as well use it. ;)
>> >
>> > If they won't, you're pretty much stuck with binding applications to one
>> > interface or another.
>>
>> If the goal is to primarily use wired link and seamlessly swith to wireless
>> then look into bonding driver in failover mode with wired interface as
>> primary. This way you have only one address and userspace does not notice
>> anything.
>
>Damn
>
>Having to configure the interfaces using bonding was not really the answer I
>was expecting.
>
>I did not think linux would be that rigid. I figured if poodoze is able to do
>it (seamlessly mind you), surely linux (with some tinkering) would be able to
>do it also.
>
>The goal was to have the networking on the laptop work as perfectly as
>crapdoze does.
>
>Perhaps I should and this topic to my list of software issues that no-one else
>cares about. "man that list is getting big". maybe one day I'll develop the
>balls to get deep into the code.
>
>

Check out NetworkManager. It will do what you want.

Daniel