[CentOS] Re: new CentOS 5 install, 'Network is unreachable'

Sat Aug 4 03:55:18 UTC 2007
centos at swhi.net <centos at swhi.net>

Robert Nichols wrote:
> centos at swhi.net wrote:
>> I've a new CentOS 5 minimalist install; this will be the name server 
>> from my prior thread.  I have configured eth0 during setup with the 
>> static IP the unit will have when in production.  During this setup 
>> phase, selinux is set to permissive.
>>
>> Setting up on a different network, I did this:
>>
>> dhclient eth0 and successfully got a private address; I also 
>> validated that the resolv.conf file was created by the 
>> dhclient-script and it was, accurately pointing to my gateway and 
>> listing a domain name server by IP.
>>
>> That's where the fun stops.  Even pinging an IP, so as not to rely on 
>> name resolution, I get the dreaded 'Network is unreachable' error.
> <snip>
>
> As a quick check before doing the above, just run
>
>          route add default gw nnn.nnn.nnn.nnn dev eth0
>
> supplying the appropriate gateway address and device, of course.
>
Robert,

Thank you.  That did the trick. 

It's clearly been a long day.  I'd read earlier that even if I'd a 
static IP/NM, etc, setup, dhclient eth0 would temporarily let me use my 
private network, but taking the interface down and up would return to 
the static settings. 

Never even dawned on me that it was a routing issue. yeah, it's been a 
long day

Thanks loads,
~R