Linux system PPPoE broadband connection setting method

  

First, the preconditions for installation

1. Make sure that the network card is installed and working properly

Using the command

#ifconfig eth0< Br>

View NIC status

2. Do not set the default route (gateway) in the system to get ADSL automatically after dialing

If the default route has been set, use the following method to delete : Delete the GATEWAY= line in the file /etc/sysconfig/network and execute it as root:

#/etc/rc.d/init.d/network restart

3. Installed pppd package

If the file /usr/sbin/pppd exists, pppd is already installed; if it is not installed, install ppp-2.3.11-4.i386.rpm from the RedHatLinux 6.2 installation CD. This package

Second, install PPPOE client software

There are many PPPOE client software under Linux, and most of them use GNU License, we recommend using rp-pppoe package. From this website, you can not only download the rp-pppoe binary package under the RedHat 62 platform, but also download the source code package.

1. Installation of binary packages: A. Download binary packages

B. Install

Execute 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 the Linux system.

A. Download the source code package

B. Unzip

#tar xvfz rp-pppoe-3.2.tar.gz #cd rp-pppoe-3.2 C. Compile and install

Run the script #./go will automatically compile and install, and finally, call /usr/sbin/adsl-setup to configure it. See III for details.

Third, configure the PPPOE client software

After installing the software package, you must configure the pppoe configuration file /etc/ppp/pppoe.conf, so that ADSL dial-up uses the configuration file. User name, password and other parameters. We don't have to manually change this file, we can use the adsl-setup tool to configure it:

#/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 NIC connected to the ADSL

When >>> Enter the demand value (default no) : Enter no

When >>> Enter the DNS information here: Enter server, which means the DNS server IP address obtained automatically using ADSL dialing

when >> > Please enter your PPPoE password: Enter the password for 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 information entered is correct, enter y and finish Into configuration, otherwise, enter n to re-enter.

4. Start the PPPOE client software

Use the command

/usr/sbin/adsl-start to start the PPPOE client software and connect. If successful, Connected will appear. If unsuccessful, check the network cable, ADSL MODEM and other physical devices, and view the information in /var/log/messages /usr/sbin/adsl-stop Close the connection with the ISP /usr/sbin/adsl-status View the current connection Status

If you want to automatically start ADSL connection when Linux system starts, enter the following command #chkconfig --add adsl will add ADSL self-starting script under the current running level

Test

When the connection is successful, use the command #ifconfig -a

. The output should contain a bunch of information about ppp0, which is also bound to the IP address, indicating that it has been obtained from dialing. The IP address.

Using the command

#netstat -nr

To view the routing table information, the default route should be the IP address obtained above. If there is no default route, we can increase it manually:

#route add default gw The IP address obtained above

Using the command

#nslookup

If parsing The IP of Sina indicates that the DNS server has been correctly obtained from the dial-up.

Finally, use the command to ping a domain name or IP. If there is a response, you are done.

Sixth, other instructions

RedHat Linux 7.1 has integrated the rp-pppoe package, but the version is somewhat low. If you don't care about the version, you can directly follow the three steps.

Copyright © Windows knowledge All Rights Reserved