Ask Your Question
0

Ethernet Frame capture problem !!

asked 2018-08-09 15:16:28 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hello,

i will start by explaining what i'm trying to do with Wireshark. i'm working on implementing an Ethernet 802.3 driver on a Microcontroller (for this part every think work as it should) and this Micro is connected to PHY (Transceiver) to be able to transmit the Ethernet frame on the bus.

The Transceiver has a test mode that allow the test of the transmission and the reception of frame without the need of the Ethernet Bus by directly connecting the Tx output of the transceiver to the Rx input. i was able to make sure that the Transmission and the reception are working correctly.

i'm did not implement any TCp/IP or UDP stack until now and for testing i have a frame in this format:

| MAC Dest 6 Bytes | MAC Source 6 Bytes | Eth Type 2 Bytes (0x80)| Frame Data 46 Bytes | Check Sum 4 Bytes |

In the Frame data field i had just a counter form 1 to 46.

Now, What i'm trying to do is to transmit this frame format to my laptop and try to capture it with wireshark. but, when i search in the captured frames and filter it with the MAC address of my Micro i don't see any RX frame received from this MAC address.

My question is the fact that my frame format don't has any TCP/IP or UDP protocol Wireshark is not able to capture it or what ?

and what should i add to my frame to be able to test at least my reception.

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-08-09 15:30:57 +0000

Eddi gravatar image

Your post mentions an Ethertype of 0x80 (not a typo?). It is possible that your NIC has dropped the frame before Wireshark had a chance to capture it. If the frame makes it to Wireshark it will show up in your packet list with an indicator that the protocol is unknown.

On modern computers a lot of network functionality is offloaded to a service processor on the NIC. There are still several methods to verify the transmission of the frame. Here a few hints:

  • First, verify, that non-IP traffic is captured by Wireshark (like STP, LLDP etc.).
  • Check the switch counters. This is easy with a dedicated switch with no other systems attached. Make sure that all management protocols like STP or CDP are disabled to avoid clutter.
  • If you use Ethertype 0x800, try to create a reasonable IP header with proper destination IP address.
  • Try to disable offloading for the network card.

Good luck!

edit flag offensive delete link more

Comments

thaks Eddi for you replay,

i will change the EtherType to 46 because at the moment i just need to test the reception with just 46 bytes of data. For the offloaded service on the NIC, when i did my first test my laptop was directly connected to the Micro but even when i the transmission from the Micro was disable wireshark detect a lot of trafic and i think this because the offloaded services are active, so thanks for mentioning that ;) .

can you give me a link to help me disabling the offloaded services, i'm on Win10

AhmedRej gravatar imageAhmedRej ( 2018-08-09 16:31:28 +0000 )edit

i will change the EtherType to 46 because at the moment i just need to test the reception with just 46 bytes of data.

The two-octet field after the source MAC address is called the "Length/Type" field in IEEE Std 802.3-2015. It's only an EtherType if it has a value greater than or equal to 1536; if it has a value less than or equal to 1500, it indicates the length of the frame, not the type. (If it's between 1501 and 1535, it's not a valid frame.)

If you're going to set the Length/Type field to 0x80, you need 0x80 = 128 bytes of payload after the Length/Type field, so your frame must have 6 octets of destination, 6 octets of source, 2 octets of Length/Type, 128 octets of payload, and 4 octets of CRC, for a total of 146 octets ...(more)

Guy Harris gravatar imageGuy Harris ( 2018-08-09 17:51:25 +0000 )edit

Thanks haŕris for the détails. For ou test i just need 46 bytes of data in the frame.

AhmedRej gravatar imageAhmedRej ( 2018-08-10 05:56:40 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-09 15:16:28 +0000

Seen: 58 times

Last updated: Aug 09