CentOS-6.3(Linux) 命令行 DSL 拨号

这篇教程介绍了如何在CentOS 6.3系统中通过命令行进行ADSL拨号,包括安装PPPOE软件、配置连接账号和密码的详细步骤,适合需要在Linux环境下拨号上网的用户。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


$ sudo yum install rp-pppoe

$ sudo pppoe-setup
[sudo] password for root: 

Welcome to the PPPoE client setup.  First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
LOGIN NAME
Enter your Login Name (default root): 11111111	//ISP给的宽带账号

INTERFACE
Enter the Ethernet interface connected to the PPPoE modem

For Solaris, this is likely to be something like /dev/hme0.

For Linux, it will be ethX, where 'X' is a number.

(default eth0): 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
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic 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		//PPPOE拨号的输入server即可,即动态获得DNS

PASSWORD                                              
Please enter your Password:		//此处输入宽带账号的密码
Please re-enter your Password:		//再次确认宽带账号的密码

USERCTRL
Please enter 'yes' (three letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): yes		//输入默认的yes

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		//没有防火墙限制

Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no):no

** Summary of what you entered **

Ethernet Interface: eth0
User name:          11111111
Activate-on-demand: No
DNS addresses:      Supplied by ISP's server
Firewalling:        NONE
User Control:       yes
Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/ppp/chap-secrets and /etc/ppp/pap-secrets
  (But first backing it up to /etc/ppp/chap-secrets.bak)
  (But first backing it up to /etc/ppp/pap-secrets.bak)



Congratulations, it should be all set up!

// 建立连接和断开连接
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
// 查看连接状态
Type '/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.

$ pppoe-s
pppoe-server  pppoe-sniff   pppoe-status  
pppoe-setup   pppoe-start   pppoe-stop    

$ sudo pppoe-status
[sudo] password for root: 
pppoe-status: Link is down (can't read pppoe PID file /var/run/pppoe-adsl.pid.pppoe)

$ sudo ifup ppp0
$ sudo pppoe-status
pppoe-status: Link is up and running on interface ppp0
7: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
    inet 110.114.99.117 peer 110.114.96.1/32 scope global ppp0
$ ping www.baidu.com
PING www.a.shifen.com (119.75.218.70) 56(84) bytes of data.
64 bytes from 119.75.218.70: icmp_seq=1 ttl=55 time=27.7 ms
64 bytes from 119.75.218.70: icmp_seq=2 ttl=55 time=27.8 ms
64 bytes from 119.75.218.70: icmp_seq=3 ttl=55 time=28.9 ms
64 bytes from 119.75.218.70: icmp_seq=4 ttl=55 time=26.9 ms
64 bytes from 119.75.218.70: icmp_seq=6 ttl=55 time=29.1 ms
^C
--- www.a.shifen.com ping statistics ---
6 packets transmitted, 5 received, 16% packet loss, time 5426ms
rtt min/avg/max/mdev = 26.907/28.129/29.190/0.852 ms


linux下命令行安装ADSL拨号软件PPPOE及设置连接使用教程, http://www.lvtao.net/html/2183.html

centos6.2 修改 pppoe 拨号上网的账号和密码, http://www.lvtao.net/html/2184.html


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值