Page 1 of 1

Router detection of NICs

Posted: Thu May 17, 2012 4:25 pm
by Jezze
Hi,

This has buggered me for a while so I'll just ask here... my network understanding is not the best so if I've missed something basic I can only say I'm sorry.

I have a real physical RTL8139 network card and I have written drivers for it. On the network stack side I have basically nothing except ARP support. When running in a virtualized environment like QEMU I can send an arping to my OS and the network card will reply properly but when I try it on my real machine there is no IRQ triggering when sending traffic. I can see that the driver starts, I can see I've been given the IRQ 6 and I can see that an IRQ can be triggered because if I unplug the network cable an IRQ is fired. But for some reason no traffic I try to send to it raises an IRQ. The machine can dualboot into Ubuntu so I know the card works.

My lan setup is like this:

PC <-> ROUTER <-> PC

If I open and look in my router I can see that it has not detected that my machine is connected to the network. What am I missing? Any ideas?

Re: Router detection of NICs

Posted: Thu May 17, 2012 4:44 pm
by mateuszb
1. Is the link up? Does this card have a link status register? If so, can you check it?
2. Do you advertise your MAC station address over ARP ? If so, what are the destination and source addresses on the ethernet frame ?
3. Does the card do any MAC based filtering ? If so, is it disabled?

Re: Router detection of NICs

Posted: Fri May 18, 2012 4:20 am
by bluemoon
Have you try elimiate the router and try direct connection from PC to PC?
some router may filter traffic by associate MAC address with static/cached IP - so the router may assume you using the same IP as ubuntu and filter other IP packets automatically - try hard reset the router may solve this.

furthermore, expensive router may filter multicast packets and you need to send the IGMP packets to join a group.

Re: Router detection of NICs

Posted: Fri May 18, 2012 5:18 am
by Jezze
Thanks for all the suggestions!

@mateuszb:

1, No I haven't checked that but I will do that today and see what it says. It would surprise me if it said off though.
2, I tried to send an announcement yesterday. What I did was that I sent an arp request (operation=1) with SPA=TPA and with both THA=0 and THA=SHA. For the ethernet frame I was not sure at all what to send and I couldn't find any information on that so I tried THA=0 and THA=SHA. Which is the correct one? I also tried sending with THA=the MAC of the router for both the ethernet frame and arp packet.
3, I don't think so but I will doublecheck.

@bluemoon: The thing is my damn switch died on me a while back so I have to use a router right now. I'll try to check what you said.