10/11/95 SLIP (Serial Line Interface Protocol) Special Notices . . . . . . . . . . . . . . . . . . . . 1 Planning SLIP Addresses . . . . . . . . . . . . . . . . 1 Setting Up SLIP . . . . . . . . . . . . . . . . . . . . 2 Bringing Down a SLIP Connection . . . . . . . . . . . . 4 Other Notes on SLIP . . . . . . . . . . . . . . . . . . 4 Information on Network Address Types (Classes) . . . . 5 Notes on Adding RTS Handshaking to a tty Port . . . . . 6 Reader's Comments . . . . . . . . . . . . . . . . . . . 8 SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. This document applies to AIX versions 3.2.3 and later. (AIX 3.2.5 is the latest version at the time of this writing.) +----------------------------------------------------------+ | | | IMPORTANT NOTICE: This document will no longer be | | updated and remains available only for high severity | | situations. | | | | For all other situations, we recommend that you order | | "SYSTEM MANAGEMENT: COMMUNICATIONS AND NETWORKS", PUB- | | LICATION NUMBER GC23-2487. | | | +----------------------------------------------------------+ PLANNING SLIP ADDRESSES Probably one of the most important things to consider when planning your SLIP connection is the addressing. You should examine which address class you wish to use and then develop the actual numerical values (see "Information on Network Address Types (Classes)" on page 5 for possible class types). Please verify that your SLIP addresses DO NOT conflict with any existing (network) addresses on your system. For sim- plicity, these addresses are used in the following instructions: 1.1.1.2 for local system "A" 1.1.1.1 for remote system "B" Please note that this SLIP example starts SLIP from the command line. The following instructions add a tty via SMIT SLIP (Serial Line Interface Protocol) 1 10/11/95 and then configure and start SLIP from the command line. It is good to first configure from the command line, as in these instructions, because command line options are easier to correct. After you get SLIP working correctly from the command line, bring it down, detach it (to start clean), and reconfigure it through SMIT. Configuring it through SMIT will make the configuration permanent and allow SLIP to start automatically at each system reboot. SETTING UP SLIP Step 1: Configure/Add a tty Port Add a tty for serial port S2 on BOTH machines A and B. (* means user can change the setting.) Login: as root or "su" to root Enter: smit tty Select: Add a TTY Select: tty rs232 Asynchronous Terminal * Select: sa1 Available 00-00-S2 Standard I/O Serial Port 2 Press: F4 (for PORT number) * Select: s2 Change: "Enable LOGIN" to "disable" * Change: "BAUD rate" to desired speed Change: XON-XOFF to "no" Press: key until tty is added or changed Add ONE of the following lines to the /etc/uucp/Devices file on both the server and the remote client. (If you are not sure which line to use, try one and, if you get an error, try another.) Be sure to change 9600 to the correct bps rate for your modem. Direct tty1 - 9600 direct Direct tty1 - 9600 hayes ACU tty1 - 9600 hayes Step 2: Assign Addresses for SLIP Configure SLIP lines for both systems A and B using selected addresses. Here, 1.1.1.2 is the address for A and 1.1.1.1 is the address for B. (Note: "sl#" should match the "tty#" being used; that is, if "tty1" is being used, "sl#" should be "sl1.") On system A, enter: ifconfig sl# 1.1.1.2 1.1.1.1 up On system B, enter: ifconfig sl# 1.1.1.1 1.1.1.2 up SLIP (Serial Line Interface Protocol) 2 10/11/95 Step 3: Verify Check status on BOTH machines with the following command line entry: ifconfig sl0 Step 4: Make the SLIP Connection On the remote system to be dialed into, enter: slattach tty# Use the following command line option to dial out of the local system. (Replace "#" with your tty number.) slattach tty# 9600 ' "" AT OK ATDT555-3346 CONNECT "" ' The above string is interpreted as "Use tty# at 9600 baud, send 'AT' and I should get back an 'OK,' dial 555-3346 and I should get a 'CONNECT' back." NOTES: 1. The tty ports MUST be disabled for use with SLIP and not set for "share" or "delay" (no getty). 2. In the modems, you CANNOT use XON/XOFF, software flow- control. XON/XOFF should also be set off in SMIT for tty. Use of XON/XOFF will not allow SLIP to work prop- erly (SLIP will be up but you won't be able to ping the other system). 3. DTR should be set so that the modem tracks the status of DTR and hangs up when an "on" to "off" transition occurs. slattach will bring DTR up. 4. CD should be set so the modem tracks the status of DTR (AT&C1). 5. On a modem with Hayes-compatible AT commands, "AT&K0" sets no-flow-control and "AT&K3" sets RTS/CTS on. DTR can be set with "AT&D2". See "Notes on Adding RTS Hand- shaking to a tty Port" on page 6 for instructions on adding RTS to a port on the RISC System/6000. Test the SLIP connection between system "A" and system "B" by using the ping command. On system "A", enter: ping 1.1.1.1 System should display packets being sent and received from that address. SLIP (Serial Line Interface Protocol) 3 10/11/95 BRINGING DOWN A SLIP CONNECTION 1. Enter "ps -ef | grep slatt" to search for processes associated with SLIP. 2. ******** VERY IMPORTANT !! ************* Kill these processes WITHOUT the -9 option. The proper way to kill a slattach is with "kill ". If SLIP has been defined via SMIT, severe problems could occur if you use "kill -9". Problems can effect your system and may cause a crash with LED 888. Should system crash with the 888 LED, a reboot will NOT correct the problem. You will need to use SMIT to remove the SLIP interface and associated tty. Use SMIT again to reconfigure tty and SLIP. ***************************************** 3. On the command line, enter "ifconfig sl# down" where # is the number of your SLIP interface (sl0, sl1, etc.). 4. To completely remove the SLIP configuration from your system, enter: ifconfig sl# detach 5. If SMIT was used to add the SLIP line, use SMIT again to remove it. This does not, however, kill the slattach. OTHER NOTES ON SLIP o ** IMPORTANT NOTE: With AIX releases prior to 3.2.4, when configuring multiple SLIP lines on a single RISC System/6000, make sure direct or leased-line interfaces are configured first and are the lowest numbered inter- faces. Example: If there are three interfaces, SL0, SL1, SL2, and one is over leased-line, that one should be defined as SL0. Any interfaces defined to use modems (which take more time to setup by system) should be configured or defined last as SL2 or SL3. Troubleshooting: If a leased-line SLIP interface is defined last or as a higher number (sl1 as opposed to sl0) a problem might occur at boot time. The system may assign it to sl0 and the user may not be aware of the change. SLIP will be up but a ping to one address may be crossed to another. o A SLIP connection, when configured from the command line, will stay in effect only until the system is reset or powered down. This is because nothing is permanently added to the system's startup files or the ODM database. It is for this reason that we suggest experimenting with SLIP first on the command line -- then, once the config- uration is understood, add it through SMIT. SLIP (Serial Line Interface Protocol) 4 10/11/95 On a SLIP direct connect, no "baud rate" or "dial string" is needed. A direct connect is where a serial cable is run directly between two systems (no modems involved). o On a SLIP connection over a LEASED-LINE, no "dial string" is needed. Leased-line is where there is a ded- icated phone line between two modems. o Ports MUST be disabled for SLIP (not shared or delayed, so no getty is running on the port). o When slattach is used to link a tty to a SLIP interface, it will take the FIRST available SLIP interface. If more than one exists, a problem might occur during bootup when links to ttys might occur in the wrong order (right tty with wrong interface and vice-versa). o The SLIP driver is the file "/etc/network/if_sl". o If you cannot ping or access a remote machine, the most likely causes would be: - Incorrect modem or port settings Check that XON is not on either modem or port. Verify that DTR and CD handling are set correctly in both modems. - Bad cabling or phone lines Test connection with ATE or cu by dialing other system and being able to login. This would be as a first test but does not eliminate the chance of port or modem problems. Use IBM cabling or cable that has adequate shielding. - Check modem profile. If the "Quiet Enable" (or "Q" value) is set to "1", as with most Hayes compat- ibles, try changing it to "0" (for example, AT&Q0). If the TD and RD lights flicker when you ping across SLIP, this might be your problem. - Incorrect or conflicting network addresses Issue a "netstat -i" to examine. - A port is not set to "disable". INFORMATION ON NETWORK ADDRESS TYPES (CLASSES) Network address classes fall into the following ranges: Class A: 0 to 128 Class B: 128 to 191 Class C: 192 to 255 SLIP (Serial Line Interface Protocol) 5 10/11/95 Class "A" Address ######.#####.####.### | |____|____|______ Host Address |_______________________ Network Name A Class A address consists of an 8-bit network address and a 24-bit local or host address. The first bit in the network address is dedicated to indicating the network class, leaving 7 bits for the actual network address. Since the highest number that 7 bits can represent in binary is 128, there are 128 possible Class A network addresses. Of the 128 possible network addresses, two are reserved for special cases: the network address 127 is reserved for local loopback addresses, and a network address of all ones indi- cates a broadcast address. Class "B" Address ######.#####.####.### | | |____|_______ Host Address |_____|_________________ Network Name A Class B address consists of a 16-bit network address and a 16-bit local or host address. The first two bits in the network address are dedicated to indicating the network class, leaving 14 bits for the actual network address. Therefore, there are 16,384 possible network addresses and 65,536 local host addresses. Class "C" Address ######.#####.####.### | | | |_______ Host Address |_____|____|____________ Network Name A Class C address consists of a 24-bit network address and an 8-bit local host address. The first two bits in the network address are dedicated to indicating the network class, leaving 22 bits for the actual network address. Therefore there are 2,097,152 possible network addresses and 256 possible local host addresses. Class "D" Address: NOTE: Other systems may support Class D addresses, which are multicast addresses with the highest order bits set to 1-1-1. TCP/IP does not support Class D addresses. NOTES ON ADDING RTS HANDSHAKING TO A TTY PORT For AIX levels 3.2.5 and greater, there is a field for RTS in the smit panel for Adding a TTY Device. For these levels, use smit to add RTS handshaking. For AIX levels before 3.2.5, use one of the methods in this section to add RTS handshaking. A small C program is shown below as an example of how to add RTS to a tty port on the 6000. Using this C program is the SLIP (Serial Line Interface Protocol) 6 10/11/95 easiest method to accomplish the task and can be made perma- nent (read program comments) but, as an alternative, you could use the stty command as follows: If You Wish to Use stty 1. Edit the "/etc/uucp/Devices" file to contain the fol- lowing in the leftmost column: "Direct tty# - Any direct". NOTE: Replace # with your tty number. 2. Remove getty on the port with "pdisable tty#". 3. Run the command "cu -ml tty#". 4. On another terminal or session issue command: stty add rts < /dev/tty# 5. Type "~." (that's a tilde and a period to end cu session). NOTE: If cu is not installed on your system, use any available communication program to connect to the modem. This will keep "carrier" signal high and allow the stty command to complete. C Program /* C Program to Add RTS Discipline to tty Port(s). To make the program more permanent, insert the the file name of the compiled version (complete with path) at the end of your "/etc/rc" file, and the changes will take effect again at next reboot. You can modify this program to include a variable in place of /dev/tty0 which would change in a loop to be any tty numbers for which RTS is requested. Program is setup to change only tty0. NOTE: This program is supplied "as is" and is NOT supported by IBM. It is intended as an aid to administrators only. To create: vi addrts.c To compile: cc -o addrts addrts.c */ /*********************** Program starts now **************************/ #include #include #include #include main() { int fd; fd = open("/dev/tty0", O_NDELAY|O_RDWR); ioctl(fd, TXADDCD, "rts"); /* adds rts to tty0 */ close(fd); } /*********************** Program Ends Here ************************/ SLIP (Serial Line Interface Protocol) 7 10/11/95 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ 033193 AYALAD END OF DOCUMENT (slip.zap) SLIP (Serial Line Interface Protocol) 8