The Digital UNIX system supports point-to-point connections using the following protocols:
This chapter describes both environments, how to plan for both environments, how to configure your system for both environments, and how to manage both environments.
The Serial Line Internet Protocol (SLIP) is a protocol used to run IP over serial lines between two hosts. You can connect the two hosts either directly or over telephone circuits using modems. TCP/IP commands (such as rlogin, ftp, and ping) can be run over the SLIP connection.
In the SLIP environment, systems can be directly connected to each other, if they are in close proximity; or connected through modems and a telephone network, if they are not. Figure 4-1 shows both of these simple SLIP configurations. Figure 4-2 shows a SLIP connection between two systems, with HOSTB acting as a gateway system.
This section describes those tasks you need to do before configuring SLIP.
In verifying the correct hardware, you are verifying both the cables and modems, if used.
Make sure you are using the correct cable to connect to the serial port of your system. If you do not, you might experience signal loss and the software will fail to function properly.
If the two systems are in close proximity to each other, use one of the null modem cables listed in Table 4-1.
Cable Number | Description |
BC22D-xx |
Asynchronous null modem cable (Male DB25 pin to female DB25 pin cable) |
BC22R-xx |
RS-232 null modem cable (Male DB25 pin to female DB25 pin cable) |
BC24C-xx |
25-wire null modem cable (Male DB25 pin to female DB25 pin cable) |
BC29Q-xx |
Male DB9 pin to female DB9 pin cable |
Table notes:
If the two systems are connected through modems and telephone lines, see Table 4-6 for a list of modem cables to use.
When using modems with SLIP, adhere to the following guidelines:
Note
Do not use software flow control (XON/XOFF). It will corrupt the data stream causing the TCP layer over IP to issue retransmit requests for overruns.
After you verify the communication hardware, you set up the system to run SLIP. Appendix A contains a worksheet that you can use to record the information that you need to provide to configure SLIP. If you are viewing this manual online, you can use the print feature to print part of the worksheet.
Figure 4-3 shows Part 3A of the Configuration Worksheet. The following sections explain the information you need to record in Part 3 of the worksheet. Configuration Worksheet, Part 3A
Subcommand | Information Required |
myip | Your system's IP address. |
dstip | The destination system's IP address. |
netmask | The network mask for the subnetwork. |
hardwired | None. Specifies that the two systems are connected by a null modem cable. |
modemtype | The type of modem used, unless you have a direct connection. |
opentty | The serial line and line speed (baud rate from the worksheet). |
dial | The telephone number to dial. |
expect | The information that you expect to receive on the serial line; for example, login sequences. |
send | The information that you want to send on the serial line. |
connslip | Configured the network interface and attaches the serial line to the network interface. |
Subcommand | Description |
debug | This generates debugging messages to the log file specified. |
gateway | Specifies that the destination system is a gateway to another system on a LAN. |
icmpsup | Suppresses Internet Control Message Protocol (ICMP) traffic. ICMP traffic (such as that generated by the ping command) is not permitted to be sent over the SLIP connection. This frees line bandwidth for more critical traffic. |
tcpcomp | Compresses TCP headers before they are sent over the SLIP connection. Compressing the TCP header allows for faster data transfers. The remote system must support this option to decompress the headers when they arrive at the remote end. |
tcpauto |
The local system compresses TCP headers when
it detects that the remote system is compressing them. This option can be
useful if you do not know whether the remote system is doing TCP header
compression.
|
See startslip(8) for a complete list of the startslip subcommands.
Subcommand | Description |
debug | This generates debugging messages to the daemon.log file. |
icmpsup | Suppresses Internet Control Message Protocol (ICMP) traffic. ICMP traffic (such as that generated by the ping command) is not permitted to be sent over the SLIP connection. This frees line bandwidth for more critical traffic. |
tcpauto | The local system compresses TCP headers when it detects that the remote system is compressing them. This option can be useful if you do not know whether the remote system is doing TCP header compression. This is the default. |
tcpcomp | Compresses TCP headers before they are sent over the SLIP connection. Compressing the TCP header allows for faster data transfers. The remote system must support this option to decompress the headers when they arrive at the remote end. Do not specify the tcpcomp and tcpauto options together. |
See slhosts(4) for more information.
To configure SLIP, you must have verified the correct communications hardware and completed the configuration worksheet. A system in a SLIP environment can have one of the following roles:
You edit some system files and use startslip to configure both dial-in connections and dial-out connections.
To configure a dial-in system, log in as root and complete the following steps:
Note
Digital recommends that you use a getty process for SLIP dial-in access.
slip1:password:10:20:Remote SLIP User:/usr/users/guest:/usr/sbin/startslip"
login_name remote_ip local_ip netmask option
For example, if Host D is the dial-in system in Figure 4-1, the entry is as follows:
slip1 1.2.3.6 1.2.3.5 255.255.255.0 nodebug
See slhosts(4) for more information.
modem:3:respawn:/usr/sbin/getty /dev/tty00 M38400 vt100
See inittab(4) for more information.
If any problems occur while using SLIP, see Chapter 13.
To configure a dial-out connection, log in as root and complete the following steps:
Command | Description |
at&c1 | Normal Carrier Detect (CD) operation. Tells the modem to not raise Carrier Detect until it sees Carrier Detect from the other modem. |
at&d2 | Normal Data Terminal Ready (DTR) operation. This is important in that it tells the modem to hang up the line when DTR drops; for example, when the user logs off the system. |
ate1 | Turns on echoing. |
atq0 | Displays the result codes. |
ats0=0 | Does not answer the phone. |
In addition, include the debug option (db). With debugging turned on, the modem will provide you with additional information with which to tune the modem attributes in the file. See acucap(4) for more information.
modem:23:off:/usr/sbin/getty /dev/tty00 M38400 vt100
See inittab(4) for more information.
Note
The sample script file specifies the debug subcommand and a debug file name at the beginning of the file.
See startslip(8) for a complete list of subcommands and a sample script file.
After making the connection, startslip runs in the background. The telephone number (if any) and the process ID are logged in the /var/run/ttyxx.tel-pid file.
If any problems occur while using SLIP, see Chapter 13.
To terminate a SLIP dial-out connection, do the following:
#
cat /var/run/ttyxx.tel-pid
phonenum 8021455 pid 821
In the previous command, ttyxx specifies the terminal line used for the SLIP connection. If you have multiple SLIP connections active on your system, there will be multiple files in the /var/run directory.
#
kill 821
Alternatively, you could also turn off your modem to terminate the dial-out connection.
The Point-to-Point Protocol (PPP) provides a standard way to transmit datagrams over a serial link and a standard way for the systems at either end of the link (peers) to negotiate various optional characteristics of the link. Using PPP, a serial link can be used to transmit Internet Protocol (IP) datagrams, allowing TCP/IP connections between the peers.
The Digital UNIX PPP subsystem is derived from public domain ppp-2.2, and supports IP datagrams. See RFC1661, RFC1662, RFC1332, and RFC1334 for more information about PPP.
The systems can be directly connected to each other, if they are in close proximity; or connected through modems and a telephone network, if they are not. Figure 4-4 shows two simple PPP configurations with PPP connections between two systems that are connected to each other.
Figure 4-5 shows two PPP connections. The first is between host A and host B, with host B acting as a gateway system. The second is between personal computer E and host D through terminal server C. The latter configuration might be very common for employees working at home and dialing in to a work system.
When you invoke pppd you can specify PPP options on the command line. In addition, the following files on a system can contain PPP options:
Note
If the /etc/ppp/options file does not exist or is unreadable by pppd, the daemon will not run. Only root should be able to write to this file.
See pppd(8) for a description of pppd options.
PPP provides two protocols for authenticating hosts and for authenticating your host system to others:
Both protocols exchange secrets in order to complete the authentication process. PAP secrets are contained in the /etc/ppp/pap-secrets() file; CHAP secrets are contained in the /etc/ppp/chap-secrets() file. Only root should be able to read these files. Both files have the following format:
client server secret [ip_address ...]
For example, if a LAN-connected host named work requires authentication, and a host home connects to it and authenticates itself using CHAP, both machines should have a /etc/ppp/chap-secrets file that contains an entry similar to the following:
home work "an unguessable secret" home.my.domain
Note
The /etc/ppp directory contains files of secrets used for authentication, and should not be in a partition that is exported using NFS and accessible by other hosts.
If authentication is required, the /etc/ppp/options file must contain the auth and usehostname options.
This section describes those tasks you need to do before configuring PPP.
Verify that you have the hardware to connect to the serial port of your system. If the two systems are in close proximity to each other, use one of the null modem cables listed in Table 4-1.
If the two systems are connected through modems and telephone lines, see Table 4-6 for a list of modem cables to use. The modems are set to 8 bit, no parity, and connected to the telephone network.
Verify that PPP is supported in the kernel by entering the following command:
#
sysconfig -s | grep ppp
If it is not loaded and configured, configure it by entering the following command:
#
sysconfig -c ppp
After you verify PPP support in the kernel, you configure PPP by performing a sequence of steps. Appendix A contains a worksheet that you can use to record the information that you need to provide to configure PPP. If you are viewing this manual online, you can use the print feature to print part of the worksheet.
Figure 4-6 shows Part 3B of the Configuration Worksheet. The following sections explain the information you need to record in Part 3 of the worksheet.
If you have a standalone system, you must assign it an IP address. If you are using PPP to link it to another host that is connected to the Internet, assign the local system an address that is on the same subnet as the remote host. If the other host is not connected to the Internet, assign the local system any IP address.
Note
If you are configuring PPP for the first time, do not enable authentication until you can successfully establish a link.
See pppd(8) for additional options.
After you have completed the PPP planning tasks, you can now establish a PPP connection between your local system and a remote system. Establishing a PPP connection between two systems basically involves setting up a serial link and running pppd on both ends of the link.
Guidelines for running pppd are as follows:
local_addr:
Systems in a PPP environment can have the following roles:
To establish a dial-out connection manually, do the following:
%
pppd passive
%
pppd /dev/ttya 38400
The pppd daemon runs in the background. The two pppd daemon's then negotiate and bring up the link. If you have edited /etc/syslog.conf, you will see messages from pppd giving the local and remote IP addresses of the link when it is successfully established.
If any problems occur while using PPP, see Chapter 13.
You can use the chat program to automate any dialog that might be required in establishing a dial-out connection. Chat script dialog can include the user name and password with which to log in to the remote system and the command to start pppd on the remote system. To establish a dial-out connection automatically, do the following:
"" atdt2135476[1] login: myname [2] Password: "\qmypassword" [3] "$ " "\qpppd" [4]
#
pppd /dev/ttya 38400 connect 'chat -f /etc/ppp/chat-script'
If any problems occur while using PPP, see Chapter 13.
Instead of having callers start the pppd daemon after they log in to you system, you can create a user account dedicated solely for PPP connections. Do the following:
A sample /etc/passwd file entry for PPP is as follows:
ppp:password:10:20:Remote PPP User:/usr/users/guest:/usr/sbin/pppd
To terminate terminate the PPP link, send a TERM or INTR signal to one of the pppd daemons by issuing the following command:
#
kill `cat /etc/ppp/pppxx.pid`
In the previous command, pppxx specifies the pppd used for the PPP connection. The pppd specified in the command informs any other related pppd daemons to terminate (clean up and exit).
If pppd is attached to a hardware serial port connected to a modem, it should get a HUP signal when the modem hangs up, which will cause it to clean up and exit. This depends on the driver and its current settings.
The Digital UNIX system enables you to use a variety of modems for point-to-point connections to systems that are not in close proximity to each other. These connections can be Serial Line Internet Protocol (SLIP), Point-to-Point Protocol (PPP), and UNIX-to-UNIX Copy Program (UUCP) connections. In addition, these connections can be basic dial-out/dial-in connection; for example, log in to a remote system to perform remote system administration.
This section presents general guidelines for using modems on Digital UNIX systems for all types of connections. See Chapter 4 and Chapter 9 for specific information on SLIP and PPP connections, and UUCP connections, respectively.
In order to connect a modem to the serial port of your system, you must use the correct cable. If you do not, you might experience signal loss, resulting in the software not functioning properly. Table 4-6 lists the cables you should use. The cable connector is either 25-pin or 9-pin, depending on the type of serial port on your system. See the hardware documentation for your system if you are uncertain about the type of serial port.
Note
DECconnect cables do not provide a sufficient number of wires for full modem control. Digital recommends that you do not use them.
Cable Number | Description |
BC22E-xx |
16-wire modem cable (Male DB25 pin to female DB25 pin cable) |
BC22F-xx |
25-wire modem cable (Male DB25 pin to female DB25 pin cable) |
BC29P-xx |
Male DB25 pin to female DB9 pin cable |
PC modem cable | Male DB25 pin to female DB9 pin cable |
Table notes:
After you have obtained the correct cable and connected your modem to it and the telephone network, do the following:
b38400:dv=/dev/tty00:br#38400:pa=none
Note
Some modems set their baud rate to the serial port rate. Be sure to access the modem using the same baud rate that you are going to specify to getty or uugetty. Otherwise, you might not be able to log in because of a mismatch in baud rates.
tip b38400
The tip utility responds with a connected message. You can now communicate with the modem.
at[Return]
If the modem is not in quiet mode, it responds with an OK message.
Command | Description |
at&c1 | Normal Carrier Detect (CD) operation. Tells the modem to not raise Carrier Detect until it sees Carrier Detect from the other modem. |
at&d2 | Normal Data Terminal Ready (DTR) operation. This is important in that it tells the modem to hang up the line when DTR drops. For example, when the user logs off the system. |
atq1 | Sets the modem to quiet mode. Result codes are not sent to the system. |
ate0 | Echo off. This prevents modem from echoing back the login prompt issued by the getty process. |
ats0=n | Specifies the number of rings to wait before answering. If n = 0 (zero), the modem will not answer. |
at&w0 | Saves the current modem settings in NVRAM. |
Digital UNIX supports both hardware and software flow control. If the system supports hardware flow control, set the modem and the serial line to use hardware flow control by using the appropriate commands. If hardware flow control is not supported, you should use software flow control.
modem:23:respawn:/usr/sbin/getty /dev/tty00 M38400 vt100
If you want to use the modem line in shared mode (for dial-out and dial-in connections), use uugetty instead of getty and create an entry similar to the following:
modem:23:respawn:/usr/lib/uucp/uugetty -r -t 60 tty00 38400
If you specify a baud rate greater than 9600, you must edit the /etc/uugettydefs file and create an entry for the speed you want.
With uugetty, you will be able to use the tip and cu utilities, but might not be able to use third-party utilities because of differences in file locking.
Note
If you want to use the uugetty utility, you must install the UNIX-to-UNIX Copy Facility subset.
init q
The getty or uugetty process starts, then goes to sleep, waiting for someone to dial into the system.
After you have obtained the correct cable and connected your modem to it and the telephone network, do the following:
us|US|US Robotics (28.8 fax/data modem):\ :cr:hu:ls:re:ss=AT\rATE1Q0&C0X0&A0\r:sr=OK:\ :sd#250000:di=ATD:dt\r:\ :dd#50000:fd#50:os=CONNECT:ds=\d+++\dATZ\r\dATS0=2\r:\ :ab=\d+++\dATZ\r\dATS0=2:
tip38400:tc=us38400 [1] us38400|38400 Baud dial out via US Robotics modem:\ [2] :el=^U^C^R^O^D^S^Q@:ie=#%$:oe=^D:\ [3] :dv=/dev/tty00:br#38400:ps=none:at=us:du: [4]
See remote(4) for more information.
modem:23:off:/usr/sbin/getty /dev/tty00 M38400 vt100
See inittab(4) for more information.
tip -38400 8881234
In this example, tip strips off the minus sign (-) from the baud rate and concatenates the tip command name and the baud rate to create the string tip38400. Then, tip searches the /etc/remote file for the entry matching the string. The entry in the /etc/remote file, points the capability information in the us38400 entry to initialize the modem.
By specifying the telephone number on the command line, you can share the same modem attributes for outgoing connections that have different telephone numbers.
When you log off the remote system and exit tip, the modem's saved settings are restored, readying the modem for the next user. If used in shared mode, the modem is available for dial-in access.