ChorusOS 4.0 Network Administration Guide

Chapter 5 Setting Up SLIP

This chapter takes you through the process of setting up a Serial Line Internet Protocol (SLIP) interface on a ChorusOS system. SLIP allows the target system to connect to another system using a direct serial line or modem connection in the same way as an Ethernet connection. If your system does not support serial connections, or if you do not plan to use SLIP with your system, you may skip this chapter.

This chapter also describes how to enable SLIP on a host for use with a ChorusOS system during application development.

Hardware Configuration

ChorusOS systems may support multiple SLIP interfaces, each of which is identified by a unique name such as sl0. The binary distribution of the ChorusOS 4.0 product provides support for only one SLIP line. (If you have the source distribution, you can increase the number of lines possible by modifying the value of NSL in the sl.h header file.) See the appropriate guide in the ChorusOS 4.0 Target Family Documentation Collection to verify serial line support for your particular target system hardware.

Note -

The first serial line on the ChorusOS system is reserved for system debug, and for console access using the host workstation tip(1) utility. It cannot be used for SLIP. The console requires a terminal type cable.

If you are unsure what serial lines your system uses, yet you are able to boot the system, you can use the dtree(1M) utility to display devices listed in the target system device tree:

% rsh target dtree

ChorusOS systems may be used with modems. The chat(1M) utility can help you handle modem connection and configuration.

Note -

This document does not provide information about modem configuration commands, nor does it provide information about the cables required for connecting modems to targets.

Interface Creation

As described in "Interface Creation", interface creation is usually performed by including commands in the sysadm.ini file that you build into the ChorusOS system image for your target. In order to create a SLIP interface, use the mkdev(1M) utility as follows:

mkdev sl unit

where unit is the number that makes the interface unique. In order to allow the system to use IP, you must also create a loopback interface.

Example 5-1 SLIP Interface Creation

The following example sysadm.ini fragment creates a SLIP interface and the loopback interface needed for IP communication.

# Set the file creation mask to 0 during system configuration
umask 0

# Create a SLIP interface
mkdev sl 0

# Create a loopback interface
mkdev lo 0

Note that the above commands simply create the interface; nothing is configured for use, yet.

Device Creation

SLIP interfaces rely on tty devices to communicate directly with the serial hardware. You must therefore create at least one tty device for each SLIP line you intend to open.

It is also possible that your applications require a BPF device for raw access to network packets.

Example 5-2 SLIP Device Creation

The following example sysadm.ini fragment creates a SLIP interface and the loopback interface needed for IP communication. Next, it creates a BPF device for any applications that require one.

# Set the file creation mask to 0 during system configuration
umask 0

# Create a SLIP interface
mkdev sl 0

# Create a loopback interface
mkdev lo 0

# Create a tty device for the second serial port
# The first serial port is reserved for system debug and console access
# through the tip(1) utility on the host workstation
# If you do not know the device tree pathname to the second serial port,
# note that the device tree path is visible in the output of dtree(1M).
# Note that major number 0 is conventionally reserved for ttys
mkdev tty 0  # takes first available device
# Other possibilities include:
#mkdev tty 0 /pci/pci-isa/ns16650-2
#mkdev tty 0 /raven/w83c553/ns16650-2
#mkdev tty 0 /sabre/simba-b/ebus/ns16650-2
mknod /dev/tty01 c 0 0

# Create a Berkeley Packet Filter device and special file
mkdev bpf 0
mknod /dev/bpf c 23 0

See the appropriate document in the ChorusOS 4.0 Target Family Documentation Collection for serial device IDs for other serial line hardware.

SLIP Configuration

This section explains how to configure Serial Line Internet Protocol (SLIP) with the ChorusOS 4.0 product standard interface and drivers. It assumes the serial line or modem is already physically connected.

Note -

Systems often have two IP addresses: one for Ethernet, one for SLIP.

This document differentiates between Ethernet Internet addresses and SLIP addresses. As you read, be aware that hostname refers to the Ethernet hostname corresponding to the Ethernet IP address, and that hostname_SLIP refers to the hostname corresponding to the SLIP address.

Before starting SLIP, make sure that the target system SLIP interface is correctly registered on the local network with the correct IP address, in particular for NFS access.

This section also assumes that you have configured your ChorusOS system image to support the SLIP connection and created the SLIP interface at boot time, even if your system image does not include everything necessary to establish a SLIP connection at boot time.

SLIP as implemented in ChorusOS 4.0 handles attaching the SLIP interface to the serial line using the slattach command, and the chat command to handle modem connections and authentication.

Enabling SLIP at Boot Time by Including slattach in the System Image
  1. Change to the directory where you build system images:

    host% cd build_dir
  2. Ensure that both serial lines and network interfaces are available for SLIP by including the necessary commands in the conf/sysadm.ini that you build into the system image. For example:

    mkdev tty 0 /pci/pci-isa/ns16550-2      # Create a tty interface
                                            # using the second serial port
                                            # because the first is reserved
                                            # for the tip line.
    mkdev sl 0                              # Create a SLIP interface that is
                                            # not bound to the tty yet.
    mknod /dev/tty01 c 6 0                  # Create a tty special file
    # Simple initialization of direct serial line connection
    # Requires slattach in system image
    arun /image/sys_bank/slattach -s 38400 -l /dev/tty01 &
    # Initialization using chat to connect through a modem
    # Requires slattach.r, chat.r and chat.cmd in system image
    #arun /image/sys_bank/slattach -z -r "'/image/sys_bank/chat \
    #-f /image/sys_bank/chat.cmd'" /dev/tty01 &
    # Configure the SLIP interface
    # Syntax: ifconfig *interface* *target_SLIP* *host_SLIP* netmask *NETMASK*
    ifconfig sl0 netmask

    See the appropriate document in the ChorusOS 4.0 Target Family Documentation Collection for serial device IDs for other serial line hardware.

  3. Start the ews configuration utility:

    host% ews conf/ChorusOS.xml &
  4. Use the hints in the table below to set system image features and tunables:




    SLIP requires virtual ttys.




    Optimizing NFS read and write buffer sizes for use with SLIP by setting them to a maximum of 512 (must be less than the Maximum Transfer Unit size).



  5. Include the slattach.r actor in the system image.

  6. (Optional) If you need chat, include the chat.r actor in the system image.

  7. (Optional) If you need chat and it needs a chat script, modify the conf/chat.cmd file, and include it in the system image. An example chat script follows:

    # Abort if we cannot contact the remote system
    ABORT            BUSY
    ABORT            'NO CARRIER'
    # Wait seven seconds max. for the remote system to reply
    TIMEOUT          7
    # Reset the modem, enable RTS/CTS
    ''               ATZ
    OK               AT&K3
    # Dial the number 1234567890
    OK               ATDT1234567890
    # Wait one minute max. for the connection
    TIMEOUT          60
    ECHO             OFF
    # Wait for the reply
    TIMEOUT          7
    # Login as chatuser with pa55worD
    ogin:-\\r-ogin:  chatuser
    ssword:          pa55worD
    SAY              "Logged in successfully."

  8. Rebuild the system image.

  9. Copy the system image to the boot server:

    host% rcp system_image_name boot_server:/tftpboot
  10. Reboot the target system:

    host% rsh target reboot
Starting SLIP from the Command Line

    Start SLIP by running slattach as an actor:

    host% rsh target_SLIP arun /bin/slattach [options]

SLIP on a Solaris Host

This section describes how to configure SLIP on a SolarisTM host for use with a ChorusOS system.

The following procedures concern hosts running Solaris 2.6.

Note -

You must be root to install and configure SLIP. If you either do not know the root password for the host system or do not feel comfortable with the tasks required, ask your system administrator to perform the tasks below.

Checking for Required Packages
  1. Before attempting to configure SLIP, check that the package SUNWpcnfs is installed on the workstation:

    host% pkginfo | grep SUNWpcnfs
    networking  SUNWpcnfs     PC-NFS Daemons

    The SUNWpcnfs works on systems running Solaris 2.6.

  2. (Optional) If the SUNWpcnfs package is not installed, get the Solstice NFS ClientTM 3.1 product, and install the package.

  3. During installation, reply y ("yes") to the question, "Do you want to install the PC-NFS SLIP driver?", and n to all other questions.

Configuring the Network
  1. Make sure /etc/hosts or the NIS configuration files include SLIP addresses for both the host and target systems:

    # If you are using /etc/hosts, then include the following lines.
    # Host SLIP address          Host SLIP hostname
    host_SLIP                    host_name
    # Target SLIP address        Target SLIP hostname
    target_SLIP                  target_name

Configuring the Terminal
  1. Start admintool.

    host% admintool &

  2. Select Go to expert mode from the serial port configuration menu.

  3. Unset the Service Enable flag.

Starting SLIP on the Host
  1. Start SLIP:

    # slattach ttya host target baud_rate

  2. Make sure the interface is operational:

    # netstat -i
    Name  Mtu  Net/Dest    Address     Ipkts  Ierrs Opkts  Oerrs Collis Queue 
    lo0   8232 loopback    localhost   307    0     307    0     0      0     
    hme0  1500 host        host        14720  268   10827  0     507    0     
    sl0   1006 target_SLIP host_SLIP   0      0     0      0     0      0

Stopping SLIP on the Host
  1. Stop SLIP:

    # sldetach ttya


If you want the SLIP target to be visible from the whole network, you must enable routing on your workstation.

  1. Enable routing:

    # ndd -set /dev/ip ip_forwarding 1

  2. Use the proxy-arp command to declare the SLIP target as having the same Ethernet address as the workstation:

    # ypcat ethers | grep host
    Ethernet_address host
    # arp -s target_SLIP Ethernet_address pub

SLIP on a Windows NT 4.0 Host

This section describes how to configure SLIP on a Windows NT 4.0 host for use with a ChorusOS system.

Before You Start

Setting up Windows NT 4.0 as a host for SLIP communications is not easy, because Windows NT 4.0 is officially only able to act as a SLIP client.

Establishing communication between the Windows NT 4.0 system and the ChorusOS system on the serial line is relatively straightforward. However, making the ChorusOS system visible on the LAN to which the Windows NT 4.0 host is connected is difficult and is not currently supported.

Please use PPP for communications if you want full routing from the target to the LAN through the Windows NT 4.0 host. The setup of the Windows NT 4.0 host is only explained in order to allow communication with both the ChorusOS target and the LAN, without doing routing between them.

Configuring the Connection

Installing RAS

To install the Remote Access Service (RAS), also called Dial-Up Networking (DUN):

  1. Double-click the My Computer icon on the desktop.

  2. Double-click the Dial-Up Networking icon.

  3. If the DUN is not yet installed, Windows NT 4.0 proposes to install it. Click the Install button and follow the directions. Install ChorusOS Cable as the modem type. This modem was created during the installation of the ChorusOS environment.

  4. If the DUN is already installed, click Close to close the dialog box.

Configuring the Serial Connection

To configure the serial cable connection:

  1. Open the Control Panel.

  2. Double-click Modems.

  3. Select ChorusOS cable in the Modem list-box.

  4. Click the Properties button.

  5. Select 9600 in the Maximum Speed combo box.

  6. Click the Connection tab.

  7. Click the Advanced... button.

  8. Check the Record Log File checkbox.

  9. Click OK.

  10. Click OK.

  11. Click Close.

Reconfiguring DUN

Windows NT 4.0 will suggest reconfiguring the RAS because you have changed the modem. If it does not, for example because the DUN was installed earlier, do the following:

  1. Double-click the Network icon in the Control Panel.

  2. Select the Services tab.

  3. Select the Remote Access Service entry in the Network Services listbox.

  4. Click the Properties button.

  5. Select the COMx ChorusOS Cable line from the list.

  6. Click Configure....

  7. Click the Dial-out radio button in the Port usage group.

  8. Click the Network... button.

  9. Click OK.

  10. Clear every check-box except TCP/IP in the Dial-out Protocols group.

  11. Click Continue.

  12. Click OK.

  13. Click Close.

Windows NT 4.0 will reconfigure its network settings and suggest rebooting the machine. Do so.

Establishing the Connection with the Target

After the machine has rebooted, you will be able to establish the connection with the ChorusOS 4.0 target:

  1. Double-click the My Computer icon on the desktop.

  2. Double-click the Dial-Up Networking icon.

  3. If Windows NT 4.0 displays a message box containing The phonebook is empty. Press OK to add an entry., press OK. If it displays the Dial-Up Networking dialog box directly, skip the next step.

  4. Follow the directions in the New Phonebook Entry Wizard. Leave all fields at their default values. At the end click Finish. This creates an entry named MyDialUpServer.

  5. Select MyDialUpServer from the Phonebook entry to dial combo box.

  6. Click More.

  7. Select the Edit entry and modem properties item from the popup menu.

  8. In the Edit Phonebook Entry dialog box, select the Basic tab.

  9. Make sure that ChorusOS Cable (COM1) is the value set for the Dial using field.

  10. Click Configure.

  11. Make sure the speed displayed in the Initial speed (bps) combo box is the same you have selected for the Modem.

  12. Check the Enable hardware flow control checkbox.

  13. Clear the Enable modem error control and Enable modem compression checkboxes.

  14. Click OK to close the box.

  15. Select the Server tab.

  16. Select SLIP: Internet as the value for the Dial-up server type field.

  17. Make sure TCP/IP is checked.

  18. Click TCP/IP Settings.

  19. Fill the IP Address field with the IP address you have selected for the serial interface on the Windows NT 4.0 host in the SLIP TCP/IP Settings dialog box. The SLIP address must be different from the IP address selected on the ChorusOS 4.0 target side. See below for more information on selecting the IP addresses.

  20. Clear Force IP header compression. You will not be able to communicate with the ChorusOS 4.0 target if Force IP header compression remains checked.

  21. Clear Use default gateway on remote network. If you leave it checked, you lose access to your LAN after the communication with the target is established.

  22. Click OK twice. Doing so returns you to the Dial-Up Networking window.

  23. Click Dial. Doing so opens the Connect to MyDialUpServer dialog box.

  24. Check Save password.

  25. Click OK.

  26. Click Do not display this message again in the Connection Complete dialog box.

  27. Click OK.

You are now connected to the target at the low level. If you have selected addresses which belong to the LAN for your serial line, you must perform a route command, described below, before being able to reach the target from the host.

Note -

If the RAS dialer hangs displaying the Connecting to MyDialUpServer message box with All devices connected and a Cancel button which does not do anything, kill both Dial-Up Networking windows from the Applications tab of the Windows NT Task Manager (press Ctrl-Alt-Del to show it), run Dial-Up Networking again, click the Hang Up button, confirm and then click the Dial button again.

Note that the first IP packet sent to the target after the connection is lost because it is used internally to complete the connection.

If the target system is rebooted, and the line is therefore dropped, you will need to Dial again using the Dial-Up Networking window. Alternatively, you can run rasdial MyDialUpServer from the command line.

It is possible to see a detailed modem-level log, which traces what happens until SLIP communications are started. It is located in the %SystemRoot%\ModemLog_ChorusOS_Cable.txt file and is enabled during serial cable connection configuration. The log may be useful if problems are encountered.