[ltp] automatic network probing
Carl Nygard
linux-thinkpad@linux-thinkpad.org
21 Nov 2003 21:38:04 -0500
On Fri, 2003-11-21 at 21:18, André Wyrwa wrote:
> Hi,
>
> > I know you were being snide and sarcastic, but a really good thing to
> > consider doing is to set up your laptop to automatically figure out
> > when it's on your home LAN (possibly by looking at its ip address, or
> > probing to see if your home raid-based fileserver's MAC address is
> > available on the ethernet), and automatically doing an rsync to backup
> > your notebook files if it is left on at 2am in the morning when at
> > home.
>
> This just brought up a question i was asking myself some time ago.
>
> I'd like to probe for in which network i am without interfering too much
> with the network. To explain a bit more, imagine the following situation
> (the actual problem I had was solved by using a dock and wireless at
> home and no dock and wired lan at work, but I'm still interested in the
> case):
>
> Let's say i have a home network with IPs from 192.168.1.x to
> 192.168.3.x, where all IPs ending on .10 are assigned to the nics in my
> linux router. IPs are assigned statically.
>
> Then there is the network at work with IPs from 192.168.0.x to
> 192.168.x.x with some IPs existing, that don't exist in the home
> network. IPs are assigned dynamically (except for important servers).
>
> Let's say I'm doing both connections with the builtin wired lan card and
> I have no dock anywhere.
>
> Problem is that if I just connect (by accident) my notebook to the
> network at work using the configuration for the home network (which is
> default), the IP i assigned to my notebook confuses the network - this
> actually happened, I wondered why I had such a lot of network traffic
> until I realized that probably DNS requests were sent to my notebook.
Stupid question: Is there any way you can run DHCP at home and work?
Then you're always asking for the IP, and you only have one config, and
you don't technically care which net you're on. If you always want the
same IP, you can configure DHCP to recognize your MAC address.
--
Carl Nygard <cjnygard@fast.net>