LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 12-16-2001, 04:41 AM   #1
Chrisf
LQ Newbie
 
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13

Rep: Reputation: 0
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.
 
Old 12-16-2001, 12:35 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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.
 
Old 12-16-2001, 03:42 PM   #3
tomaz
LQ Newbie
 
Registered: Aug 2001
Distribution: Redhat 7.2
Posts: 15

Rep: Reputation: 0
"When all else fails, your screwed."
The proper way to write that is:
"When all else fails, you're screwed." (you are)
 
Old 12-17-2001, 03:11 AM   #4
Chrisf
LQ Newbie
 
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 12-17-2001, 05:25 AM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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.
 
Old 12-17-2001, 07:38 AM   #6
Chrisf
LQ Newbie
 
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 12-17-2001, 09:16 AM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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 09:24 AM.
 
Old 12-17-2001, 09:19 AM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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 09:22 AM.
 
Old 12-18-2001, 01:52 AM   #9
Chrisf
LQ Newbie
 
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 12-18-2001, 02:02 AM   #10
Chrisf
LQ Newbie
 
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 12-18-2001, 08:45 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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.
 
Old 12-18-2001, 09:27 AM   #12
Chrisf
LQ Newbie
 
Registered: Nov 2001
Distribution: RedHat 7.1
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 12-18-2001, 11:23 AM   #13
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Great,

Glad you got it

 
  


Reply



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
No LAN type found in network configuration on redhat 9.0 ejain Linux - Networking 3 05-11-2005 09:30 AM
problem with LAN configuration aditya1 Linux - Networking 5 03-10-2005 01:46 PM
LAN Configuration Melo Linux - Networking 2 08-31-2003 03:48 PM
Lan Configuration varunbihani Linux - Hardware 1 07-18-2003 09:55 AM
LAN Configuration-Newbie here zukester Linux - Networking 24 07-13-2001 12:50 AM

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

All times are GMT -5. The time now is 04:56 PM.

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