Linux System Management Practices (TEN): PPPoE Internet configuration __linux

Source: Internet
Author: User

When using a DSL connection, if you are using a DSL connection that has a fixed or static IP address, the configuration step is the same as described in the previous network configuration. You connect the Ethernet interface to the DSL modem and configure the IP address, subnet mask, broadcast address, and gateway information provided by the ISP. You should be connected to the Internet after you restart the network device. Remember, you may also need to configure the DNS server correctly. If you are using a DSL connection with a DHCP or dynamic IP address, the process is different. Your ISP will provide you with a user name and password for PPPoE (PPP authentication over Ethernet), which will allow your computer to transparently log on to the Internet each time it starts. Note that unless you specifically apply for a static IP address, ISPs typically provide you with a DHCP based connection. The IP address that DHCP assigns to your machine or Internet route may not change for many days, and you may be mistaken for static.
1, Redhat/fedora faction: need to install Rp-pppoe RPM software package to support this function, usually rp-pppoe-3.5-8.i386.rpm. After installing RPM, you need to go through several steps to complete the connection. The PPPoE configuration will create a virtual interface called PPP0, which will be connected through the physical network interface eth0. The basic process is as follows:
(1) After backing up the/etc/sysconfig/network-scripts/ifcfg-eth0 file, edit your Ifcfg-eth0 file, remove the IP information, and set activation at startup.

Device=eth0 Onboot=yes

Then use Ifdown eth0 to turn off the NIC device.
(2) Run Adsl-setup configuration script: It will prompt you to enter your ISP username, to use the network device (eth0) and whether you need to connect for a long time, if possible we all use the default settings. Then you will be prompted to enter your DNS server information, this step will edit your/etc/resolv.conf file. If you are running bind on the server in cached DNS mode, you do not need to enter direct return. If you want your ISP's DNS server to automatically provide an IP address, enter the word server. The script then prompts you to enter your ISP password, and then it asks if the regular user (not superuser root) is allowed to activate/Stop the new PPP0 device, which may be needed if you have a non-root member in your home that needs to access the Internet. Then you will be asked whether to activate the connection at startup, and most people will choose Yes. In the end, it tells you to use Ifup ppp0/ifdown ppp0 to activate/close this new ppp0 device and to use ADSL-STATUS/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-PPP0 to get the status of the device. After you have completed the Rp-pppoe configuration, you should be able to connect to the Internet via the DSL DHCP.
Adsl-setup created some important files: There are three Adsl-setup scripts created by the files you might be interested in. The first is the Ifcfg-pppo file, which contains the connection parameters for the device link layer. Two other files with the same content/etc/ppp/pap-secrets and/etc/ppp/chap-secrets, including the username and password of the ISP. In addition, the RP-PPPOE package has two sample IP table firewall scripts under the/ETC/PPP directory, the file name is Firewall-standalone and FIREWALL-MASQ. They are very basic and do not cover the rules of setting up your Linux machine as a Web server, DNS server, or mail server. A typical Linux network uses independent firewall software, such as Iptables, which is more functional.
Simple troubleshooting: Run the adsl-status command to check the status of the connection to see some basic faults.
2, Debian/ubuntu faction:Use the Pppoeconf tool to configure the PPPoE connection. Its function is similar to Adsl-setup, according to Step-by-step instructions to complete the configuration of PPPoE, note that if you do not automatically obtain DNS IP, you can edit the/etc/resolv.conf to add. You can then use the sudo pon dsl-provider to manually dial the Internet, using sudo poff dsl-provider to disconnect the ADSL connection, and use the Plog to view PPPoE logs. For dial-up ADSL and disconnect ADSL, you can create a shortcut in the Menu editor or panel to facilitate dialing. Right-click on the Panel, select Add to Panel-> custom Application Launcher-> Add, type "application in Terminal", name "ADSL dial", command "Pon Dsl-provider", annotated "ADSL dial". After the need to connect ADSL dial-up only need to click on the shortcut, click on the pop-up terminal window prompts the user to enter the password, after the completion of the network connection. A shortcut to disconnect a network is similar to this, simply change the pon to Poff.
Graphical interface configuration (Ubuntu 8.10): Enter the system-> preferences->network CONFIGURATION->DSL in the top menu, click Add on the right, pop-up the Edit DSL link window, and on the DSL tab, fill in the Username, password, service, in Point-to-Point Protocol (PPP), cancel "Use authentication" (important. It's not usually possible to connect if you don't cancel it, so you can surf the Internet.
Directly edit the configuration file for configuration: The pppoeconf configuration file is in the/ETC/PPP directory where the configuration information for the connection is stored in the file Peers/dsl-provider, and Peers/provider gives an example of a connection configuration that reads as follows:

# Example of a dial-up connection profile authenticated with PAP or CHAP # This is the default configuration used by Pon (1) and Poff (1), to understand all the options, refer to the manual page PPPD (8). # values that must be changed: Replace Myusername@realm # with the PPP login name (that is, username) provided by the ISP # there should be a password-matching entry user in/etc/ppp/pap-secrets or/etc/ppp/chap-secrets Myusername@realm "# Must change value: Replace ******** with ISP's phone number. /etc/chatscripts/pap chat script may # be modified to change modem initial string connect "/usr/sbin/chat-v-f/etc/chatscripts/pap-t ********" # Modem to connect Serial Device/dev/modem # serial line rate 115200 # using ISP dynamically assigned IP address Noipdefault # attempts to obtain the IP address of the DNS server from the ISP Usepeerdns # uses this connection as the default route defaultrout E # let PPPD dial again when the connection is lost persist # does not require remote authentication Noauth

You can directly edit the Dsl-provider file for PPPoE dial-up configuration, complete configuration options can refer to the manual page PPPD (8). Use a PON to dial after configuration is complete.

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.