Network switch and operation method thereof
Patent Information
- Application Number
- TW114112402
- Authority / Receiving Office
- TW · TW
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2045-03-30
AI Technical Summary
Existing network technologies require time-consuming reconfiguration when switching between network channels for executing specific protocols, affecting network stability.
A network switch with a precision time protocol circuit and processor dynamically adjusts VLAN channels based on tag conformity, allowing adaptive execution of precision time protocol procedures.
Enables efficient and adaptive execution of precision time protocol procedures by dynamically configuring VLAN channels, improving network stability and efficiency.
Smart Images

Figure TWG2TA001079888_001 
Figure TWG2TA001079888_002 
Figure TWG2TA001079888_003
Abstract
Description
Technical Field
[0001] This disclosure relates to a network switch technology. In particular, it relates to a network switch and its operation method that can adaptively utilize Virtual Local Area Networks (VLANs) to execute Precision Time Protocol (PTP). Prior Technology
[0002] With the development of technology, various network technologies have emerged. For example, a Virtual Local Area Network (VLAN) uses specific network technologies to build many devices under a single network. These devices can then use the VLAN's channels to execute different protocols.
[0003] However, in existing technologies, a specific protocol is executed using a fixed network channel. In this case, if it is necessary to switch to executing this specific protocol using a different network channel, a new network channel needs to be defined. This is time-consuming and can affect the stability of the entire network. Summary of the Invention
[0004] Some embodiments disclosed herein relate to a network switch. The network switch includes a precision time protocol circuit and a processor. The precision time protocol circuit determines whether a first precision time protocol packet carries a first virtual local area network (VLAN) tag. The processor is coupled to the precision time protocol circuit. The processor is configured to: when the first precision time protocol packet carries the first VLAN tag, determine whether the first VLAN tag conforms to a first preset VLAN channel; and when the first VLAN tag does not conform to the first preset VLAN channel, set a current VLAN channel in the first VLAN tag as a second preset VLAN channel and execute a precision time protocol procedure through the second preset VLAN channel.
[0005] Some embodiments disclosed herein relate to a method of operating a network switch. The method of operating the network switch includes the following operations: determining, by means of a precision time protocol circuit in the network switch, whether a first precision time protocol packet carries a first virtual local area network (VLAN) tag; when the first precision time protocol packet carries the first VLAN tag, determining, by means of a processor in the network switch, whether the first VLAN tag conforms to a first preset VLAN channel; and when the first VLAN tag does not conform to the first preset VLAN channel, setting a current VLAN channel in the first VLAN tag as a second preset VLAN channel and executing a precision time protocol procedure through the second preset VLAN channel. Simple Explanation of the Diagram
[0006] To make the above and other objects, features, advantages and embodiments of this disclosure more apparent and understandable, the accompanying drawings are described below: Figure 1 is a schematic diagram of a network switch according to some embodiments of this disclosure; Figure 2 is a flowchart illustrating a method of operating a network switch according to some embodiments of this disclosure; and Figure 3 is a schematic diagram of a precise timing agreement packet illustrated according to some embodiments of this disclosure. Implementation
[0007] The term "coupled" as used in this article can also refer to "electrical coupling," and the term "connection" can also refer to "electrical connection." "Coupled" and "connection" can also refer to the cooperation or interaction of two or more components.
[0008] Referring to Figure 1, Figure 1 is a schematic diagram of a network switch 100 illustrated according to some embodiments of the present disclosure. In some embodiments, the network switch 100 may be used in a vehicle networking environment. In other words, this vehicle networking environment may include multiple network switches 100.
[0009] Taking Figure 1 as an example, network switch 100 includes precision time protocol circuitry 110 and processor 120. Processor 120 is coupled to precision time protocol circuitry 110. In some embodiments, precision time protocol circuitry 110 is a precision time protocol receiver parser. In some embodiments, processor 120 is a central processing unit (CPU).
[0010] The processor 120 includes a processing circuit 122, a precise time agreement program 124, and a storage circuit 126. The processing circuit 122 is coupled to the precise time agreement program 124 and the storage circuit 126.
[0011] In some embodiments, the processing circuit 122 is the main hardware circuitry in the central processing unit that performs various operations and processes. In some embodiments, the precision time protocol program 124 is a non-transitory computer-readable recording medium, and this non-transitory computer-readable recording medium stores the precision time protocol code. Precision time protocol is a network protocol used to synchronize clocks throughout a network. In some embodiments, the storage circuit 126 is flash memory, but this disclosure is not limited thereto.
[0012] Referring also to Figures 1 and 2. Figure 2 is a flowchart illustrating a method of operating a network switch 200 according to some embodiments of the present disclosure. In some embodiments, the method of operating 200 is applied to a network switch 100.
[0013] As illustrated in Figure 2, operation method 200 includes operations S202, S204, S206, S208, S210, S212, S214, and S216.
[0014] In operation S202, the processing circuit 122 in the processor 120 sets a first preset virtual local area network (VLAN) channel. Specifically, after the power-on procedure of the network switch 100, the processing circuit 122 in the processor 120 can set one of a plurality of candidate VLAN channels as the first preset VLAN channel according to the precise timing agreement procedure 124.
[0015] For example, suppose there are candidate virtual local area network (VLAN) channels VLAN(X), VLAN(Y), and VLAN(Z). The processing circuitry 122 in processor 120 can set VLAN(X) as the first preset VLAN channel. That is, VLAN(X) can then be used to execute the precise time agreement program 124. The other VLANs VLAN(Y) and VLAN(Z) can then be used by other applications.
[0016] In operation S204, the processing circuit 122 in the processor 120 records this first preset virtual area network channel VLAN(X).
[0017] Next, refer to Figures 1 through 3. Figure 3 is a schematic diagram of a precision time agreement packet PK illustrated according to some embodiments of this disclosure.
[0018] In operation S206, the precise time protocol circuit 110 receives the precise time protocol packet PK (first precise time protocol packet) and determines whether the precise time protocol packet PK carries a virtual local area network label 300 (first virtual local area network label).
[0019] If the precise time protocol packet PK carries a virtual local area network (VLAN) tag 300 (as shown in Figure 3) (the result of operation S206 is "yes"), the precise time protocol circuit 110 transmits the precise time protocol packet PK to the processor 120 and enters operation S208. If the precise time protocol packet PK does not carry a VLAN tag 300 (the result of operation S206 is "no"), then operation S206 is maintained to continuously receive precise time protocol packets PK.
[0020] In operation S208, when the Precision Time Protocol packet PK carries the Virtual Area Network tag 300, the processing circuit 122 in the processor 120 determines whether the Virtual Area Network tag 300 conforms to the first preset Virtual Area Network channel VLAN(X).
[0021] When the virtual local area network label 300 matches the first preset virtual local area network channel VLAN(X) (the judgment result of operation S208 is "yes"), proceed to operation S210. When the virtual local area network label 300 does not match the first preset virtual local area network channel VLAN(X) (the judgment result of operation S208 is "no"), proceed to operation S212.
[0022] In operation S210, when the virtual area network label 300 matches the first preset virtual area network channel VLAN (X), the processing circuit 122 in the processor 120 executes the precise time agreement program 124 through the first preset virtual area network channel VLAN (X).
[0023] However, as shown in Figure 3, suppose the Virtual Local Area Network (VLAN) 300 records a Virtual Local Area Network (VLAN) channel (Y). That is, the Virtual Local Area Network (VLAN) channel (Y) recorded by the Virtual Local Area Network (VLAN) 300 does not match the first preset Virtual Local Area Network (VLAN) channel (X). At this time, operation S212 is entered. In operation S212, the processing circuit 122 in the processor 120 sets the current Virtual Local Area Network (VLAN) channel (Y) in the Virtual Local Area Network (VLAN) 300 to the second preset Virtual Local Area Network (VLAN) channel.
[0024] Next, in operation S210, the processing circuit 122 in the processor 120 executes the precise time agreement program 124 through the second preset virtual area network channel VLAN (Y).
[0025] In some related technologies, network switches can only perform precise time protocol procedures through a fixed default virtual LAN channel. Changing this default virtual LAN channel requires additional setup time and can affect the stability of the network switch and the entire network.
[0026] Compared to the aforementioned related technologies, in this disclosure, the current virtual local area network channel VLAN (Y) recorded in the virtual local area network tag 300 can be dynamically set as a new preset virtual local area network channel to execute the precise time agreement procedure 124 through the current virtual local area network channel VLAN (Y). Thus, the precise time agreement procedure 124 can be executed dynamically and adaptively to improve overall efficiency.
[0027] On the other hand, in operation S214, in addition to setting the current virtual area network channel VLAN (Y) in the virtual area network tag 300 as the second preset virtual area network channel, the processing circuit 122 in the processor 120 also stores the second preset virtual area network channel VLAN (Y) in the storage circuit 126.
[0028] Next, in operation S216, after the next power-on procedure of the network switch 100, the processing circuit 122 in the processor 120 can load the second preset virtual area network channel VLAN (Y) from the storage circuit 126.
[0029] Next, we return to operation S206. In operation S206, the precision time protocol circuit 110 continuously receives new precision time protocol packets PK (second precision time protocol packets) (later than the aforementioned first precision time protocol packets) and continuously determines whether the new precision time protocol packets PK carry a virtual local area network label 300 (second virtual local area network label).
[0030] When a new Precise Time Protocol (PTP) packet PK carries a Virtual Local Area Network (VLAN) tag 300 (the result of operation S206 is "Yes"), operation S208 is entered again. In operation S208, the processing circuit 122 in the processor 120 determines whether the VLAN tag 300 in the new PTP packet PK conforms to the second preset VLAN Channel (Y). When the VLAN tag 300 in the new PTP packet PK conforms to the second preset VLAN Channel (Y) (the result of operation S208 is "Yes"), operation S210 is entered again. When the VLAN tag 300 in the new PTP packet PK does not conform to the second preset VLAN Channel (Y) (the result of operation S208 is "No"), operation S212 is entered again.
[0031] In operation S210, the processing circuit 122 in the processor 120 executes the precise time agreement program 124 through the second preset virtual area network channel VLAN (Y).
[0032] In operation S212, the processing circuit 122 in the processor 120 sets the current virtual local area network channel in the virtual local area network tag 300 to the third preset virtual local area network channel. Subsequent operations follow the same pattern.
[0033] In some other embodiments, operations S214 and S216 can be omitted. This saves time in storing the preset virtual local area network channel to the storage circuit 126.
[0034] In summary, this disclosure allows for the dynamic configuration of new default virtual local area network (VLAN) channels to execute precise time agreement procedures. This enables dynamic and adaptive execution of precise time agreement procedures, thereby improving overall efficiency.
[0035] Although this disclosure has been described above with reference to embodiments, it is not intended to limit this disclosure. Any person with ordinary knowledge in the art may make various modifications and refinements without departing from the spirit and scope of this disclosure. Therefore, the scope of protection of this disclosure shall be determined by the appended claims.
[0036] 100: Network Switch 110: Precision Time Agreement Circuit 120: Processor 122: Processing Circuit 124: Precise Time Agreement Procedure 126: Storage circuit 200: Operating Method 300: Virtual Local Area Network Label S202: Operation S204: Operation S206: Operation S208: Operation S210: Operation S212: Operation S214: Operation S216: Operation PK: Precision Time Protocol Packet VLAN(X): Virtual Local Area Network Channel VLAN (Y): Virtual Local Area Network Channel VLAN(Z): Virtual Local Area Network Channel
[0037] Domestic storage information (please note in order of storage institution, date, and number) none Overseas storage information (please note in the order of storage country, institution, date, and number) none
Claims
1. A network switch, comprising: a precision time protocol circuit for determining whether a first precision time protocol packet carries a first virtual local area network (VLAN) tag; and a processor coupled to the precision time protocol circuit and configured to: when the first precision time protocol packet carries the first VLAN tag, determine whether the first VLAN tag conforms to a first preset VLAN channel; and when the first VLAN tag does not conform to the first preset VLAN channel, set a current VLAN channel in the first VLAN tag as a second preset VLAN channel and execute a precision time protocol procedure through the second preset VLAN channel.
2. The network switch as claimed in claim 1, wherein the processor is further configured to: after a power-on procedure, for the purpose of the precise timing protocol, set one of a plurality of candidate virtual local area network channels as the first preset virtual local area network channel; and record the first preset virtual local area network channel.
3. The network switch as claimed in claim 1, wherein the precision time protocol circuitry is further configured to receive the first precision time protocol packet and, if the first precision time protocol packet carries the first virtual local area network tag, transmit the first precision time protocol packet to the processor.
4. The network switch as described in claim 1, wherein the processor is further configured to: execute the precision time agreement procedure through the first preset virtual local area network channel when the first virtual local area network label matches the first preset virtual local area network channel.
5. The network switch as claimed in claim 1, wherein the processor includes a storage circuit, wherein the processor is further configured to: store the second preset virtual local area network channel to the storage circuit when the first virtual local area network label does not match the first preset virtual local area network channel.
6. The network switch as described in claim 5, wherein the processor is further configured to: load the second preset virtual local area network channel from the storage circuit after the next power-on procedure.
7. The network switch as described in claim 6, wherein the precision time protocol circuitry is further configured to determine whether a second precision time protocol packet carries a second virtual local area network (VLAN) tag, wherein the second precision time protocol packet is later than the first precision time protocol packet.
8. The network switch as described in claim 7, wherein the processor is further configured to: determine whether the second virtual local area network (VLAN) label conforms to the second preset VLAN channel when the second precision time protocol packet carries the second VLAN label; and execute the precision time protocol procedure through the second preset VLAN channel when the second VLAN label conforms to the second preset VLAN channel.
9. The network switch as described in claim 1, wherein the network switch is used in a vehicle network environment.
10. A method of operating a network switch, comprising: determining, by means of a precision time protocol circuit in the network switch, whether a first precision time protocol packet carries a first virtual local area network (VLAN) tag; when the first precision time protocol packet carries the first VLAN tag, determining, by means of a processor in the network switch, whether the first VLAN tag conforms to a first preset VLAN channel; and when the first VLAN tag does not conform to the first preset VLAN channel, setting a current VLAN channel in the first VLAN tag as a second preset VLAN channel by means of the processor and executing a precision time protocol procedure through the second preset VLAN channel.
