Debian

Linux PPP:如何調試退出程式碼 = 16 的斷開連接?

  • September 27, 2016

我正在使用pppdandwvdial在我的 ARM Linux 嵌入式系統上。我有一個通過串列埠連接的 CDMA 調製解調器,並且正在連接到 Verizon 網路。我看到每天有幾次pppd以退出程式碼 16 退出(請參閱下面日誌中的確切消息)。如何找出導致這些斷開連接的原因?特別是該LCP terminated by peer消息表明了什麼?

Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: LCP terminated by peer
Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: Connect time 0.6 minutes.
Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: Sent 1044 bytes, received 0 bytes.
Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: restoring old default route to eth0 [1
92.168.98.1]
Feb 18 12:31:07 ts7600-47aad3 pppd[3242]: Connection terminated.
Feb 18 12:31:07 ts7600-47aad3 pppd[3242]: Modem hangup
Feb 18 12:31:07 ts7600-47aad3 pppd[3242]: Exit.
Feb 18 12:31:07 ts7600-47aad3 wvdial: Disconnecting at Tue Feb 18 12:31:07 2014
Feb 18 12:31:07 ts7600-47aad3 wvdial: The PPP daemon has died: A modem hung up t
he phone (exit code = 16)
Feb 18 12:31:07 ts7600-47aad3 wvdial: man pppd explains pppd error codes in more
detail.

**重要提示:**您始終可以使用本地選項覆蓋預設選項。

man pppd

  /etc/ppp/options
         System default options for pppd, read before user default 
         options or command-line options.

並且

~/.ppprc
/etc/ppp/options.ttyname
/etc/ppp/peers

您應該啟用調試選項(有時也是 kdebug)

  debug  Enables connection debugging facilities.  If this option
  is given, pppd will log the contents of all control packets  sent  
  or  received  in a readable form.  The packets are logged 
  through syslog with facility daemon and level debug.  This 
  information can be directed to  a  file  by  setting  
  up  /etc/syslog.conf  appropriately  (see  sys-log.conf(5)).

你的退出程式碼

  EXIT STATUS
     16     The link was terminated by the modem hanging up.

等等。

您的錯誤是LCP terminated by peer 有幾個連結解釋瞭如何解決它:

you'll need to pass "refuse-eap" option to pppd. ubuntu

lcp_term_authentication

或者只是檢查您的憑據。

引用自:https://unix.stackexchange.com/questions/115971