centos6.5 之电信宽带上网(拨号连接)

阅读: 评论:0

centos6.5 之电信宽带上网(拨号连接)

centos6.5 之电信宽带上网(拨号连接)

一直以来用的联通的拨号连接,联通/网通的宽带拨号直接使用系统自带的拨号功能即可拨号上网,但是电信的不可以,

电信宽带在linux下需要借助re-pppoe设置首选+备选DNS地址(所在地电信DNS地址必须),通过宽带账户密码进行登录链接

以下是根据官方网站的介绍,设置的 上海 电信上网连接信息(上海DNS首选地址:202.96.209.133备选地址:116.228.111.118 其他城市的DNS地址请参阅下方或者百度一下)

以下是各地电信DNS地址:

依次是 【名称】    【首选】           【备选】
安徽电信 DNS 61.132.163.68     202.102.213.68
北京电信 DNS 219.141.136.10   219.141.140.10
重庆电信 DNS 61.128.192.68     61.128.128.68
福建电信 DNS 218.85.152.99     218.85.157.99
甘肃电信 DNS 202.100.64.68     61.178.0.93
广东电信 DNS 202.96.128.86     202.96.128.166
                       202.96.134.33     202.96.128.68
广西电信 DNS 202.103.225.68   202.103.224.68
贵州电信 DNS 202.98.192.67     202.98.198.167
河南电信 DNS 222.88.88.88       222.85.85.85
黑龙江电信 219.147.198.230      219.147.198.242
湖北电信 DNS 202.103.24.68     202.103.0.68
湖南电信 DNS 222.246.129.80   59.51.78.211
江苏电信 DNS 218.2.2.2             218.4.4.4
                       61.147.37.1         218.2.135.1
江西电信 DNS 202.101.224.69   202.101.226.68
内蒙古电信 219.148.162.31        222.74.39.50
山东电信 DNS 219.146.0.130     219.150.32.132
陕西电信 DNS 218.30.19.40       61.134.1.4
上海电信 DNS 202.96.209.133   116.228.111.118
                       202.96.209.5       108.168.255.118
四川电信 DNS 61.139.2.69         218.6.200.139
天津电信 DNS 219.150.32.132   219.146.0.132
云南电信 DNS 222.172.200.68   61.166.150.123
浙江电信 DNS 202.101.172.35   61.153.177.196
                       61.153.81.75       60.191.244.5

流程如下:

1.下载 rp-pppoe-3.  (下载拨号工具)

.

2.安装 rp-pppoe

解压 rp-pppoe-3. :
#tar -zxf rp-pppoe-3.
进入目录:
#cd rp-pppoe-3.8
在所在目录内运行脚本 go:
#./go
将自动进行编译和安装

3、网络配置 (红色为输入,蓝色为注释)

 

[root@zhaiqutianshangxing]# pppoe-setup             (终端root用户输入 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 

Looks good! 

Now, please enter some information:

USER NAME
>>> Enter your PPPoE user name (default cz743720): zhaiqutianshangxing              (输入电信账号)

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): eth0                 (选择你的网卡,不知道的在终端ifconfig看一下就清楚默认为 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):  no                   (这里填 no 或 直接回车)

下面灰色部分为DNS地址,必须手动设置为本地DNS地址,server为自动获取DNS,但连接宽带时始终没有成功只好又手动输入了上海本地的电信DNS地址才登录成功。
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: 202.96.209.133    (首选DNS地址,此处为上海电信DNS地址,具体请填写你所在地的DNS地址)
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
>>> Enter the secondary DNS server address here: 116.228.111.118  (备选DNS地址,此处为上海备选DNS地址,具体请百度查询你所在地的DNS)



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):  0                      (0表示不开启防火墙)


** Summary of what you entered **
Ethernet 
Interface: eth0
User name: zhaiqutianshangxing
Activate-on-demand: No
Primary DNS:202.96.209.133
Secondary DNS:116.228.111.118
Firewalling:NONE

>>> Accept these settings and adjust configuration files (y/n)?  y               (输入y 确认配置信息)
( 摘取天上星 )
Adjusting /etc/f
Adjusting /f  (But first backing it up to /f-bak)
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.


[root@zhaiqutianshangxing]#  pppoe-start               ( pppoe-start 开启网络链接,默认配置好参数后会自动登录网络)

. Connected!                     (连接成功,你可以 ping www.baidu 测试一下)

 

4、上网命令(用 root 权限)

拨号上网     pppoe-start
断开上网     pppoe-stop
查看状态     pppoe-status

本文发布于:2024-02-01 11:44:07,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170675905336360.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23