You can edit almost every page by Creating an account and confirming your email.

Realtek Layer 2 Protocols

From EverybodyWiki Bios & Wiki


The Realtek 0x8899 is a proprietary Ethertype used for remote control, loop detection, and CPU packet tagging. The protocol identification is a 4-bit or 8-bit value immediately after the 0x8899 value.

The known protocols are:

The information about these protocols is from confidential documents shared with developer partners, from Linux DSA tag implementation, or by reverse engineering.

Switch CPU tag version 0x9

The Realtek protocol 0x9 is a 4-byte Ethertype tag used for unmanaged switches.

Realtek CPU Tag version 0x9
Offsets Octet 0 1
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 0 Version 0x9 Priority Disable MAC Learn Reserved RX/TX
2 16 EtherType
  • Disable MAC Learn: Disable learning of source MAC address
  • 0x0: Learn source MAC address
  • 0x1: Don't learn source MAC address
  • TX/RX:
    1. TX to CPU: indicate the receive port number
    2. RX from CPU: indicate the forwarding port mask

Switch CPU tag version 0xA

The Realtek protocol 0xA is a 4-byte Ethertype tag used for unmanaged switches. There is no official documentation about this protocol, and even the Linux tag driver was written based on reverse engineering. This CPU tag is supported by Linux DSA since version 5.9[2].

Realtek CPU Tag version 0xA
Offsets Octet 0 1
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 0 Version0xA Reserved RX/TX
2 16 EtherType
  • TX/RX:
    1. TX to CPU: indicate the receive port number
    2. RX from CPU: indicate the forwarding port mask

Switch CPU tag version 0x04

The Realtek protocol 0x04 is an 8-byte Ethertype tag used for unmanaged switches. This CPU tag is supported by Linux DSA since version 5.16[3]

Offsets Octet 0 1
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 0 Version 0x04 Reason
2 16 Enable EFID Enhanced FID Enable Priority Priority Keep VLAN Enable Vlan Disable MAC Learn VIDx
4 32 Allowance RX/TX
6 48 EtherType
  • Reason:
    1. 0x00: packet was forwarded or flooded to CPU
    2. 0x80: packet was trapped to CPU
  • Enable EFID:
    1. 0x0: Don't force EFID
    2. 0x1: Force EFID
  • Enhanced FID, if "Enable EFID" is set
  • Enable Priority:
    1. 0x0: Don't force priority
    2. 0x1: Force priority
  • Priority: if "Enable Priority" is set
  • Keep VLAN: keep VLAN tag format
  • Enable VLAN
    1. 0x0: Don't force VLAN
    2. 0x1: Force VLAN
  • Disable MAC Learn: Disable learning of source MAC address
  • 0x0: Learn source MAC address
  • 0x1: Don't learn source MAC address
  • VIDx: index pointing to VLAN
  • Allowance: Use TX/RX as allowance mask
    1. 0x0: no allowance port mask, TX/RX is the forwarding port mask
    2. 0x1: use TX/RX as allowance port mask (don't forward to any port not set in TX/RX)
  • TX/RX:
    1. TX to CPU: indicate the receive port number
    2. RX from CPU: indicate the forwarding (if "Allowance" is not set) or allowance port mask (if "Allowance" is set)

References

  1. ↑ "RTL8326 Datasheet" (PDF). Retrieved 6 January 2022.
  2. ↑ "net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag · torvalds/linux@efd7fe6". GitHub. Retrieved 2022-01-06.
  3. ↑ "net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag · torvalds/linux@1521d5a". GitHub. Retrieved 2022-01-06.


This article "Realtek Layer 2 Protocols" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Realtek Layer 2 Protocols. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.