This article covers the basics of automotive Ethernet. In Part 1, we explained the Automotive Ethernet PHY.

 

In Part 2, I will explain the in-vehicle Ethernet Switch.

What is an Ethernet Switch?

An Ethernet Switch is a device used to build a network using Ethernet. It has multiple ports and has the role of controlling the transfer of MAC frames. The Ethernet PHY plays the role of layer 1 in the OSI reference model, but the Ethernet switch mainly plays the role of layer 2 and is sometimes called Layer 2 Switch.

About Ethernet Switch processing flow

Ethrnet Switch can be roughly divided into three blocks: Ingress, Packet Buffer, and Egress. MAC frames are processed and forwarded in these blocks. The main functions are shown in the figure.

 

About MAC frames

In Ethernet communication, communication is performed according to MAC frames. A MAC frame is structured as shown in the figure. The Ethernet Switch determines the transfer destination by referring to the contents of the MAC frame.

Transfer method of Ethernet Switch

The Ethernet Switch has a table that manages MAC addresses, called the MAC address table or ARL table. There is a method of registering the MAC address in advance in the MAC address table, or learning the source MAC address from the received MAC frame. Since the connected ECU is not changed inside the vehicle, it is generally used in a static method that is registered in advance.

Broadcast

Broadcast is a method of forwarding to all nodes belonging to the same VLAN on the same network. Broadcast is performed for MAC frames whose destination MAC address is FF:FF:FF:FF:FF:FF.

Unicast

Unicast is a method of forwarding only to the specified destination MAC address. However, this is limited to cases where the destination information is registered in the MAC address table of the Switch. If the destination is unknown, the behavior is called Flooding, which is the same behavior as Broadcast.

MAC address unregistered or before learning
MAC address registered

Multicast

Multicast is a method of forwarding to multiple destinations. If bit40 of the MAC address is 1, it is called a multicast address and is used for multicast. When a packet with a registered multicast address is received, it is forwarded only to the specified multiple ports. If not registered, the packet will be discarded or flooded according to the specifications of the device.

 

About VLANs

 

VLAN is an abbreviation for Virtual Local Area Network. There is a way to divide the network physically, but by using VLAN, it is possible to divide the network virtually with one Switch. When using VLAN, communication will be performed within the same VLAN ID. IP communication (the role of layer 3 in the OSI reference model) is required to communicate with different VLAN IDs.

About QoS

QoS (Quality of Service) is a technology for controlling bandwidth and priority according to the priority of packets. Received packets are stored in a part called transmission queue before transmission. Bandwidth limitation and priority control are performed by using the transmission queue according to the packet priority. It is common to use VLAN tag PCP to specify packet priority. After that, Shaper and Scheduler will perform bandwidth limitation and priority control.

Shaper

Shaper is a function that limits the bandwidth on the output side (Egress) of the Ethernet Switch. Packets that exceed the bandwidth limit are temporarily held in the buffer, but packets that cannot be held are discarded.

Scheduler

The operation of each mode of Scheduler is described below.

・Strict Priority

They are transferred in order of priority.

・Round Robin

Packets of each priority are forwarded one packet at a time.

・Weighted Round Robin

The specified number of packets are forwarded for each priority.

 

Strict Priority
round robin
Weighted Round Robin

Policer

Policer is a function that restricts bandwidth on the input side (Ingress) of Ethernet Switch for specific packets. Packets exceeding the limited bandwidth are discarded. Generally, Shaper limits bandwidth for each transmission port/queue, while Policer limits bandwidth for specific packets.

About next time

In Episode 3, I will describe the evaluation using Media Converter.

Click here for recommended articles