SLIP (Serial Line Interface Protocol)


Contents

About This Document
    Related Documentation
Planning SLIP Addresses
Setting Up SLIP
Bringing Down a SLIP Connection
Other Notes on SLIP
Information on Network Address Types (Classes)
Notes on Adding RTS Handshaking to a tty Port

About This Document

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.

Related Documentation

For all other situations, it is recommended that you order "System Management: Communications and Networks", publication number GC23-2487.


Planning SLIP Addresses

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 the section Information on Network Address Types (Classes) for possible class types).

Please verify that your SLIP addresses DO NOT conflict with any existing (network) addresses on your system. For simplicity, 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 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 cleanly), 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 the 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:   <Enter> 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 

Step 3: Verify

Check the 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 "" ' 

In informal terms, the preceding 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:

Test the SLIP connection between system A and system B by using the ping command. On system A, enter:

   ping 1.1.1.1 

The system should display packets being sent to and received from that address.


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 <pid>. 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 your 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, and so on).

  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


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 

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 indicates 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 prior to 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 RS/6000. Using this C program is the easiest method to accomplish the task and can be made permanent (read the program comments). However, 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 following 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 the command:
       stty add rts < /dev/tty# 
    
  5. Type ~. (that's a tilde and a period to end the cu session).

    NOTE: If cu is not installed on your system, use any available communication program to connect to the modem. This will keep the "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 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 the 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.  The program is set up 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 <enter> 
     To compile:    cc -o addrts  addrts.c 
*/ 
/***********************   Program starts now   **************************/ 
#include <stdio.h> 
#include <fcntl.h> 
#include <termios.h> 
#include <sys/tty.h> 
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): slip.32.zap ITEM: FAX
Dated: 99/01/06~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:02
Comments or suggestions?
Contact us