很久没有来论坛逛了,现在整理下pi的pppoe安装及拨号过程。由于本人家里是单线上网,需要pppoe拨号,
而pi并咩有安装pppoe拨号软件,需要自己手动安装,如果各位看官家里有路由,就无需关注了。
下面是本人整理的pppoe安装及拨号过程:
1 本以为pi集成了pppoe安装包,执行了sudo apt-get install pppoe,但是出现一堆错误。
0% [Working]
Err
http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpcap0.8 armhf 1.3.0-1
Could not resolve 'mirrordirector.raspbian.org'
0% [Working]
Err
http://mirrordirector.raspbian.org/raspbian/ wheezy/main ppp armhf 2.4.5-5.1
Could not resolve 'mirrordirector.raspbian.org'
0% [Working]
Err
http://mirrordirector.raspbian.org/raspbian/ wheezy/main pppoe armhf 3.8-3
Could not resolve 'mirrordirector.raspbian.org'
0% [Working]
Failed to fetch
http://mirrordirector.raspbian.o ... 8_1.3.0-1_armhf.deb Could not resolve 'mirrordirector.raspbian.org'
Failed to fetch
http://mirrordirector.raspbian.o ... 2.4.5-5.1_armhf.deb Could not resolve 'mirrordirector.raspbian.org'
Failed to fetch
http://mirrordirector.raspbian.o ... poe_3.8-3_armhf.deb Could not resolve 'mirrordirector.raspbian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
发现pppoe软件包及它的部分依赖包都没有,没有办法,无奈之下,在raspbian的源地址上(http://mirrordirector.
raspbian.org/raspbian/pool/)一个个下,下的包有如下几个:
/var/cache/apt/archives$ ls
libpcap0.8_1.3.0-1_armhf.deb pppconfig_2.3.18+nmu4_all.deb
libpcap0.8-dbg_1.3.0-1_armhf.deb ppp-dev_2.4.5-5.1_all.deb
libpcap0.8-dev_1.3.0-1_armhf.deb pppoe_3.8-3_armhf.deb
libpcap-dev_1.3.0-1_all.deb pppoeconf_1.20_all.deb
pppstatus_0.4.2-10_armhf.deb ppp-udeb_2.4.5-5.1_armhf.udeb
ppp_2.4.5-5.1_armhf.deb
2 将上面的几个安装包拷到u盘,并在pi上挂载u盘
大致是在mnt下新建一个挂载目录,我的是usb。
pi@raspberrypi:/mnt$ ls
usb
然后使用如下命令,挂载u盘
mount /dev/sda /mnt/usb
最后将这些文件全部拷贝到/var/cache/apt/archives下
3 开始安装pppoe。
命令如下:sudo apt-get install pppoe pppoeconf pppstatus
4 开始配置pppoe。
2、运行配置命令,进入配置向导
sudo pppoeconf
附相关命令:
手工拨号
# sudo pon dsl-provider
(2)查看日志
# plog
(3)断开连接
# poff
pi@raspberrypi:/$ sudo pon dsl-porovider
Plugin rp-pppoe.so loaded.
pi@raspberrypi:/$ plog
Jun 16 02:00:12 raspberrypi pppd[12219]: secondary DNS address 218.4.4.4
pi@raspberrypi:/$ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:0a:29:09
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:445 errors:0 dropped:0 overruns:0 frame:0
TX packets:423 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42058 (41.0 KiB) TX bytes:40695 (39.7 KiB)
lo Link encap
ocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
ppp0 Link encap
oint-to-Point Protocol
inet addr:180.111.156.228 P-t-P:180.111.156.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:708 (708.0 B) TX bytes:778 (778.0 B)
pi@raspberrypi:/$ poinping
www.sina.com
PING newsnj.sina.com.cn (202.102.75.161) 56(84) bytes of data.
64 bytes from 202.102.75.161: icmp_req=1 ttl=57 time=2.21 ms
64 bytes from 202.102.75.161: icmp_req=2 ttl=57 time=2.61 ms
64 bytes from 202.102.75.161: icmp_req=3 ttl=57 time=5.77 ms
64 bytes from 202.102.75.161: icmp_req=4 ttl=57 time=3.19 ms
64 bytes from 202.102.75.161: icmp_req=5 ttl=57 time=5.19 ms
64 bytes from 202.102.75.161: icmp_req=6 ttl=57 time=6.63 ms
^C
--- newsnj.sina.com.cn ping statistics ---