CN114760248A - Message transmission method, device and system - Google Patents

Message transmission method, device and system Download PDF

Info

Publication number
CN114760248A
CN114760248A CN202011577140.7A CN202011577140A CN114760248A CN 114760248 A CN114760248 A CN 114760248A CN 202011577140 A CN202011577140 A CN 202011577140A CN 114760248 A CN114760248 A CN 114760248A
Authority
CN
China
Prior art keywords
network device
sid
evpn instance
message
vlan
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
CN202011577140.7A
Other languages
Chinese (zh)
Other versions
CN114760248B (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.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital 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 Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN202011577140.7A priority Critical patent/CN114760248B/en
Publication of CN114760248A publication Critical patent/CN114760248A/en
Application granted granted Critical
Publication of CN114760248B publication Critical patent/CN114760248B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • 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]

Abstract

A message transmission method, device and system belong to the technical field of networks. The first network equipment determines a first SID corresponding to a first VLAN identification according to the first VLAN identification carried in a received first message, sends the first message to a second EVPN instance in second network equipment through a first EVPN instance in the first network equipment according to the first SID, and forwards the first message through the second EVPN instance in the second network equipment according to the first SID. Therefore, the first network equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment, and the pressure of the first network equipment for learning the MAC address and the performance requirement of the first network equipment are reduced.

Description

Message transmission method, device and system
Technical Field
The present application relates to the field of network technologies, and in particular, to a method, a device, and a system for packet transmission.
Background
An Ethernet Virtual Private Network (EVPN) network includes Provider Edge (PE) devices, and a PE device generally needs to learn a Media Access Control (MAC) address of a user device mounted on the PE device, and forwards a packet to the user device according to the MAC address of the user device.
However, when there are many user devices mounted on the PE device, there are many MAC addresses that need to be learned by the PE device, which results in a large pressure on the PE device to learn the MAC addresses and a high requirement on the performance of the PE device.
Disclosure of Invention
The application provides a message transmission method, device and system, which are beneficial to reducing the pressure of learning an MAC address of PE equipment and reducing the performance requirement on the PE equipment. The technical scheme of the application is as follows:
in a first aspect, a method for transmitting a message is provided, where the method is applied to a system including a first network device and a second network device, and the method includes: the first network device determines a first Segment Identifier (SID) corresponding to a first Virtual Local Area Network (VLAN) identifier carried in the received first packet according to the VLAN identifier; and the first network equipment sends the first message to a second EVPN instance in the second network equipment through a first EVPN instance in the first network equipment according to the first SID.
According to the technical scheme, the first network device can determine the first SID according to the first VLAN identification carried in the first message sent to the user equipment, and sends the first message to the second EVPN instance in the second network device through the first EVPN instance in the first network device according to the first SID, so that the first network device can forward the message sent to the user equipment without learning the MAC address of the user equipment, and the pressure of the first network device on learning the MAC address and the performance requirement of the first network device are reduced.
Optionally, the determining, by the first network device, the first SID corresponding to the first VLAN identifier according to the first VLAN identifier carried in the received first packet includes: and the first network equipment determines a first SID corresponding to the first VLAN identification according to the first VLAN identification and a routing forwarding table of the first EVPN instance. The routing forwarding table of the first EVPN instance may be a VLAN forwarding table, and a corresponding relationship between a VLAN identifier and a SID is recorded in the routing forwarding table.
According to the technical scheme, the first network equipment determines the first SID corresponding to the first VLAN identification according to the routing forwarding table of the first EVPN instance, so that the first network equipment can forward the first message according to the first SID conveniently, and the first network equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment.
Optionally, the determining, by the first network device, the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and the route forwarding table of the first EVPN instance, includes: the first network device determines that a first SID corresponding to a first VLAN identification is one of at least one SID corresponding to the VLAN identification matched with the first VLAN identification in a routing forwarding table of the first EVPN instance according to the matching of the VLAN identification in the routing forwarding table of the first EVPN instance and the first VLAN identification, wherein the routing forwarding table of the first EVPN instance is used for recording the corresponding relation between the VLAN identification and the SID, and each VLAN identification in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
According to the technical scheme provided by the application, one or more SIDs corresponding to the VLAN identifier matched with the first VLAN identifier can exist in the route forwarding table of the first EVPN instance, and the first network device can determine the first SID corresponding to the first VLAN identifier from the one or more SIDs based on a load balancing strategy or a main/standby protection strategy, so that the load balancing of the network device in the system can be realized, or the forwarding protection of the message can be realized, and the message loss caused by the fault of the network device can be avoided.
Optionally, the system further comprises: before the first network device determines, according to a first VLAN identifier carried in the received first packet, a first SID corresponding to the first VLAN identifier, a Route Reflector (RR), where the method further includes: the first network device receives a route of a second EVPN instance in the second network device sent by the RR, wherein the route of the second EVPN instance comprises the first VLAN identifier and the first SID; and the first network equipment generates a forwarding table entry in a routing forwarding table of the first EVPN instance according to the first VLAN identifier and the first SID in the route of the second EVPN instance. Illustratively, the route of the second EVPN instance may be an Ethernet auto discovery (Ethernet AD) route, for example, an Ethernet auto discovery Per EVI route, where an Ethernet virtual private network instance (EVI) is used.
According to the technical scheme provided by the application, the RR reflects the route of the second EVPN instance in the second network equipment to the first network equipment, so that the first network equipment can generate the forwarding table item in the route forwarding table of the first EVPN instance in the first network equipment according to the first VLAN identification and the first SID in the route of the second EVPN instance, the first network equipment can determine the corresponding first SID to forward the message when receiving the first message carrying the first VLAN identification, and the first network equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment. In addition, in the technical solution provided by the application, what is reflected by the RR to the first network device is the Ethernet AD route of the second EVPN instance, so that the requirement on the reflection capability of the RR can be reduced.
Optionally, the sending, by the first network device, the first packet to the second EVPN instance in the second network device through the first EVPN instance in the first network device according to the first SID includes: the first network device encapsulates the first SID in the first message; the first network device sends a first message encapsulating the first SID to the second EVPN instance in the second network device through the first EVPN instance in the first network device.
Optionally, the system further includes a third network device, where the third network device and the second network device are dual-homed devices of the same device, and the method further includes: the first network equipment determines a second SID corresponding to a first VLAN identification according to the first VLAN identification carried in a received second message; and the first network equipment sends the second message to a third EVPN instance in the third network equipment through the first EVPN instance in the first network equipment according to the second SID. For example, the first network device may determine the second SID according to the first VLAN identifier carried in the second packet based on a load sharing policy or a primary/secondary protection policy, and forward the second packet according to the second SID, so as to implement load balancing of the network devices in the system or forward protection of the packet.
According to the technical scheme provided by the application, the first network device determines the second SID according to the first VLAN identification carried in the received second message, and sends the second message to the third EVPN instance in the third network device through the first EVPN instance in the first network device according to the second SID, so that load sharing or active-standby protection between the third network device and the second network device can be achieved, load balance of the network devices in the system is guaranteed, forwarding protection of the messages is guaranteed, and the packet loss rate of the system can be reduced.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type, and the type of the second SID is one of an end.dx2 type or an end.dt2u type.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is an innermost VLAN identifier of the at least one layer of VLAN identifier. The second message carries at least one layer of VLAN identification, and the first VLAN identification is the VLAN identification which is positioned in the innermost layer of the second message in the at least one layer of VLAN identification.
According to the technical scheme provided by the application, the first VLAN identifier is used for the first network device to determine the corresponding SID to forward the message, and before the technical scheme of the application is implemented, the position of the VLAN identifier used for determining the SID in the message can be configured in the network device (for example, the first network device), so that the VLAN identifier used for determining the corresponding SID can be conveniently extracted from the message when the network device receives the message.
In a second aspect, a packet transmission method is provided, where the method is applied to a system including a first network device and a second network device, and the method includes: the method comprises the steps that a second network device receives a first message sent by a first EVPN instance in a first network device through a second EVPN instance in the second network device, wherein the first message is sent by the first network device according to a first SID corresponding to a first VLAN identifier carried in the first message; and the second network equipment forwards the first message through the second EVPN instance according to the first SID.
According to the technical scheme provided by the application, the first network device can determine the first SID according to the first VLAN identification carried in the first message sent to the user equipment, the first message is sent to the second EVPN instance in the second network device through the first EVPN instance in the first network device according to the first SID, and after the second network device receives the first message, the first message is forwarded through the second EVPN instance in the second network device according to the first SID. Therefore, the first network equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment, and the pressure of the first network equipment for learning the MAC address and the performance requirement of the first network equipment are reduced.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type.
Optionally, the forwarding, by the second network device, the first packet according to the first SID through the second EVPN instance includes: if the type of the first SID is end.dx2 type, the second network device forwards the first packet according to the port corresponding to the first SID in the second EVPN instance; and if the type of the first SID is END.DT2U type, the second network device forwards the first message according to the first SID and a routing forwarding table of the second EVPN instance, wherein the routing forwarding table of the second EVPN instance records a corresponding relation between an address and a port identifier, and the port identifier indicates a port corresponding to the address. In this application, if the type of the first SID is end.dx2 type, the first SID may indicate a certain port of a second EVPN instance in the second network device, and the second network device directly forwards the first packet through the port indicated by the first SID; if the type of the first SID is end.dt2u type, the second network device may search the route forwarding table of the second EVPN instance according to the destination address carried by the first packet to determine the egress port of the first packet in the second EVPN instance, and forward the first packet through the egress port of the first packet. Wherein the routing forwarding table of the second EVPN instance may be a MAC forwarding table.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is an innermost VLAN identifier of the at least one layer of VLAN identifier.
According to the technical scheme provided by the application, the first VLAN identifier is used for the first network device to determine the corresponding SID to forward the message, and before the technical scheme of the application is implemented, the position of the VLAN identifier used for determining the SID in the message can be configured in the network device (for example, the first network device), so that the VLAN identifier used for determining the corresponding SID can be conveniently extracted from the message when the network device receives the message.
Optionally, the forwarding, by the second network device, the first packet according to the first SID through the second EVPN instance includes: the second network equipment deletes the first VLAN identification from the first message; and the second network equipment forwards the first message after deleting the first VLAN identification through the second EVPN instance according to the first SID.
According to the technical scheme provided by the application, the second network device deletes the first VLAN identification in the first message, so that the first VLAN identification can be prevented from influencing the processing and/or forwarding of the first message by subsequent network devices.
Optionally, the system further comprises: RR, before the second network device receives, through the second EVPN instance in the second network device, the first packet sent by the first EVPN instance in the first network device, the method further includes: the second network device sends a route of a second EVPN instance in the second network device to the RR, the route of the second EVPN instance including the first VLAN identification and the first SID. Illustratively, the route of the second EVPN instance may be an Ethernet AD route, e.g., an Ethernet auto discovery Per EVI route.
According to the technical scheme provided by the application, the second network device sends the route of the second EVPN instance in the second network device to the RR, so that the RR can conveniently reflect the route of the second EVPN instance to the first network device, and the first network device can conveniently generate the forwarding table entry in the route forwarding table of the first EVPN instance in the first network device according to the first VLAN identifier and the first SID in the route of the second EVPN instance so as to forward the message. Since the RR reflects to the first network device the Ethernet AD route of the second EVPN instance, the requirement for the reflective capability of the RR can be reduced.
In a third aspect, a communication system is provided, the system comprising a first network device and a second network device; the first network device is used for determining a first SID corresponding to a first VLAN identifier according to the first VLAN identifier carried in a received first message, and sending the first message to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID; the second network device is configured to forward the first packet through the second EVPN instance according to the first SID.
Optionally, the first network device is specifically configured to determine the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and the routing forwarding table of the first EVPN instance.
Optionally, the first network device is specifically configured to: and determining that the first SID corresponding to the first VLAN identifier is one of at least one SID corresponding to the VLAN identifier matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance according to the matching of the VLAN identifier in the routing forwarding table of the first EVPN instance and the first VLAN identifier, wherein the routing forwarding table of the first EVPN instance is used for recording the corresponding relation between the VLAN identifier and the SID, and each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
Optionally, the system further comprises: RR; the second network device is further configured to send, to the RR, a route of a second EVPN instance in the second network device, where the route of the second EVPN instance includes the first VLAN id and the first SID; the RR is configured to send a route of the second EVPN instance to the first network device; the first network device is further configured to generate a forwarding table entry in a routing forwarding table of the first EVPN instance according to the first VLAN id and the first SID in the route of the second EVPN instance.
Optionally, the first network device is specifically configured to: and encapsulating the first SID in a first message, and sending the first message encapsulated with the first SID to a second EVPN instance in second network equipment through a first EVPN instance in the first network equipment.
Optionally, the system further includes a third network device, where the third network device and the second network device are dual-homed devices of the same device; the first network device is further configured to determine, according to the first VLAN identifier carried in the received second packet, a second SID corresponding to the first VLAN identifier, and send, according to the second SID, the second packet to a third EVPN instance in the third network device through the first EVPN instance in the first network device; and the third network device is configured to forward the second packet through the third EVPN instance according to the second SID.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type, and the type of the second SID is one of an end.dx2 type or an end.dt2u type.
Optionally, the second network device is specifically configured to: if the type of the first SID is END.DX2 type, forwarding the first message according to a port corresponding to the first SID in the second EVPN instance; and if the type of the first SID is END.DT2U type, forwarding the first message according to the first SID and a routing forwarding table of the second EVPN instance, wherein the routing forwarding table of the second EVPN instance records the corresponding relation between an address and a port identifier, and the port identifier indicates a port corresponding to the address.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is an innermost VLAN identifier of the at least one layer of VLAN identifier.
Optionally, the second network device is specifically configured to: and deleting the first VLAN identifier from the first message, and forwarding the first message after deleting the first VLAN identifier through the second EVPN instance according to the first SID.
For technical effects of the third aspect and various optional implementations of the third aspect, reference may be made to technical effects of the first aspect and various optional implementations of the first aspect, and technical effects of the second aspect and various optional implementations of the second aspect, which are not described herein again.
In a fourth aspect, a first network device is provided, where the first network device includes modules configured to perform the packet transmission method according to the first aspect or any optional manner of the first aspect. The modules may be implemented based on software, hardware or a combination of software and hardware, and the modules may be combined or divided arbitrarily based on the specific implementation.
A fifth aspect provides a second network device, which includes modules configured to execute the message transmission method provided in the second aspect or any optional manner of the second aspect. The modules may be implemented based on software, hardware or a combination of software and hardware, and the modules may be combined or divided arbitrarily based on the specific implementation.
In a sixth aspect, a network device is provided that includes a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory to cause the network device to perform the message transmission method as provided in the first aspect or any optional manner of the first aspect, or to perform the message transmission method as provided in the second aspect or any optional manner of the second aspect.
A seventh aspect provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the message transmission method provided by the first aspect or any optional manner of the first aspect, or implements the message transmission method provided by the second aspect or any optional manner of the second aspect.
An eighth aspect provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform a message transmission method as provided in the first aspect or any of the alternatives of the first aspect, or to perform a message transmission method as provided in the second aspect or any of the alternatives of the second aspect.
A ninth aspect provides a chip, which includes programmable logic circuits and/or program instructions, and when the chip runs, is used to implement the message transmission method provided in the first aspect or any optional manner of the first aspect, or implement the message transmission method provided in the second aspect or any optional manner of the second aspect.
In a tenth aspect, there is provided a communication system comprising: a first network device and a second network device;
the first network device is the first network device provided in the fourth aspect, and the second network device is the second network device provided in the fifth aspect; alternatively, at least one of the first network device and the second network device is a network device as provided in the above sixth aspect.
The beneficial effect that technical scheme that this application provided brought is:
according to the message transmission method, the device and the system, after receiving a first message carrying a first VLAN identifier, a first network device determines a first SID corresponding to the first VLAN identifier, sends the first message to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID, and after receiving the first message, the second network device forwards the first message to a user device according to the first SID. Therefore, the first network device forwards the first message to the second network device through the tunnel between the first EVPN instance in the first network device and the second EVPN instance in the second network device according to the first SID, and the first network device can forward the first message sent to the user device without learning the MAC address of the user device, so that the pressure of the first network device on learning the MAC address and the performance requirement of the first network device are reduced.
Drawings
Fig. 1 is a schematic structural diagram of an EVPN network provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of another EVPN network provided in an embodiment of the present application;
fig. 3 is a flowchart of a message transmission method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a message according to an embodiment of the present application;
fig. 5 is a schematic diagram of another message provided in the embodiment of the present application;
fig. 6 is a schematic diagram of another message provided in the embodiment of the present application;
fig. 7 is a flowchart of another message transmission method according to an embodiment of the present application;
fig. 8 is a schematic diagram of a message transmission provided in an embodiment of the present application;
fig. 9 is a flowchart of another message transmission method according to an embodiment of the present application;
FIG. 10 is a schematic diagram of the message transmission method shown in FIG. 9;
fig. 11 is a flowchart of another message transmission method according to an embodiment of the present application;
fig. 12 is a schematic diagram of the message transmission method shown in fig. 11;
fig. 13 is a schematic logical structure diagram of a first network device according to an embodiment of the present application;
fig. 14 is a schematic logical structure diagram of a second network device according to an embodiment of the present application;
fig. 15 is a schematic hardware structure diagram of a network device according to an embodiment of the present application;
fig. 16 is a schematic hardware structure diagram of another network device provided in an embodiment of the present application;
fig. 17 is a schematic structural diagram of a communication system according to an embodiment of the present application.
Detailed Description
To make the principles, technical solutions and advantages of the present application clearer, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before explaining the embodiments of the present application, an application scenario of the embodiments of the present application is explained.
The technical scheme provided by the embodiment of the application can be applied to an EVPN network. The EVPN network comprises a plurality of PE devices, each PE device is in communication connection, at least one user device can be mounted under each PE device, and each PE device is used for forwarding messages of the user devices mounted under the PE devices. Optionally, each PE device is configured with at least one EVPN instance, and each PE device may forward a packet of the user equipment through the EVPN instance in the PE device.
The PE device may assume corresponding roles according to different application scenarios. Taking a user broadband access scenario as an example, an EVPN network applied in this scenario includes at least one broadband access device and multiple PE devices, and according to differences of roles assumed by the multiple PE devices, the multiple PE devices may include a user access PE device and a broadband access PE device, the multiple user access PE devices may be connected to each other, the multiple broadband access PE devices may be connected to each other, each broadband access PE device may be connected to at least one user access PE device, each broadband access PE device may be connected to at least one broadband access device, and each user access PE device may be connected to at least one user device. The user access PE equipment and the broadband access PE equipment are used for forwarding messages from the broadband access equipment to the user equipment and forwarding messages from the user equipment to the broadband access equipment.
The broadband access device may be a broadband access server (BRAS). The user device may be a host, a user terminal, a server, or various types of devices such as a Virtual Machine (VM) created on the server, and the user device may generally be a dial-up device, such as a photo cat. The PE device may be a network device such as a router (router), switch, virtual router, or virtual switch. Each PE device may be directly connected or connected through another network device (e.g., a core device), which is not limited in this embodiment of the present application.
For example, please refer to fig. 1, which shows a schematic structural diagram of an EVPN network provided in an embodiment of the present application, where fig. 1 illustrates an example where a broadband access device is a BRAS and a user equipment is a VM. As shown in fig. 1, the EVPN network includes four PE devices from PE1 to PE4 (i.e., PE1, PE2, PE3, and PE4), and three broadband access devices from BRAS1 to BRAS3 (i.e., BRAS1, BRAS2, and BRAS 3). PE1 to PE4 are connected to each other, PE1 and PE4 are connected to BRAS1 to BRAS3, PE2 and PE3 are connected to VM1 to VM4 (i.e., VM2, VM3 and VM4), and VM1 to VM4 are mounted under PE2 and PE3, respectively. According to the difference of roles assumed by PEs 1-PE 4, PE1 and PE4 may both be broadband access PE devices, PE2 and PE3 may both be user access PE devices, PE 1-PE 4 are respectively configured with at least one EVPN instance (only 1 is shown in fig. 1, which is EVPN instance 1), each PE device of PE 1-PE 4 forwards messages from VMs 1-VM 4 to BRAS 1-BRAS 3 and forwards messages from BRAS 1-BRAS 3 to VM 1-VM 4 through the EVPN instance in the PE device.
Exemplarily, as shown in fig. 1, after a PE2 receives a message sent by a VM1 mounted under the PE2, the PE2 forwards the message to an EVPN instance 1 in a PE1 through an EVPN instance 1 in the PE2, and the PE1 forwards the message to a BRAS1 through the EVPN instance 1 in the PE1, where the BRAS1 may provide a broadband access service for the VM1 according to the message. Further, for example, after receiving the message sent by the BRAS1 through the EVPN instance 1 in the PE1, the PE1 forwards the message to the EVPN instance 1 in the PE2 through the EVPN instance 1 in the PE1, and forwards the message to the VM1 through the EVPN instance 1 in the PE2 by the PE 2. Optionally, after receiving the message sent by the BRAS1 through the EVPN instance 1 in the PE1, the PE1 may also forward the message to the EVPN instance 1 in the PE3 through the EVPN instance 1 in the PE1 based on a load sharing policy or an active/standby protection policy, and forward the message to the VM1 through the EVPN instance 1 in the PE3 by the PE 3. The EVPN instance 1 in the PE1 may include two ports (e.g., EVPN neighbors) corresponding to the PE2 and the PE3, so that the PE1 may forward the packet to the EVPN instance 1 in the PE2 through the EVPN instance 1 in the PE1, and may also forward the packet to the EVPN instance 1 in the PE3 through the EVPN instance 1 in the PE 1.
Generally, the EVPN network further includes an edge access device and/or a core device, where each PE device may be connected through the core device, the edge access device may be connected to a user access PE device, and the user device is connected to the user access PE device through the edge access device, that is, the user device is mounted under the edge access device and connected to the user access PE device through the edge access device. The edge access device may be, for example, a Customer Edge (CE) device, and the core device may be, for example, a provider (P) device. The CE device and the P device may each be a network device such as a router, a switch, a virtual router, or a virtual switch, and the CE device may be an Optical Line Terminal (OLT). The P device may forward a message between the user access PE device and the broadband access PE device.
For example, please refer to fig. 2, which shows a schematic structural diagram of another EVPN network provided in an embodiment of the present application, where fig. 2 still illustrates an example where the broadband access device is a BRAS and the user equipment is a VM. Referring to fig. 2, on the basis of fig. 1, the EVPN network further includes two CE devices, CE1 and CE2, and two P devices, P1 and P2. The P1 is connected with the P2, each P device of the P1 and the P2 is respectively connected with PE1 to PE4, each CE device of the CE1 and the CE2 is respectively connected with PE2 and PE3, the CE1 is connected with VM1 to VM2 (namely, VM1 to VM2 are mounted under CE1, and mounted under PE2 and PE3 through CE1), and the CE2 is connected with VM3 to VM4 (namely, VM3 to VM4 are mounted under CE2, and mounted under PE2 and PE3 through CE 2). The descriptions of PE 1-PE 4 may refer to the related descriptions of the EVPN network shown in fig. 1, and are not described herein again. The P1 and P2 can be used for message forwarding between PE1 and PE 2-PE 3, and between PE4 and PE 2-PE 3.
For example, as shown in fig. 2, after receiving a message sent by a VM1 that is mounted by a PE2 (the message may be forwarded through a CE1), the PE2 forwards the message to a P1 through an EVPN instance 1 in the PE2, the P1 forwards the message to the EVPN instance 1 in the PE1, and the PE1 forwards the message to a BRAS1 through the EVPN instance 1 in the PE1, and the BRAS1 provides a broadband access service for the VM1 according to the message. Further, for example, after receiving the message sent by the BRAS1 through the EVPN instance 1 in the PE1, the PE1 forwards the message to the P1 through the EVPN instance 1 in the PE1, the P1 forwards the message to the EVPN instance 1 in the PE2, the PE2 forwards the message to the CE1 through the EVPN instance 1 in the PE2, and the CE1 forwards the message to the VM1 according to the destination address carried in the message.
In the current technical solution, in order to forward a message to a user equipment (for example, the aforementioned VM1 to VM4), a PE device needs to learn a MAC address of the user equipment, so as to forward the message to the user equipment according to the MAC address of the user equipment. For example, as shown in fig. 1 and fig. 2, the EVPN network further includes an RR, the user access PE device (e.g., PE2 and PE3) may learn a MAC address of the user device based on traffic from the user device, and send a MAC route (e.g., type2 type route) of the user device to the RR, and after receiving the MAC route of the user device sent by the user access PE device, the RR sends the MAC route of the user device to the broadband access PE device (e.g., PE1 and PE4), and the broadband access PE device learns the MAC address of the user device according to the MAC route of the user device.
However, when there are many user devices (e.g., PE1 and PE4) mounted under the broadband access PE device, the MAC addresses that the broadband access PE device needs to learn are all many, which results in a pressure of the broadband access PE device to learn the MAC addresses being large, and a performance requirement on the broadband access PE device being high. For example, each ue usually has 3 to 4 MAC addresses, and when 100 ten thousand ues are accessed in the EVPN network, the broadband access PE device needs to learn 300 to 400 ten thousand MAC addresses, which is a large pressure for the broadband access PE device to learn MAC addresses and needs a strong hardware capability to meet the requirement of the entry. When the access side link frequently oscillates, a large number of MAC forwarding tables in the broadband access PE device need to be refreshed, which results in a high Central Processing Unit (CPU) of the broadband access PE device and a reduced processing performance of the control plane. In addition, since there are more MAC routes (e.g., type2 type routes) that require RR reflection, the requirement for RR reflection capability is higher. For example, as shown in fig. 1 and 2, PE2 and PE3 both send MAC routes of VM1 to VM4 to RR, and the MAC routes in RR are doubled (for example, for each VM of VM1 to VM4, there are two MAC routes of the VM in RR).
In view of this, the embodiments of the present application provide a method, a device, and a system for transmitting a message, where a broadband access PE device may determine, according to a VLAN identifier carried in a message sent to a user device, a SID capable of locating an EVPN instance in a user access PE device, forward, according to the SID, the message to the EVPN instance in the user access PE device through a tunnel between the EVPN instance in the broadband access PE device and the EVPN instance in the user access PE device in an Internet Protocol version 6 (IPv 6) forwarding manner, and forward, according to the SID, the message to the user device through the EVPN instance in the user access PE device, so that the broadband access PE device may forward the message sent to the user device without learning an MAC address of the user device, thereby reducing pressure on learning the MAC address of the broadband access PE device and performance requirements on the broadband access PE device, and the processing performance reduction of the control surface of the broadband access PE equipment caused by frequent oscillation of the access side link is avoided. In addition, the RR does not need to reflect the MAC route of the user equipment to the broadband access PE equipment, and the requirement on the reflection capability of the RR is reduced. The technical solution of the present application will be described in detail below with reference to the accompanying drawings.
It should be noted that the EVPN networks shown in fig. 1 and fig. 2 are only used for example, and are not used to limit the technical solution of the present application, in a specific implementation process, the numbers of PE devices, CE devices, P devices, BRAS, and RRs may be configured as needed, and specific roles that each type of device needs to assume may be determined according to application scenarios, and the EVPN network may further include other network devices or the EVPN network may further include fewer devices than those in fig. 1 or fig. 2, for example, the EVPN network may not include RRs and/or P devices, but other network devices (e.g., PE devices) in the EVPN network implement the reflection function of the RRs, for example, the network devices may be configured so that the network devices can implement the transmission function of the RRs. In addition, for convenience of description, in the embodiment of the present application, in a user broadband access scenario, a PE device connected to a user device is referred to as a user access PE device, and a PE device connected to a broadband access device is referred to as a broadband access PE device, but this description is merely exemplary, and both the user access PE device and the broadband access PE device are PE devices, in other implementation scenarios, the user access PE device and the broadband access PE device may use other names for description, or may not distinguish types of PE devices, which is not limited in this application embodiment.
The term SID referred to in this application will be described first.
In the embodiments of the present application, the SID identifies an endpoint, for example, identifies a certain EVPN instance in a device, or a port of a certain EVPN instance in a device. In IPv6, the SID may be an IPv6 address of a network device, which is expressed as a 128-bit value, and an IPv6 SID may include a location (locator) portion, a function (function) portion and a parameter (argument) portion, and its structure may be as shown in table 1 below:
TABLE 1
locator function argument
The position part is used for routing the message to the network equipment corresponding to the SID so as to realize the addressing of the network. The location part has two important attributes, i.e. routability and aggregation, and in SID the location part is a variable length part.
Wherein, the functional part indicates that the network device issuing the SID needs to perform a corresponding action, which is equivalent to calculating an operation code of the instruction. In an IPv6 network, any processing operation may be expressed in terms of a functional part or the entire SID.
Where the parameter portion is a parameter, service, or any other relevant information needed when executing the instruction. The parameter portion is an optional portion, i.e., the SID may not include the parameter portion.
SID generally has a type, and different types of SIDs have different actions indicated in functional parts, and embodiments of the present application mainly refer to SRv6 SID of end.dx2 type (end.dx 2 SID) and end.dt2u type (end.dt2u SID). The end.dx2SID represents an end point (endpoint) SID of a two-layer cross connection, and is used to identify an end point, and the forwarding action corresponding to the end.dx2SID is to strip off an IPv6 header and its extension header, and then forward the remaining messages from the port corresponding to the SID. And the end.DT2U SID represents the endpoint SID of the two-layer cross connection and has the function of searching the unicast MAC forwarding table, and is used for identifying one endpoint, the forwarding action corresponding to the end.DT2U SID is to strip off the IPv6 message header and the expansion header thereof, then use the destination MAC address of the residual message to search the MAC forwarding table, and forward the residual message from the corresponding port according to the MAC forwarding table. It should be noted that, the end.dxl 2SID and the end.dt2u SID described in the embodiment of the present application are only exemplary, and in practical applications, information having the same or similar function as the end.dxl 2SID or the end.dt2u SID may also be used to implement the technical scheme of the present application, for example, a SID having the same or similar function as the end.dxl 2SID or the end.dt2u SID may be newly defined to implement the technical scheme of the present application, which is not limited in the embodiment of the present application.
An embodiment of the message transmission method of the present application is described below. It should BE noted that, the technical solutions provided in the present application can BE applied to network scenarios such as segment routing internet protocol version 6 (SRv 6), Best Effort (BE) scenario, SRv6-Policy, and the like, and the following embodiments mainly take SRv6-BE scenario as an example to describe the technical solutions of the present application.
Please refer to fig. 3, which shows a flowchart of a message transmission method according to an embodiment of the present application. The message transmission method can be applied to a system comprising a first network device and a second network device, wherein the first network device can be a broadband access PE device, and the second network device can be a user access PE device. For example, as shown in fig. 1 and 2, the first network device may be PE1, and the second network device may be PE 2. As shown in fig. 3, the method may include the following steps:
step 301, the first network device determines a first SID corresponding to a first VLAN identifier according to the first VLAN identifier carried in the received first packet.
A first EVPN instance may be configured in a first network device, a second EVPN instance may be configured in a second network device, the first EVPN instance and the second EVPN instance belong to the same EVPN network, a Route Target (RT) of the first EVPN instance matches an RT of the second EVPN instance, for example, an Ingress Route Target (IRT) of the first EVPN instance matches an Egress Route Target (ERT) of the second EVPN instance, or an ERT of the first EVPN instance matches an IRT of the second EVPN instance, and the first EVPN instance and the second EVPN instance may be the same EVPN instance distributed in two different network devices of the first network device and the second network device. Wherein the second EVPN instance can be located according to the first SID. Exemplarily as shown in fig. 1 and 2. The first network device may be PE1 and the second network device may be PE2, the first EVPN instance is EVPN instance 1 in the PE1, and the second EVPN instance is EVPN instance 1 in the PE 2.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type, that is, the first SID may be one of an end.dx2SID or an end.dt2u SID. Dxp 2, the first SID may be configured to indicate a port of a second EVPN instance in a second network device to enable locating the second EVPN instance in the second network device according to the first SID. The first SID may be used to indicate a second EVPN instance in a second network device to enable locating the second EVPN instance in the second network device according to the first SID if the type of the first SID is end. If the type of the first SID is an end.dx2 type, the port indicated by the first SID may be an Access Circuit (AC) port of the second EVPN instance, the second EVPN instance may include a plurality of AC ports, at least one AC port of the second EVPN instance may be configured with a corresponding end.dx2SID, and the port indicated by the first SID may be one of the at least one AC port. It should be noted that, in this embodiment of the present application, the first SID is end.dx2SID or end.dt2u SID, which is only exemplary, and in practical applications, information having the same or similar function as the end.dx2SID or end.dt2u SID may also be used to implement the function of the first SID, for example, a SID having the same or similar function as the end.dx2SID or end.dt2u SID may be defined to implement the function of the first SID, which is not limited in this embodiment of the present application.
Optionally, the first network device may maintain a routing forwarding table of a first EVPN instance in the first network device, and after receiving the first packet, the first network device may parse the first packet to determine a first VLAN identifier carried in the first packet from the first packet, and then determine a first SID corresponding to the first VLAN identifier according to the first VLAN identifier and the routing forwarding table of the first EVPN instance. The first packet may be a packet sent by a broadband access device (e.g., BRAS1 in fig. 1 and 2) to a user equipment (e.g., VM1 in fig. 1 and 2), where the first packet may carry at least one layer of VLAN id, and the first VLAN id may be a VLAN id located at an innermost layer of the first packet in the at least one layer of VLAN id. The first packet also carries a load (payload), an innermost layer of the first packet refers to a layer closest to the load, and an outermost layer of the first packet refers to a layer farthest from the load, that is, a direction from the load to the load in the first packet is an inside-out direction in the first packet. For example, fig. 4 is a schematic diagram of a first packet provided in the embodiment of the present application, where the first packet may be a first packet received by the first network device, for example, the first network device is PE1 in fig. 1 or fig. 2, and the first packet may be a packet sent by the BRAS1 in fig. 1 or fig. 2 to the VM 1. The first message carries a load, VLAN100, UVLAN (user VLAN), SVLAN (service VLAN), 0-5-1 and 1-1-1, wherein, VLAN100, UVLAN and SVLAN are VLAN identifications, 0-5-1 is a source address of the first message, 1-1-1 is a destination address of the first message, and the source address and the destination address can be MAC addresses. The first message shown in fig. 4 may be a message carrying a three-layer VLAN identifier, where the three-layer VLAN identifier includes, from the innermost side to the outermost side of the first message, a VLAN100, a UVLAN, and a SVLAN in sequence, and the VLAN identifier in the innermost layer in the first message is the VLAN100, so that the first network device determines that the first VLAN identifier carried in the first message is the VLAN 100.
Optionally, the determining, by the first network device, the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and the routing forwarding table of the first EVPN instance may include: and the first network equipment determines that the first SID corresponding to the first VLAN identification is one of at least one SID corresponding to the VLAN identification matched with the first VLAN identification in the routing forwarding table of the first EVPN instance according to the matching of the VLAN identification in the routing forwarding table of the first EVPN instance and the first VLAN identification. In this embodiment, the first network device may determine, from the routing forwarding table of the first EVPN instance, a VLAN id that matches (e.g., is the same as) the first VLAN id, and determine, as the first SID corresponding to the first VLAN id, one of the SIDs corresponding to the VLAN id that matches the first VLAN id in the routing forwarding table of the first EVPN instance. Optionally, if a VLAN id in the routing forwarding table of the first EVPN instance matches the first VLAN id corresponds to a SID (e.g., each VLAN id in the routing forwarding table of the first EVPN instance corresponds to a SID), the first network device directly determines the SID as the first SID corresponding to the first VLAN id. If a VLAN id in the routing forwarding table of the first EVPN instance that matches the first VLAN id corresponds to multiple SIDs (for example, each VLAN id in the routing forwarding table of the first EVPN instance corresponds to multiple SIDs), multiple EVPN instances in multiple network devices may be located according to the multiple SIDs, the multiple network devices may be located on multiple forwarding paths between the first network device and a destination device (for example, a destination device of the first packet), the multiple forwarding paths may include a primary forwarding path and a backup forwarding path, or the multiple forwarding paths share a load path with each other; the first network device may determine, based on the primary/standby protection policy or the load sharing policy, a first SID corresponding to the first VLAN identifier from the plurality of SIDs, for example, the plurality of SIDs may include a primary SID and a standby SID, and the first network device determines the primary SID as the first SID corresponding to the first VLAN identifier.
Exemplarily, taking the first EVPN instance as EVPN instance 1, where each VLAN id in the routing forwarding table of the first EVPN instance corresponds to multiple SIDs, and all the multiple SIDs are end.dx2 SIDs, the routing forwarding table of the first EVPN instance may be as shown in table 2 below, where each content in table 2 below may be one forwarding entry:
TABLE 2
Figure BDA0002864635790000111
Illustratively, the first VLAN identifier carried by the first packet is VLAN100, the SID corresponding to VLAN100 in the routing forwarding table shown in table 2 includes 1::1 and 1::3, the first network device may determine the first SID corresponding to the first VLAN identifier from 1::1 and 1::3 based on the active/standby protection policy or the load sharing policy, for example, the first network device determines that the first SID corresponding to the first VLAN identifier is 1::1, and the 1::1 may be located to the second EVPN instance in the second network device.
Step 302, the first network device sends the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID.
Optionally, the first network device encapsulates the first SID in a first message, and sends the first message encapsulated with the first SID to a second EVPN instance in a second network device through a first EVPN instance in the first network device. In this embodiment of the application, the first packet may BE carried by using SRv6-BE or SRv6-Policy, and in this embodiment of the application, the first packet is carried by using SRv6-BE as an example. The first network device may further encapsulate the IPv6 address of the first network device in the first message, and send a first message encapsulating the first SID and the IPv6 address of the first network device to a second EVPN instance in the second network device through the first EVPN instance in the first network device. Wherein, the destination IP address of the first packet is the first SID, and the source IP address of the first packet is the IPv6 address of the first network device. For the first packet, the first EVPN instance in the first network device may be a source endpoint of a tunnel between the first EVPN instance in the first network device and the second EVPN instance in the second network device, and the second EVPN instance in the second network device may be a destination endpoint of the tunnel. The IPv6 address of the first network device and the first SID are encapsulated in the first message, that is, the tunnel information is encapsulated in the first message. Illustratively, the IPv6 address of the first network device is 2::1, the first SID is 1::1, and the first message after the first network device encapsulates the first SID and the IPv6 address of the first network device in the first message as shown in FIG. 4 can be as shown in FIG. 5.
It should be noted that, in this embodiment, a case that the first network device is capable of determining a SID corresponding to a first VLAN identifier carried in a first packet is taken as an example, in a possible implementation manner, the first network device may be unable to determine a SID corresponding to the first VLAN identifier carried in the first packet (for example, a SID corresponding to the first VLAN identifier does not exist in a routing forwarding table of a first EVPN instance), and in this case, the first network device may search a MAC forwarding table of the first EVPN instance according to a destination address (that is, a destination MAC address) carried in the first packet to forward the first packet. The first network device may determine a corresponding port identifier from the MAC forwarding table according to a destination address carried in the first packet, and forward the first packet through the port indicated by the port identifier. Optionally, the MAC forwarding table of the first EVPN instance may also be referred to as a routing forwarding table of the first EVPN instance, which is not limited in this embodiment of the present application.
It should also be noted that the first EVPN instance in the first network device may have an AC port for the first network device to communicate with a broadband access device (e.g., BRAS 1-BRAS 3 in fig. 1 and 2) and an EVPN neighbor for the first network device to communicate with a remote network device, and the first packet may be a packet entering the first EVPN instance from the AC port of the first EVPN instance (e.g., from BRAS 1-BRAS 3). In the embodiment of the present application, a forwarding model may be configured in advance in the first EVPN instance: a message entering the first EVPN instance from the AC port of the first EVPN instance searches for a routing forwarding table (e.g., a VLAN forwarding table) of the first EVPN instance according to the innermost VLAN identifier of the message for forwarding, and a message entering the first EVPN instance from an EVPN neighbor of the first EVPN instance searches for an MAC forwarding table of the first EVPN instance according to a destination address carried by the message for forwarding, so that the first network device can forward the first message according to steps 301 to 302 when receiving the first message.
Step 303, the second network device receives, through the second EVPN instance in the second network device, the first packet sent by the first EVPN instance in the first network device.
The first message carries at least one layer of VLAN identifier, and the innermost layer of VLAN identifier of the first message may be the first VLAN identifier carried in the first message. And, the first message also carries the first SID. For example, the first packet received by the second network device may be as shown in fig. 5.
And step 304, the second network device forwards the first packet through a second EVPN instance in the second network device according to the first SID.
The first packet received by the second network device may carry the first VLAN identifier, and the second network device may delete (or pop up) the first VLAN identifier from the first packet, and then forward, according to the first SID, the first packet after deleting the first VLAN identifier through the second EVPN instance in the second network device.
Optionally, the first message received by the second network device further carries tunnel information, and the second network device may parse the received first message to determine a first SID carried by the first message from the first message, delete both the first VLAN identifier and the tunnel information carried in the first message, and forward the first message through a second EVPN instance in the second network device according to the first SID. For example, a first message received by the second network device is shown in fig. 5, a first message forwarded by the second network device is shown in fig. 6, and the message shown in fig. 6 is obtained after deleting the first VLAN identifier (that is, VLAN100) and the tunnel information (including 1::1 and 2::1) in the message shown in fig. 5.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type. The second network device may determine the type of the first SID, and determine, according to the type of the first SID, in which manner to forward the first packet (that is, the first packet after deleting the first VLAN identifier and the tunnel information). Optionally, if the type of the first SID is end.dx2 type, the second network device forwards the first packet according to a port corresponding to the first SID in a second EVPN instance in the second network device; and if the type of the first SID is END.DT2U type, the second network equipment forwards the first message according to the first SID and a routing forwarding table of a second EVPN example in the second network equipment. The routing forwarding table of the second EVPN instance records a correspondence between an address and a port identifier, where the port identifier indicates a port corresponding to the address, and the address in the routing forwarding table may be a MAC address.
Optionally, the second network device may maintain a SID table of the second EVPN instance, where the SID table of the second EVPN instance is used to record a correspondence between a SID, a port identifier, and a SID type, where the SID type identifies a type of a corresponding SID, and the port identifier indicates a port corresponding to the corresponding SID. The type of the SID recorded in the SID table may include an end.dx2 type and an end.dt2u type, for an SID of the end.dx2 type, a port identifier corresponding to the SID may exist in the SID table, and for an SID of the end.dt2u type, the port identifier corresponding to the SID in the SID table may be null. The second network device may further maintain a routing forwarding table of a second EVPN instance, where the routing forwarding table of the second EVPN instance is used to record a correspondence between an address and a port identifier, and the port identifier indicates a port corresponding to the address. The second network device may determine a SID type corresponding to a SID matching (e.g., identical) to the first SID in the SID table of the second EVPN instance as the type of the first SID. And if the type of the first SID is an END.DX2 type, the second network device determines an egress port of the first message in the second EVPN instance according to a port identifier corresponding to the SID matched with the first SID in a SID table of the second EVPN instance, and forwards the first message through the egress port of the first message, and optionally, if the type of the first SID is the END.DX2 type, the second network device deletes the tunnel information in the first message at first, then deletes the first VLAN identifier in the first message according to the configuration information of the egress port of the first message, and forwards the first message after deleting the VLAN information and the first VLAN identifier through the egress port of the first message. If the type of the first SID is end.dt2u type, the second network device first deletes the tunnel information in the first message, then determines the destination address of the first message, determines the port identifier corresponding to the address in the routing forwarding table of the second EVPN instance, which is matched with (e.g., the same as) the destination address of the first message, as the port identifier corresponding to the destination address, determines the port indicated by the port identifier in the second EVPN instance as the egress port of the first message, deletes the first VLAN identifier in the first message according to the configuration information of the egress port of the first message, and forwards the first message through the egress port of the first message.
Illustratively, the SID table of the second EVPN instance may be as shown in table 3 below, and the routing forwarding table of the second EVPN instance may be as shown in table 4 below, where table 4 exemplifies that the address is a MAC address. Here, each line of content in table 3 below may be a forwarding table entry, and each line of content in table 4 below may be a forwarding table entry.
TABLE 3
SID SID type Port identification
SID1(1::1) END.DX2 P1
SID2(1::3) END.DX2 P2
SID3 END.DT2U
SID4 END.DT2U
TABLE 4
MAC address Port identification
MAC Address
1 P3
MAC Address
2 P4
MAC Address 3 P3
MAC Address 4 P2
As shown in table 3, the SID table of the second EVPN instance records SID1 to SID4 and the types of the SIDs, where SID1 to SID2 are end.dx2, table 3 further records port identifiers P1 to P2 corresponding to SID1 to SID2, SID3 to SID4 are end.dt2u, and the port identifiers corresponding to SID3 to SID4 in table 3 are empty. As shown in table 4, the routing forwarding table of the second EVPN instance records MAC addresses 1 to 4 and their corresponding port identifiers.
For example, assuming that the second network device determines that a SID matching (for example, being the same) with the first SID from the SID table shown in table 3 is SID1, since the SID type corresponding to the SID1 in the SID table of the second EVPN instance is end.dx2 type, the second network device first deletes the tunnel information in the first message, then determines an egress port of the first message (for example, the egress port is port 1 of the second EVPN instance) in the second EVPN instance according to the port identifier P1 corresponding to the SID1, deletes the first VLAN identifier in the first message according to the configuration information of the egress port of the first message, and forwards the first message (that is, the first message after deleting the first VLAN identifier and the tunnel information) through the egress port of the first message, for example, the second network device forwards the message shown in fig. 6 through port 1 of the second EVPN instance.
Further illustratively, assuming that the second network device determines that the SID matched with (e.g., the same as) the first SID from the SID table shown in table 3 is SID3, since the SID type corresponding to the SID3 in the SID table of the second EVPN instance is end.dt2u type, the second network device first deletes the tunnel information in the first packet, then determines the destination address of the first packet, and determines the address matched with the destination address of the first packet from the routing forwarding table shown in table 4. Assuming that the second network device determines an address matching with the destination address of the first packet from the routing forwarding table shown in table 4 as MAC address 1, since the port identifier corresponding to the MAC address 1 in the routing forwarding table is P3, the second network device determines an egress port of the first packet (for example, the egress port is port 3 of the second EVPN) in the second EVPN instance according to the port identifier P3, deletes the first VLAN identifier in the first packet according to the configuration information of the egress port of the first packet, forwards the first packet through the egress port of the first packet (that is, the first packet after deleting the first VLAN identifier and the tunnel information), and forwards the packet as shown in fig. 6 through the port 3 of the second EVPN instance, for example.
In a second EVPN instance of a second network device, an egress port of the first packet (including a port corresponding to the first SID and a port corresponding to the destination address carried in the first packet) may be an AC port of the second EVPN instance, and before executing the packet transmission method provided in the embodiment of the present application, some AC ports of the second EVPN instance may be configured with, for example: and for the message which enters the second EVPN instance from the AC port, inserting a VLAN identification into the innermost layer of the message and then forwarding the message, and for the message which needs to be forwarded from the second EVPN instance through the AC port, deleting the VLAN identification of the innermost layer of the message and then forwarding the message. In this way, when the second network device forwards the first packet through the second EVPN instance, the first VLAN id in the first packet may be deleted.
In the message transmission method provided in the embodiment of the present application, the second network device may forward the first message according to a first SID carried in the first message, and if the first SID is end.dx2sid, the second network device forwards the first message according to a port corresponding to the first SID in a second EVPN instance in the second network device, and if the first SID is end.dx2sid, the second network device forwards the first message according to the first SID and a routing forwarding table (MAC forwarding table) of the second EVPN instance.
To sum up, in the technical solution provided in this embodiment, after receiving a first packet carrying a first VLAN identifier, a first network device determines a first SID corresponding to the first VLAN identifier, sends the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID, and after receiving the first packet, the second network device forwards the first packet to a user equipment through the second EVPN instance in the second network device according to the first SID. Therefore, the first network device forwards the first message to the second EVPN instance in the second network device through the tunnel between the first EVPN instance in the first network device and the second EVPN instance in the second network device according to the first SID, and the first network device can forward the message sent to the user device without learning the MAC address of the user device, thereby reducing the pressure of the first network device in learning the MAC address and the performance requirement of the first network device, and avoiding the reduction of the processing performance of the control plane of the first network device caused by frequent oscillation of an access side link.
As can be seen from the above description of the embodiments, in the routing forwarding table (i.e. the VLAN forwarding table) of the first EVPN instance, the VLAN id matching the first VLAN id may correspond to multiple SIDs, and the multiple SIDs may be located to multiple EVPN instances in multiple network devices. The plurality of network devices may be multi-homed devices (that is, the CE devices are respectively connected to the plurality of network devices) of the CE device mounted on the destination device (for example, the destination device of the first packet), for example, dual-homed devices. The multiple network devices may be located on multiple forwarding paths between the first network device and the destination device, where the multiple forwarding paths may include a main forwarding path and a standby forwarding path, or the multiple forwarding paths are load sharing paths each other. The first network device may determine, from a routing forwarding table of the first EVPN instance, a SID corresponding to the first VLAN identifier among multiple SIDs corresponding to VLAN identifiers matching the first VLAN identifier based on a primary/secondary protection policy or a load sharing policy, and send a packet to the destination device according to the SID corresponding to the first VLAN identifier. That is, the first network device sends the packet to the destination device through the multiple forwarding paths based on the load sharing policy or the active/standby protection policy. For example, if the forwarding paths are load sharing paths, the first network device may send a message to the destination device through the forwarding paths based on an Equal Cost Multi Path (ECMP) policy. If the multiple forwarding paths include a main forwarding path and a standby forwarding path, the first network device preferentially sends a message to the destination device through the main forwarding path, and when the main forwarding path fails, the first network device sends a message to the destination device through the standby forwarding path.
The following describes a scheme in which the first network device sends a packet to the destination device through the multiple forwarding paths.
Please refer to fig. 7, which illustrates a flowchart of another message transmission method according to an embodiment of the present application. The message transmission method can be applied to a system comprising a first network device, a second network device and a third network device, wherein the first network device can be a broadband access PE device, and the second network device and the third network device can be user access PE devices. For example, as shown in fig. 2, the first network device may be PE1, the second network device may be PE2, and the third network device may be PE 3. As shown in fig. 7, the method may include the following steps:
step 701, the first network device determines, according to a first VLAN identifier carried in the received first packet, a first SID corresponding to the first VLAN identifier.
Step 702, the first network device sends the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID.
Step 703, the second network device receives, through the second EVPN instance in the second network device, the first packet sent by the first EVPN instance in the first network device.
Step 704, the second network device forwards the first packet through the second EVPN instance in the second network device according to the first SID.
The implementation process of steps 701 to 704 may refer to the embodiment shown in fig. 3, and is not described herein again.
Step 705, the first network device determines a second SID corresponding to the first VLAN id according to the first VLAN id carried in the received second packet.
Wherein, according to the second SID, a third EVPN instance in a third network device can be located, and the third network device and the aforementioned second network device can be dual-homing devices of the same device, for example, the second network device is PE2 in fig. 2, the third network device is PE3 in fig. 2, and the PE2 and the PE3 are dual-homing devices of the CE 1. The third network device may be configured with a third EVPN instance, where the third EVPN instance belongs to the same EVPN network as the first EVPN instance in the first network device, and an RT of the first EVPN instance matches an RT of the third EVPN instance, for example, an IRT of the first EVPN instance matches an ERT of the third EVPN instance, or an ERT of the first EVPN instance matches an IRT of the third EVPN instance. The first EVPN instance and the third EVPN instance may be the same EVPN instance distributed among the first network device and the third network device.
Optionally, the type of the second SID is one of an end.dx2 type or an end.dt2u type. Dxp 2, the second SID may be configured to indicate a port of a third EVPN instance in a third network device to enable locating the third EVPN instance in the third network device according to the second SID. The second SID may be used to indicate a third EVPN instance in a third network device if the type of the second SID is end.dt2u type, to enable locating the third EVPN instance in the third network device according to the second SID. If the type of the second SID is an end.dx2 type, the port indicated by the second SID may be an AC port of the third EVPN instance, which may include a plurality of AC ports, at least one AC port of the third EVPN instance configured with a corresponding end.dx2SID, and the port indicated by the second SID may be one of the at least one AC port.
After receiving the second message, the first network device may parse the second message to determine a first VLAN identifier carried in the second message, and then determine a second SID corresponding to the first VLAN identifier according to the first VLAN identifier and the route forwarding table of the first EVPN instance. The second packet may be a packet sent by a broadband access device (e.g., BRAS1 in fig. 1 and 2) to a user equipment (e.g., VM1 in fig. 1 and 2), where the second packet may carry at least one layer of VLAN id, and the first VLAN id is a VLAN id located at an innermost layer of the second packet in the at least one layer of VLAN id. The first network device may determine, according to that the VLAN identifier in the routing forwarding table of the first EVPN instance matches the first VLAN identifier, that the second SID corresponding to the first VLAN identifier is one of the at least one SID corresponding to the VLAN identifier matching the first VLAN identifier in the routing forwarding table of the first EVPN instance.
In this embodiment, taking multiple SIDs corresponding to a VLAN identifier matching a first VLAN identifier in a routing forwarding table of the first EVPN instance as an example, the multiple SIDs may be located in multiple EVPN instances in multiple network devices, the multiple network devices may be located on multiple forwarding paths between the first network device and a destination device, the multiple forwarding paths may include a primary forwarding path and a standby forwarding path, or the multiple forwarding paths are load sharing paths for each other, and the first network device may determine, from the multiple SIDs, a second SID corresponding to the first VLAN identifier based on a primary/standby protection policy or a load sharing policy. Illustratively, the first network device determines, based on an ECMP policy, a second SID corresponding to a first VLAN identifier according to the first VLAN identifier carried in the second packet, by using a flow-by-flow load sharing or packet-by-packet load sharing mode. For the flow-by-flow load sharing mode, the second packet and the first packet may be packets of different service flows belonging to the same service, for example, the second packet and the first packet may be packets of two adjacent service flows belonging to the same service; for a packet-by-packet load sharing manner, the second packet and the first packet are packets belonging to the same service flow of the same service, for example, the second packet and the first packet are two adjacent packets in the service flow, which is not limited in this embodiment of the present application. For another example, the second network device may be located on a primary forwarding path between the first network device and the destination device, the third network device may be located on a secondary forwarding path between the first network device and the destination device, and the first network device determines the second SID according to the first VLAN identifier carried in the second packet, based on a primary/secondary protection policy. In the primary/standby protection mode, the first network device preferentially sends a message to the destination device through a primary forwarding path, and if the primary forwarding path fails, the first network device sends a message to the destination device through the standby forwarding path. The first network device may determine that the primary forwarding path fails, and determine the second SID according to the primary forwarding path failure and the first VLAN id carried in the second packet. Wherein the failure of the primary forwarding path may include a failure of at least one device in the primary forwarding path or a port failure of at least one device in the primary forwarding path.
Exemplarily, the multiple forwarding paths between the first network device and the destination device include a primary forwarding path and a backup forwarding path, the multiple SIDs corresponding to the VLAN identifier matching the first VLAN identifier in the routing forwarding table of the first EVPN instance include a primary SID and a backup SID, in step 701, the first network device determines the primary SID as a first SID corresponding to the first VLAN identifier, and then, in step 705, the first network device determines the backup SID as a second SID corresponding to the first VLAN identifier. Taking the routing forwarding table of the first EVPN instance as the example of the above table 2, the first VLAN id carried in the second packet may be VLAN100, in step 701, the first network device determines that the first SID corresponding to the first VLAN id is 1::1, and in step 705, the first network device determines that the second SID corresponding to the first VLAN id is 1:: 3.
Step 706, the first network device sends the second packet to a third EVPN instance in a third network device through the first EVPN instance in the first network device according to the second SID.
Optionally, the first network device encapsulates the second SID in a second message, and sends the second message encapsulated with the second SID to a third EVPN instance in a third network device through the first EVPN instance in the first network device. Optionally, the first network device may further encapsulate the IPv6 address of the first network device in the second message, and send, to a third EVPN instance in the third network device, a second message encapsulated with the second SID and the IPv6 address of the first network device through the first EVPN instance in the first network device. Wherein, the destination IP address of the second packet is the second SID, and the source IP address of the second packet is the IPv6 address of the first network device. The step 302 may be referred to in the process that the first network device sends the second packet to the third EVPN instance in the third network device according to the second SID, and details are not described here again.
Step 707, the third network device receives, through a third EVPN instance in the third network device, a second message sent by the first EVPN instance in the first network device.
The second packet carries at least one layer of VLAN identifier, and the VLAN identifier at the innermost layer of the second packet may be the first VLAN identifier carried by the second packet. And, the second message also carries a second SID.
Step 708, the third network device forwards the second packet through a third EVPN instance in the third network device according to the second SID.
The second message received by the third network device may carry the first VLAN identifier, and the third network device may delete (or pop up) the first VLAN identifier from the second message, and then forward the second message after deleting the first VLAN identifier through a third EVPN instance in the third network device according to the second SID.
Optionally, the second message received by the third network device further carries tunnel information, and the third network device may parse the received second message to determine a second SID carried by the second message from the second message, delete both the first VLAN identifier and the tunnel information carried in the second message, and forward the second message through a third EVPN instance in the third network device according to the second SID. Wherein the type of the second SID is one of an END.DX2 type or an END.DT2U type. The third network device may determine the type of the second SID, and determine, according to the type of the second SID, in which manner to forward the second packet (that is, the second packet after deleting the first VLAN identifier and the tunnel information). Optionally, if the type of the second SID is end.dx2 type, the third network device forwards the second packet according to an egress port corresponding to the second SID in a third EVPN instance in the third network device; and if the type of the second SID is END.DT2U type, the third network equipment forwards the second message according to the second SID and a routing forwarding table of a third EVPN instance in the third network equipment. For a specific implementation process, reference may be made to step 304 in the embodiment shown in fig. 3, which is not described herein again.
In a third EVPN instance of a third network device, an egress port of the second packet (including a port corresponding to the second SID and a port corresponding to the destination address carried in the second packet) may be an AC port of the third EVPN instance, and before executing the packet transmission method provided in the embodiment of the present application, some AC ports of the third EVPN instance may be configured with, for example: and for the message which enters the third EVPN instance from the AC port, inserting a VLAN identifier into the innermost layer of the message and then forwarding the message, and for the message which needs to be forwarded from the third EVPN instance through the AC port, deleting the VLAN identifier of the innermost layer of the message and then forwarding the message. In this way, when the third network device forwards the second packet through the third EVPN instance, the first VLAN id in the second packet may be deleted.
To facilitate understanding of the embodiment shown in fig. 7, a specific example of the message transmission method provided in the embodiment shown in fig. 7 is described below. For example, fig. 8 is a schematic diagram of message transmission provided in the embodiment of the present application, and takes as an example that the first network device is PE1, the second network device is PE2, the third network device is PE3, and the destination device is VM 1. The first SID may be located to EVPN instance 1 in PE2, the second SID may be located to EVPN instance 1 in PE3, forwarding path S1 and forwarding path S2 are two forwarding paths between PE1 and VM1, PE2 is located on forwarding path S1, and PE3 is located on forwarding path S2. Optionally, the forwarding path S1 and the forwarding path S2 are load sharing paths for each other, the PE1 may determine, by using a flow-by-flow load sharing or packet-by-packet load sharing manner, a first SID corresponding to a first VLAN identifier according to the first VLAN identifier carried by a received first packet, send, according to the first SID, a first packet to an EVPN instance 1 (that is, the aforementioned first EVPN instance) in the PE2 (that is, the aforementioned second EVPN instance) through an EVPN instance 1 in the PE1 (that is, the first packet is forwarded to the PE2 through the P1), and the PE2 forwards, according to the first SID, the first packet to the CE1 through the EVPN instance 1 in the PE2, and forwards the first packet to the VM1 by the CE 1; and the PE1 determines a second SID corresponding to the first VLAN identifier according to the first VLAN identifier carried by the received second packet, sends the second packet (the second packet is forwarded to the PE3 through the P2) to the EVPN instance 1 in the PE3 (that is, the aforementioned third EVPN instance) according to the second SID through the EVPN instance 1 in the PE1, and the PE3 forwards the second packet to the CE1 through the EVPN instance 1 in the PE3 according to the second SID, and forwards the second packet to the VM1 by the CE 1. Or, the forwarding path S1 and the forwarding path S2 may include a primary forwarding path and a standby forwarding path, for example, the forwarding path S1 is a primary forwarding path, the forwarding path S2 is a standby forwarding path, the PE1 may determine a first SID corresponding to a first VLAN identifier according to the first VLAN identifier carried by a first packet, send the first packet (the first packet is forwarded to the PE2 through the P1) to an EVPN instance 1 (that is, the aforementioned second EVPN instance) in the PE2 through an EVPN instance 1 (that is, the aforementioned first EVPN instance) in the PE1 according to the first SID, the PE2 forwards the first packet to the CE1 through the EVPN instance 1 in the PE2 according to the first SID, and forwards the first packet to the VM1 by the CE 1; after that, the PE1 determines that the forwarding path S1 fails, the PE1 determines a second SID corresponding to a first VLAN id according to the first VLAN id carried by a second packet, sends the second packet (the second packet is forwarded to the PE3 through the P2) to the EVPN instance 1 in the PE3 (that is, the aforementioned third EVPN instance) according to the second SID through the EVPN instance 1 in the PE1, and the PE3 forwards the second packet to the CE1 through the EVPN instance 1 in the PE3 according to the second SID, and the CE1 forwards the second packet to the VM 1.
To sum up, in the packet transmission method provided in this embodiment of the present application, after receiving a first packet carrying a first VLAN identifier, a first network device determines a first SID corresponding to the first VLAN identifier, sends the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID, and after receiving a second packet carrying the first VLAN identifier, determines a second SID corresponding to the first VLAN identifier, and sends the third packet to a third EVPN instance in a third network device through the first EVPN instance in the first network device according to the second SID. Therefore, the first network device forwards a first message to a second EVPN instance in the second network device through a tunnel between the first EVPN instance in the first network device and the second EVPN instance in the second network device according to the first SID, and forwards a second message to a second EVPN instance in the third network device through a tunnel between the first EVPN instance in the first network device and the third EVPN instance in the third network device according to the second SID, the first network device can forward the message sent to the user device without learning the MAC address of the user device, the pressure of the first network device in learning the MAC address and the performance requirement of the first network device are reduced, and the processing performance of a control plane of the first network device is prevented from being reduced due to frequent oscillation of an access side link.
In the foregoing embodiments, before the first network device determines the first SID corresponding to the first VLAN identifier according to the first VLAN identifier carried in the received first packet, a routing forwarding table of a first EVPN instance in the first network device may be generated first. The following describes a process by which a first network device generates a routing forwarding table for a first EVPN instance.
Optionally, the communication system further includes an RR, to which the second network device may send a route of a second EVPN instance in the second network device, and the RR may send a route of the second EVPN instance in the second network device to the first network device, and the first network device generates a forwarding table entry of a route forwarding table of the first EVPN instance according to the route of the second EVPN instance in the second network device. Similarly, the third network device may send the route of the third EVPN instance in the third network device to the RR, and the RR may send the route of the third EVPN instance in the third network device to the first network device, and the first network device generates a forwarding entry of the route forwarding table of the first EVPN instance according to the route of the third EVPN instance in the third network device. The route of the second EVPN instance and the route of the third EVPN instance may both be Ethernet AD routes, for example, Ethernet auto discovery Per EVI routes.
The route of the second EVPN instance in the second network device may include the first VLAN identification and the first SID. The first network device may generate a forwarding entry in a routing forwarding table of the first EVPN instance in the first network device according to the first VLAN id and the first SID in the route of the second EVPN instance. Optionally, the routing of the second EVPN instance may further include an ERT of the second EVPN instance, and the first network device may determine that the ERT of the second EVPN instance matches the IRT of the first EVPN instance, introduce, by the first network device, the routing of the second EVPN instance into the first EVPN instance if the ERT of the second EVPN instance matches the IRT of the first EVPN instance, and generate a forwarding entry in the routing forwarding table of the first EVPN instance according to the first VLAN id and the first SID. Optionally, the routing of the second EVPN instance further includes a Route Distinguisher (RD) for distinguishing the routing of the second EVPN instance from the routing of other EVPN instances and an Ethernet Segment Identifier (ESI) identifying the connection between the AC port of the second EVPN instance in the second network device (e.g., PE2 in fig. 2) and the CE device (e.g., CE1 in fig. 2), which may be used for horizontal splitting, etc. Illustratively, the first EVPN instance is EVPN instance 1, the first VLAN identification is VLAN100, the first SID is 1::1, and the forwarding entry in the routing forwarding table of EVPN instance 1 generated by the first network device may be as shown in the first row of table 2.
The route of the third EVPN instance in the third network device may include the first VLAN identification and the second SID. The first network device may generate a forwarding entry in a routing forwarding table of the first EVPN instance in the first network device according to the first VLAN id and the second SID in the route of the third EVPN instance. Optionally, the routing of the third EVPN instance may further include an ERT of the third EVPN instance, and the first network device may determine that the ERT of the third EVPN instance matches the IRT of the first EVPN instance in the first network device, introduce, by the first network device, the routing of the third EVPN instance into the first EVPN instance if the ERT of the third EVPN instance matches the IRT of the first EVPN instance, and generate a forwarding entry in a routing forwarding table of the first EVPN instance according to the first VLAN id and the second SID. Optionally, the routing of the third EVPN instance further includes RD for distinguishing the routing of the third EVPN instance from the routing of other EVPN instances, and ESI for identifying a connection between an AC port of the third EVPN instance in the third network device (e.g., PE3 in fig. 2) and a CE device (e.g., CE1 in fig. 2), which may be used for horizontal splitting, etc. Illustratively, the first EVPN instance is EVPN instance 1, the first VLAN id is VLAN100, the second SID is 1::3, and the forwarding entry in the routing forwarding table of EVPN instance 1 generated by the first network device may be as shown in the second row of table 3.
In this embodiment of the present application, the user access PE device (for example, the foregoing second network device and third network device) need not send a MAC route (for example, type2 type route) to the RR, and only needs to send an Ethernet AD route to the RR, so that the RR also need not reflect the MAC route to the broadband access PE device (for example, the foregoing first network device), and only needs to send the Ethernet AD route to the RR.
As can be seen from the foregoing embodiments, in the embodiments of the present application, a broadband access device (e.g., a BRAS) enables a broadband access PE device (e.g., the foregoing first network device) to determine a corresponding SID according to a VLAN identifier carried in a message sent to a user device (e.g., a VM) to perform IPv6 forwarding by carrying the VLAN identifier (e.g., the foregoing first VLAN identifier) for determining the corresponding SID, and the user access PE device (e.g., the foregoing second network device and third network device) can forward the message according to the SID. Therefore, the broadband access PE equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment, and the pressure of the broadband access PE equipment for learning the MAC address is reduced.
In this embodiment of the present application, a message sent by a broadband access device to a user device may carry at least one layer of VLAN identifier, where a VLAN identifier (for example, the aforementioned first VLAN identifier) used to determine a corresponding SID may be a VLAN identifier located at an innermost layer of the message, and other VLAN identifiers in the message except the VLAN identifier used to determine the corresponding SID are sent to the broadband access device when the user device identifies that the user device is online. In order to facilitate distinguishing the VLAN identifiers with different functions, before the foregoing message transmission method is executed, the locations of the VLAN identifiers used for determining corresponding SIDs in the message may be configured in the broadband access PE device, the user access PE device, and the broadband access device, respectively, so that these devices can perform corresponding processing in the above-mentioned message transmission process. Optionally, the VLAN identifier used for determining the corresponding SID may also be located at other positions of the packet, as long as the broadband access PE device, the user access PE device, and the broadband access device can know the position, which is not limited in this embodiment of the present application.
In this embodiment of the present application, the VLAN identifier used for determining the corresponding SID may be a VLAN identifier set for a CE device connected to a user access PE device, so that, for a message entering an EVPN instance from an AC port connected to the CE device in the EVPN instance in the user access PE device, the user access PE device may insert a VLAN identifier corresponding to the CE device into the message (for example, the innermost layer of the message) and forward the message, and for a message that needs to be sent from an AC port connected to the CE device in the EVPN instance in the user access PE device, the user access PE device deletes the VLAN identifier corresponding to the CE device in the message (for example, the innermost layer of the message) and forwards the message. For example, as shown in fig. 2, VLAN identifiers may be set for CE1 and CE2 (for example, VLAN100 is set for CE1, and VLAN200 is set for CE 2), so that, for a packet entering the EVPN instance 1 from the AC port connected to the CE1 in the EVPN instance 1 in PE2, the PE2 may insert VLAN100 in the packet and forward the packet, and for a packet that needs to be sent from the AC port connected to the CE1 in the EVPN instance 1 in PE2, the PE2 deletes VLAN100 in the packet and forwards the packet; for a message entering the EVPN instance 1 from the AC port connected to the CE2 in the EVPN instance 1 in the PE2, the PE2 may insert the VLAN200 in the message and forward the message, and for a message that needs to be sent from the AC port connected to the CE2 in the EVPN instance 1 in the PE2, the PE2 deletes the VLAN200 in the message and forwards the message. Similarly, the PE3 is not described herein again.
In this embodiment of the present application, a VLAN identifier corresponding to each CE device (that is, a VLAN identifier set for a CE device) may indicate a VLAN in which the CE device is located; alternatively, the VLAN id corresponding to each CE device is not used to indicate the VLAN in which the CE device is located, and is only used for the network device (e.g., the broadband access PE device) to determine the corresponding SID for packet forwarding. Therefore, it can be seen that the packet sent from the broadband access device to the user device carries any information that enables the broadband access PE device to determine the corresponding SID, and does not necessarily need to carry a VLAN identifier (for example, the aforementioned first VLAN identifier) to determine the corresponding SID. Since the broadband access device (e.g. BRAS) can process the message carrying the VLAN identifier, for example, the user equipment is identified to be on-line according to the message carrying the two-layer VLAN identifier (e.g. UVLAN and SVLAN) from the user equipment. Therefore, the embodiment of the application realizes the IPv6 forwarding of the network equipment on the basis that the VLAN identification is carried in the message sent by the broadband access equipment to the user equipment, so that the technical scheme of the application can be realized without changing the hardware and/or software processing capacity of the broadband access equipment.
The foregoing embodiments shown in fig. 3 and fig. 4 describe the packet transmission method provided in the embodiments of the present application by taking the transmission of a downlink packet (for example, a packet sent by a broadband access device to a user device) as an example, and the embodiments of the present application also relate to a technical solution for transmitting an uplink packet (for example, a packet sent by a user device to a broadband access device), and the following describes the present application by taking the transmission of an uplink packet from the VM1 to the BRAS1 shown in fig. 2 and the transmission of a downlink packet from the BRAS1 to the VM1 as an example, in the following embodiments, a VLAN identifier used for determining that a corresponding SID is a VLAN identifier located at the innermost layer of a packet is taken as an example for explanation.
Fig. 9 is a flowchart of another message transmission method provided in an embodiment of the present application, and fig. 10 is a schematic diagram of the message transmission method provided in fig. 9. Fig. 9 and 10 illustrate that the message transmission method is applied to the EVPN network shown in fig. 2, and the VM1 transmits an uplink message to the BRAS 1. In fig. 10, for the sake of clarity of the drawing, only the devices related to this message transmission in the EVPN network are shown. As shown in fig. 9 and 10, the method includes:
step 901, VM1 sends message 1 to CE1, where the message 1 carries the two-layer VLAN id, the source address and the destination address.
As shown in fig. 10, the two-layer VLAN id carried in the message 1 is UVLAN and SVLAN, the source address of the message 1 is 1-1-1, the destination address is 0-5-1, and both the source address and the destination address may be MAC addresses.
Step 902, CE1 forwards message 1 to PE 2.
For example, the CE1 may forward the message 1 to the PE2 based on a load balancing policy.
Step 903, PE2 inserts VLAN id in the innermost layer of message 1, and encapsulates the tunnel information.
A message 1 forwarded by the CE1 may enter the EVPN instance 1 through an AC port of the EVPN instance 1 in the PE2, and the PE2 may insert a VLAN identifier corresponding to the CE1 in the innermost layer of the message 1 according to the configuration of the AC port, and encapsulate tunnel information of a tunnel between the PE2 and the PE1 in the message 1, where the obtained message carries a three-layer VLAN identifier, a source address, a destination address, and encapsulates the tunnel information.
As shown in fig. 10, PE2 inserts VLAN100 at the innermost layer of message 1 and encapsulates the tunnel information in message 1. Here, VLAN100 may be a VLAN id corresponding to CE1, and VLAN100 is a VLAN id configured for CE 1. The tunnel information includes 1: 1 and 2: 1.
Step 904, PE2 forwards packet 1 carrying three-tier VLAN id, source address, destination address and encapsulated tunnel information to EVPN instance 1 in PE1 through EVPN instance 1 in PE 2.
As shown in fig. 10, PE2 forwards packet 1 carrying three-tier VLAN id, source address, destination address, and encapsulated tunnel information to EVPN instance 1 in PE1 through EVPN instance 1 in PE 2. The three-layer VLAN identifications are respectively VLAN100, UVLAN and SVLAN, the source address of the message 1 is 1-1-1, the destination address is 0-5-1, and the tunnel information comprises 1: 1 and 2: 1. This message 1 may be forwarded via P1 to PE 1.
Step 905, PE1 strips the tunnel information in message 1.
As shown in FIG. 10, PE1 strips out 1::1 and 2::1 in message 1.
Step 906, PE1 forwards the packet 1 stripped of the tunnel information to BRAS1 through EVPN instance 1 in PE1 according to the destination address carried in the packet 1.
The PE1 may determine the egress port of the packet 1 by searching the route forwarding table of the EVPN instance 1 of the PE1 according to the destination address 0-5-1 carried in the packet 1, and forward the packet 1 with the tunnel information stripped to the BRAS1 through the egress port of the packet 1.
Step 907, BRAS1 identifies VM1 to get online according to the two-layer VLAN id of the outermost layer of the message 1, and records the VLAN id of the innermost layer of the message 1 for VM 1.
Illustratively, the two-layer VLAN identifier of the outermost layer of the message 1 received by the BRAS1 is an SVLAN and a UVLAN, the BRAS1 determines the service corresponding to the VM1 according to the SVLAN, and determines the VLAN where the VM1 is located according to the UVLAN, so as to identify the VM1 for online connection. The BRAS1 may store the source address (1-1-1) carried in the packet 1 and the VLAN identifier (VLAN100) at the innermost layer in an associated manner, so as to record the VLAN identifier at the innermost layer of the packet 1 for the VM1, for example, the BRAS1 records the correspondence between the VLAN100 and the 1-1-1 carried in the packet 1.
Fig. 11 is a flowchart of another message transmission method provided in an embodiment of the present application, and fig. 12 is a schematic diagram of the message transmission method provided in fig. 11. Fig. 11 and 12 illustrate that the message transmission method is applied to the EVPN network shown in fig. 2, and the BRAS1 transmits a downlink message to the VM1 as an example. In fig. 12, only devices related to this message transmission in the EVPN network are shown for the sake of clarity of the drawing. As shown in fig. 11 and 12, the method includes:
step 1101, BRAS1 sends message 2 to PE1, where the message 1 carries three-layer VLAN id, source address and destination address.
As shown in fig. 12, the three-layer VLAN id carried in the message 2 is VLAN100, UVLAN and SVLAN, where VLAN100 is the VLAN id of the innermost layer of the message 2, and the source address of the message 2 is 0-5-1, and the destination address is 1-1-1.
Step 1102, PE1 determines the SID corresponding to the VLAN id according to the innermost VLAN id of packet 2, and encapsulates the tunnel information.
Illustratively, the PE1 determines, according to a forwarding model configured in the EVPN instance 1 in the PE1, the SID corresponding to the VLAN100 according to the VLAN100 at the innermost side of the packet 2 and the VLAN forwarding table of the EVPN instance 1 in the PE1, and encapsulates tunnel information of a tunnel between the PE1 and the PE2 in the packet 2, where the obtained packet carries a three-layer VLAN identifier, a source address, a destination address, and encapsulates the tunnel information.
Illustratively, PE1 determines that the SID corresponding to VLAN100 is 1::1 according to the VLAN forwarding table of EVPN instance 1 in PE 1. As shown in FIG. 12, the tunnel information encapsulated by PE1 in message 2 includes 2::1 and 1:: 1.
Step 1103, PE1 forwards packet 2 encapsulated with tunnel information to EVPN instance 1 in PE2 through EVPN instance 1 in PE 1.
As shown in fig. 12, PE1 forwards message 2 encapsulated with tunnel information including 2::1 and 1::1 to EVPN instance 1 in PE2 through EVPN instance 1 in PE 1. This message 2 may be forwarded via P1 to PE 2.
Step 1104, PE2 forwards the packet 2 with tunnel information and the innermost VLAN identifier stripped to CE1 through EVPN instance 1 in PE2 according to the destination SID of packet 2.
As shown in FIG. 12, 1::1 (i.e. the destination SID) in the message 2 can be END.DX2SID or END.DT2U SID. If 1::1 in the message 2 is end.dx2SID, the PE2 strips tunnel information (including 2::1 and 1::1) in the message 2, determines an egress port of the message 2 in the EVPN instance 1 of the PE2 according to the 1::1, strips a VLAN id of an innermost layer of the message 2 according to configuration information of the egress port of the message 2, and forwards the message 2 with the tunnel information and the VLAN id of the innermost layer stripped through the egress port of the message 2 to the CE 1. If 1::1 (namely, the destination SID) in the message 2 is end.dt2u SID, the PE2 strips off the tunnel information (including 2::1 and 1::1) in the message 2, determines the exit port of the message 2 by searching the routing forwarding table of the EVPN instance 1 of the PE2 according to the destination address 1-1-1 carried in the message 2, strips off the VLAN id of the innermost layer of the message 2 according to the configuration information of the exit port of the message 2, and forwards the message 2 with the tunnel information and the VLAN id of the innermost layer stripped off to the CE1 through the exit port of the message 2.
Step 1105, the CE1 forwards the packet 2 with the tunnel information and the VLAN id of the innermost layer stripped to the VM1 according to the destination address carried in the packet 2.
As shown in fig. 12, the CE1 determines an egress port of the message 2 by searching the routing forwarding table of the CE1 according to the destination address 1-1-1 carried in the message 2, and forwards the message 2 with tunnel information and the identifier of the innermost VLAN stripped through the egress port of the message 2 to the VM 1.
It should be noted that the technical solution provided by the present application can be applicable to network scenarios such as SRv6-BT or SRv6-Policy, and the above embodiments and the accompanying drawings describe the technical solution of the present application by taking SRv6-BT scenario as an example, but this does not constitute or should be understood as a limitation to the technical solution of the present application, when the technical solution provided by the present application is applied to other network scenarios such as SRv6-Policy, a format of a message and a position of a destination SID in the message may refer to a format of the message and a position of the destination SID in a corresponding network scenario (e.g., SRv6-Policy network scenario), and no further description is given here in the embodiments of the present application.
Embodiments of the apparatus of the present application are described below, which may be used to perform the methods of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 13, a schematic diagram of a logical structure of a first network device 1300 according to an embodiment of the present application is shown, where the first network device 1300 is located in a communication system, and the communication system further includes a second network device. Referring to fig. 13, the first network device 1300 may include, but is not limited to:
the determining module 1310 is configured to determine, according to a first VLAN id carried in the received first packet, a first SID corresponding to the first VLAN id. The functional implementation of the determining module 1310 may refer to the related description of step 301 and step 701.
A sending module 1320, configured to send the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device 1300 according to the first SID. The function of the sending module 1320 may refer to the above description of step 302 and step 702.
Optionally, the determining module 1310 is specifically configured to determine the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and the routing forwarding table of the first EVPN instance.
Optionally, the determining module 1310 is specifically configured to determine, according to that the VLAN identifier in the routing forwarding table of the first EVPN instance matches the first VLAN identifier, that the first SID corresponding to the first VLAN identifier is one of at least one SID corresponding to the VLAN identifier matching the first VLAN identifier in the routing forwarding table of the first EVPN instance, where the routing forwarding table of the first EVPN instance is used to record a correspondence relationship between the VLAN identifier and the SID, and each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
Optionally, the communication system further comprises: RR, the first network device 1300 further comprises:
a receiving module 1330, configured to receive, before the determining module 1310 determines, according to the first VLAN identifier carried in the received first packet, the first SID corresponding to the first VLAN identifier, a route of a second EVPN instance in the second network device sent by the RR, where the route of the second EVPN instance includes the first VLAN identifier and the first SID;
a generating module 1340, configured to generate a forwarding entry in the route forwarding table of the first EVPN instance according to the first VLAN id and the first SID in the route of the second EVPN instance.
Optionally, the sending module 1320 is specifically configured to: encapsulating the first SID in a first message; and sending the first message encapsulated with the first SID to a second EVPN instance in a second network device through the first EVPN instance in the first network device 1300.
Optionally, the communication system further comprises a third network device, the third network device and the second network device being dual-homed devices of the same device,
the determining module 1310 is further configured to determine, according to the first VLAN id carried in the received second packet, a second SID corresponding to the first VLAN id. The functional implementation of the determining module 1310 may refer to the related description of step 705 above.
The sending module 1320 is further configured to send the second packet to a third EVPN instance in the third network device through the first EVPN instance in the first network device according to the second SID. The functional implementation of the sending module 1320 may also refer to the related description of step 706.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is an innermost VLAN identifier of the at least one layer of VLAN identifier.
To sum up, in the technical solution provided in this embodiment, after receiving a first packet carrying a first VLAN identifier, a first network device determines a first SID corresponding to the first VLAN identifier, sends the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID, and after receiving the first packet, the second network device forwards the first packet to a user equipment through the second EVPN instance in the second network device according to the first SID. Therefore, the first network device forwards a message to the second network device through a tunnel between the first EVPN instance in the first network device and the second EVPN instance in the second network device according to the first SID, the first network device can forward the message sent to the user device without learning the MAC address of the user device, the pressure of the first network device in learning the MAC address and the performance requirement of the first network device are reduced, and the processing performance of the control plane of the first network device is prevented from being reduced due to frequent oscillation of an access side link.
Referring to fig. 14, a schematic diagram of a logical structure of a second network device 1400 provided in an embodiment of the present application is shown, where the second network device 1400 is located in a communication system, and the communication system further includes a first network device. Referring to fig. 14, the second network device 1400 may include, but is not limited to:
a receiving module 1410, configured to receive, by using a second EVPN instance in the second network device 1400, a first packet sent by a first EVPN instance in the first network device, where the first packet is sent by the first network device according to a first SID corresponding to a first VLAN identifier carried in the first packet. The function of the receiving module 1410 may be implemented as described above with reference to step 303 and step 703.
A forwarding module 1420, configured to forward the first packet through the second EVPN instance according to the first SID. The functional implementation of the forwarding module 1420 may refer to the related description of step 304 and step 704.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type.
Optionally, the forwarding module 1420 is specifically configured to: if the type of the first SID is END.DX2 type, forwarding the first message according to a port corresponding to the first SID in the second EVPN instance; and if the type of the first SID is END.DT2U type, forwarding the first message according to the first SID and a routing forwarding table of the second EVPN instance, wherein the routing forwarding table of the second EVPN instance records the corresponding relation between an address and a port identifier, and the port identifier indicates a port corresponding to the address.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is an innermost VLAN identifier of the at least one layer of VLAN identifier.
Optionally, the forwarding module 1420 is specifically configured to: deleting the first VLAN identification from the first message; and forwarding the first message after deleting the first VLAN identification through the second EVPN instance according to the first SID.
Optionally, the communication system further comprises: RR, the second network device 1400 further includes: a sending module 1430, configured to send, to the RR, a route of a second EVPN instance in the second network device 1400 before the receiving module 1410 receives, through the second EVPN instance in the second network device 1400, the first packet sent by the first EVPN instance in the first network device, where the route of the second EVPN instance includes the first VLAN id and the first SID.
To sum up, in the technical solution provided in this embodiment, after receiving a first packet carrying a first VLAN identifier, a first network device determines a first SID corresponding to the first VLAN identifier, sends the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID, and after receiving the first packet, the second network device forwards the first packet to a user equipment through the second EVPN instance in the second network device according to the first SID. Therefore, the first network device forwards a message to the second network device through a tunnel between the first EVPN instance in the first network device and the second EVPN instance in the second network device according to the first SID, the first network device can forward the message sent to the user device without learning the MAC address of the user device, the pressure of the first network device in learning the MAC address and the performance requirement of the first network device are reduced, and the processing performance of the control plane of the first network device is prevented from being reduced due to frequent oscillation of an access side link.
It should be understood that the network device provided in the embodiments of the present application may also be implemented by an application-specific integrated circuit (ASIC), or a Programmable Logic Device (PLD), which may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. The message transmission method provided by the foregoing method embodiment may also be implemented by software, and when the message transmission method provided by the foregoing method embodiment is implemented by software, each module in the network device may also be a software module.
Referring to fig. 15, a schematic diagram of a hardware structure of a network device 1500 provided in an embodiment of the present application is shown, where the network device 1500 may be a first network device or a second network device in the foregoing embodiments, and the network device 1500 may be a PE device. As shown in fig. 15, the network device 1500 includes: a main control board 1510, an interface board 1530, and an interface board 1540. A plurality of interface boards may include a switching network board (not shown) for performing data exchange between the interface boards (the interface boards are also called line cards or service boards).
The main control board 1510 is used to complete functions such as system management, device maintenance, and protocol processing. The interface board 1530 and the interface board 1540 are used to provide various service interfaces (for example, POS interface, GE interface, ATM interface, etc.), and implement message forwarding. There are mainly 3 types of functional units on the main control board 1510: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1510, the interface board 1530 and the interface board 1540 are connected to the system backplane through a system bus to achieve intercommunication. The interface board 1530 includes one or more processors 1531 thereon. The processor 1531 is configured to control and manage the interface board 1530 and communicate with a Central Processing Unit (CPU) 1512 on the main control board 1510. The memory 1532 on the interface board 1530 is configured to store a routing forwarding table, for example, a routing forwarding table (including a MAC forwarding table and/or a VLAN forwarding table) of an EVPN instance, and the processor 1531 performs packet forwarding by searching the routing forwarding table of the EVPN instance stored in the memory 1532 to determine an SID corresponding to a VLAN identifier carried in a packet.
The interface board 1530 includes one or more network interfaces 1533 for receiving and forwarding the packet, and the processor 1531 determines the SID corresponding to the VLAN identifier carried in the packet according to the VLAN identifier carried in the packet received by the network interface 1533. The specific implementation process is not described herein. The detailed functions of the processor 1531 are not described in detail here.
It can be understood that, as shown in fig. 15, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, and operations on the interface board 1540 are basically similar to those of the interface board 1530 in this mechanism, and are not described again for brevity. Further, it is understood that the processor 1531 in the interface board 1530 and/or the processor 1541 in the interface board 1540 in fig. 15 may be a dedicated hardware or chip, such as a network processor or an asic, to implement the above functions, which is a way of processing the forwarding plane by using a dedicated hardware or chip. In another embodiment, the processor 1531 in the interface board 1530 and/or the processor 1541 in the interface board 1540 may also adopt a general-purpose processor, such as a general-purpose CPU, to implement the above-described functions.
In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control boards may include an active main control board and a standby main control board. The interface board may have one or more boards, and the stronger the data processing capability of the network device, the more interface boards are provided. Under the condition of a plurality of interface boards, the plurality of interface boards can communicate through one or a plurality of exchange network boards, and when a plurality of interface boards exist, the redundant backup of load sharing can be realized together. Under the centralized forwarding architecture, the network device does not need a switching network board, and an interface board bears the processing function of the service data of the whole system. Under the distributed forwarding architecture, the network device comprises a plurality of interface boards, and data exchange among the plurality of interface boards can be realized through the exchange network board, so that high-capacity data exchange and processing capacity are 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. Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.
In particular embodiments, Memory 1532 may be a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1532 may be stand alone and coupled to the processor 1531 via a communication bus. The memory 1532 may also be integrated with the processor 1531.
The memory 1532 is used for storing program codes and is controlled by the processor 1531 to execute part or all of the steps of the message transmission method provided by the above embodiments. The processor 1531 is operative to execute program code stored in the memory 1532. One or more software modules may be included in the program code. The one or more software modules may be the functional modules provided in the embodiments of fig. 13 or fig. 14 described above.
In an embodiment, the network interface 1533 may be any device using a transceiver or the like for communicating with other devices or communication networks, such as ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
Referring to fig. 16, which shows a schematic diagram of a hardware structure of another network device 1600 provided in this embodiment of the present application, where the network device 1600 may be a first network device or a second network device in any of the above embodiments, and the network device 1600 may be a PE device. Referring to fig. 16, the network device 1600 includes a processor 1602, a memory 1604, a communication interface 1606, and a bus 1608, the processor 1602, the memory 1604, and the communication interface 1606 being communicatively connected to each other by the bus 1608. The connections between processor 1602, memory 1604 and communication interface 1606 shown in fig. 16 are exemplary only, and in an implementation, processor 1602, memory 1604 and communication interface 1606 may be communicatively connected to each other by connections other than bus 1608.
Memory 1604 may be used to store, among other things, a computer program 16042, which computer program 16042 may comprise instructions and data. In the embodiment of the present application, the memory 1604 may be various types of storage media, such as RAM, ROM, non-volatile RAM (NVRAM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), flash memory, optical memory, and registers. Also, the storage 1604 may comprise a hard disk and/or a memory.
Where the processor 1602 may be a general-purpose processor, the general-purpose processor may be a processor that performs certain steps and/or operations by reading and executing computer programs (e.g., computer program 16042) stored in a memory (e.g., memory 1604), which may use data stored in the memory (e.g., memory 1604) in performing the above steps and/or operations. The stored computer programs may be executed, for example, to implement the associated functions of the aforementioned determining module 1310 and generating module 1340. The general purpose processor may be, for example but not limited to, a CPU. Further, the processor 1602 may also be a special-purpose processor, which may be a processor specially designed to perform certain steps and/or operations, such as, but not limited to, a Digital Signal Processor (DSP), an ASIC, an FPGA, and so forth. Further, processor 1602 may also be a combination of multiple processors, such as a multi-core processor. The processor 1602 may include at least one circuit to perform all or some of the steps of the message transmission methods provided by the embodiments described above.
Communication interface 1606 may include, among other things, input/output (I/O) interfaces, physical interfaces, logical interfaces, and so on for enabling interconnection of devices within network device 1600, as well as interfaces for enabling interconnection of network device 1600 with other devices (e.g., network devices or user devices). The physical interface may be a Gigabit Ethernet (GE) interface that may be used to implement the interconnection of network device 1600 with other devices (e.g., network devices or user devices), and the logical interface may be an interface within network device 1600 that may be used to implement the interconnection of devices within network device 1600. It is to be appreciated that communication interface 1606 may be used to enable network device 1600 to communicate with other network devices and/or user devices, for example, communication interface 1606 is used to send and receive messages between network device 1600 and other network devices, and that communication interface 1606 may implement the related functions of sending module 1320, receiving module 1330, receiving module 1410, forwarding module 1420, and sending module 1430 described above. Further, the communication interface 1606 may also include a transceiver, which may also implement the related functions of the aforementioned transmitting module 1320, receiving module 1330, receiving module 1410, forwarding module 1420, and transmitting module 1430.
Bus 1608 may be any type of communication bus, such as a system bus, used to interconnect processor 1602, memory 1604, and communication interface 1606.
The above devices may be respectively disposed on separate chips, or at least a part or all of the devices may be disposed on the same chip. Whether each device is separately disposed on a different chip or integrated on one or more chips will often depend on the needs of the product design. The embodiment of the present application does not limit the specific implementation form of the above device.
The network device 1600 shown in fig. 16 is merely exemplary, and in implementations, the network device 1600 may also include other components, which are not listed here. The network device 1600 shown in fig. 16 may transmit a message by performing all or part of the steps of the message transmission method provided by the above embodiments.
Referring to fig. 17, a schematic structural diagram of a communication system 1700 according to an embodiment of the present application is shown. The communication system 1700 includes a first network device 1710, which can be a broadband access PE device, and a second network device 1720, which can be a user access PE device.
The first network device 1710 is configured to determine, according to a first VLAN identifier carried in a received first packet, a first SID corresponding to the first VLAN identifier, and send, according to the first SID, the first packet to a second EVPN instance in the second network device 1720 via a first EVPN instance in the first network device 1710;
the second network device 1720 is configured to forward the first packet through the second EVPN instance according to the first SID.
Optionally, the first network device 1710 is specifically configured to determine the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and the routing forwarding table of the first EVPN instance.
Optionally, the first network device 1710 is specifically configured to: and determining that the first SID corresponding to the first VLAN identifier is one of at least one SID corresponding to the VLAN identifier matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance according to the matching of the VLAN identifier in the routing forwarding table of the first EVPN instance and the first VLAN identifier, wherein the routing forwarding table of the first EVPN instance is used for recording the corresponding relation between the VLAN identifier and the SID, and each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
Optionally, with continued reference to fig. 17, the communication system 1700 further includes: RR 1740;
the second network device 1720 is further configured to send a route of a second EVPN instance in the second network device 1720, the route of the second EVPN instance including the first VLAN identification and the first SID to the RR 1740;
the RR 1740 is configured to send a route of the second EVPN instance to the first network device 1710;
the first network device 1710 is further configured to generate a forwarding entry in a routing forwarding table of the first EVPN instance according to the first VLAN id and the first SID in the route of the second EVPN instance.
Optionally, the first network device 1710 is specifically configured to: encapsulating the first SID in a first message, and sending the first message encapsulated with the first SID to a second EVPN instance in the second network device 1720 through the first EVPN instance in the first network device 1710.
Optionally, with continued reference to fig. 17, the communication system 1700 further includes: a third network device 1730, the third network device 1730 can be a user access PE device, the third network device 1730 and the second network device 1720 are dual-homed devices to the same device;
the first network device 1710 is further configured to determine, according to a first VLAN identifier carried in a received second packet, a second SID corresponding to the first VLAN identifier, and send, according to the second SID, the second packet to a third EVPN instance in the third network device 1730 through a first EVPN instance in the first network device 1710;
the third network device 1730 is configured to forward the second packet through the third EVPN instance according to the second SID.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type, and the type of the second SID is one of an end.dx2 type or an end.dt2u type.
Optionally, the second network device 1720 is specifically configured to: if the type of the first SID is END.DX2 type, forwarding the first message according to a port corresponding to the first SID in the second EVPN instance; and if the type of the first SID is END.DT2U type, forwarding the first message according to the first SID and a routing forwarding table of the second EVPN instance, wherein the routing forwarding table of the second EVPN instance records the corresponding relation between an address and a port identifier, and the port identifier indicates a port corresponding to the address.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is an innermost VLAN identifier of the at least one layer of VLAN identifier in the first packet.
Optionally, the second network device 1720 is specifically configured to: and deleting the first VLAN identification from the first message, and forwarding the first message after deleting the first VLAN identification through the second EVPN instance according to the first SID.
To sum up, in the technical solution provided in this embodiment, after receiving a first packet carrying a first VLAN identifier, a first network device determines a first SID corresponding to the first VLAN identifier, sends the first packet to a second EVPN instance in a second network device through a first EVPN instance in the first network device according to the first SID, and after receiving the first packet, the second network device forwards the first packet to a user equipment through a second EVPN instance in the second network device according to the first SID. Therefore, the first network device forwards the message to the second network device through the tunnel between the first EVPN instance in the first network device and the second EVPN instance in the second network device according to the first SID, the first network device can forward the message sent to the user device without learning the MAC address of the user device, the pressure of the first network device in learning the MAC address and the performance requirement of the first network device are reduced, and the processing performance of the control plane of the first network device is prevented from being reduced due to frequent oscillation of an access side link.
An embodiment of the present application provides a communication system, which includes a first network device and a second network device, where the first network device is a first network device 1300 shown in fig. 13, and the second network device is a second network device 1400 shown in fig. 14; alternatively, at least one of the first network device and the second network device is the network device 1500 as shown in fig. 15; alternatively, at least one of the first network device and the second network device is the network device 1600 as shown in fig. 16. Optionally, the first network device and the second network device are both PE devices.
The embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, all or part of the steps of the message transmission method provided by the above method embodiment are implemented.
Embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to perform all or part of the steps of the message transmission method provided by the above method embodiments.
Embodiments of the present application provide a chip, where the chip includes a programmable logic circuit and/or a program instruction, and when the chip is operated, the chip is configured to implement all or part of the steps of the message transmission method provided in the foregoing method embodiments.
In the above embodiments, all or part of the implementation may be 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 comprising one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general 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 can comprise one or more data storage devices, such as a server, a data center, etc., integrated with the available medium. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., solid state disk), among others.
In this application, "/" means "or" unless otherwise stated, for example, A/B may mean A or B. The term "and/or" is merely an associative relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, to facilitate clarity, the terms "first," "second," "third," and the like may be used in this application to distinguish one element, a component, or similar items that have substantially the same function or function, and those skilled in the art will understand that the terms "first," "second," "third," and the like do not necessarily limit the quantity or order of execution and do not interpret the relative importance of the terms.
Different types of embodiments such as the method embodiment and the apparatus embodiment provided by the embodiment of the present application can be mutually referred to, and the embodiment of the present application does not limit this. The sequence of operations in the method embodiments provided in the present application can be appropriately adjusted, and the operations can also be increased or decreased according to the situation, and any method that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application shall be covered by the protection scope of the present application, and therefore, the details are not repeated.
In the corresponding embodiments provided in the present application, it should be understood that the disclosed apparatus and the like may be implemented by other configurations. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts described as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network devices (for example, terminal devices). Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above description is only an exemplary embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (28)

1. A message transmission method is applied to a system comprising a first network device and a second network device, and the method comprises the following steps:
the first network equipment determines a first segment identification SID corresponding to a first Virtual Local Area Network (VLAN) identification carried in a received first message according to the first VLAN identification;
and the first network equipment sends the first message to a second EVPN instance in the second network equipment through a first Ethernet virtual private network EVPN instance in the first network equipment according to the first SID.
2. The method of claim 1,
the first network device determines, according to a first virtual local area network VLAN identifier carried in a received first packet, a first segment identifier SID corresponding to the first VLAN identifier, including:
and the first network equipment determines the first SID corresponding to the first VLAN identification according to the first VLAN identification and a routing forwarding table of the first EVPN instance.
3. The method of claim 2,
the determining, by the first network device, the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and a routing forwarding table of the first EVPN instance includes:
the first network device determines that the first SID corresponding to the first VLAN identification is one of at least one SID corresponding to the VLAN identification matched with the first VLAN identification in the route forwarding table of the first EVPN instance according to the matching of the VLAN identification in the route forwarding table of the first EVPN instance and the first VLAN identification, wherein the route forwarding table of the first EVPN instance is used for recording the corresponding relation between the VLAN identification and the SID, and each VLAN identification in the route forwarding table of the first EVPN instance corresponds to one or more SIDs.
4. A method according to claim 2 or 3, characterized in that the system further comprises: the routing reflector RR is provided with a routing reflector,
before the first network device determines, according to a first VLAN identifier carried in a received first packet, a first segment identifier SID corresponding to the first VLAN identifier, the method further includes:
the first network device receives a route of the second EVPN instance in the second network device sent by the RR, wherein the route of the second EVPN instance comprises the first VLAN identifier and the first SID;
and the first network equipment generates a forwarding table entry in a routing forwarding table of the first EVPN instance according to the first VLAN identification and the first SID in the route of the second EVPN instance.
5. The method according to any one of claims 1 to 4,
the sending, by the first network device, the first packet to a second EVPN instance in the second network device through a first ethernet virtual private network EVPN instance in the first network device according to the first SID includes:
the first network device encapsulates the first SID in the first message;
the first network device sends the first packet encapsulated with the first SID to the second EVPN instance in the second network device through the first EVPN instance in the first network device.
6. The method of any of claims 1 to 5, wherein the system further comprises a third network device, wherein the third network device and the second network device are dual-homed devices of the same device, and wherein the method further comprises:
the first network equipment determines a second SID corresponding to the first VLAN identification according to the first VLAN identification carried in the received second message;
and the first network equipment sends the second message to a third EVPN instance in the third network equipment through the first EVPN instance in the first network equipment according to the second SID.
7. The method according to any one of claims 1 to 6,
the type of the first SID is one of an END.DX2 type or an END.DT2U type.
8. The method according to any one of claims 1 to 7,
the first message carries at least one layer of VLAN identification, and the first VLAN identification is the VLAN identification which is positioned in the innermost layer of the first message in the at least one layer of VLAN identification.
9. A communication system, characterized in that the system comprises a first network device and a second network device;
the first network device is configured to determine, according to a first virtual local area network VLAN identifier carried in a received first message, a first segment identifier SID corresponding to the first VLAN identifier, and send, according to the first SID, the first message to a second EVPN instance in the second network device through a first ethernet virtual private network EVPN instance in the first network device;
and the second network equipment is used for forwarding the first message through the second EVPN instance according to the first SID.
10. The system of claim 9,
the first network device is specifically configured to determine the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and a routing forwarding table of the first EVPN instance.
11. The system of claim 10,
the first network device is specifically configured to: and determining that the first SID corresponding to the first VLAN identifier is one of at least one SID corresponding to the VLAN identifier matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance according to the matching of the VLAN identifier in the routing forwarding table of the first EVPN instance and the first VLAN identifier, wherein the routing forwarding table of the first EVPN instance is used for recording the corresponding relation between the VLAN identifier and the SID, and each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
12. The system according to claim 10 or 11, characterized in that the system further comprises: a route reflector RR;
the second network device is further configured to send a route of the second EVPN instance in the second network device to the RR, the route of the second EVPN instance including the first VLAN identifier and the first SID;
the RR is configured to send a route of the second EVPN instance to the first network device;
the first network device is further configured to generate a forwarding table entry in a routing forwarding table of the first EVPN instance according to the first VLAN id and the first SID in the route of the second EVPN instance.
13. The system according to any one of claims 9 to 12,
the first network device is specifically configured to: and encapsulating the first SID in the first message, and sending the first message encapsulated with the first SID to the second EVPN instance in the second network equipment through the first EVPN instance in the first network equipment.
14. The system according to any of claims 9 to 13, characterized in that the system further comprises a third network device, the third network device and the second network device being dual-homed devices of the same device;
the first network device is further configured to determine, according to the first VLAN identifier carried in the received second packet, a second SID corresponding to the first VLAN identifier, and send, according to the second SID, the second packet to a third EVPN instance in the third network device through the first EVPN instance in the first network device;
and the third network equipment is used for forwarding the second message through the third EVPN instance according to the second SID.
15. The system according to any one of claims 9 to 14,
the type of the first SID is one of an END.DX2 type or an END.DT2U type.
16. The system of claim 15,
the second network device is specifically configured to:
if the type of the first SID is END.DX2 type, forwarding the first message according to a port corresponding to the first SID in the second EVPN instance;
and if the type of the first SID is END.DT2U type, forwarding the first message according to the first SID and a routing forwarding table of the second EVPN instance, wherein the routing forwarding table of the second EVPN instance records the corresponding relation between an address and a port identifier, and the port identifier indicates a port corresponding to the address.
17. The system according to any one of claims 9 to 16,
the first message carries at least one layer of VLAN identification, and the first VLAN identification is the VLAN identification which is positioned in the innermost layer of the first message in the at least one layer of VLAN identification.
18. The system according to any one of claims 9 to 17,
the second network device is specifically configured to: and deleting the first VLAN identification from the first message, and forwarding the first message after the first VLAN identification is deleted through the second EVPN instance according to the first SID.
19. A first network device, wherein the first network device is located in a communication system, wherein the communication system further comprises a second network device, wherein the first network device comprises:
the determining module is used for determining a first segment identification SID corresponding to a first Virtual Local Area Network (VLAN) identification carried in a received first message;
a sending module, configured to send the first packet to a second EVPN instance in the second network device through a first ethernet virtual private network EVPN instance in the first network device according to the first SID.
20. The first network device of claim 19,
the determining module is specifically configured to determine the first SID corresponding to the first VLAN identifier according to the first VLAN identifier and the routing forwarding table of the first EVPN instance.
21. The first network device of claim 20,
the determining module is specifically configured to determine, according to that a VLAN identifier in a routing forwarding table of the first EVPN instance matches the first VLAN identifier, that the first SID corresponding to the first VLAN identifier is one of at least one SID corresponding to the VLAN identifier matching the first VLAN identifier in the routing forwarding table of the first EVPN instance, where the routing forwarding table of the first EVPN instance is used to record a correspondence between the VLAN identifier and the SID, and each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
22. The first network device of claim 20 or 21, wherein the system further comprises: a route reflector RR, the first network device further comprising:
a receiving module, configured to receive, before the determining module determines, according to a first VLAN identifier carried in a received first packet, a first SID corresponding to the first VLAN identifier, a route of the second EVPN instance in the second network device sent by the RR, where the route of the second EVPN instance includes the first VLAN identifier and the first SID;
a generating module, configured to generate a forwarding table entry in the route forwarding table of the first EVPN instance according to the first VLAN id and the first SID in the route of the second EVPN instance.
23. The first network device of any of claims 19 to 22,
the sending module is specifically configured to:
encapsulating the first SID in the first message;
and sending the first message encapsulated with the first SID to the second EVPN instance in the second network equipment through the first EVPN instance in the first network equipment.
24. The first network device of any of claims 19 to 23, wherein the system further comprises: a third network device, the third network device and the second network device being dual-homed devices of the same device,
the determining module is further configured to determine, according to the first VLAN identifier carried in the received second packet, a second SID corresponding to the first VLAN identifier;
the sending module is further configured to send the second packet to a third EVPN instance in the third network device through the first EVPN instance in the first network device according to the second SID.
25. First network device according to any of claims 19 to 24,
the type of the first SID is one of an END.DX2 type or an END.DT2U type.
26. The first network device of any of claims 19 to 25,
the first message carries at least one layer of VLAN identification, and the first VLAN identification is the VLAN identification which is positioned in the innermost layer of the first message in the at least one layer of VLAN identification.
27. A network device, comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute a computer program stored in the memory to perform the message transmission method according to any one of claims 1 to 8.
28. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, implements the message transmission method according to any one of claims 1 to 8.
CN202011577140.7A 2020-12-28 2020-12-28 Message transmission method, device and system Active CN114760248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011577140.7A CN114760248B (en) 2020-12-28 2020-12-28 Message transmission method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011577140.7A CN114760248B (en) 2020-12-28 2020-12-28 Message transmission method, device and system

Publications (2)

Publication Number Publication Date
CN114760248A true CN114760248A (en) 2022-07-15
CN114760248B CN114760248B (en) 2023-11-17

Family

ID=82324343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011577140.7A Active CN114760248B (en) 2020-12-28 2020-12-28 Message transmission method, device and system

Country Status (1)

Country Link
CN (1) CN114760248B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116436729A (en) * 2023-06-08 2023-07-14 武汉绿色网络信息服务有限责任公司 Message transmission method, networking system and access cloud gateway

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135133A (en) * 2016-02-26 2017-09-05 丛林网络公司 Horizontal segmentation packet forwarding in many family PBB EVPN networks
CN109861926A (en) * 2017-11-30 2019-06-07 中兴通讯股份有限公司 The transmission of message, processing method and processing device, PE node, node
CN111277482A (en) * 2020-01-13 2020-06-12 新华三大数据技术有限公司 Message processing method and device
CN111510378A (en) * 2017-03-14 2020-08-07 华为技术有限公司 EVPN message processing method, device and system
CN111726286A (en) * 2017-03-14 2020-09-29 华为技术有限公司 EVPN message processing method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135133A (en) * 2016-02-26 2017-09-05 丛林网络公司 Horizontal segmentation packet forwarding in many family PBB EVPN networks
CN111510378A (en) * 2017-03-14 2020-08-07 华为技术有限公司 EVPN message processing method, device and system
CN111726286A (en) * 2017-03-14 2020-09-29 华为技术有限公司 EVPN message processing method, device and system
CN109861926A (en) * 2017-11-30 2019-06-07 中兴通讯股份有限公司 The transmission of message, processing method and processing device, PE node, node
CN111277482A (en) * 2020-01-13 2020-06-12 新华三大数据技术有限公司 Message processing method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A. SAJASSI (EDITOR);S. SALAM;CISCO;N. DEL REGNO; VERIZON;J. RABADAN; NOKIA; A. SAJASSI (EDITOR);S. SALAM;CISCO;N. DEL REGNO; VERIZ: "(PBB-)EVPN Seamless Integration with (PBB-)VPLS\n amp;amp;lt;a href= amp;quot;./draft-ietf-bess-evpn-vpls-seamless-integ-03 amp;quot; amp;amp;gt;draft-ietf-bess-evpn-vpls-seamless-integ-03 amp;amp;lt;/a amp;amp;gt;", IETF, pages 1 - 3 *
A. SAJASSI, ED.;S. SALAM;CISCO; N. DEL REGNO; VERIZON;J. RABADAN; NOKIA;: "Seamless Integration of Ethernet VPN (EVPN) with\n Virtual Private LAN Service (VPLS) and\nTheir Provider Backbone Bridge (PBB) Equivalents", IETF, pages 1 - 5 *
Y. WANG; ZTE CORPORATION;: "Reduction of EVPN C-MAC Overload\ndraft-wang-bess-evpn-cmac-overload-reduction-01", IETF, pages 1 - 14 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116436729A (en) * 2023-06-08 2023-07-14 武汉绿色网络信息服务有限责任公司 Message transmission method, networking system and access cloud gateway
CN116436729B (en) * 2023-06-08 2023-09-08 武汉绿色网络信息服务有限责任公司 Message transmission method, networking system and access cloud gateway

Also Published As

Publication number Publication date
CN114760248B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN108259291B (en) VXLAN message processing method, device and system
CN103200069B (en) A kind of method and apparatus of Message processing
CN109873760A (en) Handle the method and apparatus of routing and the method and apparatus of data transmission
CN113300949B (en) Method for forwarding message, method, device and system for releasing routing information
CN111092801B (en) Data transmission method and device
CN104754025A (en) Programmable Distributed Networking
US20230300070A1 (en) Packet Sending Method, Device, and System
US20240048479A1 (en) Packet Forwarding Method and Apparatus, Network Device, and Storage Medium
CN108833272B (en) Route management method and device
US20230216786A1 (en) Method for forwarding service packet, method for sending sr policy, device, and system
CN113746717A (en) Network equipment communication method and network equipment communication device
CN112822104A (en) Data message processing method, device, storage medium and system
EP4020904B1 (en) Packet transmission method, device, and system
CN114760248B (en) Message transmission method, device and system
CN114760243A (en) Message transmission method, device and system
CN109218176B (en) Message processing method and device
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN114615179A (en) Message transmission method, device and system
US20230224241A1 (en) Path Identity Allocation Method, System, and Apparatus, Device, and Storage Medium
CN116055446B (en) Cross-network message forwarding method, electronic equipment and machine-readable storage medium
US20220345400A1 (en) Packet sending method and apparatus, and storage medium
CN114640615B (en) Route notification method, route generation method and device
CN111447131B (en) Message de-encapsulation method and device and message encapsulation method and device
CN111435948B (en) Method for transmitting message in network and network equipment
CN115242699A (en) Message transmission method, slice generation method, device and system

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