EP2587742A1 - Method for forwarding message and switch chip - Google Patents
Method for forwarding message and switch chip Download PDFInfo
- Publication number
- EP2587742A1 EP2587742A1 EP11797495.6A EP11797495A EP2587742A1 EP 2587742 A1 EP2587742 A1 EP 2587742A1 EP 11797495 A EP11797495 A EP 11797495A EP 2587742 A1 EP2587742 A1 EP 2587742A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- packet
- switch chip
- layer
- termination processing
- vpn
- 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.)
- Withdrawn
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
- H04L49/109—Integrated on microchip, e.g. switch-on-chip
Definitions
- the disclosure relates to the field of Multi-Protocol Label Switching (MPLS) Virtual Private Network (VPN), and in particular to a method for forwarding a packet and a switch chip.
- MPLS Multi-Protocol Label Switching
- VPN Virtual Private Network
- the MPLS network has become a development trend of the next generation core network, and the MPLS VPN provides in the MPLS network the VPN virtual private switch network function using MPLS techniques, and mainly includes an MPLS layer 2 VPN and an MPLS layer 3 VPN.
- a layer 2 connection can be established between different nodes via the MPLS network.
- the MPLS layer 2 VPN divides the management duties of MPLS network operations. Specifically, a Provide Edge (PE) takes charge of layer 2 connection and packet forwarding between custom edges (CE), and the CEs perform functions associated with layer 3 and the above. In this way, the management cost regarding the network operation may be reduced.
- PE Provide Edge
- CE custom edges
- the MPLS layer 3 VPN may divide the current IP network into networks logically isolated with each other. Such networks may be widely applied, for example, to implement interconnection between different departments or within a same department of an enterprise or of the government, or to provide a new service such as the IP telephony service.
- the MPLS VPN technique Compared with either the traditional circuit or virtual circuit based VPN or the IP tunnel based VPN, the MPLS VPN technique has significant advantages. As the MPLS VPN technique becomes more and more mature, the increasing user requirements on network bandwidth, service quality, and flexibility in accessing the MPLS network and the like are taken account in addition to reducing the cost. The MPLS VPN technique therefore stands for the future development trend of the Internet.
- Fig. 1 is a schematic view of the networking of the MPLS VPN in the related art.
- the layer 2 VPN serves as an access layer for user access and is connected to an access-side-port of the PE.
- the layer 3 VPN serves as a convergence layer and is connected to a network-side-port of the PE.
- a base station is connected to the PE via a Pseudo Wire (PW).
- PW Pseudo Wire
- the direction from the layer 2 VPN to the layer 3 VPN is referred to as an uplink direction, in which the PE has to perform a layer 2 VPN termination processing for the packet.
- the direction from the layer 3 VPN to the layer 2 VPN is referred to as a downlink direction, in which the PE has to perform a layer 3 VPN termination processing for the packet and a layer 2 VPN initialization for the packet, and then forwards the packet to the layer 2 VPN.
- the switch chip in the PE of the related art cannot support these functions directly.
- the first method is implemented with two PEs, wherein a PE performs the layer 2 VPN termination and the layer 3 VPN initialization and forwards the packet to the layer 3 VPN, and another PE performs the layer 3 VPN termination and the layer 2 VPN initialization, and forwards the packet to the layer 2 VPN.
- the second method is implemented with a single PE, wherein in the uplink direction, two ports in the PE are configured to operate in an internal loopback mode; after the switch chip performs the layer 2 VPN termination processing for the packet, the packet is looped back to the switch chip, the switch chip may then implement the layer 3 VPN initialization for the packet, and it is a similar case for the downlink direction.
- the first method is disadvantageous in that one more PE is used compared with the second method, increasing the cost for networking and maintenance; for the second method, although one less PE is used, two ports are used, and accordingly the cost and the maintenance expense are also high.
- the disclosure provides a method for forwarding a packet and a switch chip, which is capable of implementing packet forwarding in both uplink and downlink directions in the MPLS VPN networking by using a single PE and a single port.
- the disclosure provides a method for forwarding a packet, which includes: configuring a cascade port of a switch chip to operate in an internal loopback mode; performing a termination processing for the packet; looping the packet after the termination processing back to the cascade port; initializing the loopback packet; and forwarding the packet.
- configuring the cascade port of the switch chip to operate in the internal loopback mode may include: setting, by the switch chip of a Provide Edge (PE), the value of a register in the cascade port of the switch chip of the PE, for setting the internal loopback mode, to be a valid value.
- PE Provide Edge
- performing the termination processing for the packet may include: determining, by the switch chip of a PE, whether the packet is in an uplink direction or a downlink direction, performing, by the switch chip, a layer 2 Virtual Private Network (VPN) termination processing when the packet is in the uplink direction, and performing, by the switch chip, a layer 3 VPN termination processing when the packet is in the downlink direction.
- VPN Virtual Private Network
- initializing the loopback packet may include: determining, by the switch chip, whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet; if determining that the packet is in the uplink direction, performing, by the switch chip, a layer 3 VPN initialization for the loopback packet; and if determining that the packet is in the downlink direction, performing, by the switch chip, a layer 2 VPN initialization for the loopback packet.
- performing, by the switch chip, the layer 3 VPN initialization for the loopback packet may include: searching for a hardware table item in the switch chip based on a VLAN number of a single label in the packet, to obtain a Media Access Control (MAC) address, a Virtual Circuit (VC) label and a tunnel label;, taking the obtained MAC address, VC label and tunnel label as the head of the packet; and forming the packet with the head and the content of the packet.
- MAC Media Access Control
- VC Virtual Circuit
- performing, by the switch chip, the layer 2 VPN initialization for the loopback packet may include: searching, by the switch chip, for a hardware table item in the switch chip based on a VLAN number of double labels in the packet, to obtain a MAC address, a VC label, and a tunnel label; removing, by the switch chip, an external layer VLAN label in the packet; taking the obtained MAC address, VC label, and tunnel label as the head of the packet; and forming the packet with the head and the content of the packet.
- the disclosure also provides a switch chip, which includes a configuring module, a termination processing module, a cascade port, and a forwarding module, wherein the configuring module is adapted to configure the cascade port to operate in an internal loopback mode; the termination processing module is adapted to perform a termination processing for the packet and send the packet after the termination processing to the cascade port; the cascade port is adapted to loop the packet after the termination processing back to the forwarding module; the forwarding module is adapted to initialize the loopback packet and to forward the packet.
- the configuring module is adapted to configure the cascade port to operate in an internal loopback mode
- the termination processing module is adapted to perform a termination processing for the packet and send the packet after the termination processing to the cascade port
- the cascade port is adapted to loop the packet after the termination processing back to the forwarding module
- the forwarding module is adapted to initialize the loopback packet and to forward the packet.
- the termination processing module may perform the termination processing for the packet and send the packet after the termination processing to the cascade port by determining whether the packet is in an uplink direction or a downlink direction; performing a layer 2 VPN termination processing for the packet when the packet is in the uplink direction; and performing a layer 3 VPN termination processing for the packet when the packet is in the downlink direction.
- the forwarding module may initialize the loopback packet by determining whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet; if determining that the packet is in the uplink direction, performing a layer 3 VPN initialization for the loopback packet; and if determining that the packet is in the downlink direction, performing a layer 2 VPN initialization for the loopback packet.
- the method for forwarding a packet and the switch chip according to the present disclosure implement packet forwarding in both uplink and downlink directions in the MPLS VPN networking by using a single PE and a single port, better support layer 2 and layer 3 VPN networking applications, and may reduce the number of equipments used in the MPLS VPN networking, thereby reducing the networking complexity and saving the costs for maintenance and equipment management.
- the Virtual Local Area Network (VLAN) stack refers to that whenever a port of the switch chip in an equipment receives a packet, the switch chip will label the packet with VLAN, no matter the packet carries a VLAN label or not. In this way, if the received packet already carries a VLAN label, the packet will become a packet with double VALN labels; in the MPLS VPN network, a packet itself has a VLAN label; according to the 802.1 Q protocol, the PE does not have the VLAN stack access when performing a layer 2 VPN termination in the MPLS VPN and has the VLAN stack access only when performing a layer 3 VPN termination in the MPLS VPN.
- VLAN Virtual Local Area Network
- the basic concept of the discloses lies in that a cascade port of the switch chip is configured to operate in an internal loopback mode, a termination of the packet is performed, after that the terminated packet is looped back at the cascade port, and the loopback packet is initialized and forwarded.
- Fig. 2 is a flowchart of the method for forwarding a packet according to the disclosure. As shown in Fig. 2 , the method includes the following steps:
- the switch chip of a PE sets the value of a register in the cascade port of the switch chip for setting the internal loopback mode to be a valid value "1", such that the cascade port of the switch chip may be configured to operate in an internal loopback mode.
- the switch chip in this embodiment may be any chip that has the VLAN stack access, such as a common chip or an Application Specific Integrated Circuit (ASIC) chip that has the VLAN stack access, or the like.
- ASIC Application Specific Integrated Circuit
- Step 202 performing a termination processing for the packet, looping the packet after the termination processing back to the cascade port.
- the PE may receive a packet from the layer 2 VPN or from the layer 3 VPN, and the switch chip of the PE determines whether the packet is in the uplink direction or in the downlink direction, wherein the packet is in the uplink direction if the packet comes from an access-side-port, and the packet is in the downlink direction if the packet comes from a network-side-port.
- the switch chip When the packet is in the uplink direction, the switch chip performs the layer 2 VPN termination processing for the packet, namely, removes the head of the packet and leaves the content of the packet; the packet after the layer 2 VPN termination processing is sent by the switch chip to a cascade port of the switch chip, and as the cascade port has been configured to operate in the internal loopback mode, the packet arriving at the cascade port is looped back to the switch chip.
- the switch chip When the packet is in the downlink direction, the switch chip performs the layer 3 VPN termination processing for the packet, namely, firstly the head of the packet is removed and the content of the packet is left, then an internal layer VLAN label is added to the packet which already has a VLAN label in an access mode of VLAN stack, namely, the switch chip inserts a VLAN label containing a VLAN number between the content of the packet and the existing VLAN label.
- the VLAN numbers in the two VLAN labels may be the same or different.
- the internal VLAN label in order to conveniently find out information such as the output port in a VLAN-label-based lookup, the internal VLAN label may be set to be as same as the existing VLAN label, that is, the VLAN numbers of the two VLAN labels are the same.
- the packet after the layer 3 VPN termination processing is sent by the switch chip to a cascade port of the switch chip. Since the cascade port has been configured to operate in the internal loopback mode, the packet arriving at the cascade port is loope
- an internal VLAN label is added to the packet in the downlink direction, such that the packet has double VLAN labels.
- a packet in the downlink direction may be distinct from one in the uplink direction.
- Step 203 performing initialization for the loopback packet, and forwarding the packet.
- the switch chip receives the packet looped back to the cascade port, determines whether the packet is in the uplink or downlink direction based on the number of VLAN labels in the packet, wherein the packet is in the uplink direction if the packet has a single VLAN label, and is in the downlink direction if it has two VLAN labels.
- the switch chip When the packet is in the uplink direction, the switch chip performs the layer 3 VPN initialization for the loopback packet, namely the switch chip searches for a hardware table item in the switch chip by using the VLAN number in the single label of the packet, finds out an output port of the packet, a Media Access Control (MAC) address of the packet, a Virtual Circuit (VC) label of the packet, and a tunnel label of the packet by searching for the hardware table item; takes the MAC address, the VC label, and the tunnel label as the head of the packet to form the packet with the packet content, and forwards the packet by using the output port.
- the found output port is the network-side-port, via which the packet is sent to the layer 3 VPN.
- the switch chip When the packet is in the downlink direction, the switch chip performs the layer 2 VPN initialization for the loopback packet, namely the switch chip searches for a hardware table item in the switch chip by using the VLAN number in the double labels of the packet, finds out an output port of the packet, a Media Access Control (MAC) address of the packet, a Virtual Circuit (VC) label of the packet, and a tunnel label of the packet by searching for the hardware table item; since the purpose of distinguishing from the packet in the uplink direction has been achieved, the switch chip, after finding out the output port, removes the external layer VALN label in the packet, restores the packet that has double VLAN labels to the packet has a single VALN label, takes the MAC address, the VC label, and the tunnel label as the head of the packet to form the packet with the packet content, and forwards the packet by using the found output port.
- the found output port is the access-side-port, via which the packet is sent to the layer 2 VPN.
- the disclosure provides a switch chip.
- Fig. 3 is a schematic view of the structure of the switch chip according to the disclosure.
- the switch chip includes a configuring module 31, a termination processing module 32, a cascade port 33, and a forwarding module 34, wherein the configuring module 31 is adapted to configure the cascade port 33 to operate in an internal loopback mode; the termination processing module 32 is adapted to perform a termination processing for the packet and send the packet after the termination processing to the cascade port 33; the cascade port 33 is adapted to loop the packet after the termination processing back to the forwarding module 34; the forwarding module 34 is adapted to initialize the loopback packet and to forward the packet.
- the configuring module 31 configures the cascade port 33 to operate in an internal loopback mode by setting the register in the cascade port 33 for setting the internal loopback mode to be the valid value; the termination processing module 32 performs the termination processing for the packet and sends the packet after the termination processing to the cascade port 33 by determining whether the packet is in an uplink direction or a downlink direction; performing a layer 2 VPN termination processing for the packet when the packet is in the uplink direction; and performing a layer 3 VPN termination processing for the packet when the packet is in the downlink direction; and
- the forwarding module 34 initializes the loopback packet by determining whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet; if determining that the packet is in the uplink direction, performing a layer 3 VPN initialization for the loopback packet; and if determining that the packet is in the downlink direction, performing a layer 2 VPN initialization for the loopback packet.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
- The disclosure relates to the field of Multi-Protocol Label Switching (MPLS) Virtual Private Network (VPN), and in particular to a method for forwarding a packet and a switch chip.
- The MPLS network has become a development trend of the next generation core network, and the MPLS VPN provides in the MPLS network the VPN virtual private switch network function using MPLS techniques, and mainly includes an MPLS layer 2 VPN and an MPLS layer 3 VPN. A layer 2 connection can be established between different nodes via the MPLS network. The MPLS layer 2 VPN divides the management duties of MPLS network operations. Specifically, a Provide Edge (PE) takes charge of layer 2 connection and packet forwarding between custom edges (CE), and the CEs perform functions associated with layer 3 and the above. In this way, the management cost regarding the network operation may be reduced. The MPLS layer 3 VPN may divide the current IP network into networks logically isolated with each other. Such networks may be widely applied, for example, to implement interconnection between different departments or within a same department of an enterprise or of the government, or to provide a new service such as the IP telephony service.
- Compared with either the traditional circuit or virtual circuit based VPN or the IP tunnel based VPN, the MPLS VPN technique has significant advantages. As the MPLS VPN technique becomes more and more mature, the increasing user requirements on network bandwidth, service quality, and flexibility in accessing the MPLS network and the like are taken account in addition to reducing the cost. The MPLS VPN technique therefore stands for the future development trend of the Internet.
-
Fig. 1 is a schematic view of the networking of the MPLS VPN in the related art. As shown inFig. 1 , the layer 2 VPN serves as an access layer for user access and is connected to an access-side-port of the PE. The layer 3 VPN serves as a convergence layer and is connected to a network-side-port of the PE. A base station is connected to the PE via a Pseudo Wire (PW). The direction from the layer 2 VPN to the layer 3 VPN is referred to as an uplink direction, in which the PE has to perform a layer 2 VPN termination processing for the packet. The direction from the layer 3 VPN to the layer 2 VPN is referred to as a downlink direction, in which the PE has to perform a layer 3 VPN termination processing for the packet and a layer 2 VPN initialization for the packet, and then forwards the packet to the layer 2 VPN. However, the switch chip in the PE of the related art cannot support these functions directly. - Instead, these functions can only be implemented by using existing functions of the switch chip and performing a comprehensive networking application. There are two method for implementing the functions. The first method is implemented with two PEs, wherein a PE performs the layer 2 VPN termination and the layer 3 VPN initialization and forwards the packet to the layer 3 VPN, and another PE performs the layer 3 VPN termination and the layer 2 VPN initialization, and forwards the packet to the layer 2 VPN. The second method is implemented with a single PE, wherein in the uplink direction, two ports in the PE are configured to operate in an internal loopback mode; after the switch chip performs the layer 2 VPN termination processing for the packet, the packet is looped back to the switch chip, the switch chip may then implement the layer 3 VPN initialization for the packet, and it is a similar case for the downlink direction. The first method is disadvantageous in that one more PE is used compared with the second method, increasing the cost for networking and maintenance; for the second method, although one less PE is used, two ports are used, and accordingly the cost and the maintenance expense are also high.
- In view of the above, the disclosure provides a method for forwarding a packet and a switch chip, which is capable of implementing packet forwarding in both uplink and downlink directions in the MPLS VPN networking by using a single PE and a single port.
- The technical solutions of the disclosure are implemented as follows.
- The disclosure provides a method for forwarding a packet, which includes: configuring a cascade port of a switch chip to operate in an internal loopback mode; performing a termination processing for the packet; looping the packet after the termination processing back to the cascade port; initializing the loopback packet; and forwarding the packet.
- In the above method, configuring the cascade port of the switch chip to operate in the internal loopback mode may include: setting, by the switch chip of a Provide Edge (PE), the value of a register in the cascade port of the switch chip of the PE, for setting the internal loopback mode, to be a valid value.
- In the above method, performing the termination processing for the packet may include: determining, by the switch chip of a PE, whether the packet is in an uplink direction or a downlink direction, performing, by the switch chip, a layer 2 Virtual Private Network (VPN) termination processing when the packet is in the uplink direction, and performing, by the switch chip, a layer 3 VPN termination processing when the packet is in the downlink direction.
- In the above method, performing, by the switch chip, the layer 2 VPN termination processing for the packet may include: removing, by the switch chip, the head of the packet and leaving the content of the packet; and performing, by the switch chip, the layer 3 VPN termination processing for the packet may include: removing, by the switch chip, the head of the packet and leaving the content of the packet; and adding an internal layer Virtual Local Area Network VLAN label to the packet in an access mode of VLAN stack.
- In the above method, initializing the loopback packet may include: determining, by the switch chip, whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet; if determining that the packet is in the uplink direction, performing, by the switch chip, a layer 3 VPN initialization for the loopback packet; and if determining that the packet is in the downlink direction, performing, by the switch chip, a layer 2 VPN initialization for the loopback packet.
- In the above method, performing, by the switch chip, the layer 3 VPN initialization for the loopback packet may include: searching for a hardware table item in the switch chip based on a VLAN number of a single label in the packet, to obtain a Media Access Control (MAC) address, a Virtual Circuit (VC) label and a tunnel label;, taking the obtained MAC address, VC label and tunnel label as the head of the packet; and forming the packet with the head and the content of the packet.
- In the above method, performing, by the switch chip, the layer 2 VPN initialization for the loopback packet may include: searching, by the switch chip, for a hardware table item in the switch chip based on a VLAN number of double labels in the packet, to obtain a MAC address, a VC label, and a tunnel label; removing, by the switch chip, an external layer VLAN label in the packet; taking the obtained MAC address, VC label, and tunnel label as the head of the packet; and forming the packet with the head and the content of the packet.
- The disclosure also provides a switch chip, which includes a configuring module, a termination processing module, a cascade port, and a forwarding module, wherein the configuring module is adapted to configure the cascade port to operate in an internal loopback mode; the termination processing module is adapted to perform a termination processing for the packet and send the packet after the termination processing to the cascade port; the cascade port is adapted to loop the packet after the termination processing back to the forwarding module; the forwarding module is adapted to initialize the loopback packet and to forward the packet.
- In the switch chip, the termination processing module may perform the termination processing for the packet and send the packet after the termination processing to the cascade port by determining whether the packet is in an uplink direction or a downlink direction; performing a layer 2 VPN termination processing for the packet when the packet is in the uplink direction; and performing a layer 3 VPN termination processing for the packet when the packet is in the downlink direction.
- In the switch chip, the forwarding module may initialize the loopback packet by determining whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet; if determining that the packet is in the uplink direction, performing a layer 3 VPN initialization for the loopback packet; and if determining that the packet is in the downlink direction, performing a layer 2 VPN initialization for the loopback packet.
- The method for forwarding a packet and the switch chip according to the present disclosure implement packet forwarding in both uplink and downlink directions in the MPLS VPN networking by using a single PE and a single port, better support layer 2 and layer 3 VPN networking applications, and may reduce the number of equipments used in the MPLS VPN networking, thereby reducing the networking complexity and saving the costs for maintenance and equipment management.
-
-
Fig. 1 is the schematic view of the networking of the MPLS VPN in the related art; -
Fig. 2 is a flowchart of the method for forwarding a packet according to the disclosure; and -
Fig. 3 is a schematic view of the structure of the switch chip according to the disclosure. - The Virtual Local Area Network (VLAN) stack refers to that whenever a port of the switch chip in an equipment receives a packet, the switch chip will label the packet with VLAN, no matter the packet carries a VLAN label or not. In this way, if the received packet already carries a VLAN label, the packet will become a packet with double VALN labels; in the MPLS VPN network, a packet itself has a VLAN label; according to the 802.1 Q protocol, the PE does not have the VLAN stack access when performing a layer 2 VPN termination in the MPLS VPN and has the VLAN stack access only when performing a layer 3 VPN termination in the MPLS VPN.
- The basic concept of the discloses lies in that a cascade port of the switch chip is configured to operate in an internal loopback mode, a termination of the packet is performed, after that the terminated packet is looped back at the cascade port, and the loopback packet is initialized and forwarded.
- The disclosure is further explained below with reference to the figures and specific embodiments.
- The disclosure provides a method for forwarding a packet.
Fig. 2 is a flowchart of the method for forwarding a packet according to the disclosure. As shown inFig. 2 , the method includes the following steps: - Step 201: configuring a cascade port of a switch chip to operate in an internal loopback mode.
- Specifically, the switch chip of a PE sets the value of a register in the cascade port of the switch chip for setting the internal loopback mode to be a valid value "1", such that the cascade port of the switch chip may be configured to operate in an internal loopback mode. The switch chip in this embodiment may be any chip that has the VLAN stack access, such as a common chip or an Application Specific Integrated Circuit (ASIC) chip that has the VLAN stack access, or the like.
- Step 202: performing a termination processing for the packet, looping the packet after the termination processing back to the cascade port.
- Specifically, the PE may receive a packet from the layer 2 VPN or from the layer 3 VPN, and the switch chip of the PE determines whether the packet is in the uplink direction or in the downlink direction, wherein the packet is in the uplink direction if the packet comes from an access-side-port, and the packet is in the downlink direction if the packet comes from a network-side-port.
- When the packet is in the uplink direction, the switch chip performs the layer 2 VPN termination processing for the packet, namely, removes the head of the packet and leaves the content of the packet; the packet after the layer 2 VPN termination processing is sent by the switch chip to a cascade port of the switch chip, and as the cascade port has been configured to operate in the internal loopback mode, the packet arriving at the cascade port is looped back to the switch chip.
- When the packet is in the downlink direction, the switch chip performs the layer 3 VPN termination processing for the packet, namely, firstly the head of the packet is removed and the content of the packet is left, then an internal layer VLAN label is added to the packet which already has a VLAN label in an access mode of VLAN stack, namely, the switch chip inserts a VLAN label containing a VLAN number between the content of the packet and the existing VLAN label. The VLAN numbers in the two VLAN labels may be the same or different. In this embodiment, in order to conveniently find out information such as the output port in a VLAN-label-based lookup, the internal VLAN label may be set to be as same as the existing VLAN label, that is, the VLAN numbers of the two VLAN labels are the same. The packet after the layer 3 VPN termination processing is sent by the switch chip to a cascade port of the switch chip. Since the cascade port has been configured to operate in the internal loopback mode, the packet arriving at the cascade port is looped back to the switch chip.
- In this embodiment, an internal VLAN label is added to the packet in the downlink direction, such that the packet has double VLAN labels. In this way, a packet in the downlink direction may be distinct from one in the uplink direction.
- Step 203: performing initialization for the loopback packet, and forwarding the packet.
- Specifically, the switch chip receives the packet looped back to the cascade port, determines whether the packet is in the uplink or downlink direction based on the number of VLAN labels in the packet, wherein the packet is in the uplink direction if the packet has a single VLAN label, and is in the downlink direction if it has two VLAN labels.
- When the packet is in the uplink direction, the switch chip performs the layer 3 VPN initialization for the loopback packet, namely the switch chip searches for a hardware table item in the switch chip by using the VLAN number in the single label of the packet, finds out an output port of the packet, a Media Access Control (MAC) address of the packet, a Virtual Circuit (VC) label of the packet, and a tunnel label of the packet by searching for the hardware table item; takes the MAC address, the VC label, and the tunnel label as the head of the packet to form the packet with the packet content, and forwards the packet by using the output port. In this embodiment, in the uplink direction, the found output port is the network-side-port, via which the packet is sent to the layer 3 VPN.
- When the packet is in the downlink direction, the switch chip performs the layer 2 VPN initialization for the loopback packet, namely the switch chip searches for a hardware table item in the switch chip by using the VLAN number in the double labels of the packet, finds out an output port of the packet, a Media Access Control (MAC) address of the packet, a Virtual Circuit (VC) label of the packet, and a tunnel label of the packet by searching for the hardware table item; since the purpose of distinguishing from the packet in the uplink direction has been achieved, the switch chip, after finding out the output port, removes the external layer VALN label in the packet, restores the packet that has double VLAN labels to the packet has a single VALN label, takes the MAC address, the VC label, and the tunnel label as the head of the packet to form the packet with the packet content, and forwards the packet by using the found output port. In this embodiment, in the downlink direction, the found output port is the access-side-port, via which the packet is sent to the layer 2 VPN.
- In order to implement the above method, the disclosure provides a switch chip.
Fig. 3 is a schematic view of the structure of the switch chip according to the disclosure. As shown inFig. 3 , the switch chip includes a configuring module 31, atermination processing module 32, acascade port 33, and aforwarding module 34, wherein
the configuring module 31 is adapted to configure thecascade port 33 to operate in an internal loopback mode;
thetermination processing module 32 is adapted to perform a termination processing for the packet and send the packet after the termination processing to thecascade port 33;
thecascade port 33 is adapted to loop the packet after the termination processing back to theforwarding module 34;
theforwarding module 34 is adapted to initialize the loopback packet and to forward the packet. - The configuring module 31 configures the
cascade port 33 to operate in an internal loopback mode by setting the register in thecascade port 33 for setting the internal loopback mode to be the valid value;
thetermination processing module 32 performs the termination processing for the packet and sends the packet after the termination processing to thecascade port 33 by determining whether the packet is in an uplink direction or a downlink direction; performing a layer 2 VPN termination processing for the packet when the packet is in the uplink direction; and performing a layer 3 VPN termination processing for the packet when the packet is in the downlink direction; and - The
forwarding module 34 initializes the loopback packet by determining whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet; if determining that the packet is in the uplink direction, performing a layer 3 VPN initialization for the loopback packet; and if determining that the packet is in the downlink direction, performing a layer 2 VPN initialization for the loopback packet. - What is described above is merely preferred embodiments of the disclosure and is not intended to limit the protection scope of the disclosure, and any modification, equivalent replacement, and improvement made within the disclosure shall be included in the scope of the disclosure.
Claims (10)
- A method for forwarding a packet, comprising:configuring a cascade port of a switch chip to operate in an internal loopback mode;performing a termination processing for the packet;looping the packet after the termination processing back to the cascade port;initializing the loopback packet; andforwarding the packet.
- The method according to claim 1, wherein configuring the cascade port of the switch chip to operate in the internal loopback mode comprises:setting, by the switch chip of a Provide Edge (PE), the value of a register in the cascade port of the switch chip of the PE, for setting the internal loopback mode, to be a valid value.
- The method according to claim 1, wherein performing the termination processing for the packet comprises:determining, by the switch chip of a PE, whether the packet is in an uplink direction or in a downlink direction;performing, by the switch chip, a layer 2 Virtual Private Network (VPN) termination processing for the packet when the packet is in the uplink direction; andperforming, by the switch chip, a layer 3 VPN termination processing for the packet when the packet is in the downlink direction.
- The method according to claim 3, wherein performing, by the switch chip, the layer 2 VPN termination processing for the packet comprises:removing, by the switch chip, the head of the packet and leaving the content of the packet; andwherein performing, by the switch chip, the layer 3 VPN termination processing for the packet comprises:removing, by the switch chip, the head of the packet and leaving the content of the packet; and adding an internal layer Virtual Local Area Network (VLAN) label label to the packet in an access mode of VLAN stack.
- The method according to any one of claims 1 to 4, wherein initializing the loopback packet comprises:determining, by the switch chip, whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet;if determining that the packet is in the uplink direction, performing, by the switch chip, a layer 3 VPN initialization for the loopback packet; andif determining that the packet is in the downlink direction, performing, by the switch chip, a layer 2 VPN initialization for the loopback packet.
- The method according to claim 5, wherein performing, by the switch chip, the layer 3 VPN initialization for the loopback packet comprises:searching for a hardware table item in the switch chip based on a VLAN number of a single label in the packet, to obtain a Media Access Control (MAC) address, a Virtual Circuit (VC) label and a tunnel label;taking the obtained MAC address, VC label and tunnel label as the head of the packet; andforming the packet with the head and the content of the packet.
- The method according to claim 5, wherein performing, by the switch chip, the layer 2 VPN initialization for the loopback packet comprises:searching, by the switch chip, for a hardware table item in the switch chip based on a VLAN number of double labels in the packet, to obtain a MAC address, a VC label, and a tunnel label;removing, by the switch chip, an external layer VLAN label in the packet;taking the obtained MAC address, VC label, and tunnel label as the head of the packet; andforming the packet with the head and the content of the packet.
- A switch chip, comprising a configuring module, a termination processing module, a cascade port, and a forwarding module, wherein
the configuring module is adapted to configure the cascade port to operate in an internal loopback mode;
the termination processing module is adapted to perform a termination processing for the packet and send the packet after the termination processing to the cascade port;
the cascade port is adapted to loop the packet after the termination processing back to the forwarding module;
the forwarding module is adapted to initialize the loopback packet and to forward the packet. - The switch chip according to claim 8, wherein the termination processing module performs the termination processing for the packet and sends the packet after the termination processing to the cascade port by
determining whether the packet is in an uplink direction or a downlink direction;
performing a layer 2 VPN termination processing for the packet when the packet is in the uplink direction; and
performing a layer 3 VPN termination processing for the packet when the packet is in the downlink direction. - The switch chip according to claim 8, wherein the forwarding module initializes the loopback packet by
determining whether the packet is in an uplink direction or a downlink direction based on the number of the VLAN labels in the packet;
if determining that the packet is in the uplink direction, performing a layer 3 VPN initialization for the loopback packet; and
if determining that the packet is in the downlink direction, performing a layer 2 VPN initialization for the loopback packet.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010217456.5A CN101902397B (en) | 2010-06-23 | 2010-06-23 | Message forwarding method and switching chip |
PCT/CN2011/071330 WO2011160464A1 (en) | 2010-06-23 | 2011-02-25 | Method for forwarding message and switch chip |
Publications (2)
Publication Number | Publication Date |
---|---|
EP2587742A1 true EP2587742A1 (en) | 2013-05-01 |
EP2587742A4 EP2587742A4 (en) | 2016-11-23 |
Family
ID=43227612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
EP11797495.6A Withdrawn EP2587742A4 (en) | 2010-06-23 | 2011-02-25 | Method for forwarding message and switch chip |
Country Status (4)
Country | Link |
---|---|
EP (1) | EP2587742A4 (en) |
CN (1) | CN101902397B (en) |
BR (1) | BR112012032718A2 (en) |
WO (1) | WO2011160464A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105337884A (en) * | 2015-09-25 | 2016-02-17 | 盛科网络(苏州)有限公司 | Method and device for achieving multistage message editing service control on the basis of logic port |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101902397B (en) * | 2010-06-23 | 2015-06-10 | 中兴通讯股份有限公司 | Message forwarding method and switching chip |
CN102739501B (en) * | 2011-04-01 | 2017-12-12 | 中兴通讯股份有限公司 | Message forwarding method and system in two three layer virtual private networks |
CN102291317B (en) * | 2011-09-15 | 2018-03-02 | 中兴通讯股份有限公司 | A kind of retransmission method and device of virtual private network packet |
CN102594665B (en) * | 2012-02-02 | 2018-01-09 | 中兴通讯股份有限公司 | Service data transmission method and device |
CN103152276B (en) * | 2012-11-23 | 2015-11-25 | 华为技术有限公司 | A kind of method of port arrangement and Ethernet switch |
CN105516008B (en) * | 2015-12-04 | 2019-05-21 | 北京锐安科技有限公司 | Data distribution equipment and its implementation method of multi-user's processing |
CN115914142A (en) * | 2021-08-13 | 2023-04-04 | 苏州盛科通信股份有限公司 | Message processing method, message forwarding method, device and equipment |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070183415A1 (en) * | 2006-02-03 | 2007-08-09 | Utstarcom Incorporated | Method and system for internal data loop back in a high data rate switch |
CN1852254A (en) * | 2006-02-17 | 2006-10-25 | 华为技术有限公司 | Ethernetwork exchanging apparatus and method for realizing MPLS message retransmission |
CN100559772C (en) * | 2006-11-15 | 2009-11-11 | 杭州华三通信技术有限公司 | Mixed virtual private network system and backbone network edge apparatus and collocation method thereof |
CN101110745A (en) * | 2007-08-14 | 2008-01-23 | 华为技术有限公司 | Method, device and system for engaging second layer network and third layer network |
CN101252492B (en) * | 2008-03-20 | 2011-02-02 | 华为技术有限公司 | Method and apparatus for accessing multi-protocol label switch virtual special-purpose network |
CN101616062B (en) * | 2008-06-26 | 2012-07-04 | 中兴通讯股份有限公司 | Method for realizing IP transmitting |
CN101447944B (en) * | 2008-12-15 | 2011-07-20 | 华为技术有限公司 | Access method, device and system |
CN101707562B (en) * | 2009-11-27 | 2012-01-25 | 中兴通讯股份有限公司 | Method and device for realizing access of virtual local area network (VLAN) stacking in virtual private wire service (VPWS) |
CN101902397B (en) * | 2010-06-23 | 2015-06-10 | 中兴通讯股份有限公司 | Message forwarding method and switching chip |
-
2010
- 2010-06-23 CN CN201010217456.5A patent/CN101902397B/en not_active Expired - Fee Related
-
2011
- 2011-02-25 EP EP11797495.6A patent/EP2587742A4/en not_active Withdrawn
- 2011-02-25 BR BR112012032718A patent/BR112012032718A2/en not_active Application Discontinuation
- 2011-02-25 WO PCT/CN2011/071330 patent/WO2011160464A1/en active Application Filing
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105337884A (en) * | 2015-09-25 | 2016-02-17 | 盛科网络(苏州)有限公司 | Method and device for achieving multistage message editing service control on the basis of logic port |
Also Published As
Publication number | Publication date |
---|---|
EP2587742A4 (en) | 2016-11-23 |
WO2011160464A1 (en) | 2011-12-29 |
BR112012032718A2 (en) | 2017-11-14 |
CN101902397A (en) | 2010-12-01 |
CN101902397B (en) | 2015-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2587742A1 (en) | Method for forwarding message and switch chip | |
US9100213B1 (en) | Synchronizing VPLS gateway MAC addresses | |
US9294305B2 (en) | Method for sending ethernet frames in ethernet tree service and provider edge device | |
EP1943785B1 (en) | Multilink trunking for encapsulated traffic | |
US7486674B2 (en) | Data mirroring in a service | |
CN102025541B (en) | Method and system for realizing multicast protection | |
EP1408655A2 (en) | Method and device for double tagging of data packets | |
US20040184408A1 (en) | Ethernet architecture with data packet encapsulation | |
WO2019129236A1 (en) | Tunnel-based data transmission method and device | |
US10673737B2 (en) | Multi-VRF universal device internet protocol address for fabric edge devices | |
CN101877677B (en) | Tunnel switching method and system for multi-protocol label switching services | |
JP2005341591A (en) | Virtual private network, and multi-service provisioning platform and method | |
US9853833B2 (en) | Individual virtual private local area network service conversion to a different virtual private network service | |
EP3512164B1 (en) | Pseudo wire load sharing method and apparatus | |
US8873431B1 (en) | Communications system and method for maintaining topology in a VLAN environment | |
EP3113422B1 (en) | Method and system of enhancing multiple mac registration protocol (mmrp) for protocol internetworking | |
US20140321472A1 (en) | Method for implementing e-tree service and provider edge device | |
CN101656671A (en) | Packet sending method and device | |
US20110222541A1 (en) | Network System, Edge Node, and Relay Node | |
US8848716B2 (en) | Termination of a pseudowires on multiple line cards | |
EP2908476B1 (en) | Method and apparatus for sending multi-link transparent interconnected data frame | |
US20140092729A1 (en) | Data Transmission in a Packet Transport Network (PTN) | |
CN101827012A (en) | Packet transmitting network as well as method for bearing services of pure three layers of IP packets and outlet node | |
WO2013037242A1 (en) | Method and device for forwarding message of virtual private network | |
CN115811499A (en) | Method and equipment for designated forwarder DF election |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
17P | Request for examination filed |
Effective date: 20121219 |
|
AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
DAX | Request for extension of the european patent (deleted) | ||
RA4 | Supplementary search report drawn up and despatched (corrected) |
Effective date: 20161026 |
|
RIC1 | Information provided on ipc code assigned before grant |
Ipc: H04L 12/933 20130101AFI20161020BHEP Ipc: H04L 12/46 20060101ALI20161020BHEP |
|
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: EXAMINATION IS IN PROGRESS |
|
17Q | First examination report despatched |
Effective date: 20170913 |
|
GRAP | Despatch of communication of intention to grant a patent |
Free format text: ORIGINAL CODE: EPIDOSNIGR1 |
|
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: GRANT OF PATENT IS INTENDED |
|
INTG | Intention to grant announced |
Effective date: 20201223 |
|
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN |
|
18D | Application deemed to be withdrawn |
Effective date: 20210504 |