File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes NIC Card Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "NIC Card Problem" Watch "NIC Card Problem" New topic
Author

NIC Card Problem

Scott Updike
Ranch Hand

Joined: Feb 16, 2006
Posts: 92
I'm new to Linux and am trying to stand up my development environment and seem to have an issue with my NIC card. I did a core install of Debian Sarge and it seems that the NIC card was recognized by the installation process because when I go into my /etc/network/interfaces file I see the following:

auto eth0
iface eth0 inet static
address: 192.168.1.50
netmask: 255.255.255.0
network: 192.168.1.0
broadcast: 192.168.1.255
dns-search devserver

and when I run ifconfig, I see the following:

eth0 Link encap:Ethernet HWaddr 00:50 A:13:8C:31
inet addr: 192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX: Packets:400 errors:0 dropped:0 overruns:0 frame:0
TX: Packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40917 (39.9 KiB) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0x1000

So here are my two issues:

1) I don't see a line in my /etc/modules file that would tell the Kernel to load the driver for the NIC card. Or am I missing somehting? Is that loaded somewhere else? Is there anything else I should check to validate that the card is installed/configured correctly?

2) When I connect my Windows laptop to my newly installed Linux box (NIC to NIC) via a CAT5 Cross-over cable, I'm not able to ping my linux box using

ping 192.168.1.50 or ping devserver

What else should I do/try?

Thanks in advance.
Scott
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

/etc/modprobe.conf f/k/a /etc/modules.conf f/k/a /etc/conf modules isn't something that needs to be told about each and every kernel component. It's mostly to set connections and parameters that can't be deduced or provided in some other way. NICs are often aliased, and older, pre-PCI NICs frequently used it to matchup IRQs, addresses and DMA channels, but for a vanilla smart-configure, you wouldn't need an explicit entry.

Your IFCONFIG looks OK to me. Most problems are when the NIC never shows up in ifconfig, or doesn't get set up with an IP address.

You say you can't ping the Linux box from a Windows box, but have you tried the reverse? First ping 192.168.1.50 from a shell command line, just to say you did it. Then try pinging the IP of the Windows box.

One possibility, of course, is that there's no network route between the two. This would be if the netmask on one or both systems was incorrect or if the two IPs were truly defined for different subnets.

To check the routing itself, the Linux command "route -n" will help. For Windows, it's "ROUTE /PRINT".

A lot of NICs have status LEDs attached to them. When a ping is passing through, the lights will blink regularly as each ping packet hits. Also, if you get a cheap hub or switch and connect the 2 machines, the status lights on the bud/switch will blink in time with the pings.

Finally, don't overlook the possibility that the cable's bad.

I noticed from your ifconfig display that SOMETHING sent a fair amount of data through into NIC and it was all received successfully.

Windows ping defaults to 4 packets. Linux ping defaults to ping until stopped.


Customer surveys are for companies who didn't pay proper attention to begin with.
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
If there are firewall(s) up on either machine, drop them while you first test.
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

linux will typically block a ping by default. did you try to ping windows from the Linux box?

There are kernel drivers and there are modules. If you NIC uses a kernel driver or whatever its called, then there is no module to load. This is supposedly faster, but if it crashes it brings the kernel with it.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Originally posted by Mr. C Lamont Gilbert:
linux will typically block a ping by default.

Really?
I never had such a typical linux - only suse, redhat, halloween, peanut, knoppix and xubuntu.


http://home.arcor.de/hirnstrom/bewerbung
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

Yah. RedHat's about as paranoid as Linux gets on standard distros, and if you want to deny or ignore pings, you have to set it up manually.

I'm fairly sure that modules run in the same context as the kernel itself, so a bug in a module is probably just as fatal as a bug in the monolithic kernel. The difference is that by putting driver and such in modules, they can be loaded and unloaded and updated on demand, whereas the kernel loads at boot and stays there.

You normally put things that are mandatory in the kernel, and that includes the drivers to load the modules (otherwise it's chicken-and-egg time). However, the kernel will not only load slower if you put too many drivers into it - it might end up too large for the kernel boot mechanism to handle.
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Regardless of how distros are out of the box, I routinely set up Linux machines to drop those ICMP packets on the floor.

But in most situations walls need to come down when you are first testing connectivity.

It just eliminates one source of problems/confusion.
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

I used Redhat upto 9, and it blocked pings. I use Mandriva now, and it also blocks pings. But there is no more 'default' install as it asks you what level of security you want.

Anyway, what exactly is the problem the OP is having? Just the ping? The network card is clearly up and running based on ifconfig output.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

Bad choice of words, perhaps.

True, Red Hat/Fedora offer several options for network security - including both none at all and the ability to add custom port openings. So there's no one "default", just a set of base "defaults". But I've yet to see the installer set up an ICMP block by default. Any of the defaults, I mean.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NIC Card Problem