Message transmission method, device and system

By establishing a relationship between VPLS instances and VPWS instances, the problem of high MAC address learning pressure for PE devices in EVPN networks is solved, MAC table entries are simplified, and packet forwarding performance is improved.

CN114760165BActive Publication Date: 2024-10-11HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011566608.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2024-10-11
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

In Ethernet Virtual Private Network (EVPN) networks, PE devices need to learn a large number of MAC addresses, resulting in complex MAC table entries and affecting the packet forwarding performance of the network system.

Method used

By establishing an association between VPLS instances and VPWS instances, VPLS instances can directly forward packets through the associated VPWS instances without needing to learn the MAC addresses of user-side devices, thus simplifying MAC entry management.

Benefits of technology

This reduces the burden on PE devices to learn MAC addresses, simplifies MAC table entries, and improves the packet forwarding performance of the network system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114760165B_ABST
    Figure CN114760165B_ABST
Patent Text Reader

Abstract

A message transmission method, device and system belong to the field of network technology. The system includes a first network device in a VPLS network and a second network device in a VPWS network. The first network device receives a message sent to a user-side device connected to the second network device through a first VPLS instance in the first network device, determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance in the first network device, and forwards the message to the second VPWS instance in the second network device through the first VPWS instance. By associating the VPLS instance and the VPWS instance on the first network device, the message sent to the user-side device received through the VPLS instance can be forwarded through the associated VPWS instance, reducing the pressure on the first network device to learn MAC addresses for message transmission, and ensuring the forwarding performance of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a message transmission method, device and system. Background Art

[0002] In a traditional layer 2 virtual private network (L2VPN) network, different provider edge (PE) devices can be configured to be connected through a virtual leased line pseudo wire (VLL PW). Different PE devices forward messages through the VLL PW between different PE devices, reducing the pressure on PE devices to learn media access control (MAC) addresses.

[0003] Traditional L2VPN networks can reduce the pressure on PE devices in the network to learn MAC addresses due to the characteristics of VLL PW. However, with the development of technology, various telecommunications services are currently evolving towards Ethernet virtual private network (EVPN) solutions. Since EVPN signaling cannot support VLL PW, PE devices in current EVPN networks need to learn MAC addresses to forward packets. This results in greater pressure on PE devices to learn MAC addresses, and the MAC table entries in PE devices are complex, which can easily affect the packet forwarding performance of the network system. Summary of the invention

[0004] The present application provides a message transmission method, device and system, which can reduce the pressure of network devices to learn MAC addresses, simplify the MAC table entries of network devices, and help ensure the message forwarding performance of the network system including the network device. The technical solution of the present application is as follows:

[0005] In a first aspect, a message transmission method is provided, which is applied to a system including a first network device and a second network device, wherein the first network device is a device in a virtual private lan service (VPLS) network, and the second network device is a device in a virtual private wire service (VPWS) network, and the method comprises: the first network device receives a first message through a first VPLS instance in the first network device, wherein the first message is a message sent to a first user side device connected to the second network device; the first network device determines the first VPWS instance according to an association relationship between the first VPLS instance and the first VPWS instance in the first network device; the first network device forwards the first message to the second VPWS instance in the second network device through the first VPWS instance, wherein the first VPWS instance and the second VPWS instance are VPWS instances for carrying the same service. The first user side device may be a user device on the first user side or a network device on the first user side.

[0006] For example, the first network device forwards the first message to the second VPWS instance in the second network device according to the routing forwarding table of the first VPWS instance. The routing forwarding table of the first VPWS instance described here may be an association forwarding table of the first VPWS instance, and the routing forwarding table of the first VPWS instance may be used to record the correspondence between the port identifier and the association indication information, the port identifier is used to indicate the port corresponding to the corresponding association indication information in the first VPWS instance, and the association indication information is used to instruct the remote device of the first network device (for example, the second network device) to determine the VPWS instance corresponding to the first VPWS instance (for example, the second VPWS instance). By way of example, the association indication information may be an identifier of a virtual private network (VPN) service carried in the VPWS instance in the remote device. For example, in a multi-protocol label switching (MPLS) network, the association indication information may be a VPN service label. In a segment routing internet protocol version 6 (SRv6) network, the association indication information may be a segment identifier (SID) of the VPN service.

[0007] The technical solution provided by the present application is that a first VPLS instance in a first network device is associated with a first VPWS instance in the first network device, thereby enabling the first VPLS instance and the first VPWS instance to be connected in the first network device. After the first network device receives a first message sent to a first user-side device connected to the second network device through the first VPLS instance, the first network device can forward the first message to the second VPWS instance in the second network device through the first VPWS instance associated with the first VPLS instance, so that the first network device can forward the message sent to the first user-side device without learning the MAC address of the first user-side device, which helps to reduce the pressure on the first network device to learn the MAC address, simplifies the MAC table entries of the first network device, and ensures the message forwarding performance of the entire network system.

[0008] Optionally, the association relationship is a binding relationship, and the first network device receives the first message through the first VPLS instance in the first network device, including: the first network device receives the first message through the first port of the first VPLS instance; the first network device determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance in the first network device, including: the first network device determines the first VPWS instance having a binding relationship with the first VPLS instance according to the port receiving the first message being the first port. The first port in the first VPLS instance may be a port on the first network device leading to the first VPLS instance, and the first port may be a physical interface or a logical interface on the first network device for sending and receiving messages.

[0009] The technical solution provided by the present application is that the first VPLS instance can be bound to the first VPWS instance through the first port in the first VPLS instance (that is, the first port in the first network device can be bound to the first VPWS instance), so that the first VPLS instance is associated with the first VPWS instance, which can facilitate the first network device to determine the first VPWS instance associated with the first VPLS instance to forward the message sent to the first user side device, so that the first network device can forward the message sent to the first user side device without learning the MAC address of the first user side device, which helps to reduce the pressure of the first network device to learn the MAC address, simplify the MAC table entries of the first network device, and ensure the message forwarding performance of the entire network system.

[0010] Optionally, the method further includes: the first network device receives a second message through a second port of a second VPLS instance in the first network device, wherein the second message is a message sent to a second user-side device connected to the second network device; the first network device determines a third VPWS instance in the first network device that has a binding relationship with the second VPLS instance based on the port receiving the second message being the second port; the first network device forwards the second message to a fourth VPWS instance in the second network device through the third VPWS instance, wherein the third VPWS instance and the fourth VPWS instance are VPWS instances for carrying the same service, and the second user-side device may be a user device on the second user side or a network device on the second user side. The second port may be a port on the first network device that leads to the second VPLS instance, and the second port may be a physical interface or a logical interface on the first network device for sending and receiving messages.

[0011] The technical solution provided by the present application is that the second VPLS instance in the first network device can be bound to the third VPWS instance in the first network device through the second port in the second VPLS instance (that is, the second port in the first network device can be bound to the third VPWS instance), so that the second VPLS instance is associated with the third VPWS instance, thereby realizing the docking of the second VPLS instance with the second VPWS instance in the first network device, so that after the first network device receives the second message sent to the second user-side device connected to the second network device through the second VPLS instance, the second message is forwarded to the fourth VPWS instance in the second network device through the third VPWS instance associated with the second VPLS instance, so that the first network device can forward the message sent to the second user-side device without learning the MAC address of the second user-side device, which helps to reduce the pressure of the second network device to learn the MAC address, simplify the MAC table entries of the second network device, and ensure the message forwarding performance of the entire network system.

[0012] Optionally, the method further includes: the first network device receives a third message sent by the second VPWS instance in the second network device through the first VPWS instance in the first network device; and the first network device forwards the third message according to a first VPLS instance associated with the first VPWS instance in the first network device.

[0013] The technical solution provided by the present application is that a first VPLS instance in a first network device is associated with a first VPWS instance in the first network device, thereby realizing the docking of the first VPLS instance with the first VPWS instance in the first network device, so that the second network device can forward messages to the first VPWS instance in the first network device through the second VPWS instance in the second network device. The second network device can forward messages according to the forwarding mechanism of VPWS without learning the MAC address of the user-side device, which helps to reduce the pressure of the second network device to learn the MAC address and simplifies the MAC table entries of the second network device. The first network device can also forward messages sent to the user-side device connected to the second network device according to the forwarding mechanism of VPWS without learning the MAC address of the user-side device, which helps to reduce the pressure of the first network device to learn the MAC address and simplifies the MAC table entries of the first network device.

[0014] Optionally, the first network device forwards the third message according to the first VPLS instance associated with the first VPWS instance in the first network device, including: the first network device determines, in the first VPWS instance, a first virtual port corresponding to the destination address carried in the third message, and the first virtual port is used to indicate the first VPLS instance; and the first network device forwards the third message according to the first virtual port.

[0015] According to the technical solution provided by the present application, the first virtual port of the first VPWS instance in the first network device can indicate the first VPLS instance in the first network device, and the first VPLS instance can serve as a port member of the first VPWS instance. In this way, the first VPLS instance is bound to the first VPWS instance, so that the first VPLS instance is associated with the first VPWS instance, thereby realizing the docking of the first VPLS instance with the first VPWS instance in the first network device, so that the first network device and the second network device can both forward messages according to the forwarding mechanism of VPWS without learning the MAC address of the user-side device, which helps to reduce the pressure of learning MAC addresses for the first network device and the second network device and simplifies the MAC table entries of the first network device and the second network device.

[0016] Optionally, the destination address is a broadcast address, and the first network device determines the first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, including: the first network device determines one or more virtual ports corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, and the one or more virtual ports include the first virtual port. For example, the third message is a message sent by a user-side device when requesting access to a broadband access device, and the destination address carried in the third message is a broadcast address. Optionally, the destination address may also be a unicast address, for example, the third message is a message sent by a user-side device after accessing a specific broadband access device for obtaining data from the broadband access device, and the destination address carried in the third message is a unicast address.

[0017] The technical solution provided by the present application is that the first network device can determine one or more virtual ports corresponding to the destination address according to the destination address carried in the third message, and can broadcast the third message according to the one or more virtual ports, so that the technical solution provided by the present application can be applicable to the message broadcasting scenario. And the first network device can dynamically select a broadband access device according to the traffic of the user-side device to provide broadband access services for the user-side device, which can improve the resource utilization efficiency of the broadband resource pool (such as a resource pool composed of multiple broadband access devices) and the flexibility of the first network device to forward traffic to the user-side device. In one possible scenario, the broadcast method can occur in the scenario where the user dials up to access the broadband device for the first time. After that, after determining the broadband access device suitable for providing services in the resource pool through the broadcast method, the determined broadband access device can be used as the device providing services in the subsequent access to the Internet scenario to ensure the stability of the user access service.

[0018] Optionally, the first network device forwards the third message according to the first virtual port, including: the first network device determines the routing forwarding table of the first VPLS instance according to the first virtual port; the first network device forwards the third message according to the routing forwarding table of the first VPLS instance. For example, the first network device determines the first VPLS instance according to the first virtual port, and then determines the routing forwarding table of the first VPLS instance. For example, the routing forwarding table of the first VPLS instance described here can be a MAC forwarding table of the first VPLS instance.

[0019] Optionally, the first network device forwards the third message according to the routing forwarding table of the first VPLS instance, including: the first network device determines the first egress port of the third message in the first VPLS instance according to the routing forwarding table of the first VPLS instance and the destination address carried in the third message; the first network device forwards the third message through the first egress port of the third message according to the first egress port of the third message in the first VPLS instance being in an available state. In some implementation scenarios, the available state may also be referred to as an UP state. By way of example, at least two egress ports of the third message may be recorded in the routing forwarding table of the first VPLS instance, and the at least two egress ports may include a main port and a backup port, and the first network device may determine the main port as the first egress port of the third message.

[0020] The technical solution provided by the present application is that when the first output port of the third message in the first VPLS instance is in an available state, the first network device forwards the third message through the first output port, which can facilitate the first network device to successfully forward the third message and avoid the failure of forwarding the third message due to the first network device forwarding the third message through the first output port due to the unavailability of the first output port.

[0021] Optionally, the system further includes: a third network device, the third network device is a device in the VPLS network, the first network device forwards the third message according to the routing forwarding table of the first VPLS instance, and further includes: the first network device forwards the third message to the third VPLS instance in the third network device through the first VPLS instance according to the first egress port of the third message in the first VPLS instance being in an unavailable state, wherein the first VPLS instance in the first network device and the third VPLS instance in the third network device are VPLS instances for carrying the same service. In some implementation scenarios, the unavailable state is also referred to as a DOWN state. For example, at least two egress ports of the third message may be recorded in the routing forwarding table of the first VPLS instance, and the at least two egress ports may include a primary port and a backup port, the backup port may be used for the first VPLS instance to communicate with the third VPLS instance in the third network device, and the first network device may forward the third message to the third VPLS instance in the third network device through the backup port.

[0022] The technical solution provided by the present application is that, when the first output port of the third message in the first VPLS instance of the first network device is in an unavailable state, the third message is forwarded to the third VPLS instance in the third network device through the first VPLS instance in the first network device. The third network device can determine the output port of the third message in the third VPLS instance to forward the third message, thereby avoiding the loss of the third message due to the unavailability of the first output port of the third message in the first VPLS instance, which helps to reduce the packet loss rate of the network system.

[0023] Optionally, the first network device forwards the third message according to the routing forwarding table of the first VPLS instance, and also includes: the first network device determines that all ports of the first VPLS instance are in an unavailable state according to the routing forwarding table of the first VPLS instance; the first network device forwards the third message to the fifth VPWS instance in the third network device through the first VPWS instance in the first network device based on the fact that all ports of the first VPLS instance are in an unavailable state, wherein the first VPWS instance in the first network device and the fifth VPWS instance in the third network device are VPWS instances used to carry the same service. The routing forwarding table of the first VPWS instance described here may be a MAC forwarding table of the first VPWS instance. By way of example, the routing forwarding table of the first VPWS instance contains at least two port identifiers corresponding to addresses matching the destination address carried in the third message. The at least two port identifiers indicate at least two ports in the first VPWS instance. The at least two ports include a primary port and a backup port. The backup port can communicate with the fifth VPWS instance in the third network device. The first network device can forward the third message to the fifth VPWS instance in the third network device through the backup port in the first VPWS instance.

[0024] The technical solution provided by the present application is that, when all ports of a first VPLS instance in the first network device are in an unavailable state, a first network device forwards the third message to a fifth VPWS instance in a third network device through a first VPWS instance associated with the first VPLS instance in the first network device, and the third network device forwards the third message through the fifth VPWS instance, thereby avoiding the loss of the third message due to the unavailability of the port of the first VPLS instance, and helping to reduce the packet loss rate of the network system.

[0025] Optionally, before the first network device forwards the third message according to the first virtual port, the method further includes: the first network device receives a fourth message through the third port of the first VPLS instance; the first network device generates a forwarding entry in the routing forwarding table of the first VPLS instance according to the source address carried in the fourth message and the third port, wherein the destination address in the forwarding entry is the source address carried in the fourth message, and the port identifier in the forwarding entry is used to indicate the third port. By way of example, the routing forwarding table of the first VPLS instance may be a MAC forwarding table of the first VPLS instance.

[0026] The technical solution provided by the present application is that the first network device receives the fourth message through the third port of the first VPLS instance in the first network device, and generates a forwarding table entry in the routing forwarding table of the first VPLS instance according to the source address carried by the fourth message and the third port. This can facilitate the first network device to forward the third message according to the destination address carried in the third message and the routing forwarding table of the first VPLS instance after receiving the third message.

[0027] Optionally, the first network device determines the first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, including: the first network device determines the first virtual port corresponding to the destination address according to the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device as a virtual port. The routing forwarding table of the first VPWS instance described here may be a MAC forwarding table of the first VPWS instance.

[0028] Optionally, the first network device determines the first virtual port corresponding to the destination address based on that the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device is a virtual port, including: the first network device determines the first virtual port based on the destination address and the port identifier in the routing forwarding table of the first VPWS instance, wherein the port identifier is used to indicate the first virtual port corresponding to the destination address in the first VPWS instance and the type of the first virtual port; or, the first network device determines the first virtual port based on the destination address, port identifier and port type in the routing forwarding table of the first VPWS instance, wherein the port identifier indicates the port corresponding to the destination address in the first VPWS instance, and the port type indicates that the type of the port is a virtual port type.

[0029] In the technical solution provided by the present application, the port identifier can be used to indicate the port and the type of the port, or the port identifier can be used only to indicate the port. In the case where the port identifier can be used to indicate both the port and the type of the port, the routing and forwarding table of the first VPWS instance of the first network device can record the correspondence between the address and the port identifier. In the case where the port identifier is only used to indicate the port, the routing and forwarding table of the first VPWS instance of the first network device can record the correspondence between the address, the port identifier and the port type. Regardless of the indication method, the first network device can determine the port type according to the routing and forwarding table of the first VPWS instance, which helps to improve the accuracy of the first network device determining the first virtual port corresponding to the destination address carried in the third message according to the routing and forwarding table of the first VPWS instance.

[0030] Optionally, before the first network device determines the first virtual port corresponding to the destination address in the first VPWS instance based on the destination address carried in the third message, the method further includes: the first network device receives a fifth message through the first VPLS instance in the first network device; the first network device generates a forwarding table entry in the routing forwarding table of the first VPWS instance based on the source address carried in the fifth message and the first VPLS instance, wherein the destination address in the forwarding table entry is the source address carried in the fifth message, and the port identifier in the forwarding table entry is used to indicate the first virtual port. The routing forwarding table of the first VPWS instance described here may be a MAC forwarding table of the first VPWS instance.

[0031] The technical solution provided by the present application is that the first network device receives the fifth message through the first VPLS instance in the first network device, and generates a forwarding table entry in the routing forwarding table of the first VPWS instance of the first network device according to the source address carried by the fifth message and the first VPLS instance. This can facilitate the first network device to determine the first virtual port corresponding to the destination address carried in the third message according to the routing forwarding table of the first VPLS instance after receiving the third message, and determine the first VPLS instance indicated by the first virtual port, thereby determining the first VPLS instance associated with the first VPLS instance, and forwarding the third message through the first VPLS instance associated with the first VPLS instance.

[0032] Optionally, the first VPWS instance includes a port of a virtual port type, wherein the port of a virtual port type may be referred to as a virtual port, and the virtual port in the first VPWS instance may indicate a VPLS instance in the first network device.

[0033] Optionally, the first VPWS instance also includes an Ethernet virtual private network peer (EVPN Peer) type port, wherein the EVPN Peer type port can be called an EVPN Peer port, and the EVPN Peer port can be used for the first network device to communicate with a remote device, such as a remote PE device.

[0034] Optionally, the first VPLS instance includes at least one of an access circuit (AC) type port and an EVPN Peer type port. The AC type port may be referred to as an AC port, and the EVPN Peer type port may be referred to as an EVPN Peer port. In the first network device, the AC port may be used for the first network device to communicate with a broadband access device, such as a broadband remote access server (BRAS), and the EVPNPeer port may be used for the first network device to communicate with a remote device, such as a remote PE device.

[0035] In a second aspect, a message transmission system is provided, the system comprising a first network device and a second network device, the first network device is a device in a VPLS network, the second network device is a device in a VPWS network,

[0036] The first network device is used to receive a first message through a first VPLS instance in the first network device, determine the first VPWS instance according to an association relationship between the first VPLS instance and the first VPWS instance in the first network device, and forward the first message to a second VPWS instance in the second network device through the first VPWS instance, wherein the first message is a message sent to a first user-side device connected to the second network device, and the first VPWS instance and the second VPWS instance are VPWS instances used to carry the same service;

[0037] The second network device is used to forward the first message through the second VPWS instance in the second network device.

[0038] Optionally, the association relationship is a binding relationship, and the first network device is specifically used to: receive the first message through the first port of the first VPLS instance, and determine the first VPWS instance having a binding relationship with the first VPLS instance based on the port for receiving the first message being the first port.

[0039] Optionally, the first network device is further used to receive a second message through a second port of a second VPLS instance in the first network device, determine a third VPWS instance in the first network device that has a binding relationship with the second VPLS instance based on the port for receiving the second message being the second port, and forward the second message to a fourth VPWS instance in the second network device through the third VPWS instance, wherein the second message is a message sent to a second user-side device connected to the second network device, and the third VPWS instance and the fourth VPWS instance are VPWS instances for carrying the same service;

[0040] The second network device is further configured to forward the second message through the fourth VPWS instance.

[0041] Optionally, the second network device is further configured to send a third message to the first VPWS instance in the first network device through the second VPWS instance in the second network device;

[0042] The first network device is further configured to forward the third message according to a first VPLS instance associated with the first VPWS instance in the first network device.

[0043] Optionally, the first network device is specifically used to: determine a first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, the first virtual port being used to indicate the first VPLS instance; and forward the third message according to the first virtual port.

[0044] Optionally, the destination address is a broadcast address, and the first network device is specifically used to: determine one or more virtual ports corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, and the one or more virtual ports include the first virtual port.

[0045] Optionally, the first network device is specifically used to: determine the routing forwarding table of the first VPLS instance according to the first virtual port; and forward the third message according to the routing forwarding table of the first VPLS instance. For example, the routing forwarding table of the first VPLS instance described here can be a MAC forwarding table of the first VPLS instance.

[0046] Optionally, the first network device is specifically used to: determine the first egress port of the third message in the first VPLS instance based on the routing and forwarding table of the first VPLS instance and the destination address carried in the third message; and forward the third message through the first egress port of the third message based on the first egress port of the third message in the first VPLS instance being in an available state.

[0047] Optionally, the system further includes: a third network device, which is a device in the VPLS network. The first network device is also specifically used for: forwarding the third message to a third VPLS instance in a third network device through the first VPLS instance according to the first egress port of the third message in the first VPLS instance being in an unavailable state, wherein the first VPLS instance in the first network device and the third VPLS instance in the third network device are VPLS instances for carrying the same service; and the third network device is used for forwarding the third message through the third VPLS instance in the third network device.

[0048] Optionally, the first network device is also specifically used to: determine, based on the routing and forwarding table of the first VPLS instance, that all ports of the first VPLS instance are in an unavailable state; based on the fact that all ports of the first VPLS instance are in an unavailable state, forward the third message to the fifth VPWS instance in the third network device through the first VPWS instance in the first network device, wherein the first VPWS instance in the first network device and the fifth VPWS instance in the third network device are VPWS instances for carrying the same service; the third network device is also used to forward the third message through the VPLS instance in the third network device associated with the fifth VPWS instance.

[0049] Optionally, the first network device is also used to: receive a fourth message through the third port of the first VPLS instance before forwarding the third message according to the first virtual port; generate a forwarding table entry in the routing forwarding table of the first VPLS instance based on the source address carried in the fourth message and the third port, wherein the destination address in the forwarding table entry is the source address carried in the fourth message, and the port identifier in the forwarding table entry is used to indicate the third port.

[0050] Optionally, the first network device is specifically used to: determine the first virtual port corresponding to the destination address according to the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device being a virtual port. For example, the routing forwarding table of the first VPWS instance described here may be a MAC forwarding table of the first VPWS instance.

[0051] Optionally, the first network device is specifically used to: determine the first virtual port according to the destination address and port identifier in the routing forwarding table of the first VPWS instance, wherein the port identifier is used to indicate the first virtual port corresponding to the destination address in the first VPWS instance and the type of the first virtual port; or determine the first virtual port according to the destination address, port identifier and port type in the routing forwarding table of the first VPWS instance, wherein the port identifier indicates the port corresponding to the destination address in the first VPWS instance, and the port type indicates that the type of the port is a virtual port type. The routing forwarding table of the first VPWS instance may be a MAC forwarding table of the first VPWS instance.

[0052] Optionally, the first network device is also used to: receive a fifth message through the first VPLS instance in the first network device before determining the first virtual port corresponding to the destination address in the first VPWS instance based on the destination address carried in the third message; generate a forwarding table entry in the routing forwarding table of the first VPWS instance based on the source address carried in the fifth message and the first VPLS instance, wherein the destination address in the forwarding table entry is the source address carried in the fifth message, and the port identifier in the forwarding table entry is used to indicate the first virtual port.

[0053] Optionally, the first VPWS instance includes a port of a virtual port type.

[0054] Optionally, the first VPWS instance also includes an EVPN Peer type port.

[0055] Optionally, the first VPLS instance includes at least one of an AC type port and an EVPN Peer type port.

[0056] Optionally, the first network device, the second network device and the third network device are all PE devices.

[0057] The technical effects of the second aspect and various optional implementations of the second aspect can refer to the technical effects of the above-mentioned first aspect and various optional implementations of the first aspect, and will not be elaborated here.

[0058] In a third aspect, a first network device is provided, the first network device is located in a message transmission system, the system further includes a second network device, the first network device is a device in a VPLS network, the second network device is a device in a VPWS network, and the first network device includes:

[0059] A receiving module, configured to receive a first message through a first VPLS instance in the first network device, wherein the first message is a message sent to a first user-side device connected to the second network device;

[0060] A processing module, configured to determine the first VPWS instance according to an association relationship between the first VPLS instance and the first VPWS instance in the first network device;

[0061] The forwarding module is used to forward the first message to the second VPWS instance in the second network device through the first VPWS instance, wherein the first VPWS instance and the second VPWS instance are VPWS instances used to carry the same service.

[0062] Optionally, the association relationship is a binding relationship, and the receiving module is specifically used to receive the first message through the first port of the first VPLS instance; the processing module is specifically used to determine the first VPWS instance having a binding relationship with the first VPLS instance based on the port for receiving the first message being the first port.

[0063] Optionally, the receiving module is further used to receive a second message through a second port of a second VPLS instance in the first network device, wherein the second message is a message sent to a second user-side device connected to the second network device;

[0064] The processing module is further configured to determine, according to the port receiving the second message being the second port, a third VPWS instance in the first network device that has a binding relationship with the second VPLS instance;

[0065] The forwarding module is further configured to forward the second message to a fourth VPWS instance in the second network device through the third VPWS instance, and the third VPWS instance and the fourth VPWS instance are VPWS instances for carrying the same service.

[0066] Optionally, the receiving module is further configured to receive, through the first VPWS instance in the first network device, a third message sent by the second VPWS instance in the second network device;

[0067] The forwarding module is further configured to forward the third message according to the first VPLS instance associated with the first VPWS instance in the first network device.

[0068] Optionally, the forwarding module is specifically used to: determine a first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, the first virtual port being used to indicate the first VPLS instance; and forward the third message according to the first virtual port.

[0069] Optionally, the destination address is a broadcast address, and the forwarding module is specifically configured to: determine one or more virtual ports corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, and the one or more virtual ports include the first virtual port.

[0070] Optionally, the forwarding module is specifically configured to: determine a routing forwarding table of the first VPLS instance according to the first virtual port; and forward the third message according to the routing forwarding table of the first VPLS instance.

[0071] Optionally, the forwarding module is also specifically used to: determine the first egress port of the third message in the first VPLS instance based on the routing forwarding table of the first VPLS instance and the destination address carried in the third message; and forward the third message through the first egress port of the third message based on the first egress port of the third message in the first VPLS instance being in an available state.

[0072] Optionally, the system also includes: a third network device, which is a device in the VPLS network, and the forwarding module is further specifically used to: forward the third message to a third VPLS instance in the third network device through the first VPLS instance based on the first output port of the third message in the first VPLS instance being in an unavailable state, wherein the first VPLS instance in the first network device and the third VPLS instance in the third network device are VPLS instances used to carry the same service.

[0073] Optionally, the forwarding module is further specifically used to: determine, based on the routing forwarding table of the first VPLS instance, that all ports of the first VPLS instance are in an unavailable state; and forward the third message to the fifth VPWS instance in the third network device through the first VPWS instance in the first network device based on the fact that all ports of the first VPLS instance are in an unavailable state, wherein the first VPWS instance in the first network device and the fifth VPWS instance in the third network device are VPWS instances used to carry the same service.

[0074] Optionally, the receiving module is further configured to receive a fourth message through the third port of the first VPLS instance before the forwarding module forwards the third message according to the first virtual port;

[0075] The processing module is also used to generate a forwarding entry in the routing forwarding table of the first VPLS instance based on the source address carried in the fourth message and the third port, wherein the destination address in the forwarding entry is the source address carried in the fourth message, and the port identifier in the forwarding entry is used to indicate the third port.

[0076] Optionally, according to the destination address carried in the third message, determining the first virtual port corresponding to the destination address in the first VPWS instance includes: determining the first virtual port corresponding to the destination address according to the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device being a virtual port. For example, the routing forwarding table of the first VPWS instance described here may be a MAC forwarding table of the first VPWS instance.

[0077] Optionally, according to the fact that the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device is a virtual port, determining the first virtual port corresponding to the destination address includes: determining the first virtual port according to the destination address and the port identifier in the routing forwarding table of the first VPWS instance, wherein the port identifier is used to indicate the first virtual port corresponding to the destination address in the first VPWS instance and the type of the first virtual port; or determining the first virtual port according to the destination address, port identifier and port type in the routing forwarding table of the first VPWS instance, wherein the port identifier indicates the port corresponding to the destination address in the first VPWS instance, and the port type indicates that the type of the port is a virtual port type.

[0078] Optionally, the receiving module is further configured to receive a fifth message through the first VPLS instance in the first network device before the forwarding module determines, in the first VPWS instance, the first virtual port corresponding to the destination address according to the destination address carried in the third message;

[0079] The processing module is further used to generate a forwarding entry in the routing forwarding table of the first VPWS instance according to the source address carried in the fifth message and the first VPLS instance, wherein the destination address in the forwarding entry is the source address carried in the fifth message, and the port identifier in the forwarding entry is used to indicate the first virtual port.

[0080] Optionally, the first VPWS instance includes a port of a virtual port type.

[0081] Optionally, the first VPWS instance also includes an EVPN Peer type port.

[0082] Optionally, the first VPLS instance includes at least one of an AC type port and an EVPN Peer type port.

[0083] The technical effects of the third aspect and various optional implementations of the third aspect can refer to the technical effects of the first aspect and various optional implementations of the first aspect, and will not be repeated here. The modules described in the third aspect can be implemented based on software, hardware, or a combination of software and hardware, and the modules can be arbitrarily combined or divided based on specific implementations.

[0084] In a fourth aspect, a network device is provided, the network device comprising a memory and a processor;

[0085] The memory is used to store computer programs;

[0086] The processor is used to execute the computer program stored in the memory to execute the message transmission method provided by the above-mentioned first aspect or any optional manner of the first aspect.

[0087] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the message transmission method provided by the first aspect or any optional method of the first aspect is implemented.

[0088] In a sixth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is caused to execute the message transmission method provided in the first aspect or any optional method of the first aspect.

[0089] In a seventh aspect, a chip is provided, which includes a programmable logic circuit and / or program instructions, and when the chip is running, it is used to implement the message transmission method provided by the first aspect or any optional method of the first aspect.

[0090] In an eighth aspect, a message transmission system is provided, the message transmission system comprising a first network device and a second network device, the first network device being the network device provided in the third aspect, or the first network device being the network device provided in the fourth aspect. The first network device is used to receive a message sent to a user-side device connected to the second network device through a VPLS instance in the first network device, and forward the message to a VPWS instance in the second network device through a VPWS instance associated with the VPLS instance in the first network device, and the second network device is used to forward the message to the user-side device through a VPWS instance in the second network device associated with the VPWS instance.

[0091] The beneficial effects of the technical solution provided by this application are:

[0092] The present application provides a message transmission method, device and system, the system includes a first network device in a VPLS network and a second network device in a VPWS network, the first VPWS instance in the first network device and the second VPWS instance in the second network device are VPWS instances used to carry the same service, the first VPLS instance in the first network device is associated with the first VPWS instance in the first network device, after the first network device receives a first message sent to a first user-side device connected to the second network device through the first VPLS instance in the first network device, the first network device determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance, and forwards the first message to the second VPWS instance through the first VPWS instance, that is, the first network device forwards the first message to the second VPWS instance in the second network device through the first VPWS instance associated with the first VPLS instance, thereby the first network device can forward the message sent to the first user-side device without learning the MAC address of the first user-side device, which helps to reduce the pressure of the first network device to learn the MAC address, simplify the MAC table items of the first network device, and ensure the message forwarding performance of the network system. In addition, the second network device can forward the first message to the first user side device through the second VPWS instance according to the forwarding mechanism of VPWS. The second network device can forward the message sent to the first user side device without learning the MAC address of the first user side device, which helps to reduce the pressure on the second network device to learn MAC addresses and simplify the MAC table entries of the second network device. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 It is a structural diagram of an EVPN network provided in an embodiment of the present application;

[0094] Figure 2 It is a schematic diagram of the structure of another EVPN network provided in an embodiment of the present application;

[0095] Figure 3 This is a schematic diagram of the structure of another EVPN network provided in an embodiment of the present application;

[0096] Figure 4 It is a flow chart of a message transmission method provided in an embodiment of the present application;

[0097] Figure 5 is a schematic diagram of a first VPLS instance provided in an embodiment of the present application;

[0098] Figure 6 It is a schematic diagram of a message transmission method provided in an embodiment of the present application;

[0099] Figure 7It is a schematic diagram of another message transmission method provided in an embodiment of the present application;

[0100] Figure 8 is a flow chart of another message transmission method provided in an embodiment of the present application;

[0101] Fig. 9 It is a schematic diagram of the relationship between a VPWS instance and a VPLS instance provided in an embodiment of the present application;

[0102] Fig.10 This is a schematic diagram of the relationship between PE1 and PE4 provided in an embodiment of the present application;

[0103] Fig.11 It is a schematic diagram of another message transmission method provided in an embodiment of the present application;

[0104] Fig.12 is a schematic diagram of the logical structure of a first network device provided in an embodiment of the present application;

[0105] Fig.13 It is a schematic diagram of the hardware structure of a network device provided in an embodiment of the present application;

[0106] Fig.14 is a schematic diagram of the hardware structure of another network device provided in an embodiment of the present application;

[0107] Fig.15 It is a structural diagram of a message transmission system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0108] In order to make the principles, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0109] In a traditional L2VPN network, PE devices can forward messages through VLL PW, reducing the pressure on PE devices to learn MAC addresses. However, with the development of technology, various telecommunications services are currently evolving towards the EVPN solution. Since EVPN signaling cannot support VLL PW, in the current EVPN network, PE devices need to learn MAC addresses to forward messages, resulting in greater pressure on PE devices to learn MAC addresses. The technical solution provided in the embodiment of the present application is applied to the EVPN network, which can reduce the pressure on PE devices to learn MAC addresses. The technical solution of the embodiment of the present application is described below.

[0110] First, the application scenarios of the embodiments of the present application are explained.

[0111] The technical solution provided in the embodiment of the present application can be applied to an EVPN network, which may include multiple PE devices, which may communicate with each other to transfer user data, wherein the multiple PE devices may assume corresponding roles according to different application scenarios. Taking the user broadband access scenario as an example, the EVPN network applied to the scenario may include multiple broadband access devices and multiple PE devices. According to the different roles assumed by the multiple PE devices, the multiple PE devices may include user access PE devices and broadband access PE devices, each broadband access PE device may be connected to at least one broadband access device, each user access PE device is used to access at least one user device to the EVPN network, and each broadband access PE device may be connected to at least one user access PE device. Among them, the broadband access device is used to provide broadband access services for user devices mounted under the corresponding broadband access PE device (user devices can be mounted under the user access PE device, and mounted under the broadband access PE device through the user access PE device).

[0112] In an EVPN network applied to a user broadband access scenario, at least one VPWS instance may be configured in a PE device, and at least one VPLS instance may also be configured in a broadband access PE device. The at least one VPWS instance in the user access PE device may correspond one-to-one to the at least one VPWS instance in the broadband access PE device, the VPLS instances in each broadband access PE device may correspond one-to-one, each VPLS instance in the broadband access PE device may correspond (or be bound) to at least one broadband access device, and in the broadband access PE device: each VPWS instance may be associated (or correspond) with at least one VPLS instance, and each VPLS instance may be associated (or correspond) with one VPWS instance. In the EVPN network, after the user access PE device receives a message sent to the broadband access device by the user device mounted under the user access PE device, the message can be forwarded to the corresponding VPWS instance in the broadband access PE device through the VPWS instance in the user access PE device. After the broadband access PE device receives the message through the VPWS instance in the broadband access PE device, the message is forwarded to the corresponding broadband access device through the VPLS instance associated with the VPWS instance in the broadband access PE device, and the broadband access device provides broadband access service for the user device according to the message. Similarly, after the broadband access PE device receives a message sent to the user device through the VPLS instance in the broadband access PE device, the message is forwarded to the corresponding VPWS instance in the user access PE device through the VPWS instance associated with the VPLS instance in the broadband access PE device, and the user access PE device forwards the message to the user device through the VPWS instance in the user access PE device, so that the broadband access device provides broadband access service for the user device.

[0113] The broadband access device may be a BRAS. The user device may be a host, a user terminal, a server, or a virtual machine (VM) created on a server, and other types of devices. The user device may generally be a dial-up Internet access device, such as an optical modem, which is also called an optical modem or a single-port optical terminal. The PE device may be a network device such as a router, a switch, a virtual router, or a virtual switch. Each PE device may be directly connected or connected through other network devices (such as core devices), which is not limited in the embodiments of the present application.

[0114] For example, please refer to Figure 1 , which shows a schematic diagram of the structure of an EVPN network applied to a user broadband access scenario provided by an embodiment of the present application, Figure 1 For example, the broadband access device is BRAS and the user device is VM. Figure 1As shown, the EVPN network includes three PE devices, PE1 to PE3 (that is, PE1, PE2 and PE3), and BRAS1. PE1 is connected to PE2 and PE3 respectively, and PE1 is connected to BRAS1. PE2 and PE3 are connected to VM1 respectively (that is, VM1 is mounted on PE2 and PE3 respectively, and VM1 accesses the EVPN network through PE2 and PE3). According to the different roles played by PE1 to PE3, PE1 can be a broadband access PE device, and PE2 and PE3 can both be user access PE devices. At least one VPWS instance ( Figure 1 Only one is shown, which is VPWS instance 1), and PE1 is also configured with at least one VPLS instance ( Figure 1 Only one is shown, which is VPLS instance 1). The VPWS instances 1 in PE1 to PE3 can correspond one to one, the VPLS instance 1 in PE1 corresponds to (or is bound to) BRAS1, and the VPWS instance 1 in PE1 is associated with VPLS instance 1. Among them, the one-to-one corresponding VPWS instances in each PE device can be used to carry the same service. For example, Figure 1 VPWS instance 1 in PE1 to PE3 is used to carry the same service.

[0115] For example, Figure 1As shown, after PE2 receives a message sent to BRAS1 by VM1 mounted under PE2 through VPWS instance 1 in PE2, it can forward the message to VPWS instance 1 in PE1 through VPWS instance 1 in PE2, and PE1 can forward the message to BRAS1 through VPLS instance 1 in PE1 associated with VPWS instance 1 in PE1, and BRAS1 provides broadband access service for VM1 according to the message. For another example, after PE1 receives a message sent to VM1 by BRAS1 through VPLS instance 1 in PE1, it can forward the message to VPWS instance 1 in PE2 through VPWS instance 1 in PE1 associated with VPLS instance 1, and PE2 can forward the message to VM1 through VPWS instance 1 in PE2. Optionally, after PE1 receives the message sent from BRAS1 to VM1 through VPLS instance 1 in PE1, it can also forward the message to VPWS instance 1 in PE3 through VPWS instance 1 associated with VPLS instance 1 in PE1 based on the load sharing strategy or the active / standby protection strategy, and PE3 forwards the message to VM1 through VPWS instance 1 in PE3. VPWS instance 1 in PE1 can include two ports (e.g., EVPN Peer ports) corresponding to PE2 and PE3, so that PE1 can forward the message to VPWS instance 1 in PE2 through VPWS instance 1 in PE1, and can also forward the message to VPWS instance 1 in PE3 through VPWS instance 1 in PE1.

[0116] Typically, an EVPN network applied to a user broadband access scenario may include multiple broadband access devices, multiple broadband access PE devices, and multiple user access PE devices, each broadband access PE device may be connected to at least one user access PE device, and each broadband access PE device may be connected to at least one broadband access device. At least one user device may be mounted under each user access PE device, and the same user device may be mounted under different user access PE devices. Furthermore, when the EVPN network includes multiple broadband access PE devices, the multiple broadband access PE devices may be connected to each other to achieve multi-homing protection of the broadband access PE device, for example, dual homing protection. For example, when a forwarding path failure between a broadband access PE device among the multiple broadband access PE devices and a destination device (such as a broadband access device) causes the broadband access PE device to be unable to forward a message to the destination device through the forwarding path, the broadband access PE device may send the message to the broadband access PE device connected thereto, and the broadband access PE device connected thereto forwards the message to the destination device, thereby achieving dual homing protection of the broadband access PE device.

[0117] For example, please refer to Figure 2, which shows a structural diagram of another EVPN network applied to a user broadband access scenario provided by an embodiment of the present application, Figure 2 The broadband access device is still BRAS, and the user equipment is VM. Figure 2 As shown, the EVPN network includes four PE devices, namely PE1 to PE4 (that is, PE1, PE2, PE3 and PE4), and three broadband access devices, namely BRAS1 to BRAS3 (that is, BRAS1, BRAS2 and BRAS3). PE1 and PE4 are connected to PE2 and PE3 respectively, and PE1 and PE4 are connected to BRAS1 to BRAS3 respectively, PE2 and PE3 are connected to VM1 to VM4 (that is, VM1, VM2, VM3 and VM4) respectively, and PE1 is connected to PE4. According to the different roles assumed by PE1 to PE4, PE1 and PE4 can both be broadband access PE devices, and PE2 and PE3 can both be user access PE devices. Among them, PE1 to PE4 are respectively configured with at least one VPWS instance ( Figure 2 Only one is shown, which is VPWS instance 1), and at least one VPLS instance ( Figure 2 Only two are shown, namely VPLS instance 1 and VPLS instance 2). The VPWS instances in PE1~PE4 correspond one-to-one, and each VPLS instance in PE1 and PE4 corresponds to (or is bound to) at least one of BRAS1~BRAS3. For example, VPLS instance 1 in PE1 and PE4 corresponds to BRAS1~BRAS3 respectively. Among them, in PE1 and PE4, each VPWS instance is associated with at least one VPLS instance, and each VPLS instance is associated with one VPWS instance. For example, in PE1 and PE4, VPWS instance 1 is associated with VPLS instance 1 and VPLS instance 2 respectively, and each VPLS instance in VPLS instance 1 and VPLS instance 2 is associated with one VPWS instance, VPWS instance 1. Among them, the one-to-one corresponding VPWS instances in each PE device can be used to carry the same service, and the one-to-one corresponding VPLS instances can be used to carry the same service. For example Figure 2 There is a one-to-one correspondence between the VPWS instance 1 in PE1 to PE4, and the VPWS instance 1 in PE1 to PE4 is used to carry the same service. There is a one-to-one correspondence between the VPLS instance 1 in PE1 and PE4, and the VPLS instance 1 in PE1 and PE4 is used to carry the same service. There is a one-to-one correspondence between the VPLS instance 2 in PE1 and PE4, and the VPLS instance 2 in PE1 and PE4 is used to carry the same service, and the services carried by the VPLS instance 1 and the VPLS instance 2 can be different.

[0118] For example, Figure 2As shown, after PE2 receives a message sent to BRAS1 by VM1 mounted under PE2 through VPWS instance 1 in PE2, it can forward the message to VPWS instance 1 in PE1 through VPWS instance 1 in PE2, and PE1 can forward the message to BRAS1 through VPLS instance 1 in PE1 associated with VPWS instance 1 in PE1, and BRAS1 provides broadband access service for VM1 according to the message. For another example, after PE1 receives a message sent to VM1 by BRAS1 through VPLS instance 1 in PE1, it can forward the message to VPWS instance 1 in PE2 through VPWS instance 1 in PE1 associated with VPLS instance 1, and PE2 can forward the message to VM1 through VPWS instance 1 in PE2. Optionally, after PE1 receives a message sent from BRAS1 to VM1 through the VPLS instance 1 in PE1, it can also forward the message to the VPWS instance 1 in PE3 through the VPWS instance 1 associated with the VPLS instance 1 in PE1 based on the load sharing strategy or the active-standby protection strategy, and PE3 forwards the message to VM1 through the VPWS instance 1 in PE3. Optionally, after PE1 receives a message sent from VM1 to BRAS1 through the VPWS instance 1 in PE1, if a forwarding path failure between PE1 and BRAS1 (for example, a failure of VPLS instance 1 in PE1, or a failure of VPWS instance 1 in PE1) causes PE1 to be unable to forward the message to BRAS1 through the forwarding path, PE1 may forward the message to VPLS instance 1 in PE4 through the VPLS instance 1 in PE1, and PE4 forwards the message to BRAS1 through the VPLS instance 1 in PE4, thereby realizing dual homing protection between PE1 and PE4; or, PE1 may forward the message to VPWS instance 1 in PE4 through the VPWS instance 1 in PE1, and PE4 forwards the message to BRAS1 through the VPLS instance 1 in PE4 associated with the VPWS instance 1, thereby realizing dual homing protection between PE1 and PE4.

[0119] Typically, the EVPN network also includes edge access devices and core devices, and each PE device can be connected through the core device. In the EVPN network applied to the user broadband access scenario, the edge access device can be connected to the user access PE device, and the user device is connected to the user access PE device through the edge access device, that is, the user device is mounted under the edge access device and connected to the user access PE device through the edge access device. Among them, the edge access device can be, for example, a customer edge (CE) device, and the core device can be, for example, a provider (P) device. Among them, both the CE device and the P device can be network devices such as routers, switches, virtual routers or virtual switches, and the CE device can be an optical line terminal (OLT). Optionally, in the EVPN network, at least one VPWS instance can be configured in the P device, and the VPWS instance in the P device corresponds to the VPWS instance in the user access PE device and the VPWS instance in the broadband access PE device, respectively, and the P device can forward messages between the user access PE device and the broadband access PE device through the VPWS instance in the P device.

[0120] For example, please refer to Figure 3 , which shows a structural diagram of another EVPN network applied to a user broadband access scenario provided by an embodiment of the present application, Figure 3 The broadband access device is still BRAS, and the user equipment is VM. Figure 3 ,exist Figure 2 On the basis of, the EVPN network also includes two CE devices, CE1~CE2, and two P devices, P1~P2. Each P device in P1~P2 is connected to PE1~PE4 respectively, each CE device in CE1~CE2 is connected to PE2 and PE3 respectively, and CE1 is connected to VM1~VM2 respectively, and CE2 is connected to VM3~VM4 respectively. That is, VM1~VM2 is mounted under CE1, and mounted under PE2 and PE3 through CE1, VM3~VM4 is mounted under CE2, and mounted under PE2 and PE3 through CE2. Among them, PE1 and PE4 can both be broadband access PE devices, and PE2 and PE3 can both be user access PE devices. At least one VPWS instance ( Figure 3 Only two are shown, namely VPWS instance 1 and VPWS instance 2), and at least one VPLS instance is also configured in PE1 and PE4 ( Figure 3Only two are shown, namely VPLS instance 1 and VPLS instance 2). The VPWS instances in PE1~PE4 and P1~P2 correspond one-to-one, and each VPLS instance in PE1 and PE4 corresponds to (or is bound to) at least one of BRAS1~BRAS3. For example, VPLS instance 1 in PE1 and PE4 corresponds to BRAS1~BRAS3 respectively. Among them, in PE1 and PE4, VPWS instance 1 can be associated with VPLS instance 1 and VPLS instance 2 respectively, and each VPLS instance in VPLS instance 1 and VPLS instance 2 is associated with one VPWS instance, namely VPWS instance 1. The VPWS instance 1 in PE1~PE4 and P1~P2 corresponds one-to-one, and VPWS instance 1 in PE1~PE4 and P1~P2 can be used to carry the same service. The VPWS instance 2 in PE1~PE4 and P1~P2 corresponds one-to-one, and VPWS instance 2 in PE1~PE4 and P1~P2 can be used to carry the same service. The services carried by VPWS instance 1 and VPWS instance 2 can be different. VPLS instance 1 in PE1 and PE4 corresponds one to one, and VPLS instance 1 in PE1 and PE4 can be used to carry the same service. VPLS instance 2 in PE1 and PE4 corresponds one to one, and VPLS instance 2 in PE1 and PE4 can be used to carry the same service. Figure 3 In the EVPN network shown, the VPWS instances in each PE device and each P device can correspond to the CE devices one-to-one. For example, the VPWS instance 1 in each PE device and each P device corresponds to CE1, and the VPWS instance 2 in each PE device and each P device corresponds to CE2. This embodiment of the present application is not limited to this.

[0121] For example, Figure 3As shown, after PE2 receives a message sent to BRAS1 by VM1 mounted under PE2 through VPWS instance 1 in PE2 (the message may be forwarded to PE2 through CE1), the message may be forwarded to VPWS instance 1 in P1 through VPWS instance 1 in PE2, and P1 may forward the message to VPWS instance 1 in PE1 through VPWS instance 1 in P1, and PE1 may forward the message to BRAS1 through VPLS instance 1 in PE1 associated with VPWS instance 1 in PE1, and BRAS1 provides broadband access service for VM1 according to the message. In another example, after PE1 receives a message sent from BRAS1 to VM1 through the VPLS instance 1 in PE1, the message is forwarded to the VPWS instance 1 in P1 through the VPWS instance 1 associated with the VPLS instance 1 in PE1. The P1 can forward the message to the VPWS instance 1 in PE2 through the VPWS instance 1 in P1. The PE2 can forward the message to CE1 through the VPWS instance 1 in PE2, and the CE1 forwards the message to VM1 according to the destination address carried in the message. Optionally, after PE1 receives a message sent from BRAS1 to VM1 through the VPLS instance 1 in PE1, it can also forward the message to the VPWS instance 1 in P2 through the VPWS instance 1 associated with the VPLS instance 1 in PE1 based on the load sharing strategy or the active-standby protection strategy. The P2 can forward the message to the VPWS instance 1 in PE3 through the VPWS instance 1 in P2. The PE3 can forward the message to CE1 through the VPWS instance 1 in PE3, and CE1 forwards the message to VM1 according to the destination address carried in the message.

[0122] In the embodiments of the present application, Figures 1 to 3The EVPN network shown is only used as an example and is not used to limit the technical solution of the embodiment of the present application. In the specific implementation process, the number of PE devices, CE devices, P devices and BRAS can be configured as needed, and the specific roles that each type of device needs to assume can be determined according to the application scenario. In addition, the EVPN network can also include other network devices. For example, the EVPN network can also include a route reflector (RR), etc., which is not limited by the embodiment of the present application. In addition, for the convenience of description, in the embodiment of the present application, the PE device connected to the user device in the user broadband access scenario is called a user access PE device, and the PE device connected to the broadband access device is called a broadband access PE device, but this description is only exemplary. Both the user access PE device and the broadband access PE device are PE devices. In other implementation scenarios, the user access PE device and the broadband access PE device can be described by other names, or the types of PE devices may not be distinguished, which is not limited by the embodiment of the present application.

[0123] In traditional technologies, broadband access PE devices need to learn the MAC address of the user device connected to the user access PE device before forwarding the message sent to the user device, which leads to high pressure on the broadband access PE device to learn the MAC address. The MAC table of the broadband access PE device is complex and it is difficult to ensure the forwarding performance of the network system. Figures 1 to 3 As shown, PE1 (i.e., broadband access PE device) needs to learn the MAC address of VM1 (i.e., user device) connected to PE2 (i.e., user access PE device) to forward the message sent by BRAS1 to VM1, which easily leads to greater pressure on PE1 to learn MAC addresses and complex MAC table entries of PE1.

[0124] In the embodiment of the present application, the VPLS instance in the broadband access PE device (e.g., PE1) is associated (or bound) with the VPWS instance, so that the VPWS instance and the VPLS instance are connected in the broadband access PE device. After the broadband access PE device receives a message sent from the broadband access device (e.g., BRAS1) to the user side device (e.g., VM1) through the VPLS instance in the broadband access PE device, the VPWS instance associated with the VPLS instance can be determined according to the association relationship between the VPLS instance and the VPWS instance in the broadband access PE device, and the message is forwarded to the VPWS instance in the user access PE device (e.g., PE2) through the VPWS instance associated with the VPLS instance in the broadband access PE device. Thus, the broadband access PE device can forward the message sent to the user side device (e.g., VM1) without learning the MAC address of the user side device (e.g., VM1), which helps to reduce the pressure of the broadband access PE device to learn the MAC address, simplify the MAC table of the broadband access PE device, and ensure the message forwarding performance of the entire network system. Furthermore, the user access PE device (e.g., PE2) can forward the message through the VPWS instance in the user access PE device, that is, the user access PE device can forward the message sent to the user side device according to the forwarding mechanism of VPWS without learning the MAC address of the user side device, which helps to reduce the pressure of the user access PE device to learn the MAC address, simplifies the MAC table of the user access PE device, and ensures the message forwarding performance of the entire network system. In the embodiment of the present application, the user side device may include a user side user device and a user side network device, such as Figure 3 In the illustrated scenario, the user-side devices may include VM1 - VM4 and CE1 and CE2 connected to the VM1 - VM4.

[0125] The technical solution of the embodiment of the present application is described in detail below in conjunction with the accompanying drawings. It should be noted before this that in the present application, a port in an instance (such as a VPLS instance, a VPWS instance) may refer to a port leading to the instance on the device where the instance is located, that is, the port is usually located on the device but can lead to the instance, so for the sake of convenience of description, the present application refers to the port leading to the instance on the device as the port of the instance. For example, in the following description of "the first port of the first VPLS instance", the first port may be located on the first network device where the first VPLS instance is located, but the first port may lead to the first VPLS instance, or may be used by the first VPLS instance for packet forwarding, and is therefore described as the first port of the first VPLS instance.

[0126] For example, please refer to Figure 4, which shows a schematic diagram of a message transmission method provided in an embodiment of the present application, the message transmission method can be applied to a system including a first network device and a second network device, the first network device is a device in a VPLS network, and the second network device is a device in a VPWS network. Figures 1 to 3 As shown, the first network device may be PE1, and the second network device may be PE2. Figure 4 As shown, the method may include:

[0127] S401. A first network device receives a first message through a first VPLS instance in the first network device, wherein the first message is a message sent to a first user-side device connected to a second network device.

[0128] At least one VPLS instance may be configured in the first network device, each VPLS instance may include at least one port, each port has a type, and in the VPLS instance, the type of each port may be one of the EVPN Peer type and the AC type. Among them, the AC type port may be called an AC port, and the AC port may be used for the first network device to communicate with a broadband access device (such as a BRAS). The first VPLS instance may be a VPLS instance in the first network device, and the type of the port in the first VPLS instance may be one of the EVPN Peer type and the AC type. For example, the first VPLS instance includes an AC type port and an EVPN Peer type port (that is, the first VPLS instance includes an AC port and an EVPN Peer port). Optionally, each VPLS instance in the first network device includes an AC port and an EVPN Peer port, and the VPLS instance in the first network device may also include ports of other types, which is not limited in the embodiment of the present application. Among them, in the case where the first VPLS instance includes multiple AC ports, the multiple AC ports may be isolated from each other, so that the broadband access devices corresponding to the multiple AC ports are isolated from each other, and the broadband access devices corresponding to the multiple AC ports are prevented from visiting each other. For example, a switch may be configured in the first VPLS instance, and the switch may be used to control the first VPLS instance to include multiple AC ports to be isolated from each other to avoid forming a loop. In some implementation scenarios, a VPLS instance may also be referred to as a bridge domain (BD). For example, when a BD includes both an AC port and an EVPN Peer port, the VPLS instance described in the embodiment of the present application may also be referred to as a BD.

[0129] For example, please refer to Figure 5 , which shows a schematic diagram of a first VPLS instance in a first network device provided in an embodiment of the present application. The first VPLS instance can be, for example, Figures 1 to 3VPLS instance 1 in PE1 in Figure 1. Figure 5 As shown, the VPLS instance 1 includes one EVPN Peer port, EVPN Peer11, and three AC ports, AC11, AC12, and AC13, wherein AC11, AC12, and AC13 can be used for the first network device (PE1) to communicate with BRAS1 to BRAS3, the EVPNPeer11 can be used for the first network device (PE1) to communicate with, for example, PE4, AC11, AC12, and AC13 can be isolated from each other, and AC11, AC12, AC13, and EVPN Peer11 can be isolated from each other.

[0130] The first message may originate from a broadband access device (e.g., BRAS1), and the first network device may receive the first message through a first VPLS instance in the first network device. Optionally, the first network device receives the first message through a first port of the first VPLS instance, and the first port may be a port in the first VPLS instance, such as Figure 5 As shown, the first port may be AC11 in the first VPLS instance.

[0131] S402: The first network device determines the first VPWS instance according to an association relationship between the first VPLS instance and a first VPWS instance in the first network device.

[0132] At least one VPWS instance may be configured in the first network device, and a VPWS instance in the first network device may be associated with one or more VPLS instances. The first VPWS instance is a VPWS instance in the first network device, and a first VPLS instance in the first network device has an association relationship with the first VPWS instance. The first network device may determine the first VPWS instance based on the association relationship between the first VPLS instance and the first VPWS instance.

[0133] Optionally, the association relationship is a binding relationship, and the first port in the first VPLS instance can be bound to the first VPWS instance, and the first network device can determine the first VPWS instance having a binding relationship with the first VPLS instance based on the port in the first VPLS instance that receives the first message being the first port. For example, after the first network device receives the first message through the first VPLS instance, it determines that the port in the first VPLS instance that receives the first message is the first port of the first VPLS instance, and the first network device determines the first VPWS instance having a binding relationship with the first VPLS instance based on the first port. The first port can be located on the first network device, but the first port can lead to the first VPLS instance, or can be used by the first VPLS instance for message forwarding, and is therefore described as the first port of the first VPLS instance. In an embodiment of the present application, a port in the first network device (e.g., a first port) can be bound (or corresponded) to a VPWS instance in the first network device (e.g., a first VPWS instance), so that the first network device can determine the first VPWS instance having a binding relationship with the first VPLS instance based on the first port receiving the first message. The correspondence between the port in the first network device and the VPWS instance in the first network device can be pre-configured or dynamically determined based on a certain mechanism, and the embodiment of the present application does not limit this.

[0134] S403: The first network device forwards the first message to the second VPWS instance in the second network device through the first VPWS instance.

[0135] At least one VPWS instance may be configured in the second network device, the second VPWS instance is a VPWS instance in the second network device, the first VPWS instance and the second VPWS instance are VPWS instances for carrying the same service, and the first VPWS instance and the second VPWS instance may correspond to each other. Figures 1 to 3 As shown, the first VPWS instance is VPWS instance 1 in PE1, and the second VPWS instance is VPWS instance 1 in PE2.

[0136] Optionally, the first network device may determine the routing forwarding table of the first VPWS instance in the first network device, and forward the first message to the second VPWS instance in the second network device through the first VPWS instance according to the routing forwarding table of the first VPWS instance. For example, the first network device may determine the second VPWS instance in the second network device according to the routing forwarding table of the first VPWS instance, and determine the egress port of the first message in the port of the first VPWS instance by looking up the routing forwarding table of the first VPWS instance, and forward the first message to the second VPWS instance in the second network device through the egress port of the first message in the first VPWS instance. The egress port of the first message in the first VPWS instance corresponds to the second VPWS instance in the second network device.

[0137] The routing forwarding table of the first VPWS instance described in S403 may be an associated forwarding table of the first VPWS instance. The routing forwarding table of the first VPWS instance (that is, the associated forwarding table) may be used to record the correspondence between the port identifier and the associated indication information. The port identifier is used to indicate the port corresponding to the corresponding associated indication information in the first VPWS instance. The associated indication information is used to instruct the remote device of the first network device (e.g., the second network device) to determine the VPWS instance corresponding to the first VPWS instance (e.g., the second VPWS instance). By way of example, the associated indication information may be an identifier of a VPN service carried in the VPWS instance in the remote device. The associated indication information may be an identifier of a VPWS instance. For example, in an MPLS network, the associated indication information may be a label of a VPN service. In an SRv6 network, the associated indication information may be a SID of a VPN service. In a possible implementation, the identifier of a VPN service may be used as an identifier of a VPWS instance. The first network device may determine association indication information of the VPWS instance corresponding to the first VPWS instance in the routing forwarding table of the first VPWS instance, and determine the port indicated by the port identifier corresponding to the association indication information in the routing forwarding table of the first VPWS instance as the egress port of the first message.

[0138] For example, Figure 6 is a schematic diagram of a message transmission method provided in an embodiment of the present application, see Figure 6 Combined with Figure 5, the first network device may be PE1, and the first VPLS instance is VPLS instance 1 in the PE1. PE1 determines the first VPWS instance (e.g., VPWS instance 1) bound to the first port in the VPLS instance 1 of the PE1 (e.g., AC11 in the VPLS instance 1) in each VPWS instance of the PE1 according to the first port (e.g., AC11 in the VPLS instance 1) that receives the first message, thereby determining that the first VPWS instance having a binding relationship with the VPLS instance 1 is the VPWS instance 1 in the PE1. The binding relationship between the VPWS instance 1 in the PE1 and AC11 may be pre-configured or dynamically determined based on a certain mechanism. A VPWS instance may be associated with one or more VPLS instances. After PE1 determines the VPWS instance 1 associated with VPLS instance 1, it determines the routing forwarding table of the VPWS instance 1 in PE1 (that is, the associated forwarding table), determines the port corresponding to the VPWS instance 1 in PE2 (that is, the second VPWS instance) as the egress port of the first message according to the routing forwarding table of the VPWS instance 1 in PE1, and forwards the first message from the egress port of the first message to the VPWS instance 1 in PE2 through the VPWS instance 1 in PE1. Figure 6 As shown, the PE1 first forwards the first message from the egress port of the first message to, for example, the VPWS instance 1 in P1 through the VPWS instance 1 in the PE1. After receiving the first message, the P1 forwards the first message to the VPWS instance 1 in PE2 through the VPWS instance 1 in the P1. The first message may carry the associated indication information of the VPWS instance 1, such as the identifier of the VPN service, to instruct the PE2 to forward the first message to the CE device through the VPWS instance 1 in the PE2.

[0139] The above example is explained by assuming that both PE1 and PE2 carry VPWS instance 1. In specific implementation, the actual contents of the corresponding VPWS instances carried by PE1 and PE2 are usually different due to localized implementation, but the two have a corresponding relationship because they carry the same service. For ease of understanding and description, the two are collectively referred to as VPWS instance 1.

[0140] In summary, in the message transmission method provided by the embodiment of the present application, the first network device is a device in a VPLS network, the second network device is a device in a VPWS network, the first VPWS instance in the first network device and the second VPWS instance in the second network device are VPWS instances used to carry the same service, and the first VPLS instance in the first network device is associated with the first VPWS instance in the first network device. After the first network device receives the first message sent to the first user-side device connected to the second network device through the first VPLS instance, the first network device determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance, and forwards the first message to the second VPWS instance in the second network device through the first VPWS instance. As a result, the first network device can forward the message sent to the first user-side device without learning the MAC address of the first user-side device, which helps to reduce the pressure on the first network device to learn the MAC address, simplify the MAC table entries of the first network device, and ensure the message forwarding performance of the network system. Moreover, after the second network device receives the first message, it can forward the first message according to the forwarding mechanism of VPWS through the second VPWS instance in the second network device. The second network device can forward the message sent to the first user side device without learning the MAC address of the first user side device, which helps to reduce the pressure of learning MAC addresses on the second network device and simplify the MAC table entries of the second network device.

[0141] In the embodiment of the present application, a VPWS instance in the first network device can be associated with a VPLS instance or multiple VPLS instances, different VPLS instances can be associated with different VPWS instances, and each VPLS instance can be associated with a VPWS instance via an AC port in the VPLS instance. The message transmission method of the present application can also be as follows Figure 7 shown.

[0142] For example, please refer to Figure 7 , which shows a schematic diagram of another message transmission method provided by an embodiment of the present application, the message transmission method can be applied to a system including a first network device and a second network device, the first network device is a device in a VPLS network, and the second network device is a device in a VPWS network. Figure 7 As shown, the method may include:

[0143] S701. A first network device receives a first message through a first VPLS instance in the first network device, wherein the first message is a message sent to a first user-side device connected to a second network device.

[0144] S702: The first network device determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance in the first network device.

[0145] S703: The first network device forwards the first message to the second VPWS instance in the second network device through the first VPWS instance, wherein the first VPWS instance and the second VPWS instance are VPWS instances used to carry the same service.

[0146] The implementation process of S701 to S703 can refer to Figure 4 The illustrated embodiments will not be described in detail here.

[0147] S704: The first network device receives a second message through a second VPLS instance in the first network device, wherein the second message is a message sent to a second user-side device connected to the second network device.

[0148] The second message may come from a broadband access device (such as BRAS1), and the first network device may receive the second message through a second port of a second VPLS instance in the first network device, and the second port may be a port in the second VPLS instance. The schematic diagram of the second VPLS instance can refer to Figure 5 , I will not go into details here.

[0149] S705: The first network device determines the third VPWS instance according to the association relationship between the second VPLS instance and the third VPWS instance in the first network device.

[0150] At least one VPWS instance may be configured in the first network device, and a VPWS instance in the first network device may be associated with one or more VPLS instances. The third VPWS instance is a VPWS instance in the first network device, and a second VPLS instance in the first network device is associated with the third VPWS instance. The first network device may determine the third VPWS instance based on the association between the second VPLS instance and the third VPWS instance.

[0151] Optionally, the association relationship is a binding relationship, the second port in the second VPLS instance can be bound to the third VPWS instance, and the first network device can determine the third VPWS instance having a binding relationship with the second VPLS instance based on the port in the second VPLS instance that receives the first message being the second port.

[0152] S706: The first network device forwards the second message to a fourth VPWS instance in the second network device through the third VPWS instance, wherein the third VPWS instance and the fourth VPWS instance are VPWS instances used to carry the same service.

[0153] The fourth VPWS instance may be a VPWS instance in the second network device, the third VPWS instance in the first network device and the fourth VPWS instance are VPWS instances used to carry the same service, and the third VPWS instance may correspond to the fourth VPWS instance. Optionally, the first network device may determine the routing and forwarding table of the third VPWS instance in the first network device, and forward the second message to the fourth VPWS instance in the second network device through the third VPWS instance according to the routing and forwarding table of the third VPWS instance. For example, the first network device may determine the fourth VPWS instance in the second network device according to the routing and forwarding table of the third VPWS instance, and determine the egress port of the second message in the port of the third VPWS instance by looking up the routing and forwarding table of the third VPWS instance, and forward the second message to the fourth VPWS instance in the second network device through the egress port of the second message in the third VPWS instance. Among them, the egress port of the second message in the third VPWS instance corresponds to the fourth VPWS instance in the second network device.

[0154] Above Figure 4 and Figure 7 The illustrated embodiment takes the transmission of a downlink message by a first network device (e.g., a message sent from a broadband access device to a user-side device) as an example. The message transmission method provided in the present application can also be used to transmit an uplink message (e.g., a message sent from a user-side device to a broadband access device). The process of the first network device transmitting an uplink message is introduced below.

[0155] For example, please refer to Figure 8 , which shows a flowchart of another message transmission method provided by an embodiment of the present application, the message transmission method can be applied to a system including a first network device and a second network device, the first network device is a device in a VPLS network, and the second network device is a device in a VPWS network. Figures 1 to 3 As shown, the first network device may be PE1, and the second network device may be PE2. Figure 8 As shown, the method may include:

[0156] S801. A first network device receives a third message sent by a second VPWS instance in a second network device through a first VPWS instance in the first network device, wherein the first VPWS instance in the first network device and the second VPWS instance in the second network device are VPWS instances for carrying the same service.

[0157] Optionally, at least one VPWS instance may be configured in the first network device and the second network device respectively, the first VPWS instance is a VPWS instance in the first network device, the second VPWS instance is a VPWS instance in the second network device, the first VPWS instance and the second VPWS instance are VPWS instances used to carry the same service, and the first VPWS instance and the second VPWS instance may correspond. The second network device may send a third message to the first VPWS instance in the first network device through the second VPWS instance in the second network device, and the first network device may receive the third message through the first VPWS instance in the first network device. The third message may originate from a user-side device. For example, Figures 1 to 3 As shown, the first VPWS instance is VPWS instance 1 in PE1, the second VPWS instance is VPWS instance 1 in PE2, and the third message may originate from VM1.

[0158] The following introduces the relevant contents of the VPWS instance in the first network device.

[0159] Optionally, each VPWS instance in the first network device may include at least one port, each port having a type, and in the VPWS instance, the type of each port may be one of a virtual port type or an EVPN Peer type. Among them, a port of a virtual port type may be referred to as a virtual port, a port of an EVPN Peer type may be referred to as an EVPN Peer port, and an EVPN Peer port may be used for the first network device to communicate with a remote device (e.g., a remote PE device), and the content of the virtual port will be described below. Since the first VPWS instance is a VPWS instance in the first network device, the type of the port in the first VPWS instance may be one of a virtual port type or an EVPN Peer type. Optionally, the first VPWS instance includes a port of a virtual port type, and the first VPWS instance may also include a port of an EVPN Peer type, that is, the first VPWS instance may include a virtual port and an EVPN Peer port. For example, each VPWS instance in the first network device includes a virtual port and an EVPN Peer port, and the VPWS instance in the first network device may also include ports of other types, which is not limited in the embodiments of the present application.

[0160] Optionally, at least one VPLS instance is further configured in the first network device, each VPLS instance may include at least one port, each port has a type, and in the VPLS instance, the type of each port may be one of the EVPN Peer type and the AC type. Among them, the AC type port may be called an AC port, and the AC port may be used for the first network device to communicate with a broadband access device (such as a BRAS). The first VPLS instance may be a VPLS instance in the first network device, and the type of the port in the first VPLS instance may be one of the EVPN Peer type and the AC type. Optionally, the first VPLS instance includes at least one of an AC type port and an EVPN Peer type port, for example, the first VPLS instance includes an AC type port and an EVPN Peer type port (that is, the first VPLS instance includes an AC port and an EVPN Peer port). Optionally, each VPLS instance in the first network device includes an AC port and an EVPN Peer port, and the VPLS instance in the first network device may also include ports of other types, which is not limited in the embodiments of the present application. In the case where the first VPLS instance includes multiple AC ports, the multiple AC ports can be isolated from each other so that the broadband access devices corresponding to the multiple AC ports are isolated from each other, thereby preventing the broadband access devices corresponding to the multiple AC ports from accessing each other. For example, a switch can be configured in the first VPLS instance to control the isolation of the multiple AC ports included in the first VPLS instance through the switch.

[0161] In an embodiment of the present application, each VPWS instance in the first network device can be associated (or referred to as bound) with at least one VPLS instance in the first network device, and each VPLS instance in the first network device can be associated (or referred to as bound) with a VPWS instance in the first network device, so that the VPWS instance and the VPLS instance can be connected in the first network device. As an optional implementation method, the virtual port of the VPWS instance in the first network device can indicate the VPLS instance in the first network device, and this indication method allows the VPLS instance in the first network device to be associated with the VPWS instance in the first network device, thereby realizing the connection between the VPWS instance and the VPLS instance in the first network device. The following takes the example of the virtual port of the first VPWS instance in the first network device indicating the VPLS instance in the first network device to introduce the relevant content of the association between the VPWS instance and the VPLS instance in the first network device.

[0162] Optionally, the virtual port of the first VPWS instance in the first network device may indicate a VPLS instance in the first network device, so that the first VPWS instance is associated with the VPLS instance in the first network device through the virtual port in the first VPWS instance. The first VPWS instance may include one or more virtual ports. In the case where the first VPWS instance includes multiple virtual ports, the multiple virtual ports may indicate different VPLS instances in the first network device, so that the first VPWS instance is associated with multiple different VPLS instances in the first network device. In the case where the first VPWS instance includes multiple virtual ports, the multiple virtual ports may be isolated from each other, so that the VPLS instances indicated by the multiple virtual ports are isolated from each other, and the broadband access devices corresponding to the VPLS instances indicated by the multiple virtual ports are prevented from visiting each other. For example, a switch may be configured in the first VPWS instance, and the multiple virtual ports included in the first VPWS instance may be controlled by the switch to be isolated from each other. In an embodiment of the present application, the VPLS instance indicated by the virtual port of the first VPWS instance is associated with the first VPWS instance due to this indication relationship, and the VPLS instance associated with the first VPWS instance can correspond one-to-one with the virtual port in the first VPWS instance, that is, each virtual port in the first VPWS instance can indicate a VPLS instance in the first network device, and a VPLS instance in the first network device can be indicated by a virtual port in the first VPWS instance. Optionally, the first VPWS instance may include a first virtual port, and the first virtual port may indicate a first VPLS instance in the first network device. Fig. 9 This section describes the relationship between VPWS instances and VPLS instances.

[0163] For example, please refer to Fig. 9 , which shows a first network device (eg Figures 1 to 3 Schematic diagram of the relationship between the VPWS instance and the VPLS instance in PE1). Fig. 9As shown, the VPWS instance 1 (e.g., the first VPWS instance) in the first network device includes three EVPN Peer ports, namely EVPN Peer1, EVPN Peer2, and EVPN Peer3, and two virtual ports, namely, virtual port 1 and virtual port 2. The first network device includes two VPLS instances, namely, VPLS instance 1 and VPLS instance 2. The VPLS instance 1 includes one EVPN Peer port, namely, EVPN Peer11, and three AC ports, namely, AC11, AC12, and AC13. The VPLS instance 2 includes one EVPN Peer port, namely, EVPN Peer21, and three AC ports, namely, AC21, AC22, and AC23. Among them, the virtual port 1 in the VPWS instance 1 is used to indicate the VPLS instance 1, and the virtual port 2 in the VPWS instance 1 is used to indicate the VPLS instance 2. The virtual port 1 and the virtual port 2 can be isolated from each other. In the VPLS instance 1, AC11, AC12, and AC13 can be isolated from each other, and AC11, AC12, AC13, and EVPN Peer11 can be isolated from each other. In VPLS instance 2, AC21, AC22, and AC23 can be isolated from each other, and AC21, AC22, AC23, and EVPNPeer21 can be isolated from each other. Fig. 9 The relationship diagram shown can determine that, in the first network device, VPWS instance 1 is associated with VPLS instance 1 and VPLS instance 2 respectively, the VPLS instance 1 can be associated only with the VPWS instance 1, and the VPLS instance 2 can be associated only with the VPWS instance 1, and the embodiment of the present application does not limit this.

[0164] Optionally, in the first network device, the EVPN Peer port in the VPLS instance may include a protection port, and the protection port may be used for the VPLS instance in the first network device to communicate with the VPLS instance in the protection device of the first network device (for example, a remote device that plays a forwarding protection role). For example, in the VPLS instance, the protection port may be a backup port of one or several ports in the VPLS instance (for the convenience of description, the one or several ports are referred to as the primary port). When the primary port is in an unavailable state (for example, a DOWN state), the first network device may forward the message that should be forwarded through the primary port to the VPLS instance in the protection device of the first network device through the protection port, so that the VPLS instance in the protection device may subsequently forward the message. Similarly, in the first network device, the EVPN Peer port in the VPWS instance may include a protection port, and the protection port may be used for the VPWS instance in the first network device to communicate with the VPWS instance in the protection device of the first network device. For example, in the VPWS instance, the protection port can be a backup port of one or several ports in the VPWS instance (for the sake of convenience of description, the one or several ports are called primary ports), so that when the primary port is unavailable, the first network device forwards the message that should be forwarded through the primary port to the VPWS instance in the protection device of the first network device through the protection port, so that the VPWS instance in the protection device can subsequently forward the message.

[0165] For example, Fig. 9 As shown, EVPN Peer3 in VPWS instance 1 can be the protection port of VPWS instance 1, EVPN Peer11 in VPLS instance 1 can be the protection port of VPLS instance 1, and EVPN Peer21 in VPLS instance 2 can be the protection port of VPLS instance 2. Figure 2 and Figure 3 , PE4 can be the protection device of PE1. Please refer to Fig.10 , which shows a schematic diagram of the relationship between PE1 and PE4 provided in an embodiment of the present application, wherein the contents of the VPWS instance and the VPLS instance in PE4 can be referred to Fig. 9 The relevant description is not repeated here, and the relationship between PE1 and PE4 is mainly introduced here. Fig.10As shown, the EVPN Peer11 (protection port) of the VPLS instance 1 in PE1 is connected to the EVPNPeer11 (protection port) of the VPLS instance 1 in PE4, and a VPLS protection channel is formed between the two. The EVPN Peer3 (protection port) of the VPWS instance 1 in PE1 is connected to the EVPN Peer3 (protection port) of the VPWS instance 1 in PE4, and a VPWS protection channel is formed between the two. In the VPLS instance 1 of PE1, EVPN Peer11 can be a backup port of AC11 to AC13. When a port (for example, AC11) among the AC11 to AC13 is unavailable, the PE1 can forward the message that should be forwarded through the AC11 to the VPLS instance 1 in the PE4 through the EVPNPeer11, so that the VPLS instance 1 in the PE4 can subsequently forward the message. Similarly, in the VPWS instance 1 of PE1, EVPN Peer3 can be a backup port of virtual port 1 and virtual port 2. When a port (for example, virtual port 1) of the virtual port 1 and virtual port 2 is in an unavailable state, the PE1 can forward the message that should be forwarded by the VPLS instance 1 indicated by the virtual port 1 to the VPWS instance 1 in the PE4 through the EVPN Peer3, so that the VPWS instance 1 in the PE4 can subsequently forward the message.

[0166] In the embodiment of the present application, the protection port in the VPLS instance and the protection port in the VPWS instance may be a port that plays a protective role in the uplink forwarding process, and the protection port may not be used for forwarding protection in the downlink forwarding process, and the embodiment of the present application does not limit this. Fig. 9 and Fig.10As shown, for VPLS instance 1 in PE1, when the traffic (upstream traffic) that should be forwarded through a port (for example, AC11) among AC11 to AC13 cannot be forwarded through AC11 because AC11 is in an unavailable state, PE1 can forward the traffic through EVPN Peer11, and the traffic (downstream traffic) that flows into VPLS instance 1 through AC11 to AC13 can be forwarded by PE1 without passing through EVPN Peer11. For VPWS instance 1 in PE1, when the traffic (upstream traffic) that should be forwarded according to a port (for example, virtual port 1) among virtual port 1 and virtual port 2 cannot be forwarded because virtual port 1 is in an unavailable state, PE1 can forward the traffic through EVPN Peer3, and the traffic (downstream traffic) that flows into VPWS instance 1 through virtual port 1 and virtual port 2 can be forwarded by PE1 without passing through EVPN Peer3. The situation of VPLS instance 2 is the same as that of VPLS instance 1, and will not be described in detail here.

[0167] S802: The first network device forwards the third message according to the first VPLS instance associated with the first VPWS instance in the first network device.

[0168] Optionally, the first network device parses the third message to determine the destination address carried in the third message, and then determines a first virtual port corresponding to the destination address in the first VPWS instance of the first network device based on the destination address carried in the third message. The first virtual port can be used to indicate a first VPLS instance in the first network device. Thereafter, the first network device forwards the third message based on the first virtual port, thereby enabling the first network device to forward the third message based on the first VPLS instance associated with the first VPWS instance.

[0169] Optionally, the destination address carried in the third message may be a broadcast address or a unicast address. For example, the third message may be a message sent by a user-side device (e.g., VM1) when requesting access to a broadband access device, and the destination address carried in the third message may be a broadcast address; for another example, the third message may be a message sent by a user-side device after accessing a specific broadband access device (e.g., BRAS1) for obtaining data from the broadband access device, and the destination address carried in the third message may be a unicast address. If the destination address carried in the third message is a broadcast address, the first network device may determine one or more virtual ports corresponding to the destination address in the first VPWS instance based on the destination address carried in the third message, and the one or more virtual ports include the first virtual port; if the destination address carried in the third message is a unicast address, the first network device may determine a virtual port corresponding to the destination address in the first VPWS instance based on the destination address carried in the third message, and the one virtual port is the first virtual port.

[0170] The following describes the implementation process of the first network device in S802 determining the first virtual port corresponding to the destination address in the first VPWS instance of the first network device according to the destination address carried in the third message. The implementation process is applicable to the case where the destination address is a broadcast address or a unicast address.

[0171] Optionally, the first network device may maintain a routing table for the first VPWS instance of the first network device, and the first network device may determine the first virtual port corresponding to the destination address based on the port corresponding to the destination address carried in the third message in the routing table of the first VPWS instance as a virtual port. That is, the first network device determines the first virtual port corresponding to the destination address carried in the third message in the port of the first VPWS instance based on the routing table of the first VPWS instance. The routing table of the first VPWS instance described here may be a MAC routing table of the first VPWS instance, and the routing table of the first VPWS instance may record the correspondence between the address (e.g., MAC address) and the port identifier. In the routing table of the first VPWS instance, the port identifier may be used to indicate the port corresponding to the corresponding address in the first VPWS instance and the type of the port, or the port identifier is only used to indicate the port corresponding to the corresponding address in the first VPWS instance. Optionally, there may be at least two port identifiers corresponding to the same address in the routing forwarding table of the first VPWS instance to indicate at least two ports, and the at least two ports may include a primary port and a backup port corresponding to the address. As an optional implementation scheme, for the case where the same address corresponds to at least two port identifiers, the routing forwarding table of the first VPWS instance may also record primary and backup identification information corresponding to the at least two port identifiers to identify the primary port or the backup port of the at least two ports indicated by the at least two port identifiers. For example, the routing forwarding table of the first VPWS instance also includes a primary and backup information identification column, and the primary and backup identification information for identifying the primary port or the backup port may be located in the primary and backup identification information column. Optionally, for the case where one address corresponds to one port identifier, the corresponding item in the primary and backup identification information column of the routing forwarding table of the first VPWS instance may be empty, or the identification information in the corresponding item in the primary and backup identification information column identifies the corresponding port as the primary port, which is not limited in the embodiments of the present application.

[0172] According to the different contents indicated by the port identifier (the port identifier only indicates the port or indicates the port and the type of the port), the routing and forwarding table of the first VPWS instance may include two possible implementations, and accordingly, the first network device may determine the first virtual port corresponding to the destination address carried in the third message according to the routing and forwarding table of the first VPWS instance, which may include two possible implementations. The following introduces the routing and forwarding table of the first VPWS instance and the implementation process of the first network device determining the first virtual port corresponding to the destination address carried in the third message according to the routing and forwarding table of the first VPWS instance in two possible implementations according to the different contents indicated by the port identifier and the contents of the primary and backup ports.

[0173] The first implementation method: the routing table of the first VPWS instance records the correspondence between the address and the port identifier, and the port identifier is used to indicate the port corresponding to the corresponding address in the first VPWS instance and the type of the port. Optionally, the type of the port identifier of each type of port is different, and each type of port identifier can indicate a type of port, so that in the routing table of the first VPWS instance, the port identifier can be used to indicate both the port and the type of the port. For the case where at least two port identifiers correspond to the same address, the routing table of the first VPWS instance can also record the primary and standby identifier information corresponding to the at least two port identifiers. The first network device can determine the address that matches (for example, is the same as) the destination address carried in the third message from the routing table of the first VPWS instance, and determine the port identifier corresponding to the address that matches the destination address. If there is a port identifier corresponding to the address that matches the destination address in the routing table of the first VPWS instance, the first network device determines the virtual port indicated by the port identifier as the first virtual port corresponding to the destination address carried in the third message. If there are at least two port identifiers corresponding to the address matching the destination address in the routing forwarding table of the first VPWS instance, the first network device determines the first virtual port corresponding to the destination address carried in the third message based on the at least two port identifiers and the primary and backup identification information corresponding to the at least two port identifiers recorded in the routing forwarding table of the first VPWS instance.

[0174] For example, the routing forwarding table of the first VPWS instance may be as shown in Table 1 below. Table 1 takes the address in the routing forwarding table of the first VPWS instance as a MAC address as an example. Each row of Table 1 below may be a forwarding table entry. It can be understood that the routing forwarding table shown in Table 1 below is the MAC forwarding table of the first VPWS instance:

[0175] Table 1

[0176] address Port ID Active / standby identification information MAC Address 1 V-P1 Primary Port MAC Address 1 EVPN Peer-P3 Backup port MAC Address 2 V-P2 Primary Port MAC Address 2 EVPN Peer-P3 Backup port

[0177] As shown in Table 1, the routing forwarding table of the first VPWS instance records MAC address 1 and MAC address 2 as well as the port identifiers corresponding to the respective MAC addresses. Fig. 9, port identifiers V-P1 and V-P2 can indicate virtual port 1 and virtual port 2 respectively, and port identifier EVPN Peer-P3 can indicate EVPN Peer3. MAC address 1 and MAC address 2 correspond to two port identifiers respectively, so the routing forwarding table of the first VPWS instance also records the primary and backup identifier information corresponding to the two port identifiers. Among the two port identifiers corresponding to MAC address 1, the primary and backup identifier information corresponding to port identifier V-P1 is "primary port", and the primary and backup identifier information corresponding to port identifier EVPN Peer-P3 is "backup port", so the virtual port 1 indicated by the port identifier V-P1 is the primary port corresponding to MAC address 1, and the EVPN Peer3 indicated by the port identifier EVPN Peer-P3 is the backup port corresponding to MAC address 1. The situation of MAC address 2 is the same as that of MAC address 1, and will not be repeated here.

[0178] Assume that the first network device determines from the routing forwarding table shown in Table 1 that the address matching the destination address carried in the third message is MAC address 1. According to Table 1, the port identifiers corresponding to the MAC address 1 in the routing forwarding table are V-P1 and EVPN Peer-P3. Since the primary and backup identification information corresponding to the port identifier V-P1 is "primary port" and the primary and backup identification information corresponding to the port identifier EVPNPeer-P3 is "backup port", the first network device determines the virtual port 1 indicated by the port identifier V-P1 as the first virtual port corresponding to the destination address carried in the third message.

[0179] The second implementation manner: the routing forwarding table of the first VPWS instance records the correspondence between the address and the port identifier, and the port identifier is used to indicate the port corresponding to the corresponding address in the first VPWS instance. In this case, the routing forwarding table of the first VPWS instance can also record the port type, and the port type is used to indicate the type of the port indicated by the corresponding port identifier. That is, in the second implementation manner, the routing forwarding table of the first VPWS instance can record the correspondence between the address, the port identifier and the port type. For the case where at least two port identifiers correspond to the same address, the routing forwarding table of the first VPWS instance can also record the primary and standby identification information corresponding to the at least two port identifiers. The first network device can determine the address that matches (for example, is the same as) the destination address carried in the third message from the routing forwarding table of the first VPWS instance, and determine the port identifier corresponding to the address that matches the destination address. If there is a port identifier corresponding to the address that matches the destination address in the routing forwarding table of the first VPWS instance, the first network device determines the virtual port indicated by the port identifier as the first virtual port corresponding to the destination address carried in the third message. If there are at least two port identifiers corresponding to the address matching the destination address in the routing forwarding table of the first VPWS instance, the first network device determines the first virtual port corresponding to the destination address carried in the third message based on the at least two port identifiers and the primary and backup identification information corresponding to the at least two port identifiers recorded in the routing forwarding table of the first VPWS instance.

[0180] For example, the routing forwarding table of the first VPWS instance may be as shown in Table 2 below. Table 2 takes the address in the routing forwarding table of the first VPWS instance as a MAC address as an example. Each row of Table 2 below may be a forwarding table entry. It can be understood that the routing forwarding table shown in Table 2 below is the MAC forwarding table of the first VPWS instance:

[0181] Table 2

[0182] address Port ID Port Type Active / standby identification information MAC Address 1 P1 Virtual port type Primary Port MAC Address 1 P3 EVPN Peer Type Backup port MAC Address 2 P2 Virtual port type Primary Port MAC Address 2 P3 EVPN Peer Type Backup port

[0183] As shown in Table 2, the routing table of the first VPWS instance records MAC address 1 and MAC address 2 and the port identifiers corresponding to the MAC addresses. Port identifiers P1 to P3 can indicate ports 1 to 3 in the first VPWS instance in turn. The types of ports indicated by port identifiers P1 and P2 are both virtual port types, and the types of ports indicated by port identifier P3 are all EVPN Peer types. Fig. 9, port identifiers P1 and P2 indicate virtual port 1 and virtual port 2 respectively, and port identifier P3 indicates EVPN Peer 3. MAC address 1 and MAC address 2 correspond to two port identifiers respectively, so the routing forwarding table of the first VPWS instance also records the primary and backup identifier information corresponding to the two port identifiers. Among the two port identifiers corresponding to MAC address 1, the primary and backup identifier information corresponding to port identifier P1 is "primary port", and the primary and backup identifier information corresponding to port identifier P3 is "backup port", so the virtual port 1 indicated by the port identifier P1 is the primary port corresponding to the MAC address 1, and the EVPN Peer 3 indicated by the port identifier P3 is the backup port corresponding to the MAC address 1.

[0184] Assume that the first network device determines from the routing forwarding table of the first VPWS instance as shown in Table 2 that the address matching the destination address carried in the third message is MAC address 1. According to Table 2, the port identifiers corresponding to the MAC address 1 in the routing forwarding table of the first VPWS instance are P1 and P3. Since the primary and backup identification information corresponding to the port identifier P1 is "primary port" and the primary and backup identification information corresponding to the port identifier P3 is "backup port", the first network device determines the virtual port 1 indicated by the port identifier P1 as the first virtual port corresponding to the destination address carried in the third message.

[0185] The above description of the embodiment of the present application is based on the example that the destination address carried in the third message hits two forwarding table entries in the routing forwarding table of the first VPWS instance, and the destination address is a unicast address (the first network device determines the first virtual port corresponding to the destination address according to one of the two forwarding table entries). Optionally, if the destination address carried in the third message hits at least two forwarding table entries in the routing forwarding table of the first VPWS instance, and the destination address carried in the third message is a broadcast address, the first network device can broadcast the third message according to the at least two forwarding table entries.

[0186] In the above examples of the embodiments of the present application, the forwarding table entry corresponding to the primary port can be called the primary forwarding table entry, and the forwarding table entry corresponding to the backup port can be called the backup forwarding table entry. The above examples are illustrated by taking the first virtual port corresponding to the destination address carried in the third message determined by the first network device according to the primary forwarding table entry as an example. In a possible implementation, if the primary forwarding table entry is unavailable, the first network device can determine the virtual port corresponding to the destination address carried in the third message according to the backup forwarding table entry (if such a backup forwarding table entry exists). Wherein, the unavailability of the primary forwarding table entry includes but is not limited to: the port failure indicated by the port identifier in the primary forwarding table entry (for example, the VPLS instance failure indicated by the virtual port), or other devices or port failures connected to the port indicated by the port identifier in the primary forwarding table entry, etc., and the embodiments of the present application do not limit this. The above Tables 1 and 2 are illustrated by taking the different port identifiers corresponding to the same MAC address as examples in different forwarding table entries. In actual applications, the different port identifiers corresponding to the same MAC address can also be located in the same forwarding table entry corresponding to the MAC address, and the primary and backup relationship can be determined by the corresponding identification information. The embodiments of the present application do not limit the specific form of the forwarding table entry in the routing forwarding table of the VPWS instance. Optionally, if the destination address carried in the third message hits at least two forwarding entries in the routing forwarding table of the first VPWS instance, the first network device may also determine the first virtual port corresponding to the destination address carried in the third message according to the priority, which is not described in detail in this embodiment of the present application.

[0187] It should be noted that, in the embodiment of the present application, the virtual port included in the VPWS instance can actually be understood as identification information stored in the VPWS instance for indicating a VPLS instance. In a possible natural implementation, the identification information can be stored in the routing forwarding table of the VPWS instance and placed together with ports of types such as EVPN peer ports in the port information column of the routing forwarding table of the VPWS instance, so that the first network device can query the routing forwarding table of the VPWS instance according to the destination address carried in the message received by the VPWS instance to determine whether the message needs to be forwarded through the EVPN peer port of the VPWS instance or through the VPLS instance identified by the virtual port. Therefore, for ease of understanding, the identification information of the VPLS instance is referred to as a virtual port here, but in other possible implementations, the identification information of the VPLS instance called a virtual port can also be stored in other possible locations of the VPWS instance, and can be obtained by the VPWS instance in a feasible manner to determine the VPLS instance associated with the VPWS instance. For example, the identification information of the VPLS instance called the virtual port can also be stored in another list independent of the routing table of the VPWS instance, and the information in the other list can be associated with the port information column of the routing table of the VPWS instance to indicate that the information in the other list is the same or similar to the information in the port information column of the routing table. The identification information and virtual port of the VPLS instance can be considered to be equivalent concepts in possible application scenarios of the present application.

[0188] The above is the implementation process of the first network device determining the first virtual port corresponding to the destination address carried in the third message in S802. The following describes the implementation process of the first network device forwarding the third message according to the first virtual port in S802.

[0189] Optionally, the first network device determines the routing table of the first VPLS instance indicated by the first virtual port according to the first virtual port corresponding to the destination address carried in the third message, and forwards the third message according to the routing table of the first VPLS instance. The routing table of the first VPLS instance may be a MAC forwarding table, and the corresponding relationship between the address (such as the MAC address) and the port identifier may be recorded in the routing table of the first VPLS instance, and the port identifier is used to indicate the port corresponding to the corresponding address in the first VPLS instance. Optionally, there may be at least two port identifiers corresponding to the same address in the routing table of the first VPLS instance to indicate at least two ports, and the at least two ports may include the primary port and the backup port corresponding to the address. As an optional implementation scheme, for the case where the same address corresponds to at least two port identifiers, the routing table of the first VPLS instance may also record the primary and backup identification information corresponding to the at least two port identifiers to identify the primary port or the backup port of the at least two ports indicated by the at least two port identifiers. For example, the routing table of the first VPLS instance also includes a primary and backup information identification column, and the primary and backup identification information used to identify the primary port or the backup port may be located in the primary and backup identification information column. Optionally, for the case where one address corresponds to one port identifier, the corresponding item in the primary-backup identifier information column in the routing forwarding table of the first VPLS instance may be empty, or the identifier information in the corresponding item in the primary-backup identifier information column identifies the corresponding port as the primary port. This embodiment of the present application does not limit this.

[0190] For example, the routing forwarding table of the first VPLS instance may be as shown in Table 3 below. Table 3 takes the address in the routing forwarding table of the first VPLS instance as a MAC address as an example. Each row of Table 3 below may be a forwarding table item. It can be understood that the routing forwarding table shown in Table 3 below is the MAC forwarding table of the first VPLS instance:

[0191] Table 3

[0192] address Port ID Active / standby identification information MAC Address 1 P11 Primary Port MAC Address 1 P14 Backup port MAC Address 3 P12 Primary Port MAC Address 3 P14 Backup port MAC Address 4 P13 Primary Port MAC Address 4 P14 Backup port

[0193] As shown in Table 3, the routing forwarding table of the first VPLS instance records MAC address 1, MAC address 3, MAC address 4, and the port identifiers corresponding to the respective MAC addresses. Fig. 9, the first VPLS instance may be VPLS instance 1, port identifiers P11~P13 may indicate AC11~AC13 in sequence, and port identifier P14 may indicate EVPN Peer11. MAC address 1, MAC address 3, and MAC address 4 correspond to two port identifiers respectively, so the routing forwarding table of the first VPLS instance also records the primary and backup identifier information corresponding to the two port identifiers. Among the two port identifiers corresponding to MAC address 1, the primary and backup identifier information corresponding to port identifier P11 is "primary port", and the primary and backup identifier information corresponding to port identifier P14 is "backup port", so AC11 indicated by port identifier P11 is the primary port corresponding to MAC address 1, and EVPN Peer11 indicated by port identifier P14 is the backup port corresponding to MAC address 1. The situations of MAC address 3 and MAC address 4 are the same as those of MAC address 1, and are not described here.

[0194] Optionally, the first network device forwards the third message according to the routing table of the first VPLS instance indicated by the first virtual port corresponding to the destination address carried in the third message, which may include: the first network device determines the first egress port of the third message in the first VPLS instance according to the routing table of the first VPLS instance and the destination address carried in the third message, and the first network device forwards the third message through the first egress port of the third message according to the first egress port of the third message in the first VPLS instance being in an available state. The first network device may search the routing table of the first VPLS instance according to the destination address carried in the third message, so as to determine an address that matches (e.g., is the same as) the destination address carried in the third message from the routing table of the first VPLS instance, and determine a port identifier corresponding to the address that matches the destination address. If there is a port identifier corresponding to the address that matches the destination address in the routing table of the first VPLS instance, the first network device determines the port indicated by the port identifier as the first egress port of the third message. If there are at least two port identifiers corresponding to the address matching the destination address in the routing forwarding table of the first VPLS instance, the first network device determines the primary port of the at least two ports indicated by the at least two port identifiers as the first egress port of the third message based on the at least two port identifiers combined with the primary and backup identifier information corresponding to the at least two port identifiers. Then, the first network device can detect whether the first egress port is in an available state, and if the first egress port is in an available state, the first network device forwards the third message through the first egress port.

[0195] Optionally, the message transmission system provided in the embodiment of the present application further includes a third network device, the third network device is a device in the VPLS network, and the third network device may be a protection device of the first network device, for example, Figure 2and Figure 3 As shown, the first network device may be PE1, the third network device may be PE4, and the relationship between PE1 and PE4 may be as follows: Fig.10 As shown. In the case where the message transmission system includes the third network device, the first network device forwards the third message according to the routing forwarding table of the first VPLS instance indicated by the first virtual port corresponding to the destination address carried in the third message, and can also include: the first network device forwards the third message to the third VPLS instance in the third network device through the first VPLS instance according to the first egress port of the third message in the first VPLS instance being in an unavailable state. Among them, the first VPLS instance in the first network device and the third VPLS instance in the third network device can be VPLS instances for carrying the same service. As an optional implementation, there are at least two port identifiers corresponding to the address matching the destination address carried in the third message in the routing forwarding table of the first VPLS instance, and the at least two port identifiers indicate at least two ports in the first VPLS instance, and the at least two ports can include a primary port and a backup port, and the backup port can communicate with the third VPLS instance in the third network device. If the first network device determines that the first egress port of the third message is in an unavailable state, the first network device can forward the third message to the third VPLS instance through the backup port in the first VPLS instance. After the third message arrives at the third VPLS instance in the third network device, the third network device may forward the third message according to the routing forwarding table of the third VPLS instance.

[0196] Optionally, in the case where the message transmission system includes a third network device, the first network device forwards the third message according to the routing forwarding table of the first VPLS instance indicated by the first virtual port corresponding to the destination address carried in the third message, and may also include: the first network device determines that all ports of the first VPLS instance are in an unavailable state according to the routing forwarding table of the first VPLS instance, and the first network device forwards the third message to the fifth VPWS instance in the third network device through the first VPWS instance in the first network device based on the fact that all ports of the first VPLS instance are in an unavailable state. Among them, the first VPWS instance in the first network device and the fifth VPWS instance in the third network device are VPWS instances for carrying the same service. The fact that all ports of the first VPLS instance are in an unavailable state can be considered as the first virtual port being in an unavailable state. As an optional implementation, the routing table of the first VPWS instance contains at least two port identifiers corresponding to the addresses matching the destination address carried in the third message, and the at least two port identifiers indicate at least two ports in the first VPWS instance, and the at least two ports include a primary port and a backup port, and the backup port can communicate with the fifth VPWS instance in the third network device. If the first network device determines that all ports of the first VPLS instance are in an unavailable state, the first network device forwards the third message to the fifth VPWS instance in the third network device through the backup port in the first VPWS instance. Optionally, the routing table of the first VPLS instance contains at least two port identifiers corresponding to the addresses matching the destination address carried in the third message, and if the ports indicated by the at least two port identifiers are in an unavailable state, the first network device can forward the third message to the fifth VPWS instance through the first VPWS instance, and the embodiment of the present application does not limit this. After the third message reaches the fifth VPWS instance in the third network device, the third network device can forward the third message according to the routing table of the fifth VPWS instance.

[0197] For example, Fig.11 It is a schematic diagram of a message transmission method provided by an embodiment of the present application, the first network device may be PE1, the third network device may be PE4, the first VPLS instance may be VPLS instance 1 in PE1, the third VPLS instance may be VPLS instance 1 in PE4, the first VPWS instance is VPWS instance 1 in PE1, and the fifth VPWS instance is VPWS instance 1 in PE4. The routing forwarding table of the first VPLS instance is shown in Table 3, and the routing forwarding table of the first VPWS instance is shown in Table 1 or Table 2. Reference Fig.10 and Fig.11, assuming that the first network device determines from the routing table (Table 3) of the first VPLS instance that the address matching the destination address carried in the third message is MAC address 1. According to Table 3, the port identifiers corresponding to MAC address 1 in the routing table of the first VPLS instance are P11 and P14. Since the primary and backup identification information corresponding to port identifier P11 is "primary port" and the primary and backup identification information corresponding to port identifier P14 is "backup port", the first network device determines AC11 indicated by port identifier P11 as the first outbound port of the third message. If AC11 is in an available state, the first network device (that is, PE1) forwards the third message through AC11, and finally the third message can be forwarded according to Fig.11 The forwarding path S2 shown in FIG. 1 reaches BRAS1. If AC11 is in an unavailable state, the forwarding path S2 fails, and the first network device (ie, PE1) can forward the third message to the third VPLS instance (ie, VPLS instance 1 in PE4) in the third network device (ie, PE4) through the EVPN Peer11 indicated by the port identifier P14 in the first VPLS instance (ie, VPLS instance 1 in PE1) of the first network device (ie, VPLS instance 1 in PE4) (ie, VPLS instance 1 in PE1 forwards the third message to VPLS instance 1 in PE4 through the VPLS protection channel between VPLS instance 1 in PE4), and finally the third message can be forwarded according to Fig.11 The forwarding path S3 shown reaches BRAS1. Optionally, if all ports (including AC11, AC12, AC13 and EVPN Peer11) of the first VPLS instance (that is, the VPLS instance 1 in PE1) are in an unavailable state, it can be considered that the virtual port 1 in the first VPWS instance (that is, the VPWS instance 1 in PE1) is in an unavailable state. Combined with Table 1 or Table 2, it can be considered that the main forwarding table entry corresponding to MAC address 1 is in an unavailable state, then the forwarding path S2 fails, and the first network device (that is, PE1) can be connected to the EVPN indicated by the port identifier EVPN Peer-P3 (as shown in Table 1) or the port identifier P3 (as shown in Table 2) in the first VPWS instance of the first network device (that is, the VPWS instance 1 in PE1). Pe3 forwards the third message to the fifth VPWS instance (that is, VPWS instance 1 in PE4) in the third network device (that is, PE4) (that is, VPWS instance 1 in PE1 forwards the third message to VPWS instance 1 in PE4 through the VPWS protection channel between VPWS instance 1 in PE4 and VPWS instance 1 in PE4). Finally, the third message can be forwarded according to Fig.11 The forwarding path S3 shown reaches BRAS1.

[0198] The above example uses VPWS instance 1 carried on both PE1 and PE4 as an example. During implementation, the actual contents of the corresponding VPWS instances carried on PE1 and PE4 are usually different due to localized implementation, but they have a corresponding relationship because they carry the same service. For ease of understanding and description, the two are referred to as VPWS instance 1. Similarly, the actual contents of the corresponding VPLS instances carried on PE1 and PE4 are usually different due to localized implementation, but they have a corresponding relationship because they carry the same service. For ease of understanding and description, the two are referred to as VPLS instance 1 or VPLS instance 2.

[0199] In the above-mentioned technical solution provided by the present application, the first network device can determine the first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, and determine the first output port of the third message in the first VPLS instance indicated by the first virtual port. If the first output port is in an available state, the first network device forwards the third message through the first output port. If the first output port is in an unavailable state, the first network device forwards the third message through the backup port of the first output port. If all ports of the first VPLS instance are in an unavailable state, the first network device forwards the third message through the backup port of the first virtual port. This can avoid the loss of the third message due to the unavailability of the first output port of the third message, thereby reducing the packet loss rate of the network system.

[0200] In summary, in the message transmission method provided by the embodiment of the present application, the first network device is a device in a VPLS network, the second network device is a device in a VPWS network, the first VPWS instance in the first network device and the second VPWS instance in the second network device are VPWS instances used to carry the same service, the second network device can forward a third message to the first VPWS instance in the first network device through the second VPWS instance in the second network device, and the first network device can forward the third message according to the first VPLS instance associated with the first VPWS instance in the first network device. The technical solution provided by the present application realizes the docking of the first VPLS instance and the first VPWS instance in the first network device by associating the first VPLS instance in the first network device with the first VPWS instance, so that the first network device and the second network device can forward messages according to the forwarding mechanism of VPWS without learning the MAC address of the user-side device, which helps to reduce the pressure of learning MAC addresses of the first network device and the second network device, simplify the MAC table entries of the first network device and the second network device, and ensure the message forwarding performance of the network system. In addition, the first network device can dynamically select a broadband access device based on the traffic of the user-side device to provide broadband access services for the user-side device, which can improve the resource utilization efficiency of the broadband resource pool and improve the flexibility of the first network device in selecting broadband access devices for the user-side device, thereby improving the flexibility of the first network device in forwarding the traffic of the user-side device.

[0201] In the aforementioned embodiment, before forwarding the third message according to the first virtual port, the first network device may generate a forwarding table entry in the routing forwarding table of the first VPLS instance indicated by the first virtual port. Optionally, the first network device receives the fourth message through the third port of the first VPLS instance in the first network device, and generates a forwarding table entry in the routing forwarding table of the first VPLS instance according to the source address carried in the fourth message and the third port. Among them, the destination address in the forwarding table entry is the source address carried in the fourth message, and the port identifier in the forwarding table entry is used to indicate the third port. The third port may be an AC port or an EVPN peer port in the first VPLS instance, and the AC port in the first VPLS instance may correspond to (or be bound to) at least one broadband access device. The fourth message may be a message sent by a broadband access device (e.g., BRAS1) to a user-side device (e.g., VM1). The fourth message may enter the first VPLS instance through the AC port in the first VPLS instance, or may enter the first VPLS instance through the EVPN peer port in the first VPLS instance. The embodiment of the present application does not limit this.

[0202] Optionally, after receiving the fourth message through the third port of the first VPLS instance in the first network device, the first network device parses the fourth message to determine the source address carried in the fourth message from the fourth message, and generates a forwarding table entry in the routing forwarding table of the first VPLS instance according to the source address carried in the fourth message and the port identifier of the third port. As an optional implementation method, the first network device and the third network device can learn Ethernet segment (ES) routing, Ethernet segment autodiscovery (ES-AD) routing, etc. from each other, and the first network device can determine the primary and backup information of the third port based on this, and record the primary and backup identification information corresponding to the port identifier of the third port in the forwarding table entry according to the primary and backup information of the third port.

[0203] The first VPLS instance in the first network device is as follows Fig. 9 Taking the VPLS instance 1 shown as an example, the source address carried in the fourth message can be MAC address 1, and the first network device determines that the port identifier of the third port receiving the fourth message is P11, so the first network device generates a forwarding table entry in the routing forwarding table of the first VPLS instance according to the source address carried in the fourth message (that is, MAC address 1) and the port identifier of the third port is P11. Optionally, the first network device can also learn ES routing, ES-AD routing, etc. from the third network device, and determine the primary and backup information of the third port accordingly, and record the primary and backup identification information "primary port" corresponding to the port identifier P11 in the forwarding table according to the primary and backup information of the third port, and finally the forwarding table entry generated by the first network device is shown in the first row of Table 3 above.

[0204] In the aforementioned embodiment, the first network device may generate a forwarding table entry in the routing forwarding table of the first VPWS instance before determining the first virtual port corresponding to the destination address in the first VPWS instance of the first network device according to the destination address carried in the third message. Optionally, the first network device receives the fifth message through the first VPLS instance in the first network device, and generates a forwarding table entry in the routing forwarding table of the first VPWS instance according to the source address carried in the fifth message and the first VPLS instance. Wherein, the destination address in the forwarding table entry is the source address carried in the fifth message, and the port identifier in the forwarding table entry is used to indicate the first virtual port in the first VPWS instance, and the first virtual port is used to indicate the first VPLS instance in the first network device. The routing forwarding table of the first VPWS instance described here may be a MAC forwarding table of the first VPWS instance. Wherein, the fifth message may be a message sent by a broadband access device (e.g., BRAS1) to a user-side device (e.g., VM1), and the fifth message may reach the first VPWS instance through the first VPLS instance, which is not limited in the embodiment of the present application. The following describes a process in which the first network device generates a forwarding entry in the routing forwarding table of the first VPWS instance.

[0205] Optionally, the broadband access device corresponding to (or bound to) the first VPLS instance in the first network device can forward a fifth message to the first VPLS instance in the first network device. After receiving the fifth message through the first VPLS instance, the first network device can parse the fifth message to determine the source address carried in the fifth message from the fifth message, and determine the first virtual port corresponding to the first VPLS instance in the first VPWS instance of the first network device, and generate a forwarding table entry in the routing forwarding table of the first VPWS instance based on the source address carried in the fifth message and the port identifier of the first virtual port. As an optional implementation method, the first network device and the third network device can perform ES routing, ES-AD routing, etc. with each other, and the first network device can determine the primary and backup information of the first virtual port based on this, and record the primary and backup identification information corresponding to the port identifier of the first virtual port in the forwarding table entry based on the primary and backup information of the first virtual port.

[0206] Optionally, the port identifier of the first virtual port may only indicate the first virtual port, or the port identifier of the first virtual port may indicate the first virtual port and the type of the first virtual port. Then the first network device generates a forwarding entry in the routing forwarding table of the first VPWS instance according to the source address carried in the fifth message and the port identifier of the first virtual port, which may include: if the port identifier of the first virtual port indicates the first virtual port and the type of the first virtual port, the first network device generates a forwarding entry in the routing forwarding table of the first VPWS instance according to the source address carried in the fifth message and the port identifier of the first virtual port; if the port identifier of the first virtual port only indicates the first virtual port, the first network device may also determine the type of the first virtual port, and generate a forwarding entry in the routing forwarding table of the first VPWS instance according to the source address carried in the fifth message, the port identifier of the first virtual port and the type of the first virtual port.

[0207] For example, the first VPWS instance in the first network device is Fig. 9 Take the VPWS instance 1 in the fifth message as an example. The source address carried in the fifth message may be MAC address 1, and the first virtual port corresponding to the first VPLS instance (e.g., VPLS instance 1) in the first network device may be virtual port 1 in the first VPWS instance. The first network device determines that the port identifier of the virtual port 1 is V-P1. Since the port identifier V-P1 indicates the virtual port 1 and the type of the virtual port 1, the first network device generates a forwarding entry in the routing forwarding table of the first VPWS instance according to the source address (i.e., MAC address 1) carried in the fifth message and the port identifier V-P1 of the virtual port 1. The first network device may also learn ES routing, ES-AD routing, etc. from the third network device, and determine the primary and backup information of the virtual port 1 accordingly, and record the primary and backup identification information "primary port" corresponding to the port identifier V-P1 in the forwarding entry according to the primary and backup information of the virtual port 1. Finally, the forwarding entry generated by the first network device may be as shown in the first row in Table 1 above.

[0208] As another example, the first VPWS instance in the first network device is Fig. 9Take the VPWS instance 1 in the fifth message as an example. The source address carried in the fifth message may be MAC address 1, and the first virtual port corresponding to the first VPLS instance (e.g., VPLS instance 1) in the first network device may be virtual port 1 in the first VPWS instance. The first network device determines that the port identifier of the virtual port 1 is P1. Since the port identifier P1 only indicates the virtual port 1, the first network device can determine the type of the virtual port 1, and generate a forwarding table entry in the routing forwarding table of the first VPWS instance according to the source address (that is, MAC address 1) carried in the fifth message, the port identifier P1 of the virtual port 1, and the type of the virtual port 1. The first network device can also learn ES routing, ES-AD routing, etc. from the third network device, and determine the primary and backup information of the virtual port 1 accordingly, and record the primary and backup identification information "primary port" corresponding to the port identifier P1 in the forwarding table entry according to the primary and backup information of the virtual port 1. Finally, the forwarding table entry generated by the first network device can be as shown in the first row of forwarding table entries in Table 2 above.

[0209] In an embodiment of the present application, the port identifier used to indicate the first virtual port in the routing forwarding table of the first VPWS instance may be the identification information of the first VPLS instance indicated by the first virtual port, or other attribute information related to the first VPLS instance indicated by the first virtual port that enables the first VPWS instance to determine the first VPLS instance, for example, it may be information of a port in the first VPLS instance. For ease of understanding, the embodiment of the present application refers to it as a port identifier. Optionally, after the first network device receives the fifth message through the first VPLS instance in the first network device, it generates a forwarding entry in the routing forwarding table of the first VPWS instance according to the source address carried in the fifth message and the identification information of the first VPLS instance (or other attribute information that enables the first VPWS instance to determine the first VPLS instance), and the embodiment of the present application does not limit this.

[0210] The following describes the device embodiments of the present application, which can be used to execute the method of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0211] Please refer to Fig.12 , which shows a logical structure diagram of a first network device 1200 provided in an embodiment of the present application, the first network device 1200 is located in a message transmission system, the message transmission system also includes a second network device, the first network device 1200 is a device in a VPLS network, and the second network device is a device in a VPWS network. Fig.12 The first network device 1200 may include but is not limited to:

[0212] The receiving module 1210 is used to receive a first message through the first VPLS instance in the first network device, wherein the first message is a message sent to the first user-side device connected to the second network device. The function implementation of the receiving module 1210 can refer to the relevant description of S401 and S701 above.

[0213] The processing module 1220 is configured to determine the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance in the first network device. The implementation of the function of the processing module 1220 may refer to the related description of S402 and S702 above.

[0214] The forwarding module 1230 is used to forward the first message to the second VPWS instance in the second network device through the first VPWS instance, wherein the first VPWS instance and the second VPWS instance are VPWS instances for carrying the same service. The function implementation of the forwarding module 1230 can refer to the relevant description of S403 and S703 above.

[0215] Optionally, the association relationship is a binding relationship, and the receiving module 1210 is specifically used to receive the first message through the first port of the first VPLS instance; the processing module 1220 is specifically used to determine the first VPWS instance having a binding relationship with the first VPLS instance based on the port for receiving the first message being the first port.

[0216] Optionally, the receiving module 1210 is further configured to receive a second message through a second port of a second VPLS instance in the first network device 1200, wherein the second message is a message sent to a second user-side device connected to the second network device. The functional implementation of the receiving module 1210 may refer to the relevant description of S704 above.

[0217] The processing module 1220 is further configured to determine a third VPWS instance in the first network device 1200 that has a binding relationship with the second VPLS instance according to the port receiving the second message being the second port. The function implementation of the processing module 1220 may refer to the related description of S705 above.

[0218] The forwarding module 1230 is further configured to forward the second message to the fourth VPWS instance in the second network device through the third VPWS instance, wherein the third VPWS instance and the fourth VPWS instance are VPWS instances for carrying the same service. The implementation of the function of the forwarding module 1230 may refer to the relevant description of S706 above.

[0219] Optionally, the receiving module 1210 is further configured to receive a third message sent by a second VPWS instance in the second network device through the first VPWS instance in the first network device 1200. The implementation of the function of the receiving module 1210 may refer to the related description of S801 above.

[0220] The forwarding module 1230 is further configured to forward the third message according to the first VPLS instance associated with the first VPWS instance in the first network device 1200. The implementation of the function of the forwarding module 1230 may also refer to the related description of S802 above.

[0221] Optionally, the forwarding module 1230 is specifically used to: determine a first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, where the first virtual port is used to indicate the first VPLS instance; and forward the third message according to the first virtual port.

[0222] Optionally, the destination address is a broadcast address, and the forwarding module 1230 is specifically configured to: determine one or more virtual ports corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, and the one or more virtual ports include the first virtual port.

[0223] Optionally, the forwarding module 1230 is specifically configured to: determine a routing forwarding table of the first VPLS instance according to the first virtual port; and forward the third message according to the routing forwarding table of the first VPLS instance.

[0224] Optionally, the forwarding module 1230 is further specifically used to: determine the first egress port of the third message in the first VPLS instance based on the routing forwarding table of the first VPLS instance and the destination address carried in the third message; and forward the third message through the first egress port of the third message based on the first egress port of the third message in the first VPLS instance being in an available state.

[0225] Optionally, the system also includes: a third network device, which is a device in the VPLS network, and the forwarding module 1230 is further specifically used to: forward the third message to the third VPLS instance in the third network device through the first VPLS instance based on the first output port of the third message in the first VPLS instance being in an unavailable state, wherein the first VPLS instance in the first network device 1200 and the third VPLS instance in the third network device are VPLS instances used to carry the same service.

[0226] Optionally, the forwarding module 1230 is further specifically used to: determine, based on the routing forwarding table of the first VPLS instance, that all ports of the first VPLS instance are in an unavailable state; and forward the third message to the fifth VPWS instance in the third network device through the first VPWS instance in the first network device 1200 based on the fact that all ports of the first VPLS instance are in an unavailable state, wherein the first VPWS instance in the first network device 1200 and the fifth VPWS instance in the third network device are VPWS instances used to carry the same service.

[0227] Optionally, the receiving module 1210 is also used to receive a fourth message through the third port of the first VPLS instance before the forwarding module 1230 forwards the third message according to the first virtual port; the processing module 1220 is also used to generate a forwarding table entry in the routing forwarding table of the first VPLS instance based on the source address carried in the fourth message and the third port, wherein the destination address in the forwarding table entry is the source address carried in the fourth message, and the port identifier in the forwarding table entry is used to indicate the third port.

[0228] Optionally, based on the destination address carried in the third message, determining the first virtual port corresponding to the destination address in the first VPWS instance includes: based on the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device 1200 being a virtual port, determining the first virtual port corresponding to the destination address.

[0229] Optionally, according to the fact that the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device 1200 is a virtual port, determining the first virtual port corresponding to the destination address includes: determining the first virtual port according to the destination address and the port identifier in the routing forwarding table of the first VPWS instance, wherein the port identifier is used to indicate the first virtual port corresponding to the destination address in the first VPWS instance and the type of the first virtual port; or determining the first virtual port according to the destination address, port identifier and port type in the routing forwarding table of the first VPWS instance, wherein the port identifier indicates the port corresponding to the destination address in the first VPWS instance, and the port type indicates that the type of the port is a virtual port type.

[0230] Optionally, the receiving module 1210 is further used to receive a fifth message through the first VPLS instance in the first network device 1200 before the forwarding module 1230 determines the first virtual port corresponding to the destination address in the first VPWS instance based on the destination address carried in the third message; the processing module 1220 is further used to generate a forwarding table entry in the routing forwarding table of the first VPWS instance based on the source address carried in the fifth message and the first VPLS instance, wherein the destination address in the forwarding table entry is the source address carried in the fifth message, and the port identifier in the forwarding table entry is used to indicate the first virtual port.

[0231] Optionally, the first VPWS instance includes a port of a virtual port type.

[0232] Optionally, the first VPWS instance also includes a port of EVPN Peer type.

[0233] Optionally, the first VPLS instance includes at least one of an AC type port and an EVPN Peer type port.

[0234] To summarize, the technical solution provided by the embodiment of the present application is that the first network device is a device in a VPLS network, the second network device is a device in a VPWS network, the first VPWS instance in the first network device and the second VPWS instance in the second network device are VPWS instances used to carry the same service, and the first VPLS instance in the first network device is associated with the first VPWS instance in the first network device. After the first network device receives the first message sent to the first user-side device connected to the second network device through the first VPLS instance, the first network device determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance, and forwards the first message to the second VPWS instance in the second network device through the first VPWS instance. As a result, the first network device can forward the message sent to the first user-side device without learning the MAC address of the first user-side device, which helps to reduce the pressure on the first network device to learn the MAC address, simplify the MAC table entries of the first network device, and ensure the message forwarding performance of the network system. Moreover, after receiving the first message, the second network device can forward the first message according to the forwarding mechanism of VPWS through the second VPWS instance in the second network device. The second network device can forward the message sent to the first user side device without learning the MAC address of the first user side device.

[0235] It should be understood that the PE device provided in the embodiment of the present application can also be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The message transmission method provided in the above method embodiment can also be implemented by software. When the above message transmission method is implemented by software, each module in the PE device can also be a software module.

[0236] Please refer to Fig.13 , which shows a hardware structure diagram of a network device 1300 provided in an embodiment of the present application. The network device 1300 may be the first network device in the above embodiment, and the network device 1300 may be a PE device. Fig.13 As shown, the network device 1300 includes: a main control board 1310, an interface board 1330 and an interface board 1340. In the case of multiple interface boards, a switching network board ( Fig.13 The switching network board is used to complete data exchange between interface boards (interface boards are also called line cards or service boards).

[0237] The main control board 1310 is used to complete functions such as system management, equipment maintenance, and protocol processing. The interface board 1330 and the interface board 1340 are used to provide various service interfaces (for example, POS interface, GE interface, ATM interface, etc.) and realize message forwarding. There are mainly three types of functional units on the main control board 1310: system management control unit, system clock unit, and system maintenance unit. The main control board 1310, the interface board 1330, and the interface board 1340 are connected to the system backplane through the system bus to achieve intercommunication. The interface board 1330 includes one or more processors 1331. The processor 1331 is used to control and manage the interface board 1330 and communicate with the central processor 1311 on the main control board 1310. The memory 1332 on the interface board 1330 is used to store the association relationship between the VPWS instance and the VPLS instance, the routing table of the VPWS instance, and / or the routing table of the VPLS instance. The processor 1331 determines the VPLS instance associated with the VPWS instance by searching the routing table of the VPWS instance stored in the memory 1332, and determines the egress port of the message in the VPLS instance by searching the routing table of the VPLS instance stored in the memory 1332. Fig.13 As shown, the main control board 1310 may include a memory 1312, and the memory 1312 on the main control board 1310 may also be used to store a routing forwarding table, which is not limited in this embodiment of the present application.

[0238] The interface board 1330 includes one or more network interfaces 1333 for receiving and forwarding messages, and the processor 1331 determines the VPLS instance associated with the VPWS instance according to the destination address carried in the message received by the network interface 1333 and the routing forwarding table of the VPWS instance. The specific implementation process is not repeated here one by one. The specific functions of the processor 1331 are also not repeated here one by one.

[0239] It is understandable that Fig.13 As shown, this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on the interface board 1340 is basically similar to the operation on the interface board 1330, and for the sake of brevity, it will not be repeated. In addition, it can be understood that Fig.13The processor 1331 in the interface board 1330 and / or the processor 1341 in the interface board 1340 may be dedicated hardware or chips, such as a network processor or a dedicated integrated circuit to implement the above functions. This implementation is what is commonly referred to as a forwarding plane using dedicated hardware or chip processing. In another embodiment, the processor 1331 in the interface board 1330 and / or the processor 1341 in the interface board 1340 may also be a general-purpose processor, such as a general-purpose central processing unit (CPU) to implement the above-described functions.

[0240] In addition, it should be pointed out that there may be one or more main control boards, and when there are multiple boards, they may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. In the case of multiple interface boards, the multiple interface boards can communicate with each other through one or more switching network boards, and when there are multiple boards, they can jointly realize load sharing and redundant backup. Under the centralized forwarding architecture, the network device may not need a switching network board, and the interface board is responsible for the processing function of the service data of the entire system. Under the distributed forwarding architecture, the network device includes multiple interface boards, and data exchange between multiple interface boards can be realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the network equipment with a distributed architecture are greater than those of the equipment with a centralized architecture. Which architecture to adopt depends on the specific networking deployment scenario, and no limitation is made here.

[0241] In a specific embodiment, the memory 1332 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1332 may exist independently and be connected to the processor 1331 via a communication bus. The memory 1332 may also be integrated with the processor 1331.

[0242] The memory 1332 is used to store program codes, and is controlled by the processor 1331 to execute some or all steps of the message transmission method provided in the above embodiment. The processor 1331 is used to execute the program codes stored in the memory 1332. The program codes may include one or more software modules. The one or more software modules may be the above Fig.11 Functional modules provided in the embodiments. The memory 1312 may also be used to store program codes, and the central processor 1311 controls the execution to execute part or all of the steps of the message transmission method provided in the above embodiments.

[0243] In a specific embodiment, the network interface 1333 may be a device such as a transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0244] Please refer to Fig.14 , which shows a hardware structure diagram of another network device 1400 provided in an embodiment of the present application. The network device 1400 may be the first network device in any of the above embodiments, and the network device 1400 may be a PE device. Fig.14 The network device 1400 includes a processor 1402, a memory 1404, a communication interface 1406, and a bus 1408. The processor 1402, the memory 1404, and the communication interface 1406 are connected to each other through the bus 1408. Fig.14 The connection method among the processor 1402 , the memory 1404 , and the communication interface 1406 shown is merely exemplary. During implementation, the processor 1402 , the memory 1404 , and the communication interface 1406 may also be communicatively connected to each other using other connection methods besides the bus 1408 .

[0245] Among them, the memory 1404 can be used to store a computer program 14042, which may include instructions and data. In the embodiment of the present application, the memory 1404 may be various types of storage media, such as RAM, ROM, non-volatile RAM (non-volatile RAM, NVRAM), programmable ROM (programmable ROM, PROM), erasable PROM (erasable PROM, EPROM), electrically erasable PROM (electrically erasable PROM, EEPROM), flash memory, optical storage and registers, etc. In addition, the memory 1404 may include a hard disk and / or a memory.

[0246] Among them, the processor 1402 can be a general-purpose processor, which can be a processor that performs specific steps and / or operations by reading and executing a computer program (e.g., computer program 14042) stored in a memory (e.g., memory 1404), and the general-purpose processor may use data stored in the memory (e.g., memory 1404) in the process of performing the above steps and / or operations. The stored computer program can be executed, for example, to implement the relevant functions of the aforementioned processing module 1220. The general-purpose processor can be, for example, but not limited to a CPU. In addition, the processor 1402 can also be a dedicated processor, which can be a processor specially designed to perform specific steps and / or operations, and the dedicated processor can be, for example, but not limited to, a digital signal processor (digital signal processor, DSP), ASIC and FPGA, etc. In addition, the processor 1402 can also be a combination of multiple processors, such as a multi-core processor. The processor 1402 may include at least one circuit to perform all or part of the steps of the message transmission method provided in the above embodiment.

[0247] The communication interface 1406 may include an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to interconnect devices within the network device 1400, and an interface used to interconnect the network device 1400 with other devices (e.g., network devices or user-side devices). The physical interface may be a gigabit Ethernet interface (GE), which may be used to interconnect the network device 1400 with other devices (e.g., network devices or user-side devices). The logical interface is an interface within the network device 1400, which may be used to interconnect devices within the network device 1400. The communication interface 1406 may be used for the network device 1400 to communicate with other network devices and / or user-side devices. For example, the communication interface 1406 is used for forwarding and receiving messages between the network device 1400 and other network devices. The communication interface 1406 may implement the related functions of the aforementioned receiving module 1210 and the forwarding module 1230. The communication interface 1406 may also include a transceiver for sending and receiving messages, and the transceiver may also implement related functions of the receiving module 1210 and the forwarding module 1230 .

[0248] The bus 1408 may be any type of communication bus for interconnecting the processor 1402 , the memory 1404 , and the communication interface 1406 , such as a system bus.

[0249] The above devices may be arranged on independent chips, or at least partially or completely on the same chip. Whether to arrange each device independently on different chips or to integrate them on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation form of the above devices.

[0250] Fig.14 The network device 1400 shown is only exemplary. During implementation, the network device 1400 may also include other components, which are not listed here. Fig.14 The network device 1400 shown can forward messages by executing all or part of the steps of the message transmission method provided by the above embodiment.

[0251] Please refer to Fig.15 , which shows a schematic diagram of the structure of a message transmission system 1500 provided in an embodiment of the present application. The message transmission system 1500 includes a first network device 1510 and a second network device 1520, wherein the first network device 1510 is a device in a VPLS network, and the second network device 1520 is a device in a VPWS network.

[0252] The first network device 1510 is used to receive a first message through a first VPLS instance in the first network device 1510, determine the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance in the first network device 1510, and forward the first message to the second VPWS instance in the second network device 1520 through the first VPWS instance, wherein the first message is a message sent to a first user-side device connected to the second network device 1520, and the first VPWS instance and the second VPWS instance are VPWS instances used to carry the same service; the second network device 1520 is used to forward the first message through the second VPWS instance.

[0253] Optionally, the association relationship is a binding relationship, and the first network device 1510 is specifically used to: receive the first message through the first port of the first VPLS instance, and determine the first VPWS instance having a binding relationship with the first VPLS instance based on the port for receiving the first message being the first port.

[0254] Optionally, the first network device 1510 is also used to receive a second message through the second port of the second VPLS instance in the first network device 1510, determine a third VPWS instance in the first network device 1510 that has a binding relationship with the second VPLS instance based on the port for receiving the second message being the second port, and forward the second message to the fourth VPWS instance in the second network device 1520 through the third VPWS instance, wherein the second message is a message sent to a second user-side device connected to the second network device, and the third VPWS instance and the fourth VPWS instance are VPWS instances for carrying the same service; the second network device 1520 is also used to forward the second message through the fourth VPWS instance.

[0255] Optionally, the second network device 1520 is further used to send a third message to the first VPWS instance in the first network device 1510 through the second VPWS instance in the second network device 1520; the first network device 1510 is further used to forward the third message according to the first VPLS instance associated with the first VPWS instance in the first network device 1510.

[0256] Optionally, the first network device 1510 is specifically used to: determine a first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, the first virtual port being used to indicate the first VPLS instance; and forward the third message according to the first virtual port.

[0257] Optionally, the destination address is a broadcast address, and the first network device 1510 is specifically used to: determine one or more virtual ports corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, and the one or more virtual ports include the first virtual port.

[0258] Optionally, the first network device 1510 is specifically configured to: determine a routing and forwarding table of the first VPLS instance according to the first virtual port; and forward the third message according to the routing and forwarding table of the first VPLS instance.

[0259] Optionally, the first network device 1510 is specifically used to: determine the first egress port of the third message in the first VPLS instance based on the routing table of the first VPLS instance and the destination address carried in the third message; and forward the third message through the first egress port of the third message based on the first egress port of the third message in the first VPLS instance being in an available state.

[0260] Optionally, please continue to refer to Fig.15,, the system also includes: a third network device 1530, the third network device 1530 is a device in the VPLS network, and the first network device 1510 is also specifically used for: according to the first output port of the third message in the first VPLS instance being in an unavailable state, forwarding the third message to the third VPLS instance in the third network device 1530 through the first VPLS instance, wherein the first VPLS instance and the third VPLS instance are VPLS instances for carrying the same service; the third network device 1530 is used to forward the third message through the third VPLS instance.

[0261] Optionally, the first network device 1510 is further specifically used to: determine, according to the routing forwarding table of the first VPLS instance, that all ports of the first VPLS instance are in an unavailable state; and forward the third message to the fifth VPWS instance in the third network device 1530 through the first VPWS instance in the first network device 1510 according to the fact that all ports of the first VPLS instance are in an unavailable state, wherein the first VPWS instance in the first network device 1510 and the fifth VPWS instance in the third network device 1530 are VPWS instances for carrying the same service;

[0262] The third network device 1530 is further configured to forward the third message through the VPLS instance associated with the fifth VPWS instance in the third network device 1530 .

[0263] Optionally, the first network device 1510 is also used to: receive a fourth message through the third port of the first VPLS instance before forwarding the third message according to the first virtual port; generate a forwarding table entry in the routing forwarding table of the first VPLS instance based on the source address carried in the fourth message and the third port, wherein the destination address in the forwarding table entry is the source address carried in the fourth message, and the port identifier in the forwarding table entry is used to indicate the third port.

[0264] Optionally, the first network device 1510 is specifically configured to: determine a first virtual port corresponding to the destination address according to the port corresponding to the destination address in the routing forwarding table of the first VPWS instance of the first network device 1510 being a virtual port.

[0265] Optionally, the first network device 1510 is specifically used to: determine the first virtual port according to the destination address and port identifier in the routing and forwarding table of the first VPWS instance, wherein the port identifier is used to indicate the first virtual port corresponding to the destination address in the first VPWS instance and the type of the first virtual port; or, determine the first virtual port according to the destination address, port identifier and port type in the routing and forwarding table of the first VPWS instance, wherein the port identifier indicates the port corresponding to the destination address in the first VPWS instance, and the port type indicates that the type of the port is a virtual port type.

[0266] Optionally, the first network device 1510 is also used to: receive a fifth message through the first VPLS instance in the first network device 1510 before determining the first virtual port corresponding to the destination address in the first VPWS instance based on the destination address carried in the third message; generate a forwarding table entry in the routing forwarding table of the first VPWS instance based on the source address carried in the fifth message and the first VPLS instance, wherein the destination address in the forwarding table entry is the source address carried in the fifth message, and the port identifier in the forwarding table entry is used to indicate the first virtual port.

[0267] Optionally, the first VPWS instance includes a port of a virtual port type.

[0268] Optionally, the first VPWS instance also includes a port of EVPN Peer type.

[0269] Optionally, the first VPLS instance includes at least one of an AC type port and an EVPN Peer type port.

[0270] To summarize, the technical solution provided by the embodiment of the present application is that the first network device is a device in a VPLS network, the second network device is a device in a VPWS network, the first VPWS instance in the first network device and the second VPWS instance in the second network device are VPWS instances used to carry the same service, and the first VPLS instance in the first network device is associated with the first VPWS instance in the first network device. After the first network device receives the first message sent to the first user-side device connected to the second network device through the first VPLS instance, the first network device determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance, and forwards the first message to the second VPWS instance in the second network device through the first VPWS instance. As a result, the first network device can forward the message sent to the first user-side device without learning the MAC address of the first user-side device, which helps to reduce the pressure on the first network device to learn the MAC address, simplify the MAC table entries of the first network device, and ensure the message forwarding performance of the network system. Moreover, after receiving the first message, the second network device can forward the first message according to the forwarding mechanism of VPWS through the second VPWS instance in the second network device. The second network device can forward the message sent to the first user side device without learning the MAC address of the user side device.

[0271] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, all or part of the steps of the message transmission method provided in the above method embodiment are implemented.

[0272] An embodiment of the present application provides a computer program product comprising instructions. When the computer program product is executed on a computer, the computer is caused to execute all or part of the steps of the message transmission method provided in the above method embodiment.

[0273] An embodiment of the present application provides a chip, which includes a programmable logic circuit and / or program instructions, and when the chip is running, it is used to implement all or part of the steps of the message transmission method provided in the above method embodiment.

[0274] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product, and the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0275] It should be understood that "at least one" in this article refers to one or more, and "plurality" refers to two or more. "At least two" refers to two or more. In this application, unless otherwise specified, " / " means or. For example, A / B can represent A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, for the convenience of clear description, in this application, the words "first", "second", "third" and so on are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", "third" and so on do not limit the quantity and execution order.

[0276] The different types of embodiments such as the method embodiments and device embodiments provided in the embodiments of the present application can refer to each other, and the embodiments of the present application are not limited thereto. The sequence of operations of the method embodiments provided in the embodiments of the present application can be appropriately adjusted, and the operations can also be increased or decreased in response to the situation. Any technician familiar with the technical field can easily think of the changed methods within the technical scope disclosed in the present application, and they should be included in the protection scope of the present application, so they will not be repeated.

[0277] In the corresponding embodiments provided in the present application, it should be understood that the disclosed devices and the like can be implemented by other configuration methods. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The functions executable by each unit can be implemented by software, hardware, or a combination of software and hardware. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0278] The units described as separate components may or may not be physically separated, and the components described as units may or may not be physical units, and may be located in one place or distributed on multiple network devices (such as 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.

[0279] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A message transmission method, characterized in that: The method is applied to a system including a first network device and a second network device, wherein the first network device is a device in a virtual private local area network service VPLS network, and the second network device is a device in a virtual private line service VPWS network, and the method includes: The first network device receives a first message through a first VPLS instance in the first network device, wherein the first message is a message sent to a first user-side device connected to the second network device; The first network device determines the first VPWS instance according to an association relationship between the first VPLS instance and a first VPWS instance in the first network device; The first network device forwards the first message to a second VPWS instance in the second network device through the first VPWS instance, wherein the first VPWS instance and the second VPWS instance are VPWS instances used to carry the same service.

2. The method according to claim 1, characterized in that: The association relationship is a binding relationship. The first network device receives the first message through the first VPLS instance in the first network device, including: the first network device receives the first message through the first port of the first VPLS instance; The first network device determines the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance in the first network device, including: the first network device determines the first VPWS instance having a binding relationship with the first VPLS instance according to the port receiving the first message being the first port.

3. The method according to claim 2, characterized in that The method further comprises: The first network device receives a second message through a second port of a second VPLS instance in the first network device, wherein the second message is a message sent to a second user-side device connected to the second network device; The first network device determines, according to the port receiving the second message being the second port, a third VPWS instance in the first network device that has a binding relationship with the second VPLS instance; The first network device forwards the second message to a fourth VPWS instance in the second network device through the third VPWS instance, wherein the third VPWS instance and the fourth VPWS instance are VPWS instances used to carry the same service.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The first network device receives, through the first VPWS instance in the first network device, a third message sent by the second VPWS instance in the second network device; The first network device forwards the third message according to the first VPLS instance associated with the first VPWS instance in the first network device.

5. The method according to claim 4, characterized in that The first network device forwarding the third message according to the first VPLS instance associated with the first VPWS instance in the first network device includes: The first network device determines, according to the destination address carried in the third message, a first virtual port corresponding to the destination address in the first VPWS instance, where the first virtual port is used to indicate the first VPLS instance; The first network device forwards the third message according to the first virtual port.

6. The method according to claim 5, characterized in that The destination address is a broadcast address, and the first network device determines, in the first VPWS instance, a first virtual port corresponding to the destination address according to the destination address carried in the third message, including: The first network device determines, in the first VPWS instance, one or more virtual ports corresponding to the destination address according to the destination address carried in the third message, where the one or more virtual ports include the first virtual port.

7. The method according to claim 5 or 6, characterized in that: The first network device forwarding the third message according to the first virtual port includes: The first network device determines a routing forwarding table of the first VPLS instance according to the first virtual port; The first network device forwards the third message according to the routing forwarding table of the first VPLS instance.

8. The method according to claim 7, characterized in that The first network device forwarding the third message according to the routing forwarding table of the first VPLS instance includes: The first network device determines, in the first VPLS instance, a first egress port of the third message according to the routing forwarding table of the first VPLS instance and the destination address carried in the third message; The first network device forwards the third message through the first egress port of the third message according to that the first egress port of the third message in the first VPLS instance is in an available state.

9. The method according to claim 8, characterized in that The system further includes: a third network device, wherein the third network device is a device in the VPLS network, The first network device forwards the third message according to the routing forwarding table of the first VPLS instance, further comprising: The first network device forwards the third message to the third VPLS instance in the third network device through the first VPLS instance based on the fact that the first output port of the third message in the first VPLS instance is in an unavailable state, wherein the first VPLS instance and the third VPLS instance are VPLS instances used to carry the same service.

10. The method according to claim 9, characterized in that The first network device forwards the third message according to the routing forwarding table of the first VPLS instance, further comprising: The first network device determines, according to the routing forwarding table of the first VPLS instance, that all ports of the first VPLS instance are in an unavailable state; The first network device forwards the third message to the fifth VPWS instance in the third network device through the first VPWS instance according to the fact that all ports of the first VPLS instance are in an unavailable state, wherein the first VPWS instance and the fifth VPWS instance are VPWS instances for carrying the same service.

11. The method according to any one of claims 5-6, 8-10, characterized in that: Before the first network device forwards the third message according to the first virtual port, the method further includes: The first network device receives a fourth message through a third port of the first VPLS instance; The first network device generates a forwarding entry in the routing forwarding table of the first VPLS instance based on the source address carried in the fourth message and the third port, wherein the destination address in the forwarding entry is the source address carried in the third message, and the port identifier in the forwarding entry is used to indicate the third port.

12. The method according to any one of claims 1-3, 5-6, 8-10, characterized in that: The first VPWS instance includes at least one of a port of a virtual port type and a port of an Ethernet virtual private network peer (EVPN Peer) type; The first VPLS instance includes at least one of an access circuit AC type port and an EVPN Peer type port.

13. A message transmission system, characterized in that: The system comprises a first network device and a second network device, wherein the first network device is a device in a virtual private local area network service VPLS network, and the second network device is a device in a virtual private line service VPWS network. The first network device is used to receive a first message through a first VPLS instance in the first network device, determine the first VPWS instance according to the association relationship between the first VPLS instance and the first VPWS instance in the first network device, and forward the first message to the second VPWS instance in the second network device through the first VPWS instance, wherein the first message is a message sent to a first user-side device connected to the second network device, and the first VPWS instance and the second VPWS instance are VPWS instances used to carry the same service; The second network device is configured to forward the first message through the second VPWS instance.

14. The system according to claim 13, characterized in that The association relationship is a binding relationship. The first network device is specifically configured to: receive the first message through a first port of the first VPLS instance, and determine the first VPWS instance having a binding relationship with the first VPLS instance based on the port through which the first message is received being the first port.

15. The system according to claim 14, characterized in that The first network device is further used to receive a second message through a second port of a second VPLS instance in the first network device, determine a third VPWS instance in the first network device that has a binding relationship with the second VPLS instance according to the port for receiving the second message being the second port, and forward the second message to a fourth VPWS instance in the second network device through the third VPWS instance, wherein the second message is a message sent to a second user-side device connected to the second network device, and the third VPWS instance and the fourth VPWS instance are VPWS instances for carrying the same service; The second network device is further configured to forward the second message through the fourth VPWS instance.

16. The system according to any one of claims 13 to 15, characterized in that The second network device is further configured to send a third message to the first VPWS instance in the first network device through the second VPWS instance in the second network device; The first network device is further configured to forward the third message according to the first VPLS instance associated with the first VPWS instance in the first network device.

17. The system according to claim 16, characterized in that The first network device is specifically used to: determine a first virtual port corresponding to the destination address in the first VPWS instance according to the destination address carried in the third message, the first virtual port being used to indicate the first VPLS instance; and forward the third message according to the first virtual port.

18. The system according to claim 17, characterized in that The destination address is a broadcast address, and the first network device is specifically configured to: determine, in the first VPWS instance, one or more virtual ports corresponding to the destination address according to the destination address carried in the third message, and the one or more virtual ports include the first virtual port.

19. The system according to claim 17 or 18, characterized in that The first network device is specifically configured to: determine a routing and forwarding table of the first VPLS instance according to the first virtual port; and forward the third message according to the routing and forwarding table of the first VPLS instance.

20. The system according to claim 19, characterized in that The first network device is specifically used to: determine the first egress port of the third message in the first VPLS instance according to the routing forwarding table of the first VPLS instance and the destination address carried in the third message; and forward the third message through the first egress port of the third message according to the first egress port of the third message in the first VPLS instance being in an available state.

21. The system according to claim 20, characterized in that The system further includes: a third network device, wherein the third network device is a device in the VPLS network, The first network device is further specifically used for: forwarding the third message to the third VPLS instance in the third network device through the first VPLS instance according to the first egress port of the third message in the first VPLS instance being in an unavailable state, wherein the first VPLS instance and the third VPLS instance are VPLS instances for carrying the same service; The third network device is used to forward the third message through the third VPLS instance.

22. The system according to claim 21, characterized in that The first network device is further specifically used to: determine, according to the routing forwarding table of the first VPLS instance, that all ports of the first VPLS instance are in an unavailable state; and forward the third message to the fifth VPWS instance in the third network device through the first VPWS instance in the first network device according to the fact that all ports of the first VPLS instance are in an unavailable state, wherein the first VPWS instance and the fifth VPWS instance are VPWS instances used to carry the same service; The third network device is further configured to forward the third message through a VPLS instance associated with the fifth VPWS instance in the third network device.

23. The system according to any one of claims 17-18, 20-22, characterized in that: The first network device is also used to: receive a fourth message through the third port of the first VPLS instance before forwarding the third message according to the first virtual port; generate a forwarding table entry in the routing forwarding table of the first VPLS instance according to the source address carried in the fourth message and the third port, wherein the destination address in the forwarding table entry is the source address carried in the fourth message, and the port identifier in the forwarding table entry is used to indicate the third port.

24. A network device, characterized in that: The network device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory to perform the message transmission method according to any one of claims 1 to 12.

25. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the message transmission method according to any one of claims 1 to 12 is implemented.