Next: 5.3.3.3 Dynamic IP address Up: 5.3.3 SLIP Configuration Previous: 5.3.3.1 Static IP address

### 5.3.3.2 Static IP address SLIP connections using slattach

If you have a leased line or cable running directly to your SLIP server, then there is no need to use `dip` to initiate a connection. `slattach` can be used to configure the SLIP device instead.

In this case, your `/etc/rc.inet1` file should look something like the following:

``

    #!/bin/sh
    IPADDR="128.253.154.32"         # Replace with your IP address
    REMADDR="128.253.154.2"		# Replace with your SLIP server address

    # Modify the following for the appropriate serial device for the SLIP
    # connection:
    slattach -p cslip -s 19200 /dev/ttyS0
    /etc/ifconfig sl0 $IPADDR pointopoint $REMADDR up
    /etc/route add default gw $REMADDR

`slattach` allocates the first unallocated SLIP device (`sl0`, `sl1`, etc.) to the serial line specified.

Note that the first parameter to `slattach` is the SLIP protocol to use. At present the only valid values are `slip` and `cslip`. `slip` is regular SLIP, as you would expect, and `cslip` is SLIP with datagram header compression. In most cases you should use `cslip`; however, if you seem to be having problems with this, try `slip`.

If you have more than one SLIP interface then you will have routing considerations to make. You will have to decide what routes to add, and those decisions can only be made on the basis of the actual layout of your network connections. A book on TCP/IP network configuration, as well as the man pages to `route`, will be of use.

Next: 5.3.3.3 Dynamic IP address Up: 5.3.3 SLIP Configuration Previous: 5.3.3.1 Static IP address