First you normally create an new file in /etc/peers with the name of the ISP you want to use. Here is an example for the German Call-By-Call service of Arcor:
tts/0 crtscts 115200 connect 'chat -v -f /etc/ppp/chat/arcor' defaultroute noauth lock # debug stuff if needed #debug #show-password noipdefault noipx name arcor-ibc
The first line tells pppd to use the serial interface tts/0 (aka: COM-1) with hardware handshake at 115200 baud. The connection-script should be /etc/ppp/chat/arcor, the default-route should be set, the user-name is "arcor-ibc" and some other minor options are also present.
Then you create a script for the chat program which will control the modem to dial to your ISP. Here an example for Arcor:
ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT "ERROR" ABORT "NO ANSWER" ABORT "BUSY" "" "at" # initilizing "OK" "at&d2&c1" # dial "OK" "atdt0192075"
First we specify some rules when the script should abort, then we perform some initializing of the modem and dial the number for arcor.
If this is tested - you might some of the following lines - after the init and before the number-dial - later when you want to get some more information (only tested with an ELSA Microlink professional - so it might nor work with other no-name modems):
# silence the mode (no speaker output) "OK" "atm0" # carrier modulation "OK" "ats96=64" "OK" "at\\v9" # modulation and receive datarate "OK" "at+mr=1" # serial datarate "OK" "at+ilrr=1"
The last step is to add the password into the chap- or pap-secret file. This depends on whether you provider is using PAP or CHAP as authentification protocol - since I do not bother what Arcor is using I added the password to both files:
/etc/ppp/chap-secrets
# Secrets for authentication using CHAP # client server secret IP addresses * * "internet"
/etc/ppp/pap-secrets:
# Secrets for authentication using PAP # client server secret IP addresses * * "internet"
To dial to your ISP simply execute pppd call arcor. If this does not work - you should double check your config files above and start debugging.
eth1 defaultroute noauth lock # debug stuff if needed #debug #show-password noipdefault noipx holdoff 10 # wait 10 secs before trying to reopen connection lcp-echo-failure 4 # Connection is timedout after 4 failed echo requests lcp-echo-interval 30 # Send an lcp echo request every 30 secs. mtu 1492 #required PPP transmit frame size for PPPoE to fit in 1500 mru 1492 #required PPP receive frame size for PPPoE to fit in 1500 receive-all #permits some flexabililty in converting ethernet frames #nopcomp #RFC-2516 pcomp NOT RECOMMENDED. If they ask, ok to allow. noaccomp #RFC-2516 MUST NOT ask for ACFC #a plugin to utilize the kernel's pppoe functionallity plugin pppoe.so ipcp-accept-local ipcp-accept-remote persist # reopen the connection if it goes down # username name your-user-nameAnd the appropriated pap- or chap-secret files:
/etc/ppp/chap-secrets:
# Secrets for authentication using CHAP # client server secret IP addresses "username" * "passwd"
/etc/ppp/pap-secrets:
# Secrets for authentication using PAP # client server secret IP addresses "username" * "passwd"Much fun via pppd call qsc.