Solstice PPP 3.0.1 Administration Guide

Chapter 5 Example Configurations

This chapter provides examples of common network configurations created using Solstice PPP, including the corresponding configuration files.

To configure Solstice PPP on your machine:

  1. Create the files ppp.conf and link.conf, which specify the configuration of the synchronous and asynchronous PPP links on your machine.

  2. To initiate asynchronous connections, create a CHAT script that specifies the login id and password sent during the link establishment phase.

  3. To accept asynchronous connections, create a user account that specifies the login id and login password expected during the link establishment phase.

Synchronous LAN to LAN Configuration

Figure 5-1 shows a single synchronous PPP link used to connect two local area networks (LANs). Two hosts (epic and odyssey) running Solstice PPP act as routing gateways between the two networks. Both hosts request authentication using the Password Authentication Protocol (PAP).

Figure 5-1 Synchronous LAN to LAN Configuration

Graphic

The simplest, and most efficient, way to implement this configuration establishes a point-to-point IP connection between the gateways epic and odyssey. Each host can use its primary IP address as the source address of the point-to-point IP interface.

The two hosts act as IP routers in this configuration; therefore, the file /etc/gateways must exist on each host so that IP datagrams are routed correctly.

In this example, both hosts use one of the onboard serial ports (zsh) to make the link; however, the same link could be established using some other serial device.

PPP Configuration File (ppp.conf) for epic:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 epic odyssey netmask 255.255.255.0 mtu 1500 up

sync_path
    ip_interface              ipdptp0
    unix_device               zsh0
    expect_authentication     pap
    expect_pap_id             odyssey_id
    expect_pap_passwd         odyssey_passwd
    send_authentication       pa
    send_pap_id               epic_id
    send_pap_passwd           epic_passwd

PPP Configuration File (ppp.conf) for odyssey:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 odyssey epic netmask 255.255.255.0 mtu 1500 up

sync_path
    ip_interface           ipdptp0
    unix_device            zsh0
    expect_authentication	 pap
    expect_pap_id        	 epic_id
    expect_pap_passwd       epic_passwd
    send_authentication  	 pap
    send_pap_id         	  odyssey_id
    send_pap_passwd     	  odyssey_passwd

Link Configuration Files (link.conf) for epic and odyssey:


sync_device            syncdev0
    unix_device        zsh0
    line_speed         19200
    tx_clock           baud
    rx_clock           rxc

Load-Sharing over Synchronous Links

Figure 5-2 shows two serial connections used to implement a single synchronous PPP link between two local area networks (LANs). Two hosts (epic and odyssey) running Solstice PPP act as routing gateways between the two networks. Neither host requests peer authentication.

Figure 5-2 Load-sharing over Synchronous Links

Graphic

This example is similar to the basic synchronous link described on "Synchronous LAN to LAN Configuration"; however, both on-board serial ports are used in a load-sharing configuration to double the available bandwidth.

Load-sharing is a Sun-specific enhancement to the standard Point-to-Point Protocol (PPP). Both hosts must be running Solstice PPP, and, for optimum performance, both serial devices must be operating with the same line speed.

The two hosts act as IP routers in this configuration; therefore, the file /etc/gateways must exist on each host so that IP datagrams are routed correctly.

PPP Configuration File (ppp.conf) for epic:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 epic odyssey netmask 255.255.255.0 mtu 1500 up

sync_path
		ip_interface      ipdptp0
		unix_device       zsh0

sync_path
		ip_interface      ipdptp0
		unix_device       zsh1

PPP Configuration File (ppp.conf) for odyssey:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 odyssey epic netmask 255.255.255.0 mtu 1500 up

sync_path
		ip_interface     ipdptp0
		unix_device      zsh0

sync_path
		ip_interface     ipdptp0
		unix_device      zsh1

Link Configuration Files (link.conf) for epic and odyssey:


sync_device          syncdev0
    unix_device      zsh0
    line_speed       19200
    tx_clock         baud
    rx_clock         rxc

sync_device          syncdev1
    unix_device      zsh1
    line_speed       19200
    tx_clock         baud
    rx_clock         rxc

Virtual Subnetwork Configuration

Figure 5-3 shows asynchronous links used to create a virtual subnetwork between four hosts. Each host can establish one link at a time with any other host in the network.

Figure 5-3 Virtual Subnetwork Configuration

Graphic

Point-to-multipoint IP interfaces are used to create a virtual subnetwork over asynchronous links. A unique IP address must be assigned to each interface.

The PPP configuration file (ppp.conf) on each machine contains a list of dialup path definitions, which are associated with a single point-to-multipoint IP interface. The link configuration file (link.conf) contains corresponding definitions for each of the remote hosts in the network, which include the phone numbers and the names of the CHAT (or connect) scripts used to initiate connections.

To initiate connections, each host uses CHAT (or connect) scripts that specify a unique login id and login password sent during the link establishment phase.

To accept connections, each host must have a corresponding user account that specifies the unique login id and login password expected during the link establishment phase.

PPP Configuration File (ppp.conf) for epic:


ifconfig ipd0 plumb
ifconfig ipd0 epic-ppp netmask 255.255.255.0 mtu 1500 up

dialup_path
    ip_interface      ipd0
    remote_host       odyssey
    remote_ip_addr    odyssey-ppp
    expect_login_id   ppp1

dialup_path
    ip_interface      ipd0
    remote_host       papyrus
    remote_ip_addr    papyrus-ppp
    expect_login_id   ppp2

dialup_path
    ip_interface      ipd0
    remote_host       scribbler
    remote_ip_addr    scribbler-ppp
    expect_login_id   ppp3

Link Configuration File (link.conf) for epic:


dialup_device         pppdev0
    unix_device       ttya
    line_speed        38400
    modem             BocaModem V.34 DataFax
    call_setup        both

remote_host odyssey
    phone_number      1234561235
    chat_script       odyssey.script
remote_host papyrus
    phone_number      1234561236
    chat_script       papyrus.script
remote_host scribble
    phone_number      1234561237
    chat_script       scribbler.script

PPP Configuration File (ppp.conf) for odyssey:


ifconfig ipd0 plumb
ifconfig ipd0 odyssey-ppp netmask 255.255.255.0 mtu 1500 up

dialup_path
    ip_interface      ipd0
    remote_host       epic
    remote_ip_addr    epic-ppp
    expect_login_id   ppp0

dialup_path
    ip_interface      ipd0
    remote_host       papyrus
    remote_ip_addr    papyrus-ppp
    expect_login_id   ppp2

dialup_path
    ip_interface      ipd0
    remote_host       scribbler
    remote_ip_addr    scribbler-ppp
    expect_login_id   ppp3

Link Configuration File (link.conf) for odyssey:


dialup_device        pppdev0
    unix_device      ttya
    line_speed       38400
    modem            Cardinal V.34/V.FC 28.8 data/fax
    call_setup       both

remote_host epic
    phone_number     1234561234
    chat_script      epic.script
remote_host papyrus
    phone_number     1234561236
    chat_script      papyrus.script
remote_host scribbler
    phone_number     1234561237
    chat_script      scribbler.script

CHAT script (odyssey.script) used by epic to call odyssey:


# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
#
# setline	cs7 parodd

send	   RETURN
expect	 "ogin:"  10  onerror send BREAK repeat 3

send	   "ppp0"
expect	 "word: " 40
#
# Set the ppp password of the remote host here
#
send	  "epic-pass"

User account on odyssey used to accept calls from epic:

Graphic

CHAT script (epic.script) used by odyssey to call epic:


# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
#
# setline	cs7 parodd

send	   RETURN
expect	 "ogin:"  10  onerror send BREAK repeat 3

send	   "ppp1"
expect	 "word: " 40
#
# Set the ppp password of the remote host here
#
send	  "odyssey-pass"

User account on epic used to accept calls from odyssey:

Graphic

Asynchronous Client/Server Configuration

Figure 5-4 shows a small number of clients connected to a server using asynchronous links. Clients initiate calls to the server, which requests authentication using the Challenge-Handshake Authentication Protocol (CHAP).

Figure 5-4 Asynchronous Client/Server Configuration

Graphic

The server uses a single point-to-multipoint IP interface to create a virtual subnetwork of clients. Each client establishes a single point-to-point IP connection to the server.

To initiate calls to the server, each client uses a CHAT (or connect) script that specifies the login id and password it sends during the link establishment phase.

To accept calls from a client, the server must have a corresponding user account that specifies the login id and password it expects to receive. In this simple example, the server has only one modem and only one IP interface; therefore it can only accept one incoming call at a time.

PPP Configuration File (ppp.conf) for papyrus:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 papyrus server netmask 255.255.255.0 mtu 1500 up

dialup_path
    ip_interface          ipdptp0
    remote_host           server
    send_authentication   chap
    send_chap_name        chap-papyrus
    chap_own_secret       Secret*1

Link Configuration File (link.conf) for papyrus:


dialup_device             pppdev0
    unix_device           ttya
    line_speed            38400
    modem                 BocaModem V.34 DataFax
    call_setup            dial

remote_host server
    phone_number          1234561000
    chat_script           server.script

CHAT script (server.script) used by papyrus to call server:


# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
#
# setline	cs7 parodd

send	   RETURN
expect	 "ogin:"  10  onerror send BREAK repeat 3

send	   "ppp_log1"
expect	 "word: " 40
#
# Set the ppp password of the remote host here
#
send	  "papyrus-pass"

PPP Configuration File (ppp.conf) for scribbler:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 scribbler server netmask 255.255.255.0 mtu 1500
up

dialup_path
    ip_interface            ipdptp0
    remote_host             server
    send_authentication     chap
    send_chap_name          chap-scribbler
    chap_own_secret         Secret*2

Link Configuration File (link.conf) for scribbler:


dialup_device          pppdev0
    unix_device        ttya
    line_speed         38400
    modem              Practical 14400 V32bis
    call_setup         dial

remote_host server
    phone_number       1234561000
    chat_script        server.script

CHAT script (server.script) used by scribbler to call server:


# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
#
# setline	cs7 parodd

send	   RETURN
expect	 "ogin:"  10  onerror send BREAK repeat 3

send	   "ppp_log2"
expect	 "word: " 40
#
# Set the ppp password of the remote host here
#
send	  "scribbler-pass"

PPP Configuration File (ppp.conf) for server:


ifconfig ipd0 plumb
ifconfig ipd0 papyrus netmask 255.255.255.0 mtu 1500 up

dialup_path
    ip_interface             ipd0
    remote_ip_addr           papyrus-ppp
    expect_login_id          ppp_log1
    expect_authentication    chap
    expect_chap_name         chap-papyrus
    chap_peer_secret         Secret*1

dialup_path
    ip_interface             ipd0
    remote_ip_addr           scribbler-ppp
    expect_login_id          ppp_log2
    expect_authentication    chap
    expect_chap_name         chap-scribbler
    chap_peer_secret         Secret*2

Link Configuration File (link.conf) for server:


dialup_device                pppdev0
    unix_device              ttya
    line_speed               38400
    modem                    Cardinal V.34/V.FC 28.8 data/fax
    call_setup               answer

dialup_device                ppdev1
    unix_device              ttyb
    line_speed               38400
    modem                    Cardinal V.34/V.FC 28.8 data/fax
    call_setup               answer

User account on server used to accept calls from papyrus:

Graphic

User account on server used to accept calls from scribbler:

Graphic

Generic Internet Server Configuration

Figure 5-5 shows a large number of clients connected to a server using asynchronous links. Clients initiate calls to the server, and request an IP address for the connection. The server has a pool of IP addresses, and a pool of modems, which it allocates to clients as required. In this example, the server requires authentication using the Password Authentication Protocol (PAP).

This configuration is typical of connections between clients and a generic Internet server.

Figure 5-5 Dynamic IP Address Allocation

Graphic

The server has a pool of IP addresses equal to the number of modems it has connected to it. It assigns these addresses to remote clients on request, for as long as there are modems available. Clients use pppconn(1M) to establish a PPP link to the server, and to recover an IP address for the IP connection.


prompt# /usr/bin/pppconn server

In the following example, a total of n clients can make connections to a server with a pool of eight modems; therefore, eight clients can be connected simultaneously.

PPP Configuration File (ppp.conf) for client_0:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 netmask 255.255.255.0 down

dialup_path
    ip_interface         ipdptp0
    request_ip_addr      on
	remote_host   server
    send_authentication  pap
    send_pap_id          pap_id0
    send_pap_passwd      pap_passwd0

Link Configuration File (link.conf) for client_0:


dialup_device pppdev0
    unix_device          ttya
    line_speed           38400
    modem                BocaModem V.34 DataFax
    call_setup           dial

remote_host  server
    phone                1234561000
    chat_script          server.script

CHAT script (server.script) used by client_0 to call server:


# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
#
# setline	cs7 parodd

send	   RETURN
expect	 "ogin:"  10  onerror send BREAK repeat 3

send	   "clnt_0"
expect	 "word: " 40
#
# Set the ppp password of the remote host here
#
send	  "clnt_0-pass"

PPP Configuration File (ppp.conf) for server:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 local remote0 netmask 255.255.255.0 down

ifconfig ipdptp1 plumb
ifconfig ipdptp1 local remote1 netmask 255.255.255.0 down

ifconfig ipdptp2 plumb
ifconfig ipdptp2 local remote2 netmask 255.255.255.0 down
	.
	.
ifconfig ipdptp8 plumb
ifconfig ipdptp8 local remote8 netmask 255.255.255.0 down

dialup_path
    ip_interface             ipdptp*
    expect_login_id          clnt_0
    expect_authentication    pap
    expect_pap_id            pap-id0
    expect_pap_passwd        pap_passwd0

dialup_path
    ip_interface             ipdptp*
    expect_login_id          clnt_1
    expect_authentication    pap
    expect_pap_id            pap-id1
    expect_pap_passwd        pap_passwd1

dialup_path
    ip_interface             ipdptp*
    expect_login_id          clnt_2
    expect_authentication    pap
    expect_pap_id            pap-id2
    expect_pap_passwd        pap_passwd2
	.
	.
dialup_path
    ip_interface            ipdptp*
    expect_login_id         clnt_n
    expect_authentication   pap
    expect_pap_id           pap-idn
    expect_pap_passwd       pap_passwdn

Link Configuration File (link.conf) for server:


dialup_device pppdev0
    unix_device            tty0
    line_speed             38400
    modem                  Cardinal V.34/V.FC 28.8 data/fax
    call_setup             answer

dialup_device pppdev1
    unix_device            tty1
    line_speed             38400
    modem                  Cardinal V.34/V.FC 28.8 data/fax
	call_setup                 answer

dialup_device pppdev2
    unix_device            tty2
    line_speed             38400
    modem                  Cardinal V.34/V.FC 28.8 data/fax
    call_setup             answer
	.
	.
	.
	.
dialup_device pppdev10
    unix_device            tty8
    line_speed             38400
    modem                  Cardinal V.34/V.FC 28.8 data/fax
    call_setup             answer

User account on server used to accept calls from client_0:

Graphic

Null Modem Configuration

The null modem configuration is used to connect two hosts together directly. There are no modems required. See Appendix B, Modem and Null Modem Cables for a description of the null modem cables that can be used for this configuration.

Figure 5-6 Null Modem Configuration

Graphic

In this example, the server has two asynchronous null modem connections to the clients lab0251-ppp and lab0252-ppp. The modem keyword in the link.conf file is always set to none, and a dummy telephone number is assigned to the server.


Note -

There is a limitation in this revision of the product that means that you must always specify a telephone number to initiate an asynchronous connection, even if it is never actually used.


PPP Configuration File (ppp.conf) for lab0251-ppp:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 lab0251-ppp server netmask 255.255.255.0 down

dialup_path
    ip_interface          ipdptp0
    remote_host           server
    inactivity_timeout    120

Link Configuration File (link.conf) for lab0251-ppp:


dialup_device pppdev0
    unix_device      ttya
    line_speed       38400
    modem            none
    call_setup       dial

remote_host server
    phone            1001
    chat_script      server.script

CHAT script (server.script) used by lab0251-ppp to call server:


# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
#
# setline	cs7 parodd

send	   RETURN
expect	 "ogin:"  10  onerror send BREAK repeat 3

send	   "lab0251"
expect	 "word: " 40
#
# Set the ppp password of the remote host here
#
send	  "lab0251-pass"

PPP Configuration File (ppp.conf) for lab0252-ppp:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 lab0252-ppp server netmask 255.255.255.0 down

dialup_path
    ip_interface          ipdptp0
    remote_host           server
    inactivity_timeout    120

Link Configuration File (link.conf) for lab0252-ppp:


dialup_device pppdev0
    unix_device           ttya
    line_speed            38400
    modem                 none
    call_setup            dial

remote_host server
    phone                 1001
    chat_script           server.script

CHAT script (server.script) used by lab0252-ppp to call server:


# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
#
# setline	cs7 parodd

send	   RETURN
expect	 "ogin:"  10  onerror send BREAK repeat 3

send	   "lab0252"
expect	 "word: " 40
#
# Set the ppp password of the remote host here
#
send	  "lab0252-pass"

PPP Configuration File (ppp.conf) for server:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 server lab0251-ppp netmask 255.255.255.0 down

ifconfig ipdptp1 plumb
ifconfig ipdptp1 server lab0252-ppp netmask 255.255.255.0 down

dialup_path
    ip_interface        ipdptp0
    expect_login_id     lab0251
    inactivity_timeout  0

dialup_path
    ip_interface        ipdptp1
    expect_login_id     lab0252
    inactivity_timeout  0

Link Configuration File (link.conf) for server:


dialup_device pppdev
    unix_device         tty0
    line_speed          38400
    modem               none
    call_setup          answer

		dialup_device pppdev1
    unix_device         tty1
    line_speed          38400
    modem               none
    call_setup          answer

Advanced IP Routing Configuration

A single synchronous PPP link is used to connect a single remote host to a local area network (LAN), as shown in Figure 5-7. Ideally, the remote host should appear as though it is connected directly to the same network.

Figure 5-7 Advanced IP Routing to Create Virtual LAN Connection

Graphic

There are a number of ways to create this configuration, but one of the simplest uses the arp(1M) command to create an ARP entry on the router so that it acts as an ARP proxy, and responds to ARP requests on behalf of the remote host. If the IP interface associated with the PPP link is configured up, the ARP proxy will pass IP datagrams to the remote host automatically.

Use the following arp(1M) command, specifying the hostname (or IP address) of the remote host and the Ethernet address of the ARP proxy, to enable this configuration:


prompt# arp -s hostname ether pub

The change is not saved, and you must run the arp(1M) command each time the router is rebooted. To ensure that the router will always respond as an ARP proxy on behalf of the remote host, create the file /etc/rc2.d/S99arp with the following contents:


#!/bin/sh
#

mode=$1
case "$mode" in
'start')
       if [ -f /etc/arp.cf ]; then
                echo "Setting proxy arp entries."
                 /usr/sbin/arp -f /etc/arp.cf
                 ndd -set /dev/ip ip_forwarding 1
       fi

       exit 0
       ;;
'stop')
       exit 0
        ;;
esac

Create a file called /etc/arp.cf that contains the hostname (or IP address) of the remote host and the Ethernet address of the router, as follows:


hostname ether pub

The contents of the file /etc/arp.cf is read each time the router is rebooted, and the router is configured as an ARP proxy for the remote host automatically. You can configure the router as an ARP proxy for multiple hosts by making multiple entries in the file /etc/arp.cf.

Configuration using the Domain Name Service (DNS)

The domain name service (DNS) is the accepted Internet standard naming service for the resolution of hostnames and IP addresses. To use DNS in combination with Solstice PPP, you must specify your name servers and enable DNS as your naming service. Consider the previous example configuration, as shown in Figure 5-8.

Figure 5-8 Using the Domain Name Service (DNS)

Graphic

Configuring the Client

On the client, create the file /etc/resolv.conf that contains the domain name and the IP addresses of all the name servers. For example:


domain	xyz.Company.COM
nameserver	179.xxx.zzz.11
nameserver	...
nameserver	...

To use DNS as the default naming service, edit the file /etc/nsswitch.conf and edit the hosts entry as follows:


hosts:   files dns 

The changes are implemented automatically. You do not need to reboot the machine.

To be certain that you can resolve all IP addresses over the PPP link, use the default_route keyword in the dialup path definition for the connection to the router. This adds the route to the route table as the default destination. The route is removed when the IP interface is marked down.

Configuring the Router

The router does not have to use DNS as its naming service, but it may do so. On the router, the IP interface for the PPP link may be configured up or down.

If the interface is up, the IP routing is configured when the machine is rebooted. The file /etc/gateways must exist on the router, so that it advertises itself to the rest of the network as a gateway.

If the interface is down, you must configure the routing manually, as follows:

  1. Set the ip_forwarding flag.


    prompt# ndd -set /dev/ip_forwarding 1
    
  2. Add a passive route to the remote host in the routing table.


    prompt# route add host remote_host_addr router_addr 1
    

    To add the route for the remote host in the example, type:


    prompt# route add host 179.xxx.zzz.117 179.xxx.yyy.10 1
    

    Alternatively, you can use a different routing mechanism, such as gated, to configure the IP routing for Solstice PPP.

Running PPP over PAD over X.25

The packet assembler disassembler (PAD) enables a machine to communicate over an X.25 packet switched data network (PSDN). It assembles outgoing packets so they can be forwarded over the PSDN, and disassembles incoming packets so they can be read by the remote machine.

A Solstice PPP server can be configured to accept incoming PAD calls. In the following example, a server running Solstice PPP and SunLink X.25 9.0 or later, uses the PAD emulator to receive packets sent by a PPP client.

Figure 5-9 Running PPP over PAD over X.25

Graphic

There is no special configuration needed for SunLink X.25. It must be configured to accept incoming PAD calls, and, in this example, the default X.3 profile for SunLink X.25 was used.

Solstice PPP sees the PAD as a normal serial line. You do not need to configure the serial line for Solstice PPP, since the PAD configuration takes care of this; therefore, you do not need a corresponding entry in the link configuration file (link.conf). This file must exist, however, if Solstice PPP is to start correctly.

The standard maximum receive unit (MRU) for IP running over X.25 is 576. For optimum performance, set this value using the lcp_mru keyword in the dialup_path definition in the PPP path configuration file (ppp.conf).

As for all Solstice PPP server configurations, you must also create a user account for the incoming connection.

PPP Configuration File (ppp.conf) for server:


ifconfig ipdptp0 plumb
ifconfig ipdptp0 server client netmask 255.255.255.0 down


dialup_path
    ip_interface       ipdptp0
    expect_login_id    clnt_0
    lcp_mru            576

User account on server used to accept calls from client:

Graphic