Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP 9000 Networking: Installing and Administering PPP > Chapter 2 Setting Up PPP Connections

Additional Information

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

This section discusses some additional information that may be useful when configuring PPP connections.

Non-Generic Login Scripts

In most cases, all inbound PPP logins can use the same generic Login script. But if you want a host to start pppd with a special option like 'require authentication', make that login account use a specific login shell that is tailored to that host. Call it /etc/ppp/Login-host, for example, and change the pppd line to reflect whatever options you wish to have. For example:

exec  pppd  `hostname`:robin  idle  130 requireauth

See the pppd(1) man page for more information on options.

Creating a Simple Filter File

NOTE: The Filter file is not necessary for pppd operation. It is only discussed here as an example on how you might use the Filter file.

The PPP Filter file specifies the ways in which static packet filtering handles outbound and inbound TCP/IP packets. Though the filtering can be very complex if desired, a simple filter will suffice for demonstration purposes between robin and lark.

An example other than the one shown below is in /etc/ppp/Filter.ex and a lengthy explanation of static packet filtering is included in Chapter 5.

Here is a Filter file that could be used for testing the robin-lark link:

default	  bringup  	!ntp  !3/icmp  !who
keepup !send !ntp !3/icmp !who
pass !route
log !nntp tcp/syn/recv

This filter defines the following:

(!ntp) (!3/icmp) (!who)

Bring up the connection for any traffic other than Network Time Protocol (NTP) packets, ICMP Network Unreachable messages, and packets from the in.rwhod daemon.

(!send) (!ntp) (!3/icmp) (!who)

Keep up the link for all packets except those sent by robin and those that will not bring up the connection.

(!route)

Pass all packets except for RIP routing messages between routed daemons.

(tcp/syn/recv) (!nntp)

Log messages when an inbound TCP session is established except for NNTP connections.

Note on Systems and Devices Entries

In both the Systems and Devices files, pppd selects the first line that matches its search criteria. If the connection attempt fails while using the method described by that line, pppd will search for the next matching line. pppd will report a failure only when all the criteria-matching lines have been tried and exhausted.

For example, suppose two lines in the Systems file differed only by the values in the telephone number field like this:

lark Any;50 ACU 38400 5551212 in:--in: Probin word: mypasswd
lark Any;50 ACU 38400 5551223 in:--in: Probin word: mypasswd

pppd would first try to connect by dialing 5551212. If pppd received a BUSY from the modem, it would dial the second number, 5551223.

Similarly, suppose a host has two different modems attached which can be used for outbound calls. The Devices entries might look like this:

T3000  cuh00  38400
USRv32bis cul00 38400

pppd would try to call out through /dev/cuh00. But suppose it is busy because an incoming UUCP connection is on /dev/ttya00. pppd will try /dev/cul00 instead.

IP Addresses on the pppd Command Line

Soft Addresses

If an IP address is input on the pppd command line, the address is offered during IPCP negotiations. However, at connection time, some terminal servers and other peers wish to assign an address for the host running PPP to use for the duration of the connection. To direct PPP to allow assignment of an address that is different from the one on the pppd command line, use a tilde (~) after the local IP address. For example:

pppd 'hostname'~:192.0.2.5 auto idle 300

Because SLIP does not perform any IPCP negotiations, the tilde option will not function if the SLIP option is specified. See Chapter 4 for more information.

Dynamic Address Assignment

When an answering pppd is invoked in the Login script, it is told a pair of IP addresses on the command line. In the Login script, use one of the following means to decide what IP addresses are put on the command line:

  • look up the addresses in a file or a database

  • calculate the addresses algorithmically based on the incoming connection's user name or other distinguishing feature

  • invoke a program to ask a BOOTP server

The pppd command line arguments provide the mechanism; your Login script provides the policy.

Address Selected From a Small List

The following is an example Login script that uses the tty name to guarantee uniqueness of the addresses it assigns. This works fine for a small installation with few modem server serial ports and a fairly static configuration.

#!/bin/sh 
TTY='tty'
case $TTY in
/dev/tty1)
IP=192.0.2.1
;;
/dev/tty2)
IP=192.0.2.2
;;
esac
exec pppd 'hostname':$IP idle 300

Address Calculated From tty Name

This script also uses the tty name to guarantee uniqueness of the addresses it assigns. You must define ttyN in your /etc/hosts file, NIS hosts map, NetInfo hosts map, or DNS database, according to the system used. This works better in a larger installation with many ports and a configuration that tends to change often.

#!/bin/sh 
TTY='/bin/basename \'/bin/tty\''
exec pppd 'hostname':$TTY idle 300
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.