12.3 Assigning the PPP IP
Addresses
When setting up a PPP server, the answering pppattachd daemon is started from the profile script of a special PPP user. The security of this user is dependent on the type of Internet server you are using and who will know the password of the server. In many cases, you will want this special user ID only available while starting a PPP session. This is especially true if you are setting up a server for outside users to dial into.
Special tasks specific to the PPP user include:
In this section you will create a PPP user through SMIT.
You will use the command smitty user fastpath as follows:
vi /home/pppuser/.profile
Insert the first line:
exec /usr/sbin/pppattachd server 2>/dev/null
pwdadm -f NOCHECK USER_ID
For this example, the command is:
pwdadm -f NOCHECK goofy
Create the file if it does not exist.
The user is ready for PPP login.
In this section you will add a TTY port with login capability.
The procedure adds a tty device:
For the cu command to configure the modem and for PPP to work, you will need an entry in the /etc/uucp/Devices file for this tty. Add this as follows:
Direct tty# - baud-rate direct
For this example it is:
Direct tty0 - 9600 direct
The setup of a modem will be different for different types of modems, and will also be different for the client or the server. Since the server is answering the call, you will need to make sure that the modem is set to answer a call. Modem setup strings vary, but a frequently-used generic setup string is as follows: AT&F&C1&D2S0=1Q2&W. A different string may be required by your modem. Some modems allow you to configure them directly, and that clears up the need to do any of these configuration from the software level. See the installation manual for your modem for details.
To setup the modem, do the following:
If an entry is not made for tty0 in the /etc/uucp/Devices, file then the following error is displayed when the command cu -ml tty0 is executed:
# cu -ml tty0 cu: 0835-028 The connection failed. NO DEVICES AVAILABLE.
Note |
---|
The command cu -dml tty# provides you with debug information for the cu command. If there is no response from the cu -ml tty# command, then execute the command with the -d flag and troubleshoot the problem from the information supplied in the output. |
Before dialing out, provide for diagnostic information to use in case of failure to establish a connection. Do the following:
This will append a note to /tmp/ppp with a message indicating that debugging has been activated. This diagnostic output can be switched off using kill -31 pppcontrold_PID.
Once the link and IP addresses are configured, you can start the control daemon pppcontrold. It is recommended that you do this from SMIT following the same procedure used for the server.
#lssrc -s pppcontrold
Subsystem Group PID Status pppcontrold uucp 18914 active This should show as active. #ps -ef | grep ppp root 18914 4456 0 Apr 18 - 0:00 /usr/sbin/pppcontrold
There should be a pppcontrold process running.
If there is a problem, look at the syslog daemon file /tmp/ppp you setup in section 12.4.2.1 Capturing Diagnostic Output.