Solaris Resources at Kempston

Connecting to Any ISP with Solaris 7 and Solaris 8

www.kempston.net/solaris/ www.kempston.org/solaris/

This page contains detailed step-by-step instructions to configure PPP on Solaris 7 and Solaris 8 to connect to any ISP. These instructions also work on Solaris 2.6.

Note for German readers:

Für alle deutschsprachigen Leser ist diese Anleitung freundlicherweise von Andreas Backhaus übersetzt worden. Die deutsche Übersetzung ist sowohl im PDF als auch im Postscript Format verfügbar. (For all German-speaking readers, this guide has been kindly translated by Andreas Backhaus. The German translation is available either in PDF or in Postscript Format)

If you have an account with Demon Internet, Netcom UK, U-Net, Direct Connection or Freeserve, which are all Internet Service Providers in the UK, or with Netgate, an ISP in California, please select the appropriate link below. These provide step-by-step instructions with all the details which are specific to these ISPs.

Configuring PPP to connect to Demon Internet
Configuring PPP to connect to Netcom UK
Configuring PPP to connect to Netgate
Configuring PPP to connect to U-Net
Configuring PPP to connect to Direct Connection
Configuring PPP to connect to Freeserve

Some people who have used these pages successfully have kindly provided specific details for some other ISPs. Have a look to see whether your ISP is listed. If not, please email me at mike@kempston.net with the details listed at the foot of this page and I'll add your ISP to the list.

This page contains rather more explanation than is given in the instructions for the specific ISPs listed above so that you can modify the instructions for your particular ISP. The ISP-specific information which you will need in order to implement these instructions is:

	your dialup username
	your dialup password
	your static IP address (if you have one - most dial-up users don't)
	details of the login or authentication script
	the domain name of your ISP
	the IP addresses of your ISP's name servers (usually two)
	the telephone number your modem dials to connect to your ISP
	whether you wish to authenticate using a username and password or by means of PAP or CHAP

Some ISPs require a dial up system to authenticate by responding to conventional Login and Password prompts, some require the use of PAP or CHAP where authentication is part of the initial PPP negotiation, and some allow either method. I recommend using the username and password technique first, if your ISP supports it, because it's easier to see what's happening. When this is working, you can change to PAP or CHAP if you wish and this establishes the connection a little faster.

I've used an imaginary ISP called Zulu Internet in these instructions. If there is an ISP of this name, these instructions don't necessarily apply to it!

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. Unfortnately, I have no experience of using internal modems with Solaris and there may be additional configuration issues with these. I'm not able to advise about issues with internal modems but there's some useful advice at Celeste Stokely's Web pages and especially in her Tutorial on Solaris 2.x Modems & Terminals which is highly recommended.

These instructions do work and many people have configured a dial up connection using them. If your system fails to connect to your ISP after following them, 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 any ISP

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 and Solaris 7 (11/99):

	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 earlier versions of 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

tip should respond:

	connected

which indicates that tip has connected to the serial port. To check that the system can communicate with the modem, 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 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 "" AT&F1\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
	"" AT&F1\r	Wait for nothing and send "AT&F1" 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

The initialisation string 'AT&F1' is correct for 3Com and US Robotics modems and sets the modem to hardware flow control. If your modem needs a different initialisation string to set hardware flow control, replace 'AT&F1' with the required string.


7. Edit /etc/uucp/Systems:

The changes needed to /etc/uucp/Systems are different depending on whether you wish to authenticate by responding to Login and Password prompts or whether you wish to use PAP or CHAP.

If you're using the conventional Login and Password method, add to the end of /etc/uucp/Systems a line such as:

	isp-ppp Any ACU 115200 telephonenumber ogin: username word: password "" STTY=crtscts

The elements in this line are described below:

isp-ppp			This is a name which identifies the connection details for a
			particular ISP.  The name needs to match the name specified in the
			/etc/asppp.cf file which is described later.  As an example, if
			your ISP is named Zulu Internet, you could use the name "zulu-ppp"

Any			Make the connection at any time	

ACU			The device type

115200			The speed used in communication between the PC and modem

telephonenumber		The telephone number used to dial up your ISP.

The rest of this line is a chat script defining the login or authentication process. It consists of a series of prompts expected from the ISP followed by the responses which should be made by your system, with each prompt and response string separated with a space character. The prompt strings in this script should specify the end of the expected response from the ISP. The example chat script listed above is interpreted as follows:

When a connection has been made, wait for a prompt from the ISP ending "ogin:" (the end of a prompt which may read "Zulu Internet login:") and reply with username. Then wait for another prompt which ends "word:" (the end of a prompt which reads "Password:") and reply with password. Replace username and password with your own dialup username and password. When the password has been sent, wait for nothing (the two quote characters) and set hardware flow control (STTY=crtscts). Hardware flow control is essential when using high-speed modems. When your system has received and replied to the last prompt on this line, it will switch to PPP to complete the connection process.

The script "ogin: username word: password" is sufficient for most ISPs but some may prompt with "Username" instead of "login:" and some may require further responses. One possible login sequence is:

	Zulu Internet login: username
	Password: password
	Protocol: ppp
	Zulu Internet status: all systems go
	HELLO

And the corresponding chat script for this sequence is "ogin: username word: password ocol: ppp HELLO". Waiting for the final "HELLO" stops your system switching to PPP too early.

If you don't know the exact login sequence used by your ISP, either ask them or dial in using an ordinary terminal program and observe the prompts.

If you wish, or need, to authenticate using PAP or CHAP, the changes to this file are simpler. Just add a line to /etc/uucp/Systems reading:

	isp-ppp Any ACU 115200 telephonenumber \n STTY=crtscts

The "\n" in this line waits for the end of the CONNECT string from the modem so that the connect speed is recorded in the asppp.log file.

If you want to be able to connect to more than one ISP, you can add additional lines to this file for the other ISPs.

Note: 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 speeds

The 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 Sun hardware is capable of talking to a serial port at this speed. If you have a Sun Ultra 5 or better, or an Intel P90 or better, your system should be able to sustain a DTE speed of 115200. If you have an older Sun 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.isp:

	domain domain-name
	nameserver first-name-server-IP-address
	nameserver second-name-server-IP-address

Name this file "/etc/resolv.conf" with a suffix of ".isp" where isp is the name of your ISP. 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. Replace domain-name with the domain name of your ISP (such as zulu.net), first-name-server-IP-address with the IP address of your ISP's primary name server and second-name-server-IP-address with the IP address of your ISP's secondary name server.

The "domain" line in the file allows you to specify short names for systems within your ISP's domain: if domain name is "zulu.net" then typing "telnet gate" while connected to Zulu Internet is equivalent to typing "telnet gate.zulu.net. The name server IP addresses identify the name servers which should be used for translating fully qualified domain names into the corresponding IP addresses.

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


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

where ".isp" is the name of your ISP. 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.

If your ISP allocates dynamic IP addresses (most do), edit /etc/asppp.cf.isp 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 isp-ppp	# Must match the name used in /etc/uucp/Systems

If you have a static IP address, edit /etc/asppp.cf.isp and add to the end of this file:

	ifconfig ipdptp0 plumb your-IP-address 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
		default_route		# Use the dialup link as the default route for IP packets
		peer_system_name isp-ppp	# Must match the name used in /etc/uucp/Systems

replacing your-IP-address with the static IP address allocated to you by your ISP.

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 (isp-ppp) and an underline character in the other (isp_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 your ISP to the connection and with the real address of the ISP's gateway. Adjust the inactivity timeout if desired.

If you're authenticating using PAP (don't do this if you're using the conventional Login and Password method), add three additional lines to /etc/asppp.cf.isp immediately after the 'peer_system_name' line, reading:

		will_do_authentication pap
		pap_id username
		pap_password password

replacing username with your username and password with your password.

If you're authenticating using CHAP (don't do this if you're using either the conventional Login and Password method or PAP), add three additional lines to /etc/asppp.cf.isp immediately after the 'peer_system_name' line, reading:

		will_do_authentication chap
		chap_name username
		chap_secret password

replacing username with your username and password with your password. Note that some ISPs, such as Worldnet, require the fully qualified domain name in the "chap_name" field, such as 999999999@worldnet.att.net but most ISPs simply require username.

Change permissions on the asppp.cf files:

	# chmod 600 /etc/asppp.cf.original /etc/asppp.cf.isp


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.

The nsswitch.files file is used while your system isn't connected to your ISP and tells your system to look in /etc/inet/hosts when it needs to look up an IP address. The nsswitch.dns file is used while your system is connnected to your ISP and tells your system to look in /etc/inet/hosts first but to use your ISP's DNS name servers if the address isn't listed in the local hosts file.

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.isp /etc/resolv.conf
	cp -p /etc/asppp.cf.isp /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 ISP-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 Your ISP

After rebooting, your system should be fully configured for dialling into your ISP.


To test the dial-up link:

Open two terminal 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. If you're authenticating using a Login and Password script, the log window will show the login followed by some PPP frames as the PPP negotiation is performed. If you've configured your system to perform PAP or CHAP authentication, the log file will show PPP frames as soon as a connection has been established.

The PPP frames displayed in the log window may not make much sense unless you're familiar with the detail of the PPP protocol. There are some examples of typical PPP negotiations, with an explanation of what it all means, in my page on Analysing the asppp log file on Solaris. Have a look at this if you're interested and especially if the connection fails for any reason.

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 using ping and nslookup, or just fire up Netscape for Solaris and have a look at www.sunfreeware.com

Be aware that it's not advisable to connect to the Internet routinely while logged in as root and, in particular, running any Web browser as root may compromise the security of your system. Once you've checked that the PPP configuration is working, I'd recommend that you always start the dialup process while logged in as an ordinary non-privileged user. There's a small problem here, in so far as the /dialup and /hangup scripts must be run with root privileges. The solution is an excellent program called sudo (Super User Do) that enables specified programs and scripts to be run as root from an ordinary user. Please see my Web page on installing sudo for details.


To stop the dial-up link, type:

	# /hangup


To monitor TCP/IP packets while connected:

	# snoop -d ipdptp0

Further configuration

Logging levels

When 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.isp 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.


Netscape

Some 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 Dialer

Dave 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 my Web page on A GUI Internet Dialer for Solaris 7 which also contains a screenshot and full details on installing and configuring the script.


Configuring mail

Now that you've successfully configured Solaris to make a dial up connection to your ISP, you may like to follow my instructions for Configuring mail so that you can send and receive email using Solaris.


Security

Consider installing TCP wrappers to give you at least some security from unwelcome visitors when your Solaris system is connected to the Net.



Connecting to multiple ISPs:

One advantage of creating ISP-specific files for use with a dialup script is that it's simple to configure Solaris to dial into one of several ISPs under user control.

My /dialup script reads as follows:

#!/sbin/sh
#
# PPP Dialup script for Demon, Netcom, U-Net and Freeserve
# Copyright (c) mike@kempston.net 1999

case "$1" in

'demon')
	/etc/init.d/sendmail stop
	cp /etc/resolv.conf.demon /etc/resolv.conf
	cp /etc/asppp.cf.demon /etc/asppp.cf
	cp /etc/nsswitch.dns /etc/nsswitch.conf
	/etc/init.d/asppp start
	/usr/sbin/ping 158.152.1.222
	;;

'netcom')
	cp /etc/resolv.conf.netcom /etc/resolv.conf
	cp /etc/asppp.cf.netcom /etc/asppp.cf
	cp /etc/nsswitch.dns /etc/nsswitch.conf
	/etc/init.d/asppp start
	/usr/sbin/ping 2.2.2.2
	;;

'unet')
	cp /etc/resolv.conf.unet /etc/resolv.conf
	cp /etc/asppp.cf.unet /etc/asppp.cf
	cp /etc/nsswitch.dns /etc/nsswitch.conf
	/etc/init.d/asppp start
	/usr/sbin/ping 2.2.2.2
	;;

'freeserve')
	cp /etc/resolv.conf.freeserve /etc/resolv.conf
	cp /etc/asppp.cf.freeserve /etc/asppp.cf
	cp /etc/nsswitch.dns /etc/nsswitch.conf
	/etc/init.d/asppp start
	/usr/sbin/ping 2.2.2.2
	;;

*)

	echo "Usage: $0 { demon | netcom | unet | freeserve }"
	exit 1
	;;

esac
exit 0

So I can choose which ISP I dial into by typing one of:

  # /dialup demon
  # /dialup netcom
  # /dialup unet
  # /dialup freeserve

Has this guide been useful?

I hope these instructions prove useful. If you have any comments or suggestions for improvement, or have found any technical errors, please email me at mike@kempston.net

This page is copyright © mike@kempston.net 2000. Reproduction is forbidden without the author's permission. You are welcome to link to these pages if you wish but please point to the pages at www.kempston.net: Solaris Resources at Kempston


Would you like to help others to connect to your ISP?

If you successfully connect to your ISP using these instructions, please consider emailing me at mike@kempston.net with the following information:

  A copy of the line in your /etc/uucp/Systems file which contains the chat script (without your password!)
  A copy of your /etc/resolv.conf file
  whether your ISP supports Login and Password authentication, PAP, or both of these

and I'll be happy to add to these pages the details which are specific to your ISP.


Home Free Solaris Connecting to an ISP
Configuring mail Configuring modem dialup Configuring a PPP server
Installing Software Solaris FAQs and Software Site Index

This page is maintained by the Kempston Webmaster
Last updated 19 November 2000