CN115632979B - Communication data forwarding method, system and storage medium - Google Patents

Communication data forwarding method, system and storage medium Download PDF

Info

Publication number
CN115632979B
CN115632979B CN202211629262.5A CN202211629262A CN115632979B CN 115632979 B CN115632979 B CN 115632979B CN 202211629262 A CN202211629262 A CN 202211629262A CN 115632979 B CN115632979 B CN 115632979B
Authority
CN
China
Prior art keywords
forwarding
equipment
link frame
communication data
multicast
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
CN202211629262.5A
Other languages
Chinese (zh)
Other versions
CN115632979A (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.)
Chengdu Jingrong Lianchuang Technology Co ltd
Original Assignee
Chengdu Jingrong Lianchuang Technology 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 Chengdu Jingrong Lianchuang Technology Co ltd filed Critical Chengdu Jingrong Lianchuang Technology Co ltd
Priority to CN202211629262.5A priority Critical patent/CN115632979B/en
Publication of CN115632979A publication Critical patent/CN115632979A/en
Application granted granted Critical
Publication of CN115632979B publication Critical patent/CN115632979B/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/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/16Implementing security features at a particular protocol layer
    • H04L63/166Implementing security features at a particular protocol layer at the transport layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a communication data forwarding method, a system and a storage medium, which are applied to the forwarding of communication data for unicast and multicast among different devices, and the method comprises the following steps: configuring a custom link frame of a communication protocol according to target equipment; the self-defined link frame is self-defined and changed based on a standard network layer pim multicast stream protocol, and the source equipment is in communication connection with the target equipment through exchange equipment; forwarding communication data from the source device to the destination device through the switching device according to the custom link frame; the source device, the destination device and the switching device are all configured with device identifiers. The communication data forwarding method provided by the invention solves the problem that the existing communication field always uses other people communication protocols; because the protocol is customized, illegal personnel cannot analyze and identify, and the safety and reliability of the network are improved; the invention realizes the data forwarding of the multicast stream by combining the customized communication protocol with the standard communication protocol.

Description

Communication data forwarding method, system and storage medium
Technical Field
The invention belongs to the technical field of network communication, and particularly relates to a communication data forwarding method, a communication data forwarding system and a storage medium.
Background
At present, standard TCP/IP transmission protocol, namely transmission control/network protocol, also called network communication protocol is adopted for network communication. The TCP/IP transmission protocol is the most basic communication protocol in the use of the network, defines the communication standard and method of each part in the Internet, and is two important protocols for ensuring the timely and complete transmission of network data information. The TCP/IP transport protocol is strictly a four-layer architecture, and includes an application layer, a transport layer, a network layer, and a data link layer.
The TCP/IP protocol is the most basic protocol of the Internet, wherein the main protocols of an application layer comprise Telnet, FTP, SMTP and the like, and are used for receiving data from a transmission layer or transmitting the data to the transmission layer according to different application requirements and modes; the main protocols of the transmission layer comprise UDP and TCP, which are channels for combining the platform and the data in the computer information network by a user, and can realize data transmission and data sharing; the main protocols of the network layer include ICMP, IP, IGMP, RIP and PIM, and are mainly responsible for the transmission of data packets in the network and the like; the network access layer, also called network interface layer or data link layer, has ARP and RARP as main protocols and has the main functions of providing link management error detection, effectively processing information detail problems related to different communication media and the like.
The existing standard TCP/IP transmission protocol is too universal, has potential safety hazard and is easy to be analyzed by a person customizing the protocol.
Disclosure of Invention
Aiming at the defects in the prior art, the communication data forwarding method, the communication data forwarding system and the storage medium solve the problem of potential safety hazard in the prior art when data forwarding is carried out based on a standard TCP/IP transmission protocol.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that: a communication data forwarding method is applied to communication data forwarding for unicast and multicast between different devices, and comprises the following steps:
configuring a custom link frame of a communication protocol according to target equipment; the self-defined link frame is self-defined and changed based on a standard network layer pim multicast stream protocol, and the target equipment is in communication connection with the source equipment through exchange equipment; forwarding communication data from the source device to the destination device through the switching device according to the custom link frame; the source device, the destination device and the switching device are all configured with device identifiers.
The invention has the beneficial effects that:
(1) The communication data forwarding method provided by the invention solves the problem that the existing communication field always uses other people communication protocols.
(2) The forwarding method provided by the invention can not analyze and identify illegal personnel due to protocol customization in the communication process, thereby improving the safety and reliability of the network.
(3) The invention customizes a multicast stream forwarding method of a user-defined link frame, and realizes the data forwarding of the multicast stream by combining a user-defined communication protocol and a standard communication protocol.
Further, the custom link frame sequentially comprises a start bit, a frame length crc, a frame type, a destination mac, a source mac, a destination device identifier, a device identifier, data and a data crc;
the destination device identification is the device number of the switching device connected with the destination device and the port number of the destination port; the device identification is a device number and a source port number of a switching device to which the source device is connected.
The beneficial effects of the above further scheme are: and supporting data forwarding by customizing the content of the link frame header.
Further, when unicast communication data forwarding is performed between different devices, the communication data forwarding method includes:
configuring a custom link frame according to source equipment and target equipment, and unifying a target mac and a target equipment identifier when the switching equipment performs whole network port diffusion, so that the switching equipment performs communication data forwarding according to the custom link frame;
and configuring a target mac in the custom link frame as a mac address of the target device, and configuring a target device label as a device number and a port number of the target device.
The beneficial effects of the above further scheme are: the scheme can meet the forwarding of the unicast and broadcast data of the user-defined link frame.
Further, when forwarding multicast communication data between different devices, the communication data forwarding method is as follows:
s1, configuring a pim hello packet of each device in a network, and generating a neighbor mapping table of each device after the pim hello packet is converged;
s2, configuring a request forwarding table of each switching device in the network according to the neighbor mapping table;
s3, when the source equipment receives the multicast request, transmitting forwarding request information to each switching equipment according to the configured request forwarding table, generating a forwarding configuration table based on the replied forwarding response information, and transmitting the forwarding configuration table to the corresponding switching equipment;
and S4, filling the multicast data into the custom link frame of the source equipment, and gradually forwarding the multicast data to the corresponding destination equipment through the exchange equipment according to the forwarding configuration table to realize communication data forwarding.
The beneficial effects of the above further scheme are: the scheme can meet the requirement of forwarding the multicast data of the user-defined link frame.
Further, in S1, the link frame type of the pim hello packet is configured to be 0xa1, the source address of the pim hello packet link frame is the mac address of the device, and the destination address is the broadcast address 0xffff;
the neighbor mapping table of each device comprises ip addresses, mac addresses and device labels of neighbor devices of the device;
the content in the request forwarding table in S2 is a path from the switching device to each other switching device in the network, and the path is represented by a device number and a port number from the switching device to the switching device having a connection relationship with the switching device.
The beneficial effects of the above further scheme are: and acquiring the switching label of the multicast group member before forwarding the multicast stream by adding a neighbor mapping table, thereby inquiring the shortest path from the multicast source to the multicast group member.
Further, in S3, the method for generating the forwarding configuration table includes:
s3-1, determining target equipment when the source equipment carries out multicast;
s3-2, determining the shortest path from the source equipment to each destination equipment according to the request forwarding table of each switching equipment;
and S3-3, performing disconnection configuration on each port of each switching device according to the shortest path, and further generating a forwarding configuration table.
The beneficial effects of the above further scheme are: the configuration of the switching equipment is carried out through the forwarding configuration table, so that the multicast stream is forwarded before each switching equipment, and finally the multicast stream is sent to each member in the multicast group.
Further, in S3, when the source device receives the pruning/grafting request,
generating a new forwarding configuration table again according to the equipment label of the pruning/grafting equipment, and reconfiguring each port of each switching equipment;
the link frame type of the pruning/grafting message is 0xA2, the source address of the pruning/grafting message link frame is the mac address of the equipment, the destination address is the mac address of the multicast source, and the pruning/grafting message is sent in a unicast mode.
The beneficial effects of the above further scheme are: the unicast of the pruning message is sent to the multicast source device, the multicast source is informed that the multicast group member does not want to continue to receive the multicast stream, and the multicast stream after the multicast source device is not sent to the multicast group member continuously; and sending the single broadcast of the grafting message to the multicast source equipment, informing the multicast source that the multicast group member wants to continue receiving the multicast stream again, and sending the multicast stream of the multicast source equipment to the multicast group member again.
Further, in S4, when forwarding the multicast data according to the forwarding configuration table, the disconnection of each port of each switching device is monitored and configured in real time, and when the port of the switching device completes forwarding all multicast data, the port is configured to be disconnected.
The beneficial effects of the above further scheme are: and carrying out port switch configuration on the switching equipment through the forwarding configuration table, thereby determining whether the multicast source equipment sends or does not send multicast stream control to the equipment in the multicast group members.
A communication data forwarding system comprising:
a link frame configuration module: the method comprises the steps of configuring a custom link frame according to data forwarding requirements, wherein the data forwarding requirements comprise unicast and multicast;
the switching equipment: the system comprises a user-defined link frame, a destination device and a communication data forwarding device, wherein the user-defined link frame is used for forwarding communication data to the destination device according to the configured user-defined link frame;
when the unicast is carried out, forwarding the communication data to the destination equipment according to the self-defined link frame; when multicast is carried out, the multicast data is forwarded according to the forwarding configuration table of each switching device in the network and the self-defined link frame.
The invention has the beneficial effects that: the invention provides a corresponding system structure based on the communication data forwarding method, so that a user can realize unicast and multicast data forwarding in network communication according to the system.
A computer storage medium that, when executing the computer program, implements a communication data forwarding method.
The invention has the beneficial effects that: the invention provides a corresponding computer readable storage medium for the computer program for realizing the communication data forwarding, and is convenient for users to directly use the storage medium to realize the communication data forwarding.
Drawings
Fig. 1 is a flowchart of a communication data forwarding method provided in the present invention.
Fig. 2 is a schematic diagram of the device identification of the switching device provided in the present invention.
Fig. 3 is a schematic unicast diagram of the device provided in the present invention.
Fig. 4 is a schematic diagram of device multicast according to the present invention.
Fig. 5 is a schematic diagram of forwarding communication data during multicast by the device according to the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
Example 1:
an embodiment of the present invention provides a communication data forwarding method, which is applied to forwarding communication data for unicast and multicast between different devices, and as shown in fig. 1, the communication data forwarding method includes:
configuring a custom link frame of a communication protocol according to target equipment; the custom link frame is subjected to custom modification based on a standard network layer pim multicast stream protocol, and the target device is in communication connection with the source device through an exchange device; forwarding communication data from the source device to the destination device through the switching device according to the custom link frame; the source device, the destination device and the switching device are all configured with device identifiers.
In the embodiment of the invention, the communication safety is realized by operating on the common equipment through a self-defined communication protocol, forwarding data through the self-defined exchange equipment and communicating with other common equipment.
In the embodiment of the present invention, as shown in table 1, the custom link frame in the present invention sequentially includes a start bit, a frame length crc, a frame type, a destination mac, a source mac, a destination device identifier, a device identifier, data, and data crc;
table 1: custom link frame format
Figure DEST_PATH_IMAGE001
The start bit is the start of the labeled frame, the frame length is the frame length, the frame length is crc check for the frame length, the frame type is the frame type, the destination mac is the frame destination mac address, the source mac is the frame source mac, the destination identifier is the device number of the switching device connected to the destination device and the port number of the destination port, i.e. 1 byte device number +1 byte port number, the device identifier is the device number of the switching device connected to the source device and the port number of the source port, the data is the payload encapsulated in the link frame header, and the data crc check is the data crc check.
In the embodiment of the present invention, as shown in fig. 2, the device identifier for the device is described as follows:
in fig. 2, devices 1 to 6 are all connected under the switch device 1, so the first byte of the device identifier is 0x01, and the second byte of the device identifier is the port number corresponding to the device switch, for example, device 1 is mounted on 8 ports of the switch device 1, and its device identifier is 0x0108. The device 3 and the device 4 are mounted under the port 5, the device labels of the devices are the same, but the mac addresses of the device 3 and the device 4 are different, so that the devices mounted under the port 5 of the switching device can receive respective data according to the difference of the mac addresses.
Example 2:
the present embodiment is a further extension on the basis of embodiment 1, and provides a unicast communication data forwarding method in embodiment 1, specifically:
configuring a custom link frame according to source equipment and target equipment, and unifying a target mac and a target equipment identifier when the switching equipment performs whole network port diffusion, so that the switching equipment performs communication data forwarding according to the custom link frame; and configuring a target mac in the custom link frame as a mac address of the target device, and configuring a target device label as a device number and a port number of the target device.
Specifically, as shown in fig. 3, when the device performs unicast communication transmission service with other devices one to one, the custom link frame type may be such that the switching device performs communication data forwarding by specifying the mac address of the destination device, and the device number and the port number of the destination device. During broadcasting, the destination mac fills in 0xffff, the switching equipment performs full-network port diffusion, and the destination equipment identifier is also filled in 0xffff at this time.
Example 3:
this embodiment is a further extension on the basis of embodiment 1, and when a device receives a multicast stream, a single-pass device identifier switch device cannot identify to which devices multicast stream data needs to be forwarded specifically, so this embodiment provides a method for implementing multicast communication data forwarding according to a custom link frame in embodiment 1, as shown in fig. 4, specifically:
s1, configuring a pim hello packet of each device in a network, and generating a neighbor mapping table of each device after the pim hello packet is converged;
s2, configuring a request forwarding table of each switching device in the network according to the neighbor mapping table;
s3, when the source equipment receives the multicast request, transmitting forwarding request information to each switching equipment according to the configured request forwarding table, generating a forwarding configuration table based on the replied forwarding response information, and transmitting the forwarding configuration table to the corresponding switching equipment;
and S4, filling the multicast data into the custom link frame of the source equipment, and gradually forwarding the multicast data to the corresponding destination equipment through the exchange equipment according to the forwarding configuration table to realize communication data forwarding.
In step S1 of this embodiment, the link frame type of the pim hello packet is configured to be 0xa1, the source address of the pim hello packet link frame is the mac address of the device, and the destination address is the broadcast address 0xffff; the neighbor mapping table of each device comprises the ip address, mac address and device label of the neighbor device of the device, and the switching device can allocate the multicast address network segment and the multicast stream label to the device connected with the switching device in advance. In this embodiment, the device label of the neighbor can be obtained through the label mapping table, the ID and the port of the switching device where the neighbor device is located are known, a request is initiated to each switching device in the network, and the switching device of the next hop where each switching device reaches the neighbor device and which port of each device goes to reach the switching device of the next hop are queried. In this embodiment, the content in the request forwarding table in step S2 is a path from the switching device to each other switching device in the network, where the path is represented by a device identifier and a port identifier of the switching device to the switching device having a connection relationship with the switching device. The next hop of a switching device to each switching device in the network can be obtained by requesting a forwarding table to go to the port of that switching device.
In step S3 of this embodiment, the method for generating the forwarding configuration table includes:
s3-1, determining target equipment when the source equipment carries out multicast;
s3-2, determining the shortest path from the source equipment to each destination equipment according to the request forwarding table of each switching equipment;
and S3-3, performing on-off configuration on each port of each switching device according to the shortest path, and further generating a forwarding configuration table.
In step S3 of this embodiment, when the source device receives the pruning/grafting request,
generating a new forwarding configuration table again according to the equipment label of the pruning/grafting equipment, and reconfiguring each port of each switching equipment;
the link frame type of the pruning/grafting message is 0xA2, the source address of the pruning/grafting message link frame is the mac address of the equipment, the destination address is the mac address of the multicast source, and the pruning/grafting message is sent in a unicast mode.
In step S4 of this embodiment, when the multicast data is filled in the custom link frame of the source device, the destination mac fills the multicast flow label, and the destination device identifier fills the multicast flow label, based on which, the multicast data can be forwarded to each destination device that receives the multicast data through the switching device at one level and one level.
In this embodiment, when forwarding multicast data according to the forwarding configuration table, the disconnection of each port of each switching device is monitored and configured in real time, and when the port of the switching device completes forwarding all multicast data, the port is configured to be disconnected.
Example 4:
the present embodiment is based on a specific example of the multicast communication data forwarding method in embodiment 3:
the connection relationship between each device and the switching device in the network is shown in fig. 5, and according to the connection relationship between the switching devices in the figure, the request forwarding table configured by each switching device is shown in tables 2-8;
table 2: request forwarding table of switching equipment 1
Figure DEST_PATH_IMAGE002
Table 3: request forwarding table of switching device 2
Figure DEST_PATH_IMAGE003
Table 4: request forwarding table of switching device 3
Figure DEST_PATH_IMAGE004
Table 5: request forwarding table of switching device 5
Figure DEST_PATH_IMAGE005
Table 6: request forwarding table of switching device 5
Figure DEST_PATH_IMAGE006
Table 7: request forwarding table of switching device 6
Figure DEST_PATH_IMAGE007
Table 8: request forwarding table of switching device 7
Figure DEST_PATH_IMAGE008
It is assumed that, in scenario 1, device 1 connected to port No. 7 of switch device 1 wants to send multicast data, where a multicast stream identifier is F101 (each multicast stream corresponds to a unique identifier) to device 2 below port No. 65 of the switch device, device 3 below port No. 3 of switch device 7, and device 4 below port No. 4 of switch device 4 send data.
The route that device 1 gets through the forwarding table to device 2 should be 1-7 port- > 5-3 port- >6-5port;
the route that device 1 gets through the forwarding table to device 3 should be 1-3 port- > 3-5 port- >7-3port;
the route that device 1 gets through the forwarding table to device 4 should be 1-3 port- > 3-5 port- >4-4port.
Therefore, when the forwarding configuration table is generated, a port No. 3 and a port No. 7 are configured for the switching device 1, a port No. 5 is configured for the switching device 3, a port No. 4 is configured for the switching device 4, a port No. 3 is configured for the switching device 5, a port No. 5 is configured for the switching device 6, and a port No. 3 is configured for the switching device 7, since the switching device 2 is not used when forwarding the multicast stream, the forwarding configuration table of each switching device obtained by this method is as shown in tables 9-14 (where 1 represents forwarding on a port, and 0 represents forwarding off a port);
table 9: forwarding configuration table for switching device 1
Figure DEST_PATH_IMAGE009
Table 10: forwarding configuration table of switching device 3
Flow identifier Port 1 Port 2 Port 3 Port 4 Port 5 Port 6 Port 7 Port 8
F101 0 0 1 0 0 0 0 0
Table 11: forwarding configuration table for switching device 4
Figure DEST_PATH_IMAGE010
Table 12: forwarding configuration table of switching device 5
Figure DEST_PATH_IMAGE011
Table 13: forwarding configuration table for switching device 6
Figure DEST_PATH_IMAGE012
Table 14: forwarding configuration table for switching device 7
Figure DEST_PATH_IMAGE013
When a specific function is implemented, a forwarding configuration table needs to be maintained locally, and when a switching device is configured, the forwarding configuration table can be integrated together and sent to the switching device at one time, or sent to the switching device in multiple times, but the premise of the multiple times is that the configuration of the switching device before cannot be refreshed, that is, the multiple times of configuration becomes an incremental process.
In the port configuration process, when multiple switching devices are involved, and when the device 3 issues a prune, normally, it is necessary to delete the forwarding ports originally forwarded to each switching device leading to the device 3, that is, to delete the 3 ports of the switching device 1, the 5 ports of the switching device 3, and the 3 ports of the switching device 7 in the configuration of the flow identifier F101, but since the device 4 will also use the 3 ports of the switching device 1 and the 5 ports of the switching device 3, the device 4 still wants to receive the multicast flow, if the 3 ports of the switching device 1 and the 5 ports of the switching device 3 are reset, the multicast flow will not be forwarded to the device 4, so that it is required that not only the configuration table of each switching device needs to be maintained locally, but also there is a process of accumulating counts for the ports of each switching device table, and the number of times of using the ports is accumulated and the ports will be really set to 0 until the count is 0.
Example 5:
this embodiment is a communication data forwarding system corresponding to the communication data forwarding method in embodiment 1~4, including:
a link frame configuration module: the self-defined link frame is configured according to the data forwarding requirement, wherein the data forwarding requirement comprises unicast and multicast;
the switching equipment: the system comprises a user-defined link frame, a destination device and a communication data forwarding device, wherein the user-defined link frame is used for forwarding communication data to the destination device according to the configured user-defined link frame;
when the unicast is carried out, forwarding the communication data to the destination equipment according to the self-defined link frame; when multicast is carried out, the multicast data is forwarded according to the forwarding configuration table of each switching device in the network and the self-defined link frame.
The format of the custom link frame in the embodiment of the invention is as follows:
table 15: custom link frame format
Figure DEST_PATH_IMAGE015
The start bit is the start of the labeled frame, the frame length is the frame length, the frame length is crc check for the frame length, the frame type is the frame type, the destination mac is the frame destination mac address, the source mac is the frame source mac, the destination identifier is the device number of the switching device connected to the destination device and the port number of the destination port, i.e. 1 byte device number +1 byte port number, the device identifier is the device number of the switching device connected to the source device and the port number of the source port, the data is the payload encapsulated in the link frame header, and the data crc check is the data crc check.
The source device, the destination device and the switching device of the embodiment of the invention are all configured with device identifiers.
In the embodiment of the invention, when the unicast is carried out, the data forwarding method comprises the following steps: configuring a custom link frame according to source equipment and target equipment, and unifying a target mac and a target equipment identifier when the switching equipment performs whole network port diffusion, so that the switching equipment performs communication data forwarding according to the custom link frame; the frame type of the configured custom link frame is the mac address of the destination device, and the device number and the port number of the destination device; see example 2 for a specific implementation thereof.
In the embodiment of the invention, when multicast is carried out, the data forwarding method comprises the following steps: s1, configuring a pim hello packet of each device in a network, and generating a neighbor mapping table of each device after the pim hello packet is converged; s2, configuring a request forwarding table of each switching device in the network according to the neighbor mapping table; s3, when the source equipment receives the multicast request, transmitting forwarding request information to each switching equipment according to the configured request forwarding table, generating a forwarding configuration table based on the replied forwarding response information, and transmitting the forwarding configuration table to the corresponding switching equipment; s4, filling the multicast data into a custom link frame of the source equipment, and gradually forwarding the multicast data to corresponding destination equipment through the exchange equipment according to a forwarding configuration table to realize communication data forwarding; see example 3 for a specific implementation thereof.
Example 6:
an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed, the steps of the communication data forwarding method in embodiments 1 to 4 are implemented. In the embodiment of the present invention, the computer-readable storage medium includes, but is not limited to, various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In the description of the present invention, it is to be understood that the terms "center", "thickness", "upper", "lower", "horizontal", "top", "bottom", "inner", "outer", "radial", and the like, indicate orientations and positional relationships based on the orientations and positional relationships shown in the drawings, and are used merely for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or an implicit indication of the number of technical features. Thus, features defined as "first", "second", "third" may explicitly or implicitly include one or more of the features.

Claims (7)

1. A communication data forwarding method is applied to communication data forwarding for unicast and multicast between different devices, and the method comprises the following steps:
configuring a custom link frame of a communication protocol according to target equipment; the self-defined link frame is self-defined and changed based on a standard network layer pim multicast stream protocol, and the target equipment is in communication connection with the source equipment through exchange equipment;
forwarding communication data from the source device to the destination device through the switching device according to the custom link frame; the source equipment, the destination equipment and the switching equipment are all configured with equipment identifiers;
the self-defined link frame sequentially comprises a start bit, a frame length crc, a frame type, a destination mac, a source mac, a destination equipment identifier, an equipment identifier, data and a data crc;
the destination device identification is the device number of the switching device connected with the destination device and the port number of the destination port; the device identification is the device number and the source port number of the switching device connected with the source device;
when unicast communication data forwarding is performed between different devices, the communication data forwarding method comprises the following steps:
configuring a custom link frame according to source equipment and target equipment, and unifying a target mac and a target equipment identifier when the switching equipment performs whole network port diffusion, so that the switching equipment performs communication data forwarding according to the custom link frame;
configuring a target mac in a custom link frame as a mac address of a target device, and configuring a target device label as a device number and a port number of the target device;
when multicast communication data forwarding is carried out among different devices, the communication data forwarding method comprises the following steps:
s1, configuring a pim hello packet of each device in a network, and generating a neighbor mapping table of each device after the pim hello packet is converged;
s2, configuring a request forwarding table of each switching device in the network according to the neighbor mapping table;
s3, when the source equipment receives the multicast request, transmitting forwarding request information to each switching equipment according to the configured request forwarding table, generating a forwarding configuration table based on the replied forwarding response information, and transmitting the forwarding configuration table to the corresponding switching equipment;
and S4, filling the multicast data into the custom link frame of the source equipment, and gradually forwarding the multicast data to the corresponding destination equipment through the exchange equipment according to the forwarding configuration table to realize communication data forwarding.
2. The method according to claim 1, wherein in S1, the link frame type of the configured pim hello packet is 0xa1, the source address of the link frame of the pim hello packet is the mac address of the device, and the destination address is the broadcast address 0xffff;
the neighbor mapping table of each device comprises ip addresses, mac addresses and device labels of neighbor devices of the device;
the content in the request forwarding table in S2 is a path from the switching device to each other switching device in the network, and the path is represented by a device number and a port number from the switching device to the switching device having a connection relationship with the switching device.
3. The method for forwarding communication data according to claim 1, wherein in S3, the method for generating the forwarding configuration table is:
s3-1, determining target equipment when the source equipment carries out multicast;
s3-2, determining the shortest path from the source equipment to each destination equipment according to the request forwarding table of each switching equipment;
and S3-3, performing on-off configuration on each port of each switching device according to the shortest path, and further generating a forwarding configuration table.
4. The communication data forwarding method according to claim 1, wherein in S3, when the source device receives the pruning/grafting request, a new forwarding configuration table is generated according to the device label of the pruning/grafting device again, and each port of each switching device is reconfigured;
the link frame type of the pruning/grafting message is 0xA2, the source address of the pruning/grafting message link frame is the mac address of the equipment, the destination address is the mac address of the multicast source, and the pruning/grafting message is sent in a unicast mode.
5. The communication data forwarding method according to claim 3, wherein in S4, when forwarding the multicast data according to the forwarding configuration table, the disconnection of each port of each switching device is monitored and configured in real time, and when the port of the switching device completes forwarding all multicast data, the port is configured to be disconnected.
6. A communication data transfer system based on the communication data transfer method according to any one of claims 1 to 5, comprising:
a link frame configuration module: the method comprises the steps of configuring a custom link frame according to data forwarding requirements, wherein the data forwarding requirements comprise unicast and multicast;
the switching equipment: the system comprises a user-defined link frame, a destination device and a communication data forwarding device, wherein the user-defined link frame is used for forwarding communication data to the destination device according to the configured user-defined link frame;
when the unicast is carried out, forwarding the communication data to the destination equipment according to the self-defined link frame; when multicast is carried out, the multicast data is forwarded according to the forwarding configuration table of each switching device in the network and the self-defined link frame.
7. A computer storage medium having a computer program stored therein, wherein the computer program, when executed, implements the communication data forwarding method according to any one of claims 1 to 5.
CN202211629262.5A 2022-12-19 2022-12-19 Communication data forwarding method, system and storage medium Active CN115632979B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211629262.5A CN115632979B (en) 2022-12-19 2022-12-19 Communication data forwarding method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211629262.5A CN115632979B (en) 2022-12-19 2022-12-19 Communication data forwarding method, system and storage medium

Publications (2)

Publication Number Publication Date
CN115632979A CN115632979A (en) 2023-01-20
CN115632979B true CN115632979B (en) 2023-03-07

Family

ID=84910715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211629262.5A Active CN115632979B (en) 2022-12-19 2022-12-19 Communication data forwarding method, system and storage medium

Country Status (1)

Country Link
CN (1) CN115632979B (en)

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005015837A1 (en) * 2003-08-07 2005-02-17 Huawei Technologies Co., Ltd. A method and system for implementing the transmission of the data packet
US7855950B2 (en) * 2005-08-01 2010-12-21 Cisco Technology, Inc. Congruent forwarding paths for unicast and multicast traffic
US7830785B2 (en) * 2008-01-25 2010-11-09 At&T Labs, Inc. System and method for restoration in a multimedia IP network
CN101714945A (en) * 2009-12-02 2010-05-26 浙江中控技术股份有限公司 System and method for realizing internetwork communication
US9455948B2 (en) * 2012-06-29 2016-09-27 Cisco Technology, Inc. Reducing proliferation of network-to-link-layer address resolution messages
WO2014005110A1 (en) * 2012-06-29 2014-01-03 Huawei Technologies Co., Ltd. Providing pim-sm support for mrsvp-te based multicast virtual private networks
CN103581027B (en) * 2013-09-06 2017-06-16 上海斐讯数据通信技术有限公司 A kind of method that optimization PIM SM Multicast Routings are set up
CN104702514B (en) * 2013-12-10 2018-01-12 重庆金美通信有限责任公司 A kind of improved method of the PIM DM in broadcast-type multi-hop wireless network
CN104811386B (en) * 2014-01-29 2018-03-16 华为技术有限公司 Message forwarding method, equipment and system
CN110661628B (en) * 2018-06-30 2021-12-14 华为技术有限公司 Method, device and system for realizing data multicast
CN113014487B (en) * 2021-02-25 2021-11-09 中国电子科技集团公司第五十四研究所 Central control-based PIM-DM multicast label routing method
CN114064804A (en) * 2021-11-18 2022-02-18 北京百度网讯科技有限公司 Data interaction method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115632979A (en) 2023-01-20

Similar Documents

Publication Publication Date Title
US6751672B1 (en) Efficient dynamic home agent discovery algorithm and system
US9106711B2 (en) Minimizing mapping and signaling for data path aggregation
EP2100406B1 (en) Method and apparatus for implementing multicast routing
CN101217338B (en) Detection message transmitting method, network element device
US7016347B2 (en) Updating radio network data in an IP base station using an IP message
US8098649B2 (en) Using network transport tunnels to provide service-based data transport
US20050129001A1 (en) Routing in virtual private network
US20130259050A1 (en) Systems and methods for multi-level switching of data frames
US7673061B2 (en) Method and apparatus for neighborhood discovery across disparate point-to-point networks
KR20040075582A (en) Apparatus for traffic flow template packet filtering according to internet protocol version in mobile communication system and method thereof
CN104022936B (en) A kind of tunnel establishing method and device
CN106559302A (en) Single tunnel method for building up, device and system
EP1858205A1 (en) Tunneling device, tunnel frame sorting method used for the device, and its program
EP2708001A1 (en) Label switched routing to connect low power network domains
US11777900B2 (en) Directed multicast based on multi-dimensional addressing relative to identifiable LLN properties
CN102238058B (en) Data message processing method, ingress tunnel router and system
US20090116396A1 (en) OAM echo messaging to verify a service-based network distribution path
CN100364289C (en) Method for implementing layer-2 equipment interconnection in resilient packet ring (RPR) based network
WO2022121466A1 (en) Data processing method and device for ethernet virtual private network, and storage medium
CN107547340A (en) A kind of message forwarding method and device
US8547998B2 (en) Tunneling IPv6 packet through IPv4 network using a tunnel entry based on IPv6 prefix and tunneling IPv4 packet using a tunnel entry based on IPv4 prefix
CN115632979B (en) Communication data forwarding method, system and storage medium
CN105721625A (en) Method for implementing communication between private network devices, private network devices and center end device
JP2023527932A (en) BIER Multicast Traffic Statistics Collection Method, Apparatus, and System
CN104601463A (en) Message forwarding method and device in VXLAN (virtual extensible local area network)

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