0

I am trying create this type of ethernet frame :

Dest Address ( first bits zero) + Source Address +Source Ip address +Dest IP address +Data

But I dont know Is it neccessary ether type IpV4 08 00 or anything.

I want to communicate pair to pair communication under ethernet protocole so that I want to use unicast packet frame, but how can I use it. How can I prepare the ethernet frame under unicast ? I sourced on the google but I didnt find any usefull things how can I continue ? I have an stm32 lwip and ethernet switch for that purpose.

How can I create unicast point to point ethernet packets please help me

1 Answer 1

0

The usual framing for ethernet is:

dest-MAC source-MAC type/length source-ip dest-ip data ...

(If the type/length field is 1536 or more, it's enterpreted as an ethernet type code, otherwise it's the frame length.)

If you don't use the ethertype field for specifying a type, it may be interpreted as a length field (if less than 1536).

It's probably feasible, with two devices on the same switch or directly connected by cable, to be able to communicate without using the ethertype field correctly (as either ethertype or length). But if I assume you want to communicate at layer 3 or above (hence including IP addresses in your frame), you might encounter routers that fragment/truncate/reject packets where you've put the start of the source IP address where it expects the frame-length/type to be.

You can see the correct frame fields on the Wikepedia page for "Ethernet frame".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .