post the contents of
Good Afternoon. I am pretty new to linux. I have only been working on it in a data center for a little over a year and now I am in a new position and a new job that requires a little bit of linux use. We do not have a linux sysadmin here and I am not going to training for a few more months. Unfortunately I still have to get some of this stuff working.
My issue seemed easy at first and I was able to get a lot of info off google but I am not able to get my servers (4) online. I can ping the server itself with 127.0.0.1 but when I ping the gateway I get "Destination host unreachable" When I ping google I get "ping: unknown host google.com"
I have verified the settings in ifcfg-eth0 to be right, but not sure what else to do from here. Any help would be appreciated. I dont know what all you will need but ill add it as its asked for.
Forgot to mention that it is currently RHEL 5.8
post the contents of
[root@localhost ~]# cat /etc/sysconfig/net
[root@localhost ~]# cat /etc/resolve.conf
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcg-eth0
We have a lot of virtuals in our environment and im going to assume that this issue may have something to do with the fact it still says root@localhost when all the others say username@servername.
Edit /etc/sysconfig/network and make sure GATEWAY (router IP) is set to actual IP of your router. In this example, I am setting default gateway to 192.168.1.254:
You need to restart the network service:Code:GATEWAY=192.168.1.254
To print current or update routing table:Code:/etc/init.d/networking restart
Test it:Code:route -nr
See:Code:ping gate-way-ip ping ns1-ip ping 126.96.36.199 ping cyberciti.biz host cyberciti.biz
- Red Hat / CentOS Linux Setting a Default Gateway
- Howto Red hat enterprise Linux 5 configure the network card
Thank you for the quick reply.
I added my gateway and restarted network but still getting Destination host Unreachable when I ping the gateway.
Also, when I tried to use route -nr it said:
route: invalid option -- r
then went on listing possible options.
My bad try:
Also remove NETWORK entry. It is not required. Linux will figure out the correct subnet for you.Code:route -n
Last edited by nixcraft; 17th September 2013 at 09:18 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)