Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-04-2004, 11:25 AM
|
#1
|
Member
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240
Rep:
|
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.
|
|
|
08-04-2004, 01:05 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Try adding the route with:
route add default gw x.x.x.x dev eth0
|
|
|
08-04-2004, 01:14 PM
|
#3
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994
Rep:
|
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
|
|
|
08-04-2004, 11:59 PM
|
#4
|
Member
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240
Original Poster
Rep:
|
Thanks. But when I try to setup a default gateway using the route, it tells
The network is unreachable !!!
|
|
|
08-05-2004, 08:47 AM
|
#5
|
Member
Registered: Aug 2004
Location: Europe
Posts: 608
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 05:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|