CN112865908B - Method and device for controlling transmission of Ethernet frame - Google Patents

Method and device for controlling transmission of Ethernet frame Download PDF

Info

Publication number
CN112865908B
CN112865908B CN202110075915.9A CN202110075915A CN112865908B CN 112865908 B CN112865908 B CN 112865908B CN 202110075915 A CN202110075915 A CN 202110075915A CN 112865908 B CN112865908 B CN 112865908B
Authority
CN
China
Prior art keywords
line card
network device
ethernet frame
network
ethernet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110075915.9A
Other languages
Chinese (zh)
Other versions
CN112865908A (en
Inventor
崔荣亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110075915.9A priority Critical patent/CN112865908B/en
Publication of CN112865908A publication Critical patent/CN112865908A/en
Application granted granted Critical
Publication of CN112865908B publication Critical patent/CN112865908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/062Synchronisation of signals having the same nominal but fluctuating bit rates, e.g. using buffers
    • H04J3/0632Synchronisation of packets and cells, e.g. transmission of voice via a packet network, circuit emulation service [CES]

Abstract

The application provides a method and a device for controlling the sending of Ethernet frames, which can reduce the influence of the switching of a main line card and a standby line card of network equipment on services. The method comprises the following steps: prior to the first time, allowing transmission of an Ethernet frame from the first line card of the first network device to the second network device; at a second time, instructing the first network device to send a frame gap to the second network device; at a first time, preventing transmission of Ethernet frames from the first line card to the second network device; and at a third time, allowing the Ethernet frames from the second line card in the first network equipment to be sent to the second network equipment, wherein the third time is later than the second time which is later than the first time.

Description

Method and device for controlling transmission of Ethernet frame
The application is a division of Chinese patent application with application number 201810547462.3, which is delivered to the Chinese patent office in 2018, 5 and 31, and has the invention name of 'method and device for controlling the sending of Ethernet frames'.
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for controlling transmission of an ethernet frame.
Background
The network device may include a master board and a standby board. In general, a network device may communicate with a peer network device using a host board. When the main board fails, the network equipment can communicate with the opposite-end network equipment by using the standby board. The process of switching the network device from using the active board to communicate with the peer network device to using the standby board to communicate with the peer network device may be called active/standby switching. The active/standby switching may cause service interruption. The above-mentioned service interruption may be as long as several minutes, which is almost intolerable for communication networks, especially for communication networks with low latency requirements.
Disclosure of Invention
The application provides a method and a device for controlling the sending of Ethernet frames, which can reduce the influence of the switching of a main line card and a standby line card of network equipment on services.
In a first aspect, the present application provides a method of controlling transmission of an ethernet frame, the method comprising: prior to the first time, allowing transmission of an Ethernet frame from the first line card of the first network device to the second network device; at a second time, instructing the first network device to send a frame gap to the second network device; at a first time, preventing transmission of Ethernet frames from the first line card to the second network device; and at a third time, allowing the Ethernet frames from the second line card in the first network equipment to be sent to the second network equipment, wherein the third time is later than the second time which is later than the first time.
In the prior art, when two network devices normally transmit data streams, a data stream sent by one network device to an opposite network device includes ethernet frames and frame gaps. The frame gap includes a synchronization signal and an alignment signal, which are used for keeping two network devices synchronized and aligned. If the main/standby switching is performed between the line cards of the network device, the switching lasts for a period of time, and the frame gap sent by the network device to the network device at the opposite end is interrupted within the period of time, so that the synchronization signal and the alignment signal cannot reach the network device pair at the opposite end. The end device may not receive the synchronization signal and the alignment signal, which may cause a remote error (remote fault), so that the opposite end network device closes its optical module interface (also referred to as "down interface"), and finally affects service transmission between the two network devices.
In view of the reason that switching between line cards of network devices affects service transmission of the network devices, in the technical scheme, a first network device sends a frame gap to a second network device at an opposite end in the process of switching a first line card to a second line card. Because the frame gap contains the synchronization signal and the alignment signal, the synchronization signal and the alignment signal can still be received by the second network device in the process of switching the first line card and the second line card of the first network device. Therefore, in the process of switching the first line card and the second line card of the first network device, the second network device may not be triggered to generate a remote fault (remote fault), and further, the optical module interface of the second network device may not be closed, so that the influence on the service transmission between the first network device and the second network device caused by the switching of the first line card and the second line card of the first network device can be reduced.
With reference to the first aspect, in certain implementations of the first aspect, blocking transmission of ethernet frames from the first line card of the first network device to the second network device at a first time comprises: and at the first time, instructing the first network equipment to send the Ethernet frame with the destination address of the first line card as the second network equipment to the first line card.
After the first line card and the second line card of the first network device enter into the switching, the Ethernet frames sent by the first line card are looped back, so that the Ethernet frames from the first line card are prevented from being sent to the second network device.
With reference to the first aspect, in certain implementations of the first aspect, the method further includes: at or after the third time, instructing the first network device to refrain from sending ethernet frames from the first line card addressed to the second network device to the first line card.
And at the third time, the first line card and the second line card complete the switching. At this time, the first line card is a standby line card and the second line card is a master line card. Thus, at or after the third time, the loopback of the ethernet frame from the first line card is cancelled, i.e., the ethernet frame from the first line card is not sent to the first line card any more.
With reference to the first aspect, in certain implementations of the first aspect, the method further includes: instructing the first network device to stop transmitting the frame gap to the second network device at or after the third time.
At the third time, the first line card and the second line card complete the switching, and the frame gap sent by the master line card after the switching is completed can be received by the second network device, so that the second network device can acquire the synchronization signal and the alignment signal contained in the frame gap. Therefore, at or after the third time, the first network device does not need to transmit the frame gap to the second network device (for example, the frame gap is transmitted to the second network device through the first circuit of the first network device, which may generate the frame gap, as will be described in detail in the embodiment), and the first network device and the second network device may also keep synchronization and alignment, and thus, instruct the first network device to stop transmitting the frame gap to the second network device at or after the third time.
With reference to the first aspect, in certain implementations of the first aspect, after the second time and before the third time, the method further includes: indicating the first line card to carry a first identifier in an Ethernet frame sent by the first line card; instructing the first network equipment to send an Ethernet frame sent by a first line card carrying the first identifier to a second line card; determining that the second line card receives an Ethernet frame carrying the first identifier; or indicating that the second card carries a second identifier in an Ethernet frame sent by the second card; instructing the first network equipment to send an Ethernet frame sent by a second line card carrying a second identifier to the first line card; determining that the first line card receives an Ethernet frame carrying a second identifier; and instructing the first network device to stop sending frame gaps to the second network device at or after the third time, including: and instructing the first network equipment to stop sending the frame gap to the second network equipment at the third time or after the third time based on the fact that the second line card receives the Ethernet frame carrying the first identifier or the fact that the first line card receives the Ethernet frame carrying the second identifier.
In a second aspect, the present application provides an apparatus for controlling transmission of an ethernet frame, configured to perform the method in the first aspect and any possible implementation manner thereof. In particular, the apparatus comprises means for performing the method of the first aspect and any possible implementation manner of the first aspect.
In a third aspect, the present application provides a computer-readable storage medium having stored thereon computer instructions, which, when executed on a computer, cause the computer to perform the method of the first aspect or any possible implementation manner of the first aspect.
In a fourth aspect, the present application provides a chip, which includes a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a network device in which the chip is installed executes the method in the first aspect and any possible implementation manner of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising computer program code which, when run on a computer, causes the computer to perform the method of the first aspect described above and any possible implementation manner of the first aspect.
According to the technical scheme provided by the application, the first network equipment sends the frame gap to the second network equipment at the opposite end in the process of switching the first line card to the second line card, so that the influence of the switching of the first line card and the second line card of the first network equipment on the service can be reduced. In consideration of the fact that, in the case where the first network device and the second network device normally perform traffic transmission, according to the ethernet communication protocol, every several ethernet frames need to be sent by the first network device to the second network device, so that the first network device and the second network device keep synchronization and alignment. Or, between two network devices that normally perform service transmission, a transmission frame gap is required in an interval of transmitting service data. Therefore, if the first network device starts sending a frame gap to the second network device once detecting that the first line card and the second line card are switched, the second network device is not triggered to generate a remote fault in the switching process of the first line card and the second line card, and further an optical module interface of the first network device is not closed, so that the influence of the switching of the first line card and the second line card of the first network device on the service between the first network device and the second network device can be reduced.
Drawings
Fig. 1 is a block diagram of a hardware structure of a network device provided in the present application.
Fig. 2 is a schematic diagram illustrating an operation process of the master line card and the standby line card provided in the present application.
Fig. 3 is a schematic diagram of a partial hardware structure of a network device provided in the present application.
Fig. 4 is a schematic diagram of a switching process of a master line card and a standby line card according to the present application.
Fig. 5 is a schematic flow chart of a method 100 of controlling transmission of ethernet frames provided herein.
Fig. 6 is a schematic diagram of another hardware structure of the network device provided in the present application.
Fig. 7 is a schematic diagram of another hardware configuration of the electronic switch and the network device provided in the present application.
Fig. 8 is a schematic block diagram of an apparatus 800 for controlling transmission of ethernet frames provided herein.
Fig. 9 is a schematic block diagram of a network device 900 that controls transmission of ethernet frames as provided herein.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
In some communication networks, such as Synchronous Digital Hierarchy (SDH), a network device needs to transmit service data through a plurality of Printed Circuit Boards (PCBs) such as a control board, a circuit board, and a cross board. In order to achieve high reliability of the system, the network device generally has two cross boards, one of which is a main cross board (hereinafter referred to as a main board) and the other of which is a standby cross board (hereinafter referred to as a standby board). The standby board maintains the same configuration as the current configuration of the main board through a synchronization function. When the main board fails, the standby board can replace the main board to ensure the continuous operation of the equipment, and the process is called as main/standby switching. Before the main-standby switching, the main board and the standby board can realize the double sending and selective receiving of data flow under the control of an electronic switch. Specifically, the electronic switch may receive data streams from the main board and the standby board at the same time, and the electronic switch transmits only the data streams from the main board to the opposite device. The data streams from the active and standby boards both include ethernet frames and frame gaps. The frame gap includes a synchronization signal and an alignment signal, which are used for synchronizing and aligning with a peer device. In addition, the main board and the standby board include a physical layer (PHY), and a Physical Coding Sublayer (PCS) layer of the PHY can generate a frame gap including a synchronization signal and an alignment signal. When the active-standby switching occurs, the electronic switch needs to stop sending the data stream from the active board to the opposite-end device, and needs to send the data stream from the standby board to the opposite-end device. That is, the electronic switch needs to be switched from the main board to the standby board. The switching of the electronic switch from the main board to the standby board may cause the PCS of the PHY of the network device to be out of synchronization, resulting in a local fault (local fault) of the PHY of the network device. Specifically, a certain duration is required from when the electronic switch stops sending the data stream from the host board to the peer device to when the electronic switch sends the data stream from the standby board to the peer device. For example, the electronic switch stops sending data flow from the master board to the peer device at time t 1. The electronic switch sends the data stream from the standby board to the peer device starting at time t 2. t2 is later than t 1. Assume t2-t1 are 1 second. The peer device does not receive a frame gap from the network device for a duration of 1 second. In particular, the peer device does not receive synchronization information and alignment information (e.g., a synchronization header), which may cause the peer device to generate a remote error (remote fault), so that the peer device closes its optical module interface (also referred to as "down the interface"), and finally causes a service interruption between two network devices.
The network device can realize the transmission of service data through the PCB. Referring to fig. 1, fig. 1 is a block diagram of a hardware structure of a network device provided in the present application. As shown in fig. 1, a network device includes a backplane, a service board, a line card, and a control board. Among them, the backplane (backplane) may provide various types of slots for other PCBs. Other PCBs (e.g., service boards, line cards, control boards, etc.) may exchange information, manage configuration, etc. with each other by plugging into associated slots on the backplane. The service board is used to provide various service interfaces through which the service board can receive various types of service data. The service board transmits various accessed service data to the line card for processing. The line card receives various types of service data from the service board and processes the service data. For example, a Network Processor (NP) and a memory may be included on a line card. A forwarding table is stored in the memory. The NP may forward an ethernet frame, an Internet Protocol (IP) packet, or a Transmission Control Protocol (TCP) packet by looking up a forwarding table stored in the memory. The forwarding process includes determining a physical port for forwarding an ethernet frame, determining an IP address of a next-hop device of an IP packet to be forwarded, and the like. After the service data is processed, the line card sends the processed service data to the network equipment of the opposite terminal or to other service boards. For example, as shown in fig. 1, a line card receives an ethernet frame from a service board a, processes the ethernet frame, and transmits the processed ethernet frame to a service board B. Specifically, when the service board a includes a plurality of interfaces and the service board B includes a plurality of interfaces, the line card may transmit a data stream from the interface 1 of the service board a to the interface 2 of the service board B. The control panel controls each PCB to ensure the operation of the whole system.
In order to improve the high reliability of the system, some network devices (e.g., high reliability box routing devices) supporting the active/standby feature include two line cards. One of the line cards serves as a master line card, and the other serves as a standby line card. The standby line card can replace the main line card to work when the main line card fails so as to ensure continuous operation of services.
The following describes the working process of the host line card and the standby line card when the network device includes the host line card and the standby line card with reference to fig. 2. The network device shown in fig. 2 can be obtained by extending the network device shown in fig. 1.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an operation process of the host line card and the standby line card provided in the present application. As shown in fig. 2, the network device includes a service board a, a service board B, a line card 1, and a line card 2. The line card 1 is a main line card, and the line card 2 is a standby line card. Under normal conditions, the service board a sends the same data stream to the line card 1 and the line card 2 at the same time. The line card 1 and the line card 2 perform the same processing on the received data stream and transmit the data stream to the service board B respectively. The service board B may select one data stream from the line card 1 and the line card 2 to receive according to some selection conditions (e.g., states of the line card 1 and the line card 2). The state of the line card 1 is the active state. The state of the line card 2 is the standby state. This manner of transceiving data streams is referred to as "dual transmit selective receive". The line cards of the network device shown in fig. 2 adopt a master/standby mode (i.e., the network device includes a master line card and a standby line card). During the transmission of data streams, the control board (not shown in fig. 2) controls the line cards 1 and 2 to perform active/standby switching once it detects that the line cards 1 and 2 satisfy the switching condition (e.g., the line card 1 fails, the line card 1 is pulled out of the slot of the backplane).
Further, a PHY is on a line card in the network device. Referring to fig. 3, fig. 3 is a schematic diagram of a partial hardware structure of a network device provided in the present application. As shown in fig. 3, line card 1 contains a PHY (denoted as PHY1) and line card 2 contains a PHY (denoted as PHY 2). It is understood that the hardware structure of the network device may use the PHY (referred to as PHY3) and the optical module shown in fig. 3 in addition to the PCBs (e.g., control board, service board, line card, backplane, etc.) shown in fig. 1 and fig. 2 and the opposite end device for service transmission. The network device shown in fig. 3 can be obtained by extending the network device shown in fig. 2.
It should be noted that only the line card and the service board are shown in fig. 2 and 3. The connection relationship between the back plate, the control board and these PCBs can be seen in fig. 1. Unlike fig. 1, fig. 2 and 3 show two line cards (a master line card 1 and a standby line card 2). Only one line card is shown in fig. 1. Further, on the basis that fig. 1 and 2 only show PCBs, a PHY (PHY3 in fig. 3) and an optical module in a network device are also shown in fig. 3.
The switching process between the primary line card and the standby line card will be described with reference to fig. 4.
Referring to fig. 4, fig. 4 is a schematic diagram of a switching process of a master line card and a standby line card provided in the present application. As shown in fig. 4, a network device a performs traffic transmission with a network device B. The network device a includes a service board, a line card 1 (master line card), a line card 2 (standby line card), an electronic switch, a PHY, and an optical module. The network device B only shows the optical module and PHY, and the rest of the PCBs or components included in the network device B are not limited. The network device in fig. 3 may be expanded to obtain network device a in fig. 4. As described above in fig. 1, the line card may receive and process a data stream from one service board, and send the processed data stream to another service board, or may also send the processed data stream to a network device at an opposite end.
(1) T1 time, line card 1 is in active state and line card 2 is in standby state.
At time T1, the electronic switch gates line card 1. The service board in the network device a sends the same service data to the line card 1 and the line card 2. The line card 1 and the line card 2 respectively send the service data after the same processing. At time T1 the electronic switch gates line card 1 so the electronic switch selects to receive data from line card 1. Therefore, the service data processed by the line card 1 is transmitted to the PHY3 of the network device a through the electronic switch, and is transmitted to the network device B through the optical module of the network device a after being encoded through the PHY 3. More specifically, the optical module transmitted to network device B is transmitted to PHY4 of network device B by the optical module of network device B. The processing in network device B can be the same as in the prior art and is not described in detail here.
For electronic switches, the data streams from line card 1 and line card 2 both include ethernet frames and frame gaps. The frame gap includes a synchronization signal and an alignment signal, which are used for synchronization and alignment of the network device a and the network device B. Specifically, both line card 1 and line card 2 include PHYs, and a Physical Coding Sublayer (PCS) of the PHYs can generate a frame gap containing a synchronization signal and an alignment signal. At time T1, network device a may implement the sending of synchronization and alignment signals to the network device regardless of whether the electronic switch selects to receive a data stream from line card 1 or a data stream from line card 2. For example, at time T1, the electronic switch selects to receive the data stream from line card 1, and the PCS generated frame gap for the PHY (PHY1) of line card 1 may be transmitted to network device B. Thus, the synchronization signal and the alignment signal contained in the frame gap generated by the PCS of the PHY of the line card 1 can be received by the network device B, so that the network device B can maintain synchronization and alignment with the network device a.
As can be seen, at time T1, the data path in network device a is: service board-line card 1-electronic switch-PHY (PHY3) of network device a-optical module of network device a.
It is noted here that an electronic switch is located between the connector and the PHY for connecting the connector to the PHY 3. The connector between line card 1 (or line card 2) and PHY is not shown in fig. 2. The connector is used to connect line card 1 (or line card 2) and PHY 3. The electronic switch may be implemented by a chip capable of implementing 1-out-of-2. Specifically, a chip implementing 1-out-of-2 may include three terminals, terminal 1, terminal 2, and terminal 3, respectively. The terminal 1 is connected with the line card 1. The terminal 2 is connected with the line card 2. Terminal 3 is connected to PHY 3. A chip implementing 1-out-of-2 can connect terminal 1 with terminal 3. Alternatively, the terminal 2 and the terminal 3 can be connected. That is, the chip implementing the 2-out-of-1 is able to select one terminal from the terminals 1 and 2 and connect the selected terminal with the terminal 3. When implementing the 1-out-of-2 chip select terminal 1, traffic sent by line card 1 may reach PHY3 via an electronic switch. When implementing the 1-out-of-2 chip select terminal 2, traffic sent by line card 2 may reach PHY3 via an electronic switch. (see the schematic structural diagram of the electronic switch shown in FIG. 7 (A) below)
(2) T2 time, line card 1 and line card 2 start to perform active/standby switching.
There are various scenarios where the main/standby switching occurs in the line card 1 and the line card 2, for example, the line card 1 fails, a user pulls the line card 1 out of a slot of a backplane, and the like, and these scenarios can trigger the line card 1 and the line card 2 to switch.
(3) And T3 time, the line card 1 and the line card 2 complete the active/standby switching. After the main/standby switching is completed, the line card 2 is in the main state, and the line card 1 is in the standby state.
Time T3, the electronic switch gates line card 2. According to the analysis of the data path of the network device a at the time of T1, it can be known that the data path of the network device a at the time of T3 is: the service board-line card 2-electronic switch-PHY of the network device a-optical module of the network device a.
At time T3, the frame gap generated by the PCS of the PHY of line card 2 of network device a (i.e., PHY2 in fig. 3) may be transmitted to network device B, and thus the synchronization signal and the alignment signal contained in the frame gap may be received by network device B, so that network device B may synchronize and align with network device a.
From T2 time to T3 time (i.e., during the active/standby switching process), the electronic switch needs to stop sending the data stream from the line card 1 to the network device B, and send the data stream from the line card 2 to the network device B, that is, the electronic switch needs to switch from the line card 1 to the line card 2. The switching of the electronic switch from line card 1 to line card 2 requires a certain duration (T3-T2). During the duration of (T3-T2), since neither line card 1 nor line card 2 is turned on with the electronic switch, the PHY of network device a receives neither the synchronization signal and the alignment signal from the PCS of PHY1 of line card 1, nor the synchronization signal and the alignment signal from the PCS of PHY2 of line card 2, which would cause the PHY of network device a (i.e., PHY3 in fig. 3) to generate a local fault due to loss of synchronization. Further, the local fault generated by PHY3 is transmitted to network device B, which will cause the PHY (referred to as PHY4) of network device B to generate an error. The error generated by the network device B is referred to as a remote fault with respect to the network device a. The creation of the remote fault will cause the network device B to turn off its optical module interface (which may also be referred to as "down the optical module interface"), which may cause a traffic interruption between the network device a and the network device B.
Generally, the service interruption caused by the active/standby switching may be as long as several minutes, which is almost intolerable for the communication network (especially for some communication networks with low latency requirements).
Therefore, the application provides a method for controlling the sending of the ethernet frame, which can avoid service interruption with other network devices possibly caused by the switching of the main line card and the standby line card of the network device. Or, the method can reduce the influence on the service transmission of the network device caused by the switching between the main line card and the standby line card of the network device.
The method 100 for controlling transmission of an ethernet frame proposed in the present application is explained in detail below.
The method 100 for controlling transmission of ethernet frames according to the present application is applied to a network device that includes at least one control board and two line cards, and at a certain time, one of the two line cards is in an active state and the other is in a standby state. The connection relationship between the control board and the two line cards can be combined with the connection relationship shown in fig. 1 and 2. The two line cards may provide input signals to the control board. Specifically, the CPU of one of the two line cards may send a trigger signal to the control board to trigger the active/standby switching process of the two line cards when determining that the line card fails. The control board may also provide output signals to the two line cards to enable or prevent traffic from the line cards from being sent to the second network device. The control board may also be a controller, and the controller may be located on any one of the control board or a daughter card of the network device.
For clarity of description, we refer to this network device as a first network device, and refer to a peer device performing traffic transmission with the first network device as a second network device. Meanwhile, a master line card in the first network device is referred to as a first line card, and a standby line card in the first network device is referred to as a second line card. Thus, the first line card appearing below may correspond to line card 1 in fig. 2 to 4 above, and the second line card may correspond to line card 2 in fig. 2 to 4.
Referring to fig. 5, fig. 5 is a schematic flow chart of a method 100 for controlling transmission of ethernet frames provided herein.
The method 100 may be performed by a control board in a network device. Or may be executed by a controller in the network device, where the controller may be located on a control board or on any one of daughter cards of the network device. The embodiment of the present application does not limit the execution subject of the method 100. The following describes a method for controlling transmission of an ethernet frame provided in the present application, by taking the control board executing the method 100 as an example. For example, the network devices shown in fig. 1-4 (specifically, network device a in fig. 4) may be used to perform the method shown in fig. 5. Specifically, the method shown in fig. 5 may be performed by the control board of the network device shown in fig. 1 to 4. In addition, the method shown in FIG. 5 may also be performed by a controller shown in FIG. 6, below.
110. Before the first time, the control board allows ethernet frames from the first line card of the first network device to be transmitted to the second network device.
It should be appreciated that the ethernet frames sent to the second network device come from the first line card in the first network device before the first time under control of the control board. In other words, before the first time, the first line card in the first network device operates in the active state and the second line card operates in the standby state.
For example, the control board may selectively receive ethernet frames from a first line card and a second line card of a first network device via an electronic switch. Specifically, the control board enables transmission of ethernet frames from the first line card of the first network device to the second network device by instructing the electronic switch to select reception of ethernet frames from the first line card without reception of ethernet frames from the second line card. As described above, the electronic switch may be implemented by a chip that can implement "1-out-of-2", and thus, in step 110, before the first time, the control board may send a control signal to the electronic switch, and the electronic switch connects the terminal 1 and the terminal 3 and disconnects the terminal 2 and the terminal 3 based on the control signal. Therefore, the ethernet frame sent by the first line card can be transmitted to the PHY of the network device through the electronic switch, and then transmitted to the optical module of the first network device by the PHY of the first network device, and finally transmitted to the second network device. Meanwhile, since the terminal 2 and the terminal 3 are not connected, the ethernet frame transmitted by the second line card is not transmitted to the PHY of the first network device and cannot be transmitted to the second network device through the optical module of the first network device.
120. At a second time, the first network device is instructed to transmit a frame gap to the second network device.
In particular, a first network device may include a first circuit to generate a frame gap. At a second time, the control board sends a control signal to the first circuit. Based on the control signal, the first circuit generates a frame gap and transmits the generated frame gap to the PHY of the first network device. The PHY of the first network device forwards the frame gap to the second network device via the optical module.
For example, the line card 1 may autonomously perform fault detection, and in the case of detecting that the line card 1 has a fault, may send a fault notification to the control board. The control board generates a control signal for controlling the first circuit to transmit the frame gap based on the received failure notification. It is understood that under the control of the control board, the frame gap transmitted by the first circuit may be transmitted to the second network device through the PHY and the optical module of the first network device.
130. At a first time, the control board blocks transmission of ethernet frames from the first line card to the second network device.
At a first time, the ethernet frames from the first line card are not sent to the second network device under control of the control board. For example, ethernet frames from the first line card may be dropped, looped back to the first line card, and so on.
For example, the control board may send control signals to the electronic switch. Based on the control signal, the electronic switch disconnects the connection between terminal 1 and terminal 3, so that the ethernet frame from the first line card cannot be transmitted to the second network device.
For another example, the first network device may further include a second circuit that may have a function of translating ethernet frames from the first line card back to the first line card. Specifically, after the ethernet frame sent by the first line card reaches the second circuit through the electronic switch, the second circuit loops the ethernet frame from the first line card back to the first line card.
Both of these approaches may prevent the transmission of ethernet frames from the first line card to the second network device.
140. At a third time, the control board allows ethernet frames from a second line card in the first network device to be sent to the second network device.
At a third time, the control board may instruct the electronic switch to select to receive ethernet frames from the second line card and not the first line card, thereby enabling transmission of ethernet frames from the second one of the first network devices to the second network device and not the first one of the first network devices.
In particular, the control board may send control signals to the electronic switch. Based on this control signal, the electronic switch keeps terminal 1 and terminal 3 open while connecting terminal 2 and terminal 3. Therefore, the Ethernet frame sent by the second wire card can be transmitted to the PHY of the first network device through the electronic switch and transmitted to the second network device through the optical module of the first network device. And the ethernet frame sent by the first line card cannot be transmitted to the PHY of the first network device due to the isolation of the electronic switch, and therefore cannot be transmitted to the second network device.
Wherein the third time is later than the second time, which is later than the first time.
The implementation of the first and second circuits and their respective functions referred to in the method 100 will be described in detail below.
As can be seen from the above analysis, the master/standby switching performed by the first line card and the second line card in the first network device may cause service interruption between the first network device and the second network device. The reason is that the first line card needs to be switched to the second line card for a time duration. During this time duration, neither the frame gap generated by the PCS of the PHY of the first line card nor the frame gap generated by the PCS of the PHY of the second line card can reach the second network device. The second network device cannot receive the frame gap containing the synchronization signal and the alignment signal. The second network device is unable to synchronize and align with the first network device and generates an error. And then, the second network equipment closes the optical module interface of the second network equipment. This results in a traffic disruption between the first network device and the second network device. In the technical solution provided in the embodiment of the present application, in the process of active/standby switching between a first line card and a second line card in a first network device, a frame gap is sent to a second network device by indicating a first circuit. The synchronization signal and the alignment signal contained in the frame gap may be received by the second network device. In this way, in the process of switching the first line card and the second line card, the frame gap containing the synchronization signal and the alignment signal generated by the PHYs of the first line card and the second line card cannot reach the second network device. However, during the time duration of the switching between the first line card and the second line card, the first circuit may send a frame gap to the second network device under the control of the control board. This can prevent the generation of local fault and remote fault. Thereby, the second network device can be prevented from closing the interface of the optical module of the second network device. Therefore, in the process of main/standby switching, the first line card and the second line card of the first network device can continuously perform the service before the first network device and the second network device.
A more specific hardware structure diagram of the network device applicable to the embodiment of the present application is given below. As shown in fig. 6, fig. 6 is a schematic diagram of another hardware structure of the network device provided in the present application.
As shown in fig. 6, the network device includes a backplane, and a host line card and a standby line card (e.g., line card 1 and line card 2 in fig. 6, respectively) and a daughter card may be inserted into slots provided in the backplane. The line card 1 and the line card 2 respectively include a Central Processing Unit (CPU) and an NP. The daughter card may include a controller, an electronic switch, a first circuit, a PHY, and an optical module thereon.
When the hardware structure of the network device shown in fig. 6 is applied to the above method embodiment, the controller may provide an output signal to the electronic switch, and the electronic switch may allow or prevent the traffic from the first line card or the second line card from being sent to the second network device. In addition, the controller may further provide an output signal to the first circuit, thereby enabling the first network device to send an Inter Packet Gap (IPG). Thus, the first circuit may also be considered an IPG generation circuit.
It is understood that line card 1 and line card 2 may both include a control plane and a forwarding plane. The CPU and NP are components in the control plane and forwarding plane, respectively. The control plane of the line card can detect that the line card has a fault and send a control signal to the controller, so that the controller controls the electronic switch. The forwarding plane of the line card can forward the received message. In particular, the forwarding plane may contain forwarding tables. The NP can determine the output port of the message by searching the forwarding table. And the NP transmits the received message to the PHY corresponding to the output port. In addition, the control plane may also be responsible for executing routing protocols and maintaining forwarding tables.
It is to be understood that the controller in fig. 6 may also correspond to the control board in fig. 1 to 4. It should be noted that fig. 1 clearly shows the control board, and fig. 2 to 4 do not show the control board, but the hardware configuration of the network device shown in fig. 2 to 4 is expanded based on the hardware configuration of the network device shown in fig. 1. Accordingly, those skilled in the art will readily appreciate that the network devices shown in fig. 2-4 may also include a control board.
It is apparent that the controller in fig. 6 is separately provided on the daughter card, and is physically separated from the line card 1 and the line card 2. In some possible implementations, the controller may also be disposed on the line card 1 or the line card 2, or on another PCB of the network device or a daughter card of the PCB, which is not limited in this application.
It should be noted that the hardware structure of the network device may include a service board (not shown in fig. 6). As shown in fig. 1-4 above, the traffic board sends data streams to the line cards. After the line card processes the data stream, the processed data stream may be sent to another service board or directly sent to a network device at an opposite end.
As shown in fig. 6, after the CPUs of the line card 1 and the line card 2 respectively perform the same processing on the received ethernet frames from the service board (not shown in fig. 6), the respective NPs transmit the processed ethernet frames to the daughter card. A controller on the daughter card controls the electronic switch to receive only ethernet frames from line card 1 and not from line card 2. The above process may be referred to as "dual transmission and selective reception" as mentioned above. The ethernet frames sent by the NP of the line card 1 are sent to the PHY of the network device via the electronic switch. The PHY encodes the ethernet frame. And the optical module sends the encoded Ethernet frame to network equipment of an opposite terminal.
For example, in selecting to receive ethernet frames from line card 1 by controlling the electronic switch, line card 1 and line card 2 may send active/standby status indication signals (e.g., ACT in fig. 6) to the controller on the daughter card via the backplane. ACT is a level signal, a low level "0" indicates that the line card is in a active state, and a high level "1" indicates that the line card is in a standby state. The controller can know the states of the line card 1 and the line card 2 according to the ACT received from the line card 1 and the line card 2. For example, line card 1 and line card 2 are in active and standby states, respectively. Before the line card 1 and the line card 2 are switched, the ACT from the line card 1 is at a low level "0", and the ACT from the line card 2 is at a high level "1".
When the line card 1 fails, the line card 1 and the line card 2 need to be subjected to active/standby switching. When the line card 1 and the line card 2 need to perform active/standby switching, the ACT sent by the line card 1 and the line card 2 to the controller changes. The ACT received by the controller from line card 1 changes from "0" to "1", and the ACT from line card 2 changes from "1" to "0". The controller knows that the line card 1 and the line card 2 need to be switched.
At a first time, the controller instructs the first circuit to transmit a frame gap to the second network device. Specifically, the first circuit generates a frame gap and transmits the frame gap to the PHY. The PHY encodes the frame gap and then transmits the encoded frame gap to the optical module. And the optical module generates an optical signal after electro-optical conversion on the coded frame gap. The optical module transmits an optical signal to a second network device.
It can be understood that, during the switching of the electronic switch from the line card 1 to the line card 2, the frame gap containing the synchronization signal and the alignment signal sent by the PCS of the PHYs of the line card 1 and the line card 2 cannot be transmitted to the second network device. The first circuit generates a frame gap and transmits to the PHY of the first network device. The PCS of the PHY of the first network device does not lose synchronization. The first network device transmits the frame gap from the first circuit to the PHY of the second network device. The PHY of the second network device receives the frame gap from the first circuit, and may acquire the synchronization signal and the alignment signal included in the frame gap, thereby avoiding generation of a remote fault. Thus, the second network device will not drop its optical module interface. Thus, traffic interruptions between the first network device and the second network device may be avoided.
Further, in the process of main/standby switching of the line card 1 and the line card 2 by the electronic switch, the controller of the first network device not only controls the first circuit to send a frame gap to the second network device. At the second time, the controller may also instruct the electronic switch to refrain from sending received ethernet frames from line card 1 to the second network device. Wherein the second time is after the first time. For example, at a second time, the controller may instruct the electronic switch to drop ethernet frames received from line card 1. Also for example, a second circuit is included on a daughter card of the first network device. The second circuit is used for looping back the Ethernet frame from the line card 1 after the line card 1 and the line card 2 are switched. This also avoids sending ethernet frames from line card 1 to the second network device. Specifically, at a second time, the controller instructs the electronic switch to send the ethernet frame from line card 1 to the second circuit. Under the control of the controller, the second circuit receives ethernet frames from the line cards 1 from the electronic switch. And transmits the ethernet frame from the line card 1 to the line card 1.
Next, referring to fig. 7, a process of looping back the ethernet frame from the line card 1 by the second circuit will be described.
Referring to fig. 7, fig. 7 is a schematic diagram of another hardware structure of the electronic switch and the network device provided in the present application.
Fig. 7 (a) shows an example of one structure of the electronic switch provided in the present application. As shown in fig. 7 (a), the electronic switch includes a terminal 1, a terminal 2, a terminal 3, and a terminal 4. Wherein, terminal 1 is connected with ply-yarn drill 1, and terminal 2 is connected with ply-yarn drill 2. One end of the terminal 3 may be connected to the terminal 1 or the terminal 2, and the other end may be connected to the PHY. One end of the terminal 4 may be connected to the terminal 1 or the terminal 2, and the other end may be connected to the PHY. When the terminal 1 and the terminal 3 are connected and the terminal 2 and the terminal 3 are disconnected, the electronic switch can select the Ethernet frame sent by the receiving line card 1. The ethernet frames sent by the line card 1 may transport the PHY of the first network device via the terminal 3. When the terminal 2 is connected with the terminal 3 and the terminal 1 is disconnected with the terminal 3, the electronic switch can select the Ethernet frame sent by the receiving line card 2. The ethernet frames sent by the line card 2 may transport the PHY of the first network device via the terminal 3.
The terminal 4 is used when ethernet frames from the second network device need to be transmitted to the first network device. For example, when the terminal 4 is connected to the terminal 1, the ethernet frame transmitted by the second network device is transmitted to the PHY of the first network device through the optical module of the first network device. The PHY of the first network device is connected to the terminal 4, and the terminal 4 is connected to the terminal 1, so that the ethernet frame from the second network device is transmitted to the line card 1 of the first network device through the PHY, the terminal 4 of the electronic switch, and the terminal 1. It is easy to understand that if terminal 4 is connected to terminal 2, the electronic switch can send the ethernet frame from the second network device to the line card 2 of the first network device. Alternatively, if terminal 4 remains connected to both terminal 1 and terminal 2, the ethernet frame from the second network device may be transmitted to line card 1 and line card 2.
In addition, the terminal 4 may also be used when the second circuit in the first network device loops back the ethernet frame. This will be described with reference to fig. 7 (B).
Referring to fig. 7 (B), fig. 7 (B) is a schematic diagram of another hardware structure of the network device provided in the present application. As shown in fig. 7 (B), before the line card 1 and the line card 2 are switched, the line card 1 is in the active state. Under the control of the controller, the terminal 1 and the terminal 3 of the electronic switch are connected, and the terminal 2 and the terminal 3 are disconnected. So that the electronic switch can choose to receive ethernet frames from line card 1. The Ethernet frame sent by the line card 1 passes through the electronic switch, then enters a first-in first-out (FIFO) 1 through an 8B/10B encoder, and is selectively received by a 2:1 selector A. Passing through 2: the 1 selector A sends the Ethernet frame from the line card 1 to the PHY of the first network equipment through the 64B/66B encoder. The PHY of the first network device forwards the ethernet frame from the line card 1 to the optical module for electrical-optical conversion, and finally, the optical module of the first network device sends the ethernet frame from the line card 1 to the optical module of the second network device.
The above process is a process in which the line card 1 of the first network device sends an ethernet frame to the second network device. If the line card 2 of the first network device sends an Ethernet frame to the second network device, the terminal 2 of the electronic switch is connected with the terminal 3, and the terminal 1 is disconnected with the terminal 3. The remaining processes are the same and will not be described in detail.
In addition, if the second network device sends the ethernet frame to the first network device, the ethernet frame sent by the second network device is first received by the optical module of the first network device. Through the optical module of the first network device, the PHY, the 64B/66B decoder, the FIFO 2, the 8B/10B decoder to the electronic switch. If the electronic switch is to transmit the ethernet frame from the second network device to the line card 1 of the first network device under the control of the controller, the terminal 4 of the electronic switch is connected to the terminal 1, and the terminal 4 is disconnected from the terminal 2. If an ethernet frame from a second network device is to be sent to the line card 2, the terminal 4 of the terminal switch is connected to the terminal 2 and the terminal 4 is disconnected from the terminal 1. Alternatively, if terminal 4 remains connected to both terminal 1 and terminal 2, an ethernet frame from a second network device may be sent to line card 1 and line card 2.
It should be noted that, in fig. 7 (B), the first circuit and the second circuit are shown by dashed boxes, which indicate that the first circuit and the second circuit may be in an inactive state in a case where the line card 1 and the line card 2 are not switched, and only after the line card 1 and the line card 2 are switched, the first circuit and the second circuit may start to operate under the control of the control board and perform certain operations, which will be described in detail below.
As will be understood by those skilled in the art, in FIG. 7 (B), an 8B/10B encoder is used for 8B/10B encoding. A64B/66B encoder is used for 64B/66B encoding. The 8B/10B coding is one of the coding modes, and encodes information on a data channel with 8 bits as a group to obtain 10-bit data and transmits the 10-bit data. And 64B/66B coding is the function of PCS of the gigabit Ethernet and is a coding mode based on a scrambling mechanism. In the embodiment of the present application, the parts related to 8B/10B coding and 64B/66B coding can refer to the prior art, and are not described herein again.
It should be noted that the 2:1 selector (for example, the 2:1 selector a and the 2:1 selector B shown in fig. 7 (B)) in the embodiment of the present application may implement a function of selecting one of the two input signals. For example, the input of the 2:1 selector A shown in FIG. 7 includes two paths, one from the output of the first circuit and the other from the output of the FIFO 1. The first circuit will only start working under the control of the controller after the line card 1 and the line card 2 are switched. Under the condition that the line card 1 and the line card 2 are not switched, the 2:1 selector A selects the path of the receiving FIFO 1.
The following describes how the hardware configuration shown in fig. 7 (B) works in the process of controlling transmission of an ethernet frame proposed in the present application.
As shown in fig. 7 (B), before the first time, the controller transmits an indication signal 1 to the electronic switch through the control channel 1, where the indication signal 1 is used to indicate the electronic switch to receive the ethernet frame transmitted by the line card 1. Based on the indication signal 1, the terminals 1 and 3 of the electronic switch are connected, enabling selective reception of ethernet frames from the line card 1. The Ethernet frame from the line card 1 passes through the electronic switch, the 8B/10B encoder, the FIFO 1, the 2:1 selector A, the 64B/66B encoder, the PHY and the optical module and is finally transmitted to the second network equipment. In the process of sending the ethernet frame from the line card 1 to the second network device, if the controller receives a signal triggering the line card 1 and the line card 2 to switch, the controller sends an indication signal 2 to the first circuit through the control channel 2 at the second time, where the indication signal 2 is used to indicate the first circuit to send a frame gap. The controller controls the 2:1 selector A to switch from selecting the output of the receive FIFO 1 to selecting the output of the receive first circuit at a second time. The frame gap from the first circuit is sent to the second network device via the 2:1 selector a, the 64B/66B encoder, the PHY, and the optical module in that order. Further, the controller sends an indication signal 3 to the second circuit through the control channel 3 at the first time, and the indication signal 3 indicates the second circuit to loop back the ethernet frame sent by the line card 1. And after the controller determines that the line card 1 and the line card 2 complete the switching, the controller sends an indication signal 4 to the electronic switch at a third time, wherein the indication signal 4 is used for indicating the electronic switch to receive the Ethernet frame sent by the line card 2. Based on the indication signal 4, the terminal 3 of the electronic switch is disconnected from the terminal 1, and the terminal 3 is connected to the terminal 2, so that the Ethernet frame from the line card 2 is selectively received. Wherein the third time is after the second time, and the second time is after the first time.
The following describes a process of the second circuit looping back the ethernet frame.
Specifically, at a first time, the controller sends an indication signal 3 to the second circuit through the control channel 3. Based on the indication signal 3, the second circuit loops back the received ethernet frames from the line card 1. The specific process can be as follows: the electronic switch selects the Ethernet frame sent by the receiving line card 1, at this time, the terminal 1 and the electronic 3 of the electronic switch are connected, and the terminal 2 and the terminal 3 are disconnected. The Ethernet frame sent by the line card 1 is received by the second circuit through the electronic switch and the 8B/10B encoder. The second circuit sends the ethernet frames from line card 1 to the 8B/10B decoder for decoding. The decoded ethernet frames are returned to the line card 1 via the electronic switch. At this time, the terminal 4 of the electronic switch is connected to the terminal 1, and the terminal 4 is disconnected from the terminal 2.
It will be appreciated that in the second circuit looping back the received ethernet frame, the 2:1 selector B in the second circuit selects the output of the receive 1:2 driver and not the output of the receive FIFO 2.
In order to determine when the line card 1 and the line card 2 complete the switching, the controller instructs the line card 1 and the line card 2 to carry identification information in the ethernet frames sent by the line card 1 and the line card 2 at a second time, so as to distinguish the ethernet frames sent by the line card 1 and the line card 2. As described above, before switching occurs, the electronic switch selects ethernet frames from line card 1. And after the line card 1 and the line card 2 enter the switching, the electronic switch selects to receive the Ethernet frame from the line card 2 and not to receive the Ethernet frame from the line card 1 under the control of the controller. Therefore, after the second time, if the controller determines that the line card 1 receives the ethernet frame sent by the line card 2, indicating that the electronic switch has turned on the line card 2, the electronic switch can transmit the ethernet frame from the line card 2 to the second circuit and loop back through the second circuit to be received by the line card 1.
For example, assume that the ethernet frame sent by the line card 1 carries the identifier 1, and the ethernet frame sent by the line card 2 carries the identifier 2. Before the switching between the line card 1 and the line card 2 is completed, the electronic switch selects to receive the ethernet frame from the line card 1. After the ethernet frame from the line card 1 is transmitted to the second circuit through the electronic switch, the second circuit sends the ethernet frame from the line card 1 to the line card 1 again, so as to realize the loopback of the ethernet frame from the line card 1. Therefore, before the line card 1 and the line card 2 are switched, the ethernet frame received by the line card 1 from the second circuit comes from itself, and thus the identifier 1 is carried in the ethernet frame received by the line card 1 from the second circuit. It can be understood that if the line card 1 receives an ethernet frame from the second circuit carrying the identifier 2, it indicates that the ethernet frame sent to the line card 1 by the second circuit is from the line card 2. The electronic switch, however, is only connected to line card 2, and it is possible to transmit ethernet frames from line card 2 to the second circuit and then looped back to line card 1 by the second circuit. Therefore, after the second time, if the control board determines that the line card 1 receives the ethernet frame carrying the identifier 2, it indicates that the electronic switch has switched from the line card 1 to the line card 2 at this time, or that the line card 1 and the line card 2 have completed switching. Or, the control plane of the line card 1 may also confirm whether the line card 1 and the line card 2 complete the switching. For example, the control plane of line card 1 may detect an identifier carried in an ethernet frame received by line card 1. Once the control plane of the line card 1 determines that the ethernet frame received by the line card 1 carries the identifier 2, a switching completion notification is sent to the control board. The control board executes subsequent operations based on the switch completion notification. For example, the control board instructs the first circuit to stop sending frame gaps to the second network device, or instructs the second circuit to stop working, to stop looping ethernet frames, etc.
Similarly, the control board may also determine whether switching between the line card 1 and the line card 2 is completed according to the identifier carried in the ethernet frame received by the line card 2. For example, after the second time, if the control board determines that the ethernet frame received by the line card 2 carries the identifier 1, which indicates that the line card 1 is turned on, the electronic switch has not been switched from the line card 1 to the line card 2, indicating that the switching has not been completed. If the control board determines that the ethernet frame received by the line card 2 carries the identifier 2, which indicates that the electronic switch has connected to the line card 2, at this time, the electronic switch has disconnected the line card 1 and connected to the line card 2, that is, the line card 1 and the line card 2 complete the switching. Or, the control plane of the line card 2 may also determine whether the line card 1 and the line card 2 complete the switching, which is similar to the operation executed by the control plane of the line card 1 and is not described again.
It should be noted that, after detecting that the line card 1 and the line card 2 are switched, the controller should first control the first circuit to send a frame gap to the second network device in order to avoid generating a remote failure by the second network device. Next, the controller may control the ethernet frame sent by the line card 1 to loop back, and finally control the electronic switch to switch from the line card 1 to the line card 2. Therefore, the relationship that the first circuit sends the first time of the frame gap, the second time of stopping sending the ethernet frame from the line card 1 to the second network device (for example, looping the ethernet frame from the line card 1 and thus not sending the ethernet frame to the second network device) and the third time of controlling sending the ethernet frame sent by the line card 2 to the second network device by the controller after the switching between the line card 1 and the line card 2 is completed should be satisfied: the third time is later than the second time, and the second time is later than the first time.
In addition, as an optional implementation manner, it may be only required to ensure that the time when the controller controls the electronic switch to switch from the line card 1 to the line card 2 is after the time when the ethernet frames sent by the line card 1 and the line card 2 enter the loopback. In other words, the order of the time when the ethernet frames sent by the line card 1 and the line card 2 enter the loop and the time when the first circuit sends the frame gap to the second network device may not be limited.
It should be understood that, in the above embodiments, the destination addresses in the ethernet frames sent by line card 1 and line card 2 are both the second network device, that is, the network device B at the opposite end as described above.
It will be appreciated that in figure 7 the second circuit is inactive before the switch between line card 1 and line card 2 occurs, so that the electronic switch selects to receive the ethernet frames sent by line card 1, passing through the 8B/10B encoder and directly into the FIFO 1. And then, the data output by the FIFO 1 is received by the 2:1 selector A, then is transmitted to the second network equipment through the 64B/66B encoder, the PHY of the first network equipment and the optical module of the first network equipment.
Those skilled in the art will appreciate that the PHY may include a PCS, a physical media attachment sub-layer (PMA), a physical media dependent sub-layer (PMD), and AN auto-negotiation (AN). In the transmitting direction, the PCS is mainly used to encode data from a physical access control (MAC) layer. A hundred mega/gigabit Ethernet, 10GBase-KX4, typically uses 8B/10B coding. 10GBase-KR was encoded using 64B/66B. Thus, the functionality of the PCS of the 8B/10B encoder and 64B/66B encoder and PHY shown in FIG. 7 may be combined. In other words, to avoid redundancy of some functions, the functions on the daughter card shown in fig. 7 (B) except for the PHY and the optical module may be integrated on one chip, and the encoding functions of the 8B/10B encoder and the 64B/66B encoder on this chip may be combined with the encoding function in the PHY. It is understood that if 8B/10B coding and/or 64B/66B coding is already performed before the PHY, then 8B/10B coding and/or 64B/66B coding is no longer required in the PCS of the PHY. Alternatively, 8B/10B encoding, 64B/66B encoding shown in FIG. 7 (B) may also be done by PCS in PHY, without separate setup. Many common ways of avoiding redundancy will occur to those skilled in the art and are not listed here.
It will be appreciated by those skilled in the art that the first circuit and the second circuit in the above embodiments are each separately integrated on a daughter card. As a possible implementation, the first circuit and the second circuit may also be integrated in a PHY or optical module, and the principle is the same.
It should be noted that, when the first circuit and the second circuit are integrated in the optical module, a self-test of the optical module can be realized, and a problem that a tool board is necessary for an optical module test is solved. Meanwhile, the problems that the optical module cannot support loopback and cannot perform fault positioning can be solved.
The method for controlling transmission of an ethernet frame proposed in the present application is described in detail above, and an apparatus for controlling transmission of an ethernet frame provided in the present application is described below.
Fig. 8 is a schematic block diagram of an apparatus 800 for controlling transmission of ethernet frames provided herein. As shown in fig. 8, the apparatus 800 includes an allowing unit 810, an indicating unit 820, and a preventing unit 830.
An allowing unit 810 for allowing transmission of the ethernet frame from the first line card to the second network device before the first time;
an instructing unit 820, configured to instruct, at a second time, the first network device to send a frame gap to the second network device;
a blocking unit 830 for blocking transmission of ethernet frames from the first line card to the second network device at a first time;
the allowing unit 810 is further configured to allow the ethernet frame of the second line card to be transmitted to the second network device at a third time, where the third time is later than the second time, and the second time is later than the first time.
The enabling unit 810, the indicating unit 820 and the preventing unit 830 of the apparatus 800 may respectively act on different hardware structures of the network device, so as to control the process of sending the ethernet frame by the network device.
The network device referred to here may correspond to the first network device in the above-described method embodiments. Alternatively, a network device suitable for use in the method of an embodiment of the present application includes at least a first line card, a second line card, an electronic switch, a first circuit, and a second circuit. The connection relationship between these hardware structures and the respective functions can be referred to the above description of the hardware structure of the first network device. For example, reference may be made to fig. 7.
In particular, the enabling unit 810 is configured to send an indication signal to the electronic switch in the network device before the first time, the indication signal being configured to indicate that the electronic switch is allowed to send ethernet frames from the first line card to the second network device. The electronic switch selects to receive the ethernet frame from the first line card and not to receive the ethernet frame from the second line card in the network device before the first time based on the indication signal transmitted by the allowing unit 810, and transmits the ethernet frame from the first line card to the second network device. For example, the electronic switch connects the terminal 1 and the terminal 3 based on the instruction signal. Therefore, the ethernet frame sent by the line card 1 can be transmitted to the PHY of the network device through the terminal 1 and the terminal 3 of the electronic switch, and transmitted to the second network device through the optical module.
The indication unit 820 may send an indication signal to the first circuit at the second time, the indication signal indicating that the first circuit sent the frame gap to the second network device. The first circuit generates a frame gap based on the indication signal transmitted by the indication unit 820, and transmits the generated frame gap to the second network device through the PHY and optical module of the first network device.
The blocking unit 830 may send an indication signal to the second circuit at the first time, the indication signal instructing the second circuit to block transmission of ethernet frames from the first line card to the second network device. The second circuit blocks transmission of ethernet frames from the first line card to the second network device based on the indication signal transmitted by the blocking unit 830. Specifically, the second circuit prevents transmission of ethernet frames from the first line card to the second network device, including a plurality of approaches. For example, the second circuit may loop back received ethernet frames from the first line card to the first line card, or drop received ethernet frames from the first line card, or the like.
The allowing unit 810 is further configured to send an indication signal to the electronic switch at a third time, where the indication signal is used to indicate that the electronic switch is allowed to send the ethernet frame from the second line card to the second network device. The electronic switch selects to receive the ethernet frame from the second line card based on the indication signal sent by the enabling unit 810, and sends the ethernet frame from the second line card to the second network device. For example, the electronic switch disconnects the terminal 1 and the terminal 3 and connects the terminal 2 and the terminal 3 based on the instruction signal. Therefore, the ethernet frame sent by the line card 2 can be transmitted to the PHY of the first network device through the terminals 2 and 3 of the electronic switch, and transmitted to the second network device through the optical module.
Optionally, the indicating unit 820 is further configured to indicate that, at or after the third time, the first network device is instructed to avoid sending the ethernet frame addressed to the second network device from the first line card to the first line card.
It is known from the above embodiments that at the third time, the first line card and the second line card complete the switching. At this time, the first line card is a standby line card and the second line card is a master line card, and therefore, the indicating unit 820 may instruct the second circuit to cancel loopback of the ethernet frame from the first line card, that is, to cancel sending the ethernet frame from the first line card to the first line card after the third time or after the third time.
Further, the instructing unit 820 is further configured to instruct the first circuit to stop sending the frame gap to the second network device at or after a third time.
And at the third time, the first line card and the second line card complete switching. Thus, there is no need to continue to transmit the frame gap to the second network device at or after the third time.
Optionally, the apparatus 800 further comprises a determination unit. After the second time and before the third time, the determining unit is to: indicating the first line card to carry a first identifier in an Ethernet frame sent by the first line card; instructing the first network equipment to send the Ethernet frame carrying the first identifier and sent by the first line card to the second line card; determining that the second line card receives an Ethernet frame carrying the first identifier;
or the determining unit is used for indicating the second line card to carry the second identifier in the sent Ethernet frame; instructing the first network equipment to send an Ethernet frame sent by a second line card carrying a second identifier to the first line card; determining that the first line card receives an Ethernet frame carrying a second identifier;
and the indicating unit 820 is configured to, based on the determination unit determining that the second line card receives the ethernet frame carrying the first identifier, or based on the determination unit determining that the first line card receives the ethernet frame carrying the second identifier, instruct the first network device to stop sending the frame gap to the second network device at or after the third time.
In the switching process of the first line card and the second line card, the indicating unit 820 may detect when the first line card and the second line card complete the switching by indicating that the first line card and the second line card carry different identifiers in the sent ethernet frames. For a specific process, reference may be made to the description of the method embodiment, which is not described herein again. After determining that the first line card and the second line card complete the switching, the apparatus 900 instructs, at a third time or after the third time, the first circuit of the first network device to stop sending the frame gap to the second network device, which may control the first network device to send the ethernet frame to the second network device more accurately and more reasonably, thereby avoiding some unnecessary hardware overhead. For example, after the first line card and the second line card complete the switching, the second line card may send ethernet frames and frame gaps to the second network device, so that the synchronization signal and the alignment signal contained in the frame gaps may be received by the second network device, and the synchronization and alignment of the first network device and the second network device can be achieved, and therefore, the first circuit is no longer required to generate and send the frame gaps exclusively. Therefore, when determining that the first line card and the second line card complete the switching, the apparatus 900 instructs the first circuit to stop sending the frame gap, so that the hardware overhead of the first circuit can be reduced. Further, the apparatus 900 may also instruct the second circuit to stop looping the ethernet frame, which can also reduce hardware overhead to the second circuit.
It should be understood that the allowing unit 810, the indicating unit 820 and the preventing unit 830 may also be combined into one control unit.
Alternatively, the apparatus 800 may be the first network device in the above embodiment, or a control board or a controller installed in the first network device, or may also be an integrated circuit in the first network device or a chip installed in the first network device.
Fig. 9 is a schematic structural diagram of a network device 900 that controls transmission of an ethernet frame according to the present application. As shown in fig. 9, the network device 900 includes: one or more processors 901, one or more memories 902, one or more transceivers 903. The processor 901 is configured to control the transceiver 903 to transmit and receive signals, the memory 902 is configured to store a computer program, and the processor 901 is configured to call and run the computer program from the memory 902, so that the network device 900 executes corresponding procedures and/or operations performed by the first network device in the method of controlling transmission of ethernet frames of the present application (e.g., the method 100 above and any implementation manner thereof).
For example, memory 902 stores a computer program that the processor invokes and executes the computer program in memory 902 such that processor 901 allows transceiver 903 to transmit ethernet frames from a first line card of a first network device to a second network device before a first time, and processor 901 instructs transceiver 903 to transmit frame gaps to the second network device at a second time, and processor 901 prevents transceiver 903 from transmitting ethernet frames from a second line card in apparatus 900 to the second network device at the first time, and processor 901 allows transceiver 903 to transmit ethernet frames from the second line card in apparatus 900 to the second network device at a third time.
Alternatively, the memory 902 and the processor 901 may be integrated together or may be physically separate units from each other.
The apparatus 800 described above may be implemented by a network device 900. For example, the allowing unit 810, the indicating unit 820, the preventing unit 830 and the determining unit in the apparatus 800 may be the processor 901 in the network device 900.
The units and other operations or functions in the apparatus 800 or the network device 900 of the embodiment of the present application are respectively for implementing corresponding operations and/or flows executed by the control board (or controller) of the first network device in the method (e.g., the method 100 and any possible embodiments above) of controlling transmission of ethernet frames of the embodiment of the present application. In other words, the apparatus 800 or the network device 900 in the apparatus embodiment completely corresponds to the control board (or the controller) of the first network device in the method embodiment, and the corresponding units or hardware structures in the apparatus 800 or the network device 900 are used for executing the corresponding steps in the method embodiment. For example, the transceiver unit (transmitter) performs the steps of transmitting in the method embodiments, the receiving module (receiver) performs the steps of receiving in the method embodiments, and other steps than transmitting and receiving may be performed by the control unit (e.g., processor). The transceiver unit may specifically include a transmitting unit and a receiving unit. The transceiver may particularly comprise a transmitter and a receiver to implement a transceiving function. The processor may be one or more.
Furthermore, the present application provides a computer-readable storage medium, which stores therein computer instructions, which when executed on a computer, cause the computer to perform corresponding operations and/or procedures performed by a control board (or controller) of a first network device in the method of controlling transmission of ethernet frames of the embodiments of the present application.
The present application also provides a computer program product, which includes computer program code, when the computer program code runs on a computer, causes the computer to execute the corresponding operations and/or procedures executed by the control board (or controller) of the first network device in the method of controlling transmission of ethernet frames of the embodiments of the present application.
The present application also provides a chip (or, a chip system) including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a network device installed with the chip performs corresponding operations and/or flows performed by a control board (or a controller) of a first network device in the method for controlling transmission of an ethernet frame according to the embodiment of the present application.
In the above embodiments, the processor may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program in the present application. For example, a processor may be comprised of a digital signal processor device, a microprocessor device, an analog to digital converter, a digital to analog converter, and so forth. The processor may distribute the control and signal processing functions of the mobile device between these devices according to their respective functions. Further, the processor may include functionality to operate one or more software programs, which may be stored in the memory.
The functions of the processor can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
The memory may be a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions. Or may be electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or a combination of computer software and electronic hardware depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the disclosed system, apparatus and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The foregoing is only illustrative of the present application. Other implementations will occur to those skilled in the art based on the teachings disclosed herein.

Claims (19)

1. A method of controlling transmission of ethernet frames, comprising:
during switching ethernet frame transmission between a first network device and a second network device from a first line card of the first network device to a second line card of the first network device,
the first network device sends information to the second network device, the information including a frame gap.
2. The method of claim 1, further comprising:
during the switching, the first network device sends an Ethernet frame addressed to the second network device from the first line card to the first line card.
3. The method of claim 2, further comprising:
during the switching, the first network device refrains from sending an Ethernet frame from the first line card addressed to the second network device as the destination address to the second network device.
4. The method of claim 3, further comprising:
the first network device stops sending the information to the second network device and sends an Ethernet frame to the second network device through the second line card after the switching is completed.
5. The method of claim 4, wherein during the handover, the method further comprises:
the first line card sends a first Ethernet frame to the second line card, wherein the first Ethernet frame comprises an Ethernet frame with a destination address of the second network equipment and a first identifier;
or
The second line card sends a second Ethernet frame to the first line card, wherein the second Ethernet frame comprises an Ethernet frame with a destination address of the second network equipment and a second identifier;
the first network device stopping sending the information to the second network device and sending an ethernet frame to the second network device through the second line card after the switching is completed, including:
based on determining that the second line card receives the first ethernet frame or based on determining that the first line card receives the second ethernet frame, the first network device stops sending the information to the second network device after the switching is completed.
6. The method of any of claims 1-5, wherein the first network device sending information to the second network device comprises: and the first network equipment sends the information to the second network equipment according to a time interval specified by an Ethernet communication protocol so as to avoid the second network equipment from generating remote errors.
7. The method according to any of claims 1-5, wherein the frame gap comprises a synchronization signal and an alignment signal.
8. The method of claim 6, wherein the frame gap comprises a synchronization signal and an alignment signal.
9. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-8.
10. A chip, characterized in that it comprises a processor for running a computer program for causing a network device in which the chip is installed to perform the method of any one of claims 1 to 8.
11. The chip of claim 10, further comprising a memory for storing the computer program.
12. An apparatus for controlling transmission of ethernet frames, comprising a processor for running a computer program to cause a chip mounted network device to perform the method of any of claims 1-8.
13. A first network device comprising a first line card, a second line card, and a first circuit, wherein,
the first line card is used for sending the Ethernet frame with the destination address of the second network equipment to the second network equipment,
the first circuit is to: and the first line card sends information to the second network equipment during the period of switching Ethernet frame transmission with a destination address of the second network equipment to the second line card, wherein the information comprises a frame gap.
14. The first network device of claim 13, wherein the first circuit is specifically configured to: and receiving an indication signal from a control device, and sending the information to the second network equipment according to the indication signal.
15. The first network device of claim 14, further comprising the control means.
16. A network system comprising a first network device and a second network device, wherein
The first network device is configured to send an ethernet frame to the second network device;
the first network device includes a first line card and a second line card, and the first network device sends information to the second network device during a period when transmission of Ethernet frames to the second network device is switched from the first line card to the second line card, the information including a frame gap.
17. The network system of claim 16, wherein the first network device further comprises a first circuit configured to: and when the first line card switches the Ethernet frame transmission with the destination address as second network equipment to the second line card, the information is sent to the second network equipment.
18. The network system according to claim 17, wherein the first circuit is specifically configured to: and receiving an indication signal from a control device, and sending the information to the second network equipment according to the indication signal.
19. The network system according to claim 18, wherein said first network device further comprises said control means.
CN202110075915.9A 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame Active CN112865908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110075915.9A CN112865908B (en) 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810547462.3A CN110557268B (en) 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame
CN202110075915.9A CN112865908B (en) 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201810547462.3A Division CN110557268B (en) 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame

Publications (2)

Publication Number Publication Date
CN112865908A CN112865908A (en) 2021-05-28
CN112865908B true CN112865908B (en) 2022-03-08

Family

ID=68734360

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110075915.9A Active CN112865908B (en) 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame
CN201810547462.3A Active CN110557268B (en) 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201810547462.3A Active CN110557268B (en) 2018-05-31 2018-05-31 Method and device for controlling transmission of Ethernet frame

Country Status (1)

Country Link
CN (2) CN112865908B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3873050A4 (en) * 2019-03-29 2022-03-02 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Wireless communication method and device
CN116055418B (en) * 2023-01-29 2023-08-08 成都卓讯云网科技有限公司 Method and device for transmitting Ethernet data, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107113335A (en) * 2015-05-27 2017-08-29 华为技术有限公司 A kind of method for user device switching and equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030235214A1 (en) * 2002-05-07 2003-12-25 Andre Leroux Service channel over the Ethernet inter-frame gap
KR100454681B1 (en) * 2002-11-07 2004-11-03 한국전자통신연구원 An Ethernet switching Apparatus and Method using Frame Multiplexing and Demultiplexing
KR100460672B1 (en) * 2002-12-10 2004-12-09 한국전자통신연구원 Line interface apparatus for 10 gigabit ethernet and control method thereof
CN101247213A (en) * 2007-02-16 2008-08-20 华为技术有限公司 Method and system for master/standby rearrangement
CN101184030B (en) * 2007-11-06 2010-06-16 浙江工业大学 FPGA based Ethernet interface drive set
CN101388817B (en) * 2008-10-30 2011-03-30 上海大学 Hundred megabyte Ethernet extra information transmission method and transmission implementing system
US10404625B2 (en) * 2013-10-29 2019-09-03 Intel Corporation Ethernet enhancements
CN107295547B (en) * 2016-04-05 2021-03-23 中国移动通信有限公司研究院 Wireless signal processing method, device and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107113335A (en) * 2015-05-27 2017-08-29 华为技术有限公司 A kind of method for user device switching and equipment

Also Published As

Publication number Publication date
CN112865908A (en) 2021-05-28
CN110557268B (en) 2021-01-29
CN110557268A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
RU2482614C2 (en) Networks having multiple paths between nodes and nodes for said network
US20140078887A1 (en) Method, Device, and System for Realizing Disaster Tolerance Backup
US8509616B2 (en) Devices, systems and methods for run-time reassignment of a PHY to MAC devices interconnect
US20050276215A1 (en) Network relay system and control method thereof
CN101465859A (en) Method and device for triggering main and standby interface board inverse switch
US9013977B2 (en) Method and system for reducing traffic disturbance in a communication network caused by intermittent failure
CN112865908B (en) Method and device for controlling transmission of Ethernet frame
JP2014195147A (en) Network repeater
CN115589273A (en) EPA communication system
US10097297B2 (en) Apparatus and method for two-way timestamp exchange
JP6383232B2 (en) Relay system and switch device
CN101515835A (en) Method and device for backing up across-board optical port
CN114095462B (en) Fault-tolerant method and system for SRIO communication system of radar processor
US20220278747A1 (en) Optical transmission device and optical transmission system
JP2001237889A (en) Bypass control method and system in data communication network
CN113645312A (en) Method and device for protecting sub-ring network link based on ERPS protocol
US7120112B1 (en) Redundancy in media stream processing
US8553530B1 (en) Operating state control in redundancy protection systems
US20130003528A1 (en) Joint near-end and far-end state machine for service protection networks
CN110798359B (en) Automatic switching high-reliability user number allocation method
CN113839869B (en) BMC network port double-channel PHY chip switching circuit and server
CN113810281B (en) Double-homing protection method, system and equipment
JP5482545B2 (en) Communication apparatus and path switching method
US8477599B2 (en) Method and system for implementing network element-level redundancy
KR101133716B1 (en) Apparatus for stabilizing router in building automatic control system which uses bacnet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant