ARMLinux and the Internet

One of the attractions of ARMLinux is that there are so many tools which allow you to read and send news and email and to view web pages. This section will therefore show you how to establish a dial-up connection as well as introducing you to some useful net-related utilities.

Connecting to the Net with PPP

In order to get on-line you will need to set up your dial-up connection so we'll help you to do this by taking a look at the Point-to-Point Protocol (PPP).

This section has consequently been written for those who wish to gain a general sense of what is involved before consulting alternative resources. Newbies should therefore read this section before referring to the PPP-HOWTO which is on the CD in Docs.Html-Howto. Useful information can also be gained from the README.linux file in /usr/doc/ppp-2.2.0f-2, the pppd man pages and from the PPP FAQ (http://cs.uni-bonn.de/ppp/faq.html/). Users who wish to establish their own PPP server or to set up a Wide Area Network (WAN) will also find these resources helpful. Moreover, those who wish to use the Debian distribution of ARMLinux should refer to install.en.txt on the CD in Debian.docs for an explanation of pppconfig. Debian users will also find the wvdial dialler to be invaluable.

Note: We have avoided any reference to SLIP connections or to DIP scripts because of the sheer complexity of the latter.PPP configuration will also become easier as ARMLinux is developed. The RHS Linux Network Manager is already available which allows users to configure interfaces, domains and name servers from the fvwm control panel and the eventual appearance of KDE will mean that PPP can be set up by using the kppp tool.

At present, you may set up your internet connection by:

  1. Writing your own scripts.

  2. Using the pppsetup program.

Writing Scripts

In order to configure PPP, you will need to find out the following information which is usually available from your Internet Service Provider (ISP):

  1. Dialup number.

  2. PABX number if you require an outside dialling tone.

  3. Login details which will usually be a combination of letters and numbers.

  4. Password-again a combination of letters and numbers.

  5. Gateway-four numbers punctuated by dots.

  6. Domain Name Server (DNS) Internet Protocol (IP) address - as with gateway.

Note: It is advisable to ask for two DNS IP addresses in case one of the servers is temporarily disconnected from the net.

You will also need to ask your ISP about:

  1. Its support for PAP or CHAP authentication.

  2. The allocation of IP addresses. Nowadays, ISPs tend to dynamically assign IPs on a session-by-session basis. If this applies to you, this may have implications for how you offer server apps like ftpd on your machine.

  3. The IP and netmask numbers that can be used in a situation where provision has been made for a subnet of IP numbers.

You will also have to think about configuring your modem which will involve:

  1. Finding the name of the COM port.

  2. Creating a link between the COM port name and /dev/modem.

  3. Taking other factors into account like flow-control, line-termination and the connection speed that you will require.

Tip: if you don't know the name of your COM port pipe the output of dmesg through fgrep:

dmesg | fgrep tty

If you require further information on configuring your modem, take a look at the Serial-HOWTO which is on the CD in Docs.html-Howto.

Note: You may also need to recompile your kernel to enable PPP support.You can check that PPP support is enabled by availing of the dmesg command:

dmesg | fgrep PPP:

If you think for example of a situation where you want to establish a connection with Freeserve - a popular account with RISC OS users - PPP configuration can be achieved by taking the following steps:

  • Edit the /etc/ppp/options file so that it contains information on the device that you will be using as well as the script - CHAP or PAP - that you will be using for dialling:

    connect '/usr/sbin/chat -v -f /etc/ppp/chat-script'
    asyncmap 0
    crtscts
    defaultroute
    modem
    lock
    mtu 542
    mru 542
    115200
    /dev/modem

  • Set up configuration and dialer files which may be found in /usr/doc/ppp-2.2.0f or in /etc/ppp. Assuming a chat script, enter the following in /etc/ppp/chat-script:

    ABORT 'NO CARRIER'
    ABORT BUSY
    ''ATF1
    OK ATD084550796699
    CONNECT''
    login:USER.freeserve.co.uk
    word:PASSWORD

  • Create or adapt the secrets file if you are using PAP or CHAP authentication where both files - /etc/ppp/chap-secrets and /etc/ppp/pap-secrets - take the form of:

    USER.freeserve.co.uk*PASSWORD

  • Run pppd as root.

  • Configure /etc/resolv.conf so that domain names are associated with IP addresses:

    # /etc/resolv.conf

    search. 
    domain freeserve.co.uk
    nameserver 194.152.64.35
    nameserver 195.92.193.8

  • Automate the connection process by copying the ppp-on and ppp-off scripts to /usr/bin as root. This will then allow you to toggle your connection on and off with the equivalent command.

Fine-Tuning

You should then

  • Secure all passwords on your system by setting them to 660 with chmod.

  • Log all PPP operations where you are having problems by entering the following command:

    tail -f /var/log/messages

  • If you want to use PPP as a normal user, SUID pppd by entering this command at the prompt:

    chmod +s 'which pppd'

PPPsetup

The pppsetup program is an effective alternative for those who feel intimidated by the process of hand-crafting an internet connection. PPPsetup is available from http://members.nbci.com/chrissawer/ and was orginally derived from PPP version 2.3.5. Newbies should consequently note that the chat and chat.8 files should be placed in /usr/sbin and /usr/man/man8 respectively. The program also needs a current version of chat which can be downloaded from ftp://cs.anu.edu/pub/software/ppp/.