Set automatic dial-up for ADSL in centos

Source: Internet
Author: User

Set automatic dial-up for ADSL in centos

Functions: Automatic dial-up upon startup, automatic reconnection upon disconnection
I. Prerequisites for Installation
1. Ensure that the NIC is installed and working properly
Use commands
# Ifconfig eth0
View Nic status
2. Do not set the default route (GATEWAY) in the system.
Automatically obtained
If you have already set a default route, use the following method to delete it:
Comment out the/etc/sysconfig/Network/ifconfig-eth0 file or/etc/sysconfig/Network
Gateway = this line, and then run the following command as root:
# Service network restart
3. You have installed the pppd package.
If the file/usr/sbin/pppd exists, pppd is installed. If not, download and install the package.
Ii. Install pppoe client software
There are many pppoe clients in Linux, and most of them use GNU license. We recommend that you use RP-pppoe
Software packages. Not only can download
The RP-pppoe Binary Package under each release package, and you can download the source code package.
We use the yum installation method under centos to install the RP-pppoe package.
# Yum install RP-pppoe
3. Configure pppoe client software
1. manually set the configuration file
After installing the software package, you must configure the pppoe configuration file/etc/PPP/pppoe. conf to enable ADSL dialing.
Use the username, password, and other parameters in the configuration file.
2. the command line automatically generates the configuration file
[Root @ cap187 ~] # ADSL-Setup
Welcome to the ADSL 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): 300000490382
Interface
Enter the Ethernet interface connected to the ADSL 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): eth1
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 shoshould be dropped. If you want the link
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
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic dns address ',
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: 8.8.8.8
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:
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
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): Yes
** Summary of what you entered **
Ethernet interface: eth1
User name: 300000490382
Activate-on-demand: No
Primary DNS: 8.8.8.8
Firewalling: None
User Control: Yes
Accept these settings and adjust configuration files (y/n )? Y
Adjusting/etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting/etc/resolv. conf
(But first backing it up to/etc/resolv. conf. Bak)
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 shocould be all set up!
Type '/sbin/IFUP ppp0' to bring up your XDSL link and '/sbin/ifdown ppp0'
To bring it down.
Type '/sbin/ADSL-status/etc/sysconfig/network-scripts/TS'
To see the link status.
4. Start the pppoe client software
# ADSL-start
View the status of the current connection
/Usr/sbin/ADSL-status

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.