12

How can someone distinguish between different packets in the Ethernet protocol? It has no "length" field/area as higher-level protocols use to do so.

Because this protocol has handling in both the physical and the logical scopes, I assume that the distinction is also separated.

Is the logical separation performed using the "EtherType" protocol field? (i.e. obtaining the packet length using the type of the higher-level protocol, that has a length field in it's headers).

Is the physical distinction is simply non-transmission of electrical signals? (To my knowledge, high/low electrical signals are representing 0/1 bits).

14

Although ytti answered, there are some relevant details you may be interested in...

How can someone distinguish between different packets in the Ethernet protocol? It has no "length" field/area as higher-level protocols use to do so.

Actually ethernet has multiple encapsulations:

  • Ethernet II (Typically used for IP, as specified in [RFC 894], is the most common encapsulation): Does not have a length field, instead a type field is used...
       +----+----+------+------+-----+
       | DA | SA | Type | Data | FCS |
       +----+----+------+------+-----+
                 ^^^^^^^^

       DA      Destination MAC Address (6 bytes)
       SA      Source MAC Address      (6 bytes)
       Type    Protocol Type           (2 bytes: >= 0x0600 or 1536 decimal)  <---
       Data    Protocol Data           (46 - 1500 bytes)
       FCS     Frame Checksum          (4 bytes)
  • 802.2 LLC Ethernet: has a length field
       +----+----+------+------+------+------+-----+
       | DA | SA | Len  | LLC  | SNAP | Data | FCS |
       +----+----+------+------+------+------+-----+
                 ^^^^^^^^

       DA      Destination MAC Address (6 bytes)
       SA      Source MAC Address      (6 bytes)
       Len     Length of Data field    (2 bytes: <= 0x05DC or 1500 decimal)  <---
       LLC     802.2 LLC Header        (3 bytes)
       SNAP                            (5 bytes)
       Data    Protocol Data           (46 - 1492 bytes)
       FCS     Frame Checksum          (4 bytes)

Regardless of the existence of 802.2's length field, you can always detect the end of an ethernet frame on the wire by looking for the 96-bit Interframe Gap.

Is the logical separation performed using the "EtherType" protocol field? (i.e. obtaining the packet length using the type of the higher-level protocol, that has a length field in it's headers).

By logical separation, I assume you mean separation between different protocols carried inside ethernet, such is distinguishing between IPv4, IPv6 or perhaps Spanning-Tree Frames.

  • Ethernet II normally uses the Type field
  • 802.2 LLC Ethernet normally uses the five-byte 802.2 Ethernet SNAP extension. Protocols are only decoded with the SNAP extension when the 802.2 DSAP / SSAP bytes are 0xAAAA.

Is the physical distinction is simply non-transmission of electrical signals? (To my knowledge, high/low electrical signals are representing 0/1 bits)

Simplistically, yes there is a 96-bit gap between Ethernet frames; however, note that ethernet uses an 8b/10b encoding (FastEthernet) and 64b/66b encoding (GigabitEthernet), so it's not technically correct to say the "non-transmission of electrical signals", since 8b/10b doesn't have a "silent" state.


For the curious, I'm also linking to the original Ethernet Version 2 spec.

7

Ethernet has preamble and start frame delimiter at start and at end it has 'IFG' or inter-frame-gap. These are used to determine start and end of frame.

  • Is it a separation in the physical or the logical scope? However, what if the protocol's data field will include information/characters/signals that are same to the start/end delimiters? – Reflection Nov 4 '13 at 14:18
  • 1
    Gap is quite literally just that, there isn't risk of finding it in payload. However in some other, non-ethernet context this is a worry and can be fixed by making sure that some symbols are never used to encode data, but only for signalling, it would however decrease efficiency to waste some symbols for 'non-useful' data. – ytti Nov 4 '13 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.