System Administration Guide, Volume 3

Common Check

The following section contains some common checks that you might need to perform to verify the operation of your PPP setup.


Note -

You must become superuser to perform these checks.


Checking Hardware

Make sure that all modem and power cables are tightly seated. If you are having problems with PPP, always check the modems, cables, serial card, and phone lines first.

How to Check Interface Status

After PPP is started, you can use ifconfig to monitor the current state of the line, using only the PPP interface name as an argument. Example 23-4 shows sample output from ifconfig for PPP links that are running.


Note -

If a user is privileged (root), and issues an ifconfig command, machine addresses are displayed in the output as shown in the following example.


  1. Become superuser.

  2. Type:


    ifconfig ipdptp0
    

Example 23-4 ifconfig Output for Point-to-Point Link


nomadb# ifconfig ipdptp0

ipdptp0: flags=28d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,UNNUMBERED> mtu 1500
        inet 129.144.111.26 --> 129.144.116.157 netmask ffff0000
        ether 0:0:0:0:0:0 

You receive output similar to that in Example 23-5 for both standard and dynamic point-to-point links.


Example 23-5 ifconfig Output for Multipoint Link


nubian# ifconfig ipd0

ipd0: flags=c1<UP,RUNNING,NOARP> mtu 1500
        inet 129.144.201.191 netmask ffffff00
        ether 0:0:0:0:0:0

If ifconfig does not display UP and RUNNING, you did not configure PPP correctly. For more information on ifconfig, see "ifconfig Command" and the ifconfig(1M) man page.

How to Check Connectivity

Use the ping command to verify that the connection is up or can be established. For example, consider the following simple round-trip test:

  1. Become superuser.

  2. Type:


    # ping elvis
    

    where elvis is the name of the PPP interface on the remote host. If the resulting display is


    elvis is alive

    then packets can be sent to and received from elvis. If not, a routing problem exists at some point between the local and remote hosts. For more information on ping, refer to "ping Command" and the ping(1M) man page.

How to Check Interface Activity

Use the netstat command as follows to check that packets are being sent and received correctly:

  1. Become superuser.

  2. Type:


    # netstat -i
    

Refer to "netstat Command" and the netstat(1M) man page.

How to Check the Local Routing Tables

Use the netstat command to display the local routing tables:

  1. Become superuser.

  2. Type:


    # netstat -r
    

The following is sample output:


Routing tables
Destination     Gateway    Flags  Ref    Use    Interface
------------- ------------ ----- ------ ------- ----------
sahara        deserted     UGH    0           0  ie1
karakum       labia        UGH    0           0  ie1
frodo         bilbo        UGH    1       12897  ipdptp0
route7        route7       UGH    0           0  ie0
eastgate      route71      UGH    0         158  ie0
backbone      pitstopbb    U      1       16087  ie1
dresdenpc     route1       UG     0           0  ie1
loopback      localhost    U      2      113436  lo0
swan-bb       pitstop      U      406    146044  ie0
dallas2       route7       UG     0           0  ie0
trainingpc    route62      UG     0           0  ie1

Make sure a routing table entry exists for each possible destination network. In particular, PPP devices, listed under Interface, should be matched with the appropriate host names listed under Gateway. The Gateway entry should, in turn, be matched with the correct entry under Destination.

Otherwise, if you are using static routing, add the appropriate static routes.

How to Add Routes Using in.routed

If you are using dynamic routing with in.routed:

  1. Become superuser.

  2. Verify that in.routed is running by typing:


    # ps -e | grep route
    

    If the routing tables still don't look correct, become superuser and continue with the next steps.

  3. Kill in.routed by typing the process ID you got from ps -e as the argument to kill. For example, if 1384 was the process ID, you would type:


    # kill 1384
    

  4. Flush the routing tables as follows:


    #  /usr/sbin/route -f
    

  5. Restart in.routed:


    # /usr/sbin/in.routed
    

Checking Permissions

If you attempt to use rsh and receive the message Permission denied, the remote system's /etc/hosts.equiv or /.rhosts file does not contain the sending system's host name or does not contain the line +.

Checking Packet Flow

Check the packet flow next. Use the snoop command to observe packets from the network and their contents. The example below shows some sample output from snoop.


Example 23-6 Sample Output From snoop


# snoop -d ipdptp0
Using device ipdptp0 (promiscuous mode)
corey -> pacifica7    RLOGIN C port=1019
       hugo -> ponc3         RPC R XID=22456455 Success
       ponc3 -> hugo         NFS C WRITE FH=1B29 at 32768

    commlab3 -> commlab4     TELNET R port=34148
    commlab4 -> commlab3     IP  D=129.144.88.3 S=129.144.88.4 LEN=46, ID=41925
    commlab3 -> commlab4     TELNET R port=34148
    commlab4 -> commlab3     ICMP Echo request
    commlab3 -> commlab4     ICMP Echo reply
    commlab4 -> commlab3     FTP C port=34149
    commlab4 -> commlab3     FTP C port=34149
    commlab3 -> commlab4     FTP R port=34149
    commlab4 -> commlab3     FTP C port=34149

The ipdptp0 device name mentioned in the first line of the output Using device ipdptp0 indicates a point-to-point connection.


Note -

You need to have the link up and some traffic generated in order to use snoop to check the line status.


snoop captures packets from the network and displays their contents. It uses both the network packet filter and streams buffer modules to provide efficient capture of packets from the network. Captured packets can be displayed as they are received or saved to a file for later viewing.

snoop can display packets in a single-line summary form or in verbose multiline forms. In summary form, only the data pertaining to the highest-level protocol is displayed. For example, an NFS packet will have only NFS information displayed. The underlying RPC, UDP, IP, and Ethernet frame information is suppressed but can be displayed if either of the verbose options is chosen.

For more information about the snoop command, refer to the snoop(1M) man page.