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.
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.
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.
This document does not provide information about modem configuration commands, nor does it provide information about the cables required for connecting modems to targets.
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.
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.
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.
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.
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.
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.
First, you run pppstart, a daemon that listens for requests for connection.
Next, you use the pppd command to enable a connection to a specific serial line.
When finished with a PPP connection, you may close it using the pppclose command.
Finally, you can disable PPP services altogether using the pppstop command.
In order to make sure the Ethernet interface can still be used for IP traffic, use different IP addresses for Ethernet and IP.
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.
Enabling PPP services involves using the pppstart actor.
Change to the directory where you build system images:
host% cd build_dir |
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.
Start the ews configuration utility:
host% ews conf/ChorusOS.xml & |
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 |
|
Include the pppstart.r actor in the system image.
Rebuild the system image.
Copy the system image to the boot server:
host% rcp system_image_name boot_server:/tftpboot |
Reboot the target system:
host% rsh target reboot |
Ensure that both serial lines and network interfaces are available for PPP.
Run the actor:
host% rsh target arun /bin/pppstart & |
Opening an available PPP line involves the built-in C_INIT
command, pppd.
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.
Closing an open PPP line involves using the pppclose command.
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.
Disabling PPP services involves using the pppstop command.
Run the built-in C_INIT
command, pppstop, on the target system:
host% rsh target pppstop |
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.
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.
Before configuring PPP, check that the following packages are installed on the host workstation:
SUNWbnuu
SUNWbnur
SUNWpppk
SUNWapppu
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.
This section describes all files which must be created or modified to configure PPP on a Solaris host.
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
Add the system name to /etc/uucp/Systems:
# Name Connect Hour Device to Use Connection speed target Any Direct 9600
Add the device to /etc/uucp/Devices:
# Name Physical device Unused Connection speed Direct Dialer # (no modem) Direct cua/a - 9600 direct
Make sure that the dialer called direct exists in /etc/uucp/Dialers:
host% grep direct /etc/uucp/Dialers direct |
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
This section describes how to modify the terminal configuration to allow a PPP connection without login.
Start admintool.
Select Serial Ports from the Browse menu.
Double-click the port to use for PPP.
Click the Expert radio button in the Detail field.
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 |
Once properly configured, PPP starts automatically at boot time.
Become superuser:
host% su Password: root password |
Start PPP:
# /etc/init.d/assppp start |
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 |
If you want the PPP target to be visible from the whole network, you must enable routing on your workstation.
Enable routing:
# ndd -set /dev/ip ip_forwarding 1 |
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 |
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.
This section explains how to set up the basic PPP connection between the host workstation and the ChorusOS target system.
Remote Access Service (RAS) and Dial-Up Networking (DUN) provide the basic serial line and modem connection services.
Double-click the My Computer icon on the desktop.
Double-click the Dial-Up Networking icon.
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.
Select Start | Settings | Control Panel.
Double-click the Modems icon.
Check Don't detect my modem; I will select it from a list., and then click the Next button.
Select ChorusOS Cable from the list.
Click the Properties... button.
Select 9600 in the Maximum Speed combo box.
Click the Connection tab.
Click the Advanced... button.
Check Record Log File.
Confirm your selections, closing each dialog box by clicking the OK or Close button.
Remote Access Service should be configured after you change the modem configuration.
Select Start | Settings | Control Panel.
Double-click the Network icon.
Click the Services tab.
Select Remote Access Services from the list.
Click the Properties... button.
Select COMx ChorusOS Serial Cable from the list.
Click the Configure... button.
Select Dial-out and receive calls in the Port Usage group, and then click the OK button.
Click the Network... button.
Make sure that only TCP/IP is selected in both the Dial-Out Protocols and Server Settings groups.
Select Allow any authentication including clear text in the Encryption settings group.
Click the Configure... button next to the TCP/IP checkbox.
Select Entire network in the Allow remote TCP/IP clients to access group.
Select Use static address pool.
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.
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.
Select Start | Settings | Control Panel.
Double-click the Services icon.
Select Remote Access Server from the list.
Click the Startup... button.
Select Automatic in the Startup Type group.
Click the OK button to close the Service dialog box.
Click the Close button to close the Services dialog box.
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.
Select Start | Run.
Enter regedit in the field provided to start the Registry Editor
.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteAccess\ Parameters\Autodisconnectin the Registry tree view.
Change the value from 0x14 to 0x0.
Disable the timeout.
Exit the Registry Editor
.
Reboot the Windows NT 4.0 system.
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.
Select Start|Programs|Administrative Tools (Common)|Remote Access Admin to start the application.
If Remote Access Service is not started, select Server | Start Remote Access Service....
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.
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.
Edit the options file to negotiate PAP, rather than CHAP authentication:
# refuse CHAP authentication and require PAP refuse-chap require-pap
Edit the pap.scr file to include the username and password needed for authentication:
# pap.scr example # username * password myuser * pa55word
Use the User Manager
to authorize user to access the host
workstation.
Select Start|Programs|Administrative Tools (Common)|User Manager.
Double-click user in the Username list.
Click the Dialin button.
Select Grant dialin permission to user.
Confirm your selections, closing each dialog box by clicking the OK button.
The following detailed logs can help you solve connection problems.
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.
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\Loggingkey to 1.
In order to make the ChorusOS system visible on the local Ethernet network, you must enable routing on the host workstation.
Select Start | Settings | Control Panel.
Double-click the Networks icon.
Click the Protocols tab.
Select TCP/IP Protocol from the list.
Click the Properties... button.
Click the Routing tab.
Check Enable IP Forwarding.
Confirm your selections, closing each dialog box by clicking the OK button.
Reboot the host system.
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 |
You can remove existing default routes using the delete option with the route command:
$ rsh target route delete default IP_address |
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.
In order to set the line speed to 115200 bits per second follow the procedure below.
Set the baud rate when you connect the serial line on the target system:
$ rsh target pppd /dev/tty01 115200 |
Select Start | Settings | Control Panel.
Click the Modems icon.
Set the Maximum Speed to 115200.
Confirm your selections, closing each dialog box by clicking the OK or Close button.
Select Start|Programs|Administrative Tools (Common)|Remote Access Admin.
Select Server | Stop Remote Access Service....
Select Server | Start Remote Access Service....
Boot the rebuilt ChorusOS system image on the target. It should be immediately visible on the network at the new speed.