Six steps for setting PPPoE in Linux

Source: Internet
Author: User

I have learned a lot about PPPoE, and I should have some knowledge about its basics. We have also introduced a lot of configuration content. Now let's summarize the steps for setting PPPoE in Linux. Let's take a look at the specific content.

Linux PPPoE settings 1. Ensure that the NIC is installed and works properly
Use commands
# Ifconfig eth0
View Nic status
2. Do not set the default route (GATEWAY) in the system so that it is automatically obtained after the ADSL dial-up.
If you have already set a default route, use the following method to delete it:
Delete GATEWAY = in the/etc/sysconfig/network file and run the following command as root:
#/Etc/rc. d/init. d/network restart
3. You have installed the pppd package.
If the file/usr/sbin/pppd exists, pppd is installed;
If not, install the ppp-2.3.11-4.i386.rpm package from the RedHatLinux 6.2 installation CD

Linux PPPoE Settings 2. 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.
This package. You can download from http://www.roaringpenguin.com/pppoe/
The rp-pppoe Binary Package on the RedHat 62 platform, and you can download the source code package.
Note: RedHat Linux 7.1 has integrated the rp-pppoe package, but the version is a little low.
This level can be directly followed by three steps.
1. Install the Binary Package:
A. Download the Binary Package
Http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2-1.i386.rpm
B. Install
Run as root:
# Rpm-Uvh rp-pppoe-3.2-1.i386.rpm
2. Install from source code:
Installing from source code is also applicable to Linux on other platforms, but the gcc compiler must be installed on Linux systems.
A. Download the source code package
Http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2.tar.gz
B. Extract
# Tar xvfz rp-pppoe-3.2.tar.gz
# Cd rp-pppoe-3.2
C. Compile and install
Run scripts
#./Go
Compile and install the SDK automatically. Finally, call/usr/sbin/adsl-setup for configuration. For details, see section 3.

Linux PPPoE configuration 3. configuring PPPOE client software
After installing the software package, you must configure the pppoe configuration file/etc/ppp/pppoe. conf to enable
Use the username, password, and other parameters in the configuration file. You do not have to manually modify this file.
Configure the adsl-setup tool:
#/Usr/sbin/adsl-setup
When
>>> Enter your PPPoE user name:
Enter the username of the ADSL account
When
>>> 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 ethn, where 'n' is a number.
(Default eth0 ):
Enter eth0, which is the name of the network card connected to ADSL
When
>>> Enter the demand value (default no ):
Enter no
When
>>> Enter the DNS information here:
Enter the server, which indicates the IP address of the DNS server automatically obtained through ADSL dialing.
When
>>> Please enter your PPPoE password:
Enter the password of the ADSL account
When
>>> Choose a type of firewall (0-2 ):
Enter 0, no firewall
When
>>> Accept these settings and adjust configuration files (y/n )?
If the entered information is correct, enter y to complete the configuration. Otherwise, enter n to enter again.

Linux PPPoE settings 4. Start the PPPOE client software
Use commands
/Usr/sbin/adsl-start PPPOE client software to connect. If yes
Connected;
If it fails, check the network cable, adsl modem, and other physical devices and view the information in/var/log/messages.
/Usr/sbin/adsl-stop disconnect from ISP
/Usr/sbin/adsl-status to view the current connection status
If you want to automatically start the ADSL connection when Linux is started, enter the following command:
# Chkconfig -- add adsl
The self-starting script of ADSL will be added to the current running level

Linux PPPoE settings v. Test
After the connection is successful, run the following command:
# Ifconfig-
The output should contain a bunch of information about ppp0, and an IP address is bound to it, indicating that the IP address has been obtained from dialing.
Use commands
# Netstat-nr
View the route table information. The default route is the IP address obtained above.
If there is no default route, we can manually add:
# Route add default gw the IP address obtained above
Use commands
# Nslookup www.baidu.com
If the IP address of Sina is resolved, it indicates that the DNS server has been correctly obtained from the dial-up.
Finally, run the command to ping a domain name or IP address. If a response is returned, it means you have done it.

Linux PPPoE settings 6. Other Instructions
The downloaded content is in the windows partition. You can use the mount command to mount the partition to the directory after entering linux.
For detailed usage, refer to the man command
Example: mount-t vfat-o iocharset = gb2312/dev/hdb6/root/d

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.