Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direct ethernet server sets source MAC to bogus value #268

Closed
DanielSank opened this issue Nov 19, 2015 · 8 comments
Closed

direct ethernet server sets source MAC to bogus value #268

DanielSank opened this issue Nov 19, 2015 · 8 comments
Labels

Comments

@DanielSank
Copy link
Member

Using Wireshark on the new Windows7 version of redheatdos, we find that the packets sent from the direct ethernet server, when the FPGA server enumerates boards, have source MAC set to 00:00:00:00:00:00. This is obviously not the real MAC of NIC.

Aside: Interestingly, the FPGA server does manage to enumerate the FPGA boards (with the correct build numbers). However, when we next try to runt he PLL init command, the associated collect call on the direct ethernet server times out. The board bringup works too.

@DanielSank DanielSank added the bug label Nov 19, 2015
@maffoo
Copy link
Contributor

maffoo commented Nov 19, 2015

You've crossed out the bit about the PLL failing; does that mean it works now? As for the source MAC address, I don't think that should matter. Unfortunately pcap does not reliably find MAC addresses for network interfaces. The server uses the MAC if it gets one, but if not it just nulls out the source MAC when sending. It will still capture response packets because it puts the NIC into promiscuous mode and only filters based on the source MAC of the response packet (the fpga MAC).

@DanielSank
Copy link
Member Author

How does the switch know that 00:00:00:00:00:00 goes to the NIC if that's not the NIC's real MAC? I believe @ejeffrey already explained this to me last week but I've forgotten.

@DanielSank
Copy link
Member Author

You've crossed out the bit about the PLL failing; does that mean it works now?

Yeah, we were doing something silly.

@ejeffrey
Copy link
Contributor

Once the DE server sends a packet with MAC all zeros, the switch associates
that port with that address. I don't believe all zeros has any special
meaning (broadcast is all ones). It shouldn't matter, although if the
call to get the MAC address is failing, that concerns me that something
else is wrong.

On Wed, Nov 18, 2015 at 9:35 PM, Daniel Sank [email protected]
wrote:

How does the switch know that 00:00:00:00:00:00 goes to the NIC if that's
not the NIC's real MAC? I believe @ejeffrey https://github.com/ejeffrey
already explained this to me last week but I've forgotten.


Reply to this email directly or view it on GitHub
#268 (comment)
.

@DanielSank
Copy link
Member Author

@ejeffrey according to my super sayan Google-fu skills, a MAC of all zeroes is not special.

if the call to get the MAC address is failing, that concerns me that something else is wrong.

We have a test rig mostly up and running now :D Props to @jrainbo for the PSU.

@DanielSank
Copy link
Member Author

@maffoo do we close this as wontfix?

@maffoo
Copy link
Contributor

maffoo commented Dec 4, 2015

Actually, I have a fix for this but I need to test it. It turns out the JDK itself has an interface for getting MAC addresses that bypasses pcap and takes core of the differences between platforms.

@maffoo
Copy link
Contributor

maffoo commented Dec 4, 2015

So, I played around with this for a bit and it is possible to use the java.net.NetworkInterface class from the java standard library to get MAC addresses for interface cards on windows. However, the list of devices enumerated by that class does not match up with what pcap4j finds, and both the name and description fields of devices found by the two methods also differ, so there's no way to reliably tell which MAC goes with which pcap device. I've raised an issue about this with pcap4j (kaitoy/pcap4j#49) and pushed my code to the u/maffoo/de-cap branch in case anyone wants to play with this. But given that it doesn't actually affect communication with the boards I'm going to close for now.

@maffoo maffoo closed this as completed Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants