CN109617821B - Transmission method, main control board and equipment of multicast message - Google Patents

Transmission method, main control board and equipment of multicast message Download PDF

Info

Publication number
CN109617821B
CN109617821B CN201910026828.7A CN201910026828A CN109617821B CN 109617821 B CN109617821 B CN 109617821B CN 201910026828 A CN201910026828 A CN 201910026828A CN 109617821 B CN109617821 B CN 109617821B
Authority
CN
China
Prior art keywords
multicast group
data item
linked list
multicast
group identifier
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
CN201910026828.7A
Other languages
Chinese (zh)
Other versions
CN109617821A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201910026828.7A priority Critical patent/CN109617821B/en
Publication of CN109617821A publication Critical patent/CN109617821A/en
Application granted granted Critical
Publication of CN109617821B publication Critical patent/CN109617821B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/201Multicast operation; Broadcast operation

Abstract

The application provides a transmission method, a main control board and equipment of multicast messages, wherein the method comprises the following steps: acquiring a multicast group identifier and an output interface corresponding to the multicast group identifier; determining the position information of the exchange chip where the output interface is located; and sending the mapping relation between the multicast group identifier and the position information to a network board so that the network board inquires the mapping relation through the multicast group identifier corresponding to the multicast message to obtain the position information corresponding to the multicast group identifier, and sending the multicast message to a switching chip corresponding to the position information. By the technical scheme, waste of bandwidth resources between the network board and the exchange chip can be avoided, accurate forwarding of the multicast message can be realized, and bandwidth resources between boards are saved.

Description

Transmission method, main control board and equipment of multicast message
Technical Field
The present application relates to the field of communications technologies, and in particular, to a multicast packet transmission method, a main control board, and a device.
Background
Network devices (e.g., routers, switches, etc.) are typically distributed devices, i.e., a network device may include a main control board, a network board, and a plurality of interface boards, each of which includes a plurality of switch chips. The master control board is used for generating a multicast forwarding table and issuing the multicast forwarding table to the switching chip, and the switching chip is used for forwarding the message according to the multicast forwarding table. The network board is used for connecting all the switching chips and transferring the messages between the switching chips.
After receiving the multicast message, the switching chip sends the multicast message to the network board. After receiving the multicast message, the network board sends the multicast message to all the switching chips in a broadcasting mode. After each switching chip receives the multicast message, inquiring a multicast forwarding table through a multicast group identifier corresponding to the multicast message to obtain an output interface corresponding to the multicast group identifier; if the exchange chip has an output interface corresponding to the multicast group identifier, sending a multicast message through the output interface; if the exchange chip has no output interface corresponding to the multicast group identification, the multicast message is discarded.
Obviously, if the switching chip does not have an output interface corresponding to the multicast group identifier, the multicast message sent to the switching chip by the network board is an invalid message, which causes waste of bandwidth resources between the network board and the switching chip.
Disclosure of Invention
The application provides a transmission method of multicast messages, which is applied to a main control board in network equipment, wherein the network equipment further comprises a network board and a plurality of switching chips, and the method comprises the following steps:
acquiring a multicast group identifier and an output interface corresponding to the multicast group identifier;
determining the position information of the exchange chip where the output interface is located;
and sending the mapping relation between the multicast group identifier and the position information to the network board so that the network board inquires the mapping relation through the multicast group identifier corresponding to the multicast message to obtain the position information corresponding to the multicast group identifier, and sending the multicast message to a switching chip corresponding to the position information.
The application provides a main control board, the main control board includes:
the acquisition module is used for acquiring the multicast group identification and an output interface corresponding to the multicast group identification;
the determining module is used for determining the position information of the exchange chip where the output interface is located;
and the sending module is used for sending the mapping relation between the multicast group identifier and the position information to the network board so that the network board inquires the mapping relation through the multicast group identifier corresponding to the multicast message to obtain the position information corresponding to the multicast group identifier, and sending the multicast message to the exchange chip corresponding to the position information.
The application provides a network device, which comprises a main control board, a network board and a plurality of exchange chips;
the main control board is used for acquiring a multicast group identifier and an output interface corresponding to the multicast group identifier; determining the position information of the exchange chip where the output interface is located; sending the mapping relation between the multicast group identification and the position information to the network board;
the network board is used for inquiring the mapping relation through a multicast group identifier corresponding to a multicast message to obtain position information corresponding to the multicast group identifier, and sending the multicast message to a switching chip corresponding to the position information;
and the switching chip is used for forwarding the multicast message after receiving the multicast message.
Based on the above technical scheme, in this embodiment of the application, the network board may send the multicast packet to the switch chip having the effective output interface, instead of sending the multicast packet to the switch chip having no effective output interface, and when the switch chip receives the multicast packet, the switch chip has an output interface corresponding to the multicast group identifier corresponding to the multicast packet, and sends the multicast packet through the output interface, that is, the switch chip does not receive an invalid multicast packet, thereby avoiding waste of bandwidth resources between the network board and the switch chip, being capable of implementing accurate forwarding of the multicast packet, saving bandwidth resources between boards, and effectively improving transmission efficiency of the multicast packet between boards.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
fig. 2 is a flowchart of a transmission method of a multicast packet according to an embodiment of the present application;
fig. 3 is a flowchart of a transmission method of a multicast packet according to another embodiment of the present application;
FIG. 4 is a schematic structural diagram of a main control board according to an embodiment of the present application;
fig. 5 is a hardware configuration diagram of a network device according to an embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the present application provides a method for transmitting a multicast packet, which may be applied to a network device (such as a router, a switch, etc.), where the network device may be a distributed device. For example, the network device includes a main control board, a network board (also referred to as a switch network board), and a plurality of interface boards, each of which includes a plurality of switch chips (also referred to as FAP (Fabric Access Processors) chips).
Referring to fig. 1, which is a schematic view of an application scenario of the embodiment of the present application, a network device includes a main control board 11, a network board 12, an interface board 13, and an interface board 14, and 2 interface boards are taken as an example in fig. 1, and the number of interface boards may be more, which is not limited to this. The interface board 13 includes a switch chip 131, a switch chip 132, and a switch chip 133, the interface board 14 includes a switch chip 141, a switch chip 142, and a switch chip 143, and the interface board includes 3 switch chips as an example in fig. 1, the number of the switch chips may be more, and is not limited thereto.
In one example, after receiving the multicast message, the network board 12 may send the multicast message to the switch chip 131, the switch chip 132, the switch chip 133, the switch chip 141, the switch chip 142, and the switch chip 143. After receiving the multicast message, the switch chip 131 queries a multicast forwarding table through a multicast group identifier corresponding to the multicast message to obtain an output interface corresponding to the multicast group identifier; if the switching chip 131 does not have an output interface corresponding to the multicast group identifier, discarding the multicast packet; if the switch chip 131 has an outgoing interface corresponding to the multicast group identifier, the multicast packet is forwarded through the outgoing interface. Obviously, if the switch chip 131 does not have an egress interface corresponding to the multicast group identifier, the multicast packet sent to the switch chip 131 by the network board 12 is an invalid packet, which causes a waste of bandwidth resources. The processing procedures of other switch chips are similar and are not described in detail herein.
In view of the above discovery, in the embodiment of the present application, the network board 12 only sends the multicast packet to the switch chip having the effective output interface, so as to avoid the waste of bandwidth resources. For example, if the switch chip 132 and the switch chip 142 have an outgoing interface corresponding to the multicast group identifier, the network board 12 may send the multicast packet to the switch chip 132 and the switch chip 142, and not to the switch chip 131, the switch chip 133, the switch chip 141, and the switch chip 143. In this way, after receiving the multicast packet, the switch chip 132 and the switch chip 142 may forward the multicast packet through the output interface. Obviously, the above manner does not cause waste of bandwidth resources.
The following describes a transmission method of a multicast packet with reference to a specific embodiment, and referring to fig. 2, the transmission method of a multicast packet is a schematic flow chart, and the method may include the following steps:
step 201, the main control board obtains the multicast group identifier and the output interface corresponding to the multicast group identifier.
Step 202, the main control board determines the location information of the exchange chip where the output interface is located.
In one example, the host board 11 may maintain a multicast forwarding table, and each multicast table entry of the multicast forwarding table may include: the contents of the multicast table entry are not limited, such as the multicast group identifier, the egress interface, and the VLAN (Virtual Local Area Network). Based on this, when a multicast entry in the multicast forwarding table changes (for example, a new multicast entry is added to the multicast forwarding table, or an existing multicast entry in the multicast forwarding table changes), the main control board 11 may obtain a multicast group identifier and an egress interface corresponding to the multicast group identifier from the multicast entry (that is, a plurality of egress interfaces may be provided).
For example, if a new multicast entry a is added to the multicast forwarding table (for example, the multicast entry a is learned based on the multicast protocol, and the multicast entry a is added to the multicast forwarding table of the main control board, which is not limited to this), the main control board may obtain the multicast group identifier and the outgoing interface corresponding to the multicast group identifier from the multicast entry a.
For another example, if the outgoing interface of the multicast entry B in the multicast forwarding table is modified (for example, the outgoing interface of the multicast entry B is modified based on the multicast protocol, which is not limited), the main control board may obtain the multicast group identifier and the outgoing interface corresponding to the multicast group identifier from the multicast entry B (that is, the modified outgoing interface).
For convenience of description, in this embodiment of the present application, taking the example that the main control board 11 obtains the multicast group identifier a, the outgoing interface a corresponding to the multicast group identifier a, and the outgoing interface B from the multicast entry as an example, based on this, the main control board 11 may determine the location information of the switch chip where the interface a is located and the location information of the switch chip where the outgoing interface B is located. Assuming that the output interface a is located on the switch chip 131 and the output interface B is located on the switch chip 141, the location information may include location information of the switch chip 131 and location information of the switch chip 141.
Wherein, the position information may include: the slot position identification of the exchange chip; and/or exchanging chip identifiers of the chips, which is not limited to this, as long as the exchange chips can be uniquely determined by the location information.
For example, if each switch chip of the network device has a unique chip identifier, that is, the chip identifiers of different switch chips are different, the location information may be the chip identifier of the switch chip, that is, the switch chip corresponding to the chip identifier may be determined based on the chip identifier of the switch chip.
For another example, if each interface board of the network device is inserted into a slot of the cabinet, and each interface board only deploys one switch chip, each switch chip corresponds to a unique slot identifier, that is, the slot identifier of the interface board where the switch chip is located.
For another example, if each interface board of the network device is inserted into one slot of the cabinet, and each interface board can deploy a plurality of switch chips, the location information may be a slot identifier and a chip identifier of each switch chip, that is, the unique switch chip may be determined based on the slot identifier and the chip identifier of each switch chip.
The above process is described by taking the position information as the slot position identifier and the chip identifier of the exchange chip as an example.
Assuming that the interface board 13 is inserted into the first slot of the cabinet, the switch chips 131, 132, and 133 are disposed on the interface board 13, and the slot identifiers of the switch chips are all slot 1. Assuming that the interface board 14 is inserted into the second slot of the cabinet, the switch chips 141, 142, and 143 of the interface board 14 are deployed, and the slot identifiers of these switch chips are all slot 2.
The chip identifier of the switch chip 131 is chip 1, which indicates the first switch chip deployed in slot 1; the chip identifier of the switch chip 132 is chip 2, which indicates a second switch chip deployed in slot 1; the chip identifier of the switch chip 133 is chip 3, which indicates the third switch chip disposed in slot 1; the chip identification of switch chip 141 is chip 1, which represents the first switch chip deployed in slot 2, and so on.
In summary, the main control board 11 may obtain the multicast group identifier a, the location information of the switch chip 131 (i.e., slot 1+ chip 1), and the location information of the switch chip 141 (i.e., slot 2+ chip 1).
Step 203, the main control board sends the mapping relationship between the multicast group identifier and the position information to the network board, so that the network board queries the mapping relationship through the multicast group identifier corresponding to the multicast message to obtain the position information corresponding to the multicast group identifier, and sends the multicast message to the switch chip corresponding to the position information.
Specifically, after the main control board sends the mapping relationship between the multicast group identifier and the position information to the network board, the network board may receive the mapping relationship and store the mapping relationship. After receiving the multicast message, the network board queries the mapping relationship (i.e. the mapping relationship stored locally) through the multicast group identifier corresponding to the multicast message, obtains the location information corresponding to the multicast group identifier, and sends the multicast message to the switch chip corresponding to the location information.
For example, the main control board 11 sends the mapping relationship between the multicast group identifier a, the position information (slot 1+ chip 1), and the position information (slot 2+ chip 1) to the screen 12, and the screen 12 stores the mapping relationship between the multicast group identifier a, the position information (slot 1+ chip 1), and the position information (slot 2+ chip 1), as shown in table 1.
TABLE 1
Figure BDA0001942793970000061
After receiving the multicast message, the network board 12 may query the mapping relationship shown in table 1 by using the multicast group identifier a to obtain the position information (slot 1+ chip 1) and the position information (slot 2+ chip 1) assuming that the multicast group identifier corresponding to the multicast message is the multicast group identifier a. Then, the network board 12 may send the multicast packet to the corresponding switch chip (slot 1+ chip 1), that is, the first switch chip, such as the switch chip 131, deployed in slot 1. In addition, the network board 12 may also send the multicast packet to a corresponding switch chip (slot 2+ chip 1), that is, the first switch chip disposed in slot 2, such as the switch chip 141.
After receiving the multicast packet, the switch chip 131 queries the multicast forwarding table through the multicast group identifier corresponding to the multicast packet, and obtains an output interface corresponding to the multicast group identifier. Because the switch chip 131 has an outgoing interface corresponding to the multicast group identifier, the switch chip 131 forwards the multicast packet through the outgoing interface.
After receiving the multicast packet, the switch chip 141 queries the multicast forwarding table through the multicast group identifier corresponding to the multicast packet, and obtains the output interface corresponding to the multicast group identifier. Since the switch chip 141 has an outgoing interface corresponding to the multicast group identifier, the switch chip 141 forwards the multicast packet through the outgoing interface.
In an example, the multicast packet may generally carry a multicast IP address, and based on this, the network board 12 queries the mapping relationship through a multicast group identifier corresponding to the multicast packet to obtain location information corresponding to the multicast group identifier, which may include: the network board 12 may convert the multicast IP address carried in the multicast packet into a multicast group identifier, without limitation to the conversion process, and then the network board 12 may query the mapping relationship through the converted multicast group identifier to obtain the location information corresponding to the multicast group identifier.
Based on the above technical scheme, in this application embodiment, the network board may send the multicast packet to the switch chip having the valid output interface, but does not need to send the multicast packet to the switch chip having no valid output interface, and when the switch chip receives the multicast packet, the switch chip has an output interface corresponding to the multicast group identifier corresponding to the multicast packet, and sends the multicast packet through the output interface, that is, the switch chip does not receive an invalid multicast packet, thereby avoiding the waste of bandwidth resources between the network board and the switch chip, being able to implement the accurate forwarding of the multicast packet, saving bandwidth resources between boards, and effectively improving the transmission efficiency of the multicast packet between boards.
In one example, for each multicast entry in the multicast forwarding table, the multicast entry may include multiple outgoing interfaces, and when an outgoing interface joins or leaves, a mapping relationship (e.g., a mapping relationship between a multicast group identifier and location information) may be changed. If the mapping relationship is changed every time, the changed mapping relationship is sent to the network board, the sending efficiency of the mapping relationship is low, for example, when the output interface of the multicast table entry changes frequently, the main control board needs to send the changed mapping relationship to the network board frequently.
In view of the above findings, in this embodiment, the main control board may ignore the middle mapping relationship and send the later mapping relationship to the web board, thereby reducing unnecessary information synchronization between boards, implementing merging of mapping relationships, reducing the number of information synchronization times, and improving the sending efficiency. For example, after the main control board obtains the mapping relationship 1 between the multicast group identifier a and the position information 1, the mapping relationship 1 is not sent to the web board, and in the subsequent process, if the main control board obtains the mapping relationship 2 between the multicast group identifier a and the position information 2, the mapping relationship 2 is sent to the web board, so that the mapping relationship 1 is not sent to the web board any more, and the information synchronization times are reduced.
In order to implement the foregoing transmission method, in this embodiment of the present application, the following method may be adopted:
the main control board may maintain a multicast group array and a multicast group linked list, as shown in table 2, which is an example of the multicast group array, and the multicast group array is used to record a mapping relationship between a multicast group identifier and position information. Referring to table 3, an example of a multicast group link table is shown, where the multicast group link table is used to record multicast group identifiers that need to be synchronized.
Wherein, the multicast group array in the initial state is empty, and the multicast group array in the current state is assumed to be as shown in table 2; the multicast group linked list in the initial state is empty, and it is assumed that the multicast group linked list in the current state is as shown in table 3.
TABLE 2
Figure BDA0001942793970000081
TABLE 3
A forward pointer: fixed address 1; backward driving the pointer: a multicast group identifier B; the current pointer is as follows: multicast group identification A
A forward pointer: a multicast group identifier A; backward driving the pointer: a multicast group identifier C; the current pointer is as follows: multicast group identification B
A forward pointer: a multicast group identifier B; backward driving the pointer: fixed address 2; the current pointer is as follows: multicast group identification C
Further, based on the multicast group array and the multicast group linked list, a flow chart of the transmission method of the multicast packet provided in the embodiment of the present application may be shown in fig. 3, where the method may include:
step 301, the main control board obtains a multicast group identifier and an output interface corresponding to the multicast group identifier.
Step 302, the main control board determines the location information of the exchange chip where the output interface is located.
Step 301 and step 302 may refer to step 201 and step 202, which are not described herein again.
Step 303, the main control board records the mapping relationship between the multicast group identifier and the position information in the multicast group array.
Specifically, after acquiring the multicast group identifier and the position information, if the multicast group identifier already exists in the multicast group array, the main control board may replace the position information in the multicast group array with the position information corresponding to the multicast group identifier. Or, if the multicast group identifier does not exist in the multicast group array, the main control board may add the mapping relationship between the multicast group identifier and the location information in the multicast group array.
For example, if a mapping relationship among the multicast group identifier a, the position information (slot 1+ chip 1), and the position information (slot 2+ chip 1) is obtained, since the multicast group identifier a already exists in the multicast group array shown in table 2, the main control board 11 replaces the position information in the multicast group array with the position information (slot 1+ chip 1) and the position information (slot 2+ chip 1), as shown in table 4, which is the multicast group array after replacement.
TABLE 4
Figure BDA0001942793970000091
Step 304, the main control board adds the data item corresponding to the multicast group identifier to the multicast group linked list.
Specifically, the main control board judges whether a data item corresponding to the multicast group identifier exists in the multicast group linked list; if yes, moving the data item corresponding to the multicast group identifier to the tail part of the multicast group linked list; if not, creating a data item corresponding to the multicast group identifier, and adding the created data item to the tail part of the multicast group linked list. The data item may include, but is not limited to, a multicast group id of a current data item, a multicast group id of a previous data item corresponding to the data item, and a multicast group id of a next data item corresponding to the data item.
For example, if the multicast group identifier is a multicast group identifier a, since the data item corresponding to the multicast group identifier a exists in the multicast group linked list shown in table 3, the main control board 11 moves the data item corresponding to the multicast group identifier a to the tail of the multicast group linked list, and adaptively modifies other data items, as shown in table 5. Or, if the multicast group identifier is the multicast group identifier D, because the data item corresponding to the multicast group identifier D does not exist in the multicast group linked list shown in table 3, the main control board 11 creates the data item corresponding to the multicast group identifier D, adds the data item to the tail of the multicast group linked list, and adaptively modifies other data items, as shown in table 6.
TABLE 5
A forward pointer: fixed address 1; backward driving the pointer: a multicast group identifier C; the current pointer is as follows: multicast group identification B
A forward pointer: a multicast group identifier B; backward driving the pointer: a multicast group identifier A; the current pointer is as follows: multicast group identification C
A forward pointer: a multicast group identifier C; backward driving the pointer: fixed address 2; the current pointer is as follows: multicast group identification A
TABLE 6
A forward pointer: fixed address 1; backward driving the pointer: a multicast group identifier B; the current pointer is as follows: multicast group identification A
A forward pointer: a multicast group identifier A; backward driving the pointer: a multicast group identifier C;the current pointer is as follows: multicast group identification B
A forward pointer: a multicast group identifier B; backward driving the pointer: a multicast group identifier D; the current pointer is as follows: multicast group identification C
A forward pointer: a multicast group identifier C; backward driving the pointer: fixed address 2; the current pointer is as follows: multicast group identification D
Referring to table 5, for the first data item, the current pointer points to the multicast group identifier B, which indicates that the multicast group identifier of the current data item is the multicast group identifier B; the forward pointer points to a fixed address 1, and the fixed address 1 is the first address (namely the head of the table) of the multicast group linked list, and indicates that the current data item is the first data item of the multicast group linked list; the backward pointer points to the multicast group identifier C, which indicates that the multicast group identifier of the next data item of the current data item is the multicast group identifier C. Aiming at the second data item, the current pointer points to a multicast group identifier C, and the multicast group identifier which represents the current data item is the multicast group identifier C; the forward pointer points to a multicast group identifier B, and the multicast group identifier of the previous data item of the current data item is the multicast group identifier B; the backward pointer points to the multicast group identifier a, which indicates that the multicast group identifier of the next data item of the current data item is the multicast group identifier a. Aiming at the third data item, the current pointer points to a multicast group identifier A, and the multicast group identifier which represents the current data item is the multicast group identifier A; the forward pointer points to a multicast group identifier C, and the multicast group identifier of the previous data item of the current data item is the multicast group identifier C; the backward pointer points to fixed address 2, and fixed address 2 is the tail address (i.e. table tail) of the multicast group linked list, indicating that the current data item is the last data item of the multicast group linked list.
In addition, the meaning of each data item in table 6 is similar to that of each data item in table 5, and is not described herein again.
In the above embodiment, the fixed address 1 is the first address of the multicast group linked list, the fixed address 2 is the last address of the multicast group linked list, and the fixed address 1 and the fixed address 2 may be two addresses. In another example, fixed address 1 and fixed address 2 may be the same address in order to form a ring.
Step 305, the main control board sequentially traverses each data item in the multicast group linked list; and inquiring the multicast group array through the multicast group identifier included in the data item aiming at the currently traversed data item to obtain the position information corresponding to the multicast group identifier, and sending the mapping relation between the multicast group identifier and the position information to the network board.
The main control board sequentially traverses each data item in the multicast group linked list, which may include but is not limited to: the main control board sequentially traverses each data item in the multicast group linked list from the head of the multicast group linked list.
After the main control board sequentially traverses each data item in the multicast group linked list, the method may further include: for the currently traversed data item, the main control board may also delete the data item from the multicast group linked list.
For example, referring to table 5, the main control board 11 traverses the first data item of the multicast group linked list from the head of the multicast group linked list, that is, the current pointer points to the data item of the multicast group identifier B, queries the multicast group array shown in table 4 through the multicast group identifier B included in the data item, obtains the position information (slot 1+ chip 1) and the position information (slot 2+ chip 2), and sends the mapping relationship between the multicast group identifier B and the position information (slot 1+ chip 1) and the position information (slot 2+ chip 2) to the network board 12. The main control board 11 then deletes the first data item from the multicast group link list and modifies the content of the other data items, see table 7.
TABLE 7
A forward pointer: fixed address 1; backward driving the pointer: a multicast group identifier A; the current pointer is as follows: multicast group identification C
A forward pointer: multicastA group identifier C; backward driving the pointer: fixed address 2; the current pointer is as follows: multicast group identification A
Further, in the next processing cycle, the main control board 11 may still traverse the first data item of the multicast group linked list from the head of the multicast group linked list, that is, the current pointer points to the data item of the multicast group identifier C, and the processing flow thereof is similar to the processing flow of the data item of the multicast group identifier B, and is not repeated here.
When the multicast forwarding table changes (for example, the output interface of the multicast entry changes, or the multicast entry is added, etc.), step 301 to step 304 may be executed, so that the main control board may record the latest mapping relationship to the multicast group array, and synchronize the multicast group identifier of the mapping relationship to the multicast group linked list.
Wherein, when the preset condition is satisfied, step 305 may be executed. For example, at intervals, a task R may be started and step 305 may be performed by task R; or, when the main control board is idle, the task R may be started, and step 305 is executed through the task R; or, after the main control board adds the data item corresponding to the multicast group identifier to the multicast group linked list, the task R may be started, and step 305 is executed through the task R. Of course, the above are only a few examples of the preset condition, and the preset condition is not limited.
After the task R is started, the task R is configured to process N data items of the multicast group linked list, that is, the task R processes the first N data items of the multicast group linked list from the head of the multicast group linked list in step 305. Further, the value of N may be configured according to experience, for example, 5, that is, after the task R processes 5 data items of the multicast group linked list, the task R is stopped. The value of N may also be related to the actual service, for example, after the task R is started, the task R is processed through the task R, and once the multicast forwarding table changes, the task R is stopped, the above steps 301 to 304 are performed, and when the preset condition is met next time, the task R is restarted, and the data item of the multicast group linked list is continuously processed.
To sum up, when the position information corresponding to the multicast group identifier a changes, the multicast group identifier a and the changed position information may be recorded in the multicast group array, and the data item of the multicast group identifier a is added to the tail of the multicast group linked list, so that, if the position information corresponding to the multicast group identifier a changes frequently, the data item of the multicast group identifier a is added to the tail of the multicast group linked list each time the position information changes, but the mapping relationship of the multicast group identifier a is not synchronized, even if the position information of the multicast group identifier a in the multicast group array is continuously updated, the mapping relationship of the multicast group identifier a is not synchronized many times, and only when the data item of the multicast group identifier a becomes the first data item of the multicast group linked list, the mapping relationship of the multicast group identifier a is synchronized, thereby realizing the merging of the mapping relationships and reducing the number of information synchronization, the transmission efficiency is improved.
In one example, the main control board may start two tasks, which are task S and task R, respectively, and the main control board performs steps 301 to 304 through task S and performs step 305 through task R. When the multicast forwarding table changes, the main control board may start the task S, and execute steps 301 to 304 through the task S, after the task S is started, the task R is in a dormant state, that is, the task R does not work. After the task S is completed, the task R is awakened by the task S, and step 305 is executed by the task R.
In the execution process of the task R, if the multicast forwarding table changes, the main control board restarts the task S, and executes steps 301 to 304 through the task S, and sets the task R in a dormant state, and so on.
Step 306, the screen board receives the mapping relationship and stores the mapping relationship.
Step 307, after receiving the multicast packet, the network board queries the mapping relationship of the local storage through the multicast group identifier corresponding to the multicast packet, and obtains the position information corresponding to the multicast group identifier.
Step 308, the network board sends the multicast message to the switch chip corresponding to the location information.
In the above embodiment, the multicast group array shown in table 2 is taken as an example, and in practical application, the multicast group array shown in table 8 may also be used. Specifically, since the range of the multicast group identifier may be determined, for example, the range is 0 to 8000, a mapping relationship may be maintained for each multicast group identifier, and when the location information corresponding to the multicast group identifier is obtained, the location information is updated to the mapping relationship.
TABLE 8
Figure BDA0001942793970000131
In the above embodiment, the multicast group linked list shown in table 3 is taken as an example, and in practical application, the multicast group linked list shown in table 9 may also be used. Specifically, because the range of the multicast group identifier may be determined, for example, the range is 0 to 8000, a data item may be maintained for each multicast group identifier, and when the position information corresponding to the multicast group identifier is obtained, the data item corresponding to the multicast group identifier may be recorded to the tail of the multicast group linked list, and the content of other data items in the multicast group linked list may be updated. Referring to the multicast group linked list shown in table 9, each data item in the multicast group linked list includes an array index and an array pointer, the array index is used to record a multicast group identifier (i.e., a multicast group identifier of a current data item), and the array pointer is used to record information of an adjacent data item (e.g., a multicast group identifier of an adjacent data item), i.e., a multicast group identifier of a previous data item corresponding to the current data item and a multicast group identifier of a next data item corresponding to the current data item.
TABLE 9
Figure BDA0001942793970000132
Figure BDA0001942793970000141
As can be seen from table 9, the order of the data items from head to tail is: the multicast group id 55, the multicast group id 0, the multicast group id 188, the multicast group id 1, the multicast group id 8000, and the multicast group id 456, although the above is only an example, there may be a data item before the multicast group id 55, and a data item after the multicast group id 456, and only table 9 is not shown.
After the multicast group linked list shown in table 9 is used, in order to record the data item corresponding to a certain multicast group identifier to the tail of the multicast group linked list, the multicast group identifier (i.e., the first column content) of the multicast group linked list may be queried through the multicast group identifier, so as to quickly query the data item corresponding to the multicast group identifier, and then record the data item corresponding to the multicast group identifier to the tail of the multicast group linked list. Obviously, in the above manner, the data item content (i.e. the second column content) of the multicast group linked list does not need to be traversed, thereby speeding up the processing speed.
Based on the multicast group array shown in table 8 and the multicast group linked list shown in table 9, the main control board may also implement the transmission flow of the multicast packet by using steps 301 to 308, and no repeated limitation is imposed on the implementation.
Based on the same application concept as the above method, an embodiment of the present application further provides a main control board, as shown in fig. 4, which is a schematic structural diagram of the main control board, and the main control board may include:
an obtaining module 41, configured to obtain a multicast group identifier and an output interface corresponding to the multicast group identifier;
a determining module 42, configured to determine location information of an exchange chip where the egress interface is located;
a sending module 43, configured to send the mapping relationship between the multicast group identifier and the location information to the network board, so that the network board queries the mapping relationship through the multicast group identifier corresponding to the multicast packet, obtains the location information corresponding to the multicast group identifier, and sends the multicast packet to the switch chip corresponding to the location information.
The sending module 43 is specifically configured to, when sending the mapping relationship between the multicast group identifier and the location information to the mesh board: recording the mapping relation between the multicast group identification and the position information in a multicast group array, and adding a data item corresponding to the multicast group identification to a multicast group linked list;
sequentially traversing each data item in the multicast group linked list; aiming at the traversed data item, inquiring the multicast group array through the multicast group identification included in the data item to obtain the position information corresponding to the multicast group identification, and sending the mapping relation between the multicast group identification and the position information to the network board;
each data item in the multicast group linked list comprises an array index and an array pointer, the array index is used for recording multicast group identifiers, and the array pointer is used for recording information of adjacent data items.
The sending module 43 is specifically configured to, when adding the data item corresponding to the multicast group identifier to the multicast group linked list: judging whether a data item corresponding to the multicast group identifier exists in a multicast group linked list or not; if so, moving the data item corresponding to the multicast group identifier to the tail part of the multicast group linked list; if not, creating a data item corresponding to the multicast group identifier, and adding the created data item to the tail part of the multicast group linked list;
wherein the data item comprises a multicast group identifier of a current data item, a multicast group identifier of a previous data item corresponding to the data item, and a multicast group identifier of a next data item corresponding to the data item.
The sending module 43 is further configured to, after sequentially traversing each data item in the multicast group linked list:
and deleting the data item from the multicast group linked list aiming at the currently traversed data item.
In an embodiment of the present application, a network device is further provided, as shown in fig. 5, which is a structure diagram of the network device, and the network device includes: a main control board 51, a screen board 52 and a plurality of switching chips 53;
the main control board 51 is configured to obtain a multicast group identifier and an output interface corresponding to the multicast group identifier; determining the position information of the exchange chip where the output interface is located; sending the mapping relation between the multicast group identification and the position information to the network board;
the network board 52 is configured to query the mapping relationship through a multicast group identifier corresponding to a multicast packet, obtain location information corresponding to the multicast group identifier, and send the multicast packet to a switch chip corresponding to the location information;
the switch chip 53 is configured to forward the multicast packet after receiving the multicast packet.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A transmission method of multicast messages is characterized in that the method is applied to a main control board in network equipment, the network equipment also comprises a network board and a plurality of switching chips, and the method comprises the following steps:
acquiring a multicast group identifier and an output interface corresponding to the multicast group identifier;
determining the position information of the exchange chip where the output interface is located;
sending the mapping relation between the multicast group identifier and the position information to the network board, so that the network board queries the mapping relation through the multicast group identifier corresponding to the multicast message to obtain the position information corresponding to the multicast group identifier, and sending the multicast message to a switching chip corresponding to the position information;
the sending the mapping relationship between the multicast group identifier and the location information to the web page includes:
recording the mapping relation between the multicast group identification and the position information in a multicast group array, and adding a data item corresponding to the multicast group identification to a multicast group linked list;
sequentially traversing each data item in the multicast group linked list; aiming at the traversed data item, inquiring the multicast group array through the multicast group identification included in the data item to obtain the position information corresponding to the multicast group identification, and sending the mapping relation between the multicast group identification and the position information to the network board;
wherein, sequentially traversing each data item in the multicast group linked list comprises: traversing a first data item of the multicast group linked list from the head of the multicast group linked list, and deleting the first data item from the multicast group linked list; and in the next processing period, returning to execute from the head of the multicast group linked list, traversing the first data item of the multicast group linked list, and deleting the first data item from the multicast group linked list.
2. The method of claim 1,
each data item in the multicast group linked list comprises an array index and an array pointer, the array index is used for recording multicast group identifiers, and the array pointer is used for recording information of adjacent data items.
3. The method of claim 2,
adding the data item corresponding to the multicast group identifier to a multicast group linked list includes:
judging whether a data item corresponding to the multicast group identifier exists in a multicast group linked list or not; if so, moving the data item corresponding to the multicast group identifier to the tail part of the multicast group linked list; if not, creating a data item corresponding to the multicast group identifier, and adding the created data item to the tail part of the multicast group linked list;
wherein the data item comprises a multicast group identifier of a current data item, a multicast group identifier of a previous data item corresponding to the data item, and a multicast group identifier of a next data item corresponding to the data item.
4. The method of claim 2,
after traversing each data item in the multicast group linked list in sequence, the method further comprises:
and deleting the data item from the multicast group linked list aiming at the currently traversed data item.
5. The method according to any of claims 1-4, wherein the location information comprises:
the slot position identification of the exchange chip; and/or exchanging chip identification of the chip.
6. A master control board, comprising:
the acquisition module is used for acquiring the multicast group identification and an output interface corresponding to the multicast group identification;
the determining module is used for determining the position information of the exchange chip where the output interface is located;
a sending module, configured to send a mapping relationship between the multicast group identifier and the location information to a network board, so that the network board queries the mapping relationship through a multicast group identifier corresponding to a multicast packet to obtain location information corresponding to the multicast group identifier, and sends the multicast packet to a switch chip corresponding to the location information;
the sending module is specifically configured to, when sending the mapping relationship between the multicast group identifier and the location information to the mesh board: recording the mapping relation between the multicast group identification and the position information in a multicast group array, and adding a data item corresponding to the multicast group identification to a multicast group linked list;
sequentially traversing each data item in the multicast group linked list; aiming at the traversed data item, inquiring the multicast group array through the multicast group identification included in the data item to obtain the position information corresponding to the multicast group identification, and sending the mapping relation between the multicast group identification and the position information to the network board;
the sending module is specifically configured to, when traversing each data item in the multicast group linked list in sequence: traversing a first data item of the multicast group linked list from the head of the multicast group linked list, and deleting the first data item from the multicast group linked list; and in the next processing period, returning to execute from the head of the multicast group linked list, traversing the first data item of the multicast group linked list, and deleting the first data item from the multicast group linked list.
7. The main control board of claim 6,
each data item in the multicast group linked list comprises an array index and an array pointer, the array index is used for recording multicast group identifiers, and the array pointer is used for recording information of adjacent data items.
8. The main control board according to claim 7, wherein the sending module, when adding the data item corresponding to the multicast group identifier to the multicast group linked list, is specifically configured to:
judging whether a data item corresponding to the multicast group identifier exists in a multicast group linked list or not; if so, moving the data item corresponding to the multicast group identifier to the tail part of the multicast group linked list; if not, creating a data item corresponding to the multicast group identifier, and adding the created data item to the tail part of the multicast group linked list;
wherein the data item comprises a multicast group identifier of a current data item, a multicast group identifier of a previous data item corresponding to the data item, and a multicast group identifier of a next data item corresponding to the data item.
9. The main control board of claim 7,
the sending module is further configured to, after sequentially traversing each data item in the multicast group linked list:
and deleting the data item from the multicast group linked list aiming at the currently traversed data item.
10. A network device is characterized by comprising a main control board, a network board and a plurality of exchange chips;
the main control board is used for acquiring a multicast group identifier and an output interface corresponding to the multicast group identifier; determining the position information of the exchange chip where the output interface is located; sending the mapping relation between the multicast group identification and the position information to the network board; the main control board is specifically configured to, when sending the mapping relationship between the multicast group identifier and the location information to the web board: recording the mapping relation between the multicast group identification and the position information in a multicast group array, and adding a data item corresponding to the multicast group identification to a multicast group linked list; sequentially traversing each data item in the multicast group linked list; aiming at the traversed data item, inquiring the multicast group array through the multicast group identification included in the data item to obtain the position information corresponding to the multicast group identification, and sending the mapping relation between the multicast group identification and the position information to the network board; the main control board is specifically configured to, when traversing each data item in the multicast group linked list in sequence: traversing a first data item of the multicast group linked list from the head of the multicast group linked list, and deleting the first data item from the multicast group linked list; in the next processing cycle, returning to execute from the head of the multicast group linked list, traversing the first data item of the multicast group linked list, and deleting the first data item from the multicast group linked list;
the network board is used for inquiring the mapping relation through a multicast group identifier corresponding to a multicast message to obtain position information corresponding to the multicast group identifier, and sending the multicast message to a switching chip corresponding to the position information;
and the switching chip is used for forwarding the multicast message after receiving the multicast message.
CN201910026828.7A 2019-01-11 2019-01-11 Transmission method, main control board and equipment of multicast message Active CN109617821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910026828.7A CN109617821B (en) 2019-01-11 2019-01-11 Transmission method, main control board and equipment of multicast message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910026828.7A CN109617821B (en) 2019-01-11 2019-01-11 Transmission method, main control board and equipment of multicast message

Publications (2)

Publication Number Publication Date
CN109617821A CN109617821A (en) 2019-04-12
CN109617821B true CN109617821B (en) 2021-04-27

Family

ID=66018421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910026828.7A Active CN109617821B (en) 2019-01-11 2019-01-11 Transmission method, main control board and equipment of multicast message

Country Status (1)

Country Link
CN (1) CN109617821B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110768917B (en) * 2019-10-31 2021-09-21 杭州迪普科技股份有限公司 Message transmission method and device
CN111786890B (en) * 2020-06-29 2022-05-27 新华三信息安全技术有限公司 Multicast message sending method, related device and network equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986601A (en) * 2010-11-23 2011-03-16 杭州华三通信技术有限公司 Multicast data transmission method and equipment
CN102819496A (en) * 2012-08-16 2012-12-12 无锡紫芯集成电路系统有限公司 Address translation method of flash FTL (Flash Translation Layer)
CN103338152A (en) * 2013-05-24 2013-10-02 杭州华三通信技术有限公司 Multicast message forwarding method and main control board
CN104113483A (en) * 2013-04-19 2014-10-22 华为技术有限公司 Multicast communication method and aggregation switch
US8948171B1 (en) * 2012-07-20 2015-02-03 Time Warner Cable Inc. System and method for IP multicast
CN106209648A (en) * 2015-05-04 2016-12-07 杭州华三通信技术有限公司 Multicast data packet forwarding method and apparatus across virtual expansible LAN
CN106470171A (en) * 2016-09-18 2017-03-01 杭州迪普科技股份有限公司 The delivery method of multicast forwarding list item and device
CN107947950A (en) * 2017-11-22 2018-04-20 新华三技术有限公司 The delivery method and NP cable card boards of a kind of hardware multicast outgoing interface list item
CN108259365A (en) * 2017-01-24 2018-07-06 新华三技术有限公司 Method for forwarding multicast message and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986601A (en) * 2010-11-23 2011-03-16 杭州华三通信技术有限公司 Multicast data transmission method and equipment
US8948171B1 (en) * 2012-07-20 2015-02-03 Time Warner Cable Inc. System and method for IP multicast
CN102819496A (en) * 2012-08-16 2012-12-12 无锡紫芯集成电路系统有限公司 Address translation method of flash FTL (Flash Translation Layer)
CN104113483A (en) * 2013-04-19 2014-10-22 华为技术有限公司 Multicast communication method and aggregation switch
CN103338152A (en) * 2013-05-24 2013-10-02 杭州华三通信技术有限公司 Multicast message forwarding method and main control board
CN106209648A (en) * 2015-05-04 2016-12-07 杭州华三通信技术有限公司 Multicast data packet forwarding method and apparatus across virtual expansible LAN
CN106470171A (en) * 2016-09-18 2017-03-01 杭州迪普科技股份有限公司 The delivery method of multicast forwarding list item and device
CN108259365A (en) * 2017-01-24 2018-07-06 新华三技术有限公司 Method for forwarding multicast message and device
CN107947950A (en) * 2017-11-22 2018-04-20 新华三技术有限公司 The delivery method and NP cable card boards of a kind of hardware multicast outgoing interface list item

Also Published As

Publication number Publication date
CN109617821A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN101668031B (en) Message processing method and message processing system
CN108270676B (en) Network data processing method and device based on Intel DPDK
CN108848034B (en) Network equipment and table entry learning method
CN102857414A (en) Forwarding table writing method and device and message forwarding method and device
CN107786450B (en) Data message transmission method and device and machine-readable storage medium
JP2009516273A (en) Data synchronization processing method, client, server, and data synchronization system between client and server
CN110995598B (en) Variable-length message data processing method and scheduling device
CN113079081A (en) Message transmission method and device
CN109617821B (en) Transmission method, main control board and equipment of multicast message
CN104468401A (en) Message processing method and device
CN108259218B (en) IP address allocation method and device
CN107077429B (en) Method for reading data, equipment and system
CN102263701A (en) Queue regulation method and device
JP7046983B2 (en) Packet transmission method and equipment
CN108228812B (en) Self-adaptive main node switching method and device
CN100451974C (en) Method and apparatus for managing session table
CN112965839B (en) Message transmission method, device, equipment and storage medium
CN107070797B (en) Method and system for forwarding message
CN104038441A (en) Method and system for transmitting data
CN109413225B (en) MAC table item processing method and equipment
CN111064622B (en) Network device, synchronization apparatus, and information transmission method
CN110620811B (en) ONU management method and system under vOLT cluster architecture
CN114785662A (en) Storage management method, device, equipment and machine readable storage medium
CN114448995A (en) Distributed computing method based on raft selection main strategy
CN113626221A (en) Message enqueuing method and device

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