PPPOE : 如何设置固定呼叫号码

PPPOE : 如何设置固定呼叫号码

我在 PPPOE 连接方面遇到问题,

错误日志:

Dec 29 15:50:20 rahul-home pppd[4141]: PPP session is 1769
Dec 29 15:50:20 rahul-home pppd[4141]: Connected to 00:27:0e:14:d1:04 via interface eth0
Dec 29 15:50:20 rahul-home pppd[4141]: Using interface ppp0
Dec 29 15:50:20 rahul-home pppd[4141]: Connect: ppp0 <--> eth0
Dec 29 15:50:20 rahul-home NetworkManager[1131]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Dec 29 15:50:20 rahul-home NetworkManager[1131]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Dec 29 15:50:20 rahul-home NetworkManager[1131]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Dec 29 15:50:20 rahul-home pppd[4141]: CHAP authentication failed: bad username or password
Dec 29 15:50:20 rahul-home pppd[4141]: CHAP authentication failed
Dec 29 15:50:20 rahul-home pppd[4141]: Connection terminated.
Dec 29 15:50:20 rahul-home NetworkManager[1131]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Dec 29 15:50:20 rahul-home avahi-daemon[859]: Withdrawing workstation service for ppp0.
Dec 29 15:50:22 rahul-home pppd[4141]: Terminating on signal 15
Dec 29 15:50:22 rahul-home pppd[4141]: Exit.

成功日志

Dec 29 15:50:24 rahul-home pppd[4189]: PPP session is 22450
Dec 29 15:50:24 rahul-home pppd[4189]: Connected to 00:07:e9:a5:a8:85 via interface eth0
Dec 29 15:50:24 rahul-home pppd[4189]: Using interface ppp0
Dec 29 15:50:24 rahul-home pppd[4189]: Connect: ppp0 <--> eth0
Dec 29 15:50:24 rahul-home NetworkManager[1131]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Dec 29 15:50:24 rahul-home NetworkManager[1131]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Dec 29 15:50:24 rahul-home NetworkManager[1131]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Dec 29 15:50:24 rahul-home pppd[4189]: CHAP authentication succeeded: Welcome.
Dec 29 15:50:24 rahul-home pppd[4189]: CHAP authentication succeeded
Dec 29 15:50:24 rahul-home pppd[4189]: peer from calling number 00:07:E9:A5:A8:85 authorized
Dec 29 15:50:24 rahul-home pppd[4189]: local  IP address xx.xx.xx.xx
Dec 29 15:50:24 rahul-home pppd[4189]: remote IP address 172.31.29.1
Dec 29 15:50:24 rahul-home pppd[4189]: primary   DNS address xx.xx.xx.xx
Dec 29 15:50:24 rahul-home pppd[4189]: secondary DNS address xx.xx.xx.xx

我的观察

我已经尝试了 n 次,但我注意到拨号器在使用对等呼叫号码时已连接00:07:E9:A5:A8:85,但我无法解决这个问题。在 的帮助下man pppd,我尝试了以下选项/etc/ppp/options

allow-number 00:07:E9:A5:A8:85  # Tested showing not authorized
remotenumber 00:07:E9:A5:A8:85  # Tested but not working

临时解决方案

#!/bin/bash

# Retry pppoe until get connected

rndc stop

interval=2
n=0
pppstats && { echo "Internet is working"; exit 1; }
until nc -vzw1 titanic 80 
do
    poff -a ||
    pon dsl-provider
    sleep $interval 
    ((n++))
done

echo "Dialer Connected after total retry: $n"
plog
/etc/init.d/bind9 start

眼镜

Distributor ID: Ubuntu
Description:    Ubuntu 13.10
Release:    13.10
Codename:   saucy

pppd version 2.4.5

问题

如何在 pppoe 中设置固定呼叫号码?

答案1

启用调试日志后,我找到了解决方案

问题是

我们本地的 ISP 中有两个组,我们可以使用它们来查看:

root@rahul-home:~# pppoe-discovery 
AC-Ethernet-Address: 00:07:e9:a5:a8:85
Access-Concentrator: spidernet
       Service-Name: spidernet
--------------------------------------------------
AC-Ethernet-Address: 00:27:0e:14:d1:04
Access-Concentrator: Fivenet
       Service-Name: 5network
--------------------------------------------------

我询问的呼叫号码实际上是 ACNAME,00:07:e9:a5:a8:85即蜘蛛。

现在的问题是如何设置修复 ACNAME 和服务名称?

我检查了手册页,但没有找到相关的内容,但在谷歌搜索后,我找到了解决方案,这是 2010 年报告的 Bug,但仍然没有更新手册页。

和解决方案

我们需要进入 /etc/ppp/peers/dsl-provider配置文件。有一行: plugin rp-pppoe.so ethX

我们可以指定多个选项,例如:

plugin rp-pppoe.so rp_pppoe_service SERVICE_NAME rp_pppoe_ac ACCESS_CONCENTRATOR ethX

相关内容