LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-13-2003, 05:26 PM   #1
renegade69
LQ Newbie
 
Registered: Aug 2003
Distribution: red hat 9.0
Posts: 26

Rep: Reputation: 15
Unhappy network is unreachable


To Anyone Who Can Help,
I am very new to Linux. I have just installed RH 9.0 on my Toshiba Satellite 1800.
Everything whent fine durring installation(other than sound, but I knew of the problem before hand), but now that I have everything set up, I am having trouble working the bugs out of my network card.
My Laptop is hooked up to a multi port hub, in star formation, with a DSL line running in as the link. Using DHCP. I have set up a small LAN.
Durring starup everything loads perfectly fine. My NIC is on eth0. It connects to the DNS, receives its IP address, and downloads its necessary information. When I go into a terminal, I can ping myself (loopback), but it refuses to ping anyone, including all other computers hooked up to the hub.
example:
# ping x.x.x.x
connect: Network is Unreachable

If I do ifconfig, it tells me my IP, says the card is active and running.
At first I thought it might be a problem with the driver, but the correct driver is installed.
Then after reading multiple forums, I now think it is a problem with routing. But I am very new to this. And whenever I try and do something to my Routing Table, it tells me the same thing.
example:
# route add gw x.x.x.x
SOCADD: Network is Unreachable

My routing table is set up as follows:
Destination Gateway Netmask Device
169.254.0.0 0.0.0.0 255.255.0.0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 lo

If anyone knows a few tricks to help me out, it would be gretaly appreciated!

Renegade
 
Old 08-13-2003, 06:41 PM   #2
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Your routing table is missing the destination network address.
Perhaps your eth0 is not configure correctly.

Since you are using RH9, you can use the GUI tool to configure eth0.
Open a terminal window and type: redhat-config-network-gui
Verify that the info for eth0 is correct. Then restart the Network service.

You can also edit the file manually
/etc/sysconfig/network-scripts/ifcfg-eth0
 
Old 08-13-2003, 08:00 PM   #3
tyler0123
Member
 
Registered: Aug 2003
Posts: 134

Rep: Reputation: 16
try this.

if your network is say 192.168.0.0, try this at command prompt:

ifconfig eth0 192.168.0.x

x being a number not used on your network already to prevent ip address conflicts

then type route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.0.x

this time x is the ip of the gateway, the router you have.

now try to ping another computer on your network. make sure the 192.168.0 in the ip i gave above are the same as the first three octets, or numbers, of your ip range.

let me know what happens. if there is some problem, and this does help, you can add the lines i stated above to the end of your /etc/rc.d/rc.local file to get them to happen every time you reboot.
 
1 members found this post helpful.
Old 08-13-2003, 11:25 PM   #4
x-radian
LQ Newbie
 
Registered: Aug 2003
Location: Kuala Lumpur
Distribution: Linux
Posts: 19

Rep: Reputation: 0
ok

right now wahat u have to do is you just config the redhat-config-network to make sure either your NIC is working or not

If the network card ok then you must restart your network by using this command
ifconfig eth0 up
thenfollowed by this command
service network restart
and check ifconfig


ok let's try and error


byeeeee
 
Old 08-14-2003, 12:21 AM   #5
renegade69
LQ Newbie
 
Registered: Aug 2003
Distribution: red hat 9.0
Posts: 26

Original Poster
Rep: Reputation: 15
Smile

YEAHY!!!
Hey Tyler,
After typing in those two commands, my network is up and running!
For some reason, my dynamically assigned IP address is giving me problems. If I try to do "ifconfig eth0 x.x.x.x" using the actual IP address DHCP assigns me, then it justs tells me "network is unreachable", but If I choose a new IP, then it works properly.

I am having the problem of having to do this every time I reboot. When I add those two lines to my rc.local file, do I have to put a word or phrase in front of them?!
So far when I add them to rc.local, they do not resolve my error upon startup.

Thanks for the help guys, these forums are better than cheesecake... and boy do I love cheesecake.

Your the man Tyler!!!

Last edited by renegade69; 08-14-2003 at 12:44 AM.
 
Old 08-14-2003, 01:19 AM   #6
tyler0123
Member
 
Registered: Aug 2003
Posts: 134

Rep: Reputation: 16
please copy the contents of your /etc/sysconfig/network-scripts/ifcfg-eth0 file here and i will see if i can troubleshoot that for you. also, did you make sure there was a carriage return, or blank line, at the end of the rc.local file? also, perhaps adding, before the two we added to rc.local, the following:

ifconfig eth0 down
ifconfig eth0 up

may solve this.

let me know what happens.
 
Old 08-14-2003, 11:13 AM   #7
renegade69
LQ Newbie
 
Registered: Aug 2003
Distribution: red hat 9.0
Posts: 26

Original Poster
Rep: Reputation: 15
Hey Tyler,
Everything is workign perfect now. I am writing this message in mozzilla.
I had written down my dynamically assigned IP address in the line:
ifconfig eth0 x.x.x.x
in the rc.local file... After I changed the last number in the address to a new number, everything works fine!
Thanks for all the help Tyler, much appreciated!!!
Renegade
 
Old 08-14-2003, 02:23 PM   #8
tyler0123
Member
 
Registered: Aug 2003
Posts: 134

Rep: Reputation: 16
good job. hope this helps with future problems you may encounter as you move your network to all linux. just kidding. take care.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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? biledaemon Slackware 4 10-24-2005 02:05 PM
Network Is Unreachable!!!!!!!!!!!!!!!!!!!!! koodoo Linux - Newbie 4 02-19-2005 09:51 AM
Network is unreachable kakarizz Linux - Networking 1 12-16-2003 09:16 AM
Network is unreachable radix Linux - Networking 4 05-09-2002 01:06 AM
network unreachable topsoil Linux - Networking 6 08-05-2001 12:28 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration