Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 95 14:12:15 -0500
From:      Terry Rossi <tpr@ewt.com>
To:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Cc:        Terry Rossi <tpr@ewt.com>
Subject:   2.0R PPP Server Questions - Please Help
Message-ID:  <199509141822.OAA26156@picspc01.pics.com>

next in thread | raw e-mail | index | archive | help
-- [ From: Terry Rossi * EMC.Ver #2.5.02 ] --

Hi,
 
I have been poorly running a 2.0R machine as a PPP server for one serial
port.  I have about 4 people that use this port for making a PPP connection
to both the internal lan (on the same ethernet) and the internet.

My problem is with pppd (I think).  I have many problems with getting a good
session established, the problem is not the physical connection but the
routing and such.

Sometimes,
	It works great!
	It doesn't add the route
	It doesn't add the arp entry
	It doesn't do either.
	It doesn't kill pppd after they hang-up
 
I have all users use a variation of the following .ppprc file.  

#------/home/.ppprc------
crtscts                         		 # Hardware flow control
netmask 255.255.255.0           	 # netmask ( not required )
192.135.189.20:192.135.189.67   	 # ip's of local and remote hosts
                               		 # local ip must be different from one
		                             # you assigned to the ethernet ( or other )
                            		 # interface on your machine.
		                             # remote IP is ip address that will be
                            		 # assigned to the remote machine
domain pics.com                 		 # your domain
disconnect /usr/local/bin/pppdown
modem 		                            # modem line
proxyarp                   	              # Add a PROXYarp -s remoteip
localether pub
                                	              # doesn't seem to work

My /etc/ppp/options file is a zero byte file.  I also have an ip-up and ip-
down file where I attempt
to do the routing.
#-----------/etc/ppp/ip-up-----------------------------------------
#!/bin/sh
# This script has 4775 permissions
#This is the ip-up file which is executed after pppd
#Passed Parameters:
#$1 interface name (ppp0)
#$2 tty device
#$3 speed
#$4 local ip address
#$5 remote ip address
###
# The next line also is "root" because of the setuid
echo [`date`] ppplogin:$5 on $2 from `whoami`>>/var/log/ppp.log
/sbin/ifconfig $1 inet $4 $5 netmask 0xffffff00
/usr/sbin/arp -s $5 0:0:e8:c2:20:e3 perm pub
/sbin/route change $5 $4
#sleep 3
#/sbin/route change $5 $4
#sleep 3
/usr/sbin/arp -s $5 0:0:e8:c2:20:e3 perm pub
/sbin/route change $5 $4
#======= end of /etc/ppp/ip-up ======= 

You  should notice that I do several route change lines in an attempt to get
the route on ppp0 instead
of ed0.  When there is no connection online for the PPP users, the IP
addresses still remain in the
routing table.

$ netstat -ran
Routing tables

Internet:
Destination      Gateway            Flags     Refs     Use  Interface
default          192.135.189.33     UGS        32   584209  ed0
127.0.0.1        127.0.0.1          UH          0      158  lo0
192.135.189      link#1             UC          0        0  ed0
192.135.189.10   0:c0:a8:34:d3:95   UHL         1     8033  ed0
192.135.189.20   0:0:e8:c2:20:e3    UHL         1    34597  lo0
192.135.189.33   0:0:c:9:f0:b3      UHL         1        0  ed0
192.135.189.68   0:0:e8:c2:20:e3    ULS2        1       20  ed0  <-THESE ARE
PPP USERS
192.135.189.200  0:c0:a8:34:bb:88   UHL         0      153  ed0
192.135.189.255  link#1             UHL         2      668  ed0      

Also the ARP entries sometimes do not get set.  I have added some debugging
lines in PPPD and it looks like part of the code sometimes does not get
executed.  From my messages file.

Sep 14 12:39:49 picspc01 pppd[24121]: pppd 2.1.2 started by rp, uid 1008
Sep 14 12:39:49 picspc01 pppd[24121]: Connect: ppp0 <--> /dev/ttyd0
Sep 14 12:39:50 picspc01 pppd[24121]: local  IP address 192.135.189.20
Sep 14 12:39:50 picspc01 pppd[24121]: remote IP address 192.135.189.68
Sep 14 12:39:50 picspc01 pppd[24121]: sifaddr passed
Sep 14 12:39:50 picspc01 pppd[24121]: sifup passed
Sep 14 12:39:50 picspc01 pppd[24121]: default route passed
Sep 14 12:39:50 picspc01 pppd[24121]: proxy arp passed
Sep 14 12:39:50 picspc01 pppd[24121]: run_program called-Script /etc/ppp/ip-
up s
tarted
Sep 14 12:39:50 picspc01 pppd[24121]: Script /etc/ppp/ip-up started; pid =
24122
Sep 14 12:39:50 picspc01 pppd[24121]: ip-up passed             
Sep 14 13:36:40 picspc01 pppd[25163]: demuxprotrej: Unrecognized Protocol-
Reject
 for protocol 109!
Sep 14 13:36:40 picspc01 pppd[25163]: demuxprotrej: Unrecognized Protocol-
Reject
 for protocol 20581!
Sep 14 13:41:06 picspc01 pppd[25163]: run_program called-Script /etc/ppp/ip-
down
 started
Sep 14 13:41:06 picspc01 pppd[25163]: Script /etc/ppp/ip-down started; pid =
251
94                                                                     

The only other thing I should mention is that pppd is also 4775.  I have no
idea what the 
demuxprotrej messages are...Please Help or point me to any differences in
your configuration.
Thanks
Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509141822.OAA26156>