Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Aug 1997 20:54:44 -0400 (EDT)
From:      "Richard P. Toren" <rpt@sso.wdl.lmco.com>
To:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Changing network identities on the fly 
Message-ID:  <Pine.SUN.3.91.970803204343.22995A-100000@hps>
In-Reply-To: <199708020902.KAA11519@awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help

If we are talking about 'ppp' (/usr/src/usr.sbin/ppp) I have had
the same wish and found the following:


On Sat, 2 Aug 1997, Brian 
Somers wrote:

> > On Wed, 30 Jul 1997, Jerry Kelley wrote:
> > 
> > > I currently have two PPP connections that I make: one to work; and 
> > > one to my ISP. Now, my system spends more time connected to my ISP
> > > than to work so I initially configured it to use the hostname used
> > > in my ISP link. I'm also running routed and have an entry in 
> > > /etc/resolv.conf to point to my ISP's name server.
> > > 
> > > The obvious question that I'm coming to is this: is there a "good" 
> > > or clean way to go back and forth between network identities? I'm
> > > using user-mode ppp and have entries for work and my ISP.
> > 

  me too; but I also want to change my host.doamin name.

> > Not really.  BSD is pretty single-minded when it comes to network
> > configuration.  Not to say that it won't work (PPP could care less what
> > the local IP/name is since it configures it's own interface, and the DNS
> > will still work as long as it isn't firewalled), but it's not as easy as
> > say MS with their PPP `extensions'. 
> 
> I would think the best way to overcome the resolver stuff is to config 
> your own nameserver and put all of the work/ISP nameservers in as 
> forwarders (you probably want "options forward-only" too.
 
 It appears from the code that if the 1st DNS is connected to, the second
 won't be looked at. So if the if the 1st is reachable from both connections,
 it will always be used. With one route being much slower(?). In my case,
 the work DNS has many internal resolutions that are private, but is really
 slow when accessed from the outside world.

> 
> I'm not sure how this works in real life though (do you still get a 
> horrible timeout while it figures out that the first DNS isn't 
> reachable).
> 
> The alternative is a ppp.linkup script that sets up resolv.conf.
> 

  In the ppp code, the ppp.linkup file seems to be entries of
  the IPs you want. In the pppd, it is a script that is execed.

    defs.h:#define  LINKFILE        "ppp.linkup"
    os.c:    if (SelectSystem(inet_ntoa(IpcpInfo.want_ipaddr), LINKFILE) < 0) {>
    os.c:        if (SelectSystem(dstsystem, LINKFILE) < 0)
    os.c:          SelectSystem("MYADDR", LINKFILE); 

> > Doug White                              | University of Oregon  
> > Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
> > http://gladstone.uoregon.edu/~dwhite    | Computer Science Major
> > Spam routed to /dev/null by Procmail    | Death to Cyberpromo
> > 
> 
> -- 
> Brian <brian@awfulhak.org>, <brian@freebsd.org>
>       <http://www.awfulhak.org>;
> Don't _EVER_ lose your sense of humour....
> 
> 
> 

                         ====================================================
Rip Toren               | The bad news is that C++ is not an object-oriented |
rpt@sso.wdl.lmco.com    | programming language. .... The good news is that   |
                        | C++ supports object-oriented programming.          |
                        |    C++ Programming & Fundamental Concepts          |
                        |     by Anderson & Heinze                           |
                         ====================================================




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.970803204343.22995A-100000>