树莓派pppoe
连接的网络是移动(铁通)的宽带,不同的宽带的dns需要修改。
1.首先安装pppoe包
apt-get install pppoe
2.然后,复制conf文件/etc/ppp/pppoe.conf:
#***********************************************************************
#
# pppoe.conf
#
# Configuration file for rp-pppoe. Edit as appropriate and install in
# /etc/ppp/pppoe.conf
#
# NOTE: This file is used by the pppoe-start, pppoe-stop, pppoe-connect and
# pppoe-status shell scripts. It is *not* used in any way by the
# "pppoe" executable.
#
# Copyright (C) 2000 Roaring Penguin Software Inc.
#
# This file may be distributed under the terms of the GNU General
# Public License.
#
# LIC: GPL
# $Id: pppoe.conf,v 1.11 2005/08/09 02:49:12 dfs Exp $
#*********************************************************************** # When you configure a variable, DO NOT leave spaces around the "=" sign. # Ethernet card connected to DSL modem
ETH='eth0' # PPPoE user name. You may have to supply "@provider.com" Sympatico
# users in Canada do need to include "@sympatico.ca"
# Sympatico uses PAP authentication. Make sure /etc/ppp/pap-secrets
# contains the right username/password combination.
# For Magma, use xxyyzz@magma.ca
USER='×××××××' # Bring link up on demand? Default is to leave link up all the time.
# If you want the link to come up on demand, set DEMAND to a number indicating
# the idle time after which the link is brought down.
DEMAND=no
#DEMAND=300 # DNS type: SERVER=obtain from server; SPECIFY=use DNS1 and DNS2;
# NOCHANGE=do not adjust.
DNSTYPE=SPECIFY # Obtain DNS server addresses from the peer (recent versions of pppd only)
# In old config files, this used to be called USEPEERDNS. Changed to
# PEERDNS for better Red Hat compatibility
PEERDNS=no DNS1=61.232.206.102
DNS2=211.98.4.1 # Make the PPPoE connection your default route. Set to
# DEFAULTROUTE=no if you don't want this.
DEFAULTROUTE=yes ### ONLY TOUCH THE FOLLOWING SETTINGS IF YOU'RE AN EXPERT # How long pppoe-start waits for a new PPP interface to appear before
# concluding something went wrong. If you use 0, then pppoe-start
# exits immediately with a successful status and does not wait for the
# link to come up. Time is in seconds.
#
# WARNING WARNING WARNING:
#
# If you are using rp-pppoe on a physically-inaccessible host, set
# CONNECT_TIMEOUT to 0. This makes SURE that the machine keeps trying
# to connect forever after pppoe-start is called. Otherwise, it will
# give out after CONNECT_TIMEOUT seconds and will not attempt to
# connect again, making it impossible to reach.
CONNECT_TIMEOUT=30 # How often in seconds pppoe-start polls to check if link is up
CONNECT_POLL=2 # Specific desired AC Name
ACNAME= # Specific desired service name
SERVICENAME= # Character to echo at each poll. Use PING="" if you don't want
# anything echoed
PING="." # File where the pppoe-connect script writes its process-ID.
# Three files are actually used:
# $PIDFILE contains PID of pppoe-connect script
# $PIDFILE.pppoe contains PID of pppoe process
# $PIDFILE.pppd contains PID of pppd process
CF_BASE=`basename $CONFIG`
PIDFILE="/var/run/$CF_BASE-pppoe.pid" # Do you want to use synchronous PPP? "yes" or "no". "yes" is much
# easier on CPU usage, but may not work for you. It is safer to use
# "no", but you may want to experiment with "yes". "yes" is generally
# safe on Linux machines with the n_hdlc line discipline; unsafe on others.
SYNCHRONOUS=no # Do you want to clamp the MSS? Here's how to decide:
# - If you have only a SINGLE computer connected to the DSL modem, choose
# "no".
# - If you have a computer acting as a gateway for a LAN, choose "1412".
# The setting of 1412 is safe for either setup, but uses slightly more
# CPU power.
CLAMPMSS=1412
#CLAMPMSS=no # LCP echo interval and failure count.
LCP_INTERVAL=20
LCP_FAILURE=3 # PPPOE_TIMEOUT should be about 4*LCP_INTERVAL
PPPOE_TIMEOUT=80 # Firewalling: One of NONE, STANDALONE or MASQUERADE
FIREWALL=NONE # Linux kernel-mode plugin for pppd. If you want to try the kernel-mode
# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
LINUX_PLUGIN= # Any extra arguments to pass to pppoe. Normally, use a blank string
# like this:
PPPOE_EXTRA="" # Rumour has it that "Citizen's Communications" with a 3Com
# HomeConnect DSL Modem DualLink requires these extra options:
# PPPOE_EXTRA="-f 3c12:3c13 -S ISP" # Any extra arguments to pass to pppd. Normally, use a blank string
# like this:
PPPD_EXTRA="" ########## DON'T CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
# If you wish to COMPLETELY overrride the pppd invocation:
# Example:
# OVERRIDE_PPPD_COMMAND="pppd call dsl" # If you want pppoe-connect to exit when connection drops:
# RETRY_ON_FAILURE=no
2.2.网通的配置如下:
DNS1=221.12.1.227
DNS2=221.12.33.227
2.3移动配置如下:
211.138.13.66 移动
211.143.60.56 移动
61.232.206.102 铁通
211.98.4.1 铁通
3.接着配置pppoe
root@raspberrypi:/mnt/pi_boot/home# pppoe-setup
Welcome to the Roaring Penguin PPPoE client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly... Looks good! Now, please enter some information: USER NAME >>> Enter your PPPoE user name (default username): 用户名 INTERFACE >>> Enter the Ethernet interface connected to the DSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0): Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no): DNS Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: server PASSWORD >>> Please enter your PPPoE password:密码
>>> Please re-enter your PPPoE password:密码 FIREWALLING Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port. The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): 2 ** Summary of what you entered ** Ethernet Interface: eth0
User name: 用户名
Activate-on-demand: No
DNS addresses: Supplied by ISP's server
Firewalling: MASQUERADE >>> Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
(But first backing it up to /etc/ppp/pap-secrets-bak)
(But first backing it up to /etc/ppp/chap-secrets-bak) Congratulations, it should be all set up! Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring
it down. Type 'pppoe-status' to see the link status.
4.开启pppoe
pppoe-start
end
树莓派pppoe的更多相关文章
- pppoe应用概述
PPPOE简述 PPP主要是用来通过拨号或专线方式在两个网络节点之间建立连接.发送数据.PPP是一种分层协议,物理层用来进行实际的点到点连接.由链路控制层(LCP)发起对链路的建立.配置和测试.在LC ...
- 树莓派3B安装OpenWrt打造超级路由器
网上有很多树莓派安装OpenWrt的教程,我这里写一下个人安装体验以及踩过的坑
- 详解树莓派Model B+控制蜂鸣器演奏乐曲
步进电机以及无源蜂鸣器这些都需要脉冲信号才能够驱动,这里将用GPIO的PWM接口驱动无源蜂鸣器弹奏乐曲,本文基于树莓派Mode B+,其他版本树莓派实现时需参照相关资料进行修改! 1 预备知识 1.1 ...
- Linux主机上使用交叉编译移植u-boot到树莓派
0环境 Linux主机OS:Ubuntu14.04 64位,运行在wmware workstation 10虚拟机 树莓派版本:raspberry pi 2 B型. 树莓派OS: Debian Jes ...
- 树莓派 基于Web的温度计
前言:家里的树莓派吃灰很久,于是拿出来做个室内温度展示也不错. 板子是model b型. 使用Python开发,web框架是flask,温度传感器是ds18b20 1 硬件连接 ds18b20的vcc ...
- Raspberry Pi(树莓派)上安装Raspbian(无路由器,无显示器)
一. 准备工作 1. 树莓派主板 型号:树莓派3 B型 处理器:四核64位ARM Cortex-A53 CPU 内核架构:ARMv8 2. 一张大于8G的TF卡(本人用的是32G的,也作为PiLFS用 ...
- 树莓派3B的食用方法-1(装系统 网线ssh连接)
首先要有一个树莓派3B , 在某宝买就行, 这东西基本上找到假货都难,另外国产和英国也没什么差别,差不多哪个便宜买哪个就行. 不要买店家的套餐,一个是配的东西有些不需要,有的质量也不好. 提示:除了G ...
- 在树莓派Raspbian下安装支持Hard Float的.NET环境
[题外话] 最近入了个树莓派玩,系统装的官方推荐的Hard Float的Raspbian,由于衍生自Debian,所以Mono什么的非常好装.但是官方源中的Mono在Hard Float的Raspbi ...
- raspberrypi(树莓派)上安装mono和jexus,运行asp.net程序
参考网址: http://www.linuxdot.net/ http://www.cnblogs.com/mayswind/p/3279380.html http://www.raspberrypi ...
随机推荐
- cron(CronTrigger)表达式用法
CronTrigger CronTriggers往往比SimpleTrigger更有用,如果您需要基于日历的概念,而非SimpleTrigger完全指定的时间间隔,复发的发射工作的时间表.CronTr ...
- 51nod1102(数塔)
题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1002 题意:中文题诶- 思路:简单dp 从底层往上递推,每个 ...
- JSP网页处理过程
以下步骤表明了Web服务器是如何使用JSP来创建网页的: 就像其他普通的网页一样,您的浏览器发送一个HTTP请求给服务器. Web服务器识别出这是一个对JSP网页的请求,并且将该请求传递给JSP引擎 ...
- Python 学习笔记(6)--常用模块(2)
一.下载安装 下载安装有两种方式: yum\pip\apt-get 或者源码 下载源码 解压源码 进入目录 编译源码 python setup.py build 安装源码 python setup.p ...
- C 标准库系列之locale.h
locale.h 区域设置相关,主要针对时间日期.货币格式.字符控制.数字格式等以满足某区域的设置需要. locale设置类别主要包括以下几个宏定义的类别: LC_ALL:设置所有的类别: LC_CO ...
- [Java] CPU 100% 原因查找解决
CPU 100%肯定是出现死锁,这个时候观察内存还是够用的,但是CPU一直100%,以下几步解决: 1. 找到进程消耗cpu最大的 $top top - :: up days, :, user, lo ...
- Unity中无GC Alloc的CalculateFrustumPlanes
如果你需要在逻辑层做一些预先的剔除操作,可能需要从MainCamera构建视锥体,然后进行简易相交测试,这时候在unity里面用到的函数接口是CalculateFrustumPlanes: names ...
- CharacterEncodingFilter-Spring字符编码过滤器
通过源码可以看到在web.xml配置CharacterEncodingFilter 时,可以配置两个参数:encoding和forceEncoding : encoding:编码格式: forceEn ...
- Anaular指令详解
目录:directive() restrict replace template templateUrl scope transclude ng-transclude co ...
- iOS Swift 3 open
参考资料:http://stackoverflow.com/questions/38947101/what-is-the-open-keyword-in-swift