This application claims priority to and the benefit of Korean Patent Application No. 10-2019-0065635, filed on Jun. 3, 2019, the disclosure of which is incorporated by reference in its entirety.

BACKGROUND

1. Technical Field of the Disclosure

The disclosure relates to an Ethernet switch provided in a vehicle, a control method thereof, and more particularly, to an Ethernet switch that improves security authentication using an external diagnostic device.

2. Description of the Related Art

With the development of automotive electronics, the number and complexity of controllers provided in a vehicle increases. Due to the corresponding increase in collaboration among the controllers for automotive electronics, the amount of communication data increases, as well. For communication between these controllers, various communication protocols, such as controller area networks with flexible data-rate (CAN-FD) and Ethernet, are employed to manage the data.

The communication protocols handle a substantial amount of data at relatively high speed. Systemwide, data and processing loads are increasing. For instance, a need has arisen to apply the Ethernet to vehicles for rapid controller reprogramming as well as for meeting requirements for image processing. An Ethernet switch is required for Ethernet communication between controllers in a vehicle.

A developed technique transfers Ethernet packets transmitted from an electronic control unit (ECU) directly to another ECU but does not transfer Ethernet packets transmitted from the ECU to another ECU via a micro control unit (MCU) of an Ethernet switch. In other words, when an external device is connected to the Ethernet switch, the external device is able to access the ECU of the vehicle without any limitation. As a result, security of the system is compromised and the system as a whole may be vulnerable.

SUMMARY

The present disclosure provides an Ethernet switch for a vehicle and a control method thereof, which improve security when performing authentication using an external diagnostic device by providing security technology that combines certificate-based secure access control technology with port-based virtual local area network (VLAN) technology.

In accordance with an exemplary embodiment of the present disclosure, a method of controlling an Ethernet switch for a vehicle may include detecting a first connection between a connector of a diagnostic device and a first port of the Ethernet switch; establishing a second connection between the diagnostic device and a controller of the Ethernet switch by referring to a virtual local area network identifier (VLAN ID) table; and establishing a third connection between the controller and an electronic control unit (ECU) in the vehicle by referring to the VLAN ID table. The method may further include performing a certificate-based secure access procedure between the diagnostic device and the controller; and switching a mode of the Ethernet switch from a lock mode to an unlock mode. The method may also include establishing a fourth connection between the diagnostic device and the ECU by referring to the VLAN ID table.

The method may further include, when a diagnostic session of the diagnostic device terminates or the connector of the diagnostic device is disconnected from the first port, switching the mode of the Ethernet switch to the lock mode and releasing the fourth connection between the diagnostic device and the ECU. The establishing of the second connection between the diagnostic device and the controller may include assigning a first VLAN ID to each of the first port to which the diagnostic device is connected and a second port to which the controller is connected The establishing of the third connection between the controller and the ECU may include assigning a second VLAN ID to each of the second port to which the controller is connected and a third port to which the ECU is connected.

Additionally, the establishing of the fourth connection between the diagnostic device and the ECU may include further assigning the first VLAN ID to the third port to which the ECU is connected. The method may further include transmitting an Ethernet packet transmitted from the diagnostic device directly to the ECU after establishing the fourth connection between the diagnostic device and the ECU. The releasing of the fourth connection between the diagnostic device and the ECU may include initializing a VLAN ID assigned to a third port to which the ECU is connected.

The establishing of the second connection between the diagnostic device and the controller may include establishing the second connection between the diagnostic device and the controller using an address resolution protocol (ARP) and a transmission control protocol (TCP). Additionally, the establishing of the fourth connection between the diagnostic device and the ECU may include establishing the fourth connection between the diagnostic device and the ECU using an address resolution protocol (ARP) and a transmission control protocol (TCP).

The performing of the certificate-based secure access procedure may include: receiving a certificate from the diagnostic device; verifying the certificate with a public key of an authentication server previously stored in a memory, and obtaining a public key of the diagnostic device; and transmitting a symmetric key encrypted based on the public key of the diagnostic device to the diagnostic device.

In accordance with an exemplary embodiment of the present disclosure, an Ethernet switch for a vehicle may include: a plurality of ports and a controller including a memory and a processor including a virtual local area network identifier (VLAN ID) table. The controller may be configured to detect a first connection between a connector of the diagnostic device and a first port of the Ethernet switch and establish a second connection with the diagnostic device by referring to the VLAN ID table. The controller may be further configured to establish a third connection between the controller and an electronic control unit (ECU) in the vehicle by referring to the VLAN ID table and perform a certificate-based secure access procedure between the diagnostic device and the controller.

The controller may be configured to switch a mode of the Ethernet switch from a lock mode to an unlock mode, and establish a fourth connection between the diagnostic device and the ECU by referring to the VLAN ID table. When a diagnostic session of the diagnostic device terminates or the connector of the diagnostic device is disconnected from the first port, the controller may be further configured to switch the mode of the Ethernet switch to the lock mode and release the fourth connection between the diagnostic device and the ECU.

The controller may be configured to assign a first VLAN ID to each of the first port to which the diagnostic device is connected and a second port to which the controller is connected. The controller may further be configured to assign a second VLAN ID to each of the second port to which the controller is connected and a third port to which the ECU is connected. Additionally, the controller may be configured to assign the first VLAN ID to the third port to which the ECU is connected. Further, the controller may be configured to initialize the VLAN ID assigned to a third port to which the ECU is connected and establish the second connection with the diagnostic device using an address resolution protocol (ARP) and a transmission control protocol (TCP).

Additionally, the controller may be configured to establish the fourth connection between the diagnostic device and the ECU using an address resolution protocol (ARP) and a transmission control protocol (TCP). Further, the controller may be configured to receive a certificate from the diagnostic device The controller may be configured to verify the certificate with a public key of an authentication server previously stored in a memory and obtain a public key of the diagnostic device. The controller may be configured to transmit a symmetric key encrypted based on the public key of the diagnostic device to the diagnostic device. The memory may further include a media access control (MAC) address table storing MAC addresses respectively corresponding to the plurality of ports.

