[SOLVED] Can connect to internet only after I run "service network restart"
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.