LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-26-2012, 06:34 AM   #1
x201s
Member
 
Registered: Dec 2010
Posts: 67

Rep: Reputation: 0
Can connect to internet only after I run "service network restart"


I have a RHEL 6 server, on top of a VMware Hypervisor. (I have no access to the Hypervisor).

When freshly rebooted, I don't have outside connection-- ping www.yahoo.com, etc gives me "unknown host".

chkconfig --list shows network service "on" for 2345.

But when I restart network service, it connects fine.

What I am missing?

Please help.

TIA,
 
Old 11-26-2012, 07:05 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Check your ifcfg-eth0 file for the following entry: ONBOOT=yes, it might be set to no
 
Old 11-26-2012, 10:42 AM   #3
x201s
Member
 
Registered: Dec 2010
Posts: 67

Original Poster
Rep: Reputation: 0
No, onboot was "yes".

Someone said it is network manager that is playing tricks.

I had the following in ifcfg-eth0:
I had NM_CONTROLLED = no, but that didn't help.

I had bootproto=none, changed to static (yes, I have a static IP)-> nope

I had two entries like this:
DNS1= xxx
DNS2=yyy
xxx, yyy being actual nameserver IPs.

I deleted the NM_CONTROLLED line altogether, removed network manager (yum remove network-manager).

I added two nameserver values in resolve.conf, also added GATEWAY parameter in /etc/sysconfig/network.

No luck.

What else can I try?

PS: I might have misled: I *do* have network connectivity- I can access the server with ssh.
Only I cannot connect to internet from inside the server until I manually restart the network (service network restart).
 
Old 11-26-2012, 10:55 AM   #4
x201s
Member
 
Registered: Dec 2010
Posts: 67

Original Poster
Rep: Reputation: 0
The last changes seem to have done some good-- now I have internet connection after reboot.

Until now, I had only rebooted the server, but this time, I shut it down and restarted.
Does that make any difference?

Anyway, happy for now for a task accomplished!

Thank you, druuna, for taking time to read.
 
Old 11-26-2012, 11:20 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by x201s View Post
Until now, I had only rebooted the server, but this time, I shut it down and restarted.
Does that make any difference?
A full shutdown and restart is the best way in my opinion. A warm reboot doesn't always restart services etc the way you might expect.

Can you put up the [SOLVED] tag if this is considered solved.
- above the first post -> Please Mark this thread as solved if you feel a solution has been provided.
- -or- -
- first post -> Thread Tools -> Mark this thread as solved
 
Old 11-26-2012, 12:10 PM   #6
x201s
Member
 
Registered: Dec 2010
Posts: 67

Original Poster
Rep: Reputation: 0
I had some hint from this page:
http://lukas.zapletalovi.com/2011/03...etworking.html
 
Old 11-26-2012, 12:13 PM   #7
x201s
Member
 
Registered: Dec 2010
Posts: 67

Original Poster
Rep: Reputation: 0
Sure, I will tag it as solved.
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add simple script to "service network restart" Paulius_J Linux - Newbie 4 06-05-2012 07:50 AM
What does "service network restart" do on RHEL? resetreset Linux - Networking 5 04-06-2012 07:10 AM
Getting "SIOCADDRT: No such process" when running "service network restart" cmlorentz Linux - Networking 1 11-26-2010 01:06 PM
counter part of "service network restart" b0nd Slackware 5 10-10-2005 06:47 AM
Getting message "connect: Network is unreachable" trying to access the Internet denver1980 Linux - Networking 5 12-29-2004 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration