Now that you have created your /etc/ppp/options
and /etc/resolv.conf
files, you can test the settings by manually establishing a PPP
connection. (Once we have the manual connection working, we will
automate the process).
To do this, your communications software must be capable of quitting WITHOUT resetting the modem. Minicom can do this - ALT Q (or in older version of minicom CTRL A Q)
Make sure you are logged in as root.
Fire up you communications software (such as minicom), dial into the PPP server and log in as normal. If you need to issue a command to start up PPP on the server, do so. You will now see the "garbage" you saw before.
Now quit the communications software without resetting the modem (ALT Q in minicom) and at the Linux prompt (as root) type
pppd -d -detach /dev/cuaX &
(for dynamic IP numbers) or
pppd -d -detach <your IP number>: /dev/cuaX
(for static IP numbers - NOTE the colon after the IP number here).
In both cases, change "X" to the correct number for the modem port.
The -d option turns on debugging - the ppp connection start up "conversation" will be logged to your system log - which is useful if you are having trouble.
Your modem TX/RX lights should flash as the PPP connection is established. It will take a short while for the PPP connection to be made.
At this point you can look at the PPP interface, by issuing the command
ifconfig ppp0
You should see something like :-
ppp0 Link encap:Point-Point Protocol inet addr:10.144.153.104 P-t-P:10.144.153.51 Mask:255.255.255.0 UP POINTOPOINT RUNNING MTU:552 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 TX packets:0 errors:0 dropped:0 overruns:0
Where
(Naturally, ifconfig
will not report these IP numbers, but the ones used
by your PPP server.)
ifconfig
also tells you that the link is UP and RUNNING!
If you get something like
ppp0 Link encap:Point-Point Protocol inet addr:0.0.0.0 P-t-P:0.0.0.0 Mask:0.0.0.0 POINTOPOINT MTU:1500 Metric:1 RX packets:63287 errors:0 dropped:0 overruns:0 TX packets:62187 errors:0 dropped:0 overruns:0
your PPP connection has not been made...see the later section on debugging!
Now test the link by ping
ing the server at its IP number as reported
by the ifconfig
output, ie
ping 10.144.153.51
You should receive output like
PING 10.144.153.51 (10.144.153.51): 56 data bytes
64 bytes from 10.144.153.51: icmp_seq=0 ttl=255 time=328.3 ms
64 bytes from 10.144.153.51: icmp_seq=1 ttl=255 time=190.5 ms
64 bytes from 10.144.153.51: icmp_seq=2 ttl=255 time=187.5 ms
64 bytes from 10.144.153.51: icmp_seq=3 ttl=255 time=170.7 ms
This listing will go on for ever - to stop it press CTRL C), at which point you will receive some more information :-
--- 10.144.153.51 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 170.7/219.2/328.3 ms
So far so good.
Now try ping
ing a host by name (not the name of the PPP server itself)
but a host at another site that you KNOW is going to be up and
running...). For example
ping hedunx.hedland.edu.au
This time there will be a bit of a pause as Linux obtains the IP number
for the host you have ping
ed from the DNS you specified in
/etc/resolv.conf
- so don't worry (but you will see your modem lights
flash). Shortly you will receive output like
PING hedunx.hedland.edu.au (10.144.153.3): 56 data bytes
64 bytes from 10.144.153.3: icmp_seq=0 ttl=254 time=190.1 ms
64 bytes from 10.144.153.3: icmp_seq=1 ttl=254 time=180.6 ms
64 bytes from 10.144.153.3: icmp_seq=2 ttl=254 time=169.8 ms
64 bytes from 10.144.153.3: icmp_seq=3 ttl=254 time=170.6 ms
64 bytes from 10.144.153.3: icmp_seq=4 ttl=254 time=170.6 ms
Again, stop the output by pressing CTRL C and get the statistics...
--- hedunx.hedland.edu.au ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 169.8/176.3/190.1 ms
If you do not get any response, check in the debugging section of this document.
If everything works, shut down the connection by typing
ppp-off
If that does not work, either turn off your modem or fire up your
communications software and interrupt the modem with +++
and then hang
up with ATH0
when you receive the modem's OK prompt.