[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ip-{up,down} scripts



On Sun, May 30, 1999 at 03:17:42AM +0200, Martin Bialasinski wrote:
> 
> RL> It poses a problem for people like me who connects to the internet
> RL> with a modem with pppd and also is on a local network with serial
> RL> cables.
> 
> What is a local network with serial cables? Looks exotic. Twisted
> phonewire on serial ports?
Perhaps I was a bit unclear but what I really meant was a local network
via a serial port using null modem cables ... seems rather clear to me.
> 
> RL> Here's a modification I did to the ip-{up,down} main scripts that
> RL> sets a variable that tells the scripts if the connection is local
> RL> or not.  It can afterward be used by the packages script to act
> RL> consequently.
> 
> What about modem users with static IP adresses? They will also be
> treated as "local". If you want to control the action in ip-up.d
> scripts, the script can check if the remote ip is one to act on.
The local address on a private network must be one of the private domain
which is one of 10.0.0.0-10.255.255.255 ; 172.16.0.0-172.31.255.255 ; 
192.168.0.0-192.168.255.255 as stated in the NET-3 HOWTO. If you use
a modem with a static IP, this IP will most likely _not_ be in these
ranges as they are reserved for local networks. What we (at least I) 
really want to test is if we are establishing a connection to the
internet or not. The address listed in the /etc/hosts is likely to
be of the reserved domain but, as stated by Steve Haslam in next reply,
one does not necessarily have a /etc/hosts but can use bind. Perhaps the
test should simply be done to see if the address is in the reserved 
domain.

regards,
  remi


Reply to: