System Administration Guide: Network Services

ProcedureHow to Obtain Diagnostic Information for PPPoE

You can use PPP and standard UNIX utilities to identify problems with PPPoE. When you suspect that PPPoE is the cause of problems on a link, use the following diagnostic tools to obtain troubleshooting information.

  1. Become superuser on the machine that runs the PPPoE tunnel, either PPPoE client or PPPoE access server.

  2. Turn on debugging, as explained in the procedure How to Turn on PPP Debugging.

  3. View the contents of the log file /var/log/pppdebug.

    The following example shows part of a log file that was generated for a link with a PPPoE tunnel.


    Sep  6 16:28:45 enyo pppd[100563]: [ID 702911 daemon.info] Plugin 
      pppoe.so loaded.
    Sep  6 16:28:45 enyo pppd[100563]: [ID 860527 daemon.notice] pppd 
      2.4.0b1 (Sun Microsystems, Inc.,
    Sep  5 2001 10:42:05) started by troot, uid 0
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.debug] connect option:
       '/usr/lib/inet/pppoec 
    -v hme0' started (pid 100564)
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.info] Serial connection established.
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.info] Using interface sppp0
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.notice] Connect: sppp0
       <--> /dev/sppptun
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.debug] /etc/ppp/pap-secrets
      is apparently empty
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.debug] /etc/ppp/chap-secrets
      is apparently empty
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.debug] sent 
      [LCP ConfReq id=0xef <mru 1492> 
    asyncmap 0x0 <magic 0x77d3e953><pcomp><acomp>
    Sep  6 16:28:46 enyo pppd[100563]: [ID 702911 daemon.debug] rcvd 
      [LCP ConfReq id=0x2a <mru 1402>
    asyncmap 0x0 <magic 0x9985f048><pcomp><acomp 

    If the debugging output does not help you isolate the problem, continue with this procedure.

  4. Get diagnostic messages from PPPoE.


    # pppd connect "/usr/lib/inet/pppoec -v interface-name"
    

    pppoec sends diagnostic information to the stderr. If you run pppd in the foreground, the output appears on the screen. If pppd runs in the background, the output is sent to /etc/ppp/connect-errors.

    The next example shows the messages that are generated as the PPPoE tunnel is negotiated.


    Connect option: '/usr/lib/inet/pppoec -v hme0' started (pid 100564)
    /usr/lib/inet/pppoec: PPPoE Event Open (1) in state Dead (0): action SendPADI (2)
    /usr/lib/inet/pppoec: Sending PADI to ff:ff:ff:ff:ff:ff: 18 bytes
    /usr/lib/inet/pppoec: PPPoE State change Dead (0) -> InitSent (1)
    /usr/lib/inet/pppoec: Received Active Discovery Offer from 8:0:20:cd:c1:2/hme0:pppoed
    /usr/lib/inet/pppoec: PPPoE Event rPADO+ (5) in state InitSent (1): action SendPADR+ (5)
    /usr/lib/inet/pppoec: Sending PADR to 8:0:20:cd:c1:2: 22 bytes
    /usr/lib/inet/pppoec: PPPoE State change InitSent (1) -> ReqSent (3)
    /usr/lib/inet/pppoec: Received Active Discovery Session-confirmation from
       8:0:20:cd:c1:2/hme0:pppoed
    /usr/lib/inet/pppoec: PPPoE Event rPADS (7) in state ReqSent (3): action Open (7)
    /usr/lib/inet/pppoec: Connection open; session 0002 on hme0:pppoe
    /usr/lib/inet/pppoec: PPPoE State change ReqSent (3) -> Convers (4)
    /usr/lib/inet/pppoec: connected

    If the diagnostic messages do not help you isolate the problem, continue with this procedure.

  5. Run snoop. Then save the trace to a file.

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


    # snoop -o pppoe-trace-file
    
  6. View the snoop trace file.


    # snoop -i pppoe-trace-file -v pppoe

    ETHER: ----- Ether Header -----
    ETHER:
    ETHER: Packet 1 arrived at 6:35:2.77
    ETHER: Packet size = 32 bytes
    ETHER: Destination = ff:ff:ff:ff:ff:ff, (broadcast)
    ETHER: Source      = 8:0:20:78:f3:7c, Sun
    ETHER: Ethertype = 8863 (PPPoE Discovery)
    ETHER:
    PPPoE: ----- PPP Over Ethernet -----
    PPPoE:
    PPPoE: Version = 1
    PPPoE: Type = 1
    PPPoE: Code = 9 (Active Discovery Initiation)
    PPPoE: Session Id = 0
    PPPoE: Length = 12 bytes
    PPPoE:
    PPPoE: ----- Service-Name -----
    PPPoE: Tag Type = 257
    PPPoE: Tag Length = 0 bytes
    PPPoE:
    PPPoE: ----- Host-Uniq -----
    PPPoE: Tag Type = 259
    PPPoE: Tag Length = 4 bytes
    PPPoE: Data = Ox00000002
    PPPoE:
    .
    .
    .
    ETHER: ----- Ether Header -----
    ETHER:
    ETHER: Packet 5 arrived at 6:35:2.87
    ETHER: Packet size = 60 bytes
    ETHER: Destination = 8:0:20:78:f3:7c, Sun)
    ETHER: Source      = 0:2:fd:39:7f:7, 
    ETHER: Ethertype = 8864 (PPPoE Session)
    ETHER:
    PPPoE: ----- PPP Over Ethernet -----
    PPPoE:
    PPPoE: Version = 1
    PPPoE: Type = 1
    PPPoE: Code = 0 (PPPoE Session)
    PPPoE: Session Id = 24383
    PPPoE: Length = 20 bytes
    PPPoE:
    PPP: ----- Point-to-Point Protocol -----
    PPP:
    PPP-LCP: ----- Link Control Protocol -----
    PPP-LCP:
    PPP-LCP: Code = 1 (Configure Request)
    PPP-LCP: Identifier = 80
    PPP-LCP: Length = 18