CN103812773B - A kind of message forwarding method, HUB-PE and HUB-CE - Google Patents
A kind of message forwarding method, HUB-PE and HUB-CE Download PDFInfo
- Publication number
- CN103812773B CN103812773B CN201210443911.2A CN201210443911A CN103812773B CN 103812773 B CN103812773 B CN 103812773B CN 201210443911 A CN201210443911 A CN 201210443911A CN 103812773 B CN103812773 B CN 103812773B
- Authority
- CN
- China
- Prior art keywords
- message
- hub
- spoke
- vlan
- tag
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
This application discloses a kind of message forwarding method, the method includes: HUB PE is the private network tags that each Spoke PE distribution in same HUB Spoke networking is identical, is only used for distinguishing the message in which HUB Spoke networking;Distinguish message for each Spoke PE different service identifiers of distribution and come from which Spoke PE to carry out message forwarding.Based on same inventive concept, the application also proposed a kind of HUB PE and HUB CE, it is possible to solves the problem that private network tags is not enough.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a packet forwarding method, HUB-PE, and HUB-CE.
Background
Virtual Private local area Network Service (VPLS) is a point-to-multipoint, two-Layer Virtual Private Network (L2 VPN) Service provided in a public Network. The VPLS connects geographically separated customer network sites through an MPLS or IP backbone to form a customer network that spans the backbone. The backbone network emulates a virtual switch that connects multiple customer network sites together, and the service provider can provide VPLS services to different customer networks by emulating different virtual switches to different customer networks on the backbone network. The backbone network is transparent to the sites of the customer network, which work as if they were in a local area network.
Hub-branch (Spoke) networking refers to a networking mode in which one Hub site and a plurality of Spoke sites exist in a network. In the Hub-Spoke networking mode, all Spoke-service provider network edge devices (PEs) cannot directly communicate with each other, and the data traffic must be uniformly managed by the HUB-PE through HUB-PE communication.
In the HUB-Spoke networking, the HUB-PE needs to allocate different private network tags to each Spoke-PE to distinguish the Spoke-PE sending the message, and when there are many Spoke-PEs, one HUB-Spoke networking needs to occupy many tags, so that the problem of insufficient private network tags occurs.
Disclosure of Invention
In view of this, the present application provides a packet forwarding method, HUB-PE, and HUB-CE, which can solve the problem of insufficient private network labels.
In order to solve the technical problem, the technical scheme of the application is realized as follows:
a message forwarding method is applied to a HUB-Spoke networking, wherein a Pseudo Wire (PW) connection is established between a HUB-PE and each Spoke-PE in the networking, an Access Circuit (AC) is distributed to each Spoke-PE, the PW connection established with any Spoke-PE is bound with an AC distributed to the Spoke-PE, the HUB-PE distributes the same private network label to each Spoke-PE, a Virtual Local Area Network (VLAN) identification (VLAN ID) of the AC distributed to each Spoke-PE is distributed to each Spoke-PE as a service identification, and the VLAN identification is packaged as an outer tag of a message when the Spoke-PE sends the message to the HUB-PE, and the method comprises the following steps:
and when the HUB-PE receives a message which is sent by the Spoke-PE and takes the service identifier distributed by the HUP-PE for the Spoke-PE as an outer virtual local area network label VLAN tag, popping up a public network tag and a private network tag of the message, and forwarding the public network tag and the private network tag to the HUB-CE through a port which is connected with the HUB-CE in the HUB-Spoke networking so that the HUB-CE learns the value of the outer VLAN tag of the message.
Wherein the method further comprises:
when the HUB-PE receives the message sent by the HUB-CE, the corresponding AC is determined according to the value of the outer VLAN tag of the received message, the distributed private network tag and public network tag are packaged for the message, and the message is forwarded through the PW bound with the determined AC, wherein the value of the outer VLAN tag of the message sent by the HUB-CE is obtained by the HUB-CE through learning the message sent by the HUB-CE.
The method further comprises:
and the HUB-PE carries the service identifier distributed for each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE acquires the service identifier distributed for the Spoke-PE by the HUB-PE carried in the PW element information.
The method further comprises:
all PEs in the HUB-Spoke networking are configured as HUB-PEs, each PE communicated with the HUB-Spoke networking is used as a Spoke-PE, and when all CEs receive messages from the PEs, the messages are not forwarded to the PEs.
A message forwarding method is applied to a HUB-Spoke networking, wherein a pseudo-wire (PW) connection is established between a HUB-PE and each Spoke-PE in the networking, an Access Circuit (AC) is distributed to each Spoke-PE, the PW connection established with any Spoke-PE is bound with the AC distributed to the Spoke-PE, the same private network label is distributed to each Spoke-PE by the HUB-PE, different service identifiers are distributed to each Spoke-PE, and the service identifiers are packaged as outer virtual local area network labels (VLAN tags) of messages when the Spoke-PE sends the messages to the HUB-PE, and the method comprises the following steps:
when the HUB-PE receives a message which is sent by the Spoke-PE and takes a service identifier distributed by the HUB-PE for the Spoke-PE as an outer VLAN tag, popping up a public network tag and a private network tag of the message, determining the Spoke-PE for sending the message according to the outer VLAN tag of the message with the popped up tag, determining a corresponding AC according to the determined Spoke-PE, modifying the value of the VLANtag of the message with the popped up tag into the VLAN ID of the determined AC, and forwarding the VLAN ID to the HUB-CE in the VLAN on the port of the determined AC, so that the HUB-CE learns the value of the outer VLAN tag of the message.
Wherein the method further comprises:
when the HUB-PE receives the message sent by the HUB-CE, the corresponding AC is determined according to the value of the outer VLAN tag of the received message, the distributed private network tag and public network tag are packaged for the message, and the message is forwarded through the PW bound with the determined AC, wherein the value of the outer VLAN tag of the message sent by the HUB-CE is obtained by the HUB-CE through learning the message sent by the HUB-CE.
The method further comprises:
and the HUB-PE carries the service identifier distributed for each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE acquires the service identifier distributed for the Spoke-PE by the HUB-PE carried in the PW element information.
The method further comprises:
all PEs in the HUB-Spoke networking are configured as HUB-PEs, each PE communicated with the HUB-Spoke networking is used as a Spoke-PE, and when all CEs receive messages from the PEs, the messages are not forwarded to the PEs.
A message forwarding method is applied to HUB-Spoke networking and comprises the following steps:
the HUB-CE in the HUB-Spoke networking creates a user instance for each user, and allocates VLAN ID and an uplink port for each user instance;
when the HUB-CE receives a message sent by the HUB-PE, learning a user instance MAC address table item according to an outer layer VLAN tag of the received message, wherein the user instance MAC address table item comprises a user instance ID, a VLAN ID, an MAC address and an output port, and the VLAN ID is the value of the outer layer VLAN tag of the received message;
the HUB-CE pops up an outer layer VLAN tag of a received message, when the received message is a broadcast or multicast message, the message popped up the outer layer VLAN tag is sent to all ports in a VLAN corresponding to an inner layer VLAN tag of the message and VLANs except the VLAN corresponding to the outer layer VLAN tag on an uplink port of a user instance, and when the message is sent to the uplink port, a corresponding VLAN ID is used as the outer layer VLAN tag to package the message popped up the outer layer VLAN tag;
when the received message is a unicast message, searching an MAC address forwarding table item in an inner layer VLAN tag, and if a corresponding target MAC address is searched, forwarding the MAC address forwarding table item through an output port corresponding to the target MAC address; if the corresponding target MAC address is not found, determining a user instance according to the outer layer VLAN tag of the message, finding in the user instance MAC address table item corresponding to the determined user instance, and if the corresponding target MAC address is found, packaging the message popped up by the outer layer VLAN tag by taking the VLAN ID corresponding to the target MAC address as the outer layer VLAN tag, and forwarding the message through the output port corresponding to the target MAC address; otherwise, the message popping up the outer layer VLAN tag is processed according to the broadcast message or the multicast message.
Wherein the method further comprises: the HUB-CE allocates corresponding downlink ports for each user instance;
when the HUB-CE receives the message from the user side, the source MAC address learning is carried out, and an MAC address forwarding table entry is generated;
when the received message is a broadcast or multicast message, the message is sent to all ports except a message source port of a VLAN corresponding to an inner VLAN tag of the message and all VLANs on an uplink port of a corresponding user instance, and the corresponding VLAN is packaged as an outer VLAN tag in the message sent by the uplink port, wherein the corresponding user instance is determined according to the port for receiving the message;
when the received message is a unicast message, the HUB-CE searches an MAC address forwarding table item in a VLAN of the received message, and if a corresponding target MAC address is found, the received message is forwarded through an output port corresponding to the target MAC address; if the corresponding destination MAC address is not found, determining a user instance according to the port for receiving the message, finding in the user instance MAC address table item corresponding to the determined user instance, and if the corresponding destination MAC address is found, packaging the received message by taking the VLAN ID corresponding to the destination MAC address as an outer VLAN tag and forwarding the message through an outlet port corresponding to the destination MAC address; otherwise, the received message is processed according to the broadcast message or the multicast message.
A kind of HUB-PE, can apply to and also include in HUB-Spoke network deployment of a plurality of Spoke-PEs, this HUB-PE and every Spoke-PE set up the pseudo wire PW connection, distribute the access circuit AC for every Spoke-PE, and will connect with PW that any Spoke-PE set up, bind with AC that this Spoke-PE distributes, stated HUB-PE includes: the device comprises a configuration unit, a receiving unit, a processing unit and a sending unit;
the configuration unit is used for allocating the same private network label to each Spoke-PE, allocating a virtual local area network identification VLAN ID of the AC allocated to each Spoke-PE as a service identification to each Spoke-PE, and enabling the Spoke-PE to serve as an outer virtual local area network label VLANtag of a message for packaging when the Spoke-PE sends the message to the HUB-PE;
the receiving unit is used for receiving the service identifier distributed by the configuration unit and sent by the Spoke-PE as a message of an outer VLAN tag;
the processing unit is used for popping up a public network label and a private network label of a message when the receiving unit receives the message which is sent by the Spoke-PE and takes the service identifier distributed to the receiving unit by the configuration unit as an outer VLAN tag;
and the sending unit is used for forwarding the message processed by the processing unit to the HUB-CE through a port connected with the HUB-CE so that the HUB-CE learns the value of the outer VLAN tag of the message.
The receiving unit is further configured to receive a message sent by the HUB-CE;
the processing unit is further configured to determine a corresponding AC according to a value of an outer VLAN tag of the packet received by the receiving unit, and encapsulate a public network tag and a private network tag allocated by the configuration unit for the packet, where the value of the outer VLAN tag of the packet sent by the HUB-CE is obtained by the HUB-CE through learning the packet sent by the HUB-PE;
the sending unit is further configured to forward the packet with the private network label and the public network label encapsulated by the processing unit through a PW bound to the determined AC.
The sending unit is further configured to carry the service identifier allocated by the configuration unit to each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE obtains the service identifier allocated to the Spoke-PE by the HUB-PE carried in the PW element information.
A kind of HUB-PE, can apply to and also include in HUB-Spoke network deployment of a plurality of Spoke-PEs, this HUB-PE and every Spoke-PE set up the pseudo wire PW connection, distribute the access circuit AC for every Spoke-PE, and will connect with PW that any Spoke-PE set up, bind with AC that this Spoke-PE distributes, stated HUB-PE includes: the device comprises a configuration unit, a receiving unit, a processing unit and a sending unit;
the configuration unit is used for allocating the same private network tag for each Spoke-PE and allocating different service identifiers for each Spoke-PE, so that the service identifiers are used as outer virtual local area network tag VLAN tags of the messages to be packaged when the Spoke-PE sends the messages to the HUB-PE;
the receiving unit is used for receiving a message which is sent by the Spoke-PE and takes the service identifier distributed to the Spoke-PE by the configuration unit as an outer VLAN tag;
the processing unit is used for popping up a public network tag and a private network tag of a message when the receiving unit receives the message which is sent by the Spoke-PE and takes the service identifier distributed to the Spoke-PE by the configuration unit as an outer VLAN tag, determining the Spoke-PE for sending the message according to the outer VLAN tag of the message with the popped up tag, determining a corresponding AC according to the determined Spoke-PE, and modifying the value of the VLAN tag of the message with the popped up tag into the VLAN ID of the determined AC;
and the sending unit is used for forwarding the message processed by the processing unit to the HUB-CE in the VLAN on the port of the AC determined by the processing unit, so that the HUB-CE learns the value of the outer layer VLAN tag of the message.
Wherein,
the receiving unit is further configured to receive a message sent by the HUB-CE;
the processing unit is further configured to determine a corresponding AC according to a value of an outer VLAN tag of the packet received by the receiving unit, and encapsulate a public network tag and a private network tag allocated by the configuration unit for the packet, where the value of the outer VLAN tag of the packet sent by the HUB-CE is obtained by the HUB-CE through learning the packet sent by the HUB-PE;
the sending unit is further configured to forward the packet with the private network label and the public network label encapsulated by the processing unit through a PW bound to the determined AC.
The sending unit is further configured to carry the service identifier allocated by the configuration unit to each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE obtains the service identifier allocated to the Spoke-PE by the HUB-PE carried in the PW element information.
A HUB-CE for use in a HUB-Spoke networking, the HUB-CE comprising: the device comprises a configuration unit, a receiving unit, a learning unit and a processing unit;
the configuration unit is used for creating a user instance for each user and distributing a virtual local area network identification (VLAN ID) and an uplink port for each user instance;
the receiving unit is used for receiving the message sent by the HUB-PE;
the learning unit is configured to learn a user instance MAC address table entry according to an outer VLAN tag of the packet received by the receiving unit, where the user instance MAC address table entry includes a user instance ID, a VLAN ID, an MAC address, and an egress port, where the VLAN ID is a value of the outer VLAN tag of the received packet;
the processing unit is used for popping up an outer VLAN tag of a message received by the receiving unit, sending the message popped up by the outer VLAN tag to all ports in a VLAN corresponding to an inner VLAN tag of the message and VLANs except the VLAN corresponding to the outer VLAN tag on an uplink port of a user instance when the received message is a broadcast or multicast message, and packaging the message popped up by the outer VLAN tag by taking a corresponding VLAN ID as the outer VLAN tag when the message is sent by the uplink port; when the received message is a unicast message, searching an MAC address forwarding table item in an inner layer VLAN tag, and if a corresponding target MAC address is searched, forwarding the MAC address forwarding table item through an output port corresponding to the target MAC address; if the corresponding target MAC address is not found, determining a user instance in the configuration unit according to the outer layer VLAN tag of the message, finding in the user instance MAC address table entry in the learning unit corresponding to the determined user instance, and if the corresponding target MAC address is found, packaging the message popping up the outer layer VLAN tag by taking the VLAN ID corresponding to the target MAC address as the outer layer VLAN tag, and forwarding the message through an outlet port corresponding to the target MAC address; otherwise, the message popping up the outer layer VLANtag is processed according to the broadcast message or the multicast message.
Wherein,
the configuration unit is further configured to allocate a corresponding downlink port to each user instance;
the receiving unit is further configured to receive a message from a user side;
the learning unit is further configured to perform source MAC address learning on the message received by the receiving unit from the user side, and generate an MAC address forwarding table entry;
the processing unit is further configured to send the message to all ports except a message source port of a VLAN corresponding to an inner-layer VLAN tag of the message and all VLANs on an uplink port of a corresponding user instance when the message received by the receiving unit is a broadcast or multicast message, and encapsulate the corresponding VLAN as an outer-layer VLAN tag in the message sent by the uplink port, where the corresponding user instance is determined according to the port from which the message is received; when the message received by the receiving unit is a unicast message, searching an MAC address forwarding table item in a VLAN (virtual local area network) of the received message, and if a corresponding target MAC address is searched, forwarding the received message through an output port corresponding to the target MAC address; if the corresponding destination MAC address is not found, determining a user instance in the configuration unit according to the port for receiving the message, finding in the user instance MAC address table entry in the learning unit corresponding to the determined user instance, and if the corresponding destination MAC address is found, packaging the received message by taking the VLAN ID corresponding to the destination MAC address as an outer VLAN tag and forwarding the received message through an outlet port corresponding to the destination MAC address; otherwise, the received message is processed according to the broadcast message or the multicast message.
In summary, the same private network label is allocated to the same HUB-Spoke networking through the HUB-PE, and the private network label is only used for distinguishing the HUB-Spoke networking, namely for distinguishing which HUB-Spoke networking the message comes from; different service identifications are distributed for the Spoke-PEs to distinguish which Spoke-PE the message comes from for message forwarding, and the problem that private network labels are not enough can be solved.
Drawings
Fig. 1 is a schematic structural diagram of a service identifier field carried when PW information is sent in an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for implementing message forwarding in HUB-PE according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a HUB-Spoke networking architecture in an embodiment of the present application;
fig. 4 is a schematic flow chart of a method for forwarding a packet by a HUB-PE in the second embodiment of the present application;
fig. 5 is a schematic flow chart of a method for forwarding a packet by a HUB-PE in the third embodiment of the present application;
fig. 6 is a schematic flow chart of a method for forwarding a packet by a HUB-CE in the fourth embodiment of the present application;
fig. 7 is a schematic flowchart of a method for forwarding a packet by a HUB-CE in the fifth embodiment of the present application;
FIG. 8 is a schematic diagram of a HUB-PE structure according to the teachings of the present application as applied to one embodiment;
FIG. 9 is a schematic diagram of the HUB-PE structure of the present application as applied to the technique of example III;
FIG. 10 is a schematic diagram of the structure of a HUB-CE applied to the fourth and fifth techniques of example.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application are described in further detail below with reference to the accompanying drawings.
The embodiment of the application provides a message forwarding method, which is applied to HUB-Spoke networking, wherein different service identifiers are distributed to the Spoke-PEs to distinguish the Spoke-PEs, the same private network label is distributed to the Spoke-PEs and is only used for distinguishing the HUB-Spoke networks, namely the messages from which HUB-Spoke networking the messages come, and the problem that the private network labels are not enough can be solved.
For clarity and simplicity of description, in the embodiments of the present application, a HUB-Spoke networking is taken as an example. Before the message forwarding is realized in the HUB-Spoke networking, the following configuration needs to be performed on the HUB-PE:
the HUB-PE in the network establishes Pseudo Wire (PW) connection with each Spoke-PE, allocates an Access Circuit (AC) for each Spoke-PE, connects the PW established with any Spoke-PE and binds the PW with the AC allocated to the Spoke-PE, wherein the method for allocating AC and establishing PW connection is realized in the prior art, the HUB-PE allocates AC for each Spoke-PE, namely, each Spoke-PE allocates ports and VLAN, the ports are the ports for connecting the HUB-CE, and the VLAN is one or more VLANs on the ports. The HUB-PE distributes the same private network label to each Spoke-PE to enable each Spoke-PE to be in a HUB-Spoke networking, and the message sent to the HUB-PE by the Spoke-PE is the message in the HUB-Spoke networking; the HUB-PE allocates a virtual local area network identifier (VLAN ID) of the AC allocated to each Spoke-PE as a service identifier to each Spoke-PE, so that the service identifier is encapsulated as an outer layer virtual local area network tag (VLAN tag) of a message when the Spoke-PE sends the message to the HUB-PE, and when the HUB-PE receives the message sent by the Spoke-PE, the HUB-PE can identify which Spoke-PE sends the message according to the outer layer VLAN tag of the message.
When the HUB-PE distributes multiple VLAN IDs of the AC for the Spoke-PE, any one of the VLAN IDs is distributed to the Spoke-PE as a service identifier, or all the VLAN IDs are distributed to the Spoke-PE, so that the Spoke-PE can select one as an outer VLAN tag encapsulation message.
How the Spoke-PE obtains the service identifier allocated by the HUB-PE has the following two ways:
the first mode is as follows: and each Spoke-PE locally configures the service identification distributed by the HUB-PE.
The second way is: and the HUB-PE carries the service identification distributed for each Spoke-PE in the PW element information sent to each Spoke-PE, and when each Spoke-PE receives the PW element information sent by the HUB-PE, the service identification distributed for the HUB-PE carried in the information is obtained.
A remote Label Distribution Protocol (LDP) is run between the HUB-PE and the Spoke-PE to negotiate L2VPN information. In the process of L2VPN negotiation in an LDP mode, a Service identification (Service-ID) field is added in PW element information sent by the HUB-PE to the Spoke-PE.
Referring to fig. 1, fig. 1 is a schematic diagram of a structure of a service identifier field carried when PW information is sent in the embodiment of the present application. The S-ID in FIG. 1 indicates that this TLV is Service-ID information; length: a length field; VLAN ID: and the HUB-PE allocates the service identification for the Spoke-PE.
The following describes how the application implements message forwarding in HUB-Spoke networking in a specific embodiment with reference to the drawings.
Example one
Referring to fig. 2, fig. 2 is a schematic flowchart of a method for implementing packet forwarding in HUB-PE according to an embodiment of the present application. The method comprises the following specific steps:
step 201, the HUB-PE receives a message sent by the Spoke-PE, where the service identifier allocated to the Spoke-PE by the HUB-PE is used as an outer VLAN tag.
After the configuration, when the Spoke-PE sends a message to the HUB-PE, the obtained service identifier is encapsulated as an outer VLAN tag.
Step 202, the HUB-PE pops up the public network label and the private network label of the packet, and forwards the packet to the HUB-CE through the port connected to the HUB-CE in the HUB-Spoke networking, so that the HUB-CE learns the value of the outer VLAN tag of the packet.
When the Spoke-PE sends a message to the HUB-PE, a public network label and a private network label need to be packaged, and the packaged private network label is the private network label distributed to the Spoke-PE by the HUB-PE, which is only the same in the embodiment of the application.
The specific embodiment of the application is based on an example of a HUB-Spoke networking, and only one port for communication between a HUB-PE and a HUB-user Edge (CE) device in the HUB-Spoke networking is available, and the port can be directly forwarded through the port. When a plurality of HUB-Spoke networking exists, HUB-Spoke networking can be distinguished according to the private network labels distributed to the Spoke-PEs in each networking in the application, and then the port connected with the HUB-CE is determined.
Certainly, in this embodiment, only one port is used for forwarding, and it is not distinguished which VLAN on the port is used for forwarding, because the service identifier is carried in the outer layer VLAN tag of the packet, and the service identifier is the same as the VLAN ID of the corresponding AC, the HUB-CE can obtain the VLAN ID of the AC, and thus it is not necessary to determine which VLAN on the port is used for forwarding.
In specific implementation, the corresponding AC may also be determined by the value of the outer VLAN tag of the packet, and the packet is forwarded in the VLAN of the port of the determined AC.
Referring to fig. 3, fig. 3 is a schematic diagram of a HUB-Spoke networking structure in the embodiment of the present application. In fig. 3, Spoke-CE311 accesses Spoke-PE301 via VLAN 2; VLAN3 of a port 1 connected with the HUB-CE310 on the HUB-PE300 is allocated to the Spoke-PE301 to be used as AC, and the HUB-PE300 allocates VLAN3 to the Spoke-PE301 to be used as a service identifier; similarly, the Spoke-CE 321 accesses the Spoke-PE302 through VLAN 4; VLAN4 of port 1 connected with HUB-CE310 on HUB-PE300 is allocated to Spoke-PE302 to be AC, and HUB-PE300 allocates VLAN4 to Spoke-PE302 to be used as service identification. Private network labels assigned by HUB-PE300 to both Spoke-PE301 and Spoke-PE302 are 26.
When HUB-PE300 receives a message with VLAN3 sent by Spoke-PE301 as an outer VLAN tag, HUB-PE300 pops up a public network tag and a private network tag of the message, wherein the private network tag is 26, and the message is forwarded to HUB-CE310 through a port 1 in the HUB-Spoke networking, which is connected with the HUB-CE, so that HUB-CE310 learns the value 3 of the outer VLAN tag of the message.
Example two
Referring to fig. 4, fig. 4 is a schematic flowchart of a method for forwarding a packet by a HUB-PE in the second embodiment of the present application. The method comprises the following specific steps:
step 401, when the HUB-PE receives the message sent by the HUB-CE, the corresponding AC is determined according to the value of the outer VLAN tag of the received message, where the value of the outer VLAN tag of the message is obtained by the HUB-CE through learning the message sent by the HUB-PE.
As can be seen from the first embodiment, the service identifier that is the same as the VLAN ID of the corresponding AC is encapsulated in the outer VLAN tag of the packet sent by the HUB-PE to the HUB-CE, so that when the HUB-CE receives the packet and learns the packet, the VLAN ID of the AC can be learned, and when the packet is sent to the HUB-PE, the VLAN ID is encapsulated in the outer VLAN tag. And when the HUB-PE receives the message sent by the HUB-CE, the corresponding AC can be determined according to the value of the outer VLAN tag of the message.
And step 402, the HUB-PE encapsulates the distributed private network label and public network label for the message, and forwards the message through the PW bound with the determined AC.
In step 402, before the HUB-CE forwards the packet, the value of the outer vlan tag of the received packet sent by the HUB-CE is modified to 0.
By the operation, after the Spoke-PE receives the message, the processing is consistent with the existing processing, and the flow of the Spoke-PE for processing the message is not influenced.
Continuing with fig. 3 as an example, when the HUB-PE300 receives a message sent by the HUB-CE, if the value of the outer vlan tag of the message is 3, it determines that the corresponding AC is allocated to the Spoke-PE301, determines the PW bound to the AC according to the AC, encapsulates the public network tag and the private network tag 26 for the message, and forwards the message through the determined PW. In order to make the Spoke-PE311 process the packet easily, the value of the outer VLAN tag of the packet may be modified to 0, so that when the Spoke-PE301 receives the packet, the processing of the packet is completely implemented as in the prior art.
EXAMPLE III
The HUB-PE allocates different service identifiers to each Spoke-PE, that is, the value of the service identifier allocated by the HUB-PE to each Spoke-PE is independent of the value of the VLAN ID of the AC, and other configurations are the same as those in the first embodiment. Referring to fig. 5, a specific processing procedure is shown in fig. 5, where fig. 5 is a schematic flow chart of a method for forwarding a packet by a HUB-PE in the third embodiment of the present application. The method comprises the following specific steps:
step 501, when receiving a message sent by a Spoke-PE and using a service identifier allocated to the Spoke-PE by the HUB-PE as an outer VLAN tag, popping up a public network tag and a private network tag of the message.
Step 502, the HUB-PE determines a Spoke-PE sending the message according to the outer VLAN tag of the message popping up the label, and determines a corresponding AC according to the determined Spoke-PE.
In step 503, the HUB-PE modifies the value of the outer layer VLAN tag of the message with the pop label to the determined VLAN id of the AC, and forwards the modified value to the HUB-CE in the VLAN on the port of the determined AC, so that the HUB-CE learns the value of the outer layer VLAN tag of the message.
In this embodiment, since the assigned service identifier is unrelated to the VLAN ID of the assigned AC, in order to carry the VLAN ID of the AC in the packet sent to the HUB-CE, the outer VLAN ID needs to be modified.
Still taking the networking shown in fig. 3 as an example, Spoke-CE311 accesses Spoke-PE301 through VLAN 2; VLAN3 of port 1 connected with HUB-CE310 on HUB-PE300 is allocated to Spoke-PE301 to be used as AC, and HUB-PE300 allocates VLAN10 to Spoke-PE301 to be used as service identification; similarly, the Spoke-CE 321 accesses the Spoke-PE302 through VLAN 4; VLAN4 of port 1 connected to HUB-CE310 on HUB-PE300 is allocated to Spoke-PE302 as AC, and HUB-PE300 allocates VLAN4 to Spoke-PE302 as service identifier, wherein although the allocated service identifier is the same as VLAN ID of AC, it is not necessarily linked. Private network tags assigned to Spoke-PE301 and Spoke-PE302 by HUB-PE300 are both 1.
When receiving a message which is sent by a Spoke-PE301 and takes VLAN10 as an outer-layer VLAN tag, using HUB-PE300 to pop up a public network tag and a private network tag of the message, wherein the private network tag is 1, determining that the message is sent by the Spoke-PE301 through VLAN10, and when the port of the AC allocated for the Spoke-PE301 is port 1 and the VLAN ID is VLAN3, modifying the value of the outer-layer VLAN tag of the message with the popped up tag to VLAN3, and forwarding the message to HUB-CE310 through port 1 in VLAN3, so that HUB-CE310 learns the value of the outer-layer VLAN tag of the message to be 3.
Example four
It can be seen from the first to third embodiments that, in the present application, a Spoke-PE that sends a packet is not determined through a private network tag, source MAC address learning is not performed on a HUB-PE, and a MAC address table entry is not searched, so that a problem of insufficient capacity of the MAC table entry on the HUB-PE is solved. Therefore, message forwarding in the HUB-Spoke networking is realized, and the HUB-CE is required to be modified.
The HUB-CE may be the user's own device or may be a device of the L2VPN provider. The HUB-CE creates a user instance for each user, and assigns a VLAN ID and an upstream port to each user instance, so that the upstream port has the capability of receiving and transmitting a two-layer VLAN tag. The HUB-CE is connected with the port of the HUB-PE and is called a HUB-CE uplink port. The upstream port can be shared by multiple user instances in the form of port + VLAN, for example, user instance a can use VLANs 1 to 100 on the upstream port, and user instance B uses VLANs 101 to 200 on the upstream port. And the HUB-CE allocates corresponding downlink ports for each user instance.
There are two tables for each user instance: a normal MAC address forwarding table and a user instance MAC address table. The normal MAC address forwarding table uses MAC + VLAN as an index, namely, the message can only be forwarded in VLAN. The MAC is used as an index in the MAC address table of the user instance, and the message in different VLANs can be mutually forwarded by using the index. The MAC address table between each user instance is isolated, and different user instances have different identifications.
After the configuration, when the HUB-CE receives the message sent by the HUB-PE, the HUB-CE learns the MAC address table entry of the user instance according to the outer layer VLAN tag of the received message. The user instance MAC address table entry comprises a user instance identifier, a VLAN ID, an MAC address and an output port, wherein the VLAN ID is the value of an outer layer VLAN tag of a received message. When the HUB-CE receives the message from the user side, the source MAC address learning is carried out, and an MAC address forwarding table entry is generated, which is realized in the prior art.
Referring to fig. 6, fig. 6 is a schematic flowchart of a method for forwarding a packet by a HUB-CE in the fourth embodiment of the present application. The method comprises the following specific steps:
step 601, the HUB-CE receives the message sent by the HUB-PE and pops up the outer layer VLAN tag of the received message.
Step 602, HUB-CE determines whether the message popping up the outer VLAN tag is a unicast message, if so, executes step 603; otherwise, step 607 is performed.
Step 603, the HUB-CE searches the MAC address forwarding table entry in the inner layer VLAN tag, determines whether the destination MAC address of the packet is found, and if so, executes step 604; otherwise, step 605 is executed.
In step 604, HUB-CE forwards the message with the pop-up label through the output port corresponding to the found destination MAC address, and ends the process.
Step 605, the HUB-CE determines a user instance according to the outer VLAN tag of the packet, searches in a user instance MAC address table entry corresponding to the determined user instance to determine whether a corresponding destination MAC address is found, and if so, executes step 606; otherwise, step 607 is performed.
Step 606, the HUB-CE encapsulates the message popping up the outer VLAN tag by using the VLAN ID corresponding to the destination MAC address as the outer VLAN tag, and forwards the message through the egress port corresponding to the destination MAC address, thereby ending the process.
Step 607, the HUB-CE sends the message popped the outer VLAN tag to all ports in the VLAN corresponding to the inner VLAN tag of the message and to the VLANs other than the VLAN corresponding to the outer VLAN tag on the uplink port of the user instance, and when sending the message on the uplink port, encapsulates the message popped the outer VLAN tag with the corresponding VLAN ID as the outer VLAN tag.
Still taking the HUB-Spoke networking of fig. 3 as an example, HUB-CE310 creates user instance 1 for user 1, creates user instance 2 for user 2, allocates VLAN3 for user instance 1, allocates VLAN4 for user instance 2, and allocates both uplink ports to both user instances as port 1, a downlink port to user instance 1 as port 2, and a downlink port to user instance 2 as port 3.
Take the processing of the received message sent by HUB-PE300 as an example. When HUB-CE310 receives the message sent by HUB-PE300, assuming that the VLAN tag value of the message is VLAN3, user instance MAC address table entry learning is carried out according to the outer layer VLAN tag of the received message, wherein the user instance MAC address table entry comprises a user instance ID, a VLANID, an MAC address and an outlet port number, and the VLAN ID is the value of the outer layer VLAN tag of the received message. Referring to table 1, table 1 is information included in a forwarding table entry of a user instance MAC address learned by the HUB-CE.
User instance ID | VLAN ID | MAC address | Number of outlet port |
1 | 3 | Source MAC address of message | 1 |
TABLE 1
The HUB-CE310 pops up an outer VLAN tag of a received message, and when the received message is a broadcast or multicast message, sends the message popped up by the outer VLAN tag to all ports in a VLAN corresponding to the inner VLAN tag of the message, and sends the message on a VLAN other than VLAN3 on port 1 of the user instance, that is, sends the message only on VLAN4 of port 1, and encapsulates the message popped up by the outer VLAN tag with VLAN4 as the outer VLAN tag.
When the received message is a unicast message, searching an MAC address forwarding table item in an inner layer VLAN tag, and if a corresponding target MAC address is searched, forwarding the MAC address forwarding table item through an output port corresponding to the target MAC address; if the corresponding destination MAC address is not found, determining that the corresponding user example is user example 1 according to the outer VLAN tag VLAN3 of the message, finding in the user example MAC address table entry corresponding to the user example 1, and if the corresponding destination MAC address is found, packaging the message popping the outer VLAN tag by taking the VLAN ID corresponding to the destination MAC address as the outer VLAN tag, and forwarding the message through an outlet port corresponding to the destination MAC address; otherwise, the message popping up the outer layer VLAN tag is processed according to the broadcast message or the multicast message.
EXAMPLE five
Referring to fig. 7, fig. 7 is a schematic flowchart of a method for forwarding a packet by a HUB-CE in the fifth embodiment of the present application. The method comprises the following specific steps:
in step 701, the HUB-CE receives a message from the user side.
Step 702, HUB-CE determines whether the packet is a unicast packet, if so, executes step 703; otherwise, step 707 is executed.
Step 703, the HUB-CE searches for an MAC address forwarding entry in the VLAN receiving the packet, determines whether to find a destination MAC address of the packet, and if so, executes step 704; otherwise, step 705 is performed.
In step 704, HUB-CE forwards the received packet through the output port corresponding to the found destination MAC address, and ends the process.
Step 705, the HUB-CE determines a user instance according to the port receiving the message, searches in the user instance MAC address table entry corresponding to the determined user instance to determine whether to find the destination MAC address of the message, if so, executes step 706; otherwise, step 707 is executed.
Step 706, the HUB-CE encapsulates the received packet with the VLAN ID corresponding to the found destination MAC address as an outer VLAN tag, and forwards the received packet through the egress port corresponding to the destination MAC address, thereby ending the process.
And 707, the HUB-CE sends the message to all ports except the message source port of the VLAN corresponding to the inner-layer VLAN tag of the message and all VLANs on the uplink port of the corresponding user instance, and encapsulates the corresponding VLAN as the outer-layer VLAN tag in the message sent by the uplink port, where the corresponding user instance is determined according to the port for receiving the message.
Still taking HUB-Spoke networking of fig. 3 as an example, when receiving a message from a user side through port 2, HUB-CE310 performs source MAC address learning to generate an MAC address forwarding entry, where the MAC address entry includes a vlan id, an MAC address, an egress port, and the like, which is the same as the conventional implementation and is not described in detail here.
When the received message is a broadcast or multicast message, the HUB-CE310 forwards the message to all ports except the egress port 2 of the VLAN corresponding to the inner-layer VLAN tag of the message, and if the user instance corresponding to the port 2 is the user instance 1, all VLANs (VLAN 3) on the uplink port (port 1) of the user instance 1 send the message, and the message sent on the uplink port encapsulates the corresponding VLAN (VLAN 3) as the outer-layer VLAN tag.
When the received message is a unicast message, the HUB-CE310 searches for an MAC address forwarding entry in the VLAN of the received message, and if a corresponding destination MAC address is found, forwards the received message through an output port corresponding to the destination MAC address; if the corresponding destination MAC address is not found, determining a user instance according to the port for receiving the message, wherein the user instance corresponding to the port 2 is the user instance 1, so that the user instance is found in the user instance MAC address table entry corresponding to the user instance 1, and if the corresponding destination MAC address is found, packaging the received message by taking a VLAN ID (VLAN 3) corresponding to the destination MAC address as an outer VLAN tag, and forwarding the received message through an outlet port corresponding to the destination MAC address; otherwise, the received message is processed according to the broadcast message or the multicast message.
Example six
In a general HUB-Spoke networking, when communication between a Spoke-PE and the Spoke-PE is needed, the communication needs to pass through the HUB-PE and the HUB-CE, when the communication needs to be directly conducted between the Spoke-PE and the Spoke-PE, each PE in the networking is configured to be the HUB-PE, each PE regards other PEs as the Spoke-PE, and when the messages sent by the PEs are received by the CE from an uplink interface, the messages are not forwarded to the uplink port.
The concrete implementation is as follows: all PEs in the HUB-Spoke networking are configured as HUB-PEs, each PE communicated with the HUB-Spoke networking is used as a Spoke-PE, and when all CEs receive messages from the PEs, the messages are not forwarded to the PEs.
Based on the same inventive concept, the embodiment of the application also provides a HUB-PE, which can be applied to a HUB-Spoke networking further comprising a plurality of Spoke-PEs, wherein the HUB-PE establishes a PW connection with each Spoke-PE, allocates an AC to each Spoke-PE, and binds the PW connection established with any Spoke-PE with the AC allocated to the Spoke-PE. Referring to fig. 8, fig. 8 is a schematic diagram of a HUB-PE structure according to the present application, which is applied to the technique of the first embodiment. The HUB-PE comprises: a configuration unit 801, a receiving unit 802, a processing unit 803 and a transmitting unit 804.
A configuration unit 801, configured to allocate the same private network tag to each Spoke-PE, allocate a VLAN ID of an AC allocated to each Spoke-PE as a service identifier to each Spoke-PE, and package the service identifier as an outer VLAN tag of a message when the Spoke-PE sends the message to a HUB-PE.
A receiving unit 802, configured to receive a message sent by the Spoke-PE, where the service identifier allocated by the configuration unit 801 is used as an outer VLAN tag.
The processing unit 803 is configured to, when the receiving unit 802 receives a packet, which is sent by the Spoke-PE and for which the service identifier allocated by the configuration unit 801 is used as an outer VLAN tag, pop up a public network tag and a private network tag of the packet.
A sending unit 804, configured to forward the packet processed by the processing unit 803 to the HUB-CE through the port connected to the HUB-CE, so that the HUB-CE learns the value of the outer VLAN tag of the packet.
Preferably, the first and second liquid crystal films are made of a polymer,
the receiving unit 802 is further configured to receive a message sent by the HUB-CE.
The processing unit 803 is further configured to determine a corresponding AC according to a value of an outer VLAN tag of the packet received by the receiving unit 802, and encapsulate the public network tag and the private network tag allocated by the configuration unit 801 for the packet, where the value of the outer VLAN tag of the packet sent by the HUB-CE is obtained by the HUB-CE through learning the packet sent by the HUB-PE.
The sending unit 804 is further configured to forward the packet with the private network label and the public network label encapsulated by the processing unit 803 through the PW bound to the determined AC.
Preferably, the first and second liquid crystal films are made of a polymer,
the sending unit 804 is further configured to carry the service identifier allocated by the configuration unit 801 to each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE obtains the service identifier allocated by the HUB-PE carried in the PW element information for the Spoke-PE.
The embodiment of the application further provides a HUB-PE, which can be applied to a HUB-Spoke networking further comprising a plurality of Spoke-PEs, wherein the HUB-PE establishes a PW connection with each Spoke-PE, allocates an AC to each Spoke-PE, and binds the PW connection established with any Spoke-PE with the AC allocated to the Spoke-PE. Referring to fig. 9, fig. 9 is a schematic diagram of a HUB-PE structure of the present application applied to the technique of example three. The HUB-PE comprises: a configuration unit 901, a receiving unit 902, a processing unit 903 and a transmitting unit 904.
A configuration unit 901, configured to allocate the same private network tag to each Spoke-PE, and allocate different service identifiers to each Spoke-PE, so that when the Spoke-PE sends a packet to a HUB-PE, the service identifier is encapsulated as an outer VLAN tag of the packet.
A receiving unit 902, configured to receive a packet sent by the Spoke-PE, where the service identifier allocated by the configuration unit 901 is used as an outer VLAN tag.
A processing unit 903, configured to pop up a public network tag and a private network tag of a message sent by a Spoke-PE when the receiving unit 902 receives the message, which is sent by the Spoke-PE and uses the service identifier allocated to the message by the configuration unit 901 as an outer VLAN tag, determine the Spoke-PE sending the message according to the outer VLAN tag of the message popped up with the tag, determine a corresponding AC according to the determined Spoke-PE, and modify the value of the VLAN tag of the message popped up with the tag into the VLAN ID of the determined AC.
A sending unit 904, configured to forward the packet processed by the processing unit 903 to the HUB-CE in the VLAN on the port of the AC determined by the processing unit, so that the HUB-CE learns the value of the outer VLAN tag of the packet.
Preferably, the first and second liquid crystal films are made of a polymer,
the receiving unit 902 is further configured to receive a packet sent by the HUB-CE.
The processing unit 903 is further configured to determine a corresponding AC according to a value of an outer VLAN tag of the packet received by the receiving unit 902, and encapsulate the public network tag and the private network tag allocated by the configuration unit for the packet, where the value of the outer VLAN tag of the packet sent by the HUB-CE is obtained by the HUB-CE through learning the packet sent by the HUB-PE.
The sending unit 904 is further configured to forward the packet with the private network label and the public network label encapsulated by the processing unit 903 through a PW bound to the determined AC.
Preferably, the first and second liquid crystal films are made of a polymer,
the sending unit 904 is further configured to carry the service identifier allocated by the configuration unit 901 to each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE obtains the service identifier allocated by the HUB-PE carried in the PW element information for the Spoke-PE.
The application also provides a HUB-CE which can be applied to the HUB-Spoke networking. Referring to fig. 10, fig. 10 is a schematic structural view of a HUB-CE applied to the fourth and fifth techniques of example. The HUB-CE comprises: a configuration unit 1001, a receiving unit 1002, a learning unit 1003, and a processing unit 1004.
A configuration unit 1001, configured to create a user instance for each user, and allocate a vlan id and an uplink port to each user instance;
a receiving unit 1002, configured to receive a message sent by the HUB-PE.
A learning unit 1003, configured to perform user instance MAC address table entry learning according to the outer VLAN tag of the message received by the receiving unit 1002, where the user instance MAC address table entry includes a user instance ID, a VLAN ID, a MAC address, and an egress port, where the VLAN ID is a value of the outer VLAN tag of the received message.
A processing unit 1004, configured to pop out an outer VLAN tag of the received message received by the receiving unit 1002, send the message popped out the outer VLAN tag to all ports in a VLAN corresponding to an inner VLAN tag of the message and VLANs other than the VLAN corresponding to the outer VLAN tag on an uplink port of a user instance when the received message is a broadcast or multicast message, and package the message popped out the outer VLAN tag with a corresponding VLAN ID as the outer VLAN tag when the message is sent on the uplink port; when the received message is a unicast message, searching an MAC address forwarding table item in an inner layer VLAN tag, and if a corresponding target MAC address is searched, forwarding the MAC address forwarding table item through an output port corresponding to the target MAC address; if the corresponding destination MAC address is not found, determining a user instance in the configuration unit 1001 according to the outer layer VLAN tag of the message, finding in a user instance MAC address entry in the learning unit 1003 corresponding to the determined user instance, and if the corresponding destination MAC address is found, encapsulating the message popping up the outer layer VLAN tag by using the VLAN ID corresponding to the destination MAC address as the outer layer VLAN tag, and forwarding the message through an egress port corresponding to the destination MAC address; otherwise, the message of popping the outer layer VLAN tag is processed according to the broadcast message or the multicast message.
Preferably, the first and second liquid crystal films are made of a polymer,
the configuration unit 1001 is further configured to allocate a corresponding downlink port to each user instance.
The receiving unit 1002 is further configured to receive a message from a user side.
The learning unit 1003 is further configured to perform source MAC address learning on the message received by the receiving unit from the user side, and generate an MAC address forwarding table entry.
The processing unit 1004 is further configured to, when the message received by the receiving unit 1002 is a broadcast or multicast message, send the message to all ports except a message source port of a VLAN corresponding to an inner-layer VLAN tag of the message and all VLANs on an uplink port of a corresponding user instance, and encapsulate the corresponding VLAN as an outer-layer VLAN tag in the message sent by the uplink port, where the corresponding user instance is determined according to the port receiving the message; when the message received by the receiving unit 1002 is a unicast message, searching for an MAC address forwarding entry in a VLAN of the received message, and if a corresponding destination MAC address is found, forwarding the received message through an output port corresponding to the destination MAC address; if the corresponding destination MAC address is not found, determining a user instance in the configuration unit 1001 according to the port receiving the message, finding in a user instance MAC address table entry in the learning unit 1003 corresponding to the determined user instance, and if the corresponding destination MAC address is found, encapsulating the received message with a VLAN ID corresponding to the destination MAC address as an outer VLAN tag, and forwarding through an egress port corresponding to the destination MAC address; otherwise, the received message is processed according to the broadcast message or the multicast message.
The units of the above embodiments may be integrated into one body, or may be separately deployed; may be combined into one unit or further divided into a plurality of sub-units.
To sum up, in the specific embodiment of the present application, the HUB-PE allocates the same private network label to the same HUB-Spoke networking, and is only used to distinguish the HUB-Spoke networking, that is, to distinguish from which HUB-Spoke networking the message comes from; different service identifications are distributed for the Spoke-PEs to distinguish which Spoke-PE the message comes from for message forwarding, and the problem that private network labels are not enough can be solved.
In the specific embodiment of the application, the HUB-PE does not need to learn the MAC address of the private network, the learning of the MAC address is completed on the HUB-CE, and the MAC addresses and the flow of different L2 VPNs can be shared by a plurality of HUB-CEs. On one hand, the pressure of MAC table entry capacity on the HUB-PE is greatly reduced, and on the other hand, as the end user can directly manage the HUB-CE, a lot of flexibility is increased, the safety of the user is improved, and the cost of a service provider can be saved.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (18)
1. A message forwarding method is applied to a central HUB-branch Spoke networking, pseudo-wire PW connection is established between a network edge device PE of a HUB-service provider in the networking and each Spoke-PE, an access circuit AC is distributed to each Spoke-PE, the PW connection established with any Spoke-PE is bound with an AC distributed to the Spoke-PE, the message forwarding method is characterized in that the HUB-PE distributes the same private network label to each Spoke-PE, a virtual local area network identification VLAN ID of the AC distributed to each Spoke-PE is distributed to each Spoke-PE as a service identification, and the service identification is packaged as an outer tag of a VLAN message when the Spoke-PE sends the message to the HUB-PE, and the message forwarding method comprises the following steps:
and when the HUB-PE receives a message which is sent by the Spoke-PE and takes the service identifier distributed by the HUB-PE for the Spoke-PE as an outer virtual local area network label VLAN tag, popping up a public network tag and a private network tag of the message, and forwarding the public network tag and the private network tag to the HUB-user edge equipment CE through a port which is connected with the HUB-CE in the HUB-Spoke networking so that the HUB-CE learns the value of the outer VLAN tag of the message.
2. The method of claim 1, further comprising:
when the HUB-PE receives the message sent by the HUB-CE, the corresponding AC is determined according to the value of the outer VLAN tag of the received message, the distributed private network tag and public network tag are packaged for the message, and the message is forwarded through the PW bound with the determined AC, wherein the value of the outer VLAN tag of the message sent by the HUB-CE is obtained by the HUB-CE through learning the message sent by the HUB-CE.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and the HUB-PE carries the service identifier distributed for each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE acquires the service identifier distributed for the Spoke-PE by the HUB-PE carried in the PW element information.
4. The method according to claim 1 or 2, characterized in that the method further comprises:
all PEs in the HUB-Spoke networking are configured as HUB-PEs, each PE communicated with the HUB-Spoke networking is used as a Spoke-PE, and when all CEs receive messages from the PEs, the messages are not forwarded to the PEs.
5. A message forwarding method is applied to a central HUB-branch Spoke networking, pseudo-wire PW connection is established between a network edge device PE of a HUB-service provider in the networking and each Spoke-PE, an access circuit AC is distributed for each Spoke-PE, the PW connection established with any Spoke-PE is bound with the AC distributed for the Spoke-PE, the message forwarding method is characterized in that the HUB-PE distributes the same private network label for each Spoke-PE, different service identifiers are distributed for each Spoke-PE, and the service identifiers serve as outer virtual local area network labels VLAN tag of the message to be packaged when the Spoke-PE sends the message to the HUB-PE, and the method comprises the following steps:
and when the HUB-PE receives a message which is sent by the Spoke-PE and takes the service identifier distributed by the HUB-PE for the Spoke-PE as an outer VLAN tag, popping up a public network tag and a private network tag of the message, determining the Spoke-PE for sending the message according to the outer VLANtag of the message with the popped up tag, determining a corresponding AC according to the determined Spoke-PE, modifying the value of the VLAN tag of the message with the popped up tag into the VLAN ID of the determined AC, and forwarding the VLAN ID to the HUB-user edge device CE in the VLAN on the port of the determined AC, so that the HUB-CE learns the value of the outer VLAN tag of the message.
6. The method of claim 5, further comprising:
when the HUB-PE receives the message sent by the HUB-CE, the corresponding AC is determined according to the value of the outer VLAN tag of the received message, the distributed private network tag and public network tag are packaged for the message, and the message is forwarded through the PW bound with the determined AC, wherein the value of the outer VLAN tag of the message sent by the HUB-CE is obtained by the HUB-CE through learning the message sent by the HUB-CE.
7. The method of claim 5 or 6, further comprising:
and the HUB-PE carries the service identifier distributed for each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE acquires the service identifier distributed for the Spoke-PE by the HUB-PE carried in the PW element information.
8. The method of claim 5 or 6, further comprising:
all PEs in the HUB-Spoke networking are configured as HUB-PEs, each PE communicated with the HUB-Spoke networking is used as a Spoke-PE, and when all CEs receive messages from the PEs, the messages are not forwarded to the PEs.
9. A message forwarding method is applied to a central HUB-branch Spoke networking, and is characterized by comprising the following steps:
a HUB-user edge device (CE) in the HUB-Spoke networking creates a user instance for each user, and allocates a Virtual Local Area Network (VLAN) Identification (ID) and an uplink port to each user instance;
when the HUB-CE receives a message sent by the HUB-PE, learning a user instance Media Access Control (MAC) address table item according to an outer virtual local area network tag (VLAN tag) of the received message, wherein the user instance MAC address table item comprises a user instance ID, a VLAN ID, an MAC address and an output port, and the VLAN ID is the value of the outer VLAN tag of the received message;
the HUB-CE pops up an outer layer VLAN tag of a received message, when the received message is a broadcast or multicast message, the message popped up the outer layer VLAN tag is sent to all ports in a VLAN corresponding to an inner layer VLAN tag of the message and VLANs except the VLAN corresponding to the outer layer VLAN tag on an uplink port of a user instance, and when the message is sent to the uplink port, a corresponding VLAN ID is used as the outer layer VLAN tag to package the message popped up the outer layer VLAN tag;
when the received message is a unicast message, searching an MAC address forwarding table item in an inner layer VLAN tag, and if a corresponding target MAC address is searched, forwarding the MAC address forwarding table item through an output port corresponding to the target MAC address; if the corresponding target MAC address is not found, determining a user instance according to the outer layer VLAN tag of the message, finding in the user instance MAC address table item corresponding to the determined user instance, and if the corresponding target MAC address is found, packaging the message popped up by the outer layer VLAN tag by taking the VLAN ID corresponding to the target MAC address as the outer layer VLAN tag, and forwarding the message through the output port corresponding to the target MAC address; otherwise, the message popping up the outer layer VLAN tag is processed according to the broadcast message or the multicast message.
10. The method of claim 9, further comprising: the HUB-CE allocates corresponding downlink ports for each user instance;
when the HUB-CE receives the message from the user side, the source MAC address learning is carried out, and an MAC address forwarding table entry is generated;
when the received message is a broadcast or multicast message, the message is sent to all ports except a message source port of a VLAN corresponding to an inner VLAN tag of the message and all VLANs on an uplink port of a corresponding user instance, and the corresponding VLAN is packaged as an outer VLAN tag in the message sent by the uplink port, wherein the corresponding user instance is determined according to the port for receiving the message;
when the received message is a unicast message, the HUB-CE searches an MAC address forwarding table item in a VLAN of the received message, and if a corresponding target MAC address is found, the received message is forwarded through an output port corresponding to the target MAC address; if the corresponding destination MAC address is not found, determining a user instance according to the port for receiving the message, finding in the user instance MAC address table item corresponding to the determined user instance, and if the corresponding destination MAC address is found, packaging the received message by taking the VLANID corresponding to the destination MAC address as an outer VLAN tag, and forwarding the message through the output port corresponding to the destination MAC address; otherwise, the received message is processed according to the broadcast message or the multicast message.
11. A central HUB-service provider network edge device PE can be applied to a HUB-Spoke networking which also comprises a plurality of branch Spoke-PEs, the HUB-PE establishes pseudo wire PW connection with each Spoke-PE, distributes an access circuit AC for each Spoke-PE, and binds the PW connection established with any Spoke-PE with the AC distributed for the Spoke-PE, and is characterized in that the HUB-PE comprises: the device comprises a configuration unit, a receiving unit, a processing unit and a sending unit;
the configuration unit is used for allocating the same private network label to each Spoke-PE, allocating a virtual local area network identification VLAN ID of the AC allocated to each Spoke-PE as a service identification to each Spoke-PE, and enabling the Spoke-PE to serve as an outer virtual local area network label VLANtag of a message for packaging when the Spoke-PE sends the message to the HUB-PE;
the receiving unit is used for receiving the service identifier which is sent by the Spoke-PE and distributed by the configuration unit as a message of an outer virtual local area network tag VLAN tag;
the processing unit is used for popping up a public network label and a private network label of a message when the receiving unit receives the message which is sent by the Spoke-PE and takes the service identifier distributed to the receiving unit by the configuration unit as an outer VLAN tag;
and the sending unit is used for forwarding the message processed by the processing unit to the HUB-CE through a port connected with the HUB-CE, so that the HUB-CE learns the value of the outer layer VLAN tag of the message.
12. The HUB-PE of claim 11,
the receiving unit is further configured to receive a message sent by the HUB-CE;
the processing unit is further configured to determine a corresponding AC according to a value of an outer VLAN tag of the packet received by the receiving unit, and encapsulate a public network tag and a private network tag allocated by the configuration unit for the packet, where the value of the outer VLAN tag of the packet sent by the HUB-CE is obtained by the HUB-CE through learning the packet sent by the HUB-PE;
the sending unit is further configured to forward the packet with the private network label and the public network label encapsulated by the processing unit through a PW bound to the determined AC.
13. The HUB-PE according to claim 11 or 12,
the sending unit is further configured to carry the service identifier allocated by the configuration unit to each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE obtains the service identifier allocated to the Spoke-PE by the HUB-PE carried in the PW element information.
14. A central HUB-service provider network edge device PE can be applied to a HUB-Spoke networking which also comprises a plurality of branch Spoke-PEs, the HUB-PE establishes pseudo wire PW connection with each Spoke-PE, distributes an access circuit AC for each Spoke-PE, and binds the PW connection established with any Spoke-PE with the AC distributed for the Spoke-PE, and is characterized in that the HUB-PE comprises: the device comprises a configuration unit, a receiving unit, a processing unit and a sending unit;
the configuration unit is used for allocating the same private network tag for each Spoke-PE and allocating different service identifiers for each Spoke-PE, so that the service identifiers are used as outer virtual local area network tag VLAN tags of the messages to be packaged when the Spoke-PE sends the messages to the HUB-PE;
the receiving unit is used for receiving a message which is sent by the Spoke-PE and takes the service identifier distributed to the Spoke-PE by the configuration unit as an outer VLAN tag;
the processing unit is used for popping up a public network tag and a private network tag of a message when the receiving unit receives the message which is sent by the Spoke-PE and takes the service identifier distributed to the Spoke-PE by the configuration unit as an outer VLAN tag, determining the Spoke-PE for sending the message according to the outer VLAN tag of the message with the popped up tag, determining a corresponding AC according to the determined Spoke-PE, and modifying the value of the VLAN tag of the message with the popped up tag into the VLAN ID of the determined AC;
and the sending unit is used for forwarding the message processed by the processing unit to the HUB-CE in the VLAN on the port of the AC determined by the processing unit, so that the HUB-customer edge device CE learns the value of the outer layer VLAN tag of the message.
15. The HUB-PE of claim 14,
the receiving unit is further configured to receive a message sent by the HUB-CE;
the processing unit is further configured to determine a corresponding AC according to a value of an outer VLAN tag of the packet received by the receiving unit, and encapsulate a public network tag and a private network tag allocated by the configuration unit for the packet, where the value of the outer VLAN tag of the packet sent by the HUB-CE is obtained by the HUB-CE through learning the packet sent by the HUB-PE;
the sending unit is further configured to forward the packet with the private network label and the public network label encapsulated by the processing unit through a PW bound to the determined AC.
16. The HUB-PE according to claim 14 or 15,
the sending unit is further configured to carry the service identifier allocated by the configuration unit to each Spoke-PE in the PW element information sent to each Spoke-PE, so that each Spoke-PE obtains the service identifier allocated to the Spoke-PE by the HUB-PE carried in the PW element information.
17. A HUB-user edge device CE for use in HUB-Spoke networking, the HUB-CE comprising: the device comprises a configuration unit, a receiving unit, a learning unit and a processing unit;
the configuration unit is used for creating a user instance for each user and distributing a virtual local area network identification (VLAN ID) and an uplink port for each user instance;
the receiving unit is used for receiving the message sent by the HUB-PE;
the learning unit is used for learning a user instance Media Access Control (MAC) address table item according to an outer layer virtual local area network tag (VLANtag) of the message received by the receiving unit, wherein the user instance MAC address table item comprises a user instance ID, a VLAN ID, an MAC address and an output port, and the VLAN ID is a value of the outer layer VLAN tag of the received message;
the processing unit is used for popping up an outer VLAN tag of a message received by the receiving unit, sending the message popped up by the outer VLAN tag to all ports in a VLAN corresponding to an inner VLAN tag of the message and VLANs except the VLAN corresponding to the outer VLAN tag on an uplink port of a user instance when the received message is a broadcast or multicast message, and packaging the message popped up by the outer VLAN tag by taking a corresponding VLAN ID as the outer VLAN tag when the message is sent by the uplink port; when the received message is a unicast message, searching an MAC address forwarding table item in an inner layer VLAN tag, and if a corresponding target MAC address is searched, forwarding the MAC address forwarding table item through an output port corresponding to the target MAC address; if the corresponding target MAC address is not found, determining a user instance in the configuration unit according to the outer layer VLAN tag of the message, finding in the user instance MAC address table entry in the learning unit corresponding to the determined user instance, and if the corresponding target MAC address is found, packaging the message popping up the outer layer VLAN tag by taking the VLAN ID corresponding to the target MAC address as the outer layer VLAN tag, and forwarding the message through an outlet port corresponding to the target MAC address; otherwise, the message popping up the outer layer VLAN tag is processed according to the broadcast message or the multicast message.
18. The HUB-CE according to claim 17,
the configuration unit is further configured to allocate a corresponding downlink port to each user instance;
the receiving unit is further configured to receive a message from a user side;
the learning unit is further configured to perform source MAC address learning on the message received by the receiving unit from the user side, and generate an MAC address forwarding table entry;
the processing unit is further configured to send the message to all ports except a message source port of a VLAN corresponding to an inner-layer VLAN tag of the message and all VLANs on an uplink port of a corresponding user instance when the message received by the receiving unit is a broadcast or multicast message, and encapsulate the corresponding VLAN as an outer-layer VLAN tag in the message sent by the uplink port, where the corresponding user instance is determined according to the port from which the message is received; when the message received by the receiving unit is a unicast message, searching an MAC address forwarding table item in a VLAN (virtual local area network) of the received message, and if a corresponding target MAC address is searched, forwarding the received message through an output port corresponding to the target MAC address; if the corresponding destination MAC address is not found, determining a user instance in the configuration unit according to the port for receiving the message, finding in the user instance MAC address table entry in the learning unit corresponding to the determined user instance, and if the corresponding destination MAC address is found, packaging the received message by taking the VLAN ID corresponding to the destination MAC address as an outer VLAN tag and forwarding the received message through an outlet port corresponding to the destination MAC address; otherwise, the received message is processed according to the broadcast message or the multicast message.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210443911.2A CN103812773B (en) | 2012-11-08 | A kind of message forwarding method, HUB-PE and HUB-CE | |
PCT/CN2013/086740 WO2014071864A1 (en) | 2012-11-08 | 2013-11-08 | Identifiers for spoke-pes in hub-spoke networks |
US14/440,973 US20150304174A1 (en) | 2012-11-08 | 2013-11-08 | Identifiers for spoke-pes in hub-spoke networks |
EP13853634.7A EP2918053A4 (en) | 2012-11-08 | 2013-11-08 | Identifiers for spoke-pes in hub-spoke networks |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210443911.2A CN103812773B (en) | 2012-11-08 | A kind of message forwarding method, HUB-PE and HUB-CE |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103812773A CN103812773A (en) | 2014-05-21 |
CN103812773B true CN103812773B (en) | 2016-11-30 |
Family
ID=
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1881917A (en) * | 2005-06-13 | 2006-12-20 | 海尔集团公司 | Household network wireless netting and communication method |
CN101170514A (en) * | 2007-12-04 | 2008-04-30 | 华为技术有限公司 | Method and device for implementing access control between access circuit interfaces |
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1881917A (en) * | 2005-06-13 | 2006-12-20 | 海尔集团公司 | Household network wireless netting and communication method |
CN101170514A (en) * | 2007-12-04 | 2008-04-30 | 华为技术有限公司 | Method and device for implementing access control between access circuit interfaces |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103312611B (en) | Message processing method, device label processing method and equipment | |
US8861547B2 (en) | Method, apparatus, and system for packet transmission | |
CN100563211C (en) | Method and system for realizing virtual gateway and virtual subnet | |
US8958431B2 (en) | Access method and apparatus for multi-protocol label switching layer 2 virtual private network | |
CN105284080B (en) | The virtual network management method and data center systems of data center | |
CN103326918B (en) | A kind of message forwarding method and equipment | |
JP2021530912A (en) | Network slice control method and device, computer readable storage medium | |
US20120207171A1 (en) | Method and Apparatus for Interworking VPLS and Ethernet Networks | |
WO2015165311A1 (en) | Method for transmitting data packet and provider edge device | |
CN101317425A (en) | Data forwarding method in two-layer network, network and node equipment | |
CN105379197A (en) | Tunnel establishment method, label allocation method, device, and network system | |
BR112014031089B1 (en) | METHOD AND APPARATUS FOR PROCESSING PACKET OF TRANSPARENT INTERCONNECTION OF MANY LINKS, AND METHOD AND APPARATUS FOR PROCESSING OF AND NAME | |
CA2571795A1 (en) | Backbone provider bridging networks | |
EP2378717A1 (en) | Method for interconnecting with nested backbone provider bridges and system thereof | |
CN102546349B (en) | A kind of message forwarding method and equipment | |
CN102571375B (en) | Multicast forwarding method and device as well as network device | |
CN102857400B (en) | The method for building up of broadcast domain and device in a kind of Layer 2 virtual private network | |
CN102255759B (en) | Method and device for transmitting data message based on PW (Packet Writing) redundant backup | |
CN103001886B (en) | A kind of ECT smooth migration method and apparatus | |
CN105450520A (en) | Message processing method and device, and method and device for building aggregation tunnel | |
CN103428067B (en) | A kind of message forwarding method and equipment based on two-layer virtual private network | |
CN101719857B (en) | Asymmetric PW-based VPLS network access method and asymmetric PW-based VPLS network access system | |
CN106603372A (en) | Data package processing method and data package processing device | |
CN104486225B (en) | Applied to the message forwarding method and equipment in TRILL network | |
CN100477624C (en) | Method, system and device for realizing VLL in QinQ subinterface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |