LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-29-2012, 10:31 AM   #1
dhairysheel
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Rep: Reputation: Disabled
Red face Network is unreachable


Hi,
I'm using rhel 6.0 after installation,
i set ip through setup cmd.
restarted network service.
then it shows only

shutting down loopback interface [ok]
bringing up loopback interface [ok]

i used
and when i ping to mypc ip it shows

Network is unreachable

below is my ifcfg-eth0 configuration
DEVICE=eth0
HWADDR=00:0c:29:b2:21:a5
NM_CONTROLLED=NO
ON_BOOT=NO
BOOTPROTO=static
IPADDR=192.168.1.4
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
TYPE=Ethernet
IPV6INIT=no
USERCTL=no

Please mention what more changes required.
 
Old 05-29-2012, 10:46 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Is really 192.168.1.4 the address allocated to this machine by your own (local) web server?
Did you check that this server be running?
 
Old 05-29-2012, 03:19 PM   #3
dhairysheel
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Actually i have done fresh installation through dvd. so no matter of webserver ok!
 
Old 05-29-2012, 03:32 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Then you don't have a local network but are directly connected to the Internet.

You certainly can't use a local address, as 192.168.1.4, unless your machine be behind a NAT router.

There are two ways you can get an IP address : statically or through DHCP

If you don't know the address allocated by your provider, begin with DHCP.

Open a terminal, become root then type:
Code:
ifconfig eth0 up
dhcpcd eth0
After that you can check the IP address with:
Code:
ifconfig eth0
PS If dhcpcd is not available on RHEL 6, use another dhcp client.

Last edited by Didier Spaier; 05-29-2012 at 03:39 PM.
 
Old 05-29-2012, 03:47 PM   #5
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
you should try "ping www.google.com" or some IP for example 192.168.1.254
not the name of your PC, as Linux doesn't know your windows network names (you will need samba ...)
If the ping from IP 192.168.0.254 comes back ok, then it's OK.
and if ping www.google.com works, then it's even better.
 
Old 05-30-2012, 02:00 AM   #6
dhairysheel
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanx! for reply but my pc is not connected to internet and i'm not giving automatic ip.
 
Old 05-30-2012, 02:07 AM   #7
dhairysheel
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
My need is i just want to set static private ip. and it should have to ping himself. but ip is not gone set.
but ifcfg-eth0 file shows ip

below is my ifcfg-eth0 configuration

DEVICE=eth0
HWADDR=00:0c:29:b2:21:a5
NM_CONTROLLED=NO
ON_BOOT=NO
BOOTPROTO=static
IPADDR=192.168.1.4
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
TYPE=Ethernet
IPV6INIT=no
USERCTL=no


when i check ip using ifconfig cmd it shows 127.0.0.1
 
Old 05-30-2012, 03:42 AM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Well, 127.0.0.1 is any machine's address, when she wants to speak to herself

Obviously this need neither special configuration, nor gateway - unless you want to be able to say "Hey, Myself, may I speak to Myself?"

For instance if you want to access your own CUPS server you type in your browser's address bar: 127.0.0.1:631

Still I do not understand why you want to set another private IP, if you have only one PC?

Or do you want to connect one PC to another?
 
Old 05-30-2012, 03:54 AM   #9
lonelyman
Member
 
Registered: May 2012
Location: Shanghai
Distribution: redhat,centos,fedora
Posts: 63
Blog Entries: 4

Rep: Reputation: Disabled
maybe you could try:alter this file /etc/sysconfig/network-scripts/ifcfg-eth0,following this code"ONBOOT=no" to "ONBOOT=yes",then
ifdown eth0;ifup eth0,after this,run "ifconfig -a" just to check your eth0 is alive,i wonder if your eth0 is alive.
 
1 members found this post helpful.
Old 05-30-2012, 05:47 AM   #10
dhairysheel
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
ya! it works ! but i'm not understand why this happened?

Thanking you !
 
Old 05-30-2012, 06:59 AM   #11
lonelyman
Member
 
Registered: May 2012
Location: Shanghai
Distribution: redhat,centos,fedora
Posts: 63
Blog Entries: 4

Rep: Reputation: Disabled
ah,i met this problem before on my centos 6.2,in fact,i don't know either,ahha,nerver mind it~!
 
Old 05-30-2012, 06:43 PM   #12
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248
Blog Entries: 3

Rep: Reputation: 17
in rhel6/centos6 by default on_boot is no

Since RHEL6 use NetworkManager by default, users that just installed text-only server
/etc/sysconfig/network-scripts/ifcfg-eth0 can look like:
DEVICE="eth0"
HWADDR="XX:XX:XX:XX:XX:XX"
NM_CONTROLLED="yes"
ONBOOT="no"

Last edited by pantdk; 05-30-2012 at 07:05 PM.
 
1 members found this post helpful.
  


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
Network Unreachable for Destination Network other than Interface Jack10 Linux - Networking 3 08-17-2010 07:50 AM
Network is unreachable ahtesham0123 Linux - Software 4 04-25-2010 08:45 AM
network unreachable.... :( culin Linux - Networking 4 08-22-2007 08:29 AM
network is unreachable tbl Slackware 9 08-17-2006 07:25 AM
network is unreachable renegade69 Linux - Networking 7 08-14-2003 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:16 AM.

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