fpga4fun ethernet

Hi

I've just read through the page. Found one problem:

// IP header 7'h14: pkt_data

Reply to
Paul
Loading thread data ...

You've come across the difference between Ethernet II and IEEE802.3.

Ethernet II frame:

Dest Addr (6 bytes) Src Addr (6 bytes) Ethertype (2 bytes, 0800 for IPv4) Data FCS (4 bytes)

IEEE802.3 SNAP frame: Dest Addr (6 bytes) Src Addr (6 bytes) Length (2 bytes) DSAP (1 byte) SSAP (1 byte) CTRL (1 byte) OUI (3 bytes) type (2 bytes) Data FCS (4 bytes)

Note that the Ethertype fields have values that are (usually) greater than the maximum frame length, so that (usually) there is no ambiguity. I say usually because jumbo Ethernet frames can have lengths up to 9k bytes or so, and some Ethertypes have values less than 9k. This is probably why jumbo ethernet frames always use Ethernet II framing (and are not approved by the IEEE).

BTW, you could try reading the IETF RFC that describes how to encapsulate IPv4 in ethernet frames (rather than relying on Tanenbaum). I don't recall the RFC number, but I'm sure you know how to use a search engine.

formatting link

Regards, Allan.

Reply to
Allan Herriman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.