How to Define Communications Over the Serial Line
Become superuser on the dial-out machine.
Create a file that is called /etc/ppp/options with the following entry:
lock
The /etc/ppp/options file is used for defining global parameters that apply to all communications by the local machine. The lock option enables UUCP-style locking of the form /var/spool/locks/LK.xxx.yyy.zzz.
Note - If the dial-out machine does not have an /etc/ppp/options file, only the superuser can run the pppd command. However, the /etc/ppp/options can be empty.
For a complete description of /etc/ppp/options, refer to "/etc/ppp/options Configuration File".
- (Optional)
Create a file that is called /etc/ppp/options.ttyname for defining how communications should be initiated from a specific serial port.
The next example shows an /etc/ppp/options.ttyname file for the port with the device name /dev/cua/a.
# vi /etc/ppp/options.cua.a crtscts
The PPP option crtscts tells the pppd daemon to turn on hardware flow control for serial port a.
For more information about the /etc/ppp/options.ttyname file, go to "/etc/ppp/options.ttynameConfiguration File".
Set the modem speed, as described in "How to Set the Modem Speed".
How to Create the Instructions for Calling a Peer
Before the dial-out machine can initiate a PPP link, you must collect information about the dial-in server to become the peer. Then you use this information to create the chat script, which describes the actual conversation between the dial-out machine and the peer.
Determine the speed at which the dial-out machine's modem needs to run.
For more information, see "Configuring the Modem Speed".
Obtain the following information from the dial-in server's site:
Server's telephone number
Authentication protocol that is used, if appropriate
Login sequence that is required by the peer for the chat script
Obtain the names and IP addresses of name servers at the dial-in server's site.
Put instructions for initiating calls to the particular peer in a chat script.
For example, you might create the following chat script, /etc/ppp/mychat, to call the dial-in server myserver.
The script contains instructions for calling a Solaris dial-in server that requires a login sequence. For a description of each instruction, refer to "Basic Chat Script Enhanced for a UNIX-Style Login". For complete details on creating a chat script, read the section "Defining the Conversation on the Dial-up Link".SAY "Calling the peer\n" TIMEOUT 10 ABORT BUSY ABORT 'NO CARRIER' ABORT ERROR REPORT CONNECT "" AT&F1&M5S2=255 TIMEOUT 60 OK ATDT1-123-555-1234 CONNECT \c SAY "Connected; logging in.\n" TIMEOUT 5 ogin:--ogin: pppuser TIMEOUT 20 ABORT 'ogin incorrect' ssword: \qmypassword "% " \c SAY "Logged in. Starting PPP on peer system.\n" ABORT 'not found' "" "exec pppd" ~ \c
Note - You do not invoke the chat script directly. Rather, you use the file name of the chat script as an argument to the connect option, which invokes the script.
If a peer runs Solaris or a similar UNIX-based operating system, consider using the previous chat script as a template for your dial-out machines.
How to Define the Connection With an Individual Peer
Become superuser on the dial-out machine.
Update DNS databases by creating the following /etc/resolv.conf file:
domain bigcompany.com nameserver 10.10.111.15 nameserver 10.10.130.8
domain bigcompany.com
Specifies that the peer's DNS domain is bigcompany.com.
nameserver 10.10.111.15
nameserver 10.10.130.8
Lists the IP addresses of name servers at bigcompany.com.
For complete details on DNS implementation, refer to "DNS Administrtaion (Reference)" in System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).
Edit the /etc/nsswitch.conf file to have the DNS database searched first for host information.
hosts: dns [NOTFOUND=return] files
Create the /etc/ppp/peers directory, and then add a file for the peer.
For example, you would create the following file to define the dial-in server myserver:
# cd /etc/ppp # mkdir peers # cd peers # vi myserver /dev/cua/a 57600 noipdefault defaultroute idle 120 noauth connect "chat -U 'mypassword' -T 1-123-555-1213 -f /etc/ppp/mychat"
Where to Go From Here
Task | For Instructions |
---|---|
Configure another dial-out machine | "How to Configure the Modem and Serial Port (Dial-out Machine)". |
Test modem connectivity by dialing out to a another computer | cu(1C) and tip(1) man pages. These utilities can help you test if your modem is properly configured and can establish a connection with another machine. |
Get detailed information about the PPP configuration files | |
Begin configuring the dial-in server |