A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service
A good long time did not come to Baidu space, recently idle to Nothing, just make up for the vacancy before!
I've been dealing with Ubuntu for a long time and I've had a lot of problems, and I've documented some of the problems and solutions I've found, and I think it might help people who have the same situation as me.
Recently installed good Ubuntu10.04 Lucid Beta1, encountered a more annoying problem, is the network often dropped the problem. Online with good, and suddenly will not open the Web page, and then another will be good, let people very uncomfortable. I searched the internet, found the reason, the following is the cause of network drop and solution:
Many of the PPP options are default, where the number of lcp-echo-failure is set to 4, and Lcp-echo-interval is set to 30 seconds. That is, if within 120 seconds, the ADSL server does not give back the echo-reply signal, Ubuntu will think that the network has gone wrong, will disconnect the network, make people very uncomfortable. The crux found, the problem will be solved, open the configuration file/etc/ppp/options, set the number of lcp-echo-failure to a larger number on the line, I will change this value to 30, the Internet is more smooth after.
Again, how to configure the ADSL under Ubuntu, I think the simplest way is to use the command, configuration once and then no longer tube, after the boot will automatically start. The commands that are used are:
Then step by step according to the above instructions to configure, enter your account number and password, hit a few times enter the OK.
Check the configuration file for PPPoE (/etc/ppp/options) and find so two articles:
The following is the program code:
So guess is not 30 seconds to receive ADSL receipts even if the error, retry 4 times Ubuntu off the net?
So the use of the net before the 2-minute time to search, sure enough. Foreign Devil network Environment is good, 4 is enough, the celestial is still in the initial stage of capitalism, 4 not enough ...
Workaround: Change 4 to......
Ubuntu ADSL frequent disconnection problem solved
Ubuntu dials ADSL with pppoeconf. But very strange, this time is always disconnected, about 2.5 minutes, if the ping will be re-dial, but so Firefox also need to stop the escape and then re-refresh, depressed ...
OKsudo gedit/etc/ppp/peers/dsl-providerAdjust the inside
set the echo interval larger; more failures; MTU 1000 or smaller; some say Holdoff 0 .The argument.
Found an article that said a way to modify the options file
set the Lcp-echo-interval to a larger number
The following is the reference content:
However, the default setting has a very obvious flaw, the number of lcp-echo-failure is set to 4, and Lcp-echo-interval is set to 30 seconds. In other words, if the ADSL server does not give back the echo-reply signal within 120 seconds, Ubuntu will think the network is out of the question and immediately interrupt the re-connection. This problem is also very well solved,sudo gedit/etc/ppp/optionsWilllcp-echo-failureThe number of times is set to a larger value, such as +, so it is more suitable for the status of ADSL in China, will never break the network.
In Ubuntu is very convenient to configure ADSL, sudo pppoeconf all the way to set it down. Then use the Pon dsl-provider command to start dialing, use manual poff to disconnect the dial-up connection, and we can use the Plog command to view the connection log information.
But recently encountered a particularly strange problem, each time last period, generally 4-5 minutes, and sometimes 2-3 minutes, the network is broken, using the Pon dsl-provider command re-connected, and can connect, but after a few minutes and broken. Use Plog to view the following information:
June 08:16:28 ubuntu-kde-pc pppd: No response to 4 echo-requests
June 08:16:28 ubuntu-kde-pc pppd: Serial link appears to be disconnected.
June 08:16:28 ubuntu-kde-pc pppd: Connect time 4.5 minutes.
June 08:16:28 ubuntu-kde-pc pppd: Sent 5160 bytes, received 6576 bytes.
June 08:16:34 ubuntu-kde-pc pppd: Connection terminated.
June 08:16:34 ubuntu-kde-pc pppd: Modem hangup
At first I thought it was the network instability, but switch to Windows under what the problem is not, make me so depressed. Confidence in Linux has been lowered. Later on the internet to find a bit of information, and finally found the reason.
Many of the PPP options are default, where the number of lcp-echo-failure is set to 4, and Lcp-echo-interval is set to 30 seconds. That is, if within 120 seconds, the ADSL server does not give back the echo-reply signal, Ubuntu will think that the network has gone wrong, will disconnect the network, make people very uncomfortable. The crux found, the problem will be solved, open the configuration file/etc/ppp/options, set the number of lcp-echo-failure to a larger number on the line, I will change this value to 15, the Internet is more smooth after.
How PPPoE solves the Ubuntu Internet
Fsgz posted: 2008-8-07 12:30 Source: Vision Unlimited Blog
It is common to use routers to connect to the Internet, but ADSL (also known as ' DSL ') modems are often used to connect to the Internet via PPPoE.
Of course, you need to request an Internet connection from your Internet service provider (ISP), and you can connect and use the Internet after you apply. Then the "DSL" beacon on your ADSL modem shows that the line you are connecting to the Internet is in sync.
You need an ISP to give you a username and password to use your DSL account, and a suitable network cable to connect the Ethernet card to the PPPoE modem.
Configure PPPoE under the command line
We use terminals to configure modems. Open the terminal via the Apps > Accessories > Terminal on the menu.
You need to install the PPPoE package to use the following commands. This package is installed by default, but it may be lost when the configuration is changed. If the following command cannot be performed, you will need to install this package (refer to the section on PPPoE package installation).
In the terminal, enter:
A text menu-based program will guide you through the following steps:
Verify that the Ethernet card is detected.
Enter your user name (provided by your ISP).
Enter your password (provided by your ISP).
If you have configured a PPPoE connection, you will be notified that the connection will be modified.
Pop up an option: You are asked if you need ' noauth ' and ' defaultroute ' options and remove ' Nodetach ', select ' Yes ' here.
Use Peer DNS-select "Yes".
Limited MSS Problem-select "Yes".
When you are asked if you want to connect automatically when you need to enter the system, you can choose "Yes".
Finally, you will be asked if you want to establish a connection right away.
When you have completed these steps, you should have established a connection and been able to use it.
Manually control the connection
To start the ADSL connection when needed, you can enter it in the terminal:
To disconnect the ADSL connection, you can enter it in the terminal:
If you find that the connection is working properly, try to manually adjust the configuration of your previous ADSL connection (refer to the previous section). To view the log, you can enter it in the terminal:
Installation of the PPPoE package
Check that the PPPoE package is installed and can be entered in the terminal:
If the package is already installed, you should see these two lines in the output information:
Status:install OK installed
If the package is not installed, insert your Ubuntu CD and enter it in the terminal:
sudo apt-get install pppoeconf
If you're not prompted to find the package, you'll have to add the Ubuntu CD to the list of software sources. To join your disc, make sure you have inserted the disc into the CD drive and entered it in the terminal:
sudo apt-cdrom add
If all of the above actions fail, you can
Download the pppoeconf package. Of course, if you have an Internet connection that you can use and then transfer it to your computer via a CDR or USB drive. Double-click the package in gnome to install it.
Considerations for Startup
If you find that you need to manually run pppoeconf to establish a connection every time you start the system, you can do this:
Refer here to edit/etc/network/inte***ces this file so that the ' PPPoE maintained ' line before ' Auto Dsl-provider ':
Iface eth0 inet Manual
Pre-up/sbin/ifconfig eth0 Up # line maintained by pppoeconf
Iface Dsl-provider inet PPP
or fail, edit/etc/rc.local This file and add the following before the last line ("Exit 0"):
Ifconfig eth0 up
If you find a problem with the connection, you can find useful information in the system log. You can access the system log in the terminal or image interface.
Using the graphical interface of the log viewer, you can: System > System Management > System log. You will find that the system information is stored in the/var/log/messages directory.
Using Terminal, enter:
Ubuntu frequent off-line turn
Start building with 50+ products and up to 12 months usage for Elastic Compute Service