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

Message transmission method, device and system Download PDF

Info

Publication number
CN114760248B
CN114760248B CN202011577140.7A CN202011577140A CN114760248B CN 114760248 B CN114760248 B CN 114760248B CN 202011577140 A CN202011577140 A CN 202011577140A CN 114760248 B CN114760248 B CN 114760248B
Authority
CN
China
Prior art keywords
network device
sid
vlan identifier
evpn instance
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011577140.7A
Other languages
Chinese (zh)
Other versions
CN114760248A (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

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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

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 identifier according to the first VLAN identifier carried in the received first message, and 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 the second network equipment 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, an apparatus, and a system for transmitting a message.
Background
An ethernet virtual private network (Ethernet virtual private network, EVPN) network includes a Provider Edge (PE) device, and the PE device generally needs to learn a media access control (media access control, MAC) address of a user device on which the PE device is mounted, and forward a message to the user device according to the MAC address of the user device.
However, when more user devices are downloaded by the PE device, more MAC addresses need to be learned by the PE device, resulting in higher pressure for learning the MAC addresses by the PE device and higher performance requirements for the PE device.
Disclosure of Invention
The application provides a message transmission method, equipment and a system, which are beneficial to reducing the pressure of learning MAC addresses by PE equipment and reducing the performance requirements 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 (segment identifier, SID) corresponding to a first VLAN identifier according to the first VLAN identifier carried in the received first message (virtual local area network, VLAN); the first network device sends the first message to a second EVPN instance in the second network device through the first EVPN instance in the first network device according to the first SID.
According to the technical scheme provided by the application, the first network equipment can determine the first SID according to the first VLAN identifier carried in the first message sent to the user equipment, and send the first message to the second EVPN instance in the second network equipment through the first EVPN instance in the first network equipment according to the first SID, so that 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 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, including: and the first network equipment determines a first SID corresponding to the first VLAN identifier according to the first VLAN identifier 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, where a correspondence between a VLAN identifier and a SID is recorded in the routing forwarding table.
According to the technical scheme provided by the application, the first network equipment determines the first SID corresponding to the first VLAN identifier according to the routing forwarding table of the first EVPN instance, so that the first network equipment can conveniently forward the first message according to the first SID, 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 first network device determines, according to the first VLAN identifier and the routing forwarding table of the first EVPN instance, a first SID corresponding to the first VLAN identifier, including: the first network device determines that a 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 a routing forwarding table of the first EVPN instance according to the VLAN identifier matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance, 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.
According to the technical scheme provided by the application, one or more SIDs corresponding to the VLAN identifications matched with the first VLAN identifications can be stored in the routing forwarding table of the first EVPN instance, and the first network equipment can determine the first SID corresponding to the first VLAN identifications from the one or more SIDs based on a load balancing strategy or a main and standby protection strategy, so that load balancing of the network equipment in the system or forwarding protection of the message can be realized, and the message loss caused by network equipment faults can be avoided.
Optionally, the system further comprises: the method further comprises the steps that before a first Router Reflector (RR) determines a first SID corresponding to a first VLAN identifier according to the first VLAN identifier carried in a received first message, the first network device further comprises: the first network device receives a route of a second EVPN instance in a second network device sent by RR, wherein the route of the second EVPN instance comprises the first VLAN identifier and the first SID; the first network device 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 routing of the second EVPN instance. The route of the second EVPN instance may be, for example, an Ethernet auto discovery (Ethernet auto discovery, ethernet AD) route, for example, ethernet auto discovery Per EVI route, wherein the Ethernet virtual private network instance (Ethernet virtual private network instance, EVI).
According to the technical scheme provided by the application, the RR reflects the route of the second EVPN instance in the second network device to the first network device, so that the first network device can conveniently generate the forwarding table item 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, and the first network device can conveniently determine the corresponding first SID to forward the message when receiving the first message carrying the first VLAN identifier, so that the first network device can forward the message sent to the user device without learning the MAC address of the user device. In the technical scheme provided by the application, the RR reflects the Ethernet AD route of the second EVPN example to the first network equipment, so that the requirement on the reflection capability of the RR can be reduced.
Optionally, the first network device sends, according to the first SID, a first packet to a second EVPN instance in the second network device through the first EVPN instance in the first network device, including: 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 comprises a third network device, the third network device and the second network device being dual homing devices of the same device, the method further comprising: the first network equipment determines a second SID corresponding to the first VLAN identifier according to the first VLAN identifier 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. 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 and secondary protection policy, and forward the second packet according to the second SID, so that load balancing of the network device in the system or forwarding protection of the packet may be implemented.
According to the technical scheme provided by the application, the first network equipment determines the second SID according to the first VLAN identifier carried in the received second message, and sends the second message to the third EVPN instance in the third network equipment through the first EVPN instance in the first network equipment according to the second SID, so that the load sharing or the primary and secondary protection of the third network equipment and the second network equipment can be realized, the load balancing of the network equipment in the system is ensured, or the forwarding protection of the message is ensured, for example, the packet loss rate of the system can be reduced.
Optionally, the first SID is one of an end.dx2 type or an end.dt2u type, and 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 a VLAN identifier located in an innermost layer of the first packet in the at least one layer of VLAN identifier. The second message carries at least one layer of VLAN identifier, and the first VLAN identifier is the VLAN identifier positioned at the innermost layer of the second message in the at least one layer of VLAN identifier.
Before implementing the technical scheme provided by the application, the first VLAN identifier is configured in the network equipment (such as the first network equipment) to determine the position of the VLAN identifier of the SID in the message, so that the network equipment can extract the VLAN identifier for determining the corresponding SID from the message when receiving the message.
In a second 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 second network equipment receives a first message sent by a first EVPN instance in first network equipment through a second EVPN instance in the second network equipment, wherein the first message is sent by the first network equipment 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 equipment can determine the first SID according to the first VLAN identifier carried in the first message sent to the user equipment, the first message is sent to the second EVPN instance in the second network equipment through the first EVPN instance in the first network equipment according to the first SID, and the second network equipment forwards the first message through the second EVPN instance in the second network equipment according to the first SID after receiving the first message. 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 second network device forwards the first packet through the second EVPN instance according to the first SID, including: if the type of the first SID is the END.DX2 type, the second network device forwards 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 the END.DT2U type, the second network equipment 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 the corresponding relation between the address and the port identifier, and the port identifier indicates the port corresponding to the address. In the application, if the type of the first SID is the END.DX2 type, the first SID can indicate a certain port of a second EVPN instance in the second network equipment, and the second network equipment directly forwards the first message 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 routing forwarding table of the second EVPN instance according to the destination address carried by the first message, so as to determine an egress port of the first message in the second EVPN instance, and forward the first message through the egress port of the first message. 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 a VLAN identifier located in an innermost layer of the first packet in the at least one layer of VLAN identifier.
Before implementing the technical scheme provided by the application, the first VLAN identifier is configured in the network equipment (such as the first network equipment) to determine the position of the VLAN identifier of the SID in the message, so that the network equipment can extract the VLAN identifier for determining the corresponding SID from the message when receiving the message.
Optionally, the second network device forwards the first packet through the second EVPN instance according to the first SID, including: the second network device deletes the first VLAN identifier from the first message; and the second network equipment forwards the first message with the first VLAN identifier deleted through the second EVPN instance according to the first SID.
According to the technical scheme provided by the application, the second network equipment deletes the first VLAN identifier in the first message, so that the first VLAN identifier can be prevented from influencing the subsequent processing and/or forwarding of the first message by the network equipment.
Optionally, the system further comprises: before the second network device receives the first message sent by the first EVPN instance in the first network device through the second EVPN instance in the second 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. The route of this second EVPN instance may be, for example, an Ethernet AD route, for example, a Ethernet auto discovery Per EVI route.
According to the technical scheme provided by the application, the second network equipment sends the route of the second EVPN instance in the second network equipment to the RR, so that the RR can reflect the route of the second EVPN instance to the first network equipment, and the first network equipment can generate a forwarding table item in a routing forwarding table of the first EVPN instance in the first network equipment 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 the Ethernet AD route of the second EVPN instance to the first network device, the requirement for the reflection 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 configured to determine a first SID corresponding to a first VLAN identifier according to the first VLAN identifier carried in the received first packet, and send the first packet to a second EVPN instance in the second network device through the 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, according to the first VLAN identifier and the routing forwarding table of the first EVPN instance, the first SID corresponding to the first VLAN identifier.
Optionally, the first network device is specifically configured to: according to the VLAN identifier in the routing forwarding table of the first EVPN instance being matched with the first VLAN identifier, 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, wherein the routing forwarding table of the first EVPN instance is used for recording the 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.
Optionally, the system further comprises: RR; the second network device is further configured to send 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; the RR is used for sending the route of the second EVPN instance to the first network equipment; 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 identification and the first SID in the routing of the second EVPN instance.
Optionally, the first network device is specifically configured to: and encapsulating the first SID in a first message, and transmitting the first message encapsulated with the first SID to a second EVPN instance in second network equipment through the first EVPN instance in the first network equipment.
Optionally, the system further comprises a third network device, the third network device and the second network device being dual homing devices of the same device; the first network device is further configured to determine, according to a 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 a first EVPN instance in the first network device; and the third network device is used for forwarding the second message through the third EVPN instance according to the second SID.
Optionally, the first SID is one of an end.dx2 type or an end.dt2u type, and 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 the 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 the 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 the address and the port identifier, and the port identifier indicates the port corresponding to the address.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is a VLAN identifier located in an innermost layer of the first packet in the at least one layer of VLAN identifier.
Optionally, the second network device is specifically configured to: deleting the first VLAN identifier from the first message, and forwarding the first message with the first VLAN identifier deleted through the second EVPN instance according to the first SID.
The technical effects of the third aspect and the various optional implementations of the third aspect may refer to the technical effects of the first aspect and the various optional implementations of the first aspect, and the technical effects of the second aspect and the various optional implementations of the second aspect, which are not described herein.
In a fourth aspect, there is provided a first network device comprising means for performing the method of message transmission as provided in the first aspect or any of the alternatives 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 arbitrarily combined or partitioned based on the specific implementation.
In a fifth aspect, there is provided a second network device comprising respective modules for performing the method of message transmission as provided in the second aspect or any of the alternatives of the second aspect above. The modules may be implemented based on software, hardware, or a combination of software and hardware, and the modules may be arbitrarily combined or partitioned based on the specific implementation.
In a sixth aspect, a network device is provided, comprising 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 method of transmitting a message as provided in the first aspect or any of the alternatives of the first aspect, or to perform the method of transmitting a message as provided in the second aspect or any of the alternatives of the second aspect.
In a seventh aspect, a computer readable storage medium is provided, in which a computer program is stored, which when executed by a processor implements the method for transmitting a message as provided in the first aspect or any of the alternatives of the first aspect, or implements the method for transmitting a message as provided in the second aspect or any of the alternatives of the second aspect.
In an eighth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of messaging as provided in the first aspect or any of the alternatives of the first aspect, or to perform the method of messaging as provided in the second aspect or any of the alternatives of the second aspect.
A ninth aspect provides a chip comprising programmable logic circuitry and/or program instructions for implementing a method of message transmission as provided in the first aspect or any of the alternatives of the first aspect, or implementing a method of message transmission as provided in the second aspect or any of the alternatives of the second aspect, when the chip is run.
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 a first network device as provided in the fourth aspect, and the second network device is a second network device as 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 sixth aspect above.
The technical scheme provided by the application has the beneficial effects that:
after receiving a first message carrying a first VLAN identifier, a first network device determines a first SID corresponding to the first VLAN identifier, and 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. 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 for 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 according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of another EVPN network according to an embodiment of the present application;
fig. 3 is a flowchart of a message transmission method provided in 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 according to an embodiment of the present application;
FIG. 6 is a schematic diagram of yet another message according to an 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 method for transmitting a message 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 method for transmitting a message 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 logic structure diagram of a first network device according to an embodiment of the present application;
fig. 14 is a schematic logic structure diagram of a second network device according to an embodiment of the present application;
fig. 15 is a schematic hardware structure of a network device according to an embodiment of the present application;
Fig. 16 is a schematic diagram of a hardware structure of another network device according to 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
In order to make the principles, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before explaining the embodiment of the present application, an application scenario of the embodiment 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, wherein 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 the message of the user device mounted under the PE device. Optionally, at least one EVPN instance is configured in each PE device, and each PE device may forward a packet of the user equipment through the EVPN instance in the PE device.
The PE device can take on corresponding roles according to different application scenes. Taking a user broadband access scene as an example, an EVPN network applied to the scene comprises at least one broadband access device and a plurality of PE devices, the plurality of PE devices can comprise user access PE devices and broadband access PE devices according to different roles assumed by the plurality of PE devices, the plurality of user access PE devices can be mutually connected, the plurality of broadband access PE devices can be mutually connected, each broadband access PE device can be connected with at least one user access PE device, each broadband access PE device can be connected with at least one broadband access device, and each user access PE device can be connected with at least one user device. The user access PE device and the broadband access PE device are used for forwarding the message from the broadband access device to the user device and forwarding the message from the user device to the broadband access device.
Wherein the broadband access device may be a broadband access server (broadband remote access server, BRAS). The user device may be a host, a user terminal, a server, or various types of devices such as Virtual Machines (VMs) created on the server, and typically may be a dial-up internet device such as a cat. The PE device may be a network device such as a router, switch, virtual router, or virtual switch. The PE devices may be directly connected or connected through other network devices (e.g., core devices), which is not limited by the embodiment of the present application.
For example, please refer to fig. 1, which shows a schematic structural diagram of an EVPN network provided by an embodiment of the present application, and fig. 1 is an illustration in which 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, namely, PE1 to PE4 (i.e., PE1, PE2, PE3, and PE 4), and three broadband access devices, namely, BRAS1 to BRAS3 (i.e., BRAS1, BRAS2, and BRAS 3). PE1 ~ PE4 interconnect, and PE1 and PE4 are connected with BRAS1 ~ BRAS3 respectively, and PE2 and PE3 are connected with VM1 ~ VM4 respectively (i.e. VM, VM2, VM3 and VM 4), and VM1 ~ VM4 are installed under PE2 and PE3 respectively. According to different roles played by the PEs 1 to 4, the PEs 1 and 4 can be broadband access PE devices, the PEs 2 and 3 can be user access PE devices, at least one EVPN instance (only 1 is shown in fig. 1, and is EVPN instance 1) is configured in each of the PEs 1 to 4, and each of the PEs 1 to 4 forwards messages from the VM1 to the VM4 to the BRAS1 to the BRAS3 and forwards messages from the BRAS1 to the BRAS3 to the VM1 to the VM4 through the EVPN instance in the PE device.
As shown in fig. 1, after receiving a message sent by a VM1 mounted on the PE2, the PE2 forwards the message to an EVPN instance 1 in the PE1 through the 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 broadband access service for the VM1 according to the message. For another example, after receiving a message sent by BRAS1 through EVPN instance 1 in PE1, PE1 forwards the message to EVPN instance 1 in PE2 through EVPN instance 1 in PE1, and PE2 forwards the message to VM1 through EVPN instance 1 in 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 and forward the message to the VM1 through the EVPN instance 1 in the PE3 based on the load sharing policy or the active protection policy. The EVPN instance 1 in PE1 may include two ports (e.g., EVPN neighbors) corresponding to PE2 and PE3, so that the PE1 may forward a message to the EVPN instance 1 in PE2 through the EVPN instance 1 in the PE1, or may forward a message to the EVPN instance 1 in PE3 through the EVPN instance 1 in the PE 1.
In general, the EVPN network further includes an edge access device and/or a core device, where each PE device may be connected by the core device, and the edge access device may be connected to a user access PE device, where the user device is connected to the user access PE device by the edge access device, that is, the user device is mounted under the edge access device and connected to the user access PE device by 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 (optical line terminal, OLT). The P device may forward messages between the user access PE device and the broadband access PE device.
For example, please refer to fig. 2, which illustrates a schematic structural diagram of another EVPN network provided by an embodiment of the present application, and fig. 2 still illustrates that the broadband access device is a BRAS and the user equipment is a VM. Referring to fig. 2, the EVPN network further includes two CE devices, CE1 and CE2, and two P devices, P1 and P2, on the basis of fig. 1. P1 is connected with P2, each P device in P1 and P2 is connected with PE1 ~ PE4 respectively, each CE device in CE1 and CE2 is connected with PE2 and PE3 respectively, and CE1 is connected with VM1 ~ VM2 (i.e. VM1 ~ VM2 is mounted under CE1 and mounted under PE2 and PE3 through CE 1), CE2 is connected with VM3 ~ VM4 (i.e. VM3 ~ VM4 is mounted under CE2 and mounted under PE2 and PE3 through CE 2). The descriptions of PE1 to PE4 may refer to the related descriptions of the EVPN network shown in fig. 1, and are not repeated here. P1 and P2 can be used for forwarding messages between PE1 and PE 2-PE 3, and between PE4 and PE 2-PE 3.
As shown in fig. 2, after receiving a message (the message may be forwarded by CE 1) sent by a VM1 mounted on the PE2, the PE2 forwards the message to P1 through an EVPN instance 1 in the PE2, the P1 forwards the message to an EVPN instance 1 in the PE1, and the PE1 forwards the message to BRAS1 through an EVPN instance 1 in the PE1, where the BRAS1 provides broadband access service for the VM1 according to the message. For another example, after receiving a message sent by a BRAS1 through an EVPN instance 1 in the PE1, the PE1 forwards the message to P1 through the EVPN instance 1 in the PE1, the P1 forwards the message to an EVPN instance 1 in the PE2, and the PE2 forwards the message to a CE1 through the EVPN instance 1 in the PE2, and the CE1 forwards the message to a VM1 according to a destination address carried in the message.
In the current technical solution, in order to enable the PE device to forward the message to the user device (for example, the foregoing VM1 to VM 4), the MAC address of the user device needs to be learned, so as to forward the message to the user device according to the MAC address of the user device. As shown in fig. 1 and fig. 2, the EVPN network further includes an RR, where the user access PE device (e.g., PE2 and PE 3) may learn the MAC address of the user device based on the traffic from the user device, and send the MAC route (e.g., type2 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 PE 4), where the broadband access PE device learns the MAC address of the user device according to the MAC route of the user device.
However, when more user devices are downloaded to the broadband access PE devices (e.g., PE1 and PE 4), the MAC addresses that need to be learned by the broadband access PE devices are all more, resulting in a higher pressure for learning the MAC addresses by the broadband access PE devices, and a higher performance requirement for the broadband access PE devices. For example, each ue generally has 3 to 4 MAC addresses, and in the case of accessing 100 tens of thousands of ues in the EVPN network, the broadband access PE device needs to learn 300 to 400 tens of thousands of MAC addresses, which is a strong effort for learning the MAC addresses for the broadband access PE device, and requires a strong hardware capability to meet the table entry requirements. When the access side link frequently oscillates, a large amount of refreshing of the MAC forwarding table is needed in the broadband access PE device, so that a central processing unit (central processing unit, CPU) of the broadband access PE device is high, and the control surface processing performance is reduced. Furthermore, since there are many MAC routes (e.g., type2 routes) that require RR reflection, the requirements for the reflective capabilities of the RR are high. For example, as shown in fig. 1 and 2, both PE2 and PE3 would send the MAC routes for VM 1-VM 4 to the RR, which would double the MAC route in the RR (e.g., for each VM of VM 1-VM 4, there would be two MAC routes for that VM in the RR).
In view of this, the embodiments of the present application provide a method, an apparatus, and a system for transmitting a packet, where a broadband access PE device may determine, according to a VLAN identifier carried in a packet sent to a user equipment, a SID of an EVPN instance that can be located in the user access PE device, and according to the SID, use an internet protocol version 6 (Internet Protocol version, ipv 6) forwarding mode, and forward a packet 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, and forward a packet to the user equipment through the EVPN instance in the user access PE device by the user access PE device according to the SID, so that the broadband access PE device may forward the packet sent to the user equipment without learning a MAC address of the user equipment, thereby reducing a pressure of the broadband access PE device for learning the MAC address and a performance requirement on the broadband access PE device, and avoiding a decrease in processing performance of a control plane of the broadband access PE device caused by frequent oscillation of an access side link. In addition, the RR does not need to reflect the MAC route of the user equipment to the broadband access PE equipment, thereby reducing the requirement on the reflection capability of the RR. The technical scheme of the application is described in detail below with reference to the accompanying drawings.
It should be noted that the foregoing EVPN networks shown in fig. 1 and fig. 2 are only used as examples, and are not used to limit the technical solutions of the present application, in a specific implementation process, the number of PE devices, CE devices, P devices, BRAS, and RR may be configured according to needs, and specific roles that each type of device needs to assume may be determined according to an application scenario, and other network devices may be included in the EVPN network or the EVPN network may further include fewer devices than fig. 1 or fig. 2, for example, the EVPN network may not include an RR and/or a P device, but may implement a reflection function of the RR by other network devices (for example, a PE device) in the EVPN network, for example, may be configured on the network device so that the network device may implement a transmission function of the RR. In addition, for convenience of description, in the embodiment of the present application, in a broadband access scenario of a user, a PE device connected to the user device is referred to as a user access PE device, and a PE device connected to the broadband access device is referred to as a broadband access PE device, but this description is merely exemplary, and in other implementation scenarios, the user access PE device and the broadband access PE device may be described by other names, or may not distinguish types of PE devices, which is not limited by the embodiment of the present application.
The noun SID referred to in the present application will be described first.
In embodiments of the present application, the SID identifies an endpoint, e.g., a port that identifies a certain EVPN instance in a device, or a certain EVPN instance in a device. In IPv6, the SID may be an IPv6 address of a network device, and represent a 128-bit value, and a location (locator) portion, a function (function) portion, and a parameter (parameter) portion may be included in the SID of an IPv6, and the structure thereof may be as shown in table 1 below:
TABLE 1
locator function argument
The location part is used for routing the message to the network equipment corresponding to the SID, so as to realize network addressing. The position part has two important properties, namely routing and aggregation, and is a variable length part in the SID.
Wherein the functional part indicates that the network device issuing the SID needs to perform a corresponding action, which is equivalent to an operation code of a calculation instruction. In an IPv6 network, any processing operation can be expressed with a functional part or the entire SID.
Where the parameter part is the parameter, service or any other relevant information required when executing the instruction. The parameter portion is an optional portion, i.e., the SID may not include a parameter portion.
The SID generally has a type, and the actions indicated by the functional parts of different types of SIDs are different, and the embodiments of the present application mainly relate to an end.dx2 type SID (abbreviated as end.dx2 SID) and an end.dt2u type SID (abbreviated as end.dt2u SID) of SRv. The end.dx2SID represents an endpoint (endpoint) SID of a two-layer cross connection, and is used for identifying an endpoint, and the forwarding action corresponding to the end.dx2SID is to strip the IPv6 header and the extension header thereof, and then forward the rest of the message from the port corresponding to the SID. The end.dt2u SID represents an end SID of two layers of cross connection and performs a unicast MAC forwarding table lookup function, and is used for identifying an endpoint, the forwarding action corresponding to the end.dt2u SID is to strip the IPv6 header and its extension header, then use the destination MAC address of the remaining packet to find the MAC forwarding table, and forward the remaining packet from the corresponding port according to the MAC forwarding table. It should be noted that, the end.dx2SID and the end.dt2u SID described in the embodiments of the present application are merely exemplary, and in practical application, the technical scheme of the present application may be implemented by using information having the same or similar functions as the end.dx2SID or the end.dt2u SID, for example, a technical scheme of the present application may be implemented by newly defining a SID having the same or similar functions as the end.dx2SID or the end.dt2u SID, which is not limited in the embodiments 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 solution provided by the present application can BE applied to network scenarios such as Best Effort (BE) or SRv6-Policy of the 6 th edition (segment routing internet protocol version, srv 6) of the segment routing internet protocol, and the following embodiments mainly take SRv6-BE scenarios as examples to describe the technical solution of the present application.
Fig. 3 is 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 PE2. 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 Routing Target (RT) of the first EVPN instance matches an RT of the second EVPN instance, for example, an ingress direction routing target (import route target, IRT) of the first EVPN instance matches an egress direction routing target (export route target, ERT) of the second EVPN instance, or ERT of the first EVPN instance matches an IRT of the second EVPN instance, 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. As illustrated by way of example in fig. 1 and 2. The first network device may be PE1 and the second network device may be PE2, the first EVPN instance being EVPN instance 1 in the PE1 and the second EVPN instance being EVPN instance 1 in the PE2.
Optionally, the first SID is one of end.dx2 type or end.dt2u type, i.e. the first SID may be one of end.dx2 SID or end.dt2u SID. If the type of the first SID is an end.dx2 type, the first SID may be used 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. If the first SID is of the end.dt2u type, 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.dx2 type, the port indicated by the first SID may be an Access Circuit (AC) port of the second EVPN instance, which may include a plurality of AC ports, at least one AC port of the second EVPN instance configured with a corresponding end.dx2 SID, and the port indicated by the first SID may be one of the at least one AC ports. It should be noted that, the first SID is an end.dx2 SID or an end.dt2u SID in the embodiment of the present application is merely exemplary, and in practical application, the information having the same or similar function as the end.dx2 SID or the end.dt2u SID may be used to implement the function of the first SID, for example, a SID having the same or similar function as the end.dx2 SID or the end.dt2u SID may be defined to implement the function of the first SID, which is not limited in the 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 the first network device receives the first packet, parse the first packet to determine a first VLAN identifier carried by 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 the broadband access device (e.g., BRAS1 in fig. 1 and 2) to the user device (e.g., VM1 in fig. 1 and 2), where the first packet may carry at least one layer of VLAN identifier, and the first VLAN identifier may be a VLAN identifier located in an innermost layer of the first packet in the at least one layer of VLAN identifier. The first message also carries a load (payload), the innermost layer of the first message refers to a layer closest to the load, and the outermost layer of the first message refers to a layer farthest from the load, that is, the direction from the inside to the outside in the first message according to the direction from the load to the load. Fig. 4 is a schematic diagram of a first packet provided in an 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 BRAS1 in fig. 1 or fig. 2 to VM 1. The first message carries a load, VLAN100, UVLAN (user VLAN), SVLAN (service VLAN), 0-5-1 and 1-1-1, wherein VLAN100, UVLANs and SVLANs 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 packet shown in fig. 4 may be a packet carrying three layers of VLAN identifiers, where the three layers of VLAN identifiers sequentially include VLAN100, UVLAN, and SVLAN from the innermost side to the outermost side of the first packet, and the VLAN identifier of the innermost layer in the first packet is VLAN100, so that the first network device determines that the first VLAN identifier carried by the first packet is VLAN100.
Optionally, the routing forwarding table of the first EVPN instance is configured to record a correspondence between VLAN identifiers and SIDs, where each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs, and determining, by the first network device, according to the first VLAN identifier and the routing forwarding table of the first EVPN instance, a first SID corresponding to the first VLAN identifier may include: the first network device determines, according to the matching of the VLAN identifier in the routing forwarding table of the first EVPN instance and 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 matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance. In the embodiment of the present application, the first network device may determine, from the routing forwarding table of the first EVPN instance, a VLAN identifier that matches (for example, is the same as) the first VLAN identifier, and determine, as the first SID corresponding to the first VLAN identifier, one SID corresponding to the VLAN identifier that matches the first VLAN identifier in the routing forwarding table of the first EVPN instance. Optionally, if the VLAN identifier in the routing forwarding table of the first EVPN instance that matches the first VLAN identifier corresponds to a SID (e.g., each VLAN identifier 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 to which the first VLAN identifier corresponds. If the VLAN identifier matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to a plurality of SIDs (for example, each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to a plurality of SIDs), the plurality of EVPN instances in a plurality of network devices may be located according to the plurality of SIDs, the plurality of network devices may be located on a plurality of forwarding paths between the first network device and a destination device (for example, a destination device of the first packet), and the plurality of forwarding paths may include a primary forwarding path and a standby forwarding path, or the plurality of forwarding paths are load sharing paths with each other; the first network device may determine a first SID corresponding to the first VLAN identification from the plurality of SIDs based on a primary and backup protection policy or a load sharing policy, e.g., the plurality of SIDs may include a primary SID and a backup SID, and the first network device determines the primary SID as the first SID corresponding to the first VLAN identification.
For example, taking the first EVPN instance as EVPN instance 1, each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to a plurality of SIDs, and the plurality of SIDs are end.dx2 SIDs as an example, the routing forwarding table of the first EVPN instance may be as shown in table 2 below, where each row of content in the following table 2 may be a forwarding table entry:
TABLE 2
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, and 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 protection policy or the load sharing policy, for example, the first network device determines the first SID corresponding to the first VLAN identifier to be 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 message to a second EVPN instance in the second network device through the first EVPN instance in the first network device according to the first SID.
Optionally, the first network device encapsulates the first SID in the first message, and sends the first message 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. In the embodiment of the present application, the first message may BE carried by SRv6-BE or SRv6-Policy, and the embodiment of the present application is illustrated by using SRv6-BE for carrying the first message. The first network device may further encapsulate an IPv6 address of the first network device in the first packet, and send, through a first EVPN instance in the first network device, a first packet encapsulating the first SID and the IPv6 address of the first network device to a second EVPN instance in the second network device. 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, which 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, i.e. 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 of the first network device after encapsulating the first SID and the IPv6 address of the first network device in the first message as shown in FIG. 4 may be as shown in FIG. 5.
It should be noted that, in the embodiment of the present application, the first network device may not be able to determine the SID corresponding to the first VLAN identifier carried by the first packet (for example, the routing forwarding table of the first EVPN instance does not have the SID corresponding to the first VLAN identifier), which is described by taking as an example that the first network device is able to determine the SID corresponding to the first VLAN identifier carried by the first packet, and in this case, the first network device may search the MAC forwarding table of the first EVPN instance according to the destination address (that is, the destination MAC address) carried by 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 by the first packet, and forward the first packet through a 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 by the 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 the 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 the remote network device, and the first message may be a message (e.g., from BRAS 1-BRAS 3) entering the first EVPN instance from the AC port of the first EVPN instance. In the embodiment of the application, a forwarding model can be configured in the first EVPN example in advance: the message entering the first EVPN instance from the AC port of the first EVPN instance searches for a routing forwarding table (e.g., VLAN forwarding table) of the first EVPN instance according to the VLAN identifier of the innermost layer of the message, and the message entering the first EVPN instance from the EVPN neighbor of the first EVPN instance searches for a MAC forwarding table of the first EVPN instance according to the destination address carried by the message, so that when the first network device receives the first message, the first message can be forwarded according to steps 301 to 302.
Step 303, the second network device receives, through a second EVPN instance in the second network device, a first packet sent by a first EVPN instance in the first network device.
The first message carries at least one layer of VLAN identifier, and the VLAN identifier of the innermost layer of the first message may be the first VLAN identifier carried by the first message. And the first message also carries the first SID. For example, the first message received by the second network device may be as shown in fig. 5.
Step 304, the second network device forwards the first message through a second EVPN instance in the second network device according to the first SID.
The first message received by the second network device may carry a first VLAN identifier, where the second network device may delete (or pop up) the first VLAN identifier from the first message, and then forward, according to the first SID, the first message after deleting the first VLAN identifier through a second EVPN instance in the second network device.
Optionally, the first message received by the second network device further carries tunnel information, 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 then forward the first message through a second EVPN instance in the second network device according to the first SID. The first packet received by the second network device is shown in fig. 5, the first packet forwarded by the second network device is shown in fig. 6, and the packet shown in fig. 6 is a packet obtained by deleting the first VLAN identifier (i.e. VLAN 100) and the tunnel information (including 1::1 and 2:: 1) in the packet 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, based on the type of the first SID, in which manner to forward the first message (i.e., the first message after deleting the first VLAN identification and the tunnel information). Optionally, if the type of the first SID is end.dx2 type, 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; if the type of the first SID is the 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 instance 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 of SIDs, port identifiers, and SID types, where the SID types identify types of the corresponding SIDs, and the port identifiers indicate ports to which the corresponding SIDs correspond. The types of the SID recorded in the SID table may include an end.dx2 type and an end.dt2u type, for the SID of the end.dx2 type, a port identifier corresponding to the SID may be present in the SID table, and for the 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 configured 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 that matches (e.g., is the same as) the first SID in the SID table of the second EVPN instance as the type of the first SID. If the type of the first SID is 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 the SID table of the second EVPN instance, and forwards the first message through the egress port of the first message, alternatively, if the type of the first SID is end.dx2 type, the second network device deletes tunnel information in the first message first, deletes a first VLAN identifier in the first message according to configuration information of the egress port of the first message, and forwards the first message after deleting the tunnel 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 firstly 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 matched (for example, the same) with the destination address of the first message in the routing forwarding table of the second EVPN instance 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 is illustrated with the address being a MAC address. Wherein, each row of contents in the following table 3 may be a forwarding table entry, and each row of contents in the following table 4 may be a forwarding table entry.
TABLE 3 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 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, SID tables of the second EVPN examples record SID 1-SID 4 and the type of each SID, the types of SID 1-SID 2 are end.dx2, the table 3 also records port identifiers P1-P2 corresponding to SID 1-SID 2, the types of SID 3-SID 4 are end.dt2u, and the port identifiers corresponding to SID 3-SID 4 in table 3 are null. As shown in table 4, the routing forwarding table of the second EVPN instance records the MAC address 1 to the MAC address 4 and the corresponding port identifier thereof.
For example, assuming that the second network device determines, from the SID table shown in table 3, that the SID matching (e.g., the same as) the first SID is SID1, because 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 packet, then determines, in the second EVPN instance, an egress port of the first packet (e.g., the egress port is port 1 of the second EVPN instance) according to the port identifier P1 corresponding to the SID1, deletes the first VLAN identifier in the first packet according to the configuration information of the egress port of the first packet, and forwards the first packet through the egress port of the first packet (i.e., the first packet after deleting the first VLAN identifier and the tunnel information), e.g., the second network device forwards the packet as shown in fig. 6 through port 1 of the second EVPN instance.
As another example, assuming that the second network device determines, from the SID table shown in table 3, that the SID that matches (e.g., is the same as) the first SID 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, from the routing forwarding table shown in table 4, the address that matches the destination address of the first packet. Assuming that the second network device determines, from the routing forwarding table shown in table 4, that the address matching the destination address of the first packet is the MAC address 1, because the port identifier corresponding to the MAC address 1 in the routing forwarding table is P3, the second network device determines, in the second EVPN instance, the egress port of the first packet (for example, the egress port is the port 3 of 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, forwards the first packet after deleting the first VLAN identifier and the tunnel information), for example, the second network device forwards the packet as shown in fig. 6 through the port 3 of the second EVPN instance.
In the second EVPN instance of the second network device, the output port of the first packet (including the port corresponding to the first SID and the port corresponding to the destination address carried by the first packet) may be an AC port of the second EVPN instance, and before executing the packet transmission method provided by the embodiment of the present application, some AC ports of the second EVPN instance may be configured, for example: and for the message entering the second EVPN instance from the AC port, inserting a VLAN identifier at the innermost layer of the message, forwarding the message, and for the message needing to be forwarded from the second EVPN instance through the AC port, deleting the VLAN identifier at the innermost layer of the message, and forwarding the message. In this way, the second network device may delete the first VLAN identifier in the first packet when forwarding the first packet through the second EVPN instance.
In the message transmission method provided by the embodiment of the application, the second network device can forward the first message according to the first SID carried by the first message, if the first SID is the END.DX2SID, the second network device forwards the first message according to the port corresponding to the first SID in the second EVPN instance in the second network device, and if the first SID is the END.DX2SID, the second network device forwards the first message according to the first SID and the routing forwarding table (MAC forwarding table) of the second EVPN instance, and the message transmission method can realize compatibility with the traditional MAC forwarding scheme on the second network device.
In summary, according to the technical solution provided in the 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 the 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 device through the second EVPN instance in the second network device according to the first SID. 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, 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 for learning the MAC address and the performance requirement of the first network device are reduced, and the processing performance of the control surface of the first network device is prevented from being reduced due to frequent oscillation of an access side link.
As can be seen from the description of the foregoing embodiments, in the routing forwarding table (i.e., VLAN forwarding table) of the first EVPN instance, the VLAN identifier that matches the first VLAN identifier may correspond to a plurality of SIDs, and the plurality of SIDs may be located to a plurality of EVPN instances in a plurality of network devices. The plurality of network devices may be multiple-homing devices (i.e., the CE devices are respectively connected to the plurality of network devices), such as dual-homing devices, of the CE device mounted on the destination device (e.g., the destination device of the first message). The plurality of network devices may be located on a plurality of forwarding paths between the first network device and the destination device, the plurality of forwarding paths may include a primary forwarding path and a backup forwarding path, or the plurality of forwarding paths are load sharing paths with each other. The first network device may determine, from among a plurality of SIDs corresponding to VLAN identifiers matched to the first VLAN identifier, a SID corresponding to the first VLAN identifier in a routing forwarding table of the first EVPN instance based on the active-standby protection policy or the 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 a message to the destination device through the plurality of forwarding paths based on the load sharing policy or the active/standby protection policy. For example, if the plurality of forwarding paths are load sharing paths with each other, the first network device may send a message to the destination device over the plurality of forwarding paths based on an equal cost multi-path (equal cost multi path, ECMP) policy. If the plurality of forwarding paths include a main forwarding path and a standby forwarding path, the first network device preferentially transmits the message to the destination device through the main forwarding path, and when the main forwarding path fails, the first network device transmits the message to the destination device through the standby forwarding path.
The following describes a scheme for the first network device to send a message to the destination device through the multiple forwarding paths.
Referring to fig. 7, a flowchart of another message transmission method according to an embodiment of the present application is shown. 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 PE3. As shown in fig. 7, the method may include the following steps:
in 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 message to a second EVPN instance in the second network device through the first EVPN instance in the first network device according to the first SID.
Step 703, the second network device receives, through a second EVPN instance in the second network device, a first packet sent by a first EVPN instance in the first network device.
Step 704, the second network device forwards the first message through a 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 will not be described herein.
Step 705, the first network device determines, according to a first VLAN identifier carried in the received second packet, a second SID corresponding to the first VLAN identifier.
Wherein, according to a third EVPN instance in which the second SID can be located in a third network device, 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, the PE2 and the PE3 are dual homing devices of CE 1. The third network device may be configured with a third EVPN instance that belongs to the same EVPN network as the first EVPN instance in the first network device, where the RT of the first EVPN instance matches the RT of the third EVPN instance, e.g., the IRT of the first EVPN instance matches the ERT of the third EVPN instance, or the ERT of the first EVPN instance matches the 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. If the type of the second SID is an end.dx2 type, the second SID may be used 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. If the type of the second SID is end.dt2u type, the second SID may be used to indicate 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. If the type of the second SID is 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.dx2 SID, and the port indicated by the second SID may be one of the at least one AC ports.
After receiving the second message, the first network device may parse the second message to determine a first VLAN identifier carried by the second message from the second message, and then determine a second SID corresponding to the first VLAN identifier according to the first VLAN identifier and a routing forwarding table of the first EVPN instance. The second packet may be a packet sent by the broadband access device (e.g., BRAS1 in fig. 1 and 2) to the user device (e.g., VM1 in fig. 1 and 2), where the second packet may carry at least one layer of VLAN identifier, and the first VLAN identifier is a VLAN identifier located in an innermost layer of the second packet in the at least one layer of VLAN identifier. The first network device may determine, according to matching of the VLAN identifier in the routing forwarding table of the first EVPN instance with the first VLAN identifier, that the second 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.
In this embodiment, taking a plurality of SIDs corresponding to VLAN identifiers matched with a first VLAN identifier in a routing forwarding table of the first EVPN instance as an example, the plurality of SIDs may be located to a plurality of EVPN instances in a plurality of network devices, the plurality of network devices may be located on a plurality of forwarding paths between the first network device and a destination device, the plurality of forwarding paths may include a primary forwarding path and a standby forwarding path, or the plurality of forwarding paths are mutually load sharing paths, and the first network device may determine, from the plurality of SIDs, a second SID corresponding to the first VLAN identifier based on a primary protection policy or a standby protection policy. The first network device determines, based on the ECMP policy, the second SID corresponding to the first VLAN identifier according to the first VLAN identifier carried by the second packet by adopting a per-flow load sharing or per-packet load sharing manner. For the per-flow load sharing manner, the second message and the first message may be messages of different service flows belonging to the same service, for example, the second message and the first message may be messages of two adjacent service flows belonging to the same service; for the 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 the embodiment of the present application. As another example, the second network device may be located on a primary forwarding path between the first network device and the destination device, and the third network device may be located on a standby forwarding path between the first network device and the destination device, where the first network device determines, based on a primary-standby protection policy, the second SID according to a first VLAN identifier carried by the second packet. In the primary-standby protection mode, the first network device preferentially transmits a message to the destination device through a primary forwarding path, and if the primary forwarding path fails, the first network device transmits a message to the destination device through the standby forwarding path. The first network device may determine the primary forwarding path failure, and determine the second SID according to the primary forwarding path failure and a first VLAN identifier carried by the second packet. Wherein the primary forwarding path failure may include at least one device failure in the primary forwarding path or a port failure of at least one device in the primary forwarding path.
Illustratively, the multiple forwarding paths between the first network device and the destination device include a primary forwarding path and a backup forwarding path, and the multiple SIDs corresponding to the VLAN identifier matched to the first VLAN identifier in the routing forwarding table of the first EVPN instance include a primary SID and a backup SID, where in step 701, the first network device determines the primary SID as a first SID corresponding to the first VLAN identifier, and 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 example as shown in table 2, the first VLAN identifier carried by the second packet may be VLAN100, in step 701, the first network device determines that the first SID corresponding to the first VLAN identifier is 1:1, and in step 705, the first network device determines that the second SID corresponding to the first VLAN identifier is 1:3.
Step 706, the first network device sends the second message 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 the 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 packet, and send, through the first EVPN instance in the first network device, a second packet encapsulating the second SID and the IPv6 address of the first network device to a third EVPN instance in the third network device. 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 process of the first network device sending the second message to the third EVPN instance in the third network device according to the second SID may refer to the foregoing step 302, which is not described herein again.
Step 707, the third network device receives, through the third EVPN instance in the third network device, the second packet sent by the first EVPN instance in the first network device.
The second message carries at least one layer of VLAN identifier, and the VLAN identifier of the innermost layer of the second message may be the first VLAN identifier carried by the second message. And the second message also carries a second SID.
Step 708, the third network device forwards the second message 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, according to the second SID, the second message after deleting the first VLAN identifier through a third EVPN instance in the third network device.
Optionally, the second packet received by the third network device further carries tunnel information, and the third network device may parse the received second packet to determine a second SID carried by the second packet from the second packet, delete both the first VLAN identifier and the tunnel information carried in the second packet, and then forward the second packet 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 in which manner to forward the second message (i.e., the second message after deleting the first VLAN identification and the tunnel information) based on the type of the second SID. Optionally, if the type of the second SID is end.dx2 type, the third network device forwards the second message 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 the 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. Specific implementation may refer to step 304 in the embodiment shown in fig. 3, and will not be described herein.
In the third EVPN instance of the third network device, the output port of the second packet (including the port corresponding to the second SID and the port corresponding to the destination address carried by the second packet) may be an AC port of the third EVPN instance, and before executing the packet transmission method provided by the embodiment of the present application, some AC ports of the third EVPN instance may be configured, for example: and for the message entering the third EVPN instance from the AC port, inserting a VLAN identifier at the innermost layer of the message, forwarding the message, and for the message needing to be forwarded from the third EVPN instance through the AC port, deleting the VLAN identifier at the innermost layer of the message, and forwarding the message. In this way, the third network device may delete the first VLAN identifier in the second packet when forwarding the second packet through the third EVPN instance.
In order to facilitate understanding of the embodiment shown in fig. 7, a specific example is described below to describe the message transmission method provided in the embodiment shown in fig. 7. Fig. 8 is a schematic diagram of a message transmission provided in an embodiment of the present application, where a first network device is PE1, a second network device is PE2, a third network device is PE3, and a destination device is VM1. The first SID may be located to EVPN instance 1 in PE2 and the second SID may be located to EVPN instance 1 in PE3, with forwarding path S1 and forwarding path S2 being two forwarding paths between PE1 and VM1, PE2 being on forwarding path S1 and PE3 being on forwarding path S2. Optionally, the forwarding path S1 and the forwarding path S2 are load sharing paths, the PE1 may determine, according to a first VLAN identifier carried by a received first packet, a first SID corresponding to the first VLAN identifier, send, according to the first SID, a first packet (the first packet is forwarded to the PE2 through P1) to an EVPN instance 1 (i.e., the second EVPN instance) in the PE2 through an EVPN instance 1 (i.e., the first EVPN instance) in the PE1, 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 through the CE 1; and the PE1 determines a second SID corresponding to the first VLAN identifier according to a first VLAN identifier carried by the received second message, sends the second message (the second message is forwarded to the PE3 through the P2) to the EVPN instance 1 (namely the third EVPN instance) in the PE3 through the EVPN instance 1 in the PE1 according to the second SID, and the PE3 forwards the second message to the CE1 through the EVPN instance 1 in the PE3 according to the second SID and forwards the second message to the VM1 through the CE 1. Or, the forwarding paths S1 and 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, according to a first VLAN identifier carried by a first packet, a first SID corresponding to the first VLAN identifier, send, according to the first SID, a first packet (the first packet is forwarded to PE2 through P1) to an EVPN instance 1 (that is, the second EVPN instance) in PE2 through an EVPN instance 1 (that is, the first EVPN instance) in the PE1, and the PE2 forwards, according to the first SID, the first packet to CE1 through the EVPN instance 1 in the PE2 and forwards, by the CE1, the first packet to VM1; after that, the PE1 determines that the forwarding path S1 fails, the PE1 determines, according to the first VLAN identifier carried by the second packet, a second SID corresponding to the first VLAN identifier, according to the second SID, sends a second packet to the EVPN instance 1 (that is, the foregoing third EVPN instance) in the PE3 through the EVPN instance 1 in the PE1 (the second packet is forwarded to the PE3 through the P2), 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 through the CE 1.
In summary, in the packet transmission method provided in the 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 the 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 the third network device through the first EVPN instance in the first network device according to the second 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 forwards the second message to the second EVPN instance in the third network device through the 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 for learning the MAC address and the performance requirement of the first network device are reduced, and the processing performance degradation of the control surface of the first network device caused by frequent oscillation of an access side link is avoided.
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, the routing forwarding table of the first EVPN instance in the first network device may be generated first. The procedure for generating the routing forwarding table of the first EVPN instance by the first network device is described below.
Optionally, the communication system further includes an RR, the second network device may send a route of the second EVPN instance in the second network device to the RR, 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 the routing 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, where the first network device generates a forwarding table entry of the routing 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 be Ethernet AD routes, for example, ethernet auto discovery Per EVI routes.
The routing of the second EVPN instance in the second network device may include a first VLAN identification and a first SID. The first network device may generate a forwarding table entry in a routing forwarding table of the first EVPN instance in the first network device based on the first VLAN identification 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, if the ERT of the second EVPN instance matches the IRT of the first EVPN instance, the first network device may introduce the routing of the second EVPN instance into the first EVPN instance, and generate a forwarding table entry in a routing forwarding table of the first EVPN instance according to the first VLAN identification and the first SID. Optionally, the route of the second EVPN instance further includes a route identifier (route distinguisher, RD) for distinguishing the route of the second EVPN instance from routes of other EVPN instances and an ethernet segment identifier (Ethernet segment identifier, ESI) for identifying a connection between an 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 forwarding entries 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 routing of the third EVPN instance in the third network device may include a first VLAN identification and a second SID. The first network device may generate a forwarding table entry in a routing forwarding table of the first EVPN instance in the first network device based on the first VLAN identification 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, the first network device may determine that the ERT of the third EVPN instance matches an IRT of a first EVPN instance in the first network device, if the ERT of the third EVPN instance matches the IRT of the first EVPN instance, the first network device may introduce the routing of the third EVPN instance into the first EVPN instance, and generate a forwarding table entry in a routing forwarding table of the first EVPN instance according to the first VLAN identification and the second SID. Optionally, the route of the third EVPN instance further includes an RD for distinguishing the route of the third EVPN instance from the route of other EVPN instances, and an 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 the CE device (e.g., CE1 in fig. 2), which may be used for horizontal splitting or the like. Illustratively, the first EVPN instance is EVPN instance 1, the first VLAN identification is VLAN100, the second SID is 1:3, and forwarding entries 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 the embodiment of the application, the user access PE device (for example, the second network device and the third network device) does not need to send a MAC route (for example, a type2 route) to the RR, and only needs to send an Ethernet AD route to the RR, so that the RR does not need to reflect the MAC route to the broadband access PE device (for example, the 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, the broadband access device (for example, BRAS) carries, in a packet sent to the user device (for example, VM), a VLAN identifier (for example, the foregoing first VLAN identifier) for determining a corresponding SID, so that the broadband access PE device (for example, the foregoing first network device) can determine, according to the VLAN identifier carried in the packet, the corresponding SID to perform IPv6 forwarding, and the user access PE device (for example, the foregoing second network device and third network device) can forward the packet 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 the embodiment of the present application, a packet sent by a broadband access device to a user device may carry at least one layer of VLAN identifier, where the VLAN identifier (for example, the first VLAN identifier) used for determining the corresponding SID may be a VLAN identifier located at an innermost layer of the packet, and other VLAN identifiers in the packet except for the VLAN identifier used for determining the corresponding SID are sent to the broadband access device when the user device identifies that the user device is on line. In order to facilitate distinguishing VLAN identifiers with different functions, before executing the message transmission method, the positions of the VLAN identifiers used for determining the corresponding SIDs in the message can be respectively configured in the broadband access PE device, the user access PE device and the broadband access device, so that the devices can perform corresponding processing in the message transmission process. Optionally, the VLAN identifier for determining the corresponding SID may also be located at another location of the packet, as long as the broadband access PE device, the user access PE device, and the broadband access device can learn the location, which is not limited in the embodiment of the present application.
In the 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, for a packet entering the 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 the VLAN identifier corresponding to the CE device in the packet (e.g., the innermost layer of the packet) and forward the packet, and for a packet to be sent from the 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 packet (e.g., the innermost layer of the packet) and forwards the packet. 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) respectively, so that, for a packet entering into EVPN instance 1 from an AC port connected to CE1 in EVPN instance 1 in PE2, PE2 may insert VLAN100 into the packet and forward the packet, and for a packet to be sent from an AC port connected to CE1 in EVPN instance 1 in PE2, 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 into the message and forward the message, and for a message needing 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. The same is true for the PE3, and the embodiments of the present application are not described herein.
In the embodiment of the present application, the VLAN identifier corresponding to each CE device (i.e., the VLAN identifier set for the CE device) may indicate the VLAN in which the CE device is located; alternatively, the VLAN identifier corresponding to each CE device is not used to indicate the VLAN in which the CE device is located, but is merely used by the network device (e.g., broadband access PE device) to determine the corresponding SID for forwarding the message. It can be seen that, the message 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 it is not necessarily required to carry a VLAN identifier (e.g., the 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 device is identified and put on line according to the message carrying the two-layer VLAN identifier (e.g. UVLAN and SVLAN) from the user device. Therefore, the embodiment of the application realizes the IPv6 forwarding of the network equipment based on carrying VLAN identification in the message sent to the user equipment by the broadband access equipment, thus the technical scheme of the application can be realized without changing the hardware and/or software processing capability of the broadband access equipment.
The foregoing embodiments shown in fig. 3 and fig. 4 are used to describe a message transmission method provided in the embodiments of the present application by taking a downlink message (for example, a message 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 scheme for transmitting an uplink message (for example, a message sent by a user device to a broadband access device), hereinafter, with reference to the accompanying drawings, description will be made by taking, as an example, transmitting an uplink message from VM1 to BRAS1 shown in fig. 2, and transmitting a downlink message from BRAS1 to VM1, and in the following embodiments, description will be made by taking a VLAN identifier for determining that a VLAN identifier of a corresponding SID is located at the innermost layer of a message as an example.
Fig. 9 is a flowchart of another message transmission method according to an embodiment of the present application, and fig. 10 is a schematic diagram of the message transmission method according to the embodiment of the present application. Fig. 9 and fig. 10 illustrate that the message transmission method is applied to the EVPN network shown in fig. 2, and illustrate that the VM1 transmits an uplink message to the BRAS 1. In fig. 10, only the devices associated with this message transmission in the EVPN network are shown for clarity of the drawing. As shown in fig. 9 and 10, the method includes:
in step 901, VM1 sends a message 1 to CE1, where the message 1 carries a two-layer VLAN identifier, a source address, and a destination address.
As shown in fig. 10, the two-layer VLAN identifiers carried in the packet 1 are UVLAN and SVLAN, the source address of the packet 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 packet 1 to PE 2.
Illustratively, the CE1 may forward the message 1 to the PE2 based on a load balancing policy.
Step 903, the PE2 inserts a VLAN identifier in the innermost layer of the packet 1, and encapsulates the tunnel information.
The message 1 forwarded by the CE1 can enter the EVPN example 1 through an AC port of the EVPN example 1 in the PE2, the PE2 can insert a VLAN identifier corresponding to the CE1 at the innermost layer of the message 1 according to the configuration of the AC port, tunnel information of a tunnel between the PE2 and the PE1 is packaged in the message 1, and the obtained message carries three layers of VLAN identifiers, a source address and a destination address and is packaged with the tunnel information.
As shown in fig. 10, PE2 inserts VLAN100 in the innermost layer of the packet 1, and encapsulates tunnel information in the packet 1. The VLAN100 may be a VLAN identifier corresponding to the CE1, where the VLAN100 is a VLAN identifier configured for the CE 1. The tunnel information includes 1:1 and 2:1.
Step 904, the PE2 forwards, to the EVPN instance 1 in the PE1, the message 1 carrying the three-layer VLAN identifier, the source address, the destination address, and the tunnel information encapsulated through the EVPN instance 1 in the PE 2.
As shown in fig. 10, PE2 forwards, to EVPN instance 1 in PE1, a packet 1 carrying a three-layer VLAN identifier, a source address, a destination address, and tunnel information encapsulated, through EVPN instance 1 in the PE 2. The three layers of VLAN identifications are VLAN100, UVLan and SVLAN respectively, 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. The message 1 may be forwarded via P1 to PE1.
In step 905, the PE1 strips the tunnel information in the packet 1.
As shown in FIG. 10, PE1 strips 1:1 and 2:1 in message 1.
Step 906, the PE1 forwards the message 1 stripped of the tunnel information to the BRAS1 through the EVPN instance 1 in the PE1 according to the destination address carried in the message 1.
The PE1 can determine the output port of the message 1 by searching the routing forwarding table of the EVPN example 1 of the PE1 according to the destination address 0-5-1 carried by the message 1, and forward the message 1 with the tunnel information stripped to the BRAS1 through the output port of the message 1.
Step 907, the BRAS1 identifies and goes on line to the VM1 according to the two-layer VLAN identifier of the outermost layer of the message 1, and records the VLAN identifier of the innermost layer of the message 1 for the VM 1.
For example, two-layer VLAN identifiers of the outermost layer of the message 1 received by the BRAS1 are SVLAN and UVLANs, 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 UVLANs, so as to identify the VM1 to be online. The BRAS1 may store the source address (1-1-1) carried in the packet 1 and the VLAN identifier (VLAN 100) of the innermost layer in an associated manner, so as to record, for the VM1, the VLAN identifier of the innermost layer of the packet 1, for example, the BRAS1 records the correspondence between 1-1-1 carried in the packet 1 and the VLAN 100.
Fig. 11 is a flowchart of another message transmission method according to an embodiment of the present application, and fig. 12 is a schematic diagram of the message transmission method according to the embodiment of the present application. Fig. 11 and fig. 12 illustrate that the message transmission method is applied to the EVPN network shown in fig. 2, and illustrate that the BRAS1 transmits a downlink message to the VM 1. In fig. 12, only the devices associated with this message transmission in the EVPN network are shown for clarity of the drawing. As shown in fig. 11 and 12, the method includes:
step 1101, the BRAS1 sends a message 2 to the PE1, where the message 1 carries a three-layer VLAN identifier, a source address and a destination address.
As shown in fig. 12, three layers of VLAN identifiers carried in the message 2 are respectively VLAN100, UVLAN and SVLAN, VLAN100 is the VLAN identifier of the innermost layer of the message 2, 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 identifier according to the innermost VLAN identifier of message 2, and encapsulates the tunnel information.
For example, according to the forwarding model configured in the EVPN instance 1 in the PE1, the PE1 determines 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, encapsulates the tunnel information of the tunnel between the PE1 and the PE2 in the packet 2, and the obtained packet carries the three-layer VLAN identifier, the source address, the destination address and encapsulates the tunnel information.
Illustratively, PE1 determines from the VLAN forwarding table of EVPN instance 1 in PE1 that the SID corresponding to VLAN100 is 1:1. As shown in FIG. 12, the tunnel information encapsulated in this message 2 by PE1 includes 2:1 and 1:1.
Step 1103, the PE1 forwards the packet 2 encapsulated with the tunnel information to the EVPN instance 1 in the PE2 through the EVPN instance 1 in the PE 1.
As shown in fig. 12, the PE1 forwards the message 2 encapsulated with the tunnel information, which includes 2::1 and 1::1, to the EVPN instance 1 in the PE2 through the EVPN instance 1 in the PE 1. The message 2 may be forwarded via P1 to PE2.
Step 1104, the PE2 forwards the message 2 stripped of the tunnel information and the VLAN identifier of the innermost layer to the CE1 through the EVPN instance 1 in the PE2 according to the destination SID of the message 2.
As shown in FIG. 12, 1:1 (i.e., the destination SID) in the message 2 may be an END.DX2 SID or an END.DT2U SID. If 1:1 in the message 2 is END.DX2 SID, the PE2 strips the tunnel information (comprising 2:1 and 1:1) in the message 2, determines the exit port of the message 2 in the EVPN example 1 of the PE2 according to the 1:1, strips the VLAN identifier 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 stripped tunnel information and the VLAN identifier of the innermost layer to the CE1 through the exit port of the message 2. If 1:1 (i.e. destination SID) in the message 2 is END.DT2U SID, the PE2 strips tunnel information (comprising 2:1 and 1:1) in the message 2, determines an output port of the message 2 by searching a routing forwarding table of an EVPN example 1 of the PE2 according to a destination address 1-1-1 carried in the message 2, strips VLAN identification of the innermost layer of the message 2 according to configuration information of the output port of the message 2, and forwards the message 2 with the stripped tunnel information and VLAN identification of the innermost layer to the CE1 through the output port of the message 2.
In step 1105, the CE1 forwards the message 2 stripped of the tunnel information and the innermost VLAN identifier to the VM1 according to the destination address carried in the message 2.
As shown in fig. 12, CE1 determines an output port of a message 2 by looking up a routing forwarding table of the CE1 according to a destination address 1-1-1 carried by the message 2, and forwards the message 2, from which the tunnel information and the innermost VLAN identifier are stripped, to VM1 through the output port of the message 2.
It should be noted that, the technical solution provided by the present application can be applied to network scenarios such as SRv6-BT or SRv6-Policy, and the above embodiments and the accompanying drawings take SRv6-BT scenarios as examples to describe the technical solution of the present application, but this should not be construed or understood as limiting the technical solution of the present application, and when the technical solution provided by the present application is applied to other network scenarios such as SRv6-Policy, the format of the message and the position of the destination SID in the message may refer to the message format and the position of the destination SID in the corresponding network scenario (e.g. SRv6-Policy network scenario), which is not repeated herein.
The following describes embodiments of the apparatus of the present application which may be used to perform the method of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Referring to fig. 13, a schematic logic structure diagram 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:
a determining module 1310, configured to determine, according to a first VLAN identifier carried in the received first packet, a first SID corresponding to the first VLAN identifier. The functional implementation of the determining module 1310 may refer to the relevant description of step 301 and step 701 above.
A sending module 1320, configured to send, according to the first SID, the first packet to a second EVPN instance in a second network device through the first EVPN instance in the first network device 1300. The functional implementation of this transmitting module 1320 may refer to the relevant description of step 302 and step 702 above.
Optionally, the determining module 1310 is specifically configured to determine, according to the first VLAN identifier and the routing forwarding table of the first EVPN instance, a first SID corresponding to the first VLAN identifier.
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 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 includes:
a receiving module 1330, configured to, before the determining module 1310 determines, according to a first VLAN identifier carried in the received first packet, a first SID corresponding to the first VLAN identifier, receive 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 is configured to generate 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 routing of the second EVPN instance.
Optionally, the sending module 1320 is specifically configured to: encapsulating the first SID in a first message; the first message encapsulating the first SID is sent by a first EVPN instance in the first network device 1300 to a second EVPN instance in the second network device.
Optionally, the communication system further comprises a third network device, the third network device and the second network device being dual homing devices of the same device,
the determining module 1310 is further configured to determine, according to a first VLAN identifier carried in the received second packet, a second SID corresponding to the first VLAN identifier. The functional implementation of the determination module 1310 may also refer to the relevant description of step 705 above.
The sending module 1320 is further configured to 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. The functional implementation of the transmitting module 1320 may also refer to the relevant description of step 706 above.
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 a VLAN identifier located in an innermost layer of the first packet in the at least one layer of VLAN identifier.
In summary, according to the technical solution provided in the 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 the 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 device through the second EVPN instance in the second network device according to the first SID. Therefore, the first network equipment forwards the message to the second network equipment through the tunnel between the first EVPN instance in the first network equipment and the second EVPN instance in the second network equipment according to the first SID, the first network equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment, the pressure of the first network equipment for learning the MAC address and the performance requirement on the first network equipment are reduced, and the processing performance reduction of the control surface of the first network equipment caused by frequent oscillation of an access side link is avoided.
Referring to fig. 14, a schematic logic structure diagram of a second network device 1400 according to 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 functional implementation of the receiving module 1410 may refer to the relevant description of step 303 and step 703 above.
And a forwarding module 1420, configured to forward the first packet through the second EVPN instance according to the first SID. The functional implementation of this forwarding module 1420 may be described with reference to the above-mentioned steps 304 and 704.
Optionally, the type of the first SID is one of an end.dx2 type or an end.dt2u type.
Optionally, forwarding module 1420 is specifically configured to: if the type of the first SID is the 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 the 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 the address and the port identifier, and the port identifier indicates the port corresponding to the address.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is a VLAN identifier located in an innermost layer of the first packet in the at least one layer of VLAN identifier.
Optionally, forwarding module 1420 is specifically configured to: deleting the first VLAN identifier from the first message; and forwarding the first message with the first VLAN identifier deleted 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, a 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 identifier and the first SID.
In summary, according to the technical solution provided in the 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 the 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 device through the second EVPN instance in the second network device according to the first SID. Therefore, the first network equipment forwards the message to the second network equipment through the tunnel between the first EVPN instance in the first network equipment and the second EVPN instance in the second network equipment according to the first SID, the first network equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment, the pressure of the first network equipment for learning the MAC address and the performance requirement on the first network equipment are reduced, and the processing performance reduction of the control surface of the first network equipment caused by frequent oscillation of an access side link is avoided.
It should be appreciated that the network device provided by embodiments of the present application may also be implemented as an application-specific integrated circuit (ASIC), a programmable logic device (programmable logic device, PLD), which may be a complex program logic device (complex programmable logical device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), general-purpose array logic (generic array logic, GAL), or any combination thereof. The message transmission method provided by the method embodiment can also be implemented by software, and when the message transmission method provided by the method embodiment is implemented by software, each module in the network device can also be a software module.
Referring to fig. 15, a schematic hardware structure of a network device 1500 according to 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 above embodiment, and the network device 1500 may be a PE device. As shown in fig. 15, the network device 1500 includes: a master board 1510, an interface board 1530, and an interface board 1540. In the case of multiple interface boards, a switching fabric (not shown) may be included, which is used to complete the data exchange between the interface boards (also called line cards or service boards).
The main control board 1510 is used for performing functions such as system management, equipment maintenance, protocol processing, etc. The interface boards 1530 and 1540 are for providing various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.), and implementing message forwarding. The main control board 1510 has 3 types of functional units: 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 back board by a system bus to realize 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 the central processing unit (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 of the EVPN instance (including a MAC forwarding table and/or a VLAN forwarding table, etc.), and the processor 1531 determines, by looking up the routing forwarding table of the EVPN instance stored in the memory 1532, a SID corresponding to the VLAN identifier carried by the packet to forward the packet.
The interface board 1530 includes one or more network interfaces 1533 for receiving and forwarding a packet, and the processor 1531 determines the SID corresponding to the VLAN identifier carried by the packet according to the VLAN identifier carried by the packet received by the network interface 1533. The specific implementation process is not described here in detail. The specific functions of the processor 1531 are also not repeated here.
It will be appreciated that, as shown in fig. 15, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, under which the operations on the interface board 1540 are substantially similar to those of the interface board 1530, and for brevity, a description is omitted. Furthermore, it is understood that the processor 1531 of the interface board 1530 and/or the processor 1541 of the interface board 1540 of fig. 15 may be dedicated hardware or chips, such as network processors or application specific integrated circuits, to implement the above functions, which is a so-called forwarding plane processing manner using dedicated hardware or chips. In other embodiments, the processor 1531 in the interface board 1530 and/or the processor 1541 in the interface board 1540 may also employ a general-purpose processor, such as a general-purpose CPU, to implement the functions described above.
In addition, it should be noted that the master control board may have one or more pieces, and the master control board may include a main master control board and a standby master control board when there are more pieces. The interface boards may have one or more blocks, the more data processing capabilities the network device is, the more interface boards are provided. Under the condition of a plurality of interface boards, the interface boards can communicate through one or a plurality of exchange network boards, and load sharing redundancy backup can be realized jointly when a plurality of interface boards exist. Under the centralized forwarding architecture, the network device does not need a switching network board, and the 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 a switching network board, so that high-capacity data exchange and processing capacity are provided. Therefore, the data access and processing power of the network devices of the distributed architecture is greater than that of the devices of the centralized architecture. The specific architecture employed is not limited in any way herein, depending on the specific networking deployment scenario.
In particular embodiments, memory 1532 may be, but is not limited to, read-only Memory (ROM) or other type of static storage device that can store static information and instructions, random access Memory (random access Memory, RAM) or other type of dynamic storage device that can store information and instructions, but may also be electrically erasable programmable read-only Memory (EEPROM), compact disc read-only Memory (compact disc read-only Memory) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), 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. The memory 1532 may be independent and coupled to the processor 1531 via a communication bus. Memory 1532 may also be integrated with processor 1531.
The memory 1532 is configured to store program codes and is controlled to be executed by the processor 1531 to perform part or all of the steps of the message transmission method provided in the above embodiment. The processor 1531 is configured 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 14 described above.
In particular embodiments, the network interface 1533 may be a device that uses any type of transceiver for communicating with other devices or communication networks, such as ethernet, radio access network (radio access network, RAN), wireless local area network (wireless local area networks, WLAN), etc.
Referring to fig. 16, a schematic hardware structure of another network device 1600 provided in an embodiment of the present application is shown, where the network device 1600 may be the first network device or the 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 via the bus 1608. The connection between the processor 1602, the memory 1604 and the communication interface 1606 shown in fig. 16 is merely exemplary, and in the implementation, the processor 1602, the memory 1604 and the communication interface 1606 may be communicatively connected to each other by other connection means besides the bus 1608.
The memory 1604 may be used to store a computer program 16042, which computer program 16042 may include instructions and data, among other things. In an embodiment of the application, the memory 1604 may be various types of storage media, such as RAM, ROM, nonvolatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (electrically erasable PROM, EEPROM), flash memory, optical memory, registers, and so forth. Also, the storage 1604 may include a hard disk and/or memory.
Wherein the processor 1602 may be a general-purpose processor, which 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 steps and/or operations described above. The stored computer program may be executed, for example, to implement the functions associated with the determination module 1310 and the generation module 1340 described above. A general purpose processor may be, for example, but is not limited to, a CPU. Further, the processor 1602 may also be a special purpose processor, which may be a specially designed processor for performing certain steps and/or operations, such as, but not limited to, a digital signal processor (digital signal processor, DSP), ASIC, FPGA, etc. Further, the processor 1602 may also be a combination of processors, such as a multi-core processor. The processor 1602 may include at least one circuit to perform all or part of the steps of the method of providing message transmission of the above-described embodiments.
Among other things, communication interface 1606 may include input/output (I/O) interfaces, physical interfaces, logical interfaces, and the like for implementing device interconnection within network device 1600, as well as interfaces for implementing 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 interconnection of the network device 1600 with other devices (e.g., network devices or user devices), and the logical interface is an interface internal to the network device 1600 that may be used to implement device interconnection internal to the network device 1600. It is to be readily appreciated that communication interface 1606 may be used for network device 1600 to communicate with other network devices and/or user devices, e.g., communication interface 1606 may be used for transmission and reception of messages between network device 1600 and other network devices, and that communication interface 1606 may implement the functions associated with transmission module 1320, reception module 1330, reception module 1410, forwarding module 1420, and transmission module 1430 described above. The communication interface 1606 may also include a transceiver that may also perform the functions associated with the aforementioned transmit module 1320, receive module 1330, receive module 1410, forwarding module 1420, and transmit module 1430.
Wherein the bus 1608 may be any type of communication bus, such as a system bus, that interconnects the processor 1602, the memory 1604, and the communication interface 1606.
The above devices may be provided on separate chips, or may be provided at least partially or entirely on the same chip. Whether the individual devices are independently disposed on different chips or integrally disposed on one or more chips is often dependent on the needs of the product design. The embodiment of the application does not limit the specific implementation form of the device.
The network device 1600 shown in fig. 16 is merely exemplary, and in implementation, the network device 1600 may also include other components, which are not listed herein. The network device 1600 shown in fig. 16 may transmit a message by performing all or part of the steps of the method for providing message transmission according to the above embodiment.
Referring to fig. 17, a schematic 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 may be a broadband access PE device, and a second network device 1720, which may 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 through the first EVPN instance in the first network device 1710;
the second network device 1720 is configured to forward the first message over the second EVPN instance according to the first SID.
Optionally, the first network device 1710 is specifically configured to determine, according to the first VLAN identifier and the routing forwarding table of the first EVPN instance, a first SID corresponding to the first VLAN identifier.
Optionally, the first network device 1710 is specifically configured to: according to the VLAN identifier in the routing forwarding table of the first EVPN instance being matched with the first VLAN identifier, 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, wherein the routing forwarding table of the first EVPN instance is used for recording the 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.
Optionally, with continued reference to fig. 17, the communication system 1700 further includes: RR 1740;
the second network device 1720 is also configured to send a route of a second EVPN instance in the second network device 1720 to the RR 1740, the route of the second EVPN instance including the first VLAN identification and the first SID;
the RR 1740 is for sending 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 table entry in a routing forwarding table of the first EVPN instance according to the first VLAN identification and the first SID in the routing of the second EVPN instance.
Optionally, the first network device 1710 is specifically configured to: the first SID is encapsulated in a first message, which is sent by a first EVPN instance in the first network device 1710 to a second EVPN instance in the second network device 1720.
Optionally, with continued reference to fig. 17, the communication system 1700 further includes: a third network device 1730, the third network device 1730 may be a user access PE device, the third network device 1730 and the second network device 1720 being dual-homing devices of the same device;
the first network device 1710 is further configured to determine, according to a 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 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 first SID is one of an end.dx2 type or an end.dt2u type, and 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 the 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 the 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 the address and the port identifier, and the port identifier indicates the port corresponding to the address.
Optionally, the first packet carries at least one layer of VLAN identifier, where the first VLAN identifier is a VLAN identifier located in an innermost layer of the first packet in the at least one layer of VLAN identifier.
Optionally, the second network device 1720 is specifically configured to: deleting the first VLAN identifier from the first message, and forwarding the first message with the first VLAN identifier deleted through the second EVPN instance according to the first SID.
In summary, according to the technical solution provided in the 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 the 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 device through the second EVPN instance in the second network device according to the first SID. Therefore, the first network equipment forwards the message to the second network equipment through the tunnel between the first EVPN instance in the first network equipment and the second EVPN instance in the second network equipment according to the first SID, the first network equipment can forward the message sent to the user equipment without learning the MAC address of the user equipment, the pressure of the first network equipment for learning the MAC address and the performance requirement on the first network equipment are reduced, and the processing performance reduction of the control surface of the first network equipment caused by frequent oscillation of an access side link is avoided.
The embodiment of the application provides a communication system, which comprises a first network device and a second network device, wherein 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 a network device 1500 as shown in fig. 15; alternatively, at least one of the first network device and the second network device is a network device 1600 as shown in fig. 16. Optionally, the first network device and the second network device are both PE devices.
Embodiments of the present application provide a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements all or part of the steps of a message transmission method as provided by the method embodiments described above.
Embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform all or part of the steps of a message transmission method as provided by the method embodiments described above.
The embodiment of the application provides a chip, which comprises a programmable logic circuit and/or program instructions and is used for realizing all or part of the steps of the message transmission method provided by the embodiment of the method when the chip runs.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be embodied 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, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a network of computers, or other programmable devices. The computer instructions may be stored in or transmitted from one computer readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more servers, data centers, etc. that can be 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), etc.
In the present application, "/" means or, and unless otherwise indicated, for example, A/B may mean A or B. The term "and/or" is merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, for the purposes of clarity, the words "first," "second," "third," and the like are used herein to distinguish between identical or similar items that have substantially the same function and effect, and those skilled in the art will recognize that the words "first," "second," "third," and the like do not limit the amount or order of execution, nor should they be construed as indicating or implying relative importance.
Different types of embodiments, such as a method embodiment and a device embodiment, provided by the embodiment of the present application may be referred to each other, and the embodiment of the present application is not limited to this. The sequence of the operations of the method embodiment provided by the embodiment of the application can be properly adjusted, the operations can also be increased or decreased according to the situation, and any method which is easily conceivable to be changed by a person skilled in the art within the technical scope of the disclosure of the application is covered in the protection scope of the application, so that the description is omitted.
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 structural means. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units illustrated as separate components may or may not be physically separate, and the components described as units may or may not be physical units, may be located in one place, or may be distributed over multiple network devices (e.g., terminal devices). Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
While the application has been described with reference to exemplary embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made without departing from the spirit and scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (22)

1. A method for transmitting a message, wherein the method is applied to a system including a first network device and a second network device, the method comprising:
the first network device determines a first segment identification SID corresponding to a first VLAN identification according to a first VLAN identification carried in a received first message and a routing forwarding table of a first Ethernet Virtual Private Network (EVPN) instance in the first network device, 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 the first VLAN identification is matched with the VLAN identification in the routing forwarding table of the first EVPN instance;
the first network device encapsulates the first SID in the first message;
the first network device sends the first message encapsulated with the first SID to a second EVPN instance in the second network device through the first EVPN instance in the first network device.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the first network device determining the first SID corresponding to the first VLAN identifier according to the first VLAN identifier carried in the first packet and a routing forwarding table of the first EVPN instance of the first network device, including:
The first network device determines 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 VLAN identifier matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance, and each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
3. The method of claim 2, wherein the system further comprises: the route reflector RR is used to route the data to the data,
before the first network device determines the first SID corresponding to the first VLAN identifier according to the first VLAN identifier carried in the first packet and a routing forwarding table of the first EVPN instance of the first network device, 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, where the route of the second EVPN instance includes 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 routing of the second EVPN instance.
4. A method according to any one of claims 1 to 3, wherein the system further comprises a third network device, the third network device and the second network device being dual homing devices of the same device, the method further comprising:
the first network equipment determines a second SID corresponding to the first VLAN identifier according to the first VLAN identifier 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.
5. The method according to any one of claim 1 to 4, wherein,
the type of the first SID is one of an end.dx2 type or an end.dt2u type.
6. The method according to any one of claim 1 to 5, wherein,
the first message carries at least one layer of VLAN identifier, and the first VLAN identifier is the VLAN identifier positioned at the innermost layer of the first message in the at least one layer of VLAN identifier.
7. A communication system, the system comprising a first network device and a second network device;
the first network device is configured to: determining a first segment identifier SID corresponding to the first VLAN identifier according to a first VLAN identifier carried in a received first message and a routing forwarding table of a first Ethernet Virtual Private Network (EVPN) instance in the first network equipment, encapsulating the first SID in the first message, and sending the first message encapsulated with the first SID to a second EVPN instance in the second network equipment through the first EVPN instance in the first network equipment, 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 the first VLAN identifier is matched with the VLAN identifier in the routing forwarding table of the first EVPN instance;
And the second network equipment is used for forwarding the first message through the second EVPN instance according to the first SID.
8. The system of claim 7, wherein the system further comprises a controller configured to control the controller,
the first network device is specifically configured to: according to the VLAN identifier in the routing forwarding table of the first EVPN instance being matched with the first VLAN identifier, 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, wherein each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
9. The system of claim 8, wherein the system further comprises: a routing reflector RR;
the second network device is further configured to send, to the RR, a route of the second EVPN instance in the second network device, where the route of the second EVPN instance includes the first VLAN identification 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 identification and the first SID in the routing of the second EVPN instance.
10. The system of any of claims 7 to 9, further comprising a third network device, the third network device and the second network device being dual homing 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 used for forwarding the second message through the third EVPN instance according to the second SID.
11. The system according to any one of claims 8 to 10, wherein,
the type of the first SID is one of an end.dx2 type or an end.dt2u type.
12. The system of claim 11, wherein the system further comprises a controller configured to control the controller,
the second network device is specifically configured to:
if the type of the first SID is the 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 the END.DT2U type, forwarding the first message according to the first SID and a routing forwarding table of the second EVPN instance, wherein the corresponding relation between an address and a port identifier is recorded in the routing forwarding table of the second EVPN instance, and the port identifier indicates a port corresponding to the address.
13. The system according to any one of claims 7 to 12, wherein,
the first message carries at least one layer of VLAN identifier, and the first VLAN identifier is the VLAN identifier positioned at the innermost layer of the first message in the at least one layer of VLAN identifier.
14. The system according to any one of claims 7 to 13, wherein,
the second network device is specifically configured to: deleting the first VLAN identifier from the first message, and forwarding the first message with the first VLAN identifier deleted through the second EVPN instance according to the first SID.
15. A first network device, wherein the first network device is located in a communication system that further includes a second network device, the first network device comprising:
a determining module, configured to determine a first segment identifier SID corresponding to a first VLAN identifier according to a first VLAN identifier carried in a received first packet and a routing forwarding table of a first ethernet virtual private network EVPN instance in the first network device, where the routing forwarding table of the first EVPN instance is used to record a correspondence between the VLAN identifier and the SID, and the first VLAN identifier is matched with a VLAN identifier in the routing forwarding table of the first EVPN instance;
A sending module, configured to: and encapsulating the first SID in the first message, and transmitting the first message encapsulated with the first SID to a second EVPN instance in the second network device through the first EVPN instance in the first network device.
16. The first network device of claim 15, wherein the first network device,
the determining module is specifically configured to determine, according to matching of a VLAN identifier in a routing forwarding table of the first EVPN instance with the first VLAN identifier, that the first SID corresponding to the first VLAN identifier is one of at least one SID corresponding to a VLAN identifier matched with the first VLAN identifier in the routing forwarding table of the first EVPN instance, where each VLAN identifier in the routing forwarding table of the first EVPN instance corresponds to one or more SIDs.
17. The first network device of claim 16, wherein the system further comprises: the routing reflector RR, the first network device further comprises:
a receiving module, configured to receive, before the determining module determines, according to the first VLAN identifier carried in the first packet and a routing forwarding table of the first EVPN instance of the first network device, 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;
And the generating module is used for generating a forwarding table entry in a routing forwarding table of the first EVPN example according to the first VLAN identifier and the first SID in the routing of the second EVPN example.
18. The first network device of any of claims 15 to 17, wherein the system further comprises: a third network device, the third network device and the second network device being dual homing 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, 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.
19. The first network device according to any one of claims 15 to 18, wherein,
the type of the first SID is one of an end.dx2 type or an end.dt2u type.
20. The first network device of any one of claims 15 to 19, wherein,
the first message carries at least one layer of VLAN identifier, and the first VLAN identifier is the VLAN identifier positioned at the innermost layer of the first message in the at least one layer of VLAN identifier.
21. 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 6.
22. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, which computer program, when being executed by a processor, implements the message transmission method according to any one of claims 1 to 6.
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 CN114760248A (en) 2022-07-15
CN114760248B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116436729B (en) * 2023-06-08 2023-09-08 武汉绿色网络信息服务有限责任公司 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 (6)

* 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 ; Verizon ; J. Rabadan ; .(PBB-)EVPN Seamless Integration with (PBB-)VPLS amp *
A. Sajassi, Ed. ; S. Salam ; Cisco ; N. Del Regno ; Verizon ; J. Rabadan ; Nokia ; .Seamless Integration of Ethernet VPN (EVPN) with Virtual Private LAN Service (VPLS) andTheir Provider Backbone Bridge (PBB) Equivalents.IETF .2019,第1-5页. *
amp ; lt ; /a amp ; amp ; gt ; .IETF .2018,第1-3页. *
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 *
Y. Wang ; ZTE Corporation ; .Reduction of EVPN C-MAC Overloaddraft-wang-bess-evpn-cmac-overload-reduction-01.IETF .2020,第1-14页. *

Also Published As

Publication number Publication date
CN114760248A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
US11463279B2 (en) Method and apparatus for implementing a flexible virtual local area network
US10333836B2 (en) Convergence for EVPN multi-homed networks
CN103200069B (en) A kind of method and apparatus of Message processing
US8948181B2 (en) System and method for optimizing next-hop table space in a dual-homed network environment
US9397943B2 (en) Configuring virtual media access control addresses for virtual machines
US20230300070A1 (en) Packet Sending Method, Device, and System
EP3197107B1 (en) Message transmission method and apparatus
US20130100858A1 (en) Distributed switch systems in a trill network
US20060123204A1 (en) Method and system for shared input/output adapter in logically partitioned data processing system
WO2018058639A1 (en) Pseudo wire load sharing method and apparatus
US20230216786A1 (en) Method for forwarding service packet, method for sending sr policy, device, and system
US20240048479A1 (en) Packet Forwarding Method and Apparatus, Network Device, and Storage Medium
EP4020905A1 (en) Packet transmission method, device, and system
CN114760248B (en) Message transmission method, device and system
US20220078046A1 (en) Data Transmission Method, Apparatus, and Network Device
WO2022007702A1 (en) Message processing method and network device
EP4020904B1 (en) Packet transmission method, device, and system
EP3913865B1 (en) Message decapsulation method and device, message encapsulation method and device, electronic device, and storage medium
CN115473765A (en) Message transmission method, device and system
CN113542112B (en) Message forwarding method and network equipment
CN115242699A (en) Message transmission method, slice generation method, device and system
CN115065660B (en) ARP (Address resolution protocol) answering substituting optimization method
CN113992573B (en) Method and device for forwarding BUM (building information management) flow, PE (provider edge) equipment and storage medium
WO2024032062A1 (en) Data message processing method and apparatus, and storage medium and electronic apparatus
CN118101670A (en) Message mirroring 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