NOTE: This is physical access tutorial, not a virtual machine, the virtual machine is not too much trouble -
This article is a mixture of tucao and tutorials, so you Tell me the patience to see ~
CentOS Internet is really a troublesome thing, it is not the same as when you install Ubuntu you can configure your network, it will be a variety of problems.
First, my computer after direct plug the network cable, ifconfig displays not found eth0. Later, a closer look at network line interface does not light up! Later, looking for a long finally found a driver, Bahrain rear drive inserted into the kernel module, cable interface bright, ifconfig eth0 can be displayed, and the hardware is done.
Here is the key, I still do not increase net Shetenglebantian later found some tutorials that installing a called rp-pppoe dial-up software, so I installed the results or not, NetworkManager and network service restarted numerous times or not, setup inside changed and changed or not, I thought to use DHCP services, specially installed DHCP, the results can not be configured, more complicated, after all, my course is not to the network - so in principle dialing fails, DHCP configuration without me collapsed, abandoned for some time. Which said rp-pppoe NetworkManager does not need to, you can uninstall NetworkManager, I thought to myself, I read less Do not you lie to me, even after NetworkManager uninstall a network icon is gone, but also even a hairy net.
Start the ultimate test. I specially prepared four DNS address, I am determined to do DHCP, because the point of view from Baidu Encyclopedia DHCP is used to configure LAN router I do anyway.
DNS are four:
Baidu public DNS: 188.8.131.52
Ali cloud public DNS: 184.108.40.206,220.127.116.11
Chengdu, Sichuan Province Education Network DNS (bloggers school in Chengdu): 18.104.22.168
Then open the terminal configuration rp-pppoe, run the command
Following is a specific process (# back I wrote notes in Chinese):
[Root @ KD src] # pppoe-setup
Welcome to the Roaring Penguin PPPoE client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
! Looks good Now, please enter some information:
>>> Enter your PPPoE user name (default bp20122999 @ cer): # account fill in your account (education network, China Netcom, China Telecom may be)
>>> Enter the Ethernet interface connected to the DSL 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): # default is eth0, you can directly enter the default, or superfluous handwriting eth0
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 should be dropped. If you want the link to
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): # Whether or not this step, just press Enter
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
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: 22.214.171.124 # primary DNS (DNS above four choose one, the other will do their practice)
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: 126.96.36.199 # Alternate DNS
>>> Please enter your PPPoE password: # password you drop
>>> Please re-enter your PPPoE password: # lose again
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 # 0 input, do not open the firewall
** Summary of what you entered **
Ethernet Interface: eth0
User name: bp20122999 @ cer
Primary DNS: 188.8.131.52
Secondary DNS: 184.108.40.206
>>> Accept these settings and adjust configuration files (y / n)? Y # Enter y Confirm
(But first backing it up to /etc/resolv.conf-bak)
Adjusting / etc / ppp / pap-secrets and / etc / ppp / chap-secrets
(But first backing it up to / etc / ppp / pap-secrets-bak)
(But first backing it up to / etc / ppp / chap-secrets-bak)
Congratulations, it should be all set up!
Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring
it down. Type 'pppoe-status' to see the link status.
Do not worry, I will spit grievances write tutorials, then I take a detour, I dial-up, or not, the strange thing is you can ping the DNS server, but not ping Baidu and so on.
Then I remembered that piece Traditional text tutorials, then, so
NetworkManager waste first to say,
[Root @ KD src] # service NetworkManager stop
Stopping NetworkManager daemon: [OK]
Then pppoe-start dialing! display
[Root @ KD src] # pppoe-start
And then still can not ping through Baidu, it does not matter, we restart the network service, before the first break of the dial
[Root @ KD src] # pppoe-stop
Killing pppd (3449)
Killing pppoe-connect (3433)
Now the next restart network services
[Root @ KD src] # service network restart
Shutting down interface eth0: [OK]
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
Bringing up interface eth0: [OK]
Now, again dial! ! !
[Root @ KD src] # pppoe-start
Now ping Linux commune! ! !
[Root @ KD src] # ping www.linuxidc.com
PING www.linuxidc.com (220.127.116.11) 56 (84) bytes of data.
64 bytes from 18.104.22.168: icmp_seq = 1 ttl = 47 time = 58.7 ms
64 bytes from 22.214.171.124: icmp_seq = 2 ttl = 47 time = 58.2 ms
64 bytes from 126.96.36.199: icmp_seq = 3 ttl = 47 time = 58.9 ms
64 bytes from 188.8.131.52: icmp_seq = 4 ttl = 47 time = 58.9 ms
ping pass! Well, finally, when I saw the page began as a circle, and so suddenly appeared Baidu page I pppoe-start when it really special is thrilled.
pppoe-start: Dial-Up Networking
pppoe-stop: off network
pppoe-status: View the connection status
After re-starting the computer off again, please stop NetworkManager, or directly unloaded it, and then dial.
This is the ultimate tutorial, covering almost all the details, if it encounters an error can give me comment.