Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1782664
  • 博文数量: 413
  • 博客积分: 8399
  • 博客等级: 中将
  • 技术积分: 4325
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-09 10:44
文章分类

全部博文(413)

文章存档

2015年(1)

2014年(18)

2013年(39)

2012年(163)

2011年(192)

分类: LINUX

2011-06-09 14:13:52

PPPoE即:Point to Point Protocol over Ethnet
首先在终端中输入:sudo pppoeconf
检测以太网卡,如果检测到则会看到一下内容:
          ┌─────────┤ ALL DEVICES FOUND? ├────────┐
          │                                                          │
          │ I found 1 ethernet device:                               │
          │ eth1                                                     │
          │                                                          │
          │ Are all your ethernet interfaces listed above?           │
          │ (If No, modconf will be started so you can load the card │
          │ drivers manually).                                       │
          │                                                          │
          │ Or press ESC to abort here.                              │
          │                                                          │
          │                                                          │
          │                                                 │
          │                                                          │
          └─────────────────────────────┘
Yes回车
     ┌───────────┤ OKAY TO MODIFY ├─────────────┐
     │                                                                    │
     │ If you continue with this program, the configuration file          │
     │ /etc/ppp/peers/dsl-provider will be modified. Please make sure     │
     │ that you have a backup copy before saying Yes.                     │
     │                                                                    │
     │ Continue with configuration?                                       │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                           │
     │                                                                    │
     └──────────────────────────────────┘
Yes 回车:
     ┌─────────────┤ POPULAR OPTIONS ├─────-─────┐
     │                                                                    │
     │ Most people using popular dialup providers prefer the options      │
     │ 'noauth' and 'defaultroute' in their configuration and remove the  │
     │ 'nodetach' option. Should I check your configuration file and      │
     │ change these settings where neccessary?                            │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                                    │
     │                                                           │
     │                                                                    │
     └──────────────────────────────────┘
Yes回车:
          ┌─────────┤ ENTER USERNAME ├──────────┐
          │ Please enter the username which you usually need for the │
          │ PPP login to your provider in the input box below. If    │
          │ you wish to see the help screen, delete the username and │
          │ press OK.                                                │
          │                                                          │
          │ username________________________________________________ │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                      │
          │                                                          │
          └─────────────────────────────┘
删除username,然后输入服务提供商(电信或者其它)给你的用户名,回车:
          ┌──────────┤ ENTER PASSWORD ├─────────┐
          │ Please enter the password which you usually need for the │
          │ PPP login to your provider in the input box below.       │
          │                                                          │
          │ NOTE: you can see the password in plain text while       │
          │ typing.                                                  │
          │                                                          │
          │ ________________________________________________________ │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                      │
          │                                                          │
          └────────────────────--────────┘
然后输入服务提供商(电信或者其它)给你的密码,回车:
          ┌─────────┤ USE PEER DNS ├───────────┐
          │                                                          │
          │ You need at least one DNS IP address to resolve the      │
          │ normal host names. Normally your provider sends you      │
          │ addresses of useable servers when the connection is      │
          │ established. Would you like to add these addresses       │
          │ automatically to the list of nameservers in your local   │
          │ /etc/resolv.conf file? (recommended)                     │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                 │
          │                                                          │
          └─────────────────────────────┘
服务提供商将DNS ip 地址发送给我们,写入/etc/resolv.conf文件
Yes 回车:
     ┌────────────┤ LIMITED MSS PROBLEM ├──-───────┐
     │                                                                    │
     │ Many providers have routers that do not support TCP packets with a │
     │ MSS higher than 1460. Usually, outgoing packets have this MSS when │
     │ they go through one real Ethernet link with the default MTU size   │
     │ (1500). Unfortunately, if you are forwarding packets from other    │
     │ hosts (i.e. doing masquerading) the MSS may be increased depending │
     │ on the packet size and the route to the client hosts, so your      │
     │ client machines won't be able to connect to some sites. There is a │
     │ solution: the maximum MSS can be limited by pppoe. You can find    │
     │ more details about this issue in the pppoe documentation.          │
     │                                                                    │
     │ Should pppoe clamp MSS at 1452 bytes?                              │
     │                                                                    │
     │ If unsure, say yes.                                                │
     │                                                                    │
     │ (If you still get problems described above, try psetting to 1412 in│
     │ the dsl-provider file.)                                            │
     │                                                                    │
     │                                                           │
     │                                                                    │
     └──────────────────────────────────┘
Yes 回车:

          ┌───────────────┤ DONE ├─────────┐
          │                                                          │
          │ Your PPPD is configured now. Would you like to start the │
          │ connection at boot time?                                 │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                 │
          │                                                          │
          └─────────────────────────────┘
配置成功,询问是否启动时自动连接网络,Yes回车:
          ┌─────────┤ ESTABLISH A CONNECTION ├──────┐
          │                                                          │
          │ Now, you can make a DSL connection with "pon             │
          │ dsl-provider" and terminate it with "poff". Would you    │
          │ like to start the connection now?                        │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                 │
          │                                                          │
          └─────────────────────────────┘

开始连接Yes回车:
          ┌──────────┤ CONNECTION INITIATED ├──────┐
          │                                                          │
          │ The DSL connection has been triggered. You can use the   │
          │ "plog" command to see the status or "ifconfig ppp0" for  │
          │ general interface info.                                  │
          │                                                          │
          │                                                          │
          │                                                      │
          │                                                          │
          └─────────────────────────────┘
连接成功,我们可以利用plog或ifconfig ppp0命令查看网络状态。

总结:
配置PPPoE命令:sudo pppoeconf 一般在第一次或者修改了用户名密码时使用
启动PPPoE的命令: pon dsl-provider
关闭网络的命令:poff
查看网络状态的命令:plog或ifconfig ppp0





阅读(2884) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~