Re: Dynamic gateway roaming with IP aliasing, possible?

From: /dev/rob0 (rob0_at_gmx.co.uk)
Date: 08/24/03


Date: Sun, 24 Aug 2003 10:39:24 -0700

In article <20030824083205.67214f89.none@none.com>, JGB wrote:
> So, I guess that I want to know how to tell Linux to automagically use one
> gateway or the other, depending on wich LAN it "senses" is at. Without any
> further user intervention.

If you were using a DHCP server on each network, this would be simple;
your DHCP client will renew the lease at intervals as configured on the
server, no user intervention.

You could use "ping" with a count and a timeout value, and read the exit
code. If an IP address exclusive to one network is found, set the IP
accordingly. "man ping".

If typing the su password is a problem, consider sudo.

-- 
  /dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
  or put "not-spam" or "/dev/rob0" in Subject header to reply


Relevant Pages

  • Re: XP vs Mac OS X
    ... >>>designed to take over Mac OSX. ... >WRT the network thing, are you talking about viruses or worms? ... >worm is a 'virus' that attacks over the network, without user intervention. ... There are ways to attack windows boxes, linux boxes, ...
    (sci.electronics.design)
  • Re: Weird problem
    ... Can you ping the dhcp server by name or IP address and can it ping you after you ... network speed of the network adapter to 100 instead of auto in it's properties if ... properties or via XP Power Management or even in the computer cmos settings. ...
    (microsoft.public.win2000.networking)
  • Re: Cant talk to my LAN
    ... Doing a ping to 192.168.0.1, the DHCP server, ... > It's suddenly just not talking to the network. ... Then try the IPCONFIG /renew again and see if you can ping your DHCP server. ... Next thing to try would be to completely uninstall your network card (physically ...
    (microsoft.public.win2000.networking)
  • Re: Cant get IP address from DHCP after system restore
    ... I can't connect to get the latest Service Packs, ... I assigned a static IP and *can* ping the DHCP server and any other IP ... > 2) Use the Network Diagnostics tool to identify any failed settings. ...
    (microsoft.public.windowsxp.network_web)
  • Cannot connect to the internet : dhcp and dialup. Please help!
    ... check all network cables/replace with a known working ... check that your dhcp server is online, ... try pinging your gateway address. ... When I try to ping ...
    (microsoft.public.windowsxp.network_web)

Loading