Custom Search

Dial-up services (PPP) diagnostics Part 1
for Brazil Firewall and Coyote Linux

Setup PPP dial-up services  PPP debug diagnostics Part 2

If you have a PCI card, there is a good chance your "modem" is NOT a real modem but a WinModem® and requires software installed in Microsoft Windows®.

Below is what a correct PPP dialup looks like using Coyote Linux 2.24 and COM1. It should be similar using Brazil Firewall. You can see this in syslog using the Webadmin tool.

See the highlighted PAP authentication line below? If it indicates failure guess what?

daemon.notice pppd[587]: pppd 2.4.2 started by root, uid 0
daemon.info pppd[587]: Using interface ppp0
daemon.notice pppd[587]: local  IP address 192.168.81.2
daemon.notice pppd[587]: remote IP address 192.168.81.2
daemon.info pppd[587]: Starting link
local2.info chat[1572]: report (CONNECT)  Log the connection
local2.info chat[1572]: abort on (BUSY)  Abort reasons
local2.info chat[1572]: abort on (ERROR)
local2.info chat[1572]: abort on (NO CARRIER)
local2.info chat[1572]: abort on (NO DIALTONE)
local2.info chat[1572]: abort on (Invalid Login)
local2.info chat[1572]: abort on (Login incorrect)
local2.info chat[1572]: send (ATZ^M)
local2.info chat[1572]: expect (OK)
local2.info chat[1572]: ATZ^M^M  Reset the modem to NVRAM settings
local2.info chat[1572]: OK
local2.info chat[1572]:  -- got it
local2.info chat[1572]: send (ATDT5551212^M)
local2.info chat[1572]: expect (CONNECT)
local2.info chat[1572]: ^M
local2.info chat[1572]: ATDT5551212^M^M  This is the dial command sent to the modem.
local2.info chat[1572]: CONNECT You should hear dialling followed by screeching sounds
local2.info chat[1572]:  -- got it  The 2 modems are connected
local2.info chat[1572]: send (\d)
daemon.info pppd[587]: Serial connection established. The 2 sides can talk protocol
daemon.notice pppd[587]: Connect: ppp0 <--> /dev/ttyS0
daemon.info pppd[587]: Remote message: Login Succeeded  Obvious right?
daemon.notice pppd[587]: PAP authentication succeeded

This does not mean all is well. There can still be problems. See below.

daemon.warn pppd[587]: Local IP address changed to 216.n.n.43  ISP assigned an IP
daemon.warn pppd[587]: Remote IP address changed to 216.n.n.5  ISP assigned a gateway
daemon.info ip-up: script called with: ppp0 /dev/ttyS0 115200 216.n.n.43 216.n.n.5
daemon.info dnsmasq[559]: reading /etc/resolv.dns
daemon.info dnsmasq[559]: using nameserver 216.n.n.76#53  ISP assigned DNS 1
daemon.info dnsmasq[559]: using nameserver 216.n.n.75#53  ISP assigned DNS 2
daemon.info dnsmasq[559]: using local addresses only for domain localdomain
daemon.info dnsmasq[559]: read /etc/hosts - 2 addresses
user.notice root: chat:  Mar 14 03:51:48 CONNECT 115200
daemon.info rc.firewall: Firewall script called with: ppp0  Firewall is up
user.notice root: Coyote Masquerading Script called with: ppp0  NAT is on
daemon.info rc.qos: QOS script called with: ppp0  QOS is installed

More error codes

coyote daemon.info pppd[605]: IPCP terminated by peer
coyote daemon.info pppd[605]: LCP terminated by peer
coyote daemon.warn pppd[596]: LCP: timeout sending Config-Requests
coyote daemon.notice pppd[596]: Connection terminated.
coyote daemon.info pppd[596]: Hangup (SIGHUP)

The IPCP and LCP errors are harder to diagnose because looking at the bits that come back from PPP negotiation is required. The debug option causes the contents of all control packets sent or received to be logged, that is, all LCP, PAP, CHAP, EAP, or IPCP packets. This can be done by temporarily editing file /etc/rc.d/rc.ppp and changing the following line:

pppd call $PPP_ISP
TO
pppd debug call $PPP_ISP

Debugging can also be enabled or disabled by sending a SIGUSR1 signal to the pppd process. This signal acts as a toggle. The pid can be obtained with the command: ps

kill -SIGUSR1 pid

An example PPP debug diagnostics session is presented in Dial-up services diagnostics part 2.

You want to get more information from you modem?  tinycomm
This is a DOS program from PC Magazine written by Charles Petzold. It is 103 bytes.
Type tinycomm at the DOS prompt (for COM1:) then enter your AT modem commands. Your modem documentation contains the AT commands you can use.
If you use COM2: then use tinycomm 1

DISCLAIMER: The following instructions come with no warranty. Use at your discretion and risks. I am not responsible for its misuse, damages, or losses that can be caused directly or indirectly. It is assumed that you practice safe computing and take backups before making changes.

Stuff is written here for the uninitiated and no prior knowledge on the subject is presumed.

Use the Forums for support so everyone can share the information.