ChorusOS 4.0 Network Administration Guide

Chapter 4 Setting Up PPP

This chapter takes you through the process of setting up a Point-to-Point Protocol (PPP) interface on a ChorusOS system. PPP 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 PPP with your system, you may skip this chapter.

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

Hardware Configuration

ChorusOS systems may support multiple PPP interfaces, each of which is identified by a unique name such as ppp0. Depending on the number of serial lines physically available on the ChorusOS system, the binary distribution of the ChorusOS 4.0 product provides support for up to two PPP lines. (If you have the source distribution, you can increase the number of lines possible by modifying the value of NPPP in the ppp.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 PPP. The console requires a terminal type cable.

A direct connection between a host and a target requires a null modem cable. See "Asynchronous EIA-232-E Null Modem" in Solstice PPP 3.0.1 Administration Guide for details.


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 PPP interface, use the mkdev(1M) utility as follows:

mkdev ppp 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 4-1 PPP Interface Creation

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

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

#
# Create a PPP interface
#
mkdev ppp 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

PPP interfaces rely on tty devices to communicate directly with the serial hardware. You must therefore create at least one tty device for each PPP line you intend to open. If the ChorusOS system is configured to "dial on demand", you must also create a pseudo-tty master (ptyp) and a pseudo-tty slave (ttyp) device for each PPP line.

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


Example 4-2 PPP Device Creation

The following example sysadm.ini fragment creates a PPP interface and the loopback interface needed for IP communication. It then creates the tty devices needed to open a PPP line that may be configured for "dial on demand". Finally, 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 PPP interface
#
mkdev ppp 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 device tree 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 pseudo-tty devices for on-demand dialing
#
mknod /dev/ptyp0 c 5 0 # Master
mknod /dev/ttyp0 c 6 0 # Slave

#
# 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.


PPP Configuration

This section explains how to configure Point-to-Point Protocol (PPP) with the ChorusOS 4.0 product standard interface and drivers. It assumes the serial line or modem is already physically connected. On some platforms, a unique serial line is used both for the console (accessed through tip), and for PPP. At boot time, the serial line connector must be connected to the host tip line.


Note -

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

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


PPP as implemented in ChorusOS 4.0 handles IP traffic differently than previous releases.

The process therefore remains the same whether you open one PPP line or multiple lines.

Figure 4-1 IP Traffic--PPP Only

Graphic

In order to make sure the Ethernet interface can still be used for IP traffic, use different IP addresses for Ethernet and IP.

Figure 4-2 IP Traffic--Both Ethernet and PPP

Graphic

It is strongly recommended for this release that you use different IP addresses for PPP and Ethernet.

As shown above, if each system has only one IP address, when an ifnet interface is set up between target_PPP and host_PPP, all traffic to host_PPP is routed through target_PPP. In other words, all IP traffic passes through the serial line.

How to Enable PPP Services

Enabling PPP services involves using the pppstart actor.

Enabling PPP at Boot Time by Including pppstart 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 PPP 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 ppp 0                             # Create a PPP interface that is
                                            # not bound to the tty yet.
    
    mknod /dev/tty01 c 0 0                  # Create a tty special file
    
    #mknod /dev/ttyp0 c 5 0                # Pseudo tty devices, needed
    #mknod /dev/ptyp0 c 6 0                # for dialup on demand.
    
    # Enable PPP
    # Requires pppstart.r in system image
    #
    arun /image/sys_bank/pppstart &
    
    pppd /dev/tty01                         # Open a PPP line.
    
    # Wait for the interface to be up.
    #
    ifwait ppp0

    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:

    Set... 

    Comments 

    VTTY=true 

    PPP requires virtual ttys.

    PPP=true 

     

    iom.nfs.rsize=1024 

    Optimizing NFS read and write buffer sizes for use with PPP by setting them to a maximum of 1024

    iom.nfs.wsize=1024 

     

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

  6. Rebuild the system image.

  7. Copy the system image to the boot server:


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


    host% rsh target reboot
    
Enabling PPP Manually
  1. Ensure that both serial lines and network interfaces are available for PPP.

  2. Run the actor:


    host% rsh target arun /bin/pppstart &
    

How to Open PPP Lines

Opening an available PPP line involves the built-in C_INIT command, pppd.

Opening a PPP Line Manually
  1. Run the built-in C_INIT command, pppd, on the target system:


    host% rsh target pppd device
    pppd device:info: Using interface ppp0
    pppd device:notice: Connect: ppp0 <--> device
    pppd device:notice: local  IP address local_addr
    pppd device:notice: remote IP address remote_addr
    

    where device is either /dev/tty01 or /dev/tty02.

    See pppd(1M) for details.

How to Close PPP Lines

Closing an open PPP line involves using the pppclose command.

Closing a PPP Line Manually
  1. Run the built-in C_INIT command, pppclose, on the target system:


    host% rsh target pppclose device
    pppd device:info: Terminating on signal 15.
    pppd device:notice: Connection terminated, connected for 2 minutes
    pppd device:info: Exit.

    where device is either /dev/tty01 or /dev/tty02.

How to Disable PPP Services

Disabling PPP services involves using the pppstop command.

Disabling PPP Services

    Run the built-in C_INIT command, pppstop, on the target system:


    host% rsh target pppstop
    

PPP on a Solaris Host

This section describes how to configure PPP on the SolarisTM system to work with a ChorusOS 4.0 system.

The following procedures concern hosts running Solaris 2.6 and 7.

See also the TCP/IP and Data Communications Administration Guide in the Solaris 7 System Administrator Collection for details about setting up PPP on hosts running the Solaris operating environment.


Note -

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


Checking for Required Packages

Before configuring PPP, check that the following packages are installed on the host workstation:

  1. SUNWbnuu

  2. SUNWbnur

  3. SUNWpppk

  4. SUNWapppu

  5. SUNWapppr.


host% pkginfo | egrep '.*(bnu|ppp).*'
system      SUNWapppr      PPP/IP Asynchronous PPP daemon configuration files
system      SUNWapppu      PPP/IP Asynchronous PPP daemon and PPP login service
system      SUNWbnur       Networking UUCP Utilities, (Root)
system      SUNWbnuu       Networking UUCP Utilities, (Usr)
system      SUNWpppk       PPP/IP and IPdialup Device Drivers

If the packages are not installed, you must install them in the order specified above before you continue.

Configuration Files

This section describes all files which must be created or modified to configure PPP on a Solaris host.

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

    # If you are using /etc/hosts, then include the following lines.
    # Host PPP address          Host PPP hostname
    host_PPP                      host_name
    # Target PPP address        Target PPP hostname
    target_PPP                    target_name
    

Configuring UUCP
  1. Add the system name to /etc/uucp/Systems:

    # Name          Connect Hour    Device to Use   Connection speed
    target          Any             Direct          9600

  2. Add the device to /etc/uucp/Devices:

    # Name     Physical device      Unused     Connection speed    Direct Dialer
    #                                                              (no modem)
    Direct     cua/a                -          9600                direct

  3. Make sure that the dialer called direct exists in /etc/uucp/Dialers:


    host% grep direct /etc/uucp/Dialers
    direct

Configuring PPP
  1. Update the PPP configuration file /etc/asppp.cf:

    #ident  "@(#)asppp.cf   1.10    93/07/07 SMI"
    #
    # Copyright (c) 1993 by Sun Microsystems, Inc.
    #
    # Sample asynchronous PPP /etc/asppp.cf file
    #
    #
    #ifconfig ipdptp0 plumb mojave gobi up
    #
    #path
    #       inactivity_timeout 120     # Approx. 2 minutes
    #       interface ipdptp0          
    #       peer_system_name Pgobi     # The name we log in with (also in
    #                                  # /etc/uucp/Systems
    
    ifconfig ipdptp0 plumb host_PPP target_PPP up
    
    path
           interface ipdptp0
           peer_system_name .zsmon
           ipcp_async_map 0xa000
           inactivity_timeout 1000000

Terminal Configuration

This section describes how to modify the terminal configuration to allow a PPP connection without login.

Configuring a Terminal
  1. Start admintool.

  2. Select Serial Ports from the Browse menu.

  3. Double-click the port to use for PPP.

  4. Click the Expert radio button in the Detail field.

  5. Use the hints in the table below to set options for the port.

    Field 

    State/Value 

    Service Enable 

    Selected 

    Baud Rate 

    9600

    Initialize Only 

    Not selected 

    Bidirectional 

    Selected 

    Software Carrier 

    Selected 

    Port Monitor Tag 

    zsmon

    Connect on Carrier 

    Selected 

    Service 

    /usr/sbin/aspppls

    Streams Modules 

    ldterm,ttcompat

    Timeout (secs) 

    Never

Starting and Stopping PPP


Note -

Once properly configured, PPP starts automatically at boot time.


Starting PPP on the Host
  1. Become superuser:


    host% su
    Password: root password
    

  2. Start PPP:


    # /etc/init.d/assppp start
    

  3. Make sure PPP started successfully:


    # netstat -i
    Name    Mtu  Net Dest   Address    Ipkts  Ierrs Opkts  Oerrs Collis Queue
    lo0     8232 loopback   localhost  1386   0     1386   0     0      0
    hme0    1500 host_name  host_name  93612  1714  73065  0     860    0
    ipdptp0 8232 target_PPP host_PPP   0      0     0      0     0      0
    # tail /etc/log/asppp.log
    12:31:34 Link manager (2099) started 11/27/99
    12:31:34 parse_config_file: Successful configuration
    12:31:40 000531 ipdptp0 SEND PPP ASYNC 29 Octets LCP Config-Req  ID=6b LEN=24
    MRU=1500 ACCM=000a0000 MAG#=cdf1e77f ProtFCOMP AddrCCOMP

Stopping PPP on the Host
  1. Become superuser:


    host% su
    Password: root password
    

  2. Stop PPP:


    # /etc/init.d/assppp stop
    

Making the PPP Target Visible to the Entire Network

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

Enabling Routing
  1. Enable routing:


    # ndd -set /dev/ip ip_forwarding 1
    

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


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

PPP on a Windows NT 4.0 Host

When PPP is used, Windows NT 4.0 allows the ChorusOS target to be fully connected to the enterprise LAN, making host-target communications possible with any network node, not only with the Windows NT 4.0 workstation.

PPP Connection Setup

This section explains how to set up the basic PPP connection between the host workstation and the ChorusOS target system.

Installing the Remote Access Service

Remote Access Service (RAS) and Dial-Up Networking (DUN) provide the basic serial line and modem connection services.

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

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

  3. Install Dial-Up Networking with ChorusOS Cable as the modem type. The ChorusOS Cable modem type is created during the initial installation of the host workstation environment.

Configuring the Serial Cable Connection
  1. Select Start | Settings | Control Panel.

  2. Double-click the Modems icon.

  3. Check Don't detect my modem; I will select it from a list., and then click the Next button.

  4. Select ChorusOS Cable from the list.

  5. Click the Properties... button.

  6. Select 9600 in the Maximum Speed combo box.

  7. Click the Connection tab.

  8. Click the Advanced... button.

  9. Check Record Log File.

  10. Confirm your selections, closing each dialog box by clicking the OK or Close button.

Configuring the Remote Access Service

Remote Access Service should be configured after you change the modem configuration.

  1. Select Start | Settings | Control Panel.

  2. Double-click the Network icon.

  3. Click the Services tab.

  4. Select Remote Access Services from the list.

  5. Click the Properties... button.

  6. Select COMx ChorusOS Serial Cable from the list.

  7. Click the Configure... button.

  8. Select Dial-out and receive calls in the Port Usage group, and then click the OK button.

  9. Click the Network... button.

  10. Make sure that only TCP/IP is selected in both the Dial-Out Protocols and Server Settings groups.

  11. Select Allow any authentication including clear text in the Encryption settings group.

  12. Click the Configure... button next to the TCP/IP checkbox.

  13. Select Entire network in the Allow remote TCP/IP clients to access group.

  14. Select Use static address pool.

  15. Enter the range of IP addresses that may be used for PPP.

    The range must contain at least two numbers, as the first number is used by the host workstation and the second by the ChorusOS target system. It is recommended that you use IP addresses on the same network as the Ethernet.

  16. Confirm your selections, closing each dialog box by clicking the OK or Close button.

    Windows NT 4.0 reconfigures its network settings and asks to reboot the system. Do not reboot the system yet.

Starting the Remote Access Service at Boot Time
  1. Select Start | Settings | Control Panel.

  2. Double-click the Services icon.

  3. Select Remote Access Server from the list.

  4. Click the Startup... button.

  5. Select Automatic in the Startup Type group.

  6. Click the OK button to close the Service dialog box.

  7. Click the Close button to close the Services dialog box.

Adjusting the Auto-Disconnect Timeout

By default, the Remote Access Service disconnects incoming connections after twenty minutes of inactivity, which may not be suitable with a ChorusOS system. You can modify the default behavior by editing the Registry.

  1. Select Start | Run.

  2. Enter regedit in the field provided to start the Registry Editor.

  3. Select

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteAccess\
    Parameters\Autodisconnect
    in the Registry tree view.

  4. Change the value from 0x14 to 0x0.

  5. Disable the timeout.

  6. Exit the Registry Editor.

  7. Reboot the Windows NT 4.0 system.

Checking the Remote Access Service

After rebooting, Windows NT 4.0 listens for incoming PPP calls on the serial line. You can run the Remote Access Admin administration tool to see the state of the port.

  1. Select Start|Programs|Administrative Tools (Common)|Remote Access Admin to start the application.

  2. If Remote Access Service is not started, select Server | Start Remote Access Service....

Authentication

The Windows NT 4.0 workstation PPP host requires that the client provide a valid username and password in order to connect. Both the username and password must be authorized for dial-in access in the Windows NT 4.0 user database.

Currently, the only authentication protocol shared by both ChorusOS systems and Windows NT 4.0 is the plain text Password Authentication Protocol (PAP). Therefore, you must select PAP for logging in. The username and password are the same as the ones used for logging in to the system.

Enabling Automated Target-to-Host Connections

In order to allow automated connections of diskless ChorusOS systems to the Windows NT 4.0 host at boot time, pppd supports a ChorusOS specific option, userpass username password, and its functional equivalent +ua filename, which makes it possible to obtain the same information from a file.

  1. Edit the options file to negotiate PAP, rather than CHAP authentication:

    # refuse CHAP authentication and require PAP
    refuse-chap
    require-pap
  2. Edit the pap.scr file to include the username and password needed for authentication:

    # pap.scr example
    # username * password
    myuser	* pa55word
Granting Dial-In Permission on the Host

Use the User Manager to authorize user to access the host workstation.

  1. Select Start|Programs|Administrative Tools (Common)|User Manager.

  2. Double-click user in the Username list.

  3. Click the Dialin button.

  4. Select Grant dialin permission to user.

  5. Confirm your selections, closing each dialog box by clicking the OK button.

Troubleshooting the PPP Connection

The following detailed logs can help you solve connection problems.

%SystemRoot%\ModemLog_ChorusOS_Cable.txt

The modem log traces what happens during the modem connection before PPP communications are established. The modem log is enabled when you select Record Log File as part of the modem configuration procedure.

%SystemRoot%\system32\ras\ppp.log

The PPP log traces setup of PPP communications. The PPP log must be explicitly enabled in the Registry, which you can do using the Registry Editor utility.

To start Registry Editor, select Start | Run, and then run regedit.

To enable the PPP log, set the

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\PPP\Logging
key to 1.

Addressing and Routing

On the Host

In order to make the ChorusOS system visible on the local Ethernet network, you must enable routing on the host workstation.

  1. Select Start | Settings | Control Panel.

  2. Double-click the Networks icon.

  3. Click the Protocols tab.

  4. Select TCP/IP Protocol from the list.

  5. Click the Properties... button.

  6. Click the Routing tab.

  7. Check Enable IP Forwarding.

  8. Confirm your selections, closing each dialog box by clicking the OK button.

  9. Reboot the host system.

On the ChorusOS Target

In order to route target IP traffic through the host workstation, you must add a default route to the IP address of the Windows NT 4.0 system after the connection from the target has been set up using the defaultroute option with pppd.

    Use the route command to enable a default route:


    $ rsh target route add default IP_address
    
    where IP_address is the IP address to which IP traffic is routed by default.


    Note -

    You can remove existing default routes using the delete option with the route command:


    $ rsh target route delete default IP_address
    


Sharing IP Addresses with the LAN

When you specify a subset of the addresses used on the local area network for serial line connections between the host workstation and one or more target systems, Windows NT 4.0 activates proxy-ARP for the connected serial clients automatically and behaves like a bridge. Windows NT 4.0 makes it possible, by default, to reach the PPP client from other systems on the Ethernet.

Setting the Connection Speed

In order to set the line speed to 115200 bits per second follow the procedure below.

  1. Set the baud rate when you connect the serial line on the target system:


    $ rsh target pppd /dev/tty01 115200
    

  2. Select Start | Settings | Control Panel.

  3. Click the Modems icon.

  4. Set the Maximum Speed to 115200.

  5. Confirm your selections, closing each dialog box by clicking the OK or Close button.

  6. Select Start|Programs|Administrative Tools (Common)|Remote Access Admin.

  7. Select Server | Stop Remote Access Service....

  8. Select Server | Start Remote Access Service....

  9. Boot the rebuilt ChorusOS system image on the target. It should be immediately visible on the network at the new speed.