CN113765800A - Method, device, system, equipment and readable storage medium for transmitting message - Google Patents

Method, device, system, equipment and readable storage medium for transmitting message Download PDF

Info

Publication number
CN113765800A
CN113765800A CN202010507236.XA CN202010507236A CN113765800A CN 113765800 A CN113765800 A CN 113765800A CN 202010507236 A CN202010507236 A CN 202010507236A CN 113765800 A CN113765800 A CN 113765800A
Authority
CN
China
Prior art keywords
service connection
identifier
vpws
address
service
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.)
Granted
Application number
CN202010507236.XA
Other languages
Chinese (zh)
Other versions
CN113765800B (en
Inventor
鲍俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010507236.XA priority Critical patent/CN113765800B/en
Publication of CN113765800A publication Critical patent/CN113765800A/en
Application granted granted Critical
Publication of CN113765800B publication Critical patent/CN113765800B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/4645Details on frame tagging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing

Abstract

The application discloses a method, a device, a system, equipment and a readable storage medium for transmitting messages. The method comprises the following steps: the first network equipment obtains the first message and obtains a first service connection identifier in an IPv6 address form corresponding to the first message. The first service connection identifier includes a first VPWS identifier for indicating a first VPWS service and a first address, and the first address is an address of the second network device. And then, the first network equipment generates a second message according to the obtained first service connection identifier and the first message, and sends the second message to the second network equipment. According to the method and the device, the second message is generated according to the first message and the first service connection identifier in the IPv6 address form, the second message is transmitted, the point-to-point service between the first network device and the second network device is achieved, other configurations are not needed to be added, the message transmission method is simple, and the efficiency is high.

Description

Method, device, system, equipment and readable storage medium for transmitting message
Technical Field
The present application relates to the field of network transmission technologies, and in particular, to a method, an apparatus, a system, a device, and a readable storage medium for transmitting a packet.
Background
With the development of network transmission technology, more and more network devices participate in message transmission, and an Internet protocol version 6 (IP version 6, IPv6) capable of providing sufficient Internet Protocol (IP) addresses for the network devices is produced. How to realize point-to-point message transmission among network devices based on the IPv6 is a problem to be solved urgently.
In the related art, point-to-point packet transmission between a base station side gateway (CSG) and an Access Service Gateway (ASG) is performed through an Ethernet virtual private network (Ethernet virtual private network virtual private Wire Service segment IPv6, EVPN VPWS over SRv6) carried in a segment IPv6 route (segment routing IPv6, SRv 6). Among them, EVPN VPWS over SRv6 needs to be applied to Border Gateway Protocol (BGP). Since there is often no BGP and EVPN configuration on the CSG, the method provided in the related art first adds BGP and EVPN configuration on the CSG, and then performs point-to-point packet transmission between the CSG and the ASG through BGP.
However, the related art provides a complicated method just because the related configurations of BGP and EVPN need to be added to the CSG. Not only the cost of message transmission is increased, but also the efficiency of message transmission is reduced, and the practicability is not strong.
Disclosure of Invention
The embodiment of the application provides a method, a device, a system, equipment and a readable storage medium for transmitting messages, which are used for solving the problems provided by the related technology, and the technical scheme is as follows:
in a first aspect, a method for transmitting a packet is provided, where for example, a first network device executes the method, and the method includes: the first network equipment obtains a first message to be transmitted and obtains a first service connection identifier in an IPv6 address form corresponding to the first message. The first service connection identifier includes a first VPWS identifier for indicating a first VPWS service and a first address, and the first address is an address of the second network device. And then, the first network equipment generates a second message according to the acquired first service connection identifier and the first message, and sends the second message to the second network equipment.
According to the embodiment of the application, the second message is generated according to the first message and the first service connection identifier in the IPv6 address form, and is transmitted, and the point-to-point transmission of the message between the first network device and the second network device can be realized without adding configuration related to a protocol for the first network device or the second network device. Even in the IPv6 scenario, point-to-point traffic between the first network device and the second network device can still be achieved. Therefore, the method provided by the embodiment is simple, low in cost and high in efficiency for message transmission, and has strong practicability.
In an exemplary embodiment, before obtaining the first service connection identifier in the form of an IPv6 address version 6 of the internet protocol corresponding to the first packet, the method further includes: receiving a first service connection message flooded by second network equipment, wherein the first service connection message comprises a first service connection identifier; obtaining a first service connection identifier according to the first service connection message; acquiring a configured second address and a second VPWS identifier corresponding to the second address, wherein the second VPWS identifier is used for indicating a second VPWS service; and responding to the consistency of the first address and the second address in the first service connection identifier and the consistency of the first VPWS identifier and the second VPWS identifier in the first service connection identifier, and establishing service connection of the second VPWS service with the second network equipment.
In an exemplary embodiment, before obtaining the first packet to be transmitted, the method further includes: generating a second service connection identifier based on a third address and the second VPWS identifier, wherein the third address is the address of the first network equipment; generating a second service connection message according to the second service connection identifier, wherein the second device connection message is an Interior Gateway Protocol (IGP) message and comprises the second service connection identifier; and flooding the second service connection message, so that the second network device establishes the service connection of the second VPWS service according to the second service connection message.
In an exemplary embodiment, the TLV of the specified type of the second service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes a second service connection identifier; or, the second service connection packet includes a newly added TLV, and the newly added TLV includes the second service connection identifier.
In the exemplary embodiment, the type value in the TLV specifying the type is 22.
In a second aspect, a method for transmitting a packet is provided, where for example, a second network device executes the method, and the method includes: the second network device receives a second message sent by the first network device, the second message includes a first message and a first service connection identifier in an internet protocol version 6 IPv6 address form, the first service connection identifier includes a first virtual private line service VPWS identifier and a first address, the first VPWS identifier is used for indicating a first VPWS service, and the first address is an address of the second network device; and analyzing the second message to obtain a first message, and processing the first message.
In an exemplary embodiment, before the second network device receives the second packet sent by the first network device, the method further includes: receiving a second service connection message sent by the first network device, where the second service connection message includes a second service connection identifier, the second service connection identifier includes a third address and a second VPWS identifier, the third address includes an address of the first network device, and the second VPWS identifier is used to indicate a second VPWS service; obtaining a second service connection identifier according to the second service connection message; acquiring a configured fourth address and a first VPWS identifier corresponding to the fourth address; and establishing the service connection of the first VPWS service with the first network equipment in response to that the third address and the fourth address in the second service connection identifier are consistent and the second VPWS identifier and the first VPWS identifier in the second service connection identifier are consistent.
In an exemplary embodiment, before processing the first packet, the method further includes: determining a VPWS service interface corresponding to the first message according to the first VPWS identifier, and determining a channel or an interface for sending the first message according to the VPWS service interface; processing the first message, including: and sending the first message through a channel or an interface for sending the first message.
In an exemplary embodiment, before the second network device receives the second packet sent by the first network device, the method further includes: generating a first service connection identifier based on the first address and the first VPWS identifier; generating a first service connection message according to the first service connection identifier, wherein the first service connection message is an Interior Gateway Protocol (IGP) message and comprises the first service connection identifier; and flooding the first service connection message, so that the first network device establishes the service connection of the first VPWS service according to the first service connection identifier.
In an exemplary embodiment, the TLV of the specified type of the first service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes a first service connection identifier; or, the first service connection packet includes a newly added TLV, and the newly added TLV includes the first service connection identifier.
In the exemplary embodiment, the type value in the TLV specifying the type is 22.
In a third aspect, an apparatus for transmitting a packet is provided, where the apparatus includes:
the acquisition module is used for the first network equipment to acquire a first message; acquiring a first service connection identifier in an internet protocol version 6 IPv6 address form corresponding to the first message, wherein the first service connection identifier comprises a first virtual private line service (VPWS) identifier and a first address, the first address is an address of second network equipment, and the first VPWS identifier is used for indicating a first VPWS service;
the generating module is used for generating a second message according to the first service connection identifier and the first message;
and the sending module is used for sending the second message to the second network equipment.
In an exemplary embodiment, the apparatus further comprises: the first service connection module is used for receiving a first service connection message flooded by the second network equipment, wherein the first service connection message comprises a first service connection identifier; obtaining a first service connection identifier according to the first service connection message; acquiring a configured second address and a second VPWS identifier corresponding to the second address, wherein the second VPWS identifier is used for indicating a second VPWS service; and responding to the consistency of the first address and the second address in the first service connection identifier and the consistency of the first VPWS identifier and the second VPWS identifier in the first service connection identifier, and establishing service connection of the second VPWS service with the second network equipment.
In an exemplary embodiment, the apparatus further comprises: a second service connection module, configured to generate a second service connection identifier based on a third address and the second VPWS identifier, where the third address is an address of the first network device; generating a second service connection message according to the second service connection identifier, wherein the second device connection message is an Interior Gateway Protocol (IGP) message and comprises the second service connection identifier; and flooding the second service connection message, so that the second network device establishes the service connection of the second VPWS service according to the second service connection message.
In an exemplary embodiment, the TLV of the specified type of the second service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes a second service connection identifier; or, the second service connection packet includes a newly added TLV, and the newly added TLV includes the second service connection identifier.
In the exemplary embodiment, the type value in the TLV specifying the type is 22.
In a fourth aspect, an apparatus for transmitting a packet is provided, where the apparatus includes:
a receiving module, configured to receive, by a second network device, a second packet sent by a first network device, where the second packet includes a first packet and a first service connection identifier in an internet protocol version 6 IPv6 address format, the first service connection identifier includes a first virtual private line service VPWS identifier and a first address, the first VPWS identifier is used to indicate a first VPWS service, and the first address is an address of the second network device;
the analysis module is used for analyzing the second message to obtain a first message;
and the processing module is used for processing the first message.
In an exemplary embodiment, the apparatus further comprises: the first service connection module is configured to receive a second service connection packet sent by the first network device, where the second service connection packet includes a second service connection identifier, the second service connection identifier includes a third address and a second VPWS identifier, the third address includes an address of the first network device, and the second VPWS identifier is used to indicate a second VPWS service; obtaining a second service connection identifier according to the second service connection message; acquiring a configured fourth address and a first VPWS identifier corresponding to the fourth address; and establishing the service connection of the first VPWS service with the first network equipment in response to that the third address and the fourth address in the second service connection identifier are consistent and the second VPWS identifier and the first VPWS identifier in the second service connection identifier are consistent.
In an exemplary embodiment, the apparatus further comprises: a determining module, configured to determine, according to the first VPWS identifier, a VPWS service interface corresponding to the first packet, and determine, according to the VPWS service interface, a channel or an interface through which the first packet is sent; and the processing module is used for sending the first message through a channel or an interface for sending the first message.
In an exemplary embodiment, the apparatus further comprises: the second service connection module is used for generating a first service connection identifier based on the first address and the first VPWS identifier; generating a first service connection message according to the first service connection identifier, wherein the first service connection message is an Interior Gateway Protocol (IGP) message and comprises the first service connection identifier; and flooding the first service connection message, so that the first network device establishes the service connection of the first VPWS service according to the first service connection identifier.
In an exemplary embodiment, the TLV of the specified type of the first service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes a first service connection identifier; or, the first service connection packet includes a newly added TLV, and the newly added TLV includes the first service connection identifier.
In the exemplary embodiment, the type value in the TLV specifying the type is 22.
In a fifth aspect, a network device is provided, the network device comprising a memory and a processor; the memory has stored therein at least one instruction, which is loaded and executed by the processor to implement the method provided by the first aspect of the present application or any of the exemplary embodiments of the first aspect.
In a sixth aspect, a network device is provided that includes a memory and a processor; the memory has stored therein at least one instruction that is loaded and executed by the processor to implement the method provided by the second aspect of the present application or any of the exemplary embodiments of the second aspect.
In a seventh aspect, a communication apparatus is provided, which includes: a transceiver, a memory, and a processor. Wherein the transceiver, the memory and the processor are in communication with each other via an internal connection path, the memory is configured to store instructions, and the processor is configured to execute the instructions stored by the memory to control the transceiver to receive signals and control the transceiver to transmit signals, and when the processor executes the instructions stored by the memory, to cause the processor to perform the method provided by the first aspect or any one of the exemplary embodiments of the first aspect.
In an eighth aspect, there is provided a communication apparatus comprising: a transceiver, a memory, and a processor. Wherein the transceiver, the memory and the processor are in communication with each other via an internal connection path, the memory is configured to store instructions, the processor is configured to execute the instructions stored by the memory to control the transceiver to receive signals and control the transceiver to transmit signals, and when the processor executes the instructions stored by the memory, the processor is configured to execute the method provided by the second aspect or any one of the exemplary embodiments of the second aspect.
Optionally, there are one or more processors and one or more memories.
Alternatively, the memory may be integrated with the processor, or provided separately from the processor.
In a specific implementation process, the memory may be a non-transient memory, such as a Read Only Memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips.
In a ninth aspect, a system for transmitting a packet is provided, where the system includes a first network device and a second network device, the first network device is configured to execute the method provided by the first aspect or any exemplary embodiment of the first aspect, and the second network device is configured to execute the method provided by any exemplary embodiment of the second aspect or any exemplary embodiment of the second aspect.
In a tenth aspect, there is provided a computer program (product) comprising: computer program code which, when run by a computer, causes the computer to perform the method of the above-mentioned aspects.
In an eleventh aspect, there is provided a readable storage medium storing a program or instructions, the method of the above aspects being performed when the program or instructions are run on a computer.
In a twelfth aspect, a chip is provided, which includes a processor for calling up and executing instructions stored in a memory from the memory, so that a communication device in which the chip is installed executes the method in the above aspects.
In a thirteenth aspect, a chip is provided, including: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method in each aspect.
Drawings
Fig. 1 is a schematic diagram of a network structure provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for transmitting a packet according to an embodiment of the present application;
fig. 3 is a diagram of an identifier structure provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an IPv6 header provided in the embodiment of the present application;
fig. 5 is a flowchart of a method for transmitting a packet according to an embodiment of the present application;
fig. 6 is a structural diagram of a sub-TLV provided in an embodiment of the present application;
fig. 7 is a flowchart illustrating VPWS service connection according to an embodiment of the present disclosure;
fig. 8 is a flowchart illustrating VPWS service connection according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a device for transmitting a packet according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a device for transmitting a packet according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
The IPv 6-based messaging scenario is increasing because IPv6 can provide sufficient IP addresses for network devices. In view of the above, the embodiments of the present application provide a method for transmitting a packet in an IPv6 network. Illustratively, the method may be applied in a network architecture as shown in fig. 1. In fig. 1, the network architecture includes an access layer, a convergence layer, a core layer, and a service layer. The CSG located in the access stratum is used for accessing the ue to the network through a Base Transceiver Station (BTS) or an evolved NodeB (eNB). The ASG at the convergence layer is connected with the CSG, so that the messages sent by the CSG are converged and forwarded to the core layer for message processing. In addition, the ASG is also connected to a radio network controller side gateway (RSG) located in the core layer through a Service Router (SR), thereby implementing message processing procedures such as forwarding. And then, the message is sent to a service layer for processing so as to realize corresponding service.
In an IPv6 scenario, how to implement point-to-point packet transmission between network devices, so as to implement Virtual Pseudo Wire Service (VPWS) service, is a problem to be solved urgently.
In the related art, the VPWS service processing may be performed in a manner of EVPN VPWS over SRv 6. In order to realize SRv6 based on an IPv6 forwarding plane, an IPv6 extension header is newly added. The IPv6 extension header is a Segment Routing Header (SRH) defined by an original routing extension header of the IPv6 packet, and may also be referred to as an SRH extension header. The SRH extension header specifies an IPv6 path and stores a plurality of Segment Identifiers (SIDs) of IPv6, which may form a segment identifier list (segment list). One or more SRH extension heads are added in the message by the head node sending the message, and the intermediate node can forward the IPv6 message according to the path information contained in the SRH extension heads.
However, the EVPN VPWS over SRv6 needs to be applied to Border Gateway Protocol (BGP). Since there is often no BGP and EVPN configuration on the CSG, the method provided by the related art increases BGP and EVPN configuration on the CSG at first, which is complex in configuration.
Based on the implementation environment described in fig. 1, an embodiment of the present application provides a method for transmitting a packet, where the method may be implemented through interaction between a first network device and a second network device. As shown in fig. 2, the method includes the following steps.
201, a first network device obtains a first message.
The first network device is a device for sending the first message in the message transmission process. It can be understood that the device for sending the first message also has the function of receiving the message. In the process of transmitting other messages, the first network device can be used to receive other messages, that is, as a second network device for receiving other messages. For example, the first network device is the CSG shown in fig. 1, and the second network device is the ASG shown in fig. 1, and the method may be used for transmitting a packet from the CSG to the ASG. For another example, the CSG in fig. 1 is the second network device, and the ASG in fig. 1 is the first network device, and the method may be used for the ASG to transmit the packet to the CSG. Of course, the CSG and ASG shown in fig. 1 are merely examples. The first network device and the second network device can be other types of network devices besides CSG and ASG.
Illustratively, the first packet is a packet generated locally by the first network device, or a packet received by the first network device and sent by another device. For example, the first message is a message of an IPv4 address or an IPv6 address.
202, the first network device obtains a first service connection identifier in an IPv6 format corresponding to the first packet, where the first service connection identifier includes a first VPWS identifier and a first address, the first address is an address of the second network device, and the first VPWS identifier is used to indicate the first VPWS service.
The second network device is a device which establishes a VPWS service for transmitting the first packet with the first network device. The first address included in the first service connection identifier is used for identifying the second network device, so that devices in the network, including the second network device and other devices, can locate the second network device in the routing process. The first VPWS identity included in the first service connection is used to indicate a first VPWS service, where the first VPWS service is a VPWS service that can be performed by the second network device. It can be understood that the VPWS identities correspond to VPWS services one-to-one, and different VPWS identities indicate different VPWS services. Therefore, in the case that one network device is capable of multiple VPWS services, the network device may have multiple VPWS identities.
Illustratively, the first service connection identifier in the form of an IPv6 address means that the first service connection identifier is represented in the form of IPv6, for example, 8 16-digit numbers are used to represent the first service connection identifier. The first service connection identifier in the form of IPv6 address is a Segment Identifier (SID) as shown in fig. 3. In the SID, a locator field (locator) includes the first address and a parameter field (args) includes the first VPWS identity. In addition to the locator and args, the SID may optionally further include a function field (function) indicating functions that can be provided locally by the first network device.
It should be noted that the first address and the first VPWS identifier may be configured to the second network device by a network administrator or other network devices or network management devices. In response to that the second network device can perform other VPWS services in addition to the first VPWS service indicated by the first VPWS identifier, configure other VPWS identifiers in addition to the first VPWS identifier to the second network device, so that the first address of the second network device corresponds to a plurality of VPWS identifiers including the first VPWS identifier.
Further, according to the IPv6 requirement, the sum of the byte lengths occupied by the locator, the function, and the args needs to be configured to be 128bits (128 bits). Illustratively, in configuration, the byte length occupied by the first address as locator and the first VPWS identification as args is first determined. Then, the remaining number of bits in 128bits is taken as the length of the byte required to be occupied by the function. And determining a random number as the function according to the length of the byte occupied by the function.
It can be understood that, in this embodiment, the byte length occupied by the first address and the first VPWS identifier is not limited, and the byte length occupied by the first address and the first VPWS identifier in service networks of different scales can be flexibly determined according to needs. For example, the byte length occupied by the first address is configured to be 64bits (64bits), the byte length occupied by the first VPWS mark is configured to be 16 bits (bits), and the remaining 48bits of the 128bits are used as the byte length required to be occupied by the function.
After determining the length of the byte occupied by each field, the second network device assembles each field according to the format shown in fig. 3, to obtain an assembled identifier. Then, the assembled identifier is represented by 8-bit 16-ary digits according to the requirement of IPv6, so as to obtain the first service connection identifier in the form of IPv6 address. In an exemplary embodiment, the first service connection identification is also referred to as end.dp2p.
Exemplarily, the format of the first service connection identifier in the form of an IPv6 address can include no function, only a locator and args, in addition to the SID shown in fig. 3. In this case, the sum of the bytes occupied by the first address for locator and the first VPWS identity for args is 128 bits. The process of configuring the first address and the first VPWS identifier may refer to the above description, and is not described herein again.
In addition, before the first packet is transmitted, a service connection of the first VPWS service indicated by the first VPWS identifier has been established between the first network device and the second network device. The process of establishing the service connection of the first VPWS service between the first network device and the second network device may refer to the processes shown in fig. 5 and fig. 7, which will not be described herein again.
In an example, after obtaining the first packet, the first network device may determine, according to a destination address or other service configuration information of the first packet, that the first packet needs to be transmitted through the first VPWS service or the channel indicated by the first VPWS identifier.
203, the first network device generates a second message according to the first service connection identifier and the first message.
In one example, when generating the second packet, a new IPv6 header is inserted for the first packet, and the destination address of the new IPv6 header is the first service connection identifier, so as to obtain the second packet. For example, as shown in fig. 4, the second packet can be obtained by placing the first service connection identifier in the destination address part of the IPv6 packet header. The first packet may be an IPv4 packet or an IPv6 packet.
In another example, in the case that the first packet is an IPv6 packet, the destination address part of the IPv6 packet header may also be modified to the first service connection identifier to obtain a second packet, and the destination address of the original IPv6 packet may be carried in other fields.
The above method of encapsulating the first service connection identifier into the first packet to generate the second packet is only an example. In addition to the above manner of obtaining the second packet, the present embodiment can also generate the second packet based on the first service connection identifier and the first packet in other manners, and the manner of generating the second packet is not limited in the present embodiment.
And 204, the first network equipment sends the second message to the second network equipment.
Since the first service connection identifier included in the second packet carries the first service connection identifier in the form of an IPv6 address, after the first network device generates the second packet according to the first service connection identifier and the first packet, the first network device queries the IPv6 forwarding table entry using the first service connection identifier as the destination IPv6 address, and forwards the second packet.
In an example, the first network device may send the second packet through the forwarding interface according to the longest matching rule and only according to the forwarding interface corresponding to the first address portion of the first service connection identifier.
In another example, if the first network device has a corresponding relationship between the first service connection identifier and the forwarding interface, the first network device may send the second packet according to the forwarding interface in the corresponding relationship.
After the first network device sends the second message, other intermediate devices except the second network device receive the second message, do not sense the first message in the second message, and only recognize the IPv6 message header. Therefore, the other intermediate device queries the IPv6 route, and forwards the second packet to the second network device step by step according to the first service connection identifier, in particular, according to the first address part included in the first service connection identifier, thereby implementing the second packet sending process from the first network device to the second network device.
205, the second network device receives the second packet sent by the first network device, analyzes the second packet to obtain the first packet, and processes the first packet.
Because the address of the home terminal of the second network device is consistent with the first address, or because the destination address of the second packet is the first service connection identifier of the second network device, the second network device can confirm that the home terminal is the destination device of the second packet, and therefore the second network device can process the second packet. Based on the above 203 description, the second packet includes a first packet and a first service connection identifier, and the first service connection identifier includes a first VPWS identifier and a first address. Therefore, the second network device can obtain the first packet and the first VPWS identifier by analyzing the second packet. The second network device may obtain the first packet by popping up an IPv6 header of the second packet. The second message can obtain the first VPWS identifier by parsing the IPv6 header.
In one example, the second network device forwards the first packet according to original information of the first packet, such as a destination address or Virtual Local Area Network (VLAN) information.
In another example, the second network device may process the first packet according to the first VPWS identity. Illustratively, before the second network device processes the first packet, the method further includes: and the second network equipment determines a VPWS service interface corresponding to the first message according to the first VPWS identifier, and determines a channel or an interface for sending the first message according to the VPWS service interface. The channel may be a Virtual Private Network (VPN) service channel, and the interface may be a forwarding interface on the second network device. And then, the second network equipment sends the first message through the determined channel or interface. It can be seen that, in this embodiment, based on the above process, a transmission process of a first packet transmitted from a first network device to a second network device is implemented, that is, point-to-point packet transmission between the first network device and the second network device is implemented.
In summary, in this embodiment, the second packet is generated according to the first packet and the first service connection identifier in the IPv6 address form, and the second packet is transmitted without adding a configuration related to a protocol to the first network device or the second network device, so that point-to-point transmission of the packet between the first network device and the second network device is achieved. Even in the IPv6 scenario, point-to-point traffic between the first network device and the second network device can still be achieved. Therefore, the method provided by the embodiment is simple, low in cost and high in efficiency for message transmission, and has strong practicability.
In an exemplary embodiment, before the first network device obtains the first packet, in order to transmit the first packet, a service connection of the VPWS service needs to be established between the first network device and the second network device. Next, referring to fig. 5, a process of establishing a service connection of a VPWS service between a first network device and a second network device is described through the following steps.
501, the second network device generates a first service connection identifier based on the first address and the first VPWS identifier.
Illustratively, the first address and the first VPWS identity are both information configured to the second network device. The process of generating the first service connection identifier by the second network device according to the first address and the first VPWS identifier may refer to the description in 202, and details are not repeated here.
502, the second network device generates a first service connection packet according to the first service connection identifier, where the first service connection packet is an Interior Gateway Protocol (IGP) packet, and the first service connection packet includes the first service connection identifier.
The first service connection packet includes an intermediate system-intermediate system (IS-IS) protocol packet or an Open Shortest Path First (OSPF) protocol packet. Illustratively, the OSPF protocol used in this embodiment is OSPF version three (OSPF version 3, OSPFv 3).
In the exemplary embodiment, the manner in which the second network device generates the first service connection packet in the form of IGP according to the first service connection identifier includes, but is not limited to, the following two manners:
the first generation mode is as follows: and adding a new sub-TLV in a Type Length Value (TLV) of the specified type of the first service connection packet, wherein the new sub-TLV comprises a first service connection identifier.
The first service connection packet is defined with a plurality of TLVs, the Type values (types) corresponding to different TLVs are different, and any TLV can additionally define one or more sub-TLVs. Therefore, an additional sub-TLV can be added on the basis of one or more existing sub-TLVs, and the new sub-TLV includes the first service connection identifier.
Illustratively, the type value in the TLV of the specified type is 22. Taking the first service connection message as an IS-IS protocol message as an example, the implementation process of the first generation mode includes: and encapsulating the first service connection identifier into the newly-added sub-TLV in the TLV with the type value of 22 of the ISIS message. Wherein, the TLV of Type22 is a reachability TLV, and seven different sub-TLVs are defined in the reachability TLV. After the eighth seed TLV is newly added to the TLV of Type22, the Type is configured for the newly added sub-TLV to distinguish the newly added sub-TLV from other seven existing sub-TLVs. Illustratively, the Type of the newly added sub-TLV may be 45, but may also be other values. Then, by means of encapsulating the first service connection identifier into the newly added sub-TLV of Type45 or other optional manners, the newly added sub-TLV of Type45 includes the first service connection identifier, and the first service connection packet can be obtained.
It can be understood that the TLV with the Type of 22 and the newly added sub-TLV with the Type of 45 are only examples, and the first generation manner can be implemented by selecting any Type of value according to actual needs in this embodiment. Referring to fig. 6, fig. 6 shows the structure of the new-increment TLV. It can be seen that in the present embodiment, one or more first service connection identifiers can be included in the new sub-TLV.
The second generation mode is as follows: the first service connection packet includes a newly added TLV, and the newly added TLV includes a first service connection identifier.
In the second generation mode, a sub-TLV is not added in the TLV of the specified type, but a new TLV is added in addition to the existing TLV, and the new TLV includes the first service connection identifier. And then configuring Type for the newly added TLV so as to distinguish the newly added TLV from the existing TLV.
Of course, the embodiment does not limit the manner of generating the first service connection packet. In addition to the first and second generation manners illustrated above, other possible generation manners are also applicable to the present embodiment. Regardless of the generation method, after the first service connection packet, the second network device needs to flood 503 the first service connection packet.
503, the second network device floods the first service connection packet.
After generating the first service connection packet, the second network device floods the first service connection packet. Flooding the first service connection packet means sending the first service connection packet to all devices in the network except the home terminal of the second network device, so that the first network device establishes the service connection of the first VPWS service according to the first service connection identifier. It is understood that all other devices include both the first network device and other intermediate devices other than the first network device. Each of the other devices can receive the first service connection packet. However, since the locator field in the first service connection identifier included in the first service connection packet is the first address corresponding to the local end of the second network device, only the first network device in all other devices can establish the service connection of the VPWS service with the second network device according to the first address, which is described in the following steps.
And 504, the first network device receives the first service connection message flooded by the second network device, and obtains a first service connection identifier according to the first service connection message.
Because the first service connection message includes the first service connection identifier, the first service connection identifier includes the first address and the first VPWS identifier. Therefore, the first network device can obtain the first service connection identifier according to the first service connection packet. Illustratively, the first network device may obtain the first service connection identifier by parsing the first service connection packet. Exemplarily, in a case that the first service connection identifier is included in the new sub-TLV, the first network device needs to analyze the new sub-TLV in the first service connection packet, so as to obtain the first service connection identifier. And under the condition that the first service connection identifier is contained in the newly added TLV, the first network equipment analyzes the newly added TLV in the first service connection message so as to obtain the first service connection identifier. Then, the first network device can obtain the first address and the first VPWS identifier by further analyzing the first service connection identifier.
505, the first network device obtains a configured second address and a second VPWS identity corresponding to the second address, where the second VPWS identity is used to indicate a second VPWS service.
The first network device may have a VPWS service configuration thereon, which may include one or more VPWS services. Wherein, a VPWS service at least includes an address of a network device establishing the VPWS service with the first network device, and a VPWS identifier for indicating the VPWS service. Namely: the configured second address is an address corresponding to a network device capable of performing point-to-point transmission with the first network device, and is not an address of the first network device itself. There may be one or more VPWS identifications corresponding to the second address on the first network device. That is, between two devices, there may be a plurality of VPWS services.
The purpose of configuring the second address for the first network device is to: and realizing VPWS business connection between the first network equipment and equipment capable of carrying out point-to-point transmission. The second VPWS identification indicates a second VPWS service that the first network device home terminal can provide. In addition, in the configuration process, a third address corresponding to the home terminal of the first network device is also configured. As can be seen from the above description 202, the sum of the bytes occupied by the third address and the second VPWS identifier is 128bits, or the sum of the bytes occupied by the third address, the second VPWS identifier and another function field is 128 bits. The configuration method can also be referred to as 202, and will not be described herein.
And 506, the first network device establishes a service connection of the second VPWS service with the second network device in response to that the first address in the first service connection identifier is consistent with the second address and the first VPWS identifier in the first service connection identifier is consistent with the second VPWS identifier.
And responding to the first address and the second address in the first service connection identifier being consistent, and indicating that the second network equipment and the equipment capable of performing point-to-point transmission with the first network equipment have the same corresponding address. Therefore, the second network device is a device capable of performing peer-to-peer transmission with the first network device. In this case, it is further determined whether the first VPWS identity in the first service connection identity is consistent with the second VPWS identity configured in the first network device. And in response to the first VPWS identity being consistent with the second VPWS identity, it indicates that the first VPWS identity and the second VPWS identity are actually the same VPWS identity, and thus the first VPWS service indicated by the first VPWS identity and the second VPWS service indicated by the second VPWS identity are the same VPWS service. Therefore, the first network device can establish a second VPWS service with the second network device according to the configured second VPWS identifier. Since the first VWPS identifier is consistent with the second VPWS identifier, it can also be considered that the first network device can establish the first VPWS service with the second network device.
The establishing of the service connection of the second VPWS service between the first network device and the second network device means that a second VPWS service channel is established between the first network device and the second network device, and the second VPWS service can be performed. Here, the first network device establishes a service connection of the second VPWS with the second network device, which may also be understood as that the first network device sets a state of the second VPWS service to be running, or the second network device enables the second VPWS service.
The process described in 501-506 above is: and the second network equipment floods the first service connection message, so that the VPWS service process is established between the first network equipment and the second network equipment. For example, in this embodiment, the first network device further needs to flood the second service connection packet, and the packet transmission process described in above 201 and 205 is performed between the first network device and the second network device only when the first network device and the second network device can also establish the VPWS service according to the second service connection packet. Next, a process of flooding by the first network device will be explained. Referring to fig. 7, the process includes several steps as follows.
701, the first network device generates a second service connection identifier based on the third address and the second VPWS identifier.
As can be seen from 505, the third address and the second VPWS identity are both information configured to the first network device, and the third address is an address of the first network device. The process of the first network device generating the second service connection identifier based on the third address and the second VPWS identifier may be referred to as 202, and is not described herein again.
And 702, the first network device generates a second service connection message according to the second service connection identifier, where the second service connection message is an IGP message and includes the second service connection identifier.
The first network device generates a second service connection message in the form of an IGP message according to the second service connection identifier, and the second service connection message also has two different generation modes. In the first generation manner, the TLV of the specified type of the second service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes the second service connection identifier. Referring to fig. 8, the first network device encapsulates the second service connection identifier in the new sub-TLV, so as to obtain a second service connection packet containing the second service connection identifier. Illustratively, taking the IGP message as the ISIS message as an example, the type value in the TLV of the specified type is 22. In a second generation manner, the second service connection packet includes a new TLV, and the new TLV includes the second service connection identifier. The implementation of the two generation methods can be known by combining the above 502, and will not be described herein again.
703, the first network device floods the second service connection packet.
Referring to fig. 8, a manner of the first network device flooding the second service connection packet may refer to 503 above, and the second service connection packet can be sent to all devices except the first network device by the flooding. And the second service connection message is used for the second network device to establish service connection of the second VPWS service according to the second service connection message. Since the second service connection packet carries the third address of the first network device, the other intermediate devices except the second network device cannot establish the service connection of the VPWS service with the first network device according to the third address.
704, the second network device receives the second service connection packet sent by the first network device, and obtains a second service connection identifier according to the second service connection packet.
Exemplarily, the method for obtaining the second service connection identifier by the second network device according to the second service connection packet includes: and analyzing the second service connection message to obtain a second service connection identifier. For example, referring to fig. 8, when the second service connection identifier is included in the newly added sub-TLV, the second network device needs to analyze the newly added sub-TLV in the second service connection message, so as to obtain the second service connection identifier. Since the second service connection identifier includes the third address of the first network device and the second VPWS identifier, the second network device can obtain the third address and the second VPWS identifier through parsing.
705, the second network device obtains the configured fourth address and the first VPWS identity corresponding to the fourth address.
As shown in 202, the second network device is configured with a first address of the second network device home terminal and a first VPWS identifier indicating a first VPWS service that the second network device home terminal can provide. There may be one or more VPWS identifications corresponding to the first address on the second network device. The second network device may have a VPWS service configuration thereon, which may include one or more VPWS services. A VPWS service at least comprises an address of a network device establishing the VPWS service with a second network device and a VPWS identification used for indicating the VPWS service. Namely: the configured fourth address is an address corresponding to a network device capable of performing peer-to-peer transmission with the second network device, and is not an address of the local end of the second network device.
And 706, establishing a service connection of the first VPWS service with the first network device in response to that the third address in the second service connection identifier is consistent with the fourth address and that the second VPWS identifier in the second service connection identifier is consistent with the first VPWS identifier.
And responding to the consistency of the third address and the fourth address in the second service connection identifier, and indicating that the first network equipment is equipment capable of performing point-to-point transmission with the second network equipment. Thereafter, referring to fig. 8, it is further determined whether the second VPWS identity in the second service connection identity is consistent with the first VPWS identity. Responding to the first VPWS identity and the second VPWS identity being consistent, it means that the first network device and the second network device can provide the same VPWS service, that is: the first VPWS service indicated by the first VPWS identification and the second VPWS service indicated by the second VPWS identification are the same VPWS service. Therefore, the second network device can establish the first VPWS service with the first network device according to the configured first VPWS identifier. Since the first VPWS identifier is consistent with the second VPWS identifier, it can also be considered that the second network device can establish the second VPWS service with the first network device. Here, the second network device establishes a service connection of the second VPWS service with the first network device, which may also be understood as that the second network device sets the state of the first VPWS service to be running, or the first network device enables the first VPWS service.
No matter how the service connection between the first network device and the second network device is established, after the service connection is successfully established, the first network device and the second network device can perform the message transmission process according to the process of 201 and 205.
As shown in fig. 9, an embodiment of the present application further provides an apparatus for transmitting a packet, where the apparatus is configured to execute, by using each module shown in fig. 9, the method executed by the first network device in fig. 2, fig. 5, or fig. 7. The device includes:
an obtaining module 901, configured to obtain, by a first network device, a first packet; and acquiring a first service connection identifier in an internet protocol version 6 IPv6 address form corresponding to the first message, wherein the first service connection identifier comprises a first virtual private line service (VPWS) identifier and a first address, the first address is an address of the second network device, and the first VPWS identifier is used for indicating the first VPWS service. For example, the functions performed by the obtaining module 901 may refer to the related descriptions of 201 and 202 shown in fig. 2, and are not described herein again.
A generating module 902, configured to generate a second packet according to the first service connection identifier and the first packet. For example, the function performed by the generating module 902 may refer to the related description of 203 shown in fig. 2, which is not described herein again.
A sending module 903, configured to send the second packet to the second network device. For example, the functions performed by the sending module 903 may refer to the related description of 204 shown in fig. 2, and are not described herein again.
In an exemplary embodiment, the apparatus further comprises: the first service connection module is used for receiving a first service connection message flooded by the second network equipment, wherein the first service connection message comprises a first service connection identifier; obtaining a first service connection identifier according to the first service connection message; acquiring a configured second address and a second VPWS identifier corresponding to the second address, wherein the second VPWS identifier is used for indicating a second VPWS service; and responding to the consistency of the first address and the second address in the first service connection identifier and the consistency of the first VPWS identifier and the second VPWS identifier in the first service connection identifier, and establishing service connection of the second VPWS service with the second network equipment. For example, the functions performed by the first service connection module can refer to the related description of 504 and 506 shown in fig. 5, and will not be described herein again.
In an exemplary embodiment, the apparatus further comprises: a second service connection module, configured to generate a second service connection identifier based on a third address and the second VPWS identifier, where the third address is an address of the first network device; generating a second service connection message according to the second service connection identifier, wherein the second device connection message is an Interior Gateway Protocol (IGP) message and comprises the second service connection identifier; and flooding the second service connection message, so that the second network device establishes the service connection of the second VPWS service according to the second service connection message.
In an exemplary embodiment, the TLV of the specified type of the second service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes a second service connection identifier; or, the second service connection packet includes a newly added TLV, and the newly added TLV includes the second service connection identifier.
In the exemplary embodiment, the type value in the TLV specifying the type is 22.
For example, the functions performed by the second service connection module may refer to the related description of 701 and 703 shown in fig. 7, and are not described herein again.
In this embodiment, a second packet is generated according to the first packet and the first service connection identifier in the IPv6 address form, and the second packet is transmitted without adding a configuration related to a protocol to the first network device or the second network device, so that point-to-point transmission of the packet between the first network device and the second network device is achieved. Even in the IPV6 scenario, peer-to-peer traffic between the first network device and the second network device can still be achieved. Therefore, the method provided by the embodiment is simple, low in cost and high in efficiency for message transmission, and has strong practicability.
As shown in fig. 10, an embodiment of the present application further provides an apparatus for transmitting a packet, where the apparatus is configured to execute, by using each module shown in fig. 10, the method executed by the second network device in fig. 2, fig. 5, or fig. 7. The device includes:
a receiving module 1001, configured to receive, by a second network device, a second packet sent by a first network device, where the second packet includes a first packet and a first service connection identifier in an internet protocol version 6 IPv6 address format, the first service connection identifier includes a first virtual private line service VPWS identifier and a first address, the first VPWS identifier is used to indicate a first VPWS service, and the first address is an address of the second network device. For example, the functions performed by the receiving module 1001 may refer to the related description of 205 shown in fig. 2, and are not described herein again.
The parsing module 1002 is configured to parse the second packet to obtain a first packet. For example, the functions performed by the parsing module 1002 can refer to the related description of 205 shown in fig. 2, and are not described herein again.
The processing module 1003 is configured to process the first packet. For example, the functions performed by the processing module 1003 may refer to the related description of 205 shown in fig. 2, and are not described herein again.
In an exemplary embodiment, the apparatus further comprises: the first service connection module is configured to receive a second service connection packet sent by the first network device, where the second service connection packet includes a second service connection identifier, the second service connection identifier includes a third address and a second VPWS identifier, the third address includes an address of the first network device, and the second VPWS identifier is used to indicate a second VPWS service; obtaining a second service connection identifier according to the second service connection message; acquiring a configured fourth address and a first VPWS identifier corresponding to the fourth address; and establishing the service connection of the first VPWS service with the first network equipment in response to that the third address and the fourth address in the second service connection identifier are consistent and the second VPWS identifier and the first VPWS identifier in the second service connection identifier are consistent. For example, the functions performed by the first service connection module may refer to the related description of 704 and 706 shown in fig. 7, and will not be described herein again.
In an exemplary embodiment, the apparatus further comprises: a determining module, configured to determine, according to the first VPWS identifier, a VPWS service interface corresponding to the first packet, and determine, according to the VPWS service interface, a channel or an interface through which the first packet is sent; the processing module 1003 is configured to send the first packet through a channel or an interface for sending the first packet.
In an exemplary embodiment, the apparatus further comprises: the second service connection module is used for generating a first service connection identifier based on the first address and the first VPWS identifier; generating a first service connection message according to the first service connection identifier, wherein the first service connection message is an Interior Gateway Protocol (IGP) message and comprises the first service connection identifier; and flooding the first service connection message, so that the first network device establishes the service connection of the first VPWS service according to the first service connection identifier.
In an exemplary embodiment, the TLV of the specified type of the first service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes a first service connection identifier; or, the first service connection packet includes a newly added TLV, and the newly added TLV includes the first service connection identifier.
In the exemplary embodiment, the type value in the TLV specifying the type is 22.
For example, the functions performed by the second service connection module may refer to the related description of 501 and 503 shown in fig. 5, and are not described herein again.
To sum up, in this embodiment, the first packet is processed by receiving the first service connection identifier in the IPv6 address form and the second packet generated by the first packet, and based on the first VPWS identifier and the first address included in the first service connection identifier obtained by analyzing the second packet, without adding a configuration related to a protocol to the first network device or the second network device, the point-to-point transmission of the packet between the first network device and the second network device can be implemented. Even in the IPV6 scenario, peer-to-peer traffic between the first network device and the second network device can still be achieved. Therefore, the method provided by the embodiment is simple, low in cost and high in efficiency for message transmission, and has strong practicability.
It should be understood that the apparatus provided in fig. 9 or 10 is only illustrated by the division of the functional modules when the functions of the apparatus are implemented, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The embodiment of the application provides network equipment, which comprises a memory and a processor; the memory has stored therein at least one instruction that is loaded and executed by the processor to implement the method provided by any of the exemplary embodiments of this application.
Referring to fig. 11, an embodiment of the present application further provides an electronic device 1100, where the electronic device 1100 shown in fig. 11 is configured to perform operations related to the above-described method for transmitting a message. It can be understood that the first network device and the second network device can both adopt the structure of the network device 1100 shown in fig. 11. The network device 1100 includes: the memory 1101, the processor 1102 and the interface 1103 are connected by a bus 1104.
At least one instruction is stored in the memory 1101, and the at least one instruction is loaded and executed by the processor 1102 to implement any one of the above methods for transmitting a packet.
For example, the network device 1100 shown in fig. 11 is the first network device in fig. 2, 5 or 7, and the processor 1102 reads the instructions in the memory 1101 to enable the network device 1100 shown in fig. 11 to perform all or part of the operations performed by the first network device.
As another example, the network device 1100 shown in fig. 11 is the second network device in fig. 2, 5 or 7, and the processor 1102 reads the instructions in the memory 1101 to enable the network device 1100 shown in fig. 11 to perform all or part of the operations performed by the second network device.
The interface 1103 is used for communicating with other devices in the network, the interface 1103 can be implemented in a wireless or wired manner, and the interface 1103 can be a network card, for example. For example, the tunnel configuration device 1100 may communicate with a server through the interface 1103.
It should be understood that fig. 11 shows only a simplified design of network device 1100. In practice, the network device contains any number of interfaces, processors or memories. The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be an advanced reduced instruction set machine (ARM) architecture supported processor.
Further, in an alternative embodiment, the memory may include both read-only memory and random access memory, and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store device type information.
An embodiment of the present application provides a communication apparatus, including: a transceiver, a memory, and a processor. Wherein the transceiver, the memory and the processor are in communication with each other via an internal connection path, the memory is configured to store instructions, the processor is configured to execute the instructions stored by the memory to control the transceiver to receive signals and control the transceiver to transmit signals, and the processor is configured to execute the instructions stored by the memory to cause the processor to perform the method provided by any of the exemplary embodiments of the present application.
Optionally, there are one or more processors and one or more memories.
Alternatively, the memory may be integrated with the processor, or provided separately from the processor.
In a specific implementation process, the memory may be a non-transient memory, such as a Read Only Memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a network device 700 according to an exemplary embodiment of the present application, where the first network device and the second network device can both adopt the structure of the network device 700 shown in fig. 12. The network device 700 includes: a main control board 710 and an interface board 730.
The main control board is also called a Main Processing Unit (MPU) or a route processor card (route processor card), and the main control board 710 is used for controlling and managing each component in the network device 700, including routing computation, device management, device maintenance, and protocol processing functions. The main control board 710 includes: a central processor 711 and a memory 712.
The interface board 730 is also called a Line Processing Unit (LPU), a line card (line card), or a service board. The interface board 730 is used for providing various service interfaces and forwarding packets. The service interfaces include, but are not limited to, ethernet interfaces, such as Flexible ethernet services interfaces (FlexE ethernet Clients), POS (Packet over SONET/SDH) interfaces, and the like. The interface board 730 includes: a central processor 731, a network processor 732, a forwarding entry store 734, and a Physical Interface Card (PIC) 733.
The central processor 731 on the interface board 730 is used for controlling and managing the interface board 730 and communicating with the central processor 711 on the main control board 710.
The network processor 732 is configured to implement a forwarding process for the packet. The network processor 732 may take the form of a forwarding chip. Specifically, the network processor 732 is configured to forward the received message based on the forwarding table stored in the forwarding table entry storage 734, and if the destination address of the message is the address of the network device 700, send the message to a CPU (e.g., the central processing unit 711) for processing; if the destination address of the message is not the address of the network device 700, the next hop and the outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the outgoing interface corresponding to the destination address. The processing of the uplink message comprises the following steps: processing a message input interface and searching a forwarding table; and (3) downlink message processing: forwarding table lookups, and the like.
The physical interface card 733 is used to implement a physical layer interface function, from which raw traffic enters the interface board 730, and from which processed messages are sent out. The physical interface card 733, also called a daughter card, may be installed on the interface board 730 and is responsible for converting the optical signal into a message, performing validity check on the message, and forwarding the message to the network processor 732 for processing. In some embodiments, a central processor may also perform the functions of network processor 732, such as implementing software forwarding based on a general purpose CPU, so that network processor 732 is not required in physical interface card 733.
Optionally, the network device 700 includes a plurality of interface boards, for example, the network device 700 further includes an interface board 740, and the interface board 740 includes: central processor 741, network processor 742, forwarding table entry store 744, and physical interface card 743.
Optionally, the network device 700 further comprises a switch screen 720. The switch board 720 may also be called a Switch Fabric Unit (SFU). In the case of a network device having a plurality of interface boards 730, the switch board 720 is used to complete data exchange between the interface boards. For example, interface board 730 and interface board 740 can communicate with each other through switch board 720.
The main control board 710 and the interface board 730 are coupled. For example. The main control board 710, the interface board 730, the interface board 740, and the switch board 720 are connected to the system backplane through a system bus to implement intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 710 and the interface board 730, and the main control board 710 and the interface board 730 communicate with each other through the IPC channel.
Logically, network device 700 includes a control plane including main control board 710 and central processor 731, and a forwarding plane including various components that perform forwarding, such as forwarding entry memory 734, physical interface cards 733, and network processor 732. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the state of the device, and issues the generated forwarding table to the forwarding plane, and in the forwarding plane, the network processor 732 performs table lookup and forwarding on the message received by the physical interface card 733 based on the forwarding table issued by the control plane. The forwarding table issued by the control plane may be stored in a forwarding table entry storage 734. In some embodiments, the control plane and the forwarding plane may be completely separate and not on the same device.
If the network device 700 is configured as a first network device, the network device 700 may be capable of performing all or a portion of the operations performed by the first network device. If the network device 700 is configured as a second network device, the network device 700 may be capable of performing all or a portion of the operations performed by the second network device.
The operations on the interface board 740 in the embodiment of the present application are the same as the operations on the interface board 730, and for brevity, are not described again. It should be understood that the network device 700 of this embodiment may correspond to the first network device or the second network device in the foregoing various method embodiments, and the main control board 710, the interface board 730, and/or 740 in the network device 700 may implement the functions and/or various steps implemented by the first network device or the second network device in the foregoing various method embodiments, and for brevity, no further description is provided here.
It should be noted that there may be one or more main control boards, and when there are more main control boards, the main control boards may include a main control board and a standby main control board. The interface board may have one or more blocks, and the stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on an interface board. The exchange network board may not have one or more blocks, and when there are more blocks, the load sharing redundancy backup can be realized together. Under the centralized forwarding architecture, the network device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the network device can have at least one switching network board, and the data exchange among a plurality of interface boards is realized through the switching network board, so that the high-capacity data exchange and processing capacity is provided. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Optionally, the form of the network device may also be only one board card, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board card, at this time, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the one board card to perform the function after the two are superimposed, and the data switching and processing capability of the device in this form is low (for example, network devices such as a low-end switch or a router, etc.). Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.
An embodiment of the present application provides a communication system, where the system includes a first network device and a second network device, where the first network device and the second network device are configured to execute a method provided in any exemplary embodiment of the present application.
An embodiment of the present application provides a computer program (product), including: computer program code which, when run by a computer, causes the computer to perform the method as provided in any of the exemplary embodiments of the present application described above.
The embodiments of the present application provide a readable storage medium, which stores a program or instructions, when the program or instructions are run on a computer, the method provided by any one of the exemplary embodiments of the present application is executed.
The embodiment of the present application provides a chip, which includes a processor, and is configured to call and execute instructions stored in a memory, so that a communication device in which the chip is installed executes a method provided in any exemplary embodiment of the present application.
The embodiment of the application provides a chip, including: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by any one of the exemplary embodiments of the application.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be an advanced reduced instruction set machine (ARM) architecture supported processor.
Further, in an alternative embodiment, the memory may include both read-only memory and random access memory, and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store device type information.
The memory may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
The present application provides a computer program, which when executed by a computer, may cause the processor or the computer to perform the respective steps and/or procedures corresponding to the above-described method embodiments.
The terms "first," "second," and the like in this application are used for distinguishing between similar items and items that have substantially the same function or similar functionality, and it should be understood that "first," "second," and "nth" do not have any logical or temporal dependency or limitation on the order of execution. It will be further understood that, although the terms first, second, etc. may be used in the description to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (23)

1. A method for transmitting a message, the method comprising:
the first network equipment obtains a first message;
obtaining a first service connection identifier in an internet protocol version 6 IPv6 address format corresponding to the first packet, where the first service connection identifier includes a first virtual private line service VPWS identifier and a first address, the first address is an address of a second network device, and the first VPWS identifier is used to indicate a first VPWS service;
generating a second message according to the first service connection identifier and the first message;
and sending the second message to the second network equipment.
2. The method according to claim 1, wherein before obtaining the first service connection identifier in the form of an IPv6 version 6 address of the internet protocol corresponding to the first packet, the method further comprises:
receiving a first service connection message flooded by the second network device, wherein the first service connection message comprises the first service connection identifier;
obtaining the first service connection identifier according to the first service connection message;
acquiring a configured second address and a second VPWS identifier corresponding to the second address, wherein the second VPWS identifier is used for indicating a second VPWS service;
and in response to that the first address in the first service connection identifier is consistent with the second address and that the first VPWS identifier in the first service connection identifier is consistent with the second VPWS identifier, establishing a service connection of the second VPWS service with the second network device.
3. The method according to claim 1 or 2, wherein before obtaining the first packet, the method further comprises:
generating a second service connection identifier based on a third address and the second VPWS identifier, wherein the third address is the address of the first network device;
generating a second service connection message according to the second service connection identifier, wherein the second device connection message is an Interior Gateway Protocol (IGP) message, and the second service connection message comprises the second service connection identifier;
and flooding the second service connection packet, so that the second network device establishes the service connection of the second VPWS service according to the second service connection packet.
4. The method according to claim 3, wherein the designated type of TLV of the second service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes the second service connection identifier;
or, the second service connection packet includes an newly-added TLV, where the newly-added TLV includes the second service connection identifier.
5. The method according to claim 4, wherein the type value in the TLV of the specified type is 22.
6. A method for transmitting a message, the method comprising:
a second network device receives a second packet sent by a first network device, where the second packet includes a first packet and a first service connection identifier in an internet protocol version 6 IPv6 address format, the first service connection identifier includes a first virtual private line service VPWS identifier and a first address, the first VPWS identifier is used to indicate a first VPWS service, and the first address is an address of the second network device;
and analyzing the second message to obtain the first message, and processing the first message.
7. The method of claim 6, wherein before the second network device receives the second packet sent by the first network device, the method further comprises:
receiving a second service connection packet sent by the first network device, where the second service connection packet includes a second service connection identifier, the second service connection identifier includes a third address and a second VPWS identifier, the third address includes an address of the first network device, and the second VPWS identifier is used to indicate a second VPWS service;
obtaining the second service connection identifier according to the second service connection message;
acquiring a configured fourth address and the first VPWS identifier corresponding to the fourth address;
and in response to that a third address in the second service connection identifier is consistent with the fourth address and a second VPWS identifier in the second service connection identifier is consistent with the first VPWS identifier, establishing a service connection of the first VPWS service with the first network device.
8. The method according to claim 6 or 7, wherein before processing the first packet, the method further comprises:
determining a VPWS service interface corresponding to the first message according to the first VPWS identifier, and determining a channel or an interface for sending the first message according to the VPWS service interface;
the processing the first packet includes:
and sending the first message through the channel or the interface for sending the first message.
9. The method according to any of claims 6-8, wherein before the second network device receives the second packet sent by the first network device, the method further comprises:
generating a first service connection identifier based on the first address and the first VPWS identifier;
generating a first service connection message according to the first service connection identifier, wherein the first service connection message is an Interior Gateway Protocol (IGP) message and comprises the first service connection identifier;
and flooding the first service connection packet, so that the first network device establishes the service connection of the first VPWS service according to the first service connection identifier.
10. The method according to claim 9, wherein the TLV of the specified type of the first service connection packet includes a new-added sub-TLV, and the new-added sub-TLV includes the first service connection identifier therein;
or, the first service connection packet includes an added TLV, and the added TLV includes the first service connection identifier.
11. The method according to claim 10, wherein the type value in the TLV of the specified type is 22.
12. An apparatus for transmitting a message, the apparatus comprising:
an obtaining module, configured to obtain, by a first network device, a first packet; obtaining a first service connection identifier in an internet protocol version 6 IPv6 address format corresponding to the first packet, where the first service connection identifier includes a first virtual private line service VPWS identifier and a first address, the first address is an address of a second network device, and the first VPWS identifier is used to indicate a first VPWS service;
a generating module, configured to generate a second packet according to the first service connection identifier and the first packet;
and the sending module is used for sending the second message to the second network equipment.
13. The apparatus of claim 12, further comprising: a first service connection module, configured to receive a first service connection packet flooded by the second network device, where the first service connection packet includes the first service connection identifier; obtaining the first service connection identifier according to the first service connection message; acquiring a configured second address and a second VPWS identifier corresponding to the second address, wherein the second VPWS identifier is used for indicating a second VPWS service; and in response to that the first address in the first service connection identifier is consistent with the second address and that the first VPWS identifier in the first service connection identifier is consistent with the second VPWS identifier, establishing a service connection of the second VPWS service with the second network device.
14. The apparatus of claim 12 or 13, further comprising: a second service connection module, configured to generate a second service connection identifier based on a third address and the second VPWS identifier, where the third address is an address of the first network device; generating a second service connection message according to the second service connection identifier, wherein the second device connection message is an Interior Gateway Protocol (IGP) message, and the second service connection message comprises the second service connection identifier; and flooding the second service connection packet, so that the second network device establishes the service connection of the second VPWS service according to the second service connection packet.
15. The apparatus according to claim 14, wherein the specified type of TLV of the second service connection packet includes a new-added sub-TLV, and wherein the second service connection identifier is included in the new-added sub-TLV; or, the second service connection packet includes an newly-added TLV, where the newly-added TLV includes the second service connection identifier.
16. The apparatus of claim 15, wherein a type value in the TLV of the specified type is 22.
17. An apparatus for transmitting a message, the apparatus comprising:
a receiving module, configured to receive a second packet sent by a first network device, where the second packet includes a first packet and a first service connection identifier in an IPv6 address format of version 6 of an internet protocol, where the first service connection identifier includes a first VPWS identifier and a first address, the first VPWS identifier is used to indicate a first VPWS service, and the first address is an address of the second network device;
the analysis module is used for analyzing the second message to obtain the first message;
and the processing module is used for processing the first message.
18. The apparatus of claim 17, further comprising: a first service connection module, configured to receive a second service connection packet sent by the first network device, where the second service connection packet includes a second service connection identifier, the second service connection identifier includes a third address and a second VPWS identifier, the third address includes an address of the first network device, and the second VPWS identifier is used to indicate a second VPWS service; obtaining the second service connection identifier according to the second service connection message; acquiring a configured fourth address and the first VPWS identifier corresponding to the fourth address; and in response to that a third address in the second service connection identifier is consistent with the fourth address and a second VPWS identifier in the second service connection identifier is consistent with the first VPWS identifier, establishing a service connection of the first VPWS service with the first network device.
19. The method of claim 17 or 18, wherein the apparatus further comprises: a determining module, configured to determine, according to the first VPWS identifier, a VPWS service interface corresponding to the first packet, and determine, according to the VPWS service interface, a channel or an interface for sending the first packet; and the processing module is used for sending the first message through the channel or the interface for sending the first message.
20. The apparatus of any of claims 17-19, further comprising: a second service connection module, configured to generate a first service connection identifier based on the first address and the first VPWS identifier; generating a first service connection message according to the first service connection identifier, wherein the first service connection message is an Interior Gateway Protocol (IGP) message and comprises the first service connection identifier; and flooding the first service connection packet, so that the first network device establishes the service connection of the first VPWS service according to the first service connection identifier.
21. The apparatus according to claim 20, wherein the TLV of the specified type of the first service connection packet includes a new-added sub-TLV, and wherein the new-added sub-TLV includes the first service connection identifier therein; or, the first service connection packet includes an added TLV, and the added TLV includes the first service connection identifier.
22. The apparatus of claim 21, wherein a type value in the TLV of the specified type is 22.
23. A system for transmitting messages, the system comprising a first network device and a second network device, the first network device being the apparatus for transmitting messages according to any one of claims 12 to 15, and the second network device being the apparatus for transmitting messages according to any one of claims 16 to 22.
CN202010507236.XA 2020-06-05 2020-06-05 Method, device, system, equipment and readable storage medium for transmitting message Active CN113765800B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010507236.XA CN113765800B (en) 2020-06-05 2020-06-05 Method, device, system, equipment and readable storage medium for transmitting message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010507236.XA CN113765800B (en) 2020-06-05 2020-06-05 Method, device, system, equipment and readable storage medium for transmitting message

Publications (2)

Publication Number Publication Date
CN113765800A true CN113765800A (en) 2021-12-07
CN113765800B CN113765800B (en) 2023-04-28

Family

ID=78785169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010507236.XA Active CN113765800B (en) 2020-06-05 2020-06-05 Method, device, system, equipment and readable storage medium for transmitting message

Country Status (1)

Country Link
CN (1) CN113765800B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023143186A1 (en) * 2022-01-29 2023-08-03 华为技术有限公司 Data transmission method, system and apparatus
WO2023246535A1 (en) * 2022-06-20 2023-12-28 华为技术有限公司 Data transmission method and apparatus and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103840976A (en) * 2014-02-28 2014-06-04 华为技术有限公司 Communication method, optical module and network device
US20150006757A1 (en) * 2013-06-26 2015-01-01 Cisco Technology, Inc. Virtual private wire services using e-vpn
US20170093611A1 (en) * 2015-09-29 2017-03-30 Juniper Networks, Inc. Egress node protection in evpn all-active topology
US20180006995A1 (en) * 2016-06-30 2018-01-04 Juniper Networks, Inc. Layer 3 convergence for evpn link failure
US20180109400A1 (en) * 2016-10-17 2018-04-19 Cisco Technology, Inc. Ethernet tag mapping in virtual private wire service using ethernet virtual private network
CN109842564A (en) * 2017-11-28 2019-06-04 华为技术有限公司 A kind of method, the network equipment and system that service message is sent
US20190394066A1 (en) * 2018-06-25 2019-12-26 Juniper Networks, Inc. Using multiple ethernet virtual private network (evpn) routes for corresponding service interfaces of a subscriber interface
CN110635935A (en) * 2018-06-25 2019-12-31 丛林网络公司 Using multiple EVPN routes for respective service interfaces of a user interface

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150006757A1 (en) * 2013-06-26 2015-01-01 Cisco Technology, Inc. Virtual private wire services using e-vpn
CN103840976A (en) * 2014-02-28 2014-06-04 华为技术有限公司 Communication method, optical module and network device
US20170093611A1 (en) * 2015-09-29 2017-03-30 Juniper Networks, Inc. Egress node protection in evpn all-active topology
US20180006995A1 (en) * 2016-06-30 2018-01-04 Juniper Networks, Inc. Layer 3 convergence for evpn link failure
US20180109400A1 (en) * 2016-10-17 2018-04-19 Cisco Technology, Inc. Ethernet tag mapping in virtual private wire service using ethernet virtual private network
CN109842564A (en) * 2017-11-28 2019-06-04 华为技术有限公司 A kind of method, the network equipment and system that service message is sent
US20190394066A1 (en) * 2018-06-25 2019-12-26 Juniper Networks, Inc. Using multiple ethernet virtual private network (evpn) routes for corresponding service interfaces of a subscriber interface
CN110635935A (en) * 2018-06-25 2019-12-31 丛林网络公司 Using multiple EVPN routes for respective service interfaces of a user interface

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023143186A1 (en) * 2022-01-29 2023-08-03 华为技术有限公司 Data transmission method, system and apparatus
WO2023246535A1 (en) * 2022-06-20 2023-12-28 华为技术有限公司 Data transmission method and apparatus and system

Also Published As

Publication number Publication date
CN113765800B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN110401599B (en) Data packet processing method and device, storage medium and electronic device
CN113259238B (en) Method and device for processing segment identifiers
CN113839870B (en) Path creation method, device and system
CN111988266B (en) Method for processing message
US20220255857A1 (en) Packet Processing Method, Network Node, and System
EP4207685A1 (en) Message header processing method and apparatus, storage medium and electronic device
CN113206787B (en) Method and device for processing segment identifiers
CN113973082A (en) Message processing method and network equipment
CN113765800B (en) Method, device, system, equipment and readable storage medium for transmitting message
CN114513429A (en) Transmission method for detection message, and method and equipment for determining reverse path
US20240048479A1 (en) Packet Forwarding Method and Apparatus, Network Device, and Storage Medium
US20230336377A1 (en) Packet forwarding method and apparatus, and network system
CN114726775A (en) Routing information sending method, message sending method and related device
CN113765865A (en) Message processing method, device and system
WO2022166465A1 (en) Message processing method and related apparatus
CN114006854B (en) Communication method and network equipment
CN116346716A (en) Message processing method and device and communication system
CN115134282A (en) Route processing method and network equipment
CN112804130A (en) Message processing method, device, system, storage medium and electronic equipment
CN114760244A (en) Method, device and network equipment for transmitting Binding Segment Identification (BSID)
CN115412976A (en) Message processing method and related equipment
CN114125988A (en) Method and equipment for generating routing information, sending position information and forwarding message
CN114629834B (en) Communication method and device
CN113037631B (en) Address transmission method and network equipment
CN117221024A (en) Communication method, UP device and CP 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