From owner-freebsd-questions Sun Aug 3 17:56:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA01152 for questions-outgoing; Sun, 3 Aug 1997 17:56:11 -0700 (PDT) Received: from hps.sso.wdl.lmco.com (hps.sso.wdl.lmco.com [158.186.22.100]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id RAA01147 for ; Sun, 3 Aug 1997 17:56:08 -0700 (PDT) Received: from hps (hps.sso.wdl.lmco.com) by hps.sso.wdl.lmco.com (4.1/SSO-4.01-LMCO) id AA23010; Sun, 3 Aug 97 20:54:45 EDT Date: Sun, 3 Aug 1997 20:54:44 -0400 (EDT) From: "Richard P. Toren" X-Sender: rpt@hps To: freebsd-questions Subject: Re: Changing network identities on the fly In-Reply-To: <199708020902.KAA11519@awfulhak.org> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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 , > > 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 | ====================================================