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.
|
 |
12-16-2001, 05:41 AM
|
#1
|
LQ Newbie
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13
Rep:
|
RedHat 7.1 Lan Configuration
I've hooked up a RedHat 7.1 computer to my Lan (Linksys router, alcatel speed touch home) and I am trying to configure it with dhcp.
ifconfig shows eth0 as up, but I am unable to ping any ip addresses. I think this is probably a simple configuration problem - I'm not sure I have all the right numbers in the right places in netcfg.
Any suggestions would be appreciated.
|
|
|
12-16-2001, 01:35 PM
|
#2
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
ifconfig shows it as up?
how about the ip address, is it right?
if it is then see what route -n shows, it should show the default gateway.
|
|
|
12-16-2001, 04:42 PM
|
#3
|
LQ Newbie
Registered: Aug 2001
Distribution: Redhat 7.2
Posts: 15
Rep:
|
"When all else fails, your screwed."
The proper way to write that is:
"When all else fails, you're screwed." (you are)
|
|
|
12-17-2001, 04:11 AM
|
#4
|
LQ Newbie
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13
Original Poster
Rep:
|
yes, ifconfig shows it as up, I believe the problem is quite simple - I'm not sure which fields I need to fill in if I'm using dhcp
When I run route -n it displays the following table
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
Now that doesn't look at all right to me, but I'm not quite sure what to set to fix it.
Thanks.
|
|
|
12-17-2001, 06:25 AM
|
#5
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
you should have posted the output of ifconfig
anyway looks like you have an ip judging by rour route that has you on network 10.10.0.0/24
so now for things to work right rou need a default route
get the correct ip address of the gateway server and run route like this,
route add default gw 10.10.0.1
substituting the correct ip address.
|
|
|
12-17-2001, 08:38 AM
|
#6
|
LQ Newbie
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13
Original Poster
Rep:
|
Hi,
When I enter 'route add default gw' then the ip, I get a SIOCADDRT: Network is unreachable error
here's the eth0 output from ifconfig
Link encap:Ethernet HWaddr 00:50:FC:1B:96:2A
inet addr:10.10.0.2 Bcast:10.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 METRIC:1
RX packets:2510 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:11 Base address:0xdc00
Thanks
|
|
|
12-17-2001, 10:16 AM
|
#7
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
what was the ip you tried to set as the default, it has to be on the network your ip is in or maybe your netmask is incorrect, with a 255 that means you cannot have any other number in that octet
Last edited by DavidPhillips; 12-17-2001 at 10:24 AM.
|
|
|
12-17-2001, 10:19 AM
|
#8
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
do this
assuming your ip is correct
ifconfig eth0 10.10.0.2 netmask 255.0.0.0
route add default gw 10.?.?.?
fill in the correct numbers
as long as the default starts with 10. and is a valid number it will work.
Last edited by DavidPhillips; 12-17-2001 at 10:22 AM.
|
|
|
12-18-2001, 02:52 AM
|
#9
|
LQ Newbie
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13
Original Poster
Rep:
|
hey,
I ran the commands as you suggested, and it no longer gives me the network unreachable error. But when I try to ping something I get the following printed out
From (my ip) : Destination Host Unreachable
Now would this just be because I haven't assigned the correct IP?
On my Alcatel speed touch modem there's both an IP address and a gateway address. Seeing how I have a router between that and my computer are those numbers even relevant? and if not how do I obtain the IP of my router to use?
Thanks again 
|
|
|
12-18-2001, 03:02 AM
|
#10
|
LQ Newbie
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13
Original Poster
Rep:
|
The kernel IP routing table also looks a little strange here
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.10.130.254 0.0.0.0 UG 0 0 0 eth0
/sbin/ifconfig output
Link encap:Ethernet HWaddr 00:50:FC:1B:96:2A
inet addr:10.10.0.2 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MTU:1500 METRIC:1
RX packets:2510 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:66 dropped:0 overruns:0 carrier:132
collisions:1122 txqueuelen:100
Interrupt:11 Base address:0xdc00
now the subnet mask on the alcatel modem is 255.255.255.0 should I be using that instead?
thanks
|
|
|
12-18-2001, 09:45 AM
|
#11
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
you can use the same netmask assuming they are correct.
the gateway address is very important for it to reach anything if it is wrong you will be trying to reach a dead end,
So you have a cable modem with a router and a linux box.
the default gateway in the router will have to match your isp's gateway server ip address.
the linux box default gateway should be the ip of the router.
|
|
|
12-18-2001, 10:27 AM
|
#12
|
LQ Newbie
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13
Original Poster
Rep:
|
It works  )))
I entered the ifconfig and route commands like you suggested, I used 192.168.1.3 for the linux box and 192.168.1.1 for the router and that enabled me to ping outside hosts.
I then entered the host name and ip address of the isp in the hosts section of netcfg, entered the nameservers, and changed the default gateway in netcfg to 192.168.1.1 and it worked.
So once again, thank you very much for all your help David 
|
|
|
12-18-2001, 12:23 PM
|
#13
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
Great,
Glad you got it

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