3. Setting up Internet (Belgian ISP information)

3.1. Dialing in with your modem (PPP)

To configure PPP correctly, you should check the PPP-HOWTO. I try to explain it briefly, but if you have any questions or problems, read the HOWTO very carefully.

3.1.1. Configuring the modem

To configure your modem, you can alter the initstring of your modem. To learn more about your modem, check Ask Mr. Modem.

Warning

If you have a winmodem you will probably not get it to work. More information about winmodems is at: http://linmodems.org/. Work is underway, but winmodems are not as good as real modems.

3.1.2. Installing pppd

Now, you need to have the ppp-package installed (check this by typing pppd --version), make sure you have a recent one. Then you have to make sure you've got these files:

/usr/local/bin/ppp

        #!/bin/sh
        case $1 in
                on|start)
                TELEPHONE='555-1212'        # The telephone number for the connection
                ACCOUNT='your_login'        # The account name for logon (as in 'George Burns')
                PASSWORD='your_pass'        # The password for this account (and 'Gracie Allen')
                INITSTRING='AT&F&C1&D2Z'# Modem initstring
                IPLOCAL=0.0.0.0             # Local IP address if known. Dynamic = 0.0.0.0
                IPREMOTE=0.0.0.0            # Remote IP address if desired. Normally 0.0.0.0
                DEVICE=/dev/ttyS1           # Serial Device com1=ttyS0, com2=ttyS1,...
                SPEED=57600                 # 19200, 38400 or 57600 (don't try something different)
                export TELEPHONE ACCOUNT PASSWORD INITSTRING
                exec /usr/sbin/pppd $DEVICE $SPEED $IPLOCAL:$IPREMOTE \
                        user $ACCOUNT connect /etc/ppp/ppp-on-dialer
                ;;
                off|stop)
                if [ -r /var/run/ppp0.pid ]; then
                        kill -INT `cat /var/run/ppp0.pid`
                        if [ ! "$?" = "0" ]; then
                                rm -f /var/run/ppp0.pid
                                echo "ERROR: Removed stale pid file"
                                exit 1
                        fi
                        exit 0
                fi
                echo "ERROR: PPP link is not active on ppp0"
                exit 1
                ;;
                info|status)
                /usr/sbin/pppstats
                ;;
                *)
                echo "Usage: ppp on|off|info|start|stop|status";
                ;;
        esac
    

/etc/ppp/ppp-on-dialer

        #!/bin/sh
        exec /usr/sbin/chat -v                                        \
                REPORT CONNECTION                                     \
                REPORT CARRIER                                        \
                TIMEOUT              10                               \
                ABORT                '\nBUSY\r'                       \
                ABORT                '\nNO ANSWER\r'                  \
                ABORT                '\nNO CARRIER\r'                 \
                ABORT                '\nNO DIALTONE\r'                \
                ABORT                '\nRINGING\r\n\r\nRINGING\r'     \
                ABORT                'Invalid Login'                  \
                ABORT                'Login incorrect'                \
                ''                   "\r$INITSTRING\r"                \
                'OK-+++\c-OK'        'ATH0'                           \
                TIMEOUT              45                               \
                OK                   "ATDT$TELEPHONE"                 \
                CONNECT              '\d\c'                           \
                ogin:--ogin:         "$ACCOUNT"                       \
                ord:                 "$PASSWORD"
    
You can remove the -v once everything looks normal.

The pppd command uses /etc/ppp/options to list its options, change these options to whatever fits. These defaults normally work in most cases.

        asyncmap 20a0000
        crtscts
        debug
        default-mru
        defaultroute
        detach
        escape 11,13,ff
        hide-password
        ipcp-accept-local
        ipcp-accept-remote
        lcp-echo-failure 4 
        lcp-echo-interval 400 
        lock
        modem
        mtu 1500
        netmask 255.255.255.0
        noipdefault
        passive

        #idle 300 
        #kdebug 0
        #-vj
    
Once dialing in works like a charm, you can leave debug out.

Warning

It is important to emphasize that every special character, thus every character that is not [a-ZA-Z0-9] and '_', should be escaped by preceding it with a '\'-character. Thus "e!b$l+" would become "e\!b\$l\+". Try it if you are having troubles !

3.1.3. pap-secrets / chap-secrets

If your ISP requires CHAP or PAP, you need one of these files with their proper username and password:

/etc/ppp/pap-secrets or /etc/ppp/chap-secrets

        #client         server  secret          IP      
        your_login      *       your_pass       *
    

3.1.4. Network

To configure your nameservers, change /etc/resolv.conf. If dialing in is succesful, but you can't get it to connect to URL's: this is probably the cause.

        domain domain_of_your_isp
        nameserver your_primary_nameserver
        nameserver your_secondary_nameserver
    

3.1.5. File permissions

Before you can run a (shell)script, it must be set executable. Be sure that you set the permissions so that other users cannot see the passwords stored in the files. If you want other users to be able to dial in, you might want to consider using sudo. You might want to do the following:

     chmod u+rw og-rwx -R /etc/ppp
     chmod u+x /etc/ppp/ppp-on-dialer /usr/local/bin/ppp
    

3.1.6. Dial + Hangup

Then if /usr/local/bin is in your PATH, you can easily dial in with:

        ppp on
    
and hangup with:
        ppp off
    
and to get some statistics, you do:
        ppp status
    

3.1.7. ISP-dependant information

3.1.7.1. Cable&Wireless (Online, TijdNet)

Authentication

text-based / PAP

Extra options

noccp

Nameservers

62.112.0.7, 194.88.127.7

NTP-server

ntp.antw.online.be, ntp.brus.online.be, ntp.gent.online.be

Web

http://www.online.be/

Support

no official Linux support yet

3.1.7.2. KPN Belgium (Eunet)

Authentication

text-based

Extra options

proxyarp

Nameservers

193.74.208.135, 193.74.208.65, 193.121.171.135

Web

http://www.eunet.be/

Support

http://support.eunet.be/

3.1.7.3. Planet Internet (Ping)

Authentication

CHAP

Nameservers

194.119.232.3, 194.119.232.2

NTP-server

ntp.pi.be

Web

http://www.planetinternet.be/

Support

http://www.ping.be/Support/redhat.shtml (Ping)

3.1.7.4. Skynet (Belgacom)

Authentication

PAP

Extra options

defaultroute

Nameservers

195.238.2.21, 195.238.2.22

NTP-server

ntp.skynet.be

Web

http://www.skynet.be/

Support

http://help.skynet.be/linux/indexen.html

3.1.7.5. Tiscalinet (Freegates, FreeBel)

Authentication

text-based ?

Nameservers

212.35.2.1, 212.35.2.2

NTP-server

ntp.tiscalinet.be

Web

http://www.tiscalinet.be/

Support

no official Linux support yet

3.1.7.6. UUNet (VT4)

Authentication

PAP

Nameservers

194.7.1.4, 194.7.15.70

Web

http://www.uunet.be/, http://www.vt4.net/

Support

no official support yet

3.1.7.7. Wanadoo (Euronet)

Authentication

text-based / PAP

Nameservers

195.74.193.12, 194.134.0.12

Web

http://www.wanadoo.be/

Support

no official Linux support yet

3.1.7.8. World Online

Authentication

CHAP

Nameservers

212.233.1.34, 212.233.2.34

Web

http://www.worldonline.be/

Support

http://help.worldonline.be/en/linux/index.htm

3.1.7.9. XS4ALL

Authentication

PAP

Nameservers

194.109.6.66, 194.109.9.99

NTP-server

ntp.xs4all.be

Web

http://www.xs4all.be/

Support

http://helpdesk.xs4all.be/ned/linux/index.html

3.1.7.10. Yucom (DMA)

Authentication

CHAP

Nameservers

212.8.180.122, 212.8.180.126

NTP-server

ntp.yucom.be

Web

http://www.yucom.be/

Support

no official Linux support yet

3.2. Dialing in with your ISDN-modem

Contributed by Christophe Lambin

This section does not aim to be a definitive guide on ISDN for Linux. For a more detailed discussion on the topic, see Paul Slootman's ISDN4Linux HOWTO and ISDN4Linux-FAQ.

3.2.1. Updating the kernel

If you're using a 2.2 kernel, it's recommended to get an updated version of the ISDN code. You can retrieve it from CVS at ftp://ftp.suse.com/pub/isdn4linux/. For more information, check: http://www.brisse.dk/site/linux/docs/isdn.htm

Warning

If you've recently purchased an Eicon Diva 2.0 PCI (eg, via Belgacom), there's a good chance you've actually got a Diva 2.01.In this case, you must get a version dated 1 July 1999 or later !

Once the ISDN is in place, you can start up the driver. Eg: modprobe hisax type=11 protocol=2 Refer to the Readme's for the right parameters and values for your card.

3.2.2. ISDN4Linux toolkit

Next, you'll need the ISDN4Linux toolkit. You can retrieve the latest version of the toolkit at: ftp://ftp.suse.com/pub/isdn4linux/

3.2.3. Configuring the interface

With the tools installed and configured, write a script to configure the interface, to be used for the ISDN connection. As always in Linux, there's no one correct way of doing this. I've put these in a script

/etc/rc.d/rc.isdn:

        #!/bin/sh
        MSNREMOTE='555-1212'    # Phone number of ISP
        MSNLOCAL='555-1313'     # my number, without 0, with areacode
        ACCOUNT='george'        # The account for logon (as 'George Burns')
        IPLOCAL=10.0.0.2        # my fixed IP (use 10.0.0.2 if no fixed)
        IPREMOTE=0.0.0.0        # IP number of ISP
        INTERFACE=ippp0
        /sbin/modprobe hisax type=11 protocol=2
        /sbin/isdnctrl verbose 3 system on
        /sbin/isdnctrl addif $IF
        /sbin/isdnctrl secure $IF on 
        /sbin/isdnctrl addphone $IF out $MSNREMOTE
        /sbin/isdnctrl eaz $IF $MSNLOCAL
        /sbin/isdnctrl huptimeout $IF 300
        /sbin/isdnctrl l2_prot $IF hdlc
        /sbin/isdnctrl l3_prot $IF trans
        /sbin/isdnctrl encap $IF syncppp
#        /sbin/isdnctrl dialmode $IF auto
        /sbin/ifconfig $IF $IPLOCAL pointopoint $IPREMOTE -arp -broadcast
        /sbin/ipppd /dev/ippp0 user $ACCOUNT $IPLOCAL:$IPREMOTE
    

To start this at boot time, make it executable and append the following to /etc/rc.d/rc.local:

        if [ -x /etc/rc.d/rc.isdn ]; then
                . /etc/rc.d/rc.isdn
        fi
    

The ipppd command gets its parameters passed through a file, /etc/ppp/ioptions:

        -ac
        -bsdcomp
        debug
        defaultroute
        ipcp-accept-local
        ipcp-accept-remote
        mru 1524
        mtu 1500
        noipdefault
        -pc
        useifip
        -vj
        -vjccomp

        #idle 360
        #persistent
    

Warning

Do NOT specify +pap or +chap in this file. This specifies the authentication that ipppd should use for an INCOMING client. If you were to use this to connect to your ISP, ipppd would wait for the ISP to authenticate itself using the specified protocol.

Warning

It is important to emphasize that every special character, thus every character that is not [a-ZA-Z0-9] and '_' should be escaped by preceding it with a '\'-character. Thus 'e!b$l+' would become 'e\!b\$l\+'. Try it if you are having troubles !

Finally, create /etc/ppp/ip-down.local to handle the shutdown of the interface:

        #!/bin/sh
        /sbin/ifconfig $1 down
        sleep 1
        /sbin/ifconfig $1 10.0.0.2 pointopoint 
    

Note!: This is to handle some problems with routes on shutdowns. Anyone know of a clean(er) solution ?

3.2.4. pap-secrets / chap-secrets

If your ISP uses PAP or CHAP, create a file /etc/ppp/pap-secrets or /etc/ppp/chap-secrets. Its format is:

        #client         server  secret          IP      
        your_login      *       your_pass       *
    

3.2.5. Network

Not really related to ISDN, but a lot of people forget this step (too eager to try out all the stuff they typed in above ? :-)).

Anyway, you need to configure the DNS, by creating a file /etc/resolv.conf:

        domain your_domain_of_your_isp
        nameserver your_primary_nameserver
        nameserver your_secondary_nameserver
    

3.2.6. File permissions

Before you can run a (shell)script, it must be set executable. Be sure that you set the permissions so that other users cannot see the passwords stored in the files. If you want other users to be able to dial in, you might want to consider using sudo. You might want to do the following:

     chmod u+rw og-rwx -r /etc/ppp
     chmod u+x /etc/rc.d/rc.isdn /etc/ppp/ip.down-local /usr/local/bin/isdn
    

3.2.7. Dial + Hangup

Finally, you can write a little wrapper to start and stop the ISDN connection. I've put this as /usr/local/bin/isdn:

        #!/bin/bash
        case $1 in
                on|start)
                /sbin/isdnctrl dial ippp0
                ;;
                off|stop)
                /sbin/isdnctrl hangup ippp0
                ;;
                info|status)
                /sbin/isdnctrl list ippp0
                ;;
                *)
                echo "Usage: isdn on|off|info|start|stop|status"
                ;;
        esac
    

Then if /usr/local/bin is in your PATH, you can easily dial in with isdn on and hangup with isdn off.

3.3. Cablemodem (DHCP)

DHCP was designed to make life easier, and most of the times it does ;) More information to set up your DHCP client can be found at: http://www.oswg.org/oswg-nightly/DHCP.html and a list of Frequently Asked Questions from the infamous document of John Wobus at http://www.dhcp.org/ which describes everything you need to know. Along with the information in the Cable-Modem HOWTO (http://www.oswg.org/oswg-nightly/Cable-Modem.html).

Lots of people want to connect a whole network to their cablemodem, that's not a problem. You'll need IP-Masquerading and make sure the interface (that speaks to the cablemodem) has the right MAC-address !! Another solution (in case of problems) is to reset your cablemodem.

3.3.1. UPC Belgium (Chello, TVD)

NTP-server

time.chello.be

Web

http://www.upcbelgium.be/

Support

no official support yet

More information

http://foobar.starlab.net/~soggie/tvd_linux/

3.3.2. Pandora (Telenet)

Automatic proxy

http://pac.pandora.be:8080

HTTP proxy

export http_proxy="http://proxy.pandora.be:8080/"

NTP-server

ntp.pandora.be

Web

http://www.pandora.be/

Support

no official support yet

More information

http://users.pandora.be/de.boeve/pandora.html

3.4. ADSL

3.4.1. Easynet

Web

http://www.easynet.be/

Support

http://support.easynet.be/

3.4.2. KPN Belgium (Eunet)

Web

http://www.eudsl.be/

Support

http://support.eunet.be/

3.4.3. Turboline (Belgacom)

Web

http://www.turboline.be/

Support

no official support yet

More information

http://foobar.starlab.net/~soggie/turboline/, http://minf.vub.ac.be/~fquestie/turbo/ and http://minf.vub.ac.be/~fquestie/turbo/