CentOS 6.0 networking

I am having trouble with intial network (ifconfig and route) settings on my new server, doing it three different ways to no avail.  I have set the interface (ifconfig...) and the default routing (route add...), as well as use the 'setup' utility, as well as manually editing the /etc/sysconfig/network-scripts/ifcfg-eth0 (and route-eth0) files.  While I have  been able to ping the default gateway, I can't get past it.  I know that default gatework works because other devices on the net have been successful.  If I try to ping past the default I get something similar to a "route unreachable" error message.
Furthermore I can't save the configuration when I try to do it thru the setup utility or when I do a /etc/inid.d/network save and restart.  Even when I see the /etc/sysconfig/network-scripts/ifcfg-eth0  and the /etc/sysconfig/network-scripts/route-eth0 have the correct parameters...(I think)
What am I missing?
mrkentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

goncalogiraoCommented:
I Had a similar problem with a server, check if you're doing NAT on the CentOS
0
Chris SandriniSenior System EngineerCommented:
Did you check if with ping or traceroute it actually choses your router? What are your routes? You might want to post some details... It is hard to predict...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrkentAuthor Commented:
NAT is not configured on the CentOS.  
I don't think it is choosing the gateway for outgoing.  If I remember correctly, traceroute was giving me the error message immediately just like ping was.
I can ping the gateway successfully so connectivity is there.

I'll post some details when I try it again in the next hour or so....
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

arnoldCommented:
It is not clear from your info whether the issue is that your location has a proxy and that is the only way to get out.
double check the ip/netmask matches the IP/netmask on the network.  A netmask mismatch could explain this.

/etc/network?
netstat -rn
please post
0
mrkentAuthor Commented:
See enclosure for all outputs.  It finally worked only AFTER I manually updated these last two files:  /etc/sysconfig/network   and
                                            /etc/sysconfig/network-scripts/ifcfg-eth0              

And the /etc/sysconfig/network-scripts/route-eth0 edit that I manually created, I'm not sure I did that right, nor am I sure that I need to have a default route in that file.

Does seem right?  It shouldn't have happened that way.  But for now, the networking works...
CentOS-config.txt
0
Chris SandriniSenior System EngineerCommented:
by default you don't need the route-eth0 file as long as you have defined GATEWAY in /etc/sysconfig/network or in the ifcfg-eth0 file
0
mrkentAuthor Commented:
That seems right.  The route-eth0 file was there only because I manually created it in the first place.  The last CentOS box I worked with was 5.7, and I don't know how different 6.0 is from 5.7.  I think my recollection with 5.7 was that somehow the route-eth0 file was created thru some utility I was working with.  Also,  I don't think I had an /etc/network file.

My next task is to install squid and turn this box into a proxy for local users.  So far I have only done a "yum install squid".  It was successful, now I am looking to configure and activate it.
0
Chris SandriniSenior System EngineerCommented:
have fun.
0
senseifedonCommented:
Hi;
Maybe your problem is related with SELinux. Can you disable it? Then try to connect somewhere. Edit the file: /etc/selinux/config change the SELINUX line to
SELINUX=disabled

Open in new window

0
mrkentAuthor Commented:
Wow, I am afraid that is a new one to me.  I didn't realize SELinux was already part of my distribution  - I thought that was different beast altogether and I would'vd had to have that implemented separately.
I am looking this up as I write this...

(lots of "haves" in that sentence, huh)
0
arnoldCommented:
Selinux will not interfere with network setup.

Have to see your ifcfg-eth0 script
It also use NetworkManagerto start interfaces that are dhcp.
Netstat -rn could shed light on what is seen on your system.
0
senseifedonCommented:
Hmmmm did you control your dns configuration?
ping 173.194.35.177
if ping responses normally, will try this one;
ping www.google.com

if you problem related with above situation, please change your dns server via following configuration;

nano /etc/resolv.conf

and insert

nameserver 8.8.8.8
nameserver 8.8.4.4

Or you should check ip address of your server. May be someone also uses same ip in your network.
0
mrkentAuthor Commented:
All-
Enclosed are the outputs you asked for in the last two posts.  I didn't change anything.  Anything catch your eye?
CentOS-config-2-.txt
0
arnoldCommented:
chkkconfig --list NetworkManager
chkkconfig --list network

are they set to on?

/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=Your_hostname

Are you using the available tool to configure networking, or are you trying to fill the configuration files one at a time?

/etc/resolv.conf
/etc/nsswitch.conf
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-<interface>


The entry in the routing table (netstat -rn) makes no sense
10.0.2.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0

It suggests that a DHCP request is being made.

Could you post /sbin/ifconfig -a as well as /etc/sysconfig/network-scripts/route-eth0
not sure what you have there nor why you have it.
0
mrkentAuthor Commented:
I've attached another file with more outputs at your request.

For the network configuration it was a combination of trying to use the configuration tool setup and making manual entries.  For the route-eth0 file I created it and configured it manually   -not sure if I needed it.
CentOS-config-3-.txt
0
arnoldCommented:
You seem to be missing the NetworkManager script.
You do not need the route-eth0

What happens when the system is booted?
What is the netstat -rn on boot?
0
mrkentAuthor Commented:
Do I really need the NetworkManager script?

Since I only have remote access today I don't want to reboot the system.  Last time I did that I couldn't get back in.  Apparantly not all the network config survived the reboot at that time.  It may have improved now with the latest changes that I made, but I don't want to take that chance until I am in front of the machine.  I haven't reboot the box since my lastest changes seemed to have improve things.
0
arnoldCommented:
The puzzling thing to me is the reference to the 169.254.0.0 segment referencing eth0
This segment os assigned when dhcp server can not be contacted. Your configuration does not indicate a dcp setting, your setting for eth0 further disables ipv6 yet, your ifconfig reflects ipv6 info.
We may have a similar issue. When NetwokManager is disabled, the network on a system does not comeup, but this one is configured as dhcp.

Rebooking in you first config post that included the ifcfg-eth0
You do not have NetworkManager installed, yet your config has NM_CONTROLLED=yes which should be no.
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=33908&forum=58
This might explain your situation.
0
mrkentAuthor Commented:
Very interesting find.  That looks similar, though not exact, to my situation.  Maybe I should re-install using the "simple" server text only settings.  My initial installation was "web server" setting (because I was hoping it would give me a GUI interface for intial configuration but it turns out it didn't give me that anyway).  Thoughts?

I'm not going to try any changes now anyway because at the moment I only have remote access.  I still haven't reboot the server yet because of the reasons I said before.  And I don't know why NetworkManager wasn't installed the first time.  For now, the server is reachable from the internet.   And I still haven't started my squid proxy configuration yet, which was the reason for installing this server in the first place...
0
arnoldCommented:
Text only seems to default in including NetworkManager which is what was mentioned and something I am dealing with in trying to setup clustering which does not work with NetworkManager.
0
mrkentAuthor Commented:
Thanks to all.  It seems to be surviving the reboots.  And I have NM_Control=yes in my ifcfg-eth0 file.
0
mrkentAuthor Commented:
Thanks again to all.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.