|
||||||||
|
Connecting to BCPL.NET with Solaris 7 and Solaris 8 This page contains detailed step-by-step instructions to configure PPP on Solaris 7 and Solaris 8 to connect to BCPL.NET. These instructions also work on Solaris 2.6. Important Notes The instructions assume that your modem is external and attached to the first serial port but the instructions identify the changes needed to use a modem connected to the second serial port. Note that you must have a real modem; monstrosities known as WinModems are of no use whatsoever with unix. There may be additional configuration issues with internal modems; there's some useful advice at www.stokely.com/unix.serial.port.resources/ppp.slip.html. If your system fails to connect to BCPL.NET after following these instructions, the most likely explanation is that you've edited one or more of the files incorrectly. Please note that the format of some of the changes to configuration files is critical: some require a tab character between fields and some require a space. The safest way of making the changes is to save this Web page in a file, load it into a Web browser on Solaris and copy and paste lines from the Web page into the files which are edited. If you're reading this page on a Windows system, note that Solaris is quite happy to read files saved under Windows. If you have a system which can boot into either Windows or Solaris and your Windows c: drive is the master disc on the primary IDE controller, the following commands mount your c: drive under a directory called /dos in the Solaris file system: # mkdir /dos # mount -F pcfs /dev/dsk/c0d0p0:c /dos and you can perform this mount automatically at boot time by adding a line to /etc/vfstab which reads: /dev/dsk/c0d0p0:c - /dos pcfs - yes - Note that ":c" on the end of the device name means the first DOS partition on the drive. The following command mounts the second DOS partition on the same drive: # mount -F pcfs /dev/dsk/c0d0p0:d /dos Now for the instructions. No unix knowledge is assumed, other than the ability to edit files using a text editor. A step-by-step Guide to configuring PPP for BCPL.NET Please note that you must be logged in as root while configuring PPP. 1. Check that the UUCP packages have been installed:# pkginfo | grep UUCP Check that the following are installed: system SUNWbnur Networking UUCP Utilities, (Root) system SUNWbnuu Networking UUCP Utilities, (Usr) If this command just returns with a prompt, the packages aren't installed. Use pkgadd to install them as follows: For Intel (x86) Solaris 8: Insert the CD marked "Solaris 8 Intel Platform Edition Software CD 2 of 2" and type: # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWbnur # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWbnuu For SPARC Solaris 8: Insert the CD marked "Solaris 8 SPARC Platform Edition Software CD 2 of 2" and type: # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWbnur # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWbnuu For Intel (x86) Solaris 7: Insert the Intel Solaris 7 CD and type: # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWbnur # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWbnuu For SPARC Solaris 7: Insert the SPARC Solaris 7 CD and type: # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWbnur # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWbnuu
2. Check that the PPP packages have been installed:# pkginfo | grep ppp Check that (at least) the following are installed: On Solaris 8: system SUNWapppr PPP/IP Asynchronous PPP daemon configuration files system SUNWapppu PPP/IP Asynchronous PPP daemon and PPP login service system SUNWpppk PPP/IP and IPdialup Device Drivers On Solaris 7: system SUNWpppk Solstice PPP Device Drivers system SUNWapppu PPP/IP Asynchronous PPP daemon and PPP login service system SUNWapppr PPP/IP Asynchronous PPP daemon configuration files If you have 64-bit Solaris 7 or 8 installed, you should also see the package: system SUNWpppkx PPP/IP and IPdialup Device Drivers (64-bit) If not, use pkgadd to install them in the order shown below. For Intel (x86) Solaris 8: Insert the CD marked "Solaris 8 Intel Platform Edition Software CD 2 of 2" and type: # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWpppk # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWapppu # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWapppr And for 64-bit Solaris 8: # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWpppkx For SPARC Solaris 8: Insert the CD marked "Solaris 8 SPARC Platform Edition Software CD 2 of 2" and type: # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWpppk # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWapppu # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWapppr And for 64-bit Solaris 8: # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWpppkx For Intel (x86) Solaris 7: Insert the Intel Solaris 7 CD and type: # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWpppk # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWapppu # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWapppr And for 64-bit Solaris 7: # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWpppkx For SPARC Solaris 7: Insert the SPARC Solaris 7 CD and type: # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWpppk # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWapppu # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWapppr And for 64-bit Solaris 7: # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWpppkx If you happen to have the (commercial) server edition of Solaris 7 or Solaris 8, do not install the optional Solstice PPP product: it stops the bundled aspppd from working.
3. Configure your modem connection:Start admintool under CDE: # admintool& Select the Browse menu and then Serial Ports from the drop-down list. Click on the line starting a if your modem is attached to the first serial port or on the line starting b if your modem is connected to the second serial port. Select the Edit menu and then Modify from the drop-down list. Change the following fields: Template: Modem - Dial out Only Baud Rate: 38400 Cick on OK and close admintool.
4. Test communication with the modem:If your modem is attached to the first serial port: # tip /dev/cua/a If your modem is attached to the second serial port: # tip /dev/cua/b The modem should respond: connected Type: ATZ and the modem should respond: OK Close tip by typing: ~. If this doesn't work, and especially if you have an internal modem, have a look
at Celeste Stokely's Tutorial on Solaris 2.x Modems & Terminals (www.stokely.com/unix.serial.port.resources/ppp.slip.html)
which contains a wealth of useful information about modems. 5. Edit /etc/uucp/Devices:Edit /etc/uucp/Devices to comment out the last two lines: ACU cua/b - Any hayes Direct cua/b - Any direct by prefixing them with a # symbol and add: ACU cua/a - Any hayes If your modem is attached to the second serial port, this line should read: ACU cua/b - Any hayes
6. Edit /etc/uucp/Dialers:Edit /etc/uucp/Dialers to comment out the existing line starting 'hayes' by prefixing it with a # symbol and add: hayes =,-, "" P_ZERO "" \d "" ATZ\r OK ATDT\T\r\c CONNECT In this line: hayes identifies the modem type =,- is a translation table reference and the rest of the line is a chat script for the first part of the dialup process. It consists of a series of prompts expected from the modem followed by the responses which should be made by your system, with each prompt and response string separated with a space character: "" P_ZERO Wait for nothing and set zero parity "" \d Wait for nothing and delay for 2 seconds "" ATZ\r Wait for nothing and send "ATZ" to initialise the modem OK ATDT\T\r\c Wait for an "OK" response and dial the telephone number listed in the entry in /etc/uucp/Systems CONNECT Wait for a "CONNECT" response from the modem If your modem needs a specific initialisation string, replace 'ATZ' with the required string.
7. Edit /etc/uucp/Systems:BCPL.NET uses the conventional Login and Password method of authentication. Add to the end of /etc/uucp/Systems the following line: bcpl-ppp Any ACU 115200 4102965500 ername: username word: password ection: 1 ~ "" STTY=crtscts Where username and password are the username and password from your Welcome Letter. The elements in this line are described below: bcpl-ppp This is a name which identifies the connection details for BCPL.NET. The name needs to match the name specified in the /etc/asppp.cf file which is described later. Any Make the connection at any time ACU The device type 115200 The speed used in communication between the PC and modem 4102965500 The telephone number used to dial in to BCPL.NET. The rest of this line is a chat script defining the login or authentication process. It consists of a series of prompts followed by the responses which should be made by your system, with each prompt and response string separated with a space character. There must be a line feed (LF) character at the end of the line added to this file. If using a graphical editor, such as the one supplied with CDE, ensure that the cursor is positioned at the start of the line following the inserted line before saving the file. If this LF character is omitted, the aspppd log file will report: Call Failed: SYSTEM NOT IN Systems FILE 8. A word about modem speedsThe 115200 in the /etc/uucp/Systems file sets the speed at which the serial port hardware communicates with the modem to 115,200 bits per second. It's important to understand that there are two speeds to be considered in modem communication. There's the speed at which the host computer talks to a connected modem and this is known as the Data Terminal Equipment or DTE speed. There's also the speed at which the modem transmits and receives data across the telphone line and this is known as the Data Communication Equipment or DCE speed. A 56K or V90 modem is capable of a DCE speed of up to 56K, although this is unlikely to be achieved in practice. Data sent down a telephone connection is often compressed with the receiving modem uncompressing the data before sending it to the host computer. So a modem to modem speed (DCE) of 56K could result in a modem to computer speed (DTE) well in excess of 56K. For this reason, the DTE speed should be set at least 50% higher than the maximum DCE speed and a DTE speed of 115200 is recommended for use with 56K modems. However, not all hardware is capable of talking to a serial port at this speed. If you have an Intel P90 or better, your system should be able to sustain a DTE speed of 115200. If you have an older system, you may well not be able to drive a V90 modem at its maximum speed and will need to experiment to find the highest DTE speed that your hardware supports. If 115200 doesn't work, try specifying 38400, 19200 or 9600 in the line in /etc/uucp/Systems.
9. Create /etc/resolv.conf.bcpl:domain bcpl.net nameserver 204.255.212.10 nameserver 204.255.212.11 Name this file "/etc/resolv.conf.bcpl". This file is activated by means of a dialup script, as shown later, which allows simple configuration of Solaris to connect to more than one ISP if necessary.
Note:Some editors (including CDE's text editor) create files with permissions of 600 which means that only the owner can read the file. If /etc/resolv.conf.bcpl has these permissions, only root will be able to use the dial-up connection. To ensure that the dial-up connectivity is accessible to all users, change the permissions on this file: # chmod 644 /etc/resolv.conf.bcpl
10. Edit /etc/asppp.cf:Make two copies of /etc/asppp.cf: # cp /etc/asppp.cf /etc/asppp.cf.original # cp /etc/asppp.cf /etc/asppp.cf.bcpl You can edit the original version of this file if you wish, but be aware that the aspppd daemon starts automatically at boot time if /etc/asppp.cf exists and dials on demand if this file contains an 'ifconfig' line. This may be inconvenient, unexpected, and costly in telephone charges. It's much safer to make these changes in a copy of the file and activate the copy in a script as shown later: this gives you control over the dialup process. Edit /etc/asppp.cf.bcpl and add to the end of this file: ifconfig ipdptp0 plumb 1.1.1.1 2.2.2.2 up path inactivity_timeout 300 # Terminate the connection after 5 minutes of inactivity interface ipdptp0 # Use the point-to-point interface debug_level 9 # Full logging negotiate_address on # Obtain a dynamic IP address from the ISP default_route # Use the dialup link as the default route for IP packets peer_system_name bcpl-ppp # Must match the name used in /etc/uucp/Systems Note that the name specified on the peer_system_name line must match the name used in /etc/uucp/Systems. A common mistake is to use a hyphen in one file (bcpl-ppp) and an underline character in the other (bcpl_ppp). Make sure that they match! The ifconfig line configures network interface parameters: ipdptp0 The point-to-point interface plumb Open the device and set up streams needed for TCP/IP 1.1.1.1 A dummy IP address for your system when using a dynamic IP address 2.2.2.2 A dummy IP address for the ISP's gateway system The IP addresses 1.1.1.1 and 2.2.2.2 are replaced automatically during the PPP negotiation phase with the dynamic IP address assigned by BCPL.NET to the connection and with the real address of the gateway. Adjust the inactivity timeout if desired. Change permissions on the asppp.cf files: # chmod 600 /etc/asppp.cf.original /etc/asppp.cf.bcpl
11. Check /etc/nsswitch.dns and /etc/nsswitch.files:Check whether your system has files named /etc/nsswitch.dns and /etc/nsswitch.files: # ls /etc/nsswitch.dns /etc/nsswitch.files /etc/nsswitch.dns /etc/nsswitch.files These files exist in later versions of Solaris 7 and in Solaris 8, but not in early versions of Solaris 7. If both files exist, skip the rest of this step. If one or both files don't exist, create them as follows: /etc/nsswitch.dns: Create this file by copying /etc/nsswitch.conf: # cp /etc/nsswitch.conf /etc/nsswitch.dns Edit /etc/nsswitch.dns and check that the line starting "hosts:" reads as follows, changing it if necessary: hosts: files dns Make sure that the file has the correct permissions: # chmod 644 /etc/nsswitch.dns /etc/nsswitch.files: Create this file by copying /etc/nsswitch.conf: # cp /etc/nsswitch.conf /etc/nsswitch.files Edit /etc/nsswitch.files and check that the line starting "hosts:" reads as follows, changing it if necessary: hosts: files Make sure that the file has the correct permissions: # chmod 644 /etc/nsswitch.files
12. Create the aspppd log file:# touch /var/adm/log/asppp.log This file is written to by the aspppd daemon and is invaluable for diagnosing errors in the configuration process.
13. Inhibit sending of RIP packets:in.routed may send routing information packets (RIP) on the dialup link. This is undesirable and is prevented by creating a file named /etc/gateways containing the single line: norip ipdptp0
14. Stop the system acting as a router:Solaris may decide that your system is a router, running routed and router discovery. This is undesirable on a dialup connection and is prevented by creating an empty file named /etc/notrouter: # touch /etc/notrouter
15. Disable host caching:The name service cache daemon (nscd) causes problems with name lookups on intermittently-connected systems. Disable host caching by editing the /etc/nscd.conf file and uncommenting the line: # enable-cache hosts no so that it reads: enable-cache hosts no Then stop and restart the nscd daemon: # /etc/init.d/nscd stop # /etc/init.d/nscd start
16. Log incoming TCP/IP connections:Change the last line in /etc/rc2.d/S72inetsvc from: /usr/sbin/inetd -s & to: /usr/sbin/inetd -s -t & This instructs inetd to log incoming TCP/IP connections to /var/adm/messages. Note that if you use the Open Windows text editor to edit the file, the editor saves the orginal file in /etc/rc2.d as S72inetsvc%. If this file is left in place, Solaris will execute both the original file and the edited file during boot up and this will result in error messages being reported to the console. After editing the file, delete the saved original file by doing: # rm /etc/rc2.d/S72inetsvc% It's necessary to do this only when the file is edited using the Open Windows
text editor. The CDE text editor doesn't save the original file. 17. Create a dialup script named /dialup :cp -p /etc/resolv.conf.bcpl /etc/resolv.conf cp -p /etc/asppp.cf.bcpl /etc/asppp.cf cp -p /etc/nsswitch.dns /etc/nsswitch.conf /etc/init.d/asppp start /usr/sbin/ping 2.2.2.2 The script activates your BCPL.NET-specific versions of /etc/resolv.conf,
/etc/asppp.cf and /etc/nsswitch.conf and starts the aspppd daemon which dials on demand
and routes PPP packets across the dialup link. Finally, it pings the dummy gateway address
which causes aspppd to start the dialup process. 18. Create a hangup script named /hangup:/etc/init.d/asppp stop rm /etc/resolv.conf cp -p /etc/asppp.cf.original /etc/asppp.cf cp -p /etc/nsswitch.files /etc/nsswitch.conf /usr/sbin/route -f This script stops aspppd which terminates the dialup connection, deletes /etc/resolv.conf and re-instates the original versions of /etc/asppp.cf and /etc/nsswitch.conf. Finally, it flushes the gateway entry from the routing table.
19. Make these scripts executable:# chmod 700 /dialup /hangup
20. Reboot:# init 6 This isn't essential (Solaris very rarely requires a reboot) but it has the effect of testing the changes you've made to scripts which are run at boot time. Connecting to BCPL.NET After rebooting, your system should be fully configured for dialing in to BCPL.NET.
To test the dial-up link:Open two terninal windows on your screen. In the first window, type: # tail -f /var/adm/log/asppp.log This will display the contents of the PPP log file as it is written to by the asppp daemon and enables the progress of the connection to be monitored. In the second window, run the dial-up script by typing: # /dialup Watch the log window and you'll see the interaction with the modem, the telephone number being dialled and the CONNECT response from the modem when the two modems at each end of the link have negotiated a connection. The log window will show the login followed by some PPP frames as the PPP negotiation is performed. When PPP negotiation has finished, the log file displays: start_ip: IP up on interface ipdptp0, timeout set for 300 seconds which indicates that the link is fully up and ready to carry traffic. After this point, the log window shows each PPP frame carried on the link. The log file can grow large very quickly and you may wish to reduce the logging level when you're happy that the connection process is working properly. Note that the 'ping' command in the dial-up script will fail because the pinged address doesn't exist. Don't worry about this; its purpose is simply to prod aspppd into action and start the dial-up process. After connection is established, test the link by telnetting to mail.bcpl.net, or just fire up your web browser. Shameless plug: make your first stop http://www.bcpl.net
To stop the dial-up link, type:# /hangup To monitor TCP/IP packets while connected:# snoop -d ipdptp0 Further configuration Logging levelsWhen you're sure that the dialup connection is working properly, you may like to reduce the logging information written to /var/adm/log/asppp.log by changing the line in /etc/asppp.cf.bcpl which reads: debug_level 9 # Full logging to: debug_level 5 # Log all uucp chat script info Level 5 logs the connection process but not PPP messages or raw IP packets. NetscapeSome recent versions of Netscape for Solaris don't work properly if the name server cache daemon (nscd) is configured not to cache host name lookups as described on this page. Symptoms are that Netscape works fine when given the IP address of a Web server but times out when given the name of a Web server. This problem doesn't occur on all systems but, if it happens on your system, the solution is to undo the changes to /etc/nscd.conf. Edit this file to replace: enable-cache hosts no with: # enable-cache hosts no Then stop and restart the nscd daemon: # /etc/init.d/nscd stop # /etc/init.d/nscd start
A graphical Internet DialerDave Everly has written an excellent Internet Dialer script for Solaris that enables you to select an ISP and connect to the Net with just a few clicks of the mouse. This script assumes that you have already configured your Solaris system to connect to the Net as described here and provides a graphical user interface as an alternative to using the /dialup and /hangup scripts directly. The script can be downloaded from http://www.kempston.net/solaris/dialer.html which also contains a screenshot and full details on installing and configuring the script. A word of thanks The original version of this page was created and is maintained by Mike Mann, who graciously let us edit it to suit our needs. If you have any comments or suggestions for improvement, or have found any technical errors, please email him at mike@kempston.net. The original page, as well as a wealth of other information is available at http://www.kempston.net. This information is copyright mike@kempston.net 2000. Some information from
the original has been edited by BCPL.NET. Reproduction is forbidden without the author's
permission. |
||||||||