Date: Wed, 3 Jan 1996 13:03:12 +0200 (SAT) From: Robert Nordier <rnordier@iafrica.com> To: dwhite@resnet.uoregon.edu Cc: questions@freebsd.org Subject: Re: PPP glitches Message-ID: <199601031103.NAA00179@eac.iafrica.com> In-Reply-To: <Pine.BSF.3.91.960101195821.402B-100000@gdi.uoregon.edu> from "Doug White" at Jan 1, 96 08:01:19 pm
index | next in thread | previous in thread | raw e-mail
On Mon, 1 Jan 1996, Doug White wrote:
> On Tue, 2 Jan 1996, Robert Nordier wrote:
>
> > Do you -- or does anyone -- happen to know the exact setup to use with
> > iij-ppp where addresses on both side are dynamically assigned? (This must
> > be quite common, I would have thought.)
>
> I have this situation. I just modified 'simplesite' and left the
> defaults as they are. Unfortunately, it appears that 'ppp.linkup' isn't
> functioning...I have a bunch of annoying routes and try to delete them
> wiht it and nothing happens. I end up su'ing to root, running a script
> to delete them, then adding a default route for the connection. For
> example, this is what I get just after connecting:
>
> gdi# netstat -rn
> Routing tables
>
> Internet:
> Destination Gateway Flags Refs Use Netif Expire
> 127.0.0.1 127.0.0.1 UH 1 0 lo0
> 128.223.150.166 128.223.150.182 UH 6 0 tun0
>
> So I enter 'route add default 128.223.150.166' and all is well.
>
> > Everything always works OK for the first session. But unfortunately
> > neither 'route delete' nor 'route flush' set everything back to the same
> > state as before a connection was made.
>
> When I do 'close' in ppp, it deletes the default route just fine.
>
Thanks very much for the info.
I think I tried to do pretty much what you have done in ppp.conf. I also
found that ppp.linkup didn't seem to be working. I started out with
[/etc/ppp/ppp.linkup]
my_isp:
delete ALL
add 0 0 HISADDR
but this never seemed to be invoked when I did
dial my_isp
However I did find that if I added the lines
MYADDR:
add 0 0 HISADDR
to ppp.linkup, then this got invoked instead and ppp added the default
route correctly. (I don't know if I'm confused, but it seemed from the
documentation that just the my_isp section should have been needed.)
Actually, what I'm most concerned about is the setup in /etc/sysconfig.
I have (possibly relevant stuff only):
[/etc/sysconfig]
hostname="me.my_isp.com"
defaultdomainname=NO
tcp_extensions=YES
network_interfaces="tun0 lo0"
ifconfig_tun0="inet me.my_isp.com 10.0.0.2 netmask 0xffffff00"
ifconfig_lo0="inet localhost"
static_routes="multicast loopback"
route_multicast="224.0.0.0 -netmask 0xf0000000 -interface ${hostname}"
route_loopback="${hostname} localhost"
defaultrouter=NO
routedflags="-s"
[/etc/hosts]
127.0.0.1 localhost
10.0.0.1 me.my_isp.com me
I'm not sure whether the "ifconfig_tun0" line should even be there, since
it is just a lie, anyway, and "routed" times out the route and gets rid
of it after a few minutes. I'm also not sure whether I want or need
"multicast".
After a connection is established, netstat -rn gives
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 196.7.101.66 UGc 0 0 tun0
10.0.0.1 127.0.0.1 UGHS 1 0 lo0
127.0.0.1 127.0.0.1 UH 1 0 lo0
196.7.101.66 196.7.101.141 UH 1 0 tun0
224 10.0.0.1 US 0 0 tun0
After a ppp close, I'm left with
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
10.0.0.1 127.0.0.1 UGHS 1 0 lo0
127.0.0.1 127.0.0.1 UH 1 0 lo0
196.7.101.66 196.7.101.141 UH 1 0 tun0
196.7.101.141 127.0.0.1 UH 0 0 lo0
224 10.0.0.1 US 0 0 tun0
Before connecting again, I su to root and run a script containing
netstat -r | grep '^[0-9]\{1,3\}\.' | awk '{print $1;}' | xargs -n1 route delete
route flush
which leaves me with
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
127.0.0.1 127.0.0.1 UH 0 0 lo0
224 10.0.0.1 US 0 0 tun0
However, there must be something amiss somewhere. If I now do
dial my_psp
again, it works only about 70 percent of the time. Otherwise I get a message
rtinit: wrong ifa (...) was (...)
I feel sure I must have something set up wrong ... or maybe various things
set up wrong. :-)
Surely it should be possible to say (in effect) "OK, just forget all routing
info from that last session." If that could happen, I think things would be
OK, because it _always_ works correctly the first session.
All this is a lot to bother anyone with, so feel free to >/dev/null it
if too much trouble. :-)
--
Robert Nordier
rnordier@iafrica.com
E.A.C.
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601031103.NAA00179>
