Linux - NetworkingThis 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.
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.
Been admin for unix systems for 20 years but been out of the loop for a couple of years, memory is weak, and Linux is new(ish) to me. I'm guessing it's a "um, yes, I knew that, really" sort of error, but I'm stumped.
Setting up two new Mandrake 9.1 systems. Having trouble with eth0. It can ping itself (which took a while until I realised the security settings were getting in the way), but it can't find the other linux box.
two linux boxen hooked up through hub. Hub works (I've confirmed this), cables good, hardware seems ok, systems new.
Hardware for both systems: ([...] means I editted text out),
excuse any typos as I'm typing this from one system while reading the screen across the room...
root@sage> ifconfig -a
eth0
Link encap: Ethernet HWaddr ([...mac id...])
inet addr: 192.168.0.2 Bcast:192.168.0.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:14 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo:
Link encap:Local Loopback
(etc...)
root@thyme> route -n
Kernel IP routing table
Destination: Gateway: Genmask Flags: Metric Ref Use Iface
192.168.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
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
(note: I've tried various combinations of adding the system
itself as a gateway, ie:
> route add default gw sage,
> route add default gw thyme
with no luck.
could it be that both boxes are acting as host and causing a conflict? i'm new as well (really new...been running mandrake 9.1 for about 6 weeks) so i'm guessing here.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
I think the card is to blame (well, chip). It's either misconfigured, or has a fault.
You say you're running a hub. Is it 100Mbs or 10Mbs? Is your card hard coded to a certain media setting (100full, 10half, etc)? Use mii-tool to discover the card's setting and possibly change it. Some networking hardware has difficulty auto-negotiating. Find out what the max speed your hub will support is and use mii-tool to hard code your card's media settings to that. Note that hubs are shared media so you can only operate in HALF duplex (don't try setting duplex to full, you'll have problems).
If you do arp -a, can you see any other MAC addrs on your network? Can any other hosts ping yours? Do their arp caches have your MAC addr? Try running a sniffer (tcpdump, snoop, Ethereal, etc) on the hub to see what exactly is going on.
You probably need to start without any firewall on either box and get them talking first. Just start the Mandrake Control panel and select Security -> DrakFirewall Then where it says which services do you want to allow check Everything (no firewall). Then Select Network & Internet and configure your eth0 card. Then from the same screen click on Configure Internet Access and set the Gateway to 192.168.0.1.
Try restarting your network:
service network restart
/bin/bash - that's basically where I'm at now. DrakFirewall is off, and I'm running basic "linux" as opposed to "linux-secure".
Hub is an old 8-port 10BaseT. mii-tool seems to say the card settings seem to be what is expected (10BaseT, half duplex).
I'd love to think the problem is with the hardware, but the fact that two identical systems are having exactly the same fault seem to suggest that it's a user error on my part.
root@thyme > mii-tool
eth0: no autonegotiation, 10baseT-HD, link ok
I've now done service network restart after running netconf to reset gateways and stuff.
route -v now returns:
default firewall 0.0.0.0
as the last line.
However, I can't ping firewall either. (firewall = 192.168.0.1, a DLink hardware firewall. I can ping the Dlink from my current system (my old XP system).
The eth0 on the computer has no lights, but the "network traffic" light on the hub flashes in time to the pings.
I unplugged the DLink from this computer (lots of traffic) and yes, the network traffic light there does flash in time to the pings, at the same time as the hub.
OK, I've downloaded, installed and configured Ethereal on my WinXP box and have discovered that pings from either system are, in fact, being seen on my internal network.
So, something is getting out of eth0 ok, but nobody seems to be replying.
oddity: when I ping from my WinXP box, I see ICMP packets.
When I ping from Linux, all I'm seeing is ARP, but no ICMP.
hmm, I vaguely recall this is significant, but I can't remember why, darnit.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Well for some reason the Linux boxes either aren't getting, or aren't storing the ARP responses. Your ARP cache is empty so it's no wonder you cannot ping anything, you have no MAC addr to send the packet to!
By the way, you do not need to install packet sniffers on all you boxes (chances are the *nix boxes already have tcpdump, but that's beside the point). You're connected via a hub, and remember, hubs are shared media. All the packets are echoed to all the ports on the hub, so running a sniffer on one machine is as good as running a sniffer on all of them.
The routing setup posted above should be correct:
Quote:
root@thyme> route -n
Kernel IP routing table
Destination: Gateway: Genmask Flags: Metric Ref Use Iface
192.168.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
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
Your ifconfig output matches this, so that should be fine as well. The fact that you see ARP requests with Ethereal shows that at least ARP is getting out of the box (although for whatever reason the replies aren't sticking).
Now there are several things to check. One, you said you saw the ARP reqs. Were they from the box that was pinging? Was there an ARP response with the correct MAC addr of the IP you were trying to ping? After the reply, were there more ARP reqs from the box that was sending the pings (I'm assuming the answers are yes, yes, yes). If my assumptions are correct, then the problem is with the original box receiving the replies.
Try iptables -Ln to see if you currently have anything loaded in the kernel netfilter. If you do have entries, then iptables -F will flush all of them. It's sounding to me like either you have the remenents of a firewall installed and you don't realize it, or else the driver you're using is not working correctly with your hardware.
The arp requests were from the box that was pinging, down to the mac address of the eth0. The answers are indeed yes, yes and yes.
I'm off for some liquid recovery to Vancouver now, but will return tomorrow with more exciting news about the results of iptables and firewall remnants that refuse to die.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.