[go: up one dir, main page]

CN105227452B - data frame forwarding method and device - Google Patents

data frame forwarding method and device Download PDF

Info

Publication number
CN105227452B
CN105227452B CN201510583550.5A CN201510583550A CN105227452B CN 105227452 B CN105227452 B CN 105227452B CN 201510583550 A CN201510583550 A CN 201510583550A CN 105227452 B CN105227452 B CN 105227452B
Authority
CN
China
Prior art keywords
node switch
leaf node
mac address
data frame
port
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
CN201510583550.5A
Other languages
Chinese (zh)
Other versions
CN105227452A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201510583550.5A priority Critical patent/CN105227452B/en
Publication of CN105227452A publication Critical patent/CN105227452A/en
Application granted granted Critical
Publication of CN105227452B publication Critical patent/CN105227452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

本发明实施例提供一种数据帧转发方法及装置。该方法包括:第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头获得待转发数据帧;将待转发数据帧发送给与第一叶子节点交换机连接的根节点交换机,以使根节点交换机依据目的MAC地址将待转发数据帧发送给第二叶子节点交换机。本发明实施例通过将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,保证了该数据帧即使是非以太报文,也可对其进行成功转发。

Embodiments of the present invention provide a data frame forwarding method and device. The method includes: the receiving port of the first leaf node switch adds a header in the received data frame to obtain the data frame to be forwarded; sends the data frame to be forwarded to the root node switch connected to the first leaf node switch, so that The root node switch sends the data frame to be forwarded to the second leaf node switch according to the destination MAC address. In the embodiment of the present invention, all the data frames received by the receiving port of the first leaf node switch are forwarded to the output port of the second leaf node switch, without the need to dynamically learn the MAC address to establish a MAC address table, when the data frame received by the switch In the case of a sharp increase, the capacity of the MAC address table is avoided; in addition, by adding a packet header including the destination MAC address in the data frame, it is ensured that the data frame can be successfully forwarded even if it is a non-Ethernet packet.

Description

数据帧转发方法及装置Data frame forwarding method and device

技术领域technical field

本发明实施例涉及通信技术领域,尤其涉及一种数据帧转发方法及装置。Embodiments of the present invention relate to the field of communication technologies, and in particular, to a data frame forwarding method and device.

背景技术Background technique

在通信技术领域中,以太网交换机是转发数据帧的重要设备,以太网交换机依据接收到的数据帧的目的MAC地址查询MAC地址表获取该目的MAC地址对应的出端口号,以便将该数据帧转发到该出端口,若该MAC地址表中不存在该目的MAC地址对应的表项,则以太网交换机通过动态学习MAC地址在MAC地址表中建立包括该目的MAC地址的表项。In the field of communication technology, the Ethernet switch is an important device for forwarding data frames. The Ethernet switch queries the MAC address table according to the destination MAC address of the received data frame to obtain the output port number corresponding to the destination MAC address, so that the data frame Forwarding to the outgoing port, if there is no entry corresponding to the destination MAC address in the MAC address table, the Ethernet switch establishes an entry including the destination MAC address in the MAC address table by dynamically learning the MAC address.

由于MAC地址表中目的MAC地址与出端口号的对应关系的个数会随着数据帧数量的增大而增加,若以太网交换机接收到的数据帧急剧增加时,会导致MAC地址表容量不足,导致以太网交换机无法将接收的所有数据帧都成功转发出去;另外,若以太网交换机接收到的数据帧是非以太报文时,由于非以太报文没有源MAC地址也没有目的MAC地址,导致以太网交换机将无法转发非以太报文。Since the number of correspondence between the destination MAC address and the outgoing port number in the MAC address table will increase with the increase of the number of data frames, if the number of data frames received by the Ethernet switch increases sharply, the capacity of the MAC address table will be insufficient. , so that the Ethernet switch cannot successfully forward all received data frames; in addition, if the data frame received by the Ethernet switch is a non-Ethernet packet, because the non-Ethernet packet has no source MAC address or destination MAC address, resulting in Ethernet switches will not be able to forward non-Ethernet packets.

发明内容Contents of the invention

本发明实施例提供一种数据帧转发方法及装置,以避免MAC地址表容量不足,同时能够转发非以太报文。Embodiments of the present invention provide a data frame forwarding method and device, so as to avoid insufficient capacity of a MAC address table and simultaneously be able to forward non-Ethernet messages.

本发明实施例的一个方面是提供一种数据帧转发方法,包括:An aspect of the embodiments of the present invention is to provide a data frame forwarding method, including:

第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头获得待转发数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;The receiving port of the first leaf node switch adds a packet header to the received data frame to obtain the data frame to be forwarded, and the packet header includes a destination MAC address, and the destination MAC address is related to the first leaf node switch. Receive the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port;

所述第一叶子节点交换机将所述待转发数据帧发送给与所述第一叶子节点交换机连接的根节点交换机,以使所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机。The first leaf node switch sends the data frame to be forwarded to a root node switch connected to the first leaf node switch, so that the root node switch forwards the data frame to be forwarded according to the destination MAC address sent to the second leaf node switch.

本发明实施例的另一个方面是提供一种数据帧转发方法,包括:Another aspect of the embodiments of the present invention is to provide a data frame forwarding method, including:

根节点交换机接收与其连接的第一叶子节点交换机发送的待转发数据帧,所述待转发数据帧是所述第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头后获得的数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;The root node switch receives the data frame to be forwarded sent by the first leaf node switch connected to it, and the data frame to be forwarded is obtained after the receiving port of the first leaf node switch adds a packet header to the received data frame In a data frame, the message header includes a destination MAC address, and the destination MAC address is the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port of the first leaf node switch;

所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机,以使所述第二叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。The root node switch sends the data frame to be forwarded to the second leaf node switch according to the destination MAC address, so that the second leaf node switch sends the data frame to be forwarded according to the destination MAC address sent to the outgoing port.

本发明实施例的另一个方面是提供一种叶子节点交换机,包括:Another aspect of the embodiments of the present invention is to provide a leaf node switch, including:

报文头添加模块,用于在接收端口接收到的数据帧中增加报文头获得待转发数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述叶子节点交换机的接收端口唯一对应的另一叶子节点交换机的出端口的MAC地址;A message header adding module, configured to add a message header to the data frame received by the receiving port to obtain a data frame to be forwarded, the message header includes a destination MAC address, and the destination MAC address is related to the leaf node switch The MAC address of the egress port of another leaf node switch that only corresponds to the receiving port;

发送模块,用于将所述待转发数据帧发送给与所述叶子节点交换机连接的根节点交换机,以使所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述另一叶子节点交换机。A sending module, configured to send the data frame to be forwarded to a root node switch connected to the leaf node switch, so that the root node switch sends the data frame to be forwarded to the Another leaf node switch.

本发明实施例的另一个方面是提供一种根节点交换机,包括:Another aspect of the embodiments of the present invention is to provide a root node switch, including:

接收模块,用于接收与其连接的第一叶子节点交换机发送的待转发数据帧,所述待转发数据帧是所述第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头后获得的数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;The receiving module is configured to receive the data frame to be forwarded sent by the first leaf node switch connected to it, the data frame to be forwarded is after the receiving port of the first leaf node switch adds a message header to the received data frame In the obtained data frame, the message header includes a destination MAC address, and the destination MAC address is the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port of the first leaf node switch;

发送模块,用于依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机,以使所述第二叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。A sending module, configured to send the data frame to be forwarded to the second leaf node switch according to the destination MAC address, so that the second leaf node switch sends the data frame to be forwarded according to the destination MAC address sent to the outgoing port.

本发明实施例的另一个方面是提供一种数据帧转发系统,包括所述的叶子节点交换机、所述的根节点交换机和所述的另一叶子节点交换机。Another aspect of the embodiments of the present invention is to provide a data frame forwarding system, including the leaf node switch, the root node switch, and the other leaf node switch.

本发明实施例提供的数据帧转发方法及装置,通过预先设定第一叶子节点交换机的接收端口与第二叶子节点交换机的出端口的唯一对应关系,将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是第二叶子节点交换机的出端口的MAC地址,使得第一叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到第二叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。In the data frame forwarding method and device provided by the embodiments of the present invention, the receiving port of the first leaf node switch receives the All the data frames are forwarded to the egress port of the second leaf node switch. There is no need to dynamically learn the MAC address to establish the MAC address table. When the data frames received by the switch increase sharply, the capacity of the MAC address table is avoided; A message header including a destination MAC address is added to the frame, and the destination MAC address is the MAC address of the outgoing port of the second leaf node switch, so that the receiving port of the first leaf node switch forwards the data frame to the second leaf node switch according to the destination MAC address. The egress port of the leaf node switch ensures that the data frame can be successfully forwarded even if it is a non-Ethernet packet.

附图说明Description of drawings

图1为本发明实施例提供的数据帧转发方法流程图;FIG. 1 is a flow chart of a data frame forwarding method provided by an embodiment of the present invention;

图2为本发明实施例提供的数据帧转发方法适用的网络架构图;FIG. 2 is a network architecture diagram applicable to the data frame forwarding method provided by the embodiment of the present invention;

图3为本发明另一实施例提供的数据帧转发方法流程图;FIG. 3 is a flowchart of a data frame forwarding method provided by another embodiment of the present invention;

图4为本发明实施例提供的叶子节点交换机的结构图;FIG. 4 is a structural diagram of a leaf node switch provided by an embodiment of the present invention;

图5为本发明实施例提供的根节点交换机的结构图;FIG. 5 is a structural diagram of a root node switch provided by an embodiment of the present invention;

图6为本发明实施例提供的数据帧转发系统的结构图。FIG. 6 is a structural diagram of a data frame forwarding system provided by an embodiment of the present invention.

具体实施方式Detailed ways

图1为本发明实施例提供的数据帧转发方法流程图;图2为本发明实施例提供的数据帧转发方法适用的网络架构图。本发明实施例针对以太网交换机接收到的数据帧急剧增加时,导致MAC地址表容量不足,以及以太网交换机接收到的数据帧是非以太报文时,以太网交换机将无法转发非以太报文,提供了数据帧转发方法,该方法的具体步骤如下:FIG. 1 is a flowchart of a data frame forwarding method provided by an embodiment of the present invention; FIG. 2 is a network architecture diagram applicable to the data frame forwarding method provided by an embodiment of the present invention. In the embodiment of the present invention, when the data frames received by the Ethernet switch increase sharply, the capacity of the MAC address table is insufficient, and when the data frame received by the Ethernet switch is a non-Ether message, the Ethernet switch will not be able to forward the non-Ether message. A data frame forwarding method is provided, and the specific steps of the method are as follows:

步骤S101、第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头获得待转发数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;Step S101, the receiving port of the first leaf node switch adds a message header to the received data frame to obtain the data frame to be forwarded, the message header includes a destination MAC address, and the destination MAC address is the same as that of the first leaf node The MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port of the node switch;

如图2所示,本发明实施例适用的网络架构包括光路径配置器21、根节点交换机22、叶子节点交换机A 23、叶子节点交换机B 24、叶子节点交换机C 25和叶子节点交换机D26,其中,每个叶子节点交换机均包括3个端口分别为端口1、端口2和端口3,本发明实施例并不限定叶子节点交换机的个数、每个叶子节点交换机的端口数量,以及根节点交换机的个数。As shown in Figure 2, the network architecture applicable to the embodiment of the present invention includes an optical path configurator 21, a root node switch 22, a leaf node switch A 23, a leaf node switch B 24, a leaf node switch C 25, and a leaf node switch D26, wherein , each leaf node switch includes three ports respectively port 1, port 2, and port 3. The embodiment of the present invention does not limit the number of leaf node switches, the number of ports of each leaf node switch, and the number of ports of the root node switch. number.

在本发明实施例中,第一叶子节点交换机和第二叶子节点交换机具体为叶子节点交换机A 23、叶子节点交换机B 24、叶子节点交换机C 25和叶子节点交换机D 26中任意两个不同的交换机,且每个叶子节点交换机不同的端口对应有不同的MAC地址,且任意两个叶子节点交换机相同的端口号对应的MAC地址也不同。光路径配置器21预先存储有端口对应表,该端口对应表包括多个表项,每个表项包括第一叶子节点交换机的接收端口、接收端口对应的MAC地址,以及与该第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口、出端口对应的MAC地址,光路径配置器21将该表项配置到第一叶子节点交换机,同时,光路径配置器21还向根节点交换机22配置转发表,该转发表的每个表项包括:第二叶子节点交换机的出端口、出端口对应的MAC地址,以及根节点交换机22与第二叶子节点交换机的连接端口。In this embodiment of the present invention, the first leaf node switch and the second leaf node switch are specifically any two different switches among leaf node switch A 23, leaf node switch B 24, leaf node switch C 25, and leaf node switch D 26. , and different ports of each leaf node switch correspond to different MAC addresses, and the MAC addresses corresponding to the same port numbers of any two leaf node switches are also different. The optical path configurator 21 pre-stores a port correspondence table, and the port correspondence table includes a plurality of entries, and each entry includes a receiving port of the first leaf node switch, a MAC address corresponding to the receiving port, and a corresponding MAC address of the first leaf node switch. The receiving port of the switch uniquely corresponds to the outgoing port of the second leaf node switch, and the MAC address corresponding to the outgoing port. The optical path configuration device 21 configures the entry to the first leaf node switch. The node switch 22 is configured with a forwarding table, and each entry in the forwarding table includes: the egress port of the second leaf node switch, the MAC address corresponding to the egress port, and the connection port between the root node switch 22 and the second leaf node switch.

由于光路径配置器21配置到第一叶子节点交换机的表项包括第一叶子节点交换机的接收端口、接收端口对应的MAC地址,以及与该第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口、出端口对应的MAC地址,例如,第一叶子节点交换机是叶子节点交换机A,第二叶子节点交换机是叶子节点交换机D,叶子节点交换机A的接收端口为端口1,叶子节点交换机D的出端口为端口3,则当叶子节点交换机A的端口1接收到数据帧时,叶子节点交换机A的端口1在该数据帧的头部加上报文头获得待转发数据帧,该报文头包括目的MAC地址,该目的MAC地址是叶子节点交换机D的端口3的MAC地址。Since the entry configured by the optical path configurator 21 to the first leaf node switch includes the receiving port of the first leaf node switch, the MAC address corresponding to the receiving port, and the second leaf node uniquely corresponding to the receiving port of the first leaf node switch The outgoing port of the node switch and the MAC address corresponding to the outgoing port. For example, the first leaf node switch is leaf node switch A, the second leaf node switch is leaf node switch D, and the receiving port of leaf node switch A is port 1. The outgoing port of switch D is port 3, and when port 1 of leaf node switch A receives a data frame, port 1 of leaf node switch A adds a message header to the head of the data frame to obtain the data frame to be forwarded. The packet header includes a destination MAC address, and the destination MAC address is the MAC address of port 3 of the leaf node switch D.

步骤S102、所述第一叶子节点交换机将所述待转发数据帧发送给与所述第一叶子节点交换机连接的根节点交换机,以使所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机。Step S102, the first leaf node switch sends the to-be-forwarded data frame to a root node switch connected to the first leaf node switch, so that the root node switch forwards the to-be-forwarded data frame according to the destination MAC address The forwarding data frame is sent to the second leaf node switch.

叶子节点交换机A的端口1在该数据帧的头部加上报文头之后,叶子节点交换机A将该待转发数据帧发送给与叶子节点交换机A连接的根节点交换机22,叶子节点交换机A转发该待转发数据帧的端口具体为叶子节点交换机A与根节点交换机22的连接端口MA,根节点交换机22依据光路径配置器21向根节点交换机22配置的转发表,从该转发表中查询获知目的MAC地址为叶子节点交换机D的端口3的MAC地址的待转发数据帧需从根节点交换机22与叶子节点交换机D的连接端口MD发送出去,即发送到叶子节点交换机D,另外,目的MAC地址为叶子节点交换机D的端口2或端口1的MAC地址的待转发数据帧也需从根节点交换机22与叶子节点交换机D的连接端口MD发送出去,即发送到叶子节点交换机D。叶子节点交换机D接收到待转发数据帧后,依据自身每个端口对应的MAC地址确定该目的MAC地址对应的端口是端口3的MAC地址,则将该待转发数据帧发送到端口3,由叶子节点交换机D的端口3将待转发数据帧中由叶子节点交换机A的端口1添加的报文头去掉获得数据帧,并将该数据帧从端口3转发出去。After the port 1 of the leaf node switch A adds a message header to the head of the data frame, the leaf node switch A sends the data frame to be forwarded to the root node switch 22 connected to the leaf node switch A, and the leaf node switch A forwards The port of the data frame to be forwarded is specifically the connection port MA between the leaf node switch A and the root node switch 22, and the root node switch 22 queries the forwarding table according to the forwarding table configured by the optical path configurator 21 to the root node switch 22. The data frame to be forwarded whose destination MAC address is the MAC address of port 3 of the leaf node switch D needs to be sent out from the connection port MD of the root node switch 22 and the leaf node switch D, that is, sent to the leaf node switch D. In addition, the destination MAC address The data frame to be forwarded with the MAC address of port 2 or port 1 of the leaf node switch D also needs to be sent out from the connection port MD between the root node switch 22 and the leaf node switch D, that is, to the leaf node switch D. After the leaf node switch D receives the data frame to be forwarded, it determines that the port corresponding to the destination MAC address is the MAC address of port 3 according to the MAC address corresponding to each port of itself, then sends the data frame to be forwarded to port 3, and the leaf node Port 3 of node switch D removes the packet header added by port 1 of leaf node switch A in the data frame to be forwarded to obtain a data frame, and forwards the data frame through port 3.

本发明实施例通过预先设定第一叶子节点交换机的接收端口与第二叶子节点交换机的出端口的唯一对应关系,将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是第二叶子节点交换机的出端口的MAC地址,使得第一叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到第二叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。In the embodiment of the present invention, by presetting the unique correspondence between the receiving port of the first leaf node switch and the outgoing port of the second leaf node switch, all data frames received by the receiving port of the first leaf node switch are forwarded to the second leaf node. The outgoing port of the node switch does not need to dynamically learn the MAC address to establish the MAC address table. When the data frames received by the switch increase sharply, the capacity of the MAC address table is avoided; header, the destination MAC address is the MAC address of the outgoing port of the second leaf node switch, so that the receiving port of the first leaf node switch forwards the data frame to the outgoing port of the second leaf node switch according to the destination MAC address, ensuring Even if the data frame is a non-Ethernet message, it can be successfully forwarded.

在上述实施例的基础上,所述报文头还包括源MAC地址,所述源MAC地址是所述第一叶子节点交换机的接收端口对应的MAC地址。On the basis of the foregoing embodiments, the packet header further includes a source MAC address, and the source MAC address is a MAC address corresponding to a receiving port of the first leaf node switch.

当叶子节点交换机A的端口1接收到数据帧时,叶子节点交换机A的端口1在该数据帧的头部加上报文头获得待转发数据帧,该报文头包括目的MAC地址和源MAC地址,该目的MAC地址是叶子节点交换机D的端口3的MAC地址,该源MAC地址是叶子节点交换机A的端口1的MAC地址。When port 1 of leaf node switch A receives a data frame, port 1 of leaf node switch A adds a header to the header of the data frame to obtain the data frame to be forwarded. The header includes the destination MAC address and source MAC address, the destination MAC address is the MAC address of port 3 of the leaf node switch D, and the source MAC address is the MAC address of port 1 of the leaf node switch A.

图3为本发明另一实施例提供的数据帧转发方法流程图。本发明实施例针对以太网交换机接收到的数据帧急剧增加时,导致MAC地址表容量不足,以及以太网交换机接收到的数据帧是非以太报文时,以太网交换机将无法转发非以太报文,提供了数据帧转发方法,该方法的具体步骤如下:Fig. 3 is a flowchart of a data frame forwarding method provided by another embodiment of the present invention. In the embodiment of the present invention, when the data frames received by the Ethernet switch increase sharply, the capacity of the MAC address table is insufficient, and when the data frame received by the Ethernet switch is a non-Ether message, the Ethernet switch will not be able to forward the non-Ether message. A data frame forwarding method is provided, and the specific steps of the method are as follows:

步骤S301、根节点交换机接收与其连接的第一叶子节点交换机发送的待转发数据帧,所述待转发数据帧是所述第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头后获得的数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;Step S301, the root node switch receives the data frame to be forwarded sent by the first leaf node switch connected to it, and the data frame to be forwarded is that the receiving port of the first leaf node switch adds a message header to the received data frame In the data frame obtained afterward, the message header includes a destination MAC address, and the destination MAC address is the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port of the first leaf node switch;

如图2所示,本发明实施例适用的网络架构包括光路径配置器21、根节点交换机22、叶子节点交换机A 23、叶子节点交换机B 24、叶子节点交换机C 25和叶子节点交换机D26,其中,每个叶子节点交换机均包括3个端口分别为端口1、端口2和端口3,本发明实施例并不限定叶子节点交换机的个数、每个叶子节点交换机的端口数量,以及根节点交换机的个数。As shown in Figure 2, the network architecture applicable to the embodiment of the present invention includes an optical path configurator 21, a root node switch 22, a leaf node switch A 23, a leaf node switch B 24, a leaf node switch C 25, and a leaf node switch D26, wherein , each leaf node switch includes three ports respectively port 1, port 2, and port 3. The embodiment of the present invention does not limit the number of leaf node switches, the number of ports of each leaf node switch, and the number of ports of the root node switch. number.

在本发明实施例中,第一叶子节点交换机和第二叶子节点交换机具体为叶子节点交换机A 23、叶子节点交换机B 24、叶子节点交换机C 25和叶子节点交换机D 26中任意两个不同的交换机,且每个叶子节点交换机不同的端口对应有不同的MAC地址,且任意两个叶子节点交换机相同的端口号对应的MAC地址也不同。光路径配置器21预先存储有端口对应表,该端口对应表包括多个表项,每个表项包括第一叶子节点交换机的接收端口、接收端口对应的MAC地址,以及与该第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口、出端口对应的MAC地址,光路径配置器21将该表项配置到第一叶子节点交换机,同时,光路径配置器21还向根节点交换机22配置转发表,该转发表的每个表项包括:第二叶子节点交换机的出端口、出端口对应的MAC地址,以及根节点交换机22与第二叶子节点交换机的连接端口。In this embodiment of the present invention, the first leaf node switch and the second leaf node switch are specifically any two different switches among leaf node switch A 23, leaf node switch B 24, leaf node switch C 25, and leaf node switch D 26. , and different ports of each leaf node switch correspond to different MAC addresses, and the MAC addresses corresponding to the same port numbers of any two leaf node switches are also different. The optical path configurator 21 pre-stores a port correspondence table, and the port correspondence table includes a plurality of entries, and each entry includes a receiving port of the first leaf node switch, a MAC address corresponding to the receiving port, and a corresponding MAC address of the first leaf node switch. The receiving port of the switch uniquely corresponds to the outgoing port of the second leaf node switch, and the MAC address corresponding to the outgoing port. The optical path configuration device 21 configures the entry to the first leaf node switch. The node switch 22 is configured with a forwarding table, and each entry in the forwarding table includes: the egress port of the second leaf node switch, the MAC address corresponding to the egress port, and the connection port between the root node switch 22 and the second leaf node switch.

由于光路径配置器21配置到第一叶子节点交换机的表项包括第一叶子节点交换机的接收端口、接收端口对应的MAC地址,以及与该第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口、出端口对应的MAC地址,例如,第一叶子节点交换机是叶子节点交换机A,第二叶子节点交换机是叶子节点交换机D,叶子节点交换机A的接收端口为端口1,叶子节点交换机D的出端口为端口3,则当叶子节点交换机A的端口1接收到数据帧时,叶子节点交换机A的端口1在该数据帧的头部加上报文头获得待转发数据帧,该报文头包括目的MAC地址,该目的MAC地址是叶子节点交换机D的端口3的MAC地址。Since the entry configured by the optical path configurator 21 to the first leaf node switch includes the receiving port of the first leaf node switch, the MAC address corresponding to the receiving port, and the second leaf node uniquely corresponding to the receiving port of the first leaf node switch The outgoing port of the node switch and the MAC address corresponding to the outgoing port. For example, the first leaf node switch is leaf node switch A, the second leaf node switch is leaf node switch D, and the receiving port of leaf node switch A is port 1. The outgoing port of switch D is port 3, and when port 1 of leaf node switch A receives a data frame, port 1 of leaf node switch A adds a message header to the head of the data frame to obtain the data frame to be forwarded. The packet header includes a destination MAC address, and the destination MAC address is the MAC address of port 3 of the leaf node switch D.

步骤S302、所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机,以使所述第二叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。Step S302, the root node switch sends the data frame to be forwarded to the second leaf node switch according to the destination MAC address, so that the second leaf node switch sends the data frame to be forwarded according to the destination MAC address The forwarded data frame is sent to the egress port.

叶子节点交换机A的端口1在该数据帧的头部加上报文头之后,叶子节点交换机A将该待转发数据帧发送给与叶子节点交换机A连接的根节点交换机22,叶子节点交换机A转发该待转发数据帧的端口具体为叶子节点交换机A与根节点交换机22的连接端口MA,根节点交换机22依据光路径配置器21向根节点交换机22配置的转发表,从该转发表中查询获知目的MAC地址为叶子节点交换机D的端口3的MAC地址的待转发数据帧需从根节点交换机22与叶子节点交换机D的连接端口MD发送出去,即发送到叶子节点交换机D,另外,目的MAC地址为叶子节点交换机D的端口2或端口1的MAC地址的待转发数据帧也需从根节点交换机22与叶子节点交换机D的连接端口MD发送出去,即发送到叶子节点交换机D。叶子节点交换机D接收到待转发数据帧后,依据自身每个端口对应的MAC地址确定该目的MAC地址对应的端口是端口3的MAC地址,则将该待转发数据帧发送到端口3,由叶子节点交换机D的端口3将待转发数据帧中由叶子节点交换机A的端口1添加的报文头去掉获得数据帧,并将该数据帧从端口3转发出去。After the port 1 of the leaf node switch A adds a message header to the head of the data frame, the leaf node switch A sends the data frame to be forwarded to the root node switch 22 connected to the leaf node switch A, and the leaf node switch A forwards The port of the data frame to be forwarded is specifically the connection port MA between the leaf node switch A and the root node switch 22, and the root node switch 22 queries the forwarding table according to the forwarding table configured by the optical path configurator 21 to the root node switch 22. The data frame to be forwarded whose destination MAC address is the MAC address of port 3 of the leaf node switch D needs to be sent out from the connection port MD of the root node switch 22 and the leaf node switch D, that is, sent to the leaf node switch D. In addition, the destination MAC address The data frame to be forwarded with the MAC address of port 2 or port 1 of the leaf node switch D also needs to be sent out from the connection port MD between the root node switch 22 and the leaf node switch D, that is, to the leaf node switch D. After the leaf node switch D receives the data frame to be forwarded, it determines that the port corresponding to the destination MAC address is the MAC address of port 3 according to the MAC address corresponding to each port of itself, then sends the data frame to be forwarded to port 3, and the leaf node Port 3 of node switch D removes the packet header added by port 1 of leaf node switch A in the data frame to be forwarded to obtain a data frame, and forwards the data frame through port 3.

本发明实施例通过预先设定第一叶子节点交换机的接收端口与第二叶子节点交换机的出端口的唯一对应关系,将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是第二叶子节点交换机的出端口的MAC地址,使得第一叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到第二叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。In the embodiment of the present invention, by presetting the unique correspondence between the receiving port of the first leaf node switch and the outgoing port of the second leaf node switch, all data frames received by the receiving port of the first leaf node switch are forwarded to the second leaf node. The outgoing port of the node switch does not need to dynamically learn the MAC address to establish the MAC address table. When the data frames received by the switch increase sharply, the capacity of the MAC address table is avoided; header, the destination MAC address is the MAC address of the outgoing port of the second leaf node switch, so that the receiving port of the first leaf node switch forwards the data frame to the outgoing port of the second leaf node switch according to the destination MAC address, ensuring Even if the data frame is a non-Ethernet message, it can be successfully forwarded.

在上述实施例的基础上,所述根节点交换机预先存储有转发表,所述转发表包括多个表项,每个表项包括MAC地址和转发端口的对应关系,所述MAC地址是与所述根节点交换机连接的叶子节点交换机的任一端口对应的MAC地址,所述转发端口是所述根节点交换机与所述MAC地址对应的叶子节点交换机的连接端口。On the basis of the above embodiments, the root node switch pre-stores a forwarding table, the forwarding table includes a plurality of entries, each entry includes a correspondence between a MAC address and a forwarding port, and the MAC address is related to the The MAC address corresponding to any port of the leaf node switch connected to the root node switch, the forwarding port is a connection port between the root node switch and the leaf node switch corresponding to the MAC address.

本发明实施例中,所述根节点交换机预先存储有转发表即为上述实施例中光路径配置器21向根节点交换机22配置的转发表。In the embodiment of the present invention, the forwarding table pre-stored in the root node switch is the forwarding table configured by the optical path configurator 21 to the root node switch 22 in the above embodiment.

所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机,包括:所述根节点交换机依据所述目的MAC地址将所述待转发数据帧通过所述根节点交换机与所述第二叶子节点交换机的连接端口发送给所述第二叶子节点交换机。The root node switch sending the data frame to be forwarded to the second leaf node switch according to the destination MAC address includes: the root node switch passing the data frame to be forwarded through the The connection port between the root node switch and the second leaf node switch is sent to the second leaf node switch.

根节点交换机22依据光路径配置器21向根节点交换机22配置的转发表,从该转发表中查询获知目的MAC地址为叶子节点交换机D的端口3的MAC地址的待转发数据帧需从根节点交换机22与叶子节点交换机D的连接端口MD发送出去。The root node switch 22 configures the forwarding table to the root node switch 22 according to the optical path configurator 21. From the forwarding table, query and learn that the data frame to be forwarded whose destination MAC address is the MAC address of port 3 of the leaf node switch D needs to be forwarded from the root node. The connection port MD between the switch 22 and the leaf node switch D sends out.

本发明实施例通过预先设定第一叶子节点交换机的接收端口与第二叶子节点交换机的出端口的唯一对应关系,将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是第二叶子节点交换机的出端口的MAC地址,使得第一叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到第二叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。In the embodiment of the present invention, by presetting the unique correspondence between the receiving port of the first leaf node switch and the outgoing port of the second leaf node switch, all data frames received by the receiving port of the first leaf node switch are forwarded to the second leaf node. The outgoing port of the node switch does not need to dynamically learn the MAC address to establish the MAC address table. When the data frames received by the switch increase sharply, the capacity of the MAC address table is avoided; header, the destination MAC address is the MAC address of the outgoing port of the second leaf node switch, so that the receiving port of the first leaf node switch forwards the data frame to the outgoing port of the second leaf node switch according to the destination MAC address, ensuring Even if the data frame is a non-Ethernet message, it can be successfully forwarded.

图4为本发明实施例提供的叶子节点交换机的结构图。本发明实施例提供的叶子节点交换机可以执行数据帧转发方法实施例提供的处理流程,如图4所示,叶子节点交换机40包括报文头添加模块41和发送模块42,其中,报文头添加模块41用于在接收端口接收到的数据帧中增加报文头获得待转发数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述叶子节点交换机的接收端口唯一对应的另一叶子节点交换机的出端口的MAC地址;发送模块42用于将所述待转发数据帧发送给与所述叶子节点交换机连接的根节点交换机,以使所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述另一叶子节点交换机。FIG. 4 is a structural diagram of a leaf node switch provided by an embodiment of the present invention. The leaf node switch provided by the embodiment of the present invention can execute the processing flow provided by the embodiment of the data frame forwarding method. As shown in FIG. Module 41 is used to add a message header to the data frame received by the receiving port to obtain the data frame to be forwarded, the message header includes a destination MAC address, and the destination MAC address is uniquely corresponding to the receiving port of the leaf node switch The MAC address of the outgoing port of another leaf node switch; the sending module 42 is used to send the data frame to be forwarded to the root node switch connected to the leaf node switch, so that the root node switch according to the purpose The MAC address sends the to-be-forwarded data frame to the other leaf node switch.

本发明实施例通过预先设定叶子节点交换机的接收端口与另一叶子节点交换机的出端口的唯一对应关系,将叶子节点交换机的接收端口接收到的数据帧都转发到另一叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是另一叶子节点交换机的出端口的MAC地址,使得叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到另一叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。In the embodiment of the present invention, by presetting the unique correspondence between the receiving port of the leaf node switch and the outgoing port of another leaf node switch, all the data frames received by the receiving port of the leaf node switch are forwarded to the outgoing port of another leaf node switch. Ports do not need to dynamically learn the MAC address to establish a MAC address table. When the data frames received by the switch increase sharply, the capacity of the MAC address table is avoided. In addition, by adding a packet header including the destination MAC address in the data frame, the The destination MAC address is the MAC address of the egress port of another leaf node switch, so that the receiving port of the leaf node switch forwards the data frame to the egress port of another leaf node switch according to the destination MAC address, ensuring that the data frame even if it is a non-Ethernet The message can also be successfully forwarded.

图5为本发明实施例提供的根节点交换机的结构图。本发明实施例提供的根节点交换机可以执行数据帧转发方法实施例提供的处理流程,如图5所示,根节点交换机50包括接收模块51和发送模块52,其中,接收模块51用于接收与其连接的第一叶子节点交换机发送的待转发数据帧,所述待转发数据帧是所述第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头后获得的数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;发送模块52用于依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机,以使所述第二叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。FIG. 5 is a structural diagram of a root node switch provided by an embodiment of the present invention. The root node switch provided by the embodiment of the present invention can execute the processing flow provided by the embodiment of the data frame forwarding method. As shown in FIG. The to-be-forwarded data frame sent by the connected first leaf node switch, the to-be-forwarded data frame is a data frame obtained by adding a header to the received data frame at the receiving port of the first leaf node switch, and the The packet header includes a destination MAC address, and the destination MAC address is the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port of the first leaf node switch; the sending module 52 is configured to The address sends the data frame to be forwarded to the second leaf node switch, so that the second leaf node switch sends the data frame to be forwarded to the egress port according to the destination MAC address.

本发明实施例通过预先设定第一叶子节点交换机的接收端口与第二叶子节点交换机的出端口的唯一对应关系,将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是第二叶子节点交换机的出端口的MAC地址,使得第一叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到第二叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。In the embodiment of the present invention, by presetting the unique correspondence between the receiving port of the first leaf node switch and the outgoing port of the second leaf node switch, all data frames received by the receiving port of the first leaf node switch are forwarded to the second leaf node. The outgoing port of the node switch does not need to dynamically learn the MAC address to establish the MAC address table. When the data frames received by the switch increase sharply, the capacity of the MAC address table is avoided; header, the destination MAC address is the MAC address of the outgoing port of the second leaf node switch, so that the receiving port of the first leaf node switch forwards the data frame to the outgoing port of the second leaf node switch according to the destination MAC address, ensuring Even if the data frame is a non-Ethernet message, it can be successfully forwarded.

在上述实施例的基础上,根节点交换机50预先存储有转发表,所述转发表包括多个表项,每个表项包括MAC地址和转发端口的对应关系,所述MAC地址是与所述根节点交换机连接的叶子节点交换机的任一端口对应的MAC地址,所述转发端口是所述根节点交换机与所述MAC地址对应的叶子节点交换机的连接端口。On the basis of the above-mentioned embodiments, the root node switch 50 pre-stores a forwarding table, the forwarding table includes a plurality of entries, and each entry includes a correspondence between a MAC address and a forwarding port, and the MAC address is related to the The MAC address corresponding to any port of the leaf node switch connected to the root node switch, and the forwarding port is a connection port between the root node switch and the leaf node switch corresponding to the MAC address.

发送模块52具体用于依据所述目的MAC地址将所述待转发数据帧通过所述根节点交换机与所述第二叶子节点交换机的连接端口发送给所述第二叶子节点交换机。The sending module 52 is specifically configured to send the data frame to be forwarded to the second leaf node switch through a connection port between the root node switch and the second leaf node switch according to the destination MAC address.

本发明实施例提供的根节点交换机可以具体用于执行上述图3所提供的方法实施例,具体功能此处不再赘述。The root node switch provided in the embodiment of the present invention can be specifically used to execute the method embodiment provided in FIG. 3 above, and the specific functions will not be repeated here.

本发明实施例通过预先设定第一叶子节点交换机的接收端口与第二叶子节点交换机的出端口的唯一对应关系,将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是第二叶子节点交换机的出端口的MAC地址,使得第一叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到第二叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。In the embodiment of the present invention, by presetting the unique correspondence between the receiving port of the first leaf node switch and the outgoing port of the second leaf node switch, all data frames received by the receiving port of the first leaf node switch are forwarded to the second leaf node. The outgoing port of the node switch does not need to dynamically learn the MAC address to establish the MAC address table. When the data frames received by the switch increase sharply, the capacity of the MAC address table is avoided; header, the destination MAC address is the MAC address of the outgoing port of the second leaf node switch, so that the receiving port of the first leaf node switch forwards the data frame to the outgoing port of the second leaf node switch according to the destination MAC address, ensuring Even if the data frame is a non-Ethernet message, it can be successfully forwarded.

图6为本发明实施例提供的数据帧转发系统的结构图。本发明实施例提供的数据帧转发系统可以执行数据帧转发方法实施例提供的处理流程,如图6所示,数据帧转发系统60包括上述实施例中的叶子节点交换机40、上述实施例中的根节点交换机50和上述实施例中的另一叶子节点交换机61。FIG. 6 is a structural diagram of a data frame forwarding system provided by an embodiment of the present invention. The data frame forwarding system provided by the embodiment of the present invention can execute the processing flow provided by the embodiment of the data frame forwarding method. As shown in FIG. 6, the data frame forwarding system 60 includes the leaf node switch 40 in the above embodiment, the The root node switch 50 and another leaf node switch 61 in the above embodiment.

本发明实施例提供的数据帧转发系统可以执行数据帧转发方法实施例提供的处理流程。The data frame forwarding system provided in the embodiment of the present invention can execute the processing flow provided in the data frame forwarding method embodiment.

综上所述,本发明实施例通过预先设定第一叶子节点交换机的接收端口与第二叶子节点交换机的出端口的唯一对应关系,将第一叶子节点交换机的接收端口接收到的数据帧都转发到第二叶子节点交换机的出端口,不需要通过动态学习MAC地址建立MAC地址表,当交换机接收到的数据帧急剧增加时,避免MAC地址表容量不足;另外,通过在数据帧中增加包括目的MAC地址的报文头,该目的MAC地址是第二叶子节点交换机的出端口的MAC地址,使得第一叶子节点交换机的接收端口依据该目的MAC地址将数据帧转发到第二叶子节点交换机的出端口,保证了该数据帧即使是非以太报文,也可对其进行成功转发。To sum up, in this embodiment of the present invention, by presetting the unique correspondence between the receiving port of the first leaf node switch and the outgoing port of the second leaf node switch, all data frames received by the receiving port of the first leaf node switch are Forwarding to the outgoing port of the second leaf node switch does not need to establish a MAC address table by dynamically learning the MAC address. When the data frames received by the switch increase sharply, the MAC address table capacity is avoided; in addition, by adding The message header of the destination MAC address, the destination MAC address is the MAC address of the outgoing port of the second leaf node switch, so that the receiving port of the first leaf node switch forwards the data frame to the second leaf node switch according to the destination MAC address The outgoing port ensures that the data frame can be successfully forwarded even if it is a non-Ethernet packet.

在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.

上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) or a processor (processor) execute the methods described in various embodiments of the present invention. partial steps. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .

本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional modules is used as an example for illustration. The internal structure of the system is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiments, and details are not repeated here.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.

Claims (10)

1.一种数据帧转发方法,其特征在于,包括:1. A data frame forwarding method, characterized in that, comprising: 第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头获得待转发数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;The receiving port of the first leaf node switch adds a packet header to the received data frame to obtain the data frame to be forwarded, and the packet header includes a destination MAC address, and the destination MAC address is related to the first leaf node switch. Receive the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port; 所述第一叶子节点交换机将所述待转发数据帧发送给与所述第一叶子节点交换机连接的根节点交换机,以使所述根节点交换机依据所述目的MAC地址从光路径配置器向所述根节点交换机配置的转发表中查询对应的转发端口,并通过所述转发端口将所述待转发数据帧发送给所述第二叶子节点交换机,从而使所述第二叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。The first leaf node switch sends the to-be-forwarded data frame to a root node switch connected to the first leaf node switch, so that the root node switch transmits the data frame from the optical path configuration device to the Query the corresponding forwarding port in the forwarding table configured by the root node switch, and send the data frame to be forwarded to the second leaf node switch through the forwarding port, so that the second leaf node switch according to the The destination MAC address sends the to-be-forwarded data frame to the egress port. 2.根据权利要求1所述的方法,其特征在于,所述报文头还包括源MAC地址,所述源MAC地址是所述第一叶子节点交换机的接收端口对应的MAC地址。2. The method according to claim 1, wherein the packet header further includes a source MAC address, and the source MAC address is a MAC address corresponding to a receiving port of the first leaf node switch. 3.一种数据帧转发方法,其特征在于,包括:3. A data frame forwarding method, characterized in that, comprising: 根节点交换机接收与其连接的第一叶子节点交换机发送的待转发数据帧,所述待转发数据帧是所述第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头后获得的数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;The root node switch receives the data frame to be forwarded sent by the first leaf node switch connected to it, and the data frame to be forwarded is obtained after the receiving port of the first leaf node switch adds a packet header to the received data frame In a data frame, the message header includes a destination MAC address, and the destination MAC address is the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port of the first leaf node switch; 所述根节点交换机依据所述目的MAC地址从光路径配置器向所述根节点交换机配置的转发表中查询对应的转发端口,并通过所述转发端口将所述待转发数据帧发送给所述第二叶子节点交换机,以使所述第二叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。The root node switch queries the corresponding forwarding port from the forwarding table configured by the optical path configurator to the root node switch according to the destination MAC address, and sends the data frame to be forwarded to the The second leaf node switch, so that the second leaf node switch sends the data frame to be forwarded to the egress port according to the destination MAC address. 4.根据权利要求3所述的方法,其特征在于,所述根节点交换机预先存储有转发表,所述转发表包括多个表项,每个表项包括MAC地址和转发端口的对应关系,所述MAC地址是与所述根节点交换机连接的叶子节点交换机的任一端口对应的MAC地址,所述转发端口是所述根节点交换机与所述MAC地址对应的叶子节点交换机的连接端口。4. The method according to claim 3, wherein the root node switch is pre-stored with a forwarding table, the forwarding table includes a plurality of entries, and each entry includes a correspondence between a MAC address and a forwarding port, The MAC address is a MAC address corresponding to any port of a leaf node switch connected to the root node switch, and the forwarding port is a connection port of the root node switch to a leaf node switch corresponding to the MAC address. 5.根据权利要求4所述的方法,其特征在于,所述根节点交换机依据所述目的MAC地址将所述待转发数据帧发送给所述第二叶子节点交换机,包括:5. The method according to claim 4, wherein the root node switch sends the data frame to be forwarded to the second leaf node switch according to the destination MAC address, comprising: 所述根节点交换机依据所述目的MAC地址将所述待转发数据帧通过所述根节点交换机与所述第二叶子节点交换机的连接端口发送给所述第二叶子节点交换机。The root node switch sends the data frame to be forwarded to the second leaf node switch through a connection port between the root node switch and the second leaf node switch according to the destination MAC address. 6.一种叶子节点交换机,其特征在于,包括:6. A leaf node switch, characterized in that, comprising: 报文头添加模块,用于在接收端口接收到的数据帧中增加报文头获得待转发数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述叶子节点交换机的接收端口唯一对应的另一叶子节点交换机的出端口的MAC地址;A message header adding module, configured to add a message header to the data frame received by the receiving port to obtain a data frame to be forwarded, the message header includes a destination MAC address, and the destination MAC address is related to the leaf node switch Receive the MAC address of the egress port of another leaf node switch uniquely corresponding to the receiving port; 发送模块,用于将所述待转发数据帧发送给与所述叶子节点交换机连接的根节点交换机,以使所述根节点交换机依据所述目的MAC地址从光路径配置器向所述根节点交换机配置的转发表中查询对应的转发端口,并通过所述转发端口将所述待转发数据帧发送给所述另一叶子节点交换机,从而使所述另一叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。A sending module, configured to send the to-be-forwarded data frame to a root node switch connected to the leaf node switch, so that the root node switch transmits from the optical path configuration device to the root node switch according to the destination MAC address Query the corresponding forwarding port in the configured forwarding table, and send the data frame to be forwarded to the other leaf node switch through the forwarding port, so that the other leaf node switch sends The data frame to be forwarded is sent to the egress port. 7.一种根节点交换机,其特征在于,包括:7. A root node switch, characterized in that, comprising: 接收模块,用于接收与其连接的第一叶子节点交换机发送的待转发数据帧,所述待转发数据帧是所述第一叶子节点交换机的接收端口在接收到的数据帧中增加报文头后获得的数据帧,所述报文头包括目的MAC地址,所述目的MAC地址是与所述第一叶子节点交换机的接收端口唯一对应的第二叶子节点交换机的出端口的MAC地址;The receiving module is configured to receive the data frame to be forwarded sent by the first leaf node switch connected to it, the data frame to be forwarded is after the receiving port of the first leaf node switch adds a message header to the received data frame In the obtained data frame, the message header includes a destination MAC address, and the destination MAC address is the MAC address of the outgoing port of the second leaf node switch uniquely corresponding to the receiving port of the first leaf node switch; 发送模块,用于依据所述目的MAC地址从光路径配置器向所述根节点交换机配置的转发表中查询对应的转发端口,并通过所述转发端口将所述待转发数据帧发送给所述第二叶子节点交换机,以使所述第二叶子节点交换机依据所述目的MAC地址将所述待转发数据帧发送到所述出端口。A sending module, configured to query the corresponding forwarding port from the forwarding table configured by the optical path configurator to the root node switch according to the destination MAC address, and send the data frame to be forwarded to the forwarding port through the forwarding port The second leaf node switch, so that the second leaf node switch sends the data frame to be forwarded to the egress port according to the destination MAC address. 8.根据权利要求7所述的根节点交换机,其特征在于,所述根节点交换机预先存储有转发表,所述转发表包括多个表项,每个表项包括MAC地址和转发端口的对应关系,所述MAC地址是与所述根节点交换机连接的叶子节点交换机的任一端口对应的MAC地址,所述转发端口是所述根节点交换机与所述MAC地址对应的叶子节点交换机的连接端口。8. The root node switch according to claim 7, wherein the root node switch is pre-stored with a forwarding table, and the forwarding table includes a plurality of entries, and each entry includes a corresponding MAC address and a forwarding port. relationship, the MAC address is the MAC address corresponding to any port of the leaf node switch connected to the root node switch, and the forwarding port is the connection port of the root node switch and the leaf node switch corresponding to the MAC address . 9.根据权利要求8所述的根节点交换机,其特征在于,所述发送模块具体用于依据所述目的MAC地址将所述待转发数据帧通过所述根节点交换机与所述第二叶子节点交换机的连接端口发送给所述第二叶子节点交换机。9. The root node switch according to claim 8, wherein the sending module is specifically configured to pass the data frame to be forwarded through the root node switch and the second leaf node according to the destination MAC address The connection port of the switch is sent to the second leaf node switch. 10.一种数据帧转发系统,其特征在于,包括如权利要求6所述的叶子节点交换机、如权利要求7-9任一项所述的根节点交换机,以及另一叶子节点交换机。10. A data frame forwarding system, comprising the leaf node switch according to claim 6, the root node switch according to any one of claims 7-9, and another leaf node switch.
CN201510583550.5A 2015-09-14 2015-09-14 data frame forwarding method and device Active CN105227452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510583550.5A CN105227452B (en) 2015-09-14 2015-09-14 data frame forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510583550.5A CN105227452B (en) 2015-09-14 2015-09-14 data frame forwarding method and device

Publications (2)

Publication Number Publication Date
CN105227452A CN105227452A (en) 2016-01-06
CN105227452B true CN105227452B (en) 2018-09-14

Family

ID=54996156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510583550.5A Active CN105227452B (en) 2015-09-14 2015-09-14 data frame forwarding method and device

Country Status (1)

Country Link
CN (1) CN105227452B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106888166B (en) * 2017-04-24 2020-04-24 新华三技术有限公司 Message forwarding method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6711171B1 (en) * 1995-11-15 2004-03-23 Enterasys Networks, Inc. Distributed connection-oriented services for switched communications networks
CN101030923A (en) * 2006-02-27 2007-09-05 中兴通讯股份有限公司 Method for accessing multiple asynchronous transfer mode package in Ethernet exchange system
CN101110721A (en) * 2006-07-18 2008-01-23 中兴通讯股份有限公司 Method of controlling address table space by using media access of Ethernet switch
CN102394825A (en) * 2011-11-04 2012-03-28 华为技术有限公司 Method and device for processing message

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6711171B1 (en) * 1995-11-15 2004-03-23 Enterasys Networks, Inc. Distributed connection-oriented services for switched communications networks
CN101030923A (en) * 2006-02-27 2007-09-05 中兴通讯股份有限公司 Method for accessing multiple asynchronous transfer mode package in Ethernet exchange system
CN101110721A (en) * 2006-07-18 2008-01-23 中兴通讯股份有限公司 Method of controlling address table space by using media access of Ethernet switch
CN102394825A (en) * 2011-11-04 2012-03-28 华为技术有限公司 Method and device for processing message

Also Published As

Publication number Publication date
CN105227452A (en) 2016-01-06

Similar Documents

Publication Publication Date Title
CN110050448B (en) System and method for managing multicast services
US10623311B2 (en) Technologies for distributed routing table lookup
CN105577548B (en) Message processing method and device in a kind of software defined network
CN105745883B (en) Method, network device and system for synchronization of forwarding tables
CN103401786B (en) Network topology foundation, path clustering, message transmitting method and device, system
US20170237655A1 (en) Forwarding Data Packets In Software Defined Networks
EP3091713A1 (en) Method, switch, and controller for implementing arp
CN104394083B (en) Method, the method and its device and system of message forwarding of forwarding-table item processing
CN104301141B (en) A kind of method, apparatus and system for preserving configuration information
CN111147372B (en) Downlink message sending and forwarding method and device
CN103873464B (en) Message processing method and forwarding equipment
CN104796336A (en) Methods and devices for configuring and issuing Open Flow items
WO2018068588A1 (en) Method and software-defined networking (sdn) controller for providing multicast service
US8953607B2 (en) Internet group membership protocol group membership synchronization in virtual link aggregation
CN108965134B (en) Message forwarding method and device
CN107222342A (en) A kind of cluster management network collocation method
CN105227453B (en) Message forwarding method and device
WO2014173235A1 (en) Forwarding path generating method, controller, and system
CN109818869B (en) Method for generating multicast traffic forwarding port and related equipment
EP3059909B1 (en) Method, apparatus and system for controlling forwarding of service data in virtual network
US11343153B2 (en) BGP logical topology generation method, and device
CN103812775A (en) Method, device and system for forwarding messages
CN105227452B (en) data frame forwarding method and device
US9853891B2 (en) System and method for facilitating communication
CN102868775B (en) Method for expanding capacity of address resolution protocol table, and message forwarding method and device

Legal Events

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