Packet encapsulation and transmission method based on Head modify technology
Technical Field
The invention relates to the field of multicast distribution of a routing network, in particular to a packet encapsulation and transmission method based on a Head modify technology.
Background
With the rapid development of communication routing networking technology, the popularization of home routing and enterprise routing is enormous, and the business requirements of users and the network structure are greatly changed. The complex networking and diverse user requirements present huge challenges to current routing network multicast distribution techniques and multicast routing protection techniques.
At present, the most popular route protection technology is the FRR technology (fast reroute technology), that is, when a working path fails or a node has a communication failure, another path leading to a destination node (the path is called a protection path) is directly enabled to complete the requirement of routing node communication, and after the routing is reconverged (the working path is restored to a normal workable state), the traffic is switched to the working path. In general, the working path is the shortest path in the entire network topology. However, the current general routing FRR technique is stateful for unicast, which will greatly burden the data packets and intermediate nodes, resulting in a greatly increased data traffic and a larger communication load. The stateful state means that when a data packet switches a protection path at a failed node, the node must read current state information of the data packet to calculate the protection path, and the failed node is used as a calculation controller. And the opposite stateless state means that when the fault node switches the protection path, the fault node directly switches to the protection path without knowing other information. That is, the stateless protection routing makes the data packet have all the working paths and protection paths planned at the source node, and when a fault occurs, the paths are directly switched, and the source node is the total calculation controller for forwarding. Moreover, when the multicast paths are overlapped, the current FRR technology can only forward in a unicast manner, which undoubtedly greatly increases the path load and results in a doubled traffic waste. For example, R → 2 → 7 → 3, R → 2 → 7 → 6, all three protection paths pass through the (R, 2, 7) link. Since the header encapsulation of the packets transmitted on these 3 paths is different, packets with the same payload (packet payload) must be transmitted in 3 copies over the (R, 2, 7) link.
Disclosure of Invention
In order to solve the above problems, the present invention provides a packet encapsulation and transmission method based on a Head modify technology, which adopts a Head modify method implemented based on a relay node in a network topology, so that a multicast packet sent by a source node to different destination nodes can be forwarded stateless, and only one packet load is sent on the same forwarding path, thereby solving the problem of excessive data traffic consumption caused by repeated forwarding on the same path and stateful in the conventional scheme.
The invention provides a packet encapsulation and transmission method based on a Head modify technology, which comprises the following steps:
the method comprises the following steps: determining a working path, a protection path and a relay node in a network;
step two: constructing a Head modify header of a data packet based on the relay node, listing a forwarding destination node and a path relay node of a primary multicast route into a list, and then constructing an HM header;
step three: the data packet is processed correspondingly at the node according to different Head modification headers;
step four: step 3 is executed step by step until the multicast forwarding is completed.
The further improvement lies in that: in the second step, the Head modify header is divided into three parts, wherein the first part is Bitstring and describes a relay node and other multicast group members on a repeated path; the third part is Relay, which describes the relay node member, and this field is used to select and delete the header tag in Hmstring; the second part is hmstart, describing a set of header labels to replace, which is made up of a number of alternative header labels equal to the number of relay nodes described in relay.
The further improvement lies in that: in the third step, when a data packet arrives at a node, whether the Bitstring in the first part of the HM header has the node is detected, and if not, the transmission is continued according to the Bitstring in the first part; if the current node is in Bitstring of the first part of the HM header, detecting whether the node is in Relaysting of the third part of the HM header, if the node is not in Relaysting of the third part of the HM header, the node is a destination node, and completing forwarding; if the node is a repeated relay node in the third part Relay of the HM header, the second part Hmstring bit string is selected according to the bit string sequence of the node in the third part Relay for further forwarding.
The further improvement lies in that: if the packet arrives at the node x, the relay is checked, the node x is found to be a relay node, and the xth bit is the bit with the yth value being 1; node x copies the meta-packet payload and takes the y-th header tag in hmstart as the first partial tag of the copy, deletes the remaining y-th header tag in hmstart as the second partial tag of the copy, and replaces bit y as the third partial tag of the copy, which continues to be transmitted.
The further improvement lies in that: the data packet performs step 3 in turn according to the HM header.
As shown in fig. 1, the shortest path from the source node to the destination node in the network topology is a working path, as shown by the thick line in fig. 2, and a path other than the working path may be used as an alternative to the protection path, as shown by the dotted line in fig. 2. In a forwarding path of a route of the network topology, nodes except a source node and a destination node can be called relay nodes. For example, if R is the source node and 6 is the destination node, then the nodes 1 and 4 in R → 1 → 4 → 6 in the working path can be referred to as relay nodes; the nodes 2 and 5 in the protection path R → 2 → 5 → 6 may also be referred to as relay nodes.
Multicast packets with identical payload data are provided with the same header tag, thereby ensuring that only one copy of the multicast packet is sent on each interface; and a header label replacing technology is adopted at the relay node to ensure that the packet correctly reaches the corresponding multicast group member.
In a routing network topology, a concept of a relay node is introduced, a header encapsulation scheme of a Head modify is provided on the basis of the relay node, a data packet is subjected to header replacement at the relay node and load copying and forwarding, and therefore a stateless multicast transmission scheme that only one data packet load is sent in the same path is achieved.
The invention has the beneficial effects that: by adopting the Head modification method realized by taking the relay node in the network topology as the basis, the multicast data packet sent to different destination nodes by the source node can be forwarded in a stateless manner, and only one data packet load is sent in the same forwarding path, so that the problems of excessive data traffic consumption caused by repeated forwarding of the same path and the stateful state in the traditional scheme are solved, and a large amount of path load and data traffic can be saved compared with the traditional scheme. The scheme can be used for the multicast working route forwarding of the data packet and can also be used for the multicast protection route forwarding of FRR.
Drawings
Fig. 1 is a schematic diagram of the network topology of the present invention.
Fig. 2 is a schematic diagram of a network topology working path and a part of a protection path according to the present invention.
Fig. 3 is a schematic diagram of a network topology multicast destination node of the present invention.
Fig. 4 is a transmission path diagram of a network topology multicast destination node of the present invention.
FIG. 5 is a diagram of the Head modify route entry encapsulation format of the present invention.
FIG. 6 is an exemplary diagram of a Head modify route entry encapsulation format in accordance with the present invention.
Fig. 7 is a routing entry encapsulation diagram for node 2 of the present invention.
Fig. 8 is a routing entry encapsulation diagram for node 7 of the present invention.
Fig. 9 is a route forwarding table of the source node R of the present invention.
Fig. 10 is a routing forwarding table of node 2 of the present invention.
Fig. 11 is a routing forwarding table of node 7 of the present invention.
Detailed Description
For the purpose of enhancing understanding of the present invention, the present invention will be further described in detail with reference to the following examples, which are provided for illustration only and are not to be construed as limiting the scope of the present invention.
The embodiment provides a packet encapsulation and transmission method based on a Head modify technology, which includes the following steps:
the method comprises the following steps: determining a working path, a protection path and a relay node in a network;
step two: constructing a Head modify header of a data packet based on the relay node, listing a forwarding destination node and a path relay node of a primary multicast route into a list, and then constructing an HM header;
step three: the data packet is processed correspondingly at the node according to different Head modification headers;
step four: step 3 is executed step by step until the multicast forwarding is completed.
In the second step, the Head modify header is divided into three parts, wherein the first part is Bitstring and describes a relay node and other multicast group members on a repeated path; the third part is Relay, which describes the relay node member, and this field is used to select and delete the header tag in Hmstring; the second part is hmstart, describing a set of header labels to replace, which is made up of a number of alternative header labels equal to the number of relay nodes described in relay.
In the third step, when a data packet arrives at a node, whether the Bitstring in the first part of the HM header has the node is detected, and if not, the transmission is continued according to the Bitstring in the first part; if the current node is in Bitstring of the first part of the HM header, detecting whether the node is in Relaysting of the third part of the HM header, if the node is not in Relaysting of the third part of the HM header, the node is a destination node, and completing forwarding; if the node is a repeated relay node in the third part Relay of the HM header, the second part Hmstring bit string is selected according to the bit string sequence of the node in the third part Relay for further forwarding.
If the packet arrives at the node x, the relay is checked, the node x is found to be a relay node, and the xth bit is the bit with the yth value being 1; node x copies the meta-packet payload and takes the y-th header tag in hmstart as the first partial tag of the copy, deletes the remaining y-th header tag in hmstart as the second partial tag of the copy, and replaces bit y as the third partial tag of the copy, which continues to be transmitted. The data packet performs step 3 in turn according to the HM header.
The topological diagram of the specific example is shown in fig. 1, and the constructed working path and the protection path are shown in fig. 2. The destination nodes of this multicast forwarding are shown in fig. 3, the destination nodes are 3, 5, 6 and 7, and as can be seen from fig. 3, the working path R → 2 → 7 and the protection path R → 2 → 7 → 3, R → 2 → 5, R → 2 → 7 → 6 all pass through the R → 2 link, and partially pass through the 2 → 7 link, so that the duplicated relay nodes are the node 2 and the node 7.
The construction of the HM header is performed next. Because all nodes pass through the relay node 2, the relay node 2 is added into the relay node 2; node 2 is about to reach node 5 and node 7, so Hmstring for node 2 is 01010000; node 5 is the destination node and can be reached through relay node 2 thus not adding Bitstring; node 7 may reach nodes 3, 6 and 7, thus adding relay node 7 to the relay node 7, so hmstart of node 7 is 01100100. The resulting encoding forms the HM header as shown in fig. 6.
The initial Bitstring is 00000010, and the results of 00000010&00000001, 00000010&00000010, 00000010&00000100 at the source node R and the route forwarding table of R (as shown in fig. 9) are 00000000,00000010,00000000 respectively and are forwarded to node 2, and then the packet arrives at node 2 and goes through the replay (01000010) to find that the 2 nd bit is 1, and thus node 2 is a relay node. Node 2 copies a packet payload with the first segment of hmstart (since node 2 is the 1 st bit of 1 in Relaystring) as the bittstring field, the remaining hmstart field as the hmstart field, and the Relaystring after bit 2, bit 0, as the Relaystring field to send the packet. The HM header of the packet sent by node 2 is shown in fig. 7. The original bittrigng (00000010) was 2 bit position 0 after sending the packet to node 2, resulting in 00000000 completing forwarding and now only new packets from node 2 are transmitted in the routing network.
Node 2 then ANDs the new Bitstring with the routing forwarding table of node 2 (as shown in FIG. 10), i.e., 01010000&00000010, 01010000&00010000, and 01010000&01000000, resulting in 00000000, 00010000, and 01000000, and thus forwards to node 5 and node 7. After the node 5 receives the packet, it checks that the relay finds that 5 is not in it and is therefore the destination node, and the node 5 multicast arrives. After reaching node 7, it is found that node 7 is a relay node, so the packet payload is copied, the first hmstart field (01000000, and the first bit 1 of node 7) of the packet now is used as a new bitstart, the 7-bit position 0 of relaysting is sent out as a new packet, and the HM header sent by node 7 is as shown in fig. 8. After the data packet arrives at the node 7, the data packet is correspondingly forwarded to the node 3, the node 6 and the node 7 according to a routing forwarding table (shown in fig. 11) of the node 7, the multicast forwarding is completed, only one data packet load is sent in a repeated path (R → 2, 2 → 7), and the data packet is multicast forwarded in a stateless manner, so that a large amount of flow and path load are saved.