pppd 配置,如何自动启动 eth0?

pppd 配置,如何自动启动 eth0?

我如何允许 ppp 守护进程在连接之前先启动 eth0?如果以太网端口关闭,则连接不会成功。因此,我将其放入 /etc/ppp/peers/dsl ,但 eth0 不会通过“pon dsl”命令启动:

plugin rp-pppoe.so
eth0
defaultroute
usepeerdns
user "blabla"
noauth
noipdefault
hide-password
debug

来自内核消息缓冲区:

error sending pppoe packet: Network is down

PS:请不要告诉我在启动时启动 eth0 ;-P,它已经设置好了

答案1

制作一个可以 ping 的脚本,如果结果为零,则它应该发出以下命令:/etc/init.d/net.eth0 start ifconfig eth0 up,然后通过 pon $tunnel 连接 ppp,命令之间应该有适当的等待时间,否则可能无法工作。

相关内容