LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-04-2004, 11:25 AM   #1
Rex_chaos
Member
 
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240

Rep: Reputation: 30
about a LAN setup


Hi all,
I am running Fedora Core 2. I am using a broadband LAN and have a static ip. Under windows, I can connect to the internet after specify the ip adress, dns and gateway. However, in linux, that doesn't work anymore. I try all the way to setup the LAN but when I ping the dns or gateway, i was told that THE NETWORK IS UNREACHABLE

here is what I did

1) issue #netconfig to setup the ip, dns and gateway
2) #cat /etc/resolv.conf
to make sure the dns is added
3) #cat /etc/hosts
to make sure my static address is added
4) route add default gw x.x.x.x eth0
but FAIL, report THE NETWORK IS UNREACHABLE
5) startx and run the GUI-network configuration program, then active the network card eth0
6) everything is done, so I restart the network service
service network restart
7) ping my gateway or dns gives
THE NETWORK IS UNREACHABLE

Here is my routing table

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
211.50.0.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo

What's going on? How can I setup a LAN? Any one help me out?

Thanks in advance.
 
Old 08-04-2004, 01:05 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try adding the route with:
route add default gw x.x.x.x dev eth0
 
Old 08-04-2004, 01:14 PM   #3
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
It's reporting the network as unreachable because you don't have a default route set up.

In theory, you just need to do:
Code:
/sbin/route add default gw IP
Replace IP with the IP address of your router.

Hope that helps,

— Robert J. Lee
 
Old 08-04-2004, 11:59 PM   #4
Rex_chaos
Member
 
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240

Original Poster
Rep: Reputation: 30
Thanks. But when I try to setup a default gateway using the route, it tells

The network is unreachable !!!
 
Old 08-05-2004, 08:47 AM   #5
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Quote:
Destination Gateway Genmask Flags Metric Ref Use Iface
211.50.0.0 * 255.255.255.0 U 0 0 0 eth0
Just to make sure, when the network is 211.50.0.0/255.255.255.0, the IP address of the default route you want to set up is in the network - that is 211.50.0.*
Otherwise, it of course won't work.
R.
 
  


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
Problems with LAN setup zener Linux - Networking 25 11-30-2005 03:55 PM
how to setup my lan? kpachopoulos General 1 09-06-2005 02:41 AM
How to setup LAN in Slackware Iguana Slackware 4 11-07-2003 10:41 PM
LAN setup Melo Linux - Networking 5 09-04-2003 05:52 PM
Need help on lan setup. jsimone Linux - Software 1 04-05-2002 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:10 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