NetworkManager shows I have connected but I can't!

Issues related to configuring your network
Post Reply
nottwy
Posts: 3
Joined: 2015/07/20 06:00:58

NetworkManager shows I have connected but I can't!

Post by nottwy » 2015/07/20 11:25:23

I use networkmanager to make my centos 6.5 connected to the internet.

It shows that it's successful but I can't open the website.

My laptop can connect to the Internet with the same cable.

Who can tell me how to solve such kind of problems?thanks a lot!

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: NetworkManager shows I have connected but I can't!

Post by TrevorH » 2015/07/20 12:21:23

Do you have valid nameserver lines in /etc/resolv.conf?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

nottwy
Posts: 3
Joined: 2015/07/20 06:00:58

Re: NetworkManager shows I have connected but I can't!

Post by nottwy » 2015/07/20 12:36:13

TrevorH wrote:Do you have valid nameserver lines in /etc/resolv.conf?
This is my "resolv.conf" file.
---------------------------------------------------------------------------------------
# Generated by NetworkManager
search hpc.org

# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
-------------------------------------------------------------------------------------------
Please tell me what to do!

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: NetworkManager shows I have connected but I can't!

Post by TrevorH » 2015/07/20 15:43:27

It has no lines of the form "nameserver 8.8.8.8" in it so you are unable to translate names to ip addresses. I think the NetworkManager gui has a way to override this or you can do what it says in the existing file and add DNS1= to your ifcfg file.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

nottwy
Posts: 3
Joined: 2015/07/20 06:00:58

Re: NetworkManager shows I have connected but I can't!

Post by nottwy » 2015/07/20 17:09:54

TrevorH wrote:It has no lines of the form "nameserver 8.8.8.8" in it so you are unable to translate names to ip addresses. I think the NetworkManager gui has a way to override this or you can do what it says in the existing file and add DNS1= to your ifcfg file.

Thanks for your replying!

I'm not sure what this sentence means:
"add DNS1= to your ifcfg file".

So I guess:
Is there a file whose name is ifcfg?
Should I add just "DNS1=" into it or "DNS1=xxx.xxx.xxx.xxx"?

You said NetworkManager was not good because of its overwriting so I want to know which software or method should I use to connect to the internet?

And you refer to that I should add "nameserver 8.8.8.8",this sentence, into the /etc/resolv.conf file?
If I do it,will everthing be ok?

Thank your before your replying!

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: NetworkManager shows I have connected but I can't!

Post by TrevorH » 2015/07/20 17:41:03

You need to end up with a line in /etc/resolv.conf that tells it what ip address to go to to resolve DNS names to ip addresses. I used the 8.8.8.8 one as it's Google's public DNS server and works for most purposes. If you use NetworkManager then it's probably best to use its GUI to tell it what DNS server to use and it will take care of adding it to that file. If you don't use NetworkManager then you need to edit /etc/syconfig/network-scripts/ifcfg-ethX (where ethX is the name of your network interface) and add the DNS1= line to that and save it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

slepacus miticus
Posts: 4
Joined: 2015/07/20 15:55:17

Re: NetworkManager shows I have connected but I can't!

Post by slepacus miticus » 2015/07/20 20:14:24

nottwy
1. try this from terminal/console "ping 8.8.8.8" -no quotations, if you have response multiple line indeed your DNS is the problem(CTRL+C to exit comand)

2. at console type "vi /etc/sysconfig/network-scripts/ifcfg-eth0 " or better/easyer another test editor like "nano /etc/sysconfig/network-scripts/ifcfg-eth0" -no quotation
the file is something like DEVICE=eth0 and many more, or less. At the bottom insert DNS1=8.8.8.8 DNS2=8.8.4.4 save and exit, then execute: service network restart

3. if you want the gui, open network manager or something where network configurations are made and edit at the ipv4 tab, insert in additional name servers "8.8.8.8" no quotations

Post Reply