Ethernet switch and control method thereof
By combining certificate access control and VLAN technology, using the VLAN ID table and ARP/TCP protocol, the security problem of the Ethernet switch when connecting external devices is solved, the security authentication and access control of the vehicle system are realized, and the system's security is enhanced. Anti-attack capability.
Patent Information
- Application Number
- CN201911191326.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-03
- Filing Date
- 2019-11-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing Ethernet switches cannot effectively ensure the security of vehicle systems when external devices are connected, making the system vulnerable to attacks.
Using a combination of certificate-based security access control technology and port-based virtual LAN (VLAN) technology, the virtual LAN identifier (VLAN ID) table and address resolution protocol (ARP) and transmission control protocol (TCP) are used in diagnostic equipment and electronic devices. Establish a secure connection between control units (ECUs), perform a certificate-based secure access process, and switch the mode of the Ethernet switch to lock or unlock to ensure security.
It improves the security of Ethernet switches when connecting external diagnostic devices, prevents unauthenticated access, enhances the system's anti-attack capabilities, and allows automatic management of external device access rights to vehicle systems.
Smart Images

Figure CN112039656B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an Ethernet switch provided in a vehicle and a control method thereof, and more particularly, to an Ethernet switch that uses an external diagnostic device to improve security authentication. Background Art
[0002] As automotive electronics advance, the number and complexity of controllers provided in vehicles are increasing. Due to the corresponding increase in collaboration between controllers for automotive electronics, the amount of communication data is also increasing. For communication between these controllers, various communication protocols such as controller area network with flexible data rate (CAN-FD) and Ethernet are adopted to manage data. Communication protocols handle large amounts of data at relatively high speeds. System-wide, data and processing loads are increasing. For example, there has been a demand to apply Ethernet to vehicles for fast controller reprogramming and to meet image processing requirements. Ethernet switches are required for Ethernet communication between vehicle controllers.
[0003] A technology has been developed that directly transmits Ethernet packets transmitted from an electronic control unit (ECU) to another ECU, but does not transmit Ethernet packets transmitted from an 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 can access the vehicle's ECU without restriction. As a result, the security of the system is compromised and the entire system may be vulnerable to attacks. Summary of the invention
[0004] The present invention provides an Ethernet switch for a vehicle and a control method thereof, which improves security when performing authentication using an external diagnostic device by providing a security technology that combines a certificate-based secure access control technology with a port-based virtual local area network (VLAN) technology.
[0005] According to an exemplary embodiment of the present invention, a method for controlling an Ethernet switch of 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; 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 process between the diagnostic device and the controller; and switching a mode of the Ethernet switch from a locked mode to an unlocked mode. The method may also include establishing a fourth connection between the diagnostic device and the ECU by referring to the VLAN ID table.
[0006] The method may further include: when the diagnostic session of the diagnostic device is terminated or the connector of the diagnostic device is disconnected from the first port, switching the mode of the Ethernet switch to a lock mode and releasing the fourth connection between the diagnostic device and the ECU. The step of establishing a second connection between the diagnostic device and the controller may include: assigning a first VLAN ID to each of a first port connected to the diagnostic device and a second port connected to the controller. The step of establishing a third connection between the controller and the ECU may include assigning a second VLAN ID to each of a second port connected to the controller and a third port connected to the ECU.
[0007] In addition, the step of establishing a fourth connection between the diagnostic device and the ECU may include: further assigning the first VLAN ID to a third port connected to the ECU. The method may further include, after establishing the fourth connection between the diagnostic device and the ECU, directly sending the Ethernet data packet sent from the diagnostic device to the ECU. The step of releasing the fourth connection between the diagnostic device and the ECU may include initializing the VLAN ID assigned to the third port connected to the ECU.
[0008] The step of establishing a 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). In addition, the step of establishing a fourth connection between the diagnostic device and the ECU may include establishing a fourth connection between the diagnostic device and the ECU using an address resolution protocol (ARP) and a transmission control protocol (TCP).
[0009] The execution of the certificate-based security access process may include: receiving a certificate from the diagnostic device; verifying the certificate using the public key of the authentication server pre-stored in the memory and obtaining the public key of the diagnostic device; and sending a symmetric key encrypted based on the public key of the diagnostic device to the diagnostic device.
[0010] According to an exemplary embodiment of the present invention, an Ethernet switch for a vehicle may include: a plurality of ports and a controller including a memory and a processor having a virtual local area network identifier (VLAN ID) table. The controller may be configured to detect a first connection between a connector of a 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 process between the diagnostic device and the controller.
[0011] The controller may be configured to switch the mode of the Ethernet switch from the locked mode to the unlocked mode, and establish a fourth connection between the diagnostic device and the ECU by referring to the VLAN ID table. When the diagnostic session of the diagnostic device is terminated 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 locked mode, and release the fourth connection between the diagnostic device and the ECU.
[0012] The controller may be configured to assign a first VLAN ID to each of a first port connected to the diagnostic device and a second port connected to the controller. The controller may be further configured to assign a second VLAN ID to each of a second port connected to the controller and a third port connected to the ECU. In addition, the controller may be configured to assign the first VLAN ID to the third port connected to the ECU. In addition, the controller may be configured to initialize the VLAN ID assigned to the third port connected to the ECU using an address resolution protocol (ARP) and a transmission control protocol (TCP), and establish a second connection with the diagnostic device.
[0013] In addition, the controller may be configured to establish a fourth connection between the diagnostic device and the ECU using an address resolution protocol (ARP) and a transmission control protocol (TCP). In addition, the controller may be configured to receive a certificate from the diagnostic device. The controller may be configured to verify the certificate using a public key of an authentication server pre-stored in the memory and obtain the public key of the diagnostic device. The controller may be configured to send a symmetric key encrypted based on the public key of the diagnostic device to the diagnostic device. The memory may further include a MAC address table storing media access control (MAC) addresses corresponding to a plurality of ports, respectively. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] These and / or other features of the present invention will become more apparent and more easily understood from the following description of exemplary embodiments in conjunction with the accompanying drawings.
[0015] Figure 1 shows a configuration of an Ethernet switch according to an exemplary embodiment of the present invention;
[0016] Figure 2 shows a connection between a controller of an Ethernet switch and a diagnostic device according to an exemplary embodiment of the present invention;
[0017] Figure 3 shows a connection between a diagnostic device and an electronic control unit (ECU) in a vehicle through an Ethernet switch according to an exemplary embodiment of the present invention;
[0018] Figure 4An example of a virtual local area network identifier (VLAN ID) assigned to each port before performing a certificate-based secure access process according to an exemplary embodiment of the present invention is shown;
[0019] Figure 5 shows an example of VLAN IDs assigned to respective ports after performing a certificate-based security access process according to an exemplary embodiment of the present invention; and
[0020] Figure 6 is a flowchart for describing a method of controlling an Ethernet switch according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0021] The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used herein, the singular forms "a", "an" and "the" are also intended to include plural forms unless the context clearly indicates otherwise. It will be further understood that when used in this specification, the terms "comprise" and / or "include" specify the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or combinations thereof. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0022] It should be understood that the term "vehicle" or "vehicle-mounted" or other similar terms used herein include general motor vehicles, such as passenger cars including sport utility vehicles (SUVs), buses, trucks, various commercial vehicles, water craft including various ships, boats, aircraft, etc., and include hybrid vehicles, electric vehicles, plug-in hybrid electric vehicles, hydrogen-powered vehicles and other alternative fuel vehicles (e.g., fuels obtained from resources other than petroleum).
[0023] The use of the terms “first” to “fourth” is provided herein to identify operations without describing the order of the operations, and the operations may be performed in an order different from the described order unless a specific order is clearly specified in the context.
[0024] Although at least one exemplary embodiment is described as using multiple units to perform the exemplary process, it should be understood that the exemplary process can also be performed by one or more modules. In addition, it should be understood that the term controller / control unit can refer to a hardware device including a memory and a processor. The memory can be configured to store the module, and the processor can be specifically configured to execute the module to perform one or more processes, which will be further described below.
[0025] In addition, the control logic of the present invention may be implemented as a non-transitory computer readable medium on a computer readable medium containing executable program instructions executed by a processor, a controller / control unit, etc. Examples of computer readable media include, but are not limited to, ROM, RAM, compact disk (CD)-ROM, magnetic tape, floppy disk, flash drive, smart card, and optical data storage device. The computer readable medium may also be distributed in a network coupled computer system so that the computer readable medium is stored and executed in a distributed manner, for example, by a telematics server or a controller area network (CAN).
[0026] Hereinafter, like reference numerals will refer to like parts throughout the specification. This specification does not describe all components of the exemplary embodiment, and will not describe general information in the technical field to which the present invention pertains or repeated information between exemplary embodiments.
[0027] It will be understood that when a component is referred to as being "connected" to another component, it may be directly or indirectly connected to the other component. When a component is indirectly connected to another component, it may be connected to the other component via a wireless communication network. In addition, it will be understood that when a specific part "includes" a specific component, unless the context clearly indicates otherwise, the part does not exclude another component but may further include another component.
[0028] In addition, the terms "part", "device", "block", "component" and "module" used herein refer to a unit for processing at least one function or operation, including a unit configured to process at least one function or operation. For example, these terms may represent a circuit, or may represent at least one process that can be processed by at least one hardware stored in a memory or at least one software / processor.
[0029] Reference numerals used in the operations are provided to identify the operations without necessarily describing the order of the operations, and the operations may be performed in an order different from that described unless a particular order is clearly specified in the context.
[0030] Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0031] Figure 1 FIG. 2 shows a configuration of an Ethernet switch for a vehicle according to an exemplary embodiment of the present invention. Figure 1, the Ethernet switch 10 according to an exemplary embodiment of the present invention may include a plurality of ports 100 and a controller 200. A plurality of devices in a vehicle, such as a diagnostic device 20 and a plurality of electronic control units (ECUs) 31, 32, and 33 in the vehicle, may be connected to the plurality of ports 100. In addition, the controller 200 may also be connected to one of the plurality of ports 100. The diagnostic device 20 and the controller 200 may be configured to communicate with each other via the port 100. In addition, the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 may also be configured to communicate with each other via the port 100. Figure 1 , five ports 100 are shown, but the number of ports 100 is not limited thereto.
[0032] The controller 200 may include: at least one processor 210 for executing a program related to the operation of the Ethernet switch 10; and at least one memory 220 in which the program is stored. The memory 220 and the processor 210 included in the controller 200 may be integrated in one chip, or may be physically separated. The controller 200 may be a micro control unit (MCU).
[0033] The memory 220 may include a virtual local area network identifier (VLAN ID) table. In addition, the memory 220 may include a media access control (MAC) address table in which MAC addresses corresponding to the ports 100 are respectively stored. Based on the MAC address table in which the MAC addresses and port numbers are recorded, the Ethernet switch 10 may send an Ethernet packet to a port to which a device having a destination MAC address is connected.
[0034] In addition, the memory 220 can be implemented as a non-volatile storage device (e.g., cache, read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), and flash memory), a volatile storage device (e.g., random access memory (RAM)), or a storage medium such as a hard disk drive (HDD) and a compact disk read-only memory (CD-ROM) to store various programs, data, and / or information.
[0035] The Ethernet switch 10 may be part of layer 2 of open system interconnection (OSI) layer 7. A typical Ethernet switch checks a destination MAC address when sending an Ethernet packet. Therefore, in the conventional technology, an Ethernet packet corresponding to an external device sent from a diagnostic device may be directly sent to a plurality of ECUs in a vehicle, rather than being sent via a controller of the Ethernet switch.
[0036] Generally, when a diagnostic device is connected to an Ethernet switch, the diagnostic device can access the ECU without any restrictions. In other words, the diagnostic device can access the ECU in the vehicle without being authenticated by the controller. In particular, security may be vulnerable to attacks.
[0037] In at least one exemplary embodiment of the present invention, the security of the Ethernet switch 10 can be improved by applying certificate-based secure access control technology and port-based VLAN technology to the Ethernet switch 10. The Ethernet switch 10 for a vehicle has been described above, but the application of the Ethernet switch 10 is not limited to vehicles.
[0038] Hereinafter, a method for controlling an Ethernet switch according to an exemplary embodiment of the present invention will be described in detail. Figure 2 A connection between a controller of an Ethernet switch and a diagnostic device according to an exemplary embodiment of the present invention is shown. Figure 3 A connection between a diagnostic device and an electronic control unit (ECU) in a vehicle via an Ethernet switch according to an exemplary embodiment of the present invention is shown.
[0039] The controller 200 of the Ethernet switch 10 according to an exemplary embodiment of the present invention may be configured to detect a connection between a connector of the diagnostic device 20 and a first port of the Ethernet switch 10. The controller 200 may be configured to establish a connection with the diagnostic device 20 by referring to the VLAN ID table. In addition, the controller 200 may be configured to establish a connection between the controller 200 and ECUs 31, ECU 32, and ECU 33 in the vehicle by referring to the VLAN ID table.
[0040] The controller 200 may be configured to establish a connection between the diagnostic device 20 and the controller 200 using an address resolution protocol (ARP) and a transmission control protocol (TCP). In addition, the controller 200 may be configured to establish a connection between the diagnostic device 20 and ECU 31, ECU 32, and ECU 33 in the vehicle using ARP and TCP. ARP is an example of an address determination protocol that is used to bind an Internet Protocol (IP) address to a physical network address using a network. The physical network address may be a 48-bit network card address of an Ethernet.
[0041] TCP is a protocol used by the transport layer between the network layer. TCP can be a connection type service used to establish a connection between devices to establish a logical connection between devices and guarantee reliability. TCP can be configured to establish a connection using a 3-way handshake process and release the connection using a 4-way handshake. Establishing a connection using TCP ensures that both parties (e.g., two devices) are ready to transfer data and provides a ready status notification before actually starting to transfer data.
[0042] The Ethernet switch 10 may be configured to perform a certificate-based secure access process between the diagnostic device 20 and the controller 200. When the authentication of the diagnostic device 20 is completed, the controller 200 of the Ethernet switch 10 may be configured to switch the mode of the Ethernet switch 10 from the locked mode to the unlocked mode, and establish a connection between the diagnostic device 20 and the ECUs 31, 32, and 33 in the vehicle. Thereafter, the diagnostic device 20 may be configured to access the ECUs 31, 32, and 33 in the vehicle.
[0043] Before executing the certificate-based secure access process, the diagnostic device 20 may be able to access the controller 200 of the Ethernet switch 10. In particular, an on-board diagnostic (OBD) supervisory diagnostic function or an original equipment manufacturer (OEM) universal diagnostic function may be performed. In other words, the lock mode does not necessarily completely disable the device. For example, in an exemplary embodiment, even after the mode of the Ethernet switch 10 is switched to the lock mode, the OBD supervisory diagnostic function or the OEM universal diagnostic function may continue to be performed.
[0044] After executing the certificate-based security access procedure, the diagnostic device 20 can be configured to access ECU 31, ECU 32, and ECU 33 in the vehicle. In particular, all diagnostic functions including the OBD supervisory diagnostic function can be performed. In addition, additional security procedures for diagnostic functions can be performed by ECU 31, ECU 32, and ECU 33.
[0045] The certificate-based security access process may include performing a series of processes instead of using a seed and key process (challenge and response process) that combines multiple bytes. For example, the series of processes may include sending a certificate stored in the diagnostic device 20 to the Ethernet switch 10, verifying the certificate using a public key of an authentication server stored in the Ethernet switch 10, obtaining a public key of the diagnostic device, and sending a symmetric key encrypted by the Ethernet switch 10 to the diagnostic device 20 based on the public key of the diagnostic device 20.
[0046] Afterwards, the diagnostic device 20 may be configured to obtain the symmetric key sent from the Ethernet switch 10 using the private key of the diagnostic device 20. The Ethernet switch 10 may be configured to exchange ciphertext with the diagnostic device 20 by using the symmetric key. On the other hand, when the diagnostic session of the diagnostic device 20 is terminated or the connector of the diagnostic device 20 is disconnected from the first port, the controller 200 may switch the mode of the Ethernet switch 10 to the lock mode and disconnect the connection between the diagnostic device 20 and the ECUs 31, 32, and 33.
[0047] Figure 4 An example of the VLAN IDs assigned to individual ports before the certificate-based secure access process is performed is shown. Figure 5 Shows an example of the VLAN IDs assigned to individual ports after the certificate-based security access process is performed.
[0048] The controller 200 of the Ethernet switch 10 may be configured to detect a connection between the connector of the diagnostic device 20 and the first port. The controller 200 may be configured to establish a connection between the diagnostic device 20 and the controller 200 by referring to the VLAN ID table, and may establish a connection with the ECU 31, ECU 32, and ECU 33 in the vehicle by referring to the VLAN ID table. Specifically, referring to Figure 4 , the controller 200 of the Ethernet switch 10 can be configured to assign a first VLAN ID ① to each of a first port connected to the diagnostic device 20 and a second port connected to the controller 200, and to assign a second VLAN ID ② to each of a second port connected to the controller 200 and a third port connected to ECU 31, ECU 32 and ECU 33 in the vehicle.
[0049] In other words, before executing the certificate-based security access procedure, the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle may have different VLAN IDs, thereby preventing the diagnostic device 20 from accessing the ECU 31, ECU 32, and ECU 33 in the vehicle. In other words, the controller 200 and the diagnostic device 20 may be grouped based on the first VLAN ID ① and perform communication with each other. The controller 200 and the ECU 31, ECU 32, and ECU 33 in the vehicle 200 may be grouped based on the second VLAN ID ② and may be configured to communicate with each other.
[0050] refer to Figure 5 , after executing the certificate-based security access process, the controller 200 may be configured to switch the mode of the Ethernet switch 10 from the lock mode to the unlock mode, and establish a connection between the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle. The controller 200 may be configured to establish a connection between the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle by referring to the VLAN ID table.
[0051] In particular, the controller 200 may be configured to further assign the first VLAN ID① to a third port connected to the ECU 31, ECU 32, and ECU 33 in the vehicle. Therefore, the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle may be grouped based on the same first VLAN ID①. In other words, the first VLAN ID① assigned to each of the first port connected to the diagnostic device 20 and the second port connected to the controller 200 may be automatically extended to the third port connected to the ECU 31, ECU 32, and ECU 33 in the vehicle.
[0052] Thereafter, the diagnostic device 20 may be configured to access and communicate with the ECUs 31, 32, and 33 in the vehicle. For example, an Ethernet data packet sent from the diagnostic device 20 may be directly sent to the ECUs 31, 32, and 33 in the vehicle via the port 100 of the Ethernet switch 10.
[0053] When the diagnostic session of the diagnostic device 20 is terminated or the connector of the diagnostic device 20 is disconnected from the first port, the controller 200 may be configured to switch the mode of the Ethernet switch 10 to the lock mode and disconnect the connection between the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle. In particular, the controller 200 may be configured to initialize the VLAN ID assigned to the third port connected to the ECU 31, ECU 32, and ECU 33 in the vehicle. In other words, the first VLAN ID ① assigned to the third port connected to the ECU 31, ECU 32, and ECU 33 in the vehicle may be deleted, the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle may be degrouped, and the diagnostic device 20 may be prevented from accessing the ECU 31, ECU 32, and ECU 33 in the vehicle.
[0054] Figure 6 is a flowchart for describing a method for controlling an Ethernet switch according to an exemplary embodiment of the present invention. Figure 6In operation 501, the controller 200 of the Ethernet switch 10 may be configured to detect a connection between a connector of the diagnostic device 20 and a first port. In operation 502-1, the controller 200 may be configured to establish a connection between the diagnostic device 20 and the controller 200 by referring to a VLAN ID table, and in operation 502-2, a connection between the controller 200 and ECU 31, ECU 32, and ECU 33 in the vehicle is established by referring to the VLAN ID table. Thereafter, in operation 503, the controller 200 of the Ethernet switch 10 may be configured to receive a certificate from the diagnostic device 20. In operation 504, the Ethernet switch 10 may be configured to perform a certificate-based security access process between the diagnostic device 20 and the controller 200.
[0055] When the authentication of the diagnostic device 20 is completed, the controller 200 of the Ethernet switch 10 can be configured to switch the mode of the Ethernet switch 10 from the locked mode to the unlocked mode, and in operation 505, change the VLAN ID of the third port connected to the ECU 31, ECU 32 and ECU 33 in the vehicle by further assigning the first VLAN ID① to the third port connected to the ECU 31, ECU 32 and ECU 33 in the vehicle.
[0056] In operation 506, the controller 200 may be configured to establish a connection between the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle. Then, in operation 507, the diagnostic device 20 may be configured to access the ECU 31, ECU 32, and ECU 33 in the vehicle to perform a diagnostic function. The controller 200 may be configured to determine that the diagnostic session of the diagnostic device 20 is terminated or the connector of the diagnostic device 20 is disconnected from the first port.
[0057] In operations 508 and 509, when the diagnostic session of the diagnostic device 20 is terminated or the connector of the diagnostic device 20 is disconnected from the first port, the controller 200 may be configured to switch the mode of the Ethernet switch 10 to the lock mode and change the VLAN ID of the third port connected to the ECU 31, ECU 32, and ECU 33 in the vehicle. The controller 200 may be configured to release the connection between the diagnostic device 20 and the ECU 31, ECU 32, and ECU 33 in the vehicle by initializing the VLAN ID assigned to the third port connected to the ECU 31, ECU 32, and ECU 33 in the vehicle. Therefore, the diagnostic device 20 may be prevented from accessing the ECU 31, ECU 32, and ECU 33 in the vehicle.
[0058] As described above, an Ethernet switch for a vehicle and a control method thereof can improve security when performing authentication using an external device by providing a security technology that combines a certificate-based secure access technology with a port-based VLAN technology of an Ethernet switch.
[0059] In addition, the Ethernet switch for a vehicle and the control method thereof can operate an external device to access the ECU in the vehicle without any other hardware. In addition, the Ethernet switch for a vehicle and the control method thereof can automatically allow or not allow an external device to access the ECU in the vehicle. By adopting this method, the security of the Ethernet switch can be improved, and the Ethernet switch is not vulnerable to attacks.
[0060] The disclosed exemplary embodiments may be implemented in the form of a recording medium that stores programs and / or instructions that can be executed by a computer. The instructions may be stored in the form of program code, and when executed by a processor, the instructions may generate a program module to perform the operations of the disclosed exemplary embodiments. The recording medium may be implemented as a non-transitory computer-readable recording medium. The non-transitory computer-readable recording medium may include all kinds of recording media that store instructions that can be interpreted by a computer. For example, the non-transitory computer-readable recording medium may be a ROM, RAM, a magnetic tape, a magnetic disk, a flash memory, an optical data storage device, etc.
[0061] So far, exemplary embodiments of the present invention have been described with reference to the accompanying drawings. It will be apparent to those skilled in the art that the present invention may be practiced in other forms than the exemplary embodiments described above without changing the technical ideas or basic features of the present invention. The above exemplary embodiments are merely exemplary and should not be interpreted in a limiting sense.
Claims
1. A method for controlling an Ethernet switch of a vehicle, The following steps are involved: detecting, by the controller, a first connection between a connector of a diagnostic device and a first port of the Ethernet switch; The controller establishes a second connection with the diagnostic device by referring to a virtual local area network identifier (VLAN ID) table, and allocates a first VLAN ID to each of the first port connected to the diagnostic device and the second port connected to the controller; establishing, by the controller, a third connection between the controller and an electronic control unit ECU in the vehicle by referring to the VLAN ID table, and assigning a second VLAN ID to each of the second port connected to the controller and the third port connected to the ECU; executing, by the controller, a certificate-based secure access process between the diagnostic device and the controller; After executing the above-mentioned certificate-based secure access process, the controller switches the mode of the Ethernet switch from a locked mode to an unlocked mode; and After the mode of the Ethernet switch is switched to the unlock mode, the controller establishes a fourth connection between the diagnostic device and the ECU by referring to the VLAN ID table, and allocates the first VLAN ID to the third port connected to the ECU.
2. The method according to claim 1, further comprising: The following steps are involved: When the diagnostic session of the diagnostic device is terminated or the connector of the diagnostic device is disconnected from the first port, the controller switches the mode of the Ethernet switch to a locking mode and releases the fourth connection between the diagnostic device and the ECU.
3. The method according to claim 1, further comprising: The following steps are involved: After the fourth connection is established between the diagnostic device and the ECU, the controller directly sends the Ethernet data packet sent from the diagnostic device to the ECU.
4. The method according to claim 2, in, The step of releasing the fourth connection between the diagnostic device and the ECU includes initializing a VLAN ID assigned to the third port connected to the ECU.
5. The method according to claim 1, in, The step of establishing the second connection between the diagnostic device and the controller includes establishing the second connection between the diagnostic device and the controller using an address resolution protocol (ARP) and a transmission control protocol (TCP).
6. The method according to claim 1, in, The step of establishing the fourth connection between the diagnostic device and the ECU includes establishing the fourth connection between the diagnostic device and the ECU by using an address resolution protocol (ARP) and a transmission control protocol (TCP).
7. The method according to claim 1, in, The steps to implement certificate-based security access process include: receiving, by the controller, a certificate from the diagnostic device; The controller verifies the certificate using a public key of an authentication server pre-stored in a memory and obtains a public key of the diagnostic device; and The controller sends a symmetric key encrypted based on the public key of the diagnostic device to the diagnostic device.
8. An Ethernet switch for a vehicle, include: Multiple ports; and A controller including a memory having a virtual local area network identifier VLAN ID table and a processor, Wherein, the controller is configured as: detecting a first connection between a connector of a diagnostic device and a first port of the Ethernet switch; establishing a second connection with the diagnostic device by referring to the VLAN ID table, and assigning a first VLAN ID to each of a first port connected to the diagnostic device and a second port connected to the controller; establishing a third connection between the controller and an electronic control unit ECU in the vehicle by referring to the VLAN ID table, and assigning a second VLAN ID to each of the second port connected to the controller and the third port connected to the ECU; performing a certificate-based secure access process between the diagnostic device and the controller; After executing the above-mentioned certificate-based secure access process, switching the mode of the Ethernet switch from a locked mode to an unlocked mode; and After the mode of the Ethernet switch is switched to the unlock mode, a fourth connection is established between the diagnostic device and the ECU by referring to the VLAN ID table, and the first VLAN ID is allocated to the third port connected to the ECU.
9. The Ethernet switch according to claim 8, in, When the diagnostic session of the diagnostic device is terminated or the connector of the diagnostic device is disconnected from the first port, the controller is configured to switch the mode of the Ethernet switch to the locking mode and release the fourth connection between the diagnostic device and the ECU.
10. The Ethernet switch according to claim 9, in, The controller is configured to initialize a VLAN ID assigned to the third port connected to the ECU.
11. The Ethernet switch according to claim 8, in, The controller is configured to establish the second connection between the diagnostic device and the controller using an address resolution protocol (ARP) and a transmission control protocol (TCP).
12. The Ethernet switch according to claim 8, in, The controller is 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).
13. The Ethernet switch according to claim 8, in, The controller is configured to: receiving a certificate from the diagnostic device; Verifying the certificate using a public key of an authentication server pre-stored in memory; obtaining the public key of the diagnostic device, and The symmetric key encrypted based on the public key of the diagnostic device is sent to the diagnostic device.
14. The Ethernet switch according to claim 8, in, The memory includes a media access control (MAC) address table storing MAC addresses respectively corresponding to the plurality of ports.
15. A non-transitory computer-readable recording medium comprising program instructions executed by a processor, the program instructions being configured to: detecting a first connection between a connector of a diagnostic device and a first port of an Ethernet switch; establishing a second connection with the diagnostic device by referring to a virtual local area network identifier (VLAN ID) table, and assigning a first VLAN ID to each of the first port connected to the diagnostic device and the second port connected to the controller; establishing a third connection between the controller and an electronic control unit ECU in the vehicle by referring to the VLAN ID table, and assigning a second VLAN ID to each of the second port connected to the controller and the third port connected to the ECU; performing a certificate-based secure access process between the diagnostic device and the controller; After executing the above-mentioned certificate-based secure access process, switching the mode of the Ethernet switch from a locked mode to an unlocked mode; and After the mode of the Ethernet switch is switched to the unlock mode, a fourth connection is established between the diagnostic device and the ECU by referring to the VLAN ID table, and the first VLAN ID is allocated to the third port connected to the ECU.
16. The non-transitory computer-readable recording medium according to claim 15, wherein the program instructions, when executed, are further configured to: When the diagnostic session of the diagnostic device is terminated or the connector of the diagnostic device is disconnected from the first port, the mode of the Ethernet switch is switched to a locking mode, and the fourth connection between the diagnostic device and the ECU is released.
