4.16 PPP - Connection Of Computers Via Serial Interface

With OPT_PPP='yes' a computer can be connected via its serial interface. This may be useful i.e. for connecting computers to a network that does not have a network interface card. The computer connected to the serial interface is called client PC below.

PPP_DEV

Specify fli4l's serial interface the client PC is connected to. Possible values are:

'com1' COM1 port (lower cases only!)
'com2' COM2 port (lower cases only!)

PPP_SPEED

Set transfer rate here (bit/sec). 38400 is supported by older interfaces too. Problems may occur when using rates above this.

    Example: PPP_SPEED='38400'

PPP_IPADDR PPP_PEER

PPP_IPADDR holds fli4l's IP address on the COM port, i.e. '192.168.4.1'. In variable PPP_PEER the IP address of the client PC is set, i.e. '192.168.4.2'.

PPP_NETWORK PPP_NETMASK

PPP_NETWORK holds the network used and variable PPP_NETMASK the netmask. These two variables are used by the extra package 'samba_lpd'.


Important: Consider the following:

  1. Those IP addresses may not originate from the network address range of the ethernet LANs. Point-To-Point-Configuration must use a separate network address range!

  2. For the Client PC's connection to the Internet this mini-PPP-network has to be masked in the same way as the LAN. In order to achieve this extend the list of networks to be masked via the variable PF_POSTROUTING_% (see next passage).

  3. The client PC should be added to the host table of the DNS server.

Causes:

If telnet or ftp should be used from the client PC to the fli4l router the daemons concerned on fli4l do a reverse DNS lookup to resolve the client PC. If it is not found in the host table a connection to the Internet will be established to do this - which is of course useless. To avoid this enter the client PC in the host table.

Example for PPP Configuration over the serial interface:

        PPP_DEV='com1'
        PPP_SPEED='38400'
        PPP_IPADDR='192.168.4.1'
        PPP_PEER='192.168.4.2'
        PPP_NETWORK='192.168.4.0'
        PPP_NETMASK='255.255.255.0'

and further on in config/base.txt:

        PF_POSTROUTING_N='2'
        PF_POSTROUTING_1='192.168.6.0/24 MASQUERADE'
        PF_POSTROUTING_2='192.168.4.0/24 MASQUERADE'

The first network is the one of the ethernet LAN and the second the one of the PPP network.

Last thing is to adapt DNS Configuration. Example:

        HOST_5='192.168.4.2 serial-pc'

Do not forget to increment HOST_N!

If the client PC is running Windows you have to configure the dial-up adapter for a PPP connection to the fli4l router.

If a linux client is used create a shell script on the client (i.e. /usr/local/bin/ppp-on):

    #! /bin/sh
    dev='/dev/ttyS0'                    # COM1, for COM2: ttyS1
    speed='38400'                       # speed
    options='defaultroute crtscts'      # options
    myip='192.168.4.2'                  # IP address client
    fli4lip='192.168.4.1'               # IP address fli4l router
    pppd $dev $speed $options $myip:$fli4lip &

In case of problems: man pppd

The fli4l router has to be used as the DNS server on the client if a connection to the Internet is desired. Add two lines to /etc/resolv.conf on the client: the domain used and the ethernet IP address of the fli4l router as name server.

Example:

    search domain.de
    nameserver 192.168.1.4

``domain.de'' res. ``192.168.1.4'' have to be changed to your needs. Important: The IP address has to be the one of fli4l's ethernet card!

A so called null modem cable is used as the physical connection. See appendix for package base for pin wirings.

A (german) Howto for connecting a Windows client with serial PPP can be found at:

http://www.fli4l.de/hilfe/howtos/basteleien/opt-ppp-howto/

© 2001-2019 The fli4l-Team - 28 April 2019