LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-19-2001, 04:04 PM   #1
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Rep: Reputation: 15
configuring NIC on eth0 - problems


Hello,


I've installed the latest tulip drivers for my Linksys card and the drivers seem to be working properly. I also added the following to my /etc/conf.modules file:

alias eth0 tulip0


It's still not working properly:

(1) while initializing eth0 at boot, the system hangs for about 30 seconds and then proceeds with status being "OK"

(2) can't ping anything but localhost


Here are the outputs of a few relevant commands:


ifconfig:

eth0 Link encap:Ethernet HWaddr 00:04:5A:53:CF:2A
inet addr:192.168.28.85 Bcast:192.168.28.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:12 dropped:0 overruns:0 carrier:24
collisions:0 txqueuelen:100
Interrupt:11 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0




route -n:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.28.85 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.28.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
0.0.0.0 192.168.28.251 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 192.168.28.251 0.0.0.0 UG 1 0 0 eth0



There doesn't appear to be an IRQ conflict involving the ethernet card. Suggestions, anyone? Thanks!
 
Old 10-20-2001, 11:48 PM   #2
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
There's something strange going on in your routing table, but I can't quite put my finger on it. For instance, where is the 192.168.28.251 address coming from, and why does your NIC's IP (192.168.28.85) have a mask of 255.255.255.255 (with that mask, you aren't going to see anything, it should be 255.255.255.0).

What distro are you using?
Could you give a more complete description of your network (are you on a LAN, or connecting directly to a cable/DSL modem, etc.)?
 
Old 10-21-2001, 01:16 PM   #3
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Original Poster
Rep: Reputation: 15
Hey,


Thanks for posting.

I used netconfig to try and set up my networking, so that may have done some strange things to the routing table.

We have a small network with a gateway of 192.168.28.251. I'd like to give this machine an IP of 192.168.28.85. It's basically just a small LAN with a bunch of "virtual IPs" (i think that's what they're called). None of the machines can really be reached from the outside world...

Any other info you need?
 
Old 10-21-2001, 03:51 PM   #4
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
I'd say you definitely need to remove the first entry of your routing table:

# route del 192.168.28.85

Don't know if you really need the last entry.... I only have one entry for the standard-gateway, which has 0 0 0 as options. I don't know what 1 0 0 does.

Steave.
 
Old 10-21-2001, 07:34 PM   #5
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
If, as you said, you want to change the IP of the gateway NIC from .251 to .85, you might want to take Steave's suggestion even further. Delete all routing information (except for the 127.0.0.0 entry), assign the new IP to the NIC, and redo your network entries from there:
Code:
ifconfig eth0 192.168.28.85
route add -net 192.168.28.0
route add default gw 192.168.28.85
Restart your network services or just restart the box, and see if the changes took. Look in the /etc/sysconfig/network file to verify that the "GATEWAY=" line has the new 192.168.28.85 address.

If you had references to the old .251 IP anywhere else (browser setups, for example) you'll have to change them.
 
Old 10-21-2001, 07:50 PM   #6
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Original Poster
Rep: Reputation: 15
Hey,


Actually, I wasn't going to change the IP of the gateway at all, it's fine as it is as 192.168.28.251

However, I did want to make sure that hte IP of this box I'm configuring is 192.168.28.85.

What would be the easiest way to clear out my routing table and accomplish this? Can I assign the box an IP address through a method other than netconfig?

Oh by the way, this is Red Hat 6.2 I'm using; sorry I forgot to mention that earlier.
 
Old 10-21-2001, 08:32 PM   #7
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Sorry, I was confuzzled.
As Steave said, use "route del xxx.xxx.xxx.xxx" for the routing table entries you want to delete (man route for more info).

For the box you're currently configuring, the ifconfig command I gave in my last post will set the IP for the NIC. Doing the other commands, (using 192.168.28.251 for the default gateway address) will set your basic net parameters. From there you should at least be able to have a Ping-A-Thon between all of your boxen.
 
Old 10-22-2001, 09:19 AM   #8
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Original Poster
Rep: Reputation: 15
hey,


Still having a few problems, here. I've been deleting entries from the routing table and the machine is able to ping itself via the address 192.168.28.85 and via localhost (of course). However it still can't see machines on the network.

I'm having trouble removing the 192.168.28.0 entry from my routing table... these commands all fail:

Code:
route del 192.168.28.0
route del 192.168.28.0 -net
route del 192.168.28.0 -host
I'd like to be able to blank out my routing table as you suggested but I can't get this one entry to clear. As you suggested I'd leave 127.0.0.0 in there and then configure the IP, add the "network" IP and then add the router.

Thanks for your continuing help.
 
Old 10-22-2001, 09:51 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you're feeling a bit brave, look at

/etc/sysconfig/network
and
/etc/sysconfig/network-scripts/ifcfg-eth0

these two files hold most info about that interface, gateways etc... if you want to edit anything, back it up. of course. maybe.
 
Old 10-22-2001, 12:04 PM   #10
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Original Poster
Rep: Reputation: 15
Okay,


I reinstalled Linux again to clean it up, I reinstalled the card and then executed:

Code:
ifconfig eth0 192.168.28.85
At this point, I can ping my machine by localhost or that address and no other machines on the network can ping it or be pinged by it.

So then I entered this and got the response:

Code:
route add -net 192.168.28.0

SIOCADDRT: Invalid argument
For some reason these commands aren't working.
 
Old 10-22-2001, 12:14 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you'll need to set the netmask as well.

eg

route -add 192.168.28.85 netmask 255.255.255.0

I still personally prefer editing the config files directly. much easier i think.

acutally... reading the man route pages

need to do

route -add 192.168.28.85 eth0

which makes sense to me actually, the netmask is added my default to 255.0.0.0 fro the class C subnet
could have deleted what i wrote before... but i thought i'd prove i know cvery little despite all my posts!
 
Old 10-22-2001, 12:28 PM   #12
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Original Poster
Rep: Reputation: 15
Okay,


How do I get these settings to persist after a reboot? Every time I reboot the server to test this, I'm back to square one, ie eth0 doesn't even show up in inconfig until I run the infconfig command again to assign it an IP address, and my routing tables are blank except for the 127.0.01 entry.
 
Old 10-22-2001, 12:55 PM   #13
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
You will have to edit the config-files. Acid mentioned their location above.

Quote:
/etc/sysconfig/network
and
/etc/sysconfig/network-scripts/ifcfg-eth0
I'd guess you have to fill in the arguments for the ifconfig-command in .../ifcfg-eth0
Don't know what .../network is for. Probably you'll find some kind information for your routing table here.

Probably there is even a tool in RH to configure your network? It's probably also a good choice to use it.

Steave.
 
Old 10-22-2001, 12:55 PM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
AAAAAAAAAAAAARRRRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHH

Just edit the config files!!!!!!!!!!

AAAAAAAAAAAAARRRRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHH


:-)

dammit! i hate it when someone posts a reply as i'm replying!

anyway... /etc/sysconfig/network:

NETWORKING=yes
FORWARD_IPV4=false
HOSTNAME=trevor
GATEWAY=10.0.0.2

/etc.........../ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
IPADDR=10.0.0.1
NETMASK=255.255.0.0
NETWORK=10.0.0.0
BROADCAST=10.0.0.255
ONBOOT=yes

this is my internal machine. note global gateway.


Last edited by acid_kewpie; 10-22-2001 at 12:58 PM.
 
Old 10-22-2001, 01:27 PM   #15
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Original Poster
Rep: Reputation: 15
Here's the two files put in, appropriate for my network:

/etc/sysconfig/network:

NETWORKING=yes
FORWARD_IPV4=false
HOSTNAME=magma
GATEWAY=192.168.28.251

/etc.........../ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.28.85
NETMASK=255.255.0.0
NETWORK=192.168.28.0
BROADCAST=192.168.28.255
ONBOOT=yes


It can ping itself (192.168.28.85) but gets the typical "Destination Host Unreachable" from anything else.

*sigh* any ideas? If I can't get this to work I'm going to try RH7.1 next.
 
  


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 configuring a BCM5721 NIC Maldain Linux - Networking 4 05-09-2005 11:22 AM
Problems configuring wireless nic messenger *BSD 17 11-17-2004 08:19 PM
Configuring kernel, problems with Realtec Nic. Royle Linux - Hardware 0 08-17-2004 10:40 AM
Problems configuring eth0 and ppp0 mdavidn Linux - Networking 1 04-24-2004 02:58 PM
eth0 and nic problems nightheart Linux - Networking 8 04-29-2002 03:28 PM

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

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