![]()
Note: This document is from SGI support.
Here is a straightforward, cookbook type document on setting up a PPP connection through a modem to an Internet Provider under IRIX 5.3. I've compiled a general list of instructions that strives for simplicity at the cost of thoroughness.
Because the ppp program can use the UUCP control files, the best way to install a PPP connection is to first install a UUCP connection.
First we'll create the appropriate entries in the /etc/uucp/Devices and /etc/uucp/Systems files, and then we'll "debug" the connection with "cu -d" commands.
The following assumptions are made in the setup that follows:
-Generic IP addresses are listed as "X.X.X.X", actual entries will look like "192.0.2.1"
1. From your Internet Service Provider (ISP) obtain the following info:
a) Is my IP address:
static - they provide you with a permenant address
or
dynamic - it's allocated randomly with each connection
b) What is the IP address of their DNS name server?
c) What is the phone number of my ISP?
d) What is my login name and password?
2. Install eoe2.sw.uucp and eoe2.sw.ppp from the IRIX 5.3 OS cd.
3. Run one of the /etc/uucp/fix-xxx scripts to initialize your modem.
Scripts are provided for:
fix-dsi Digicom Systems 9624+ or Scout+
fix-hayes Hayes "Smartmodem" or "ACCURA"
fix-intel Intel 14.4ex modem
fix-telebit Trailblazer TB+, T2000, T2500, T1600, T3000, QBlazer
fix-usr USRobotics modem
fix-zyxel XyXEL U-1496E
If your modem does not have a fix script written for it, try runningthe following:
#/etc/uucp/fix-hayes -o -mACCURA -s38400 2
This configures the modem for dial-out with a serial speed of 38400.
If you cannot get one of the fix scripts to successfully configure your modem, you'll have to configure it by hand. See the comments in the /etc/uucp/fix-hayes script for more details.
4. Edit the /etc/uucp/Devices file and insert the following line
Direct ttyf2 - Any direct
5. Test a direct connection to your modem
#cu -lttyf2 -s38400 -d
After receving "transmit started", you can enter AT command to your modem. Try dialing your ISP using "atdt" (note that all phone numbers are just examples - no real numbers are used)
transmit started atdt918005552368 DIALING RRING CONNECT 38400/LAPM/COMP/9600 Telebit's NetBlazer Version 1.5 depth login:
6. At this point you want to record the login process on your ISP's machine.
We're going to automate this process later, so give your username, password and whatever else you're prompted for and record the prompts.
ex. 1
Login: joeblow Password: fromidaho IRIX Release 5.3 IP22 avgjoe Copyright 1987-1994 Silicon Graphics, Inc. All Rights Reserved. Last login: Tue Jul 11 22:24:41 EDT 1995 on ttyf2 starting PPP
ex. 2
Welcome to Crazy Ed's Internet-O-Rama!!!!
username> joeblow secret code> fromidaho Would you like 1)shell 2)slip or 3)ppp service?> 3 Hold onto your hat! Here we go
7. Add the following line to your /etc/uucp/Devices file
ACUppp ttyf2 null 38400 212 x hayes14
Change "hayes14" to match your modem's entry in /etc/uucp/Dialers, if it exists.
8. Verify this new entry is correct
#cu -d -c ACUppp 918008001546
9. Add the following line to your /etc/uucp/Systems file
remote Any ACUppp 38400 <phone number>
ex.
remote Any ACUppp 38400 918008001546
10. Verify this works
#cu -d remote
11. Ok, now we need to create a chat script that automates the login process into your ISP's server. Here are two examples of chat scripts from step 6.
ex. 1
"" @\r\c ogin:--ogin: joeblow sword: fromidaho PPP
ex. 2
"" @\r\c name>--name> joeblow code> fromidaho vice?> 3 go
Integrate this chat script into your /etc/uucp/Systems file
ex.
remote Any ACUppp 38400 918008001546 "" @\r\c ogin:--ogin: joeblow sword: fromidaho PPP
Do not break this entry into two lines, allow it to wrap if it must.
12. Edit /etc/ppp.conf Setting "remotehost" to 0 will allow the remote system to set it's own ip address. The variable "add_route" sets up a default route to your ISP.
For a Static IP address, set "localhost" to your IP address.
remote localhost=X.X.X.X remotehost=0 add_route
For a Dynamic IP address, set localhost to 0.
remote localhost=0 remotehost=0 add_route
13. Execute ppp in debug mode
#ppp -ddd -r remote
A successful connection can be verified by opening another unix shell on your system and pinging the ip address of a machine at your ISP.
#/usr/etc/ping 192.82.208.8 PING 192.82.208.8 (192.82.208.8): 56 data bytes 64 bytes from 192.82.208.8: icmp_seq=0 ttl=243 time=30 ms 64 bytes from 192.82.208.8: icmp_seq=2 ttl=243 time=21 ms 64 bytes from 192.82.208.8: icmp_seq=3 ttl=243 time=30 ms 64 bytes from 192.82.208.8: icmp_seq=4 ttl=243 time=21 ms ----192.82.208.8 PING Statistics---- 5 packets transmitted, 4 packets received, 20% packet loss round-trip (ms) min/avg/max = 21/25/30
The output of a successful connection via ppp with debugging turned on is included in Appendix C.
A successful PPP connection is equivilent to plugging your machine into the Internet. As long as the PPP process is running, you can start up ftp, telnet, and netscape connections to remote machines. Killing the ppp process is equivilent to disconnecting your machine from the Internet, isolating you to your local network.
Appendix A - Configuring System for Domain Name Service (DNS)
In order to access remote machines by hostnames instead of ip addresses, you must configure your system to use the DNS name service. Your ISP should provide you with the ip address of their primary DNS name server (they may also include the addresses of secondary and tertiary servers).
To configure your system to automatically use this service, you must create a file on your system called /etc/resolv.conf. Here is a simple example that tells the system to first look for hostnames in the /etc/hosts file on your system and then contact the DNS server.
For more information on this file see "man resolv.conf"
/etc/resolv.conf ---------------- hostresorder local bind nameserver X.X.X.X nameserver X.X.X.Y nameserver X.X.X.Z
To confirm that this file has been setup correctly, use "nslookup".
% nslookup www.whitehouse.gov Server: foo.bar.sgi.com Address: X.X.X.X Name: www.whitehouse.gov Address: 128.102.252.1
You should now be able to access remote machines on the Internet by their hostnames, using ftp, telnet, mosaic, netscape, etc.
Appendix B - Setting Up PPP in "Quiet" Mode (aka Demand Dialing)
A nice feature that many users find beneficial is the PPP "quiet" mode. When there is traffic, the system creates the connection. When the link seems to be idle, it breaks the connection, and later restores it when there is more traffic. This is sometimes called "demand dialing," and it can save you connection charges by transparently breaking the connection when you're not using it. Additionally, you only have torun the ppp command once at bootup, and it will background itself until you need it.
The drawback, however, is that a quiet connection must know both IP addresses before the connection is established. Because the connection is not made until traffic is waiting, traffic cannot exist until the remote and local IP addresses are known, and so the normal IP address negotiation mechanism is not available. This means that you cannot use Dynamic IP allocation. Your ISP must provide you with a permenent address and you must know the ip address of the remote machine that you are dialing into.
An example /etc/ppp.conf set up for "quiet" mode would look like:
remote quiet localhost=X.X.X.X remotehost=X.X.X.Y add_route
Appendix C - Output of Successful PPP Connection (with debugging)
# /usr/etc/ppp -ddd -r remote
remote: no remote host name; hope for negotiation
remote: debug=3 mode=out mindevs=1,out=1,max=4 active_timeout=0,inactive=0
ppp[2172]: remote LCP1: initialized
ppp[2172]: remote IPCP1: initialized
ppp[2172]: remote CCP1: initialized
ppp[2172]: conn(remote)
ppp[2172]: Device Type ACUppp wanted
ppp[2172]: Internal caller type 212
ppp[2172]: Use Port /dev/ttyf2, acu - /dev/null, Phone Number x<
ppp[2172]: /dev/null is open
ppp[2172]: filelock: ok
ppp[2172]: filelock: ok
ppp[2172]: dcf is 7
ppp[2172]: fixline(7, 38400)
ppp[2172]: ACUppp write ok(null)
ppp[2172]: fixline(7, 38400)
ppp[2172]: set interface 212
ppp[2172]: processdev: calling setdevcfg(, ACUppp)
ppp[2172]: gdial(telebit) called
ppp[2172]: ABORT ON: "BUSY"
ppp[2172]: ABORT ON: "NO CARRIER"
ppp[2172]: ABORT ON: "NO DIALTONE"
ppp[2172]: expect: ("")
ppp[2172]: got it
ppp[2172]: sendthem (<DELAY><NO CR>AT^M)
ppp[2172]: timeout=2 expect: (OK^M)
ppp[2172]: j*HxAT^M^M^JOK^Mgot it
ppp[2172]: sendthem (<NO CR>ATs0=0s110=0^M)
ppp[2172]: expect: (OK^M)
ppp[2172]: ^JATs0=0s110=0^M^M^JOK^Mgot it
ppp[2172]: sendthem (<NO CR>ATdtw914045551212^M)
ppp[2172]: timeout=90 expect: (CONNECT)
ppp[2172]: ^JATdtw914044754055^M^M^JDIALING^M^J^M^JRRING^M^J^M^JCONNECTgot it
ppp[2172]: getto ret 7
ppp[2172]: expect: ("")
ppp[2172]: got it
ppp[2172]: sendthem (<NO CR>@^M)
ppp[2172]: expect: (ogin:)
ppp[2172]: 38400/LAPM/COMP/14400^M^J^M^JEnter at your own risk!^J^M^M^J^Javgjoe login:got it
ppp[2172]: sendthem (xxxppp^M)
ppp[2172]: expect: (word:)
ppp[2172]: xxxppp^M^JPassword:got it
ppp[2172]: sendthem (ppp123^M)
ppp[2172]: expect: (PPP)
ppp[2172]: ^M^JIRIX Release 5.3 IP22 avgjoe^M^JCopyright 1987-1994 Silicon Graphics, Inc. All Rights Reserved.^M^JLast login: Tue Jul 11 22:27:06 EDT 1995 on ttyf2^M^Jstarting PPPgot it
ppp[2172]: banner: ~^¿}#@!}!q} }8}!}$}%\}"}&} } } } }%}&i}'^Bi}'}"}(}"MN~
ppp[2172]: remote: saving 51 bytes to salvage
ppp[2172]: remote: starting to use /dev/ttyf2
ppp[2172]: remote IPCP1: event Open
ppp[2172]: remote IPCP1: action TLS
ppp[2172]: remote LCP1: event Open
ppp[2172]: remote LCP1: action TLS
ppp[2172]: remote LCP1: set kernel LCP parameters
ppp[2172]: remote 1: entering Establish Phase
ppp[2172]: remote LCP1: Initial(0)->Starting(1)
ppp[2172]: remote LCP1: event Up
ppp[2172]: remote LCP1: send Configure-Request ID=0x95
ppp[2172]: remote LCP1: request ACCM=0x00000000
ppp[2172]: remote LCP1: request my magic=0x6908be0d
ppp[2172]: remote LCP1: request protocol compression
ppp[2172]: remote LCP1: request address field compression
ppp[2172]: remote 1: write 0x14 bytes: proto=0xc021 01 95 00 14 02 06 00 00 00 00 05 06 69 08 be 0d 07 02 08 02
ppp[2172]: remote LCP1: Starting(1)->Req-Sent(6)
ppp[2172]: remote IPCP1: Initial(0)->Starting(1)
ppp[2172]: remote: salvaged input packet
ppp[2172]: remote: read 0x18 bytes: proto=0xc021 01 71 00 18 01 04 05 dc 02 06 00 00 00 00 05 06 69 07 82 69 07 02 08 02
ppp[2172]: remote LCP1: received Configure-Request ID=0x71
ppp[2172]: remote LCP1: accept MTU=1500 request and use MTU=1500
ppp[2172]: remote LCP1: accept peer's transmit ACCM=0x00000000
ppp[2172]: remote LCP1: accept protocol compression
ppp[2172]: remote LCP1: accept address field compression
ppp[2172]: remote LCP1: event RCR+
ppp[2172]: remote LCP1: send Configure-ACK ID=0x71
ppp[2172]: remote 1: write 0x18 bytes: proto=0xc021 02 71 00 18 01 04 05 dc 02 06 00 00 00 00 05 06 69 07 82 69 07 02 08 02
ppp[2172]: remote LCP1: Req-Sent(6)->Ack-Sent(8)
ppp[2172]: remote: read 0x14 bytes: proto=0xc021 02 95 00 14 02 06 00 00 00 00 05 06 69 08 be 0d 07 02 08 02
ppp[2172]: remote LCP1: received Configure-ACK ID=0x95
ppp[2172]: remote LCP1: event RCA
ppp[2172]: remote LCP1: action TLU
ppp[2172]: remote LCP1: MTU=1500 MRU=1500 bigxmit=0 TOS=y qmax=50 pcomp=y acomp=y
ppp[2172]: remote LCP1: my magic=0x6908be0d,his=0x69078269 tx_accm=0x0 rx_accm=0x0
ppp[2172]: remote LCP1: set kernel LCP parameters
ppp[2172]: remote 1: entering Authenticate Phase
ppp[2172]: remote 1: entering Network Phase
ppp[2172]: remote IPCP1: event Up
ppp[2172]: remote IPCP1: send Configure-Request ID=0x1e
ppp[2172]: remote IPCP1: request VJ comp, 16 slots without slot # comp
ppp[2172]: remote IPCP1: request ADDR 150.166.84.32
ppp[2172]: remote 1: write 0x10 bytes: proto=0x8021 01 1e 00 10 02 06 00 2d 10 00 03 06 96 a6 54 20
ppp[2172]: remote IPCP1: Starting(1)->Req-Sent(6)
ppp[2172]: remote LCP1: Ack-Sent(8)->Opened(9)
ppp[2172]: remote: read 0x10 bytes: proto=0x8021 01 71 00 10 02 06 00 2d 10 00 03 06 c0 30 98 52
ppp[2172]: remote IPCP1: received Configure-Request ID=0x71
ppp[2172]: remote IPCP1: turn off slot number compression
ppp[2172]: remote IPCP1: accept VJ header compression with 16 slots
ppp[2172]: remote IPCP1: set its address to 192.48.152.82 from ADDR Request
ppp[2172]: remote IPCP1: event RCR+
ppp[2172]: remote IPCP1: send Configure-ACK ID=0x71
ppp[2172]: remote 1: write 0x10 bytes: proto=0x8021 02 71 00 10 02 06 00 2d 10 00 03 06 c0 30 98 52
ppp[2172]: remote IPCP1: Req-Sent(6)->Ack-Sent(8)
ppp[2172]: remote: read 0x10 bytes: proto=0x8021 02 1e 00 10 02 06 00 2d 10 00 03 06 96 a6 54 20
ppp[2172]: remote IPCP1: event RCA
ppp[2172]: remote IPCP1: action TLU
ppp[2172]: remote IPCP1: Ack-Sent(8)->Opened(9)
ppp[2172]: remote IPCP1: ready 150.166.84.32 to 192.48.152.82, rx_vj_comp=y,tx=y rx_compslot=n,tx=n rx_slots=16,tx=16
ppp[2172]: + route add default 192.48.152.82 1
ppp[2172]: route already exists
ppp[2172]: + killall -v -ALRM routed
ppp[2172]: process <routed> not found
ppp[2172]: + killall -v -USR1 gated
ppp[2172]: killing pid 153 <gated>
ppp[2172]: remote LCP1: set kernel LCP parameters
ppp[2172]: remote CCP1: event Open
ppp[2172]: remote CCP1: action TLS
ppp[2172]: remote CCP1: turn off RX compression
ppp[2172]: remote CCP1: turn off TX compression
ppp[2172]: remote CCP1: Initial(0)->Starting(1)
ppp[2172]: remote CCP1: event Up
ppp[2172]: remote CCP1: send Configure-Request ID=0x3f for BSD Compress
ppp[2172]: remote 1: write 0x7 bytes: index=30 proto=0x80fd 01 3f 00 07 15 03 2c
ppp[2172]: remote CCP1: Starting(1)->Req-Sent(6)
ppp[2172]: remote: read 0x7 bytes: index=30 proto=0x80fd 01 72 00 07 15 03 2c
ppp[2172]: remote CCP1: received Configure-Request ID=0x72
ppp[2172]: remote CCP1: turn off TX compression
ppp[2172]: remote CCP1: ACKing 12 bit BSD compression
ppp[2172]: remote CCP1: event RCR+
ppp[2172]: remote CCP1: send Configure-ACK ID=0x72
ppp[2172]: remote 1: write 0x7 bytes: index=30 proto=0x80fd 02 72 00 07 15 03 2c
ppp[2172]: remote CCP1: turn on/reset TX 12 bit BSD compression
ppp[2172]: remote CCP1: Req-Sent(6)->Ack-Sent(8)
ppp[2172]: remote: read 0x7 bytes: index=30 proto=0x80fd 02 3f 00 07 15 03 2c
ppp[2172]: remote CCP1: received Configure-ACK ID=0x3f
ppp[2172]: remote CCP1: turn on/reset RX 12 bit BSD compression
ppp[2172]: remote CCP1: event RCA
ppp[2172]: remote CCP1: action TLU
ppp[2172]: remote CCP1: Ack-Sent(8)->Opened(9)
We welcome feedback and comments at webmaster@www.sgi.com.