WO2013139159A1 - Method for forwarding packet in network and provider edge device - Google Patents

Method for forwarding packet in network and provider edge device Download PDF

Info

Publication number
WO2013139159A1
WO2013139159A1 PCT/CN2012/087246 CN2012087246W WO2013139159A1 WO 2013139159 A1 WO2013139159 A1 WO 2013139159A1 CN 2012087246 W CN2012087246 W CN 2012087246W WO 2013139159 A1 WO2013139159 A1 WO 2013139159A1
Authority
WO
WIPO (PCT)
Prior art keywords
vpls
address
virtual
ethernet frame
label
Prior art date
Application number
PCT/CN2012/087246
Other languages
French (fr)
Chinese (zh)
Inventor
徐小虎
李振斌
倪辉
郝卫国
潘灏涛
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2013139159A1 publication Critical patent/WO2013139159A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing

Definitions

  • the present invention relates to the field of network transmission, and in particular, to a method for forwarding a message in a network and a carrier edge device.
  • the virtual private LAN service (English full name is Virtual Private LAN Service, VPLS in English) is in the public Internet protocol (English full name is Internet Protocol, English abbreviated as IP) / Multi-Protocol Label Switching (English for Multi-Protocol Label Switching, English abbreviated as MPLS)
  • IP Internet Protocol
  • MPLS Multi-Protocol Label Switching
  • L2VPN Level-2 Virtual Private Network
  • VPLS utilizes Ethernet technology and MPLS technology to connect multiple Ethernet LANs (English called Local Area Network, English abbreviated as LAN) distributed in different regions through the carrier's IP/MPLS network, so that they are connected to each other.
  • LAN Local Area Network
  • IP/MPLS IP/MPLS network
  • VPLS is based on media access control (English name is called Media Access Control, MAC for short) or MAC address plus virtual local area network (English name is called Virtual Local Area Network, English abbreviated as VLAN) to make forwarding decisions, user edge devices ( The English full name is Custom Edge, which is abbreviated as CE.
  • CE Custom Edge
  • the device can communicate with other CEs belonging to the same VPLS instance.
  • the VPLS service provided by the service provider network is an Ethernet bridge (or Ethernet switch).
  • the existing implementation of VPLS requires the establishment of a fully interconnected pseudowire (in English, Pseudo Wire, PW in English) to simulate an Ethernet network.
  • the existing VPLS solution only supports the multicast service in the ingress replication mode. Therefore, in the network with a large number of VPLS instances, the existing VPLS technology has serious scalability problems, such as maintaining a large number of PW states and a large number of ingress replications.
  • VPLS implements VPLS reachability information advertisement by extending the ISIS type length value (abbreviated as TLV), that is, completes the automatic discovery and signaling function of the neighbor, avoiding the existence of the existing VPLS technology.
  • TLV ISIS type length value
  • the embodiments of the present invention provide a method for forwarding a message in a network and an operator edge device.
  • the technical solution of the embodiment of the present invention includes:
  • a method for forwarding a packet in a network includes: a first carrier edge device PE, a second PE, the first PE and the second PE belong to a redundancy group RG, and the RG corresponds to a virtual PE, the virtual PE has an IP address, and the virtual PE is a member PE of the first virtual private local area network VPLS instance, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, the first user
  • the edge device CE is a local CE of the virtual PE in the first VPLS instance, and the first CE is connected to the first PE and the second PE in an inter-frame link aggregation group MC-LAG manner.
  • the method includes:
  • the first PE receives an Ethernet frame from the first CE
  • the first PE encapsulates the encapsulated packet according to the type of the Ethernet frame, and encapsulates the encapsulated packet into the virtual PE in the first VPLS instance.
  • the remote PE sends, where the tunnel source address of the encapsulated packet is the IP address of the virtual PE.
  • a method for forwarding a message in a network includes: a third PE and a virtual PE, where a member PE of the RG corresponding to the virtual PE includes a first PE and a second PE, and the virtual PE has an IP address
  • the virtual PE and the third PE are both member PEs of the first VPLS instance, the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the first PE is the distance of the RG medium
  • the third PE is the shortest member PE, and the second CE is the local CE of the third PE in the first VPLS instance, and the method includes:
  • the third PE encapsulates the Ethernet frame by using the IP address of the virtual PE or the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address, and sends the encapsulated packet to the
  • the virtual PE is configured to enable the member PE of the RG corresponding to the virtual PE to receive the encapsulated packet and decapsulate the packet, and forward the decapsulated packet to the first CE, where the first CE is The virtual CE is in the local CE of the first VPLS instance, and the first CE is connected to the first PE and the second PE in an inter-frame link aggregation group MC-LAG manner.
  • a first carrier edge device the first carrier edge device PE belongs to a redundancy group RG, the RG further includes a second PE, and the RG corresponds to one virtual PE, and the virtual PE has an IP address.
  • the virtual PE is a member PE of the first VPLS instance, the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the first user edge device CE is the locality of the virtual PE in the first VPLS instance.
  • the CE is connected to the first PE and the second PE in the MC-LAG mode of the inter-frame link aggregation group, where the first PE includes:
  • a first receiving module configured to receive an Ethernet frame from the first CE
  • a first sending module configured to encapsulate the encapsulated packet according to the type of the Ethernet frame, and encapsulate the encapsulated packet to the virtual PE in the first VPLS instance.
  • the remote PE sends the encapsulated source address of the encapsulated >3 ⁇ 4 text as the IP address of the virtual PE.
  • a third carrier edge device the third carrier edge device PE is used in the network, the network further includes a virtual PE, and the member PE of the RG corresponding to the virtual PE includes the first PE and the second a PE, the virtual PE has an IP address, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the virtual PE and the third PE are both member PEs of the first VPLS instance, where the A PE is a member of the RG that is the shortest member of the third PE.
  • the second CE is the local CE of the third PE in the first VPLS instance, and the third PE includes:
  • a second receiving module configured to receive an Ethernet frame sent from the second CE
  • a second sending module configured to use an IP address of the virtual PE or a multicast IP of a multicast tree corresponding to the first VPLS instance
  • the address is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the virtual PE, so that the member PE of the RG corresponding to the virtual PE receives the encapsulated packet and performs solution.
  • the group MC-LAG mode is respectively associated with the first PE and the second PE Even.
  • the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, thereby ensuring that the remote PE receives the packet.
  • the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring the stability of the MAC table.
  • FIG. 1 is a flowchart of a method for forwarding a packet in a network according to an embodiment of the present invention
  • FIG. 2 is a structural diagram of an ISIS VPLS network according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for managing an operator edge device in a network according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for forwarding a packet in a network according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a method for forwarding a packet in a network according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a third carrier edge device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for forwarding a message in a network according to an embodiment of the present invention.
  • the network includes: a first carrier edge device (hereinafter referred to as Provider Edge in English, abbreviated as PE), and a second PE, where the first PE and the second PE belong to a redundancy group (English name is Redundancy Group, English abbreviation is RG ), the RG corresponds to a virtual PE, that is,
  • the virtual PE includes the first PE and the second PE, and the virtual PE has an IP address, and the virtual PE is a first virtual private local area network service.
  • the member VP of the VPLS instance, the first VPLS instance is a VPLS instance of the Intermediate System-Intermediate System (ISIS), and the first user-side edge device (English name is Customer Edge, English abbreviation CE)
  • the first CE is in the local CE of the first VPLS instance, and the first CE is in the multi-Chasis Link Aggegation Group (MC-LAG).
  • MC-LAG multi-Chasis Link Aggegation Group
  • the first PE receives an Ethernet frame from the first CE.
  • the first PE encapsulates the encapsulated packet according to the type of the Ethernet frame, and encapsulates the encapsulated packet to the virtual PE in the first VPLS instance.
  • the remote source PE sends the encapsulated source address of the encapsulated packet as the IP address of the virtual PE.
  • the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, so that the remote PE receives the packet.
  • the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring stability of the MAC table.
  • FIG. 2 is a structural diagram of an ISIS VPLS network according to an embodiment of the present invention.
  • the VPLS network includes at least: a first PE, a second PE, a third PE, and a fourth PE, where the first PE, the second PE, the third PE, and the fourth PE are mainly responsible for accessing VPN services.
  • the mapping from the private network to the public network tunnel and the packet from the public network tunnel to the private network is performed.
  • the CE can be a switch or a host.
  • the first CE is in the MC-LAG mode and the first PE.
  • the second PE is connected.
  • the VPLS network shown in Figure 2 may also not include the third PE or the fourth PE.
  • FIG. 3a is a flowchart of a method for managing an operator edge device in a network according to an embodiment of the present invention.
  • This embodiment uses the ISIS VPLS network shown in FIG. 2 as an example for description. Referring to FIG. 3a, the embodiment specifically includes:
  • the first PE obtains a redundancy group (English name: Redundancy Group, abbreviated as RG).
  • the RG information includes an IP address of the virtual PE corresponding to the RG, and a VPLS identifier of the first VPLS instance corresponding to the RG.
  • the virtual PE corresponding to the RG includes a member PE in the RG.
  • the RG includes the first PE, and further includes a second PE, where the virtual PE is a member PE of the first VPLS instance, and the virtual PE includes the first PE and the second PE, and the network further includes
  • the first CE is a local CE of the virtual PE in the first VPLS instance.
  • the first CE is connected to the first PE and the second PE in an MC-LAG manner. Specifically, the first CE needs to be described that each member PE that belongs to the RG obtains the RG information.
  • the acquisition of a PE is described as an example.
  • the first PE obtains RG information, which can be used to guide subsequent packet forwarding.
  • the VPLS label allocated by the virtual PE to the VPLS instance is generated by any member PE of the virtual PE or configured by a technician.
  • the actual IP address of the first PE is 1.1.1.2
  • the actual IP address of the second PE is 1.1.1.3
  • the IP address of the virtual PE of the virtual PE can be used. It is set to 1 ⁇ 1.1, and the setting is performed by a technician, which is not specifically limited in the embodiment of the present invention.
  • the first PE advertises route reachability information corresponding to the IP address of the virtual PE by using a routing protocol.
  • the second PE also advertises the reachability information corresponding to the IP address of the virtual PE through a routing protocol.
  • the VPLS packet of the virtual IP address of the virtual PE (that is, 1.1.1.1) is sent from the remote PE of the virtual PE in the VPLS instance (in this embodiment, the remote PE is the third PE or the PE4).
  • the text will be forwarded to a member PE that is closer to the remote PE.
  • the VPLS identifier of the first VPLS instance is advertised.
  • the reachability information of the first VPLS instance includes the VPLS identifier of the first VPLS instance corresponding to the RG.
  • the virtual PE is the VPLS label assigned to the first VPLS instance and the IP address of the virtual PE.
  • the virtual router redundancy protocol is run between the first PE and the second PE through a communication interface between the two PEs (in English, the Virtual Router Redundancy Protocol is abbreviated as VRRP) or the cross-frame communication protocol.
  • VRRP Virtual Router Redundancy Protocol
  • ICCP Inter-Chassis Communication Protocol
  • the first PE is used as the primary PE
  • the second PE is used as the standby PE
  • the first PE determines that the first PE is the primary PE.
  • the first PE represents the reachability information of the first VPLS instance, and the reachability information of the first VPLS instance includes the VPLS identifier of the first VPLS instance and the virtual PE is the first VPLS instance.
  • the first PE and the second PE are required to allocate the same VPLS label to the same VPLS instance.
  • an RG including the first PE and the second PE and a virtual PE corresponding to the RG are formed in the first VPLS instance, and the VPLS instance and the virtual device are sent to other devices in the network.
  • the information of the PE so that the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, so that the remote PE receives the packet and performs the packet.
  • the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not hop between the first PE and the second PE, ensuring the stability of the MAC table. Therefore steps 301-303 can be used to help ensure the stability of the MAC table.
  • FIG. 3b is a flowchart of a method for forwarding a message in a network according to an embodiment of the present invention, where the method is applied to a network as shown in FIG. 2.
  • This embodiment may or may not be based on the results obtained by performing steps 301-303 as in Figure 3a.
  • the first PE in the RG corresponding to the virtual PE receives the Ethernet frame sent by the first CE through the aggregation link as an example.
  • the PE of any member of the RG receives the Ethernet sent by the first CE through the aggregation link.
  • the processing method after the frame is the same as the processing method of the first PE. Referring to Figure 3b, this embodiment includes the following.
  • the first PE receives an Ethernet frame from the first CE (English name is an Ethernet frame); the Ethernet frame may be a known destination unicast Ethernet frame, an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet Any one or more of the frames.
  • the first PE encapsulates the encapsulated packet according to the type of the Ethernet frame, and encapsulates the encapsulated packet to the virtual PE in the first VPLS instance.
  • the remote source PE sends the encapsulated source address of the encapsulated packet as the IP address of the virtual PE. Processing method 305-1
  • the first PE uses the IP address of the virtual PE as the tunnel source address and the IP address of the destination remote PE as the tunnel destination address.
  • the packet is encapsulated, and the encapsulated packet is sent to the destination remote PE.
  • the destination remote PE is the next hop PE corresponding to the destination MAC address of the Ethernet frame in the MAC forwarding table of the first VPLS instance. ;
  • the encapsulation is a VPLS data encapsulation
  • the encapsulated packet carries the VPLS label allocated by the destination remote PE to the first VPLS instance, and the label type is a downstream allocation label, so that the destination remote PE that receives the packet can Indicates which VPLS instance the packet encapsulated in the tunnel belongs to.
  • Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame
  • the Ethernet frame is copied, and the number is obtained with the virtual PE.
  • a plurality of the Ethernet frames of the same number of the remote PEs in the first VPLS instance are encapsulated to obtain a plurality of encapsulated packets, where the tunnel source address of each encapsulated text is obtained.
  • the IP addresses of the virtual PEs, and the tunnel destination address of each of the encapsulated packets is the IP address of a PE in the remote PE, and the tunnel destination addresses of the plurality of encapsulated packets are not mutually And sending the plurality of encapsulated packets according to the tunnel destination address of the plurality of encapsulated packets;
  • the first VPLS instance uses the ingress replication mode. Therefore, the received Ethernet frame needs to be replicated to obtain the same number of remote Ethernets as the virtual PE in the first VPLS instance. Frames are encapsulated separately and sent to each remote PE.
  • each encapsulated packet carries a VPLS label allocated by the corresponding remote PE to the first VPLS instance, and the label type is a downstream allocation label, so that the remote PE that receives the packet can identify the tunnel. Which VPLS instance the encapsulated packet belongs to.
  • the tunnel source address of the received encapsulated packet is the IP address of the virtual PE, and the packet is forwarded by the PE of the RG corresponding to the virtual PE.
  • the virtual PE is used as the next hop PE of the MAC address, that is, the stability of the MAC forwarding table is guaranteed.
  • the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame
  • the first PE uses the IP address of the virtual PE as a tunnel.
  • the source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance are encapsulated as the tunnel destination address, and the Ethernet frame is encapsulated and sent to the PE other than the first PE added to the multicast tree.
  • Encapsulated message After receiving the encapsulated packet, the second PE discards the encapsulated packet.
  • the non-aggregated multicast tree mode has a multicast tree corresponding to a VPLS instance, and the VPLS instance and the multicast tree are corresponding relationships.
  • the VPLS label does not need to be carried.
  • the PE that receives the encapsulated packet can know which VPLS instance the file belongs to by using the destination multicast IP address.
  • the first PE sends the Ethernet frame to the second PE, so that the second PE uses the IP address of the virtual PE as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address. Encapsulating the Ethernet frame, and transmitting, by the multicast tree corresponding to the first VPLS instance, a packet encapsulated by the second PE to a PE other than the second PE that is added to the multicast tree.
  • first PE and the second PE are member PEs of the RG corresponding to the virtual PE, and the Ethernet frame interaction between the first PE and the second PE may be through the communication interface between the first PE and the second PE. get on.
  • the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame
  • the IP address of the virtual PE is used as the tunnel source address and used.
  • the multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet carries the first VPLS label, where the first VPLS label is the virtual PE.
  • a VPLS label allocated by a VPLS instance where the label type of the first VPLS label is an upstream label, and the encapsulated packet is sent to a PE other than the first PE that is added to the multicast tree.
  • VPLS instances In the aggregation multicast tree mode, multiple VPLS instances share a multicast tree.
  • the VPLS instance and the multicast tree have a many-to-one relationship.
  • the VPLS instance In the aggregated multicast tree mode, the VPLS instance is in a multi-to-one relationship with the multicast tree, so that the first VPLS label allocated by the virtual PE for the first VPLS instance is carried in the encapsulated packet, so that The PE that receives the encapsulated packet can know which VPLS instance the packet belongs to.
  • the first VPLS label may not be carried.
  • the first PE sends the Ethernet frame to the second PE, so that the second PE uses the IP address of the virtual PE as the tunnel source address and the group of the multicast tree corresponding to the first VPLS instance.
  • the broadcast IP address is encapsulated as the tunnel destination address, and the encapsulated packet is encapsulated.
  • the first VPLS label carries the first VPLS label, and the first VPLS label is a VPLS label that is allocated to the first VPLS instance, and the label type of the first VPLS label is an upstream allocation label, and the group corresponding to the first VPLS instance is configured.
  • the broadcast tree sends the packet encapsulated by the second PE to the PEs other than the second PE that are added to the multicast tree.
  • the first PE and the second PE are member PEs of the RG corresponding to the virtual PE, and the Ethernet frame interaction between the first PE and the second PE may be performed through a communication interface between the first PE and the second PE.
  • the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, so that the remote PE receives the packet.
  • the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring stability of the MAC table.
  • FIG. 4 is a flowchart of a method for forwarding a message in a network according to an embodiment of the present invention.
  • the network includes: a third PE and a virtual PE, where the member PE of the RG corresponding to the virtual PE includes at least a first PE and a second PE, that is, the virtual PE includes the first PE and the second The PE, the virtual PE has an IP address, and the virtual PE and the third PE are both member PEs of the first VPLS instance, and the first PE is the member PE of the RG that is the shortest route from the third PE.
  • the second CE is a local CE of the third PE in the first VPLS instance, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance.
  • the third PE that is the remote PE of the virtual PE receives the packet as an example. Referring to FIG. 4, the embodiment includes the following content:
  • the third PE receives an Ethernet frame sent from the second CE.
  • the embodiment further includes: the third PE receives the route reachability information corresponding to the IP address of the virtual PE that is advertised by the one or more member PEs of the virtual PE by using the routing protocol.
  • the third PE receives the reachability information of the VPLS instance corresponding to the RG that is advertised by the first PE that is the primary PE, and the reachability information of the VPLS instance includes at least the VPLS of the VPLS instance corresponding to the RG.
  • the third PE encapsulates the Ethernet frame by using the IP address of the virtual PE or the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address, and sends the encapsulated packet.
  • Giving the virtual PE, the member PE of the RG corresponding to the virtual PE receiving the encapsulated packet, decapsulating the packet, and forwarding the decapsulated packet to the first CE, the first CE
  • the local CE of the virtual PE is in the first VPLS instance, and the first CE is connected to the first PE and the second PE in an MC-LAG manner.
  • the first PE Routing the shortest member PE for the third PE from the RG. Processing method 402-1
  • the third PE uses the IP address of the virtual PE as the tunnel destination address and The IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame, and the encapsulated > PDU carries the first VPLS label, and the first VPLS label is the VPLS label allocated by the virtual PE to the first VPLS instance.
  • the label type of the first VPLS label is a downstream label, and the encapsulated packet is sent to the first PE, so that the first PE receives the encapsulated packet and decapsulates the packet, and decapsulates the packet.
  • the packet is forwarded to the first CE, and the first CE is the local CE of the virtual PE in the first VPLS instance.
  • the encapsulated packet is received by the shortest member PE of the virtual PE or RG from the third PE.
  • only the first PE is the member PE of the RG corresponding to the virtual PE and the shortest route from the third PE.
  • the third PE copies the Ethernet frame to obtain the quantity and And the plurality of Ethernet frames in the first VPLS instance are the same number of the Ethernet frames; and the plurality of Ethernet frames are respectively encapsulated to obtain a plurality of encapsulated packets, where each of the encapsulated packets
  • the source address of the tunnel is the IP address of the third PE
  • the tunnel destination address of each encapsulated packet is the IP address of a PE in the remote PE of the third PE.
  • the tunnel destination address of the subsequent packet is different from each other; the encapsulated packet is sent to the corresponding remote PE, so that the first PE receives the encapsulated packet whose destination address is the IP address of the virtual PE and performs the encapsulation.
  • Decapsulating, and forwarding the decapsulated packet to the first CE where the encapsulated packet whose destination address is the IP address of the virtual PE carries the first VPLS label, where the first VPLS label is the virtual PE is the first V
  • the label type of the first VPLS label is the downstream allocation label.
  • the encapsulated packet is received by the shortest member PE of the virtual PE or RG from the third PE.
  • only the first PE is the RG in the virtual PE corresponding to the third PE route.
  • the short member PE is described as an example.
  • the first PE When the first PE is the primary PE, the second PE is the standby PE, the first PE is added to the multicast tree corresponding to the first VPLS, and the Ethernet frame is an unknown destination unicast Ethernet frame, multicast If the first VPLS instance is in the non-aggregated multicast tree mode, the third PE uses the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address and uses the first The IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame, and the encapsulated packet is forwarded by the multicast tree corresponding to the first VPLS instance, so that the first PE receives the encapsulated packet and The decapsulation is performed, and the decapsulated packet is forwarded to the first CE.
  • the first PE When the first PE is the primary PE, the second PE is the standby PE, the first PE is added to the multicast tree corresponding to the first VPLS, and the Ethernet frame is an unknown destination unicast Ethernet frame, multicast
  • the third PE uses the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address and uses the first The IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame.
  • the encapsulated packet carries the third VPLS label, and the third VPLS label is the VPLS label allocated by the third PE to the first VPLS instance.
  • the label type of the VPLS label is an upstream label, and the encapsulated packet is forwarded through the multicast tree, so that the first PE receives the encapsulated packet and decapsulates the packet, and decapsulates the packet. Forwarded to the first CE.
  • the VPLS instance is in a many-to-one relationship with the multicast tree, and the encapsulated packet carries the third VPLS label, and the third VPLS label is the third PE is the first VPLS.
  • the VPLS label is assigned by the instance.
  • the label type of the third VPLS label is an upstream label. The PE that receives the encapsulated packet knows which VPLS instance the packet comes from.
  • the second PE may also join the first VPLS.
  • the multicast tree corresponding to the instance when the first PE and the second PE are added to the multicast tree corresponding to the first VPLS, in order to prevent the first CE from receiving the repeated packets forwarded from the second PE, After receiving the encapsulated packet from the multicast tree corresponding to the first VPLS, the second PE discards the encapsulated packet.
  • the second PE is switched to the primary PE, and the second PE receives the encapsulated report by using the multicast tree corresponding to the first VPLS.
  • FIG. 5 is a schematic structural diagram of a first carrier edge device according to an embodiment of the present invention.
  • the first carrier edge device (English Provider Edge, abbreviated as PE) belongs to a redundancy group (English name is Redundancy Group, abbreviated as RG), and the RG further includes a second PE, and the RG corresponds to one Virtual PE, that is, the virtual PE includes the first PE and the second PE, the virtual PE has an IP address, and the virtual PE is a first virtual private local area network service (English name is Virtual Private)
  • the local area network service (abbreviated as VPLS) is the member PE of the instance.
  • the first VPLS instance is the VPLS instance of the Intermediate System-Intermediate System (English).
  • the first user edge device (English full name is Custom) Edge, abbreviated as CE, is the local CE of the virtual PE in the first VPLS instance.
  • the first PE includes:
  • the first receiving module 501 is configured to receive an Ethernet frame from the first CE.
  • the first sending module 502 is configured to encapsulate the encapsulated packet according to the type of the Ethernet frame, and encapsulate the encapsulated packet to the virtual PE in the first VPLS.
  • the remote PE is sent by the instance, where the tunnel source address of the encapsulated text is the IP address of the virtual PE.
  • the function of the first receiving module 501 is implemented by a first physical receiving port
  • the function of the first sending module 502 is implemented by a first physical circuit
  • the first physical circuit includes a first processor and a first physical sending port
  • the first processor is configured to perform the encapsulating process in the first sending module 502
  • the first physical sending port is configured to perform the sending in the first sending module 502 deal with.
  • the first sending module 502 includes one or more of the following units: a first sending unit, configured to use the virtual PE when the Ethernet frame is a known destination unicast Ethernet frame
  • the IP address is used as the tunnel source address and the IP address of the destination remote PE is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the destination remote PE, where the destination is far
  • the end PE is the next hop PE corresponding to the destination MAC address of the Ethernet frame in the MAC forwarding table of the first VPLS instance.
  • the first sending unit is configured to execute the content of the “processing mode 305-1”.
  • a second sending unit configured to: if the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an ingress copy mode, perform the Copying, obtaining a plurality of the Ethernet frames having the same number of remote PEs as the virtual PE in the first VPLS instance; and encapsulating the multiple Ethernet frames to obtain a plurality of encapsulated packets
  • the tunnel source address of each encapsulated packet is an IP address of the virtual PE, and the tunnel destination address of each encapsulated packet is an IP of a PE in the remote PE.
  • the address, the tunnel destination address of the plurality of encapsulated packets is different from each other; and the plurality of encapsulated packets are sent according to the tunnel destination address of the plurality of encapsulated packets.
  • the second sending unit is configured to execute the content of the “processing mode 305-2”.
  • a third sending unit configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses a non-aggregated multicast tree mode, use the The IP address of the virtual PE is used as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the Ethernet frame and join the multicast tree.
  • the PE other than the first PE sends the encapsulated text.
  • the third sending unit is configured to execute the content of the “processing mode 305-3”.
  • a fourth sending unit configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an aggregate multicast tree mode, use the virtual The IP address of the PE is used as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the packet, and the encapsulated packet carries the first packet.
  • a VPLS label the first VPLS label is a VPLS label allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is an upstream allocation label, and is added to the multicast tree.
  • the PE other than the first PE sends the encapsulated packet.
  • the fourth sending unit is configured to execute the content of the “processing mode 305-4”.
  • each of the first sending unit, the second sending unit, the third sending unit, and the fourth sending unit are all implemented by the first processor and the first physical sending port.
  • the third sending unit is further configured to send the Ethernet frame to the second PE, so that the second PE uses an IP address of the virtual PE as a tunnel source address, and uses the Encapsulating the Ethernet frame with the multicast IP address of the multicast tree corresponding to the VPLS instance as the tunnel destination address, and adding the multicast tree corresponding to the first VPLS instance to the multicast tree
  • the PE other than the second PE sends the packet encapsulated by the second PE.
  • the fourth sending unit is further configured to send the Ethernet frame to the second PE, so that the second PE uses an IP address of the virtual PE as the tunnel source address and uses The multicast IP address of the multicast tree corresponding to the first VPLS instance encapsulates the Ethernet frame as a tunnel destination address, and the packet encapsulated by the second PE carries a first VPLS label, where the first VPLS The label is a VPLS label that is allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is an upstream allocation label, and is added to the foregoing by a multicast tree corresponding to the first VPLS instance.
  • a PE other than the second PE in the multicast tree sends the packet encapsulated by the second PE.
  • the first carrier edge device further includes:
  • the first obtaining module 503 is configured to obtain RG information, where the RG information includes an IP address of the virtual PE corresponding to the RG, a VPLS identifier of the first VPLS instance corresponding to the RG, and the virtual PE is The IP address of the VPLS label assigned by the first VPLS instance and/or other member PEs belonging to the RG;
  • a publishing module 504 configured to advertise routing reachability information corresponding to an IP address of the virtual PE by using a routing protocol
  • the issuing module 504 is further configured to: after determining that the operator edge device is the primary PE, advertise the reachability information of the first VPLS instance, where the reachability information of the first VPLS instance includes the The VPLS identifier of the VPLS instance corresponding to the RG and the virtual PE are the VPLS label allocated by the VPLS instance and the IP address of the virtual PE.
  • the function of the first obtaining module 503 is implemented by a second physical circuit, and the second physical circuit may include a second physical receiving port to receive the RG information.
  • the second physical receiving port may be the same port as the first physical receiving port, or may be a different port.
  • the second physical circuit may further include a second processor to identify the RG information.
  • the second processor may be the same processor as the first processor, or may be a different processor.
  • the first PE further includes:
  • the active/standby negotiation module 505 is configured to determine an active PE and a standby PE with the second PE.
  • the function of the active/standby negotiation module 505 is implemented by one processor.
  • the first PE encapsulates the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, thereby ensuring that the remote PE receives the packet
  • the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring the stability of the MAC table.
  • a first carrier edge device English full name
  • Provider Edge belongs to a redundancy group (English name is Redundancy Group, abbreviated as RG), and the RG further includes a second PE, where the RG corresponds to a virtual PE, that is, the virtual PE
  • VPLS virtual private local area network service
  • the member PE, the first VPLS instance is a VPLS instance of the Intermediate System-Intermediate System (ISIS), and the first user edge device (referred to as Custom Edge in English, CE) is the virtual PE.
  • ISIS Intermediate System-Intermediate System
  • CE Custom Edge in English
  • the first PE includes the following content.
  • An acquiring module configured to obtain RG information, where the RG information includes an IP address of the virtual PE corresponding to the RG, a VPLS identifier of the first VPLS instance corresponding to the RG, and the virtual PE is the The VPLS label assigned by a VPLS instance and/or the IP address of other member PEs belonging to the RG.
  • the obtaining module is configured to perform step 301 shown in Figure 3a.
  • a publishing module configured to advertise the route reachability information corresponding to the IP address of the virtual PE by using a routing protocol.
  • the publishing module is configured to perform step 302 shown in Figure 3a.
  • the issuance module is further configured to: after determining that the operator edge device is the primary PE, advertise the reachability information of the first VPLS instance, where the reachability information of the first VPLS instance includes the RG corresponding The VPLS identifier of the VPLS instance and the VPLS label assigned by the virtual PE to the VPLS instance and the IP address of the virtual PE.
  • the publishing module is further configured to perform step 303 shown in Figure 3a.
  • the first PE is configured to form an RG including the first PE and the second PE and a virtual PE corresponding to the RG in the first VPLS instance, and send the VPLS instance and the virtual PE to other devices in the network.
  • the information is such that the first PE uses the IP address of the virtual PE corresponding to the RG of the first PE and the second PE to encapsulate the packet, thereby ensuring that the remote PE receives the packet and performs the packet.
  • the next hop PE corresponding to the MAC is always a virtual PE, so that the next hop PE does not jump between the first PE and the second PE, ensuring the stability of the MAC table. Therefore the first PE can be used to help ensure MAC table stability.
  • FIG. 6 is a schematic structural diagram of a third carrier edge device according to an embodiment of the present invention.
  • the third carrier edge device (PE) is used in a network, the network including the
  • the virtual PE also includes a virtual PE, and the member PE of the RG corresponding to the virtual PE includes a first PE and a second PE, that is, the virtual PE includes the first PE and The second PE, the virtual PE has an IP address, and the virtual PE and the third PE are both member PEs of the first VPLS instance, and the first PE is the third PE of the RG.
  • the second CE is the local CE of the third PE in the first VPLS instance, and the first VPLS instance is the intermediate system to the intermediate system ISIS VPLS instance.
  • the third PE includes: a second receiving module 601, configured to receive an Ethernet frame sent from the second CE; and a second sending module 602, configured to use an IP address of the virtual PE or a first VPLS instance
  • the multicast IP address of the corresponding multicast tree is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the virtual PE, so that the member PE of the RG corresponding to the virtual PE receives the
  • the encapsulated packet is decapsulated and decapsulated, and the decapsulated packet is forwarded to the first CE, where the first CE is the local CE of the virtual PE in the first VPLS instance, and the The first CE is connected to the first PE and the second PE in an MC-LAG manner.
  • the second receiving module 601 and the second sending module 602 are respectively configured to perform steps 401 and 402 shown in FIG.
  • the first PE in the embodiment is the shortest member of the third PE route in the RG.
  • the function of the second receiving module 601 is implemented by a third physical receiving port
  • the function of the second sending module 602 is implemented by a third physical circuit
  • the third physical circuit includes a third processor and a third physical sending port
  • the third processor is configured to perform the encapsulating process in the second receiving module 602
  • the third physical sending port is configured to perform the sending in the second sending module 602 deal with.
  • the second sending module 602 includes one or more of the following units: a fifth sending unit, configured to: when the Ethernet frame is a known destination unicast Ethernet frame, if the Ethernet frame is If the next hop PE corresponding to the destination MAC address is the virtual PE, the IP address of the virtual PE is used as the tunnel destination address, and the IP address of the third carrier edge device is used as the tunnel source address to the Ethernet frame.
  • a fifth sending unit configured to: when the Ethernet frame is a known destination unicast Ethernet frame, if the Ethernet frame is If the next hop PE corresponding to the destination MAC address is the virtual PE, the IP address of the virtual PE is used as the tunnel destination address, and the IP address of the third carrier edge device is used as the tunnel source address to the Ethernet frame.
  • Encapsulating, the encapsulated packet carries a first VPLS label, the first VPLS label is a VPLS label allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is a downstream label.
  • the fifth sending unit is configured to perform The "processing mode 402-1".
  • a sixth sending unit configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an ingress copy mode, the Ethernet frame is used Performing the copying to obtain a plurality of the Ethernet frames that are the same as the number of the remote PEs in the first VPLS instance of the third carrier edge device; and separately encapsulating the multiple Ethernet frames to obtain multiple The encapsulated packet, wherein the tunnel source address of each encapsulated packet is an IP address of the third carrier edge device, and the tunnel destination address of each encapsulated packet is The IP address of a PE in the remote PE of the third carrier edge device, and the tunnel destination address of the plurality of encapsulated packets are different from each other; and the encapsulated packet is sent to the corresponding remote PE.
  • the sixth sending unit is configured to execute the "processing mode 402-2".
  • a seventh sending unit configured to: the first PE is a primary PE, the second PE is a standby PE, the first PE is added to a multicast tree corresponding to the first VPLS, and the Ethernet frame is When unicasting an Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame for an unknown destination, if the first VPLS instance uses the non-aggregated multicast tree mode, the multicast IP address of the multicast tree corresponding to the first VPLS instance is used.
  • the seventh sending unit is configured to execute the “processing mode 402-3”.
  • An eighth sending unit configured to: when the first PE is a primary PE, the second PE is a standby PE, the first PE is added to a multicast tree corresponding to the first VPLS, and the ether is If the frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the aggregate multicast tree mode, the multicast of the multicast tree corresponding to the first VPLS instance is used.
  • the IP address is used as the tunnel destination address and the IP address of the edge device of the third carrier is used as the tunnel source address to encapsulate the Ethernet frame, and the encapsulated packet carries a third VPLS label, where the third VPLS label is a VPLS label allocated by the third carrier edge device to the first VPLS instance.
  • the label type of the third VPLS label is an upstream label, and the encapsulated packet is forwarded by the multicast tree, so that the first PE receives the encapsulated packet and decapsulates the packet.
  • the encapsulated packet is forwarded to the first CE.
  • the eighth sending unit is configured to execute the “processing mode 402-4”.
  • the functions of each of the fifth sending unit, the sixth sending unit, the seventh sending unit, and the eighth sending unit are all implemented by the third processor and the third physical sending port.
  • the third carrier edge device further includes:
  • the third receiving module 603 is configured to receive route reachability information corresponding to the IP address of the virtual PE that is advertised by the PE or the member PE through the routing protocol;
  • the third receiving module 603 is further configured to receive reachability information of the VPLS instance corresponding to the RG that is advertised by the first PE that is the primary PE, where the reachability information of the VPLS instance includes the VPLS identifier of the VPLS instance corresponding to the RG, the virtual PE is a VPLS label allocated by the VPLS instance and an IP address of the virtual PE.
  • the function of the third receiving module 603 is implemented by a fourth physical receiving port, and the fourth physical receiving port may be the same port as the third physical receiving port, or may be a different port.
  • the member CE of the RG corresponding to the virtual PE receives only the encapsulated packet sent from the third PE, and decapsulates the packet and forwards the packet to the first CE to avoid the first CE. Received duplicate messages.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

The present invention relates to the network transmission field. Disclosed are a method for forwarding a packet in a network and a provider edge (PE) device. The network comprises: a first PE and a second PE. The first PE and the second PE belong to a redundancy group (RG), the RG corresponds to a virtual PE, the virtual PE has an IP address, the virtual PE is a member PE in a first VPLS instance, and a first CE is a local CE of the virtual PE in the first VPLS instance. The method comprises: the first PE receiving an Ethernet frame from the first CE; and the first PE encapsulating the Ethernet frame according to the type of the Ethernet frame to obtain a packet after encapsulation, and sending the packet after encapsulation to a remote end PE of the virtual PE in the first VPLS instance. The first PE uses the IP address of the virtual PE corresponding to the RG that includes the first PE and the second PE for packet encapsulation, thereby ensuring that when the remote end PE receives the packet and learns a MAC address, a next-hop PE corresponding to the MAC is the virtual PE all the time. Therefore, no transition of the next-hop PE occurs, thereby ensuring the stability of a MAC table.

Description

在网络中转发报文的方法和运营商边缘设备 本申请要求于 2012 年 3 月 22 日提交中国专利局、 申请号为 CN 201210079144.1、 发明名称为 "在网络中转发报文的方法和运营商边缘设备" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域  Method for forwarding messages in the network and operator edge device This application claims to be filed on March 22, 2012, the Chinese Patent Office, the application number is CN 201210079144.1, and the invention name is "Methods for Forwarding Messages in the Network and Operator Edges" The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference. Technical field
本发明涉及网络传输领域, 特别涉及一种在网络中转发 ^艮文的方法和运 营商边缘设备。  The present invention relates to the field of network transmission, and in particular, to a method for forwarding a message in a network and a carrier edge device.
背景技术 随着以太网技术的不断发展, 以太网网络规模越来越大。 目前, 电信级 以太网电路被广泛地应用, 虚拟专用局域网业务(英文全称为 Virtual Private LAN Service, 英文简称为 VPLS )是在一种在公用互联网协议(英文全称为 Internet Protocol,英文简称为 IP )/多协议标签交换(英文全称为 Multi-Protocol Label Switching, 英文简称为 MPLS ) 网络中提供的点到多点的二层虚拟专用 网 (英文全称为 Level-2 Virtual Private Network, 英文简称为 L2VPN ) 业务。 VPLS利用了以太网技术和 MPLS技术, 通过运营商的 IP/MPLS网络将分布 到不同地域的多个以太局域网 (英文全称为 Local Area Network, 英文简称为 LAN )连接在一起, 使它们像连接到一个以太网桥一样。 VPLS基于媒介访问 控制 (英文全称为 Media Access Control, 英文简称为 MAC )地址或者 MAC 地址加虚拟局域网 (英文全称为 Virtual Local Area Network, 英文简称为 VLAN )标识来做出转发决策, 用户边缘设备(英文全称为 Custom Edge, 英 文简称为 CE )设备可以与属于同一 VPLS实例的其它 CE进行通信。 在 CE 设备看来, 服务提供商网络提供的 VPLS 业务就是一个以太网桥(或以太网 交换机)。 目前 VPLS 的现有实现方案需要运营商边缘设备(英文全称为 Provider Edge, 英文简称为 PE )之间建立全互连的伪线 (英文全称为 Pseudo Wire, 英文简称为 PW )来模拟一个以太网交换机, 此外现有 VPLS方案只支 持入口复制方式的组播业务, 因此存在大量 VPLS实例的网络中, 现有 VPLS 技术存在严重的可扩展性问题, 比如需要维护大量的 PW状态, 以及大量入 口复制带来的带宽浪费而中间系统到中间系统 (英文全称为 Intermediate System- Intermediate System, 英文简称为 ISIS ) VPLS通过扩展的 ISIS 类型 长度值(英文缩写为 TLV ) 实现 VPLS可达性信息通告, 也就是完成邻居自 动发现和信令功能, 避免了现有 VPLS技术存在的上述问题。 BACKGROUND With the continuous development of Ethernet technology, Ethernet networks are becoming larger and larger. At present, the carrier-grade Ethernet circuit is widely used. The virtual private LAN service (English full name is Virtual Private LAN Service, VPLS in English) is in the public Internet protocol (English full name is Internet Protocol, English abbreviated as IP) / Multi-Protocol Label Switching (English for Multi-Protocol Label Switching, English abbreviated as MPLS) The point-to-multipoint Layer 2 virtual private network provided in the network (English name is Level-2 Virtual Private Network, English abbreviated as L2VPN) business. VPLS utilizes Ethernet technology and MPLS technology to connect multiple Ethernet LANs (English called Local Area Network, English abbreviated as LAN) distributed in different regions through the carrier's IP/MPLS network, so that they are connected to each other. The same as an Ethernet bridge. VPLS is based on media access control (English name is called Media Access Control, MAC for short) or MAC address plus virtual local area network (English name is called Virtual Local Area Network, English abbreviated as VLAN) to make forwarding decisions, user edge devices ( The English full name is Custom Edge, which is abbreviated as CE. The device can communicate with other CEs belonging to the same VPLS instance. From the perspective of the CE device, the VPLS service provided by the service provider network is an Ethernet bridge (or Ethernet switch). Currently, the existing implementation of VPLS requires the establishment of a fully interconnected pseudowire (in English, Pseudo Wire, PW in English) to simulate an Ethernet network. In addition, the existing VPLS solution only supports the multicast service in the ingress replication mode. Therefore, in the network with a large number of VPLS instances, the existing VPLS technology has serious scalability problems, such as maintaining a large number of PW states and a large number of ingress replications. Bandwidth wasted and intermediate system to intermediate system (English full name Intermediate) System- Intermediate System (English for short) IVP) VPLS implements VPLS reachability information advertisement by extending the ISIS type length value (abbreviated as TLV), that is, completes the automatic discovery and signaling function of the neighbor, avoiding the existence of the existing VPLS technology. The above problem.
在现有的 ISIS VPLS技术中,如果一个 CE的两条上行链路以跨框链路聚合 组(英文全称为 Multi-Chasis Link Aggegation Group, 英文简称为 MC-LAG )分 别接入到的 PE1和 PE2,那么对于所述 CE来说,接收到从 CE发送过来的报文并 进行 MAC地址学习的时候, MAC对应的下一跳 PE在第一 PE和第二 PE之间跳 变, 导致 MAC表不稳定。  In the existing ISIS VPLS technology, if two uplinks of a CE are connected to the PE1 and the inter-chassis link aggregation group (English name is Multi-Chasis Link Aggegation Group, English abbreviated as MC-LAG) respectively. PE2, then, for the CE, when receiving the packet sent from the CE and performing MAC address learning, the next hop PE corresponding to the MAC hops between the first PE and the second PE, resulting in a MAC table. Unstable.
发明内容 本发明实施例提供了一种在网络中转发报文的方法和运营商边缘设备。 本发明实施例的技术方案包括: SUMMARY OF THE INVENTION The embodiments of the present invention provide a method for forwarding a message in a network and an operator edge device. The technical solution of the embodiment of the present invention includes:
一种在网络中转发报文的方法, 所述网络包括: 第一运营商边缘设备 PE、 第二 PE, 所述第一 PE和所述第二 PE属于一个冗余组 RG, 所述 RG对应一 个虚拟 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE是第一虚拟专用局域网 月良务 VPLS实例的成员 PE, 所述第一 VPLS实例为中间系统到中间系统 ISIS VPLS实例, 第一用户边缘设备 CE为所述虚拟 PE在所述第一 VPLS实例内 的本地 CE, 所述第一 CE以跨框链路聚合组 MC-LAG方式分别和所述第一 PE和所述第二 PE相连, 所述方法包括:  A method for forwarding a packet in a network, the network includes: a first carrier edge device PE, a second PE, the first PE and the second PE belong to a redundancy group RG, and the RG corresponds to a virtual PE, the virtual PE has an IP address, and the virtual PE is a member PE of the first virtual private local area network VPLS instance, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, the first user The edge device CE is a local CE of the virtual PE in the first VPLS instance, and the first CE is connected to the first PE and the second PE in an inter-frame link aggregation group MC-LAG manner. , the method includes:
所述第一 PE接收来自所述第一 CE的以太帧;  The first PE receives an Ethernet frame from the first CE;
所述第一 PE根据所述以太帧的类型,对所述以太帧进行封装得到封装后 的报文, 并将所述封装后的报文向所述虚拟 PE在所述第一 VPLS实例内的远 端 PE发送, 其中所述封装后的报文的隧道源地址为所述虚拟 PE的 IP地址。  The first PE encapsulates the encapsulated packet according to the type of the Ethernet frame, and encapsulates the encapsulated packet into the virtual PE in the first VPLS instance. The remote PE sends, where the tunnel source address of the encapsulated packet is the IP address of the virtual PE.
一种在网络中转发 ^艮文的方法, 所述网络包括: 第三 PE和虚拟 PE, 所 述虚拟 PE对应的 RG的成员 PE包括第一 PE和第二 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE和所述第三 PE都是第一 VPLS实例的成员 PE, 所述第 一 VPLS实例为中间系统到中间系统 ISIS VPLS实例, 所述第一 PE为所述 RG中距离所述第三 PE路由最短的成员 PE, 第二 CE是所述第三 PE在第一 VPLS实例内的本地 CE, 所述方法包括:  A method for forwarding a message in a network, the network includes: a third PE and a virtual PE, where a member PE of the RG corresponding to the virtual PE includes a first PE and a second PE, and the virtual PE has an IP address The virtual PE and the third PE are both member PEs of the first VPLS instance, the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the first PE is the distance of the RG medium The third PE is the shortest member PE, and the second CE is the local CE of the third PE in the first VPLS instance, and the method includes:
所述第三 PE接收到从所述第二 CE发送过来的以太帧; 所述第三 PE使用所述虚拟 PE的 IP地址或者第一 VPLS实例对应的组播 树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 并将封装后的报 文发送给所述虚拟 PE,使得所述虚拟 PE对应的 RG的成员 PE接收到所述封 装后的报文并进行解封装, 并将解封装后的报文转发给第一 CE, 所述第一 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 并且所述第一 CE以 跨框链路聚合组 MC-LAG方式分别和所述第一 PE和所述第二 PE相连。 Receiving, by the third PE, an Ethernet frame sent from the second CE; The third PE encapsulates the Ethernet frame by using the IP address of the virtual PE or the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address, and sends the encapsulated packet to the The virtual PE is configured to enable the member PE of the RG corresponding to the virtual PE to receive the encapsulated packet and decapsulate the packet, and forward the decapsulated packet to the first CE, where the first CE is The virtual CE is in the local CE of the first VPLS instance, and the first CE is connected to the first PE and the second PE in an inter-frame link aggregation group MC-LAG manner.
一种第一运营商边缘设备 , 所述第一运营商边缘设备 PE属于一个冗余组 RG, 所述 RG还包括第二 PE, 所述 RG对应一个虚拟 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE是第一 VPLS实例的成员 PE, 所述第一 VPLS实例为 中间系统到中间系统 ISIS VPLS实例, 第一用户边缘设备 CE为所述虚拟 PE 在所述第一 VPLS实例内的本地 CE,所述第一 CE以跨框链路聚合组 MC-LAG 方式分别和所述第一 PE和所述第二 PE相连, 所述第一 PE包括:  A first carrier edge device, the first carrier edge device PE belongs to a redundancy group RG, the RG further includes a second PE, and the RG corresponds to one virtual PE, and the virtual PE has an IP address. The virtual PE is a member PE of the first VPLS instance, the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the first user edge device CE is the locality of the virtual PE in the first VPLS instance. The CE is connected to the first PE and the second PE in the MC-LAG mode of the inter-frame link aggregation group, where the first PE includes:
第一接收模块, 用于接收来自所述第一 CE的以太帧,  a first receiving module, configured to receive an Ethernet frame from the first CE,
第一发送模块, 用于根据所述以太帧的类型, 对所述以太帧进行封装得 到封装后的报文, 并将所述封装后的报文向所述虚拟 PE在所述第一 VPLS实 例内的远端 PE发送, 其中所述封装后的>¾文的隧道源地址为所述虚拟 PE的 IP地址。  a first sending module, configured to encapsulate the encapsulated packet according to the type of the Ethernet frame, and encapsulate the encapsulated packet to the virtual PE in the first VPLS instance. The remote PE sends the encapsulated source address of the encapsulated >3⁄4 text as the IP address of the virtual PE.
一种第三运营商边缘设备,所述第三运营商边缘设备 PE用于在网络中使 用, 所述网络还包括虚拟 PE, 所述虚拟 PE对应的 RG的成员 PE包括第一 PE和第二 PE , 所述虚拟 PE具有 IP地址 , , 所述第一 VPLS实例为中间系统 到中间系统 ISIS VPLS实例, 所述虚拟 PE和所述第三 PE都是第一 VPLS实 例的成员 PE, 所述第一 PE为所述 RG中距离所述第三 PE路由最短的成员 PE, 第二 CE是所述第三 PE在第一 VPLS实例内的本地 CE, 所述第三 PE包 括:  A third carrier edge device, the third carrier edge device PE is used in the network, the network further includes a virtual PE, and the member PE of the RG corresponding to the virtual PE includes the first PE and the second a PE, the virtual PE has an IP address, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the virtual PE and the third PE are both member PEs of the first VPLS instance, where the A PE is a member of the RG that is the shortest member of the third PE. The second CE is the local CE of the third PE in the first VPLS instance, and the third PE includes:
第二接收模块, 用于接收到从所述第二 CE发送过来的以太帧; 第二发送模块, 用于使用所述虚拟 PE的 IP地址或者第一 VPLS实例对 应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 并将封 装后的报文发送给所述虚拟 PE,使得所述虚拟 PE对应的 RG的成员 PE接收 到所述封装后的报文并进行解封装, 并将解封装后的报文转发给第一 CE, 所 述第一 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 并且所述第 一 CE以跨框链路聚合组 MC-LAG方式分别和所述第一 PE和所述第二 PE相 连。 依照本实施所述的方法, 第一 PE使用包括所述第一 PE和所述第二 PE 的 RG对应的所述虚拟 PE的 IP地址封装报文, 因此保证了远端 PE接收到该 才艮文并进行 MAC地址学习的时候, MAC对应的下一跳 PE始终是虚拟 PE , 因而不会出现下一跳 PE在第一 PE和第二 PE之间跳变,保证了 MAC表稳定 性。 a second receiving module, configured to receive an Ethernet frame sent from the second CE, and a second sending module, configured to use an IP address of the virtual PE or a multicast IP of a multicast tree corresponding to the first VPLS instance The address is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the virtual PE, so that the member PE of the RG corresponding to the virtual PE receives the encapsulated packet and performs solution. Encapsulating, and forwarding the decapsulated packet to the first CE, where the first CE is a local CE of the virtual PE in the first VPLS instance, and the first CE is aggregated by a cross-frame link The group MC-LAG mode is respectively associated with the first PE and the second PE Even. According to the method of the present embodiment, the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, thereby ensuring that the remote PE receives the packet. When the MAC address learning is performed, the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring the stability of the MAC table.
附图说明 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中 所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。 BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图 1是本发明实施例提供的一种在网络中转发报文的方法的流程图; 图 2是本发明实施例提供的一种 ISIS VPLS网络的架构图;  1 is a flowchart of a method for forwarding a packet in a network according to an embodiment of the present invention; FIG. 2 is a structural diagram of an ISIS VPLS network according to an embodiment of the present invention;
图 3a是本发明实施例提供的一种在网络中的运营商边缘设备管理方法的 流程图;  FIG. 3 is a flowchart of a method for managing an operator edge device in a network according to an embodiment of the present invention; FIG.
图 3b是本发明实施例提供的一种在网络中转发报文的方法的流程图; 图 4是本发明实施例提供的一种在网络中转发报文的方法的流程图; 图 5是本发明实施例提供的一种第一运营商边缘设备的结构示意图; 图 6是本发明实施例提供的一种第三运营商边缘设备的结构示意图。  FIG. 3 is a flowchart of a method for forwarding a packet in a network according to an embodiment of the present invention; FIG. 4 is a flowchart of a method for forwarding a packet in a network according to an embodiment of the present invention; A schematic diagram of a structure of a first carrier edge device according to an embodiment of the invention; FIG. 6 is a schematic structural diagram of a third carrier edge device according to an embodiment of the present invention.
具体实施方式 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发 明实施方式作进一步地详细描述。 DETAILED DESCRIPTION OF THE EMBODIMENTS In order to make the objects, technical solutions and advantages of the present invention more comprehensible, the embodiments of the present invention will be further described in detail with reference to the accompanying drawings.
图 1是本发明实施例提供的一种在网络中转发报文的方法的流程图。所述 网络中包括: 第一运营商边缘设备(英文全称为 Provider Edge, 英文缩写为 PE )、 第二 PE , 所述第一 PE 和第二 PE 属于一个冗余组 (英文全称为 Redundancy Group,英文缩写为 RG ), 所述 RG对应一个虚拟 PE,也就是说, 所述虚拟 PE包括所述第一 PE和所述第二 PE, 所述虚拟 PE具有 IP地址, 所 述虚拟 PE是第一虚拟私有局域网服务(英文全称为 Virtual Private Local Area Network Service, 英文缩写为 VPLS )实例的成员 PE, 所述第一 VPLS实例为 (英文全称为 Intermediate System- Intermediate System, 英文简称为 ISIS ) VPLS实例, 第一用户侧边缘设备(英文全称为 Customer Edge, 英文缩写为 CE )为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 所述第一 CE以跨 才匡链路聚合组(英文全称为 Multi-Chasis Link Aggegation Group, 英文简称为 MC-LAG ) 方式分别和所述第一 PE和所述第二 PE相连。 参见图 1 , 所述方 法包括: FIG. 1 is a flowchart of a method for forwarding a message in a network according to an embodiment of the present invention. The network includes: a first carrier edge device (hereinafter referred to as Provider Edge in English, abbreviated as PE), and a second PE, where the first PE and the second PE belong to a redundancy group (English name is Redundancy Group, English abbreviation is RG ), the RG corresponds to a virtual PE, that is, The virtual PE includes the first PE and the second PE, and the virtual PE has an IP address, and the virtual PE is a first virtual private local area network service. The member VP of the VPLS instance, the first VPLS instance is a VPLS instance of the Intermediate System-Intermediate System (ISIS), and the first user-side edge device (English name is Customer Edge, English abbreviation CE) The first CE is in the local CE of the first VPLS instance, and the first CE is in the multi-Chasis Link Aggegation Group (MC-LAG). And connecting to the first PE and the second PE. Referring to FIG. 1, the method includes:
101、 所述第一 PE接收来自所述第一 CE的以太帧;  101. The first PE receives an Ethernet frame from the first CE.
102、 所述第一 PE根据所述以太帧的类型, 对所述以太帧进行封装得到 封装后的报文, 并将所述封装后的报文向所述虚拟 PE在所述第一 VPLS实例 内的远端 PE发送, 其中所述封装后的报文的隧道源地址为所述虚拟 PE的 IP 地址。  The first PE encapsulates the encapsulated packet according to the type of the Ethernet frame, and encapsulates the encapsulated packet to the virtual PE in the first VPLS instance. The remote source PE sends the encapsulated source address of the encapsulated packet as the IP address of the virtual PE.
依照本实施所述的方法,第一 PE使用包括所述第一 PE和所述第二 PE的 RG对应的所述虚拟 PE的 IP地址封装报文, 因此保证了远端 PE接收到该报 文并进行 MAC地址学习的时候, MAC对应的下一跳 PE始终是虚拟 PE , 因 而不会出现下一跳 PE在第一 PE和第二 PE之间跳变,保证了 MAC表稳定性。  According to the method of the present embodiment, the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, so that the remote PE receives the packet. When the MAC address learning is performed, the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring stability of the MAC table.
图 2是本发明实施例提供的一种 ISIS VPLS网络的架构图。 参见图 2 , 该 VPLS网络中至少包括: 第一 PE、 第二 PE、 第三 PE和第四 PE, 第一 PE、 第二 PE、 第三 PE、 第四 PE主要负责 VPN 业务的接入, 完成报文从私网到 公网隧道和报文从公网隧道到私网的映射与转发; CE可以是交换机, 也可以 是主机, 其中, 第一 CE以 MC-LAG方式分别与第一 PE、 第二 PE相连。 可 选地, 如图 2所示的 VPLS网络也可以不包括第三 PE或第四 PE。  FIG. 2 is a structural diagram of an ISIS VPLS network according to an embodiment of the present invention. Referring to FIG. 2, the VPLS network includes at least: a first PE, a second PE, a third PE, and a fourth PE, where the first PE, the second PE, the third PE, and the fourth PE are mainly responsible for accessing VPN services. The mapping from the private network to the public network tunnel and the packet from the public network tunnel to the private network is performed. The CE can be a switch or a host. The first CE is in the MC-LAG mode and the first PE. The second PE is connected. Optionally, the VPLS network shown in Figure 2 may also not include the third PE or the fourth PE.
图 3a是本发明实施例提供的一种在网络中的运营商边缘设备管理方法的 流程图。 该实施例以图 2所示的 ISIS VPLS网络为例进行说明。 参见图 3a, 该实施例具体包括:  FIG. 3a is a flowchart of a method for managing an operator edge device in a network according to an embodiment of the present invention. This embodiment uses the ISIS VPLS network shown in FIG. 2 as an example for description. Referring to FIG. 3a, the embodiment specifically includes:
301、 第一 PE获取冗余组(英文全称为 Redundancy Group , 英文缩写为 RG )信息 , 该 RG信息包括该 RG对应的虚拟 PE的 IP地址、 该 RG对应的 第一 VPLS实例的 VPLS 标识、该虚拟 PE为第一 VPLS实例分配的 VPLS标 签和 /或属于该 RG的其他成员 PE的 IP地址,其中所述第一 VPLS实例为 ISIS VPLS实例。 可选地, 该 RG对应的虚拟 PE包括该 RG中的成员 PE。 301. The first PE obtains a redundancy group (English name: Redundancy Group, abbreviated as RG). The RG information includes an IP address of the virtual PE corresponding to the RG, and a VPLS identifier of the first VPLS instance corresponding to the RG. The VPLS label assigned by the virtual PE to the first VPLS instance and/or the IP address of other member PEs belonging to the RG, where the first VPLS instance is ISIS VPLS instance. Optionally, the virtual PE corresponding to the RG includes a member PE in the RG.
所述 RG包括所述第一 PE, 还包括第二 PE, 所述虚拟 PE为第一 VPLS 实例的成员 PE, 所述虚拟 PE包括所述第一 PE和所述第二 PE, 网络中还包 括第一 CE, 第一 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE。 所 述第一 CE以 MC-LAG方式分别与第一 PE、 第二 PE相连具体地, 第一 CE 需要说明的是, 属于 RG的每个成员 PE均获取该 RG信息, 本实施例仅 以第一 PE的获取为例进行说明。  The RG includes the first PE, and further includes a second PE, where the virtual PE is a member PE of the first VPLS instance, and the virtual PE includes the first PE and the second PE, and the network further includes The first CE is a local CE of the virtual PE in the first VPLS instance. The first CE is connected to the first PE and the second PE in an MC-LAG manner. Specifically, the first CE needs to be described that each member PE that belongs to the RG obtains the RG information. The acquisition of a PE is described as an example.
第一 PE获取 RG信息, 可用于指导后续的报文转发。  The first PE obtains RG information, which can be used to guide subsequent packet forwarding.
其中, 虚拟 PE为 VPLS实例分配的 VPLS标签是由所述虚拟 PE中的任 一成员 PE生成的、 或者由技术人员进行配置。  The VPLS label allocated by the virtual PE to the VPLS instance is generated by any member PE of the virtual PE or configured by a technician.
在图 2所示的 VPLS网络架构中, 作为一个例子, 第一 PE的实际 IP地 址为 1.1.1.2 , 第二 PE的实际 IP地址为 1.1.1.3 , 可将该虚拟 PE的虚拟 PE的 IP地址设置为 1丄 1.1 , 该设置由技术人员进行, 本发明实施例不做具体限定。  In the VPLS network architecture shown in Figure 2, as an example, the actual IP address of the first PE is 1.1.1.2, and the actual IP address of the second PE is 1.1.1.3. The IP address of the virtual PE of the virtual PE can be used. It is set to 1丄1.1, and the setting is performed by a technician, which is not specifically limited in the embodiment of the present invention.
302、 该第一 PE通过路由协议发布该虚拟 PE的 IP地址对应的路由可达 性信息。  302. The first PE advertises route reachability information corresponding to the IP address of the virtual PE by using a routing protocol.
在本实施例中,第二 PE也通过路由协议发布该虚拟 PE的 IP地址对应的 路由可达性信息。  In this embodiment, the second PE also advertises the reachability information corresponding to the IP address of the virtual PE through a routing protocol.
这样从虚拟 PE在 VPLS实例中的远端 PE (在本实施例中 , 远端 PE为第 三 PE或 PE4 )发送出来的隧道目的地址为虚拟 PE的 IP地址(即 1.1.1.1 )的 VPLS报文将被转发到离远端 PE较近的一个成员 PE。  The VPLS packet of the virtual IP address of the virtual PE (that is, 1.1.1.1) is sent from the remote PE of the virtual PE in the VPLS instance (in this embodiment, the remote PE is the third PE or the PE4). The text will be forwarded to a member PE that is closer to the remote PE.
303、 当第一 PE在确定该第一 PE为主用 PE后, 发布第一 VPLS实例的 可达性信息,该第一 VPLS实例的可达性信息包括 RG对应的第一 VPLS实例 的 VPLS 标识和虚拟 PE为该第一 VPLS实例分配的 VPLS标签以及虚拟 PE 的 IP地址。  303. After the first PE determines that the first PE is the primary PE, the VPLS identifier of the first VPLS instance is advertised. The reachability information of the first VPLS instance includes the VPLS identifier of the first VPLS instance corresponding to the RG. And the virtual PE is the VPLS label assigned to the first VPLS instance and the IP address of the virtual PE.
可选地 , 第一 PE和第二 PE之间通过两成员 PE之间的通信接口运行虚 拟路由器冗余协议(英文全称为 Virtual Router Redundancy Protocol, 英文缩写 为 VRRP ) 或者跨框通信协议, 英文全称为 Inter-Chassis Communication Protocol , 英文缩写为 ICCP )协议, 针对任意一个 VPLS实例, 确定主用 PE 和备用 PE。 在本实施例中, 针对第一 CE所属的第一 VPLS实例, 将第一 PE 作为主用 PE, 第二 PE作为备用 PE, 当第一 PE在确定该第一 PE为主用 PE 后,由第一 PE代表虚拟 PE发布第一 VPLS实例的可达性信息,该第一 VPLS 实例的可达性信息包括 RG对应的第一 VPLS实例的 VPLS 标识和虚拟 PE为 该第一 VPLS实例分配的 VPLS标签以及虚拟 PE的 IP地址。 Optionally, the virtual router redundancy protocol is run between the first PE and the second PE through a communication interface between the two PEs (in English, the Virtual Router Redundancy Protocol is abbreviated as VRRP) or the cross-frame communication protocol. For the Inter-Chassis Communication Protocol (ICCP) protocol, determine the primary PE and the standby PE for any VPLS instance. In this embodiment, for the first VPLS instance to which the first CE belongs, the first PE is used as the primary PE, and the second PE is used as the standby PE, and the first PE determines that the first PE is the primary PE. The first PE represents the reachability information of the first VPLS instance, and the reachability information of the first VPLS instance includes the VPLS identifier of the first VPLS instance and the virtual PE is the first VPLS instance. The assigned VPLS label and the IP address of the virtual PE.
优选地, 需要保证第一 PE和第二 PE针对同一个 VPLS实例分配相同的 VPLS 标签。 为了保证第一 PE和第二 PE针对同一个 VPLS实例分配相同的 VPLS 标签, 可以将 VPLS标签设置为与 VPLS标识相同的值, 比如 VPLS标 识 =100的 VPLS实例对应的 VPLS标签也等于 100。  Preferably, the first PE and the second PE are required to allocate the same VPLS label to the same VPLS instance. To ensure that the first VPLS label is assigned to the same VPLS instance, the VPLS label can be set to the same value as the VPLS identifier. For example, the VPLS label corresponding to the VPLS ID = 100 is equal to 100.
执行上述步骤 301-303方法后, 在第一 VPLS实例中形成了一个包括第一 PE和第二 PE的 RG以及所述 RG对应的虚拟 PE, 并且向网络中的其他设备 发送了 VPLS实例和虚拟 PE的信息, 以便于第一 PE使用包括所述第一 PE 和所述第二 PE的 RG对应的所述虚拟 PE的 IP地址封装报文,从而保证了远 端 PE接收到该报文并进行 MAC地址学习的时候, MAC对应的下一跳 PE始 终是虚拟 PE, 这样就不会出现下一跳 PE在第一 PE和第二 PE之间跳变, 保 证了 MAC表稳定性。 因此步骤 301-303可以用于帮助保证 MAC表稳定性。 图 3b是本发明实施例提供的一种在网络中转发报文的方法的流程图, 所 述方法应用于如图 2 所示的网络中。 该实施例可以基于执行如图 3a 中步骤 301-303而得到的结果, 也可不基于所述结果。 以当虚拟 PE对应的 RG中第 一 PE通过聚合链路收到第一 CE发送来的以太帧为例进行说明, RG中的任 意一个成员 PE通过聚合链路收到第一 CE发送来的以太帧后的处理方法与第 一 PE的处理方法相同。 参见图 3b, 该实施例包括以下内容。  After the foregoing steps 301-303 are performed, an RG including the first PE and the second PE and a virtual PE corresponding to the RG are formed in the first VPLS instance, and the VPLS instance and the virtual device are sent to other devices in the network. The information of the PE, so that the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, so that the remote PE receives the packet and performs the packet. When the MAC address is learned, the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not hop between the first PE and the second PE, ensuring the stability of the MAC table. Therefore steps 301-303 can be used to help ensure the stability of the MAC table. FIG. 3b is a flowchart of a method for forwarding a message in a network according to an embodiment of the present invention, where the method is applied to a network as shown in FIG. 2. This embodiment may or may not be based on the results obtained by performing steps 301-303 as in Figure 3a. The first PE in the RG corresponding to the virtual PE receives the Ethernet frame sent by the first CE through the aggregation link as an example. The PE of any member of the RG receives the Ethernet sent by the first CE through the aggregation link. The processing method after the frame is the same as the processing method of the first PE. Referring to Figure 3b, this embodiment includes the following.
304、 第一 PE接收来自第一 CE的以太帧 (英文全称为 Ethernet frame ); 该以太帧可以为已知目的地单播以太帧、 未知目的地单播以太帧、 组播 以太帧或广播以太帧中的任意一种或多种。  304. The first PE receives an Ethernet frame from the first CE (English name is an Ethernet frame); the Ethernet frame may be a known destination unicast Ethernet frame, an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet Any one or more of the frames.
305、 第一 PE才艮据所述以太帧的类型, 对所述以太帧进行封装得到封装 后的报文, 并将所述封装后的报文向所述虚拟 PE在所述第一 VPLS实例内的 远端 PE发送,其中所述封装后的报文的隧道源地址为所述虚拟 PE的 IP地址。 处理方式 305-1  305. The first PE encapsulates the encapsulated packet according to the type of the Ethernet frame, and encapsulates the encapsulated packet to the virtual PE in the first VPLS instance. The remote source PE sends the encapsulated source address of the encapsulated packet as the IP address of the virtual PE. Processing method 305-1
当该以太帧为已知目的地单播以太帧时,第一 PE使用该虚拟 PE的 IP地 址作为隧道源地址以及使用目的远端 PE的 IP地址作为隧道目的地址对该以 太帧进行封装, 向所述目的远端 PE发送封装后的报文, 其中, 该目的远端 PE为该第一 VPLS实例的 MAC转发表中该以太帧的目的 MAC地址对应的 下一跳 PE; When the Ethernet frame is a known destination unicast Ethernet frame, the first PE uses the IP address of the virtual PE as the tunnel source address and the IP address of the destination remote PE as the tunnel destination address. The packet is encapsulated, and the encapsulated packet is sent to the destination remote PE. The destination remote PE is the next hop PE corresponding to the destination MAC address of the Ethernet frame in the MAC forwarding table of the first VPLS instance. ;
其中, 封装为 VPLS数据封装, 该封装后的报文携带该目的远端 PE为第 一 VPLS实例分配的 VPLS标签,并且标签类型为下游分配标签,使得接收到 该报文的目的远端 PE能够识别出隧道中封装的报文属于哪个 VPLS实例。  The encapsulation is a VPLS data encapsulation, and the encapsulated packet carries the VPLS label allocated by the destination remote PE to the first VPLS instance, and the label type is a downstream allocation label, so that the destination remote PE that receives the packet can Indicates which VPLS instance the packet encapsulated in the tunnel belongs to.
处理方式 305-2  Processing method 305-2
当该以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如 果该第一 VPLS 实例釆用入口复制方式, 对该以太帧进行复制, 得到数量与 该虚拟 PE在该第一 VPLS实例内的远端 PE的数量相同的多个该以太帧; 对 该多个以太帧分别进行封装得到多个封装后的报文, 其中, 每个该封装后的 文的隧道源地址均为该虚拟 PE的 IP地址, 每个该封装后的>¾文的隧道目 的地址为该远端 PE中的一个 PE的 IP地址,该多个封装后的 ^艮文的隧道目的 地址互不相同; 根据该多个封装后的报文的隧道目的地址发送该多个封装后 的报文;  If the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the ingress replication mode, the Ethernet frame is copied, and the number is obtained with the virtual PE. A plurality of the Ethernet frames of the same number of the remote PEs in the first VPLS instance are encapsulated to obtain a plurality of encapsulated packets, where the tunnel source address of each encapsulated text is obtained. The IP addresses of the virtual PEs, and the tunnel destination address of each of the encapsulated packets is the IP address of a PE in the remote PE, and the tunnel destination addresses of the plurality of encapsulated packets are not mutually And sending the plurality of encapsulated packets according to the tunnel destination address of the plurality of encapsulated packets;
由于此时第一 VPLS 实例釆用了入口复制方式, 因此需要对接收到的以 太帧进行复制, 以获取与该虚拟 PE在该第一 VPLS实例内的远端 PE的数量 相同的多个该以太帧, 以分别进行封装, 并向各个远端 PE发送。  The first VPLS instance uses the ingress replication mode. Therefore, the received Ethernet frame needs to be replicated to obtain the same number of remote Ethernets as the virtual PE in the first VPLS instance. Frames are encapsulated separately and sent to each remote PE.
此外, 可选地, 每个封装后的报文携带相应远端 PE为第一 VPLS实例分 配的 VPLS 标签, 并且标签类型为下游分配标签, 使得接收到该报文的远端 PE能够识别出隧道中封装的报文属于哪个 VPLS实例。  In addition, each encapsulated packet carries a VPLS label allocated by the corresponding remote PE to the first VPLS instance, and the label type is a downstream allocation label, so that the remote PE that receives the packet can identify the tunnel. Which VPLS instance the encapsulated packet belongs to.
在本实施例中, 对于远端 PE来说, 接收到的封装后的报文的隧道源地址 为虚拟 PE的 IP地址, 无论该报文是由虚拟 PE对应的 RG中的哪个成员 PE 转发,远端 PE在进行 MAC地址学习时,都会将虚拟 PE作为上述 MAC地址 的下一跳 PE, 即保证 MAC转发表的稳定性。  In this embodiment, for the remote PE, the tunnel source address of the received encapsulated packet is the IP address of the virtual PE, and the packet is forwarded by the PE of the RG corresponding to the virtual PE. When the remote PE performs MAC address learning, the virtual PE is used as the next hop PE of the MAC address, that is, the stability of the MAC forwarding table is guaranteed.
处理方式 305-3  Treatment method 305-3
当该以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如 果该第一 VPLS实例釆用非聚合组播树方式,第一 PE使用该虚拟 PE的 IP地 址作为隧道源地址以及使用该第一 VPLS实例对应的组播树的组播 IP地址作 为隧道目的地址对该以太帧进行封装, 向加入到所述组播树中的所述第一 PE 以外的 PE发送该封装后的报文; 其中, 当第二 PE接收到该封装后的报文后, 丟弃该封装后的报文。 If the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the non-aggregated multicast tree mode, the first PE uses the IP address of the virtual PE as a tunnel. The source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance are encapsulated as the tunnel destination address, and the Ethernet frame is encapsulated and sent to the PE other than the first PE added to the multicast tree. Encapsulated message; After receiving the encapsulated packet, the second PE discards the encapsulated packet.
其中, 非聚合组播树方式是指对于一个 VPLS 实例来说, 都有一个组播 树与之对应, VPLS实例与组播树是——对应的关系。  The non-aggregated multicast tree mode has a multicast tree corresponding to a VPLS instance, and the VPLS instance and the multicast tree are corresponding relationships.
由于 VPLS实例与组播树是——对应的关系,则无需携带 VPLS标签,接 收到封装后的 ^艮文的 PE即可以通过 ^艮文的目的组播 IP地址获知该 文属于 哪个 VPLS实例。  Because the VPLS instance and the multicast tree are in the corresponding relationship, the VPLS label does not need to be carried. The PE that receives the encapsulated packet can know which VPLS instance the file belongs to by using the destination multicast IP address.
进一步地, 第一 PE将以太帧发送到第二 PE上, 使得第二 PE使用虚拟 PE的 IP地址作为隧道源地址以及使用第一 VPLS实例对应的组播树的组播 IP 地址作为隧道目的地址对该以太帧进行封装, 通过与所述第一 VPLS 实例对 应的组播树向加入到所述组播树中的所述第二 PE以外的 PE发送经该第二 PE 封装后的报文。  Further, the first PE sends the Ethernet frame to the second PE, so that the second PE uses the IP address of the virtual PE as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address. Encapsulating the Ethernet frame, and transmitting, by the multicast tree corresponding to the first VPLS instance, a packet encapsulated by the second PE to a PE other than the second PE that is added to the multicast tree.
需要说明的是, 第一 PE和第二 PE为虚拟 PE对应的 RG的成员 PE, 该 第一 PE和第二 PE之间的以太帧交互可以通过第一 PE和第二 PE之间的通信 接口进行。  It should be noted that the first PE and the second PE are member PEs of the RG corresponding to the virtual PE, and the Ethernet frame interaction between the first PE and the second PE may be through the communication interface between the first PE and the second PE. get on.
处理方式 305-4  Processing method 305-4
当该以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如 果该第一 VPLS实例釆用聚合组播树方式, 使用该虚拟 PE的 IP地址作为隧 道源地址以及使用该第一 VPLS实例对应的组播树的组播 IP地址作为隧道目 的地址对该以太帧进行封装, 该封装后的报文携带第一 VPLS 标签, 该第一 VPLS标签为该虚拟 PE为该第一 VPLS实例分配的 VPLS标签,该第一 VPLS 标签的标签类型为上游分配标签, 向加入到组播树中的第一 PE以外的 PE发 送所述封装后的报文;  If the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the aggregate multicast tree mode, the IP address of the virtual PE is used as the tunnel source address and used. The multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet carries the first VPLS label, where the first VPLS label is the virtual PE. a VPLS label allocated by a VPLS instance, where the label type of the first VPLS label is an upstream label, and the encapsulated packet is sent to a PE other than the first PE that is added to the multicast tree.
其中, 聚合组播树方式是指多个 VPLS实例共用一个组播树, VPLS实例 与组播树是多对一的关系。  In the aggregation multicast tree mode, multiple VPLS instances share a multicast tree. The VPLS instance and the multicast tree have a many-to-one relationship.
由于在该聚合组播树方式中, VPLS实例与组播树是多对一的关系, 因此 需要将虚拟 PE为该第一 VPLS实例分配的第一 VPLS标签携带在封装后的报 文中, 以便接收到封装后的报文的 PE能够获知该报文属于哪个 VPLS实例。 而在应用非聚合组播树方法时, 则可以不携带第一 VPLS标签。  In the aggregated multicast tree mode, the VPLS instance is in a multi-to-one relationship with the multicast tree, so that the first VPLS label allocated by the virtual PE for the first VPLS instance is carried in the encapsulated packet, so that The PE that receives the encapsulated packet can know which VPLS instance the packet belongs to. When the non-aggregation multicast tree method is applied, the first VPLS label may not be carried.
进一步地, 该第一 PE将该以太帧发送到该第二 PE上, 使得该第二 PE 使用该虚拟 PE的 IP地址作为该隧道源地址以及使用该第一 VPLS实例对应 的组播树的组播 IP地址作为隧道目的地址对该以太帧进行封装, 封装后的报 文携带第一 VPLS标签, 该第一 VPLS标签为该虚拟 PE为该第一 VPLS实例 分配的 VPLS标签,该第一 VPLS标签的标签类型为上游分配标签,通过与该 第一 VPLS实例对应的组播树向加入到该组播树中的该第二 PE以外的 PE发 送经该第二 PE封装后的报文。 第一 PE和第二 PE为虚拟 PE对应的 RG的成 员 PE, 该第一 PE和第二 PE之间的以太帧交互可以通过第一 PE和第二 PE 之间的通信接口进行。 Further, the first PE sends the Ethernet frame to the second PE, so that the second PE uses the IP address of the virtual PE as the tunnel source address and the group of the multicast tree corresponding to the first VPLS instance. The broadcast IP address is encapsulated as the tunnel destination address, and the encapsulated packet is encapsulated. The first VPLS label carries the first VPLS label, and the first VPLS label is a VPLS label that is allocated to the first VPLS instance, and the label type of the first VPLS label is an upstream allocation label, and the group corresponding to the first VPLS instance is configured. The broadcast tree sends the packet encapsulated by the second PE to the PEs other than the second PE that are added to the multicast tree. The first PE and the second PE are member PEs of the RG corresponding to the virtual PE, and the Ethernet frame interaction between the first PE and the second PE may be performed through a communication interface between the first PE and the second PE.
依照本实施所述的方法,第一 PE使用包括所述第一 PE和所述第二 PE的 RG对应的所述虚拟 PE的 IP地址封装报文, 因此保证了远端 PE接收到该报 文并进行 MAC地址学习的时候, MAC对应的下一跳 PE始终是虚拟 PE , 因 而不会出现下一跳 PE在第一 PE和第二 PE之间跳变,保证了 MAC表稳定性。  According to the method of the present embodiment, the first PE encapsulates the packet by using the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, so that the remote PE receives the packet. When the MAC address learning is performed, the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring stability of the MAC table.
图 4是本发明实施例提供的一种在网络中转发报文的方法的流程图。 该 网络包括: 第三 PE和虚拟 PE , 所述虚拟 PE对应的 RG的成员 PE至少包括 第一 PE和第二 PE,也就是说,所述虚拟 PE包括所述第一 PE和所述第二 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE和该第三 PE都是第一 VPLS实例的 成员 PE, 所述第一 PE为所述 RG中距离所述第三 PE路由最短的成员 PE, 第二 CE是所述第三 PE在第一 VPLS实例内的本地 CE,所述第一 VPLS实例 为中间系统到中间系统 ISIS VPLS实例。 现以作为虚拟 PE的远端 PE的第三 PE接收到报文为例进行说明, 参见图 4, 该实施例包括以下内容:  FIG. 4 is a flowchart of a method for forwarding a message in a network according to an embodiment of the present invention. The network includes: a third PE and a virtual PE, where the member PE of the RG corresponding to the virtual PE includes at least a first PE and a second PE, that is, the virtual PE includes the first PE and the second The PE, the virtual PE has an IP address, and the virtual PE and the third PE are both member PEs of the first VPLS instance, and the first PE is the member PE of the RG that is the shortest route from the third PE. The second CE is a local CE of the third PE in the first VPLS instance, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance. The third PE that is the remote PE of the virtual PE receives the packet as an example. Referring to FIG. 4, the embodiment includes the following content:
401、 第三 PE接收到从该第二 CE发送过来的以太帧。  401. The third PE receives an Ethernet frame sent from the second CE.
可选地, 在该步骤 401之前, 该实施例还包括: 第三 PE接收该虚拟 PE 中的任一个或多个成员 PE通过路由协议发布的该虚拟 PE的 IP地址对应的路 由可达性信息; 第三 PE接收由作为主用 PE的第一 PE代表该虚拟 PE发布的 该 RG对应的 VPLS实例的可达性信息,该 VPLS实例的可达性信息至少包括 该 RG对应的 VPLS实例的 VPLS 标识和该虚拟 PE为该 VPLS实例分配的 VPLS标签以及虚拟 PE的 IP地址。  Optionally, before the step 401, the embodiment further includes: the third PE receives the route reachability information corresponding to the IP address of the virtual PE that is advertised by the one or more member PEs of the virtual PE by using the routing protocol. The third PE receives the reachability information of the VPLS instance corresponding to the RG that is advertised by the first PE that is the primary PE, and the reachability information of the VPLS instance includes at least the VPLS of the VPLS instance corresponding to the RG. The VPLS label assigned to the VPLS instance and the IP address of the virtual PE.
402、 所述第三 PE使用所述虚拟 PE的 IP地址或者第一 VPLS实例对应 的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 并将封装 后的报文发送给所述虚拟 PE,使得所述虚拟 PE对应的 RG的成员 PE接收到 所述封装后的报文并进行解封装, 并将解封装后的报文转发给第一 CE, 所述 第一 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 并且所述第一 CE以 MC-LAG方式分别和所述第一 PE和所述第二 PE相连。 所述第一 PE 为所述 RG中距离所述第三 PE路由最短的成员 PE。 处理方式 402-1 The third PE encapsulates the Ethernet frame by using the IP address of the virtual PE or the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address, and sends the encapsulated packet. Giving the virtual PE, the member PE of the RG corresponding to the virtual PE, receiving the encapsulated packet, decapsulating the packet, and forwarding the decapsulated packet to the first CE, the first CE The local CE of the virtual PE is in the first VPLS instance, and the first CE is connected to the first PE and the second PE in an MC-LAG manner. The first PE Routing the shortest member PE for the third PE from the RG. Processing method 402-1
当该以太帧为已知目的地单播以太帧时,如果该以太帧的目的 MAC地址 对应的下一跳为该虚拟 PE, 则该第三 PE使用该虚拟 PE的 IP地址作为隧道 目的地址以及使用该第三 PE的 IP地址作为隧道源地址对该以太帧进行封装 , 封装后的>¾文携带第一 VPLS标签, 该第一 VPLS标签为该虚拟 PE为该第一 VPLS实例分配的 VPLS标签,该第一 VPLS标签的标签类型为下游分配标签, 将该封装后的报文发送给该第一 PE, 使得该第一 PE接收该封装后的报文并 进行解封装, 并将解封装后的报文转发给第一 CE, 该第一 CE为该虚拟 PE 在该第一 VPLS实例内的本地 CE。  If the Ethernet frame is a known destination unicast Ethernet frame, if the next hop corresponding to the destination MAC address of the Ethernet frame is the virtual PE, the third PE uses the IP address of the virtual PE as the tunnel destination address and The IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame, and the encapsulated > PDU carries the first VPLS label, and the first VPLS label is the VPLS label allocated by the virtual PE to the first VPLS instance. The label type of the first VPLS label is a downstream label, and the encapsulated packet is sent to the first PE, so that the first PE receives the encapsulated packet and decapsulates the packet, and decapsulates the packet. The packet is forwarded to the first CE, and the first CE is the local CE of the virtual PE in the first VPLS instance.
需要说明的是, 该封装后的报文会被虚拟 PE或 RG中距离所述第三 PE 路由最短的成员 PE收到。  It should be noted that the encapsulated packet is received by the shortest member PE of the virtual PE or RG from the third PE.
在本实施例中,仅以第一 PE为虚拟 PE对应的 RG中距离第三 PE路由最 短的成员 PE为例进行说明。  In this embodiment, only the first PE is the member PE of the RG corresponding to the virtual PE and the shortest route from the third PE.
处理方式 402-2  Processing method 402-2
当该以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如 果该第一 VPLS实例釆用入口复制方式, 则该第三 PE对该以太帧进行复制, 得到数量与该第三 PE在该第一 VPLS实例内的远端 PE的数量相同的多个该 以太帧; 对该多个以太帧分别进行封装得到多个封装后的报文, 其中, 每个 该封装后的 文的隧道源地址均为该第三 PE的 IP地址, 每个该封装后的才艮 文的隧道目的地址为该第三 PE的远端 PE中的一个 PE的 IP地址, 该多个封 装后的报文的隧道目的地址互不相同;将封装后的报文发送给对应的远端 PE, 使得该第一 PE接收隧道目的地址为该虚拟 PE的 IP地址的封装后的报文并进 行解封装, 并将解封装后的报文转发给该第一 CE, 其中该隧道目的地址为该 虚拟 PE的 IP地址的封装后的报文携带第一 VPLS标签, 该第一 VPLS标签 为该虚拟 PE为该第一 VPLS实例分配的 VPLS标签, 该第一 VPLS标签的标 签类型为下游分配标签。  If the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the ingress replication mode, the third PE copies the Ethernet frame to obtain the quantity and And the plurality of Ethernet frames in the first VPLS instance are the same number of the Ethernet frames; and the plurality of Ethernet frames are respectively encapsulated to obtain a plurality of encapsulated packets, where each of the encapsulated packets The source address of the tunnel is the IP address of the third PE, and the tunnel destination address of each encapsulated packet is the IP address of a PE in the remote PE of the third PE. The tunnel destination address of the subsequent packet is different from each other; the encapsulated packet is sent to the corresponding remote PE, so that the first PE receives the encapsulated packet whose destination address is the IP address of the virtual PE and performs the encapsulation. Decapsulating, and forwarding the decapsulated packet to the first CE, where the encapsulated packet whose destination address is the IP address of the virtual PE carries the first VPLS label, where the first VPLS label is the virtual PE is the first V The VPLS label assigned by the PLS instance. The label type of the first VPLS label is the downstream allocation label.
需要说明的是, 该封装后的报文会被虚拟 PE或 RG中距离所述第三 PE 路由最短的成员 PE收到。  It should be noted that the encapsulated packet is received by the shortest member PE of the virtual PE or RG from the third PE.
在本实施例中,仅以第一 PE为虚拟 PE对应的 RG中距离第三 PE路由最 短的成员 PE为例进行说明。 In this embodiment, only the first PE is the RG in the virtual PE corresponding to the third PE route. The short member PE is described as an example.
处理方式 402-3  Processing method 402-3
当该第一 PE为主用 PE,该第二 PE为备用 PE,该第一 PE加入到与该第 一 VPLS对应的组播树, 并且该以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果第一 VPLS实例釆用非聚合组播树方式, 该第三 PE 使用该第一 VPLS实例对应的组播树的组播 IP地址作为隧道目的地址以及使 用该第三 PE的 IP地址作为隧道源地址对该以太帧进行封装, 将封装后的报 文通过与该第一 VPLS实例对应的组播树进行转发,使得该第一 PE接收该封 装后的报文并进行解封装, 并将解封装后的报文转发给该第一 CE。  When the first PE is the primary PE, the second PE is the standby PE, the first PE is added to the multicast tree corresponding to the first VPLS, and the Ethernet frame is an unknown destination unicast Ethernet frame, multicast If the first VPLS instance is in the non-aggregated multicast tree mode, the third PE uses the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address and uses the first The IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame, and the encapsulated packet is forwarded by the multicast tree corresponding to the first VPLS instance, so that the first PE receives the encapsulated packet and The decapsulation is performed, and the decapsulated packet is forwarded to the first CE.
处理方式 402-4  Processing method 402-4
当该第一 PE为主用 PE,该第二 PE为备用 PE,该第一 PE加入到与该第 一 VPLS对应的组播树, 并且该以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果该第一 VPLS实例釆用聚合组播树方式, 该第三 PE 使用该第一 VPLS实例对应的组播树的组播 IP地址作为隧道目的地址以及使 用该第三 PE的 IP地址作为隧道源地址对该以太帧进行封装, 封装后的报文 携带第三 VPLS标签, 该第三 VPLS标签为该第三 PE为该第一 VPLS实例分 配的 VPLS标签,该第三 VPLS标签的标签类型为上游分配标签,将该封装后 的报文通过组播树进行转发,使得该第一 PE接收该封装后的报文并进行解封 装, 并将解封装后的报文转发给该第一 CE。  When the first PE is the primary PE, the second PE is the standby PE, the first PE is added to the multicast tree corresponding to the first VPLS, and the Ethernet frame is an unknown destination unicast Ethernet frame, multicast If the first VPLS instance is in the aggregate multicast tree mode, the third PE uses the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address and uses the first The IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame. The encapsulated packet carries the third VPLS label, and the third VPLS label is the VPLS label allocated by the third PE to the first VPLS instance. The label type of the VPLS label is an upstream label, and the encapsulated packet is forwarded through the multicast tree, so that the first PE receives the encapsulated packet and decapsulates the packet, and decapsulates the packet. Forwarded to the first CE.
另外, 由于聚合组播树方式中, VPLS实例与组播树是多对一的关系, 则 封装后的报文携带第三 VPLS标签, 该第三 VPLS标签为该第三 PE为该第一 VPLS实例分配的 VPLS标签,该第三 VPLS标签的标签类型为上游分配标签, 以便接收到封装后的报文的 PE获知该报文是来自哪个 VPLS实例。  In addition, in the aggregation multicast tree mode, the VPLS instance is in a many-to-one relationship with the multicast tree, and the encapsulated packet carries the third VPLS label, and the third VPLS label is the third PE is the first VPLS. The VPLS label is assigned by the instance. The label type of the third VPLS label is an upstream label. The PE that receives the encapsulated packet knows which VPLS instance the packet comes from.
需要说明的是, 可选地, 在聚合或非聚合组播树方式下, 当第一 PE为主 用 PE, 而第二 PE为备用 PE时, 由于第二 PE也可能已加入到第一 VPLS实 例对应的组播树中, 则第一 PE和第二 PE都已加入到与该第一 VPLS对应的 组播树时, 为了避免第一 CE接收到从第二 PE转发过来重复的报文, 当该第 二 PE在从第一 VPLS对应的组播树接收到封装后的报文后,丟弃该封装后的 文。 可选地, 当作为主用 PE的第一 PE出现故障时, 该第二 PE切换为主 用 PE后, 如果该第二 PE通过该第一 VPLS对应的组播树接收到该封装后的 报文,第二 PE解封装该封装后的报文并将解封装后的报文转发给该第一 CE。 依照本实施所述的方法, 由于在虚拟 PE对应的 RG的成员 PE中, 只有 一个成员 PE接收从第三 PE发送过来的封装报文并将该报文解封装后转发给 第一 CE, 避免第一 CE接收到重复的报文。 图 5是本发明实施例提供的一种第一运营商边缘设备的结构示意图。 该 第一运营商边缘设备(英文全称为 Provider Edge, 英文缩写为 PE )属于一个 冗余组(英文全称为 Redundancy Group, 英文缩写为 RG ), 所述 RG还包括 第二 PE, 该 RG对应一个虚拟 PE, , 也就是说, 所述虚拟 PE包括所述第一 PE和所述第二 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE是第一虚拟专用 局域网服务(英文全称为 Virtual Private Local Area Network Service, 英文缩写 为 VPLS ) 实例的成员 PE, 所述第一 VPLS实例为 (英文全称为 Intermediate System- Intermediate System, 英文简称为 ISIS ) VPLS实例, 第一用户边缘 设备(英文全称为 Custom Edge,英文缩写为 CE )为所述虚拟 PE在第一 VPLS 实例内的本地 CE。 参见图 5, 该第一 PE包括: It should be noted that, in the aggregated or non-aggregated multicast tree mode, when the first PE is the primary PE and the second PE is the standby PE, the second PE may also join the first VPLS. In the multicast tree corresponding to the instance, when the first PE and the second PE are added to the multicast tree corresponding to the first VPLS, in order to prevent the first CE from receiving the repeated packets forwarded from the second PE, After receiving the encapsulated packet from the multicast tree corresponding to the first VPLS, the second PE discards the encapsulated packet. Optionally, after the second PE that is the primary PE fails, the second PE is switched to the primary PE, and the second PE receives the encapsulated report by using the multicast tree corresponding to the first VPLS. The second PE decapsulates the encapsulated packet and forwards the decapsulated packet to the first CE. According to the method of the present embodiment, in the member PE of the RG corresponding to the virtual PE, only one member PE receives the encapsulated packet sent from the third PE, and decapsulates the packet and forwards the packet to the first CE, thereby avoiding The first CE receives the duplicated message. FIG. 5 is a schematic structural diagram of a first carrier edge device according to an embodiment of the present invention. The first carrier edge device (English Provider Edge, abbreviated as PE) belongs to a redundancy group (English name is Redundancy Group, abbreviated as RG), and the RG further includes a second PE, and the RG corresponds to one Virtual PE, that is, the virtual PE includes the first PE and the second PE, the virtual PE has an IP address, and the virtual PE is a first virtual private local area network service (English name is Virtual Private) The local area network service (abbreviated as VPLS) is the member PE of the instance. The first VPLS instance is the VPLS instance of the Intermediate System-Intermediate System (English). The first user edge device (English full name is Custom) Edge, abbreviated as CE, is the local CE of the virtual PE in the first VPLS instance. Referring to FIG. 5, the first PE includes:
第一接收模块 501 , 用于接收来自所述第一 CE的以太帧;  The first receiving module 501 is configured to receive an Ethernet frame from the first CE.
第一发送模块 502, 用于根据所述以太帧的类型,对所述以太帧进行封装 得到封装后的报文, 并将所述封装后的报文向所述虚拟 PE在所述第一 VPLS 实例内的远端 PE发送, 其中所述封装后的 文的隧道源地址为所述虚拟 PE 的 IP地址。  The first sending module 502 is configured to encapsulate the encapsulated packet according to the type of the Ethernet frame, and encapsulate the encapsulated packet to the virtual PE in the first VPLS. The remote PE is sent by the instance, where the tunnel source address of the encapsulated text is the IP address of the virtual PE.
可选地, 所述第一接收模块 501 的功能由第一物理接收端口实现, 所述 第一发送模块 502 的功能由第一物理电路实现的, 所述第一物理电路包括第 一处理器和第一物理发送端口, 所述第一处理器用于执行所述第一发送模块 502 中的所述封装处理, 所述第一物理发送端口用于执行所述第一发送模块 502中的所述发送处理。  Optionally, the function of the first receiving module 501 is implemented by a first physical receiving port, and the function of the first sending module 502 is implemented by a first physical circuit, where the first physical circuit includes a first processor and a first physical sending port, where the first processor is configured to perform the encapsulating process in the first sending module 502, where the first physical sending port is configured to perform the sending in the first sending module 502 deal with.
可选地, 所述第一发送模块 502包括下述单元中的一个或多个: 第一发送单元, 用于当所述以太帧为已知目的地单播以太帧时, 使用所 述虚拟 PE的 IP地址作为所述隧道源地址以及使用目的远端 PE的 IP地址作 为隧道目的地址对所述以太帧进行封装,向所述目的远端 PE发送封装后的报 文, 其中, 所述目的远端 PE为所述第一 VPLS实例的 MAC转发表中所述以 太帧的目的 MAC地址对应的下一跳 PE。 可选地, 所述第一发送单元用于执 行 "处理方式 305-1" 的内容。 第二发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用入口复制方式, 对所述以 太帧进行复制, 得到数量与所述虚拟 PE在所述第一 VPLS实例内的远端 PE 的数量相同的多个所述以太帧; 对所述多个以太帧分别进行封装得到多个封 装后的报文, 其中, 每个所述封装后的报文的隧道源地址均为所述虚拟 PE的 IP地址, 每个所述封装后的 文的隧道目的地址为所述远端 PE中的一个 PE 的 IP地址, 所述多个封装后的 4艮文的隧道目的地址互不相同; 才艮据所述多个 封装后的报文的隧道目的地址发送所述多个封装后的报文。 可选地, 所述第 二发送单元用于执行 "处理方式 305-2" 的内容。 Optionally, the first sending module 502 includes one or more of the following units: a first sending unit, configured to use the virtual PE when the Ethernet frame is a known destination unicast Ethernet frame The IP address is used as the tunnel source address and the IP address of the destination remote PE is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the destination remote PE, where the destination is far The end PE is the next hop PE corresponding to the destination MAC address of the Ethernet frame in the MAC forwarding table of the first VPLS instance. Optionally, the first sending unit is configured to execute the content of the “processing mode 305-1”. a second sending unit, configured to: if the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an ingress copy mode, perform the Copying, obtaining a plurality of the Ethernet frames having the same number of remote PEs as the virtual PE in the first VPLS instance; and encapsulating the multiple Ethernet frames to obtain a plurality of encapsulated packets The tunnel source address of each encapsulated packet is an IP address of the virtual PE, and the tunnel destination address of each encapsulated packet is an IP of a PE in the remote PE. The address, the tunnel destination address of the plurality of encapsulated packets is different from each other; and the plurality of encapsulated packets are sent according to the tunnel destination address of the plurality of encapsulated packets. Optionally, the second sending unit is configured to execute the content of the “processing mode 305-2”.
第三发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用非聚合组播树方式, 使用 所述虚拟 PE的 IP地址作为所述隧道源地址以及使用所述第一 VPLS实例对 应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 向加入 到所述组播树中的所述第一 PE以外的 PE发送所述封装后的 文。 可选地, 所述第三发送单元用于执行 "处理方式 305-3" 的内容。  a third sending unit, configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses a non-aggregated multicast tree mode, use the The IP address of the virtual PE is used as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the Ethernet frame and join the multicast tree. The PE other than the first PE sends the encapsulated text. Optionally, the third sending unit is configured to execute the content of the “processing mode 305-3”.
第四发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用聚合组播树方式, 使用所 述虚拟 PE的 IP地址作为所述隧道源地址以及使用所述第一 VPLS实例对应 的组播树的组播 IP地址作为隧道目的地址对所述报文进行封装, 所述封装后 的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS标签的标签类型为上游分配标 签,向加入到所述组播树中的所述第一 PE以外的 PE发送所述封装后的 4艮文。 可选地, 所述第四发送单元用于执行 "处理方式 305-4" 的内容。  a fourth sending unit, configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an aggregate multicast tree mode, use the virtual The IP address of the PE is used as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the packet, and the encapsulated packet carries the first packet. a VPLS label, the first VPLS label is a VPLS label allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is an upstream allocation label, and is added to the multicast tree. The PE other than the first PE sends the encapsulated packet. Optionally, the fourth sending unit is configured to execute the content of the “processing mode 305-4”.
可选地, 所述第一发送单元、 第二发送单元、 第三发送单元和第四发送 单元中的每个单元的功能均是由所述第一处理器和第一物理发送端口实现 的。  Optionally, the functions of each of the first sending unit, the second sending unit, the third sending unit, and the fourth sending unit are all implemented by the first processor and the first physical sending port.
可选地, 所述第三发送单元还用于将所述以太帧发送到所述第二 PE上, 使得所述第二 PE使用所述虚拟 PE的 IP地址作为隧道源地址以及使用所述第 一 VPLS实例对应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进 行封装, 通过与所述第一 VPLS 实例对应的组播树向加入到所述组播树中的 所述第二 PE以外的 PE发送经所述第二 PE封装后的报文。 可选地,所述第四发送单元,还用于将所述以太帧发送到所述第二 PE上, 使得所述第二 PE使用所述虚拟 PE的 IP地址作为所述隧道源地址以及使用所 述第一 VPLS实例对应的组播树的组播 IP地址作为隧道目的地址对所述以太 帧进行封装, 经所述第二 PE封装后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第 一 VPLS标签的标签类型为上游分配标签,通过与所述第一 VPLS实例对应的 组播树向加入到所述组播树中的所述第二 PE以外的 PE发送所述经所述第二 PE封装后的报文。 Optionally, the third sending unit is further configured to send the Ethernet frame to the second PE, so that the second PE uses an IP address of the virtual PE as a tunnel source address, and uses the Encapsulating the Ethernet frame with the multicast IP address of the multicast tree corresponding to the VPLS instance as the tunnel destination address, and adding the multicast tree corresponding to the first VPLS instance to the multicast tree The PE other than the second PE sends the packet encapsulated by the second PE. Optionally, the fourth sending unit is further configured to send the Ethernet frame to the second PE, so that the second PE uses an IP address of the virtual PE as the tunnel source address and uses The multicast IP address of the multicast tree corresponding to the first VPLS instance encapsulates the Ethernet frame as a tunnel destination address, and the packet encapsulated by the second PE carries a first VPLS label, where the first VPLS The label is a VPLS label that is allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is an upstream allocation label, and is added to the foregoing by a multicast tree corresponding to the first VPLS instance. A PE other than the second PE in the multicast tree sends the packet encapsulated by the second PE.
可选地, 所述第一运营商边缘设备还包括:  Optionally, the first carrier edge device further includes:
第一获取模块 503 , 用于获取 RG信息, 所述 RG信息包括所述 RG对应 的所述虚拟 PE的 IP地址、 所述 RG对应的所述第一 VPLS实例的 VPLS 标 识、 所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签和 /或属于所述 RG 的其他成员 PE的 IP地址;  The first obtaining module 503 is configured to obtain RG information, where the RG information includes an IP address of the virtual PE corresponding to the RG, a VPLS identifier of the first VPLS instance corresponding to the RG, and the virtual PE is The IP address of the VPLS label assigned by the first VPLS instance and/or other member PEs belonging to the RG;
发布模块 504,用于通过路由协议发布所述虚拟 PE的 IP地址对应的路由 可达性信息;  a publishing module 504, configured to advertise routing reachability information corresponding to an IP address of the virtual PE by using a routing protocol;
所述发布模块 504, 还用于当确定所述运营商边缘设备为主用 PE后, 发 布所述第一 VPLS实例的可达性信息,所述第一 VPLS实例的可达性信息包括 所述 RG对应的 VPLS实例的 VPLS 标识和所述虚拟 PE为所述 VPLS实例分 配的 VPLS标签以及虚拟 PE的 IP地址。  The issuing module 504 is further configured to: after determining that the operator edge device is the primary PE, advertise the reachability information of the first VPLS instance, where the reachability information of the first VPLS instance includes the The VPLS identifier of the VPLS instance corresponding to the RG and the virtual PE are the VPLS label allocated by the VPLS instance and the IP address of the virtual PE.
可选地, 所述第一获取模块 503 的功能是由第二物理电路实现的, 所述 第二物理电路可以包括第二物理接收端口, 以便接收 RG信息。所述第二物理 接收端口可以与所述第一物理接收端口是同一个端口, 也可以是不同的端口。 所述第二物理电路还可以进一步包括第二处理器, 以便识别出 RG信息。所述 第二处理器可以与所述第一处理器是同一个处理器, 也可以是不同的处理器。  Optionally, the function of the first obtaining module 503 is implemented by a second physical circuit, and the second physical circuit may include a second physical receiving port to receive the RG information. The second physical receiving port may be the same port as the first physical receiving port, or may be a different port. The second physical circuit may further include a second processor to identify the RG information. The second processor may be the same processor as the first processor, or may be a different processor.
可选地, 所述第一 PE还包括:  Optionally, the first PE further includes:
主备协商模块 505,用于与所述第二 PE确定主用 PE和备用 PE。可选地, 所述主备协商模块 505的功能由一个处理器实现。  The active/standby negotiation module 505 is configured to determine an active PE and a standby PE with the second PE. Optionally, the function of the active/standby negotiation module 505 is implemented by one processor.
在本实施例中, 第一 PE使用包括所述第一 PE和所述第二 PE的 RG对应 的所述虚拟 PE的 IP地址封装 ^艮文,因此保证了远端 PE接收到该 ^艮文并进行 MAC地址学习的时候, MAC对应的下一跳 PE始终是虚拟 PE , 因而不会出 现下一跳 PE在第一 PE和第二 PE之间跳变, 保证了 MAC表稳定性。 在本发明的一个实施例中, 一种第一运营商边缘设备 (英文全称为In this embodiment, the first PE encapsulates the IP address of the virtual PE corresponding to the RG of the first PE and the second PE, thereby ensuring that the remote PE receives the packet When the MAC address is learned, the next hop PE corresponding to the MAC is always a virtual PE. Therefore, the next hop PE does not jump between the first PE and the second PE, ensuring the stability of the MAC table. In an embodiment of the present invention, a first carrier edge device (English full name
Provider Edge, 英文缩写为 PE )属于一个冗余组(英文全称为 Redundancy Group, 英文缩写为 RG ), 所述 RG还包括第二 PE, 该 RG对应一个虚拟 PE, 也就是说, 所述虚拟 PE包括所述第一 PE和所述第二 PE, 所述虚拟 PE具有 IP地址,所述虚拟 PE是第一虚拟专用局域网服务(英文全称为 Virtual Private Local Area Network Service, 英文缩写为 VPLS ) 实例的成员 PE, 所述第一 VPLS实例为 (英文全称为 Intermediate System- Intermediate System, 英文简 称为 ISIS ) VPLS实例, 第一用户边缘设备 (英文全称为 Custom Edge, 英文 缩写为 CE ) 为所述虚拟 PE在第一 VPLS实例内的本地 CE。 Provider Edge (abbreviated as PE) belongs to a redundancy group (English name is Redundancy Group, abbreviated as RG), and the RG further includes a second PE, where the RG corresponds to a virtual PE, that is, the virtual PE The first PE and the second PE, where the virtual PE has an IP address, and the virtual PE is an instance of a first virtual private local area network service (hereinafter referred to as VPLS) The member PE, the first VPLS instance is a VPLS instance of the Intermediate System-Intermediate System (ISIS), and the first user edge device (referred to as Custom Edge in English, CE) is the virtual PE. Local CE within the first VPLS instance.
所述第一 PE包括以下内容。  The first PE includes the following content.
获取模块, 用于获取 RG信息, 所述 RG信息包括所述 RG对应的所述虚 拟 PE的 IP地址、 所述 RG对应的所述第一 VPLS实例的 VPLS 标识、 所述 虚拟 PE为所述第一 VPLS实例分配的 VPLS标签和 /或属于所述 RG的其他成 员 PE的 IP地址。 可选地, 所述获取模块用于执行图 3a所示的步骤 301。  An acquiring module, configured to obtain RG information, where the RG information includes an IP address of the virtual PE corresponding to the RG, a VPLS identifier of the first VPLS instance corresponding to the RG, and the virtual PE is the The VPLS label assigned by a VPLS instance and/or the IP address of other member PEs belonging to the RG. Optionally, the obtaining module is configured to perform step 301 shown in Figure 3a.
发布模块, 用于通过路由协议发布所述虚拟 PE的 IP地址对应的路由可 达性信息。 可选地, 所述发布模块用于执行图 3a所示的步骤 302。  And a publishing module, configured to advertise the route reachability information corresponding to the IP address of the virtual PE by using a routing protocol. Optionally, the publishing module is configured to perform step 302 shown in Figure 3a.
所述发布模块还用于当确定所述运营商边缘设备为主用 PE后,发布所述 第一 VPLS 实例的可达性信息, 所述第一 VPLS实例的可达性信息包括所述 RG对应的 VPLS实例的 VPLS 标识和所述虚拟 PE为所述 VPLS实例分配的 VPLS标签以及虚拟 PE的 IP地址。 可选地, 所述发布模块还用于执行图 3a 所示的步骤 303。  The issuance module is further configured to: after determining that the operator edge device is the primary PE, advertise the reachability information of the first VPLS instance, where the reachability information of the first VPLS instance includes the RG corresponding The VPLS identifier of the VPLS instance and the VPLS label assigned by the virtual PE to the VPLS instance and the IP address of the virtual PE. Optionally, the publishing module is further configured to perform step 303 shown in Figure 3a.
所述第一 PE用于在第一 VPLS实例中形成了一个包括第一 PE和第二 PE 的 RG以及所述 RG对应的虚拟 PE, 并且向网络中的其他设备发送了 VPLS 实例和虚拟 PE的信息, 以便于第一 PE使用包括所述第一 PE和所述第二 PE 的 RG对应的所述虚拟 PE的 IP地址封装 ^艮文,从而保证了远端 PE接收到该 才艮文并进行 MAC地址学习的时候, MAC对应的下一跳 PE始终是虚拟 PE , 这样就不会出现下一跳 PE在第一 PE和第二 PE之间跳变,保证了 MAC表稳 定性。 因此所述第一 PE可以用于帮助保证 MAC表稳定性。  The first PE is configured to form an RG including the first PE and the second PE and a virtual PE corresponding to the RG in the first VPLS instance, and send the VPLS instance and the virtual PE to other devices in the network. The information is such that the first PE uses the IP address of the virtual PE corresponding to the RG of the first PE and the second PE to encapsulate the packet, thereby ensuring that the remote PE receives the packet and performs the packet. When the MAC address is learned, the next hop PE corresponding to the MAC is always a virtual PE, so that the next hop PE does not jump between the first PE and the second PE, ensuring the stability of the MAC table. Therefore the first PE can be used to help ensure MAC table stability.
图 6是本发明实施例提供的一种第三运营商边缘设备的结构示意图。 所 述第三运营商边缘设备(PE )用于在网络中使用, 所述网络除了包括所述第 三运营商边缘设备 ( PE )之外, 还包括虚拟 PE, 所述虚拟 PE对应的 RG的 成员 PE包括第一 PE和第二 PE, 也就是说, 所述虚拟 PE包括所述第一 PE 和所述第二 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE和所述第三 PE都是 第一 VPLS实例的成员 PE, 所述第一 PE为所述 RG中距离所述第三 PE路由 最短的成员 PE, 第二 CE是所述第三 PE在第一 VPLS实例内的本地 CE, 所 述第一 VPLS实例为中间系统到中间系统 ISIS VPLS实例。所述第三 PE包括: 第二接收模块 601 , 用于接收到从所述第二 CE发送过来的以太帧; 第二发送模块 602,用于使用所述虚拟 PE的 IP地址或者第一 VPLS实例 对应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 并将 封装后的报文发送给所述虚拟 PE,使得所述虚拟 PE对应的 RG的成员 PE接 收到所述封装后的报文并进行解封装, 并将解封装后的报文转发给第一 CE, 所述第一 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 并且所述 第一 CE以 MC-LAG方式分别和所述第一 PE和所述第二 PE相连。 FIG. 6 is a schematic structural diagram of a third carrier edge device according to an embodiment of the present invention. The third carrier edge device (PE) is used in a network, the network including the In addition to the third carrier edge device (PE), the virtual PE also includes a virtual PE, and the member PE of the RG corresponding to the virtual PE includes a first PE and a second PE, that is, the virtual PE includes the first PE and The second PE, the virtual PE has an IP address, and the virtual PE and the third PE are both member PEs of the first VPLS instance, and the first PE is the third PE of the RG. The second CE is the local CE of the third PE in the first VPLS instance, and the first VPLS instance is the intermediate system to the intermediate system ISIS VPLS instance. The third PE includes: a second receiving module 601, configured to receive an Ethernet frame sent from the second CE; and a second sending module 602, configured to use an IP address of the virtual PE or a first VPLS instance The multicast IP address of the corresponding multicast tree is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the virtual PE, so that the member PE of the RG corresponding to the virtual PE receives the The encapsulated packet is decapsulated and decapsulated, and the decapsulated packet is forwarded to the first CE, where the first CE is the local CE of the virtual PE in the first VPLS instance, and the The first CE is connected to the first PE and the second PE in an MC-LAG manner.
可选地, 所述第二接收模块 601和所述第二发送模块 602分别用于执行 图 4所示的步骤 401和 402。  Optionally, the second receiving module 601 and the second sending module 602 are respectively configured to perform steps 401 and 402 shown in FIG.
本实施例中所述第一 PE为所述 RG中距离所述第三 PE路由最短的成员 The first PE in the embodiment is the shortest member of the third PE route in the RG.
PE。 PE.
可选地, 所述第二接收模块 601 的功能由第三物理接收端口实现, 所述 第二发送模块 602 的功能由第三物理电路实现的, 所述第三物理电路包括第 三处理器和第三物理发送端口, 所述第三处理器用于执行所述第二接收模块 602 中的所述封装处理, 所述第三物理发送端口用于执行所述第二发送模块 602中的所述发送处理。  Optionally, the function of the second receiving module 601 is implemented by a third physical receiving port, and the function of the second sending module 602 is implemented by a third physical circuit, where the third physical circuit includes a third processor and a third physical sending port, where the third processor is configured to perform the encapsulating process in the second receiving module 602, where the third physical sending port is configured to perform the sending in the second sending module 602 deal with.
可选地, 所述第二发送模块 602包括以下单元中的一个或多个: 第五发送单元, 用于当所述以太帧为已知目的地单播以太帧时, 如果所 述以太帧的目的 MAC地址对应的下一跳 PE为所述虚拟 PE,则使用所述虚拟 PE的 IP地址作为隧道目的地址以及使用所述第三运营商边缘设备的 IP地址 作为隧道源地址对所述以太帧进行封装, 封装后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS 标签的标签类型为下游分配标签, 将所述封装后的报文发送 给所述第一 PE, 使得所述第一 PE接收所述封装后的报文并进行解封装, 并 将解封装后的报文转发给所述第一 CE。 可选地, 所述第五发送单元用于执行 所述 "处理方式 402-1"。 Optionally, the second sending module 602 includes one or more of the following units: a fifth sending unit, configured to: when the Ethernet frame is a known destination unicast Ethernet frame, if the Ethernet frame is If the next hop PE corresponding to the destination MAC address is the virtual PE, the IP address of the virtual PE is used as the tunnel destination address, and the IP address of the third carrier edge device is used as the tunnel source address to the Ethernet frame. Encapsulating, the encapsulated packet carries a first VPLS label, the first VPLS label is a VPLS label allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is a downstream label. Sending the encapsulated packet to the first PE, so that the first PE receives the encapsulated packet and decapsulates the packet, and forwards the decapsulated packet to the first packet. CE. Optionally, the fifth sending unit is configured to perform The "processing mode 402-1".
第六发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用入口复制方式, 则对所述 以太帧进行复制, 得到数量与所述第三运营商边缘设备在所述第一 VPLS 实 例内的远端 PE的数量相同的多个所述以太帧;对所述多个以太帧分别进行封 装得到多个封装后的报文, 其中, 每个所述封装后的报文的隧道源地址均为 所述第三运营商边缘设备的 IP地址, 每个所述封装后的报文的隧道目的地址 为所述第三运营商边缘设备的远端 PE中的一个 PE的 IP地址,所述多个封装 后的报文的隧道目的地址互不相同; 将封装后的报文发送给对应的远端 PE, 并进行解封装, 并将解封装后的报文转发给所述第一 CE, 其中所述隧道目的 地址为所述虚拟 PE的 IP地址的封装后的报文携带第一 VPLS标签, 所述第 一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述 第一 VPLS 标签的标签类型为下游分配标签。 可选地, 所述第六发送单元用 于执行所述 "处理方式 402-2"。  a sixth sending unit, configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an ingress copy mode, the Ethernet frame is used Performing the copying to obtain a plurality of the Ethernet frames that are the same as the number of the remote PEs in the first VPLS instance of the third carrier edge device; and separately encapsulating the multiple Ethernet frames to obtain multiple The encapsulated packet, wherein the tunnel source address of each encapsulated packet is an IP address of the third carrier edge device, and the tunnel destination address of each encapsulated packet is The IP address of a PE in the remote PE of the third carrier edge device, and the tunnel destination address of the plurality of encapsulated packets are different from each other; and the encapsulated packet is sent to the corresponding remote PE. And performing decapsulation, and forwarding the decapsulated packet to the first CE, where the encapsulated packet whose destination address is the IP address of the virtual PE carries the first VPLS label, where a VPLS label For the VPLS label that is allocated to the first VPLS instance by the virtual PE, the label type of the first VPLS label is a downstream allocation label. Optionally, the sixth sending unit is configured to execute the "processing mode 402-2".
第七发送单元, 用于所述第一 PE为主用 PE, 所述第二 PE为备用 PE, 所述第一 PE加入到与所述第一 VPLS对应的组播树, 并且所述以太帧为未知 目的地单播以太帧、 组播以太帧或广播以太帧时, 如果第一 VPLS 实例釆用 非聚合组播树方式,使用所述第一 VPLS实例对应的组播树的组播 IP地址作 为隧道目的地址以及使用所述第三运营商边缘设备的 IP地址作为隧道源地址 对所述以太帧进行封装, 将封装后的报文通过与所述第一 VPLS 实例对应的 组播树进行转发, 使得所述第一 PE接收所述封装后的报文并进行解封装, 并 将解封装后的报文转发给所述第一 CE。 可选地, 所述第七发送单元用于执行 所述 "处理方式 402-3"。  a seventh sending unit, configured to: the first PE is a primary PE, the second PE is a standby PE, the first PE is added to a multicast tree corresponding to the first VPLS, and the Ethernet frame is When unicasting an Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame for an unknown destination, if the first VPLS instance uses the non-aggregated multicast tree mode, the multicast IP address of the multicast tree corresponding to the first VPLS instance is used. Encapsulating the Ethernet frame as a tunnel destination address and using an IP address of the third carrier edge device as a tunnel source address, and forwarding the encapsulated packet to a multicast tree corresponding to the first VPLS instance The first PE receives the encapsulated packet and decapsulates the packet, and forwards the decapsulated packet to the first CE. Optionally, the seventh sending unit is configured to execute the “processing mode 402-3”.
第八发送单元, 用于当所述第一 PE为主用 PE, 所述第二 PE为备用 PE, 所述第一 PE加入到与所述第一 VPLS对应的组播树, 并且所述以太帧为未知 目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS 实例 釆用聚合组播树方式, 使用所述第一 VPLS实例对应的组播树的组播 IP地址 作为隧道目的地址以及使用所述第三运营商边缘设备的 IP地址作为隧道源地 址对所述以太帧进行封装,封装后的报文携带第三 VPLS标签,所述第三 VPLS 标签为所述第三运营商边缘设备为所述第一 VPLS实例分配的 VPLS标签,所 述第三 VPLS 标签的标签类型为上游分配标签, 将所述封装后的报文通过组 播树进行转发, 使得所述第一 PE接收所述封装后的报文并进行解封装, 并将 解封装后的报文转发给所述第一 CE。 可选地, 所述第八发送单元用于执行所 述 "处理方式 402-4"。 An eighth sending unit, configured to: when the first PE is a primary PE, the second PE is a standby PE, the first PE is added to a multicast tree corresponding to the first VPLS, and the ether is If the frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the aggregate multicast tree mode, the multicast of the multicast tree corresponding to the first VPLS instance is used. The IP address is used as the tunnel destination address and the IP address of the edge device of the third carrier is used as the tunnel source address to encapsulate the Ethernet frame, and the encapsulated packet carries a third VPLS label, where the third VPLS label is a VPLS label allocated by the third carrier edge device to the first VPLS instance. The label type of the third VPLS label is an upstream label, and the encapsulated packet is forwarded by the multicast tree, so that the first PE receives the encapsulated packet and decapsulates the packet. The encapsulated packet is forwarded to the first CE. Optionally, the eighth sending unit is configured to execute the “processing mode 402-4”.
可选地, 所述第五发送单元、 第六发送单元、 第七发送单元和第八发送 单元中的每个单元的功能均是由所述第三处理器和第三物理发送端口实现 的。 可选地, 所述第三运营商边缘设备还包括:  Optionally, the functions of each of the fifth sending unit, the sixth sending unit, the seventh sending unit, and the eighth sending unit are all implemented by the third processor and the third physical sending port. Optionally, the third carrier edge device further includes:
第三接收模块 603 , 用于接收所述虚拟 PE中的任一个或多个成员 PE通 过路由协议发布的所述虚拟 PE的 IP地址对应的路由可达性信息;  The third receiving module 603 is configured to receive route reachability information corresponding to the IP address of the virtual PE that is advertised by the PE or the member PE through the routing protocol;
所述第三接收模块 603 , 还用于接收由作为主用 PE的所述第一 PE发布 的所述 RG对应的 VPLS实例的可达性信息,所述 VPLS实例的可达性信息包 括所述 RG对应的 VPLS实例的 VPLS 标识,所述虚拟 PE为所述 VPLS实例 分配的 VPLS标签以及所述虚拟 PE的 IP地址。  The third receiving module 603 is further configured to receive reachability information of the VPLS instance corresponding to the RG that is advertised by the first PE that is the primary PE, where the reachability information of the VPLS instance includes the VPLS identifier of the VPLS instance corresponding to the RG, the virtual PE is a VPLS label allocated by the VPLS instance and an IP address of the virtual PE.
可选地, 所述第三接收模块 603 的功能由一个第四物理接收端口实现, 所述第四物理接收端口可以与所述第三物理接收端口是相同的端口, 也可以 是不同的端口。  Optionally, the function of the third receiving module 603 is implemented by a fourth physical receiving port, and the fourth physical receiving port may be the same port as the third physical receiving port, or may be a different port.
在本实施中, 由于在虚拟 PE对应的 RG的成员 PE中, 只有一个成员 PE 接收从第三 PE发送过来的封装报文并将该报文解封装后转发给第一 CE, 避 免第一 CE接收到重复的报文。 本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通 过硬件来完成, 也可以通过程序来指令相关的硬件完成, 所述的程序可以存 储于一种计算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。  In this implementation, the member CE of the RG corresponding to the virtual PE receives only the encapsulated packet sent from the third PE, and decapsulates the packet and forwards the packet to the first CE to avoid the first CE. Received duplicate messages. A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明 的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发 明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权 利 要 求 Rights request
1、一种在网络中转发报文的方法, 其特征在于, 所述网络包括: 第一运营 商边缘设备 PE、 第二 PE, 所述第一 PE和所述第二 PE属于一个冗余组 RG, 所述 RG对应一个虚拟 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE是第一 虚拟专用局域网服务 VPLS实例的成员 PE, 所述第一 VPLS实例为中间系统 到中间系统 ISIS VPLS实例, 第一用户边缘设备 CE为所述虚拟 PE在所述第 一 VPLS实例内的本地 CE,所述第一 CE以跨框链路聚合组 MC-LAG方式分 别和所述第一 PE和所述第二 PE相连, 所述方法包括: A method for forwarding a packet in a network, the network includes: a first carrier edge device PE, a second PE, and the first PE and the second PE belong to a redundancy group RG, the RG corresponds to a virtual PE, the virtual PE has an IP address, the virtual PE is a member PE of the first virtual private local area network service VPLS instance, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance. The first user edge device CE is the local CE of the virtual PE in the first VPLS instance, and the first CE is in the inter-frame link aggregation group MC-LAG manner and the first PE and the The second PE is connected, and the method includes:
所述第一 PE接收来自所述第一 CE的以太帧;  The first PE receives an Ethernet frame from the first CE;
所述第一 PE根据所述以太帧的类型,对所述以太帧进行封装得到封装后 的报文, 并将所述封装后的报文向所述虚拟 PE在所述第一 VPLS实例内的远 端 PE发送, 其中所述封装后的报文的隧道源地址为所述虚拟 PE的 IP地址。  The first PE encapsulates the encapsulated packet according to the type of the Ethernet frame, and encapsulates the encapsulated packet into the virtual PE in the first VPLS instance. The remote PE sends, where the tunnel source address of the encapsulated packet is the IP address of the virtual PE.
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一 PE根据所述以 太帧的类型, 对所述以太帧进行封装得到封装后的报文, 并将所述封装后的 报文向所述虚拟 PE在所述第一 VPLS实例内的远端 PE发送, 具体包括: 当所述以太帧为已知目的地单播以太帧时, 使用所述虚拟 PE的 IP地址 作为所述隧道源地址以及使用目的远端 PE的 IP地址作为隧道目的地址对所 述以太帧进行封装, 向所述目的远端 PE发送封装后的报文, 其中, 所述目的 远端 PE为所述第一 VPLS实例的 MAC转发表中所述以太帧的目的 MAC地 址对应的下一 ϋ PE; The method according to claim 1, wherein the first PE encapsulates the Ethernet frame according to the type of the Ethernet frame, and obtains the encapsulated packet, and encapsulates the encapsulated packet. And sending, by the virtual PE, the remote PE in the first VPLS instance, specifically: when the Ethernet frame is a known destination unicast Ethernet frame, using the IP address of the virtual PE as the The tunnel source address and the IP address of the destination remote PE are used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the destination remote PE, where the destination remote PE is the The next ϋ PE corresponding to the destination MAC address of the Ethernet frame in the MAC forwarding table of a VPLS instance;
和 /或,  and / or,
当所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS 实例釆用入口复制方式, 对所述以太帧进行复制, 得到 数量与所述虚拟 PE在所述第一 VPLS实例内的远端 PE的数量相同的多个所 述以太帧; 对所述多个以太帧分别进行封装得到多个封装后的报文, 其中, 每个所述封装后的报文的隧道源地址均为所述虚拟 PE的 IP地址, 每个所述 封装后的 ^艮文的隧道目的地址为所述远端 PE中的一个 PE的 IP地址,所述多 个封装后的报文的隧道目的地址互不相同; 根据所述多个封装后的报文的隧 道目的地址发送所述多个封装后的报文;  When the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the ingress copy mode, the Ethernet frame is copied, and the quantity is obtained. a plurality of the Ethernet frames of the same number of the remote PEs in the first VPLS instance; the plurality of Ethernet frames are respectively encapsulated to obtain a plurality of encapsulated packets, where each of the The tunnel source address of the encapsulated packet is the IP address of the virtual PE, and the tunnel destination address of each encapsulated packet is the IP address of a PE in the remote PE. The tunnel destination addresses of the encapsulated packets are different from each other; the plurality of encapsulated packets are sent according to the tunnel destination address of the plurality of encapsulated packets;
和 /或, 当所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS实例釆用非聚合组播树方式, 使用所述虚拟 PE的 IP地 址作为所述隧道源地址以及使用所述第一 VPLS实例对应的组播树的组播 IP 地址作为隧道目的地址对所述以太帧进行封装, 向加入到所述组播树中的所 述第一 PE以外的 PE发送所述封装后的报文; and / or, When the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses a non-aggregated multicast tree mode, the IP address of the virtual PE is used as the Encapsulating the Ethernet frame with the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance as a tunnel destination address, and adding to the first PE in the multicast tree The PE sends the encapsulated packet;
和 /或,  and / or,
当所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS实例釆用聚合组播树方式, 使用所述虚拟 PE的 IP地址 作为所述隧道源地址以及使用所述第一 VPLS实例对应的组播树的组播 IP地 址作为隧道目的地址对所述以太帧进行封装, 所述封装后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配 的 VPLS标签,所述第一 VPLS标签的标签类型为上游分配标签,向加入到所 述组播树中的所述第一 PE以外的 PE发送所述封装后的报文。  When the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an aggregate multicast tree mode, the IP address of the virtual PE is used as the The tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance are used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet carries the first VPLS label, where the first The VPLS label is a VPLS label that is allocated to the first VPLS instance by the virtual PE, and the label type of the first VPLS label is an upstream allocation label, and is added to the first PE that is added to the multicast tree. The PE sends the encapsulated packet.
3、 根据权利要求 2所述的方法, 其特征在于, 3. The method of claim 2, wherein
当所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS实例釆用非聚合组播树方式, 使用所述虚拟 PE的 IP地 址作为所述隧道源地址以及使用所述第一 VPLS实例对应的组播树的组播 IP 地址作为隧道目的地址对所述以太帧进行封装, 向加入到所述组播树中的所 述第一 PE以外的 PE发送所述封装后的报文, 还包括:  When the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses a non-aggregated multicast tree mode, the IP address of the virtual PE is used as the Encapsulating the Ethernet frame with the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance as a tunnel destination address, and adding to the first PE in the multicast tree After the PE sends the encapsulated packet, the PE further includes:
所述第一 PE将所述以太帧发送到所述第二 PE上, 使得所述第二 PE使 用所述虚拟 PE的 IP地址作为隧道源地址以及使用所述第一 VPLS实例对应 的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 通过与所 述第一 VPLS实例对应的组播树向加入到所述组播树中的所述第二 PE以外的 PE发送经所述第二 PE封装后的报文;  The first PE sends the Ethernet frame to the second PE, so that the second PE uses the IP address of the virtual PE as the tunnel source address and uses the multicast tree corresponding to the first VPLS instance. The multicast IP address is encapsulated as the tunnel destination address, and the Ethernet frame is encapsulated by the multicast tree corresponding to the first VPLS instance to be sent to the PE other than the second PE added to the multicast tree. The packet encapsulated by the second PE;
和 /或,  and / or,
当所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS实例釆用聚合组播树方式, 使用所述虚拟 PE的 IP地址 作为所述隧道源地址以及使用所述第一 VPLS实例对应的组播树的组播 IP地 址作为隧道目的地址对所述以太帧进行封装, 所述封装后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配 的 VPLS标签,所述第一 VPLS标签的标签类型为上游分配标签,向加入到所 述组播树中的所述第一 PE以外的 PE发送所述封装后的报文, 还包括: When the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an aggregate multicast tree mode, the IP address of the virtual PE is used as the The tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance are used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet carries the first VPLS label, where the first The VPLS label is that the virtual PE is allocated to the first VPLS instance. The VPLS label, the label type of the first VPLS label is an upstream allocation label, and the encapsulated packet is sent to a PE other than the first PE that is added to the multicast tree, and the method further includes:
所述第一 PE将所述以太帧发送到所述第二 PE上, 使得所述第二 PE使 用所述虚拟 PE的 IP地址作为所述隧道源地址以及使用所述第一 VPLS实例 对应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 经所 述第二 PE封装后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚 拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS标签的标签 类型为上游分配标签, 通过与所述第一 VPLS 实例对应的组播树向加入到所 述组播树中的所述第二 PE以外的 PE发送所述经所述第二 PE封装后的>¾文。  Sending, by the first PE, the Ethernet frame to the second PE, so that the second PE uses the IP address of the virtual PE as the tunnel source address and the group corresponding to the first VPLS instance. The multicast IP address of the broadcast tree is used as the tunnel destination address to encapsulate the Ethernet frame, and the packet encapsulated by the second PE carries the first VPLS label, where the first VPLS label is the virtual PE. a VPLS label allocated by the first VPLS instance, the label type of the first VPLS label is an upstream allocation label, and the second is added to the multicast tree by using a multicast tree corresponding to the first VPLS instance. The PE other than the PE sends the >3⁄4 text after the second PE encapsulation.
4、 根据权利要求 1所述的方法, 其特征在于, 在所述第一 PE接收来自 所述第一 CE的以太帧之前, 包括: The method according to claim 1, wherein before the first PE receives the Ethernet frame from the first CE, the method includes:
所述第一 PE获取 RG信息, 所述 RG信息包括所述 RG对应的所述虚拟 PE的 IP地址、所述 RG对应的所述第一 VPLS实例的 VPLS 标识、所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签和 /或属于所述 RG的其他成员 PE 的 IP地址;  The first PE acquires RG information, where the RG information includes an IP address of the virtual PE corresponding to the RG, a VPLS identifier of the first VPLS instance corresponding to the RG, and the virtual PE is the first a VPLS label assigned by a VPLS instance and/or an IP address of another member PE belonging to the RG;
所述第一 PE通过路由协议发布所述虚拟 PE的 IP地址对应的路由可达性 信息;  The first PE advertises route reachability information corresponding to the IP address of the virtual PE by using a routing protocol;
所述第一 PE在确定所述第一 PE为主用 PE后, 发布所述第一 VPLS实 例的可达性信息,所述第一 VPLS实例的可达性信息包括所述 RG对应的 VPLS 拟 PE的 IP地址。  After the first PE determines the first PE as the primary PE, the privilege information of the first VPLS instance is advertised, and the reachability information of the first VPLS instance includes the VPLS corresponding to the RG. IP address of the PE.
5、 一种在网络中转发报文的方法, 其特征在于, 所述网络包括: 第三 PE 和虚拟 PE, 所述虚拟 PE对应的 RG的成员 PE包括第一 PE和第二 PE, 所述 虚拟 PE具有 IP地址, 所述虚拟 PE和所述第三 PE都是第一 VPLS实例的成 员 PE, 所述第一 VPLS实例为中间系统到中间系统 ISIS VPLS实例, 所述第 一 PE为所述 RG中距离所述第三 PE路由最短的成员 PE, 第二 CE是所述第 三 PE在第一 VPLS实例内的本地 CE, 所述方法包括: A method for forwarding a packet in a network, where the network includes: a third PE and a virtual PE, where the member PE of the RG corresponding to the virtual PE includes a first PE and a second PE, The virtual PE has an IP address, and the virtual PE and the third PE are both member PEs of the first VPLS instance, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the first PE is the The SG is the local CE that is the shortest member of the third PE, and the second CE is the local CE of the third PE in the first VPLS instance, and the method includes:
所述第三 PE接收到从所述第二 CE发送过来的以太帧;  Receiving, by the third PE, an Ethernet frame sent from the second CE;
所述第三 PE使用所述虚拟 PE的 IP地址或者第一 VPLS实例对应的组播 树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 并将封装后的报 文发送给所述虚拟 PE,使得所述虚拟 PE对应的 RG的成员 PE接收到所述封 装后的报文并进行解封装, 并将解封装后的报文转发给第一 CE, 所述第一 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 并且所述第一 CE以 跨框链路聚合组 MC-LAG方式分别和所述第一 PE和所述第二 PE相连。 The third PE uses the IP address of the virtual PE or the multicast corresponding to the first VPLS instance. The multicast IP address of the tree is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the virtual PE, so that the member PE of the RG corresponding to the virtual PE receives the encapsulated And decapsulating the packet, and forwarding the decapsulated packet to the first CE, where the first CE is the local CE of the virtual PE in the first VPLS instance, and the first CE is The inter-frame link aggregation group MC-LAG mode is respectively connected to the first PE and the second PE.
6、 根据权利要求 5所述的方法, 其特征在于, 所述第三 PE使用所述虚 拟 PE的 IP地址或者第一 VPLS实例对应的组播树的组播 IP地址作为隧道目 的地址对所述以太帧进行封装, 并将封装后的报文发送给所述虚拟 PE, 使得 所述虚拟 PE对应的 RG的成员 PE接收到所述封装后的报文并进行解封装, 并将解封装后的报文转发给第一 CE, 具体包括: The method according to claim 5, wherein the third PE uses the IP address of the virtual PE or the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address pair. Encapsulating the Ethernet frame, and sending the encapsulated packet to the virtual PE, so that the member PE of the RG corresponding to the virtual PE receives the encapsulated packet and decapsulates the packet, and decapsulates the packet. The packet is forwarded to the first CE, including:
当所述以太帧为已知目的地单播以太帧时, 如果所述以太帧的目的 MAC 地址对应的下一跳 PE为所述虚拟 PE, 则所述第三 PE使用所述虚拟 PE的 IP 地址作为隧道目的地址以及使用所述第三 PE的 IP地址作为隧道源地址对所 述以太帧进行封装,封装后的报文携带第一 VPLS标签,所述第一 VPLS标签 为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS标 签的标签类型为下游分配标签, 将所述封装后的报文发送给所述第一 PE, 使 得所述第一 PE接收所述封装后的报文并进行解封装,并将解封装后的报文转 发给所述第一 CE;  When the Ethernet frame is a known destination unicast Ethernet frame, if the next hop PE corresponding to the destination MAC address of the Ethernet frame is the virtual PE, the third PE uses the IP of the virtual PE. The address is used as the tunnel destination address, and the IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame. The encapsulated packet carries the first VPLS label, and the first VPLS label is the virtual PE. The VPLS label allocated by the first VPLS instance, the label type of the first VPLS label is a downstream allocation label, and the encapsulated packet is sent to the first PE, so that the first PE receives the Encapsulating the packet and decapsulating the packet, and forwarding the decapsulated packet to the first CE;
当所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS实例釆用入口复制方式, 则所述第三 PE对所述以太帧进 行复制, 得到数量与所述第三 PE在所述第一 VPLS实例内的远端 PE的数量 相同的多个所述以太帧; 对所述多个以太帧分别进行封装得到多个封装后的 报文, 其中, 每个所述封装后的报文的隧道源地址均为所述第三 PE的 IP地 址, 每个所述封装后的 文的隧道目的地址为所述第三 PE的远端 PE中的一 个 PE的 IP地址, 所述多个封装后的 ^艮文的隧道目的地址互不相同; 将封装 后的报文发送给对应的远端 PE, 使得所述第一 PE接收隧道目的地址为所述 虚拟 PE的 IP地址的封装后的报文并进行解封装, 并将解封装后的报文转发 给所述第一 CE, 其中所述隧道目的地址为所述虚拟 PE的 IP地址的封装后的 报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS标签的标签类型为下游分配标 佥; When the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the ingress replication mode, the third PE replicates the Ethernet frame. And obtaining, by the plurality of the Ethernet frames, the number of the remote PEs of the third PE in the first VPLS instance, and encapsulating the plurality of Ethernet frames to obtain a plurality of encapsulated packets. The tunnel source address of each encapsulated packet is the IP address of the third PE, and the tunnel destination address of each encapsulated document is the remote PE of the third PE. The IP address of a PE, the tunnel destination address of the multiple encapsulated packets is different from each other; the encapsulated packet is sent to the corresponding remote PE, so that the first PE receives the tunnel destination address as The encapsulated packet of the IP address of the virtual PE is decapsulated, and the decapsulated packet is forwarded to the first CE, where the tunnel destination address is an encapsulation of the IP address of the virtual PE. The subsequent packet carries the first VPLS label, and the first VPLS label The virtual PE is assigned to the first VPLS VPLS instance tag, the first tag type VPLS downstream label distribution standard 佥
当所述第一 ΡΕ为主用 ΡΕ, 所述第二 ΡΕ为备用 ΡΕ, 所述第一 ΡΕ加入到 与所述第一 VPLS对应的组播树, 并且所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果第一 VPLS 实例釆用非聚合组播树方式, 所述第三 PE使用所述第一 VPLS实例对应的组播树的组播 IP地址作为隧道 目的地址以及使用所述第三 PE的 IP地址作为隧道源地址对所述以太帧进行 封装, 将封装后的报文通过与所述第一 VPLS 实例对应的组播树进行转发, 使得所述第一 PE接收所述封装后的报文并进行解封装,并将解封装后的报文 转发给所述第一 CE;  When the first ΡΕ is the primary ΡΕ, the second ΡΕ is the standby ΡΕ, the first ΡΕ is added to the multicast tree corresponding to the first VP LS, and the Ethernet frame is an unknown destination unicast If the first VPLS instance is in the non-aggregated multicast tree mode, the third PE uses the multicast IP address of the multicast tree corresponding to the first VPLS instance as the Ethernet frame. Encapsulating the Ethernet frame with the tunnel destination address and using the IP address of the third PE as the tunnel source address, and forwarding the encapsulated packet to the multicast tree corresponding to the first VPLS instance, so that the The first PE receives the encapsulated packet and decapsulates the packet, and forwards the decapsulated packet to the first CE;
当所述第一 PE为主用 PE, 所述第二 PE为备用 PE, 所述第一 PE加入到 与所述第一 VPLS对应的组播树, 并且所述以太帧为未知目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS实例釆用聚合组播树方式, 所述第三 PE使用所述第一 VPLS实例对应的组播树的组播 IP地址作为隧道 目的地址以及使用所述第三 PE的 IP地址作为隧道源地址对所述以太帧进行 封装, 封装后的报文携带第三 VPLS标签, 所述第三 VPLS标签为所述第三 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第三 VPLS标签的标签类 型为上游分配标签, 将所述封装后的报文通过组播树进行转发, 使得所述第 一 PE接收所述封装后的报文并进行解封装,并将解封装后的报文转发给所述 第一 CE。  When the first PE is the primary PE, the second PE is the standby PE, the first PE is added to the multicast tree corresponding to the first VPLS, and the Ethernet frame is an unknown destination unicast If the first VPLS instance is in the aggregate multicast tree mode, the third PE uses the multicast IP address of the multicast tree corresponding to the first VPLS instance, in the case of the Ethernet frame, the multicast Ethernet frame, or the broadcast Ethernet frame. Encapsulating the Ethernet frame as a tunnel destination address and using the IP address of the third PE as a tunnel source address, the encapsulated packet carrying a third VPLS label, and the third VPLS label being the third PE The VPLS label allocated by the first VPLS instance, the label type of the third VPLS label is an upstream allocation label, and the encapsulated packet is forwarded through the multicast tree, so that the first PE receives the encapsulation The subsequent packet is decapsulated and the decapsulated packet is forwarded to the first CE.
7、 根据权利要求 5所述的方法, 其特征在于, 在所述第三 PE使用所述 虚拟 PE的 IP地址或者第一 VPLS实例对应的组播树的组播 IP地址作为隧道 目的地址对所述以太帧进行封装, 并将封装后的报文发送给所述虚拟 PE之 后, 所述方法还包括: The method according to claim 5, wherein the third PE uses the IP address of the virtual PE or the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address pair. After the Ethernet frame is encapsulated, and the encapsulated packet is sent to the virtual PE, the method further includes:
当第一 PE为主用 PE, 第二 PE为备用 PE, 且所述第一 PE和第二 PE都 已加入到与所述第一 VPLS对应的组播树时,所述第二 PE在从所述第一 VPLS 对应的组播树接收到所述封装后的报文后, 丟弃所述封装后的报文;  When the first PE is the primary PE and the second PE is the standby PE, and the first PE and the second PE are both added to the multicast tree corresponding to the first VPLS, the second PE is in the secondary PE. After receiving the encapsulated packet, the multicast tree corresponding to the first VPLS discards the encapsulated packet;
和 /或  and / or
当所述第一 PE出现故障, 所述第二 PE切换为主用 PE后, 如果所述第 二 PE通过所述第一 VPLS对应的组播树接收到所述封装后的报文, 所述第二 PE解封装所述封装后的报文并将解封装后的报文转发给所述第一 CE。 After the first PE fails, the second PE switches to the primary PE, and if the second PE receives the encapsulated packet by using the multicast tree corresponding to the first VPLS, The second PE decapsulates the encapsulated packet and forwards the decapsulated packet to the first CE.
8、 根据权利要求 5、 6或 7所述的方法, 其特征在于, 在所述第三 PE接 收到从所述第二 CE发送过来的所述以太帧之前, 所述方法还包括: The method according to claim 5, 6 or 7, wherein, before the third PE receives the Ethernet frame sent from the second CE, the method further includes:
所述第三 PE接收所述虚拟 PE的任一个或多个成员 PE通过路由协议发 布的所述虚拟 PE的 IP地址对应的路由可达性信息;  The third PE receives the route reachability information corresponding to the IP address of the virtual PE that is sent by the PE or the member PE of the virtual PE through the routing protocol;
所述第三 PE接收由作为主用 PE的所述第一 PE发布的所述 RG对应的 VPLS实例的可达性信息, 所述 VPLS实例的可达性信息包括所述 RG对应的 VPLS实例的 VPLS 标识, 所述虚拟 PE为所述 VPLS实例分配的 VPLS标签 以及所述虚拟 PE的 IP地址。  The third PE receives the reachability information of the VPLS instance corresponding to the RG that is advertised by the first PE that is the primary PE, and the reachability information of the VPLS instance includes the VPLS instance corresponding to the RG. VPLS identifier, the virtual PE is a VPLS label allocated by the VPLS instance and an IP address of the virtual PE.
9、 一种第一运营商边缘设备, 其特征在于, 所述第一运营商边缘设备 PE 属于一个冗余组 RG, 所述 RG还包括第二 PE, 所述 RG对应一个虚拟 PE, 所述虚拟 PE具有 IP地址, 所述虚拟 PE是第一 VPLS实例的成员 PE, 所述 第一 VPLS实例为中间系统到中间系统 ISIS VPLS实例, 第一用户边缘设备 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 所述第一 CE以跨框 链路聚合组 MC-LAG方式分别和所述第一 PE和所述第二 PE相连,所述第一 PE包括: A first carrier edge device, wherein the first carrier edge device PE belongs to a redundancy group RG, the RG further includes a second PE, and the RG corresponds to a virtual PE, The virtual PE has an IP address, the virtual PE is a member PE of the first VPLS instance, the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the first user edge device CE is the virtual PE at the first a local CE in a VPLS instance, where the first CE is connected to the first PE and the second PE in an inter-frame link aggregation group MC-LAG manner, where the first PE includes:
第一接收模块, 用于接收来自所述第一 CE的以太帧,  a first receiving module, configured to receive an Ethernet frame from the first CE,
第一发送模块, 用于根据所述以太帧的类型, 对所述以太帧进行封装得 到封装后的报文, 并将所述封装后的报文向所述虚拟 PE在所述第一 VPLS实 例内的远端 PE发送, 其中所述封装后的>¾文的隧道源地址为所述虚拟 PE的 IP地址。  a first sending module, configured to encapsulate the encapsulated packet according to the type of the Ethernet frame, and encapsulate the encapsulated packet to the virtual PE in the first VPLS instance. The remote PE sends the encapsulated source address of the encapsulated >3⁄4 text as the IP address of the virtual PE.
10、 根据权利要求 9所述的第一运营商边缘设备, 其特征在于, 所述第 一发送模块包括下述单元中的一个或多个: 10. The first carrier edge device of claim 9, wherein the first transmitting module comprises one or more of the following:
第一发送单元, 用于当所述以太帧为已知目的地单播以太帧时, 使用所 述虚拟 PE的 IP地址作为所述隧道源地址以及使用目的远端 PE的 IP地址作 为隧道目的地址对所述以太帧进行封装,向所述目的远端 PE发送封装后的报 文, 其中, 所述目的远端 PE为所述第一 VPLS实例的 MAC转发表中所述以 太帧的目的 MAC地址对应的下一跳 PE;  a first sending unit, configured to use the IP address of the virtual PE as the tunnel source address and the IP address of the destination remote PE as the tunnel destination address when the Ethernet frame is a known destination unicast Ethernet frame Encapsulating the Ethernet frame, and sending the encapsulated packet to the destination remote PE, where the destination remote PE is the destination MAC address of the Ethernet frame in the MAC forwarding table of the first VPLS instance. Corresponding next hop PE;
第二发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用入口复制方式, 对所述以 太帧进行复制, 得到数量与所述虚拟 PE在所述第一 VPLS实例内的远端 PE 的数量相同的多个所述以太帧; 对所述多个以太帧分别进行封装得到多个封 装后的报文, 其中, 每个所述封装后的报文的隧道源地址均为所述虚拟 PE的 IP地址, 每个所述封装后的 文的隧道目的地址为所述远端 PE中的一个 PE 的 IP地址, 所述多个封装后的 4艮文的隧道目的地址互不相同; 才艮据所述多个 封装后的报文的隧道目的地址发送所述多个封装后的报文; a second sending unit, configured to: unicast an Ethernet frame, a multicast ethernet when the Ethernet frame is an unknown destination If the first VPLS instance uses the ingress replication mode to copy the Ethernet frame, the number of the remote PEs in the first VPLS instance is the same as the number of the remote PEs in the first VPLS instance. And the plurality of the Ethernet frames are encapsulated to obtain the plurality of encapsulated packets, wherein the tunnel source address of each of the encapsulated packets is the IP of the virtual PE. Address, the tunnel destination address of each of the encapsulated texts is an IP address of a PE in the remote PE, and the tunnel destination addresses of the plurality of encapsulated 4 艮 texts are different from each other; Transmitting the plurality of encapsulated packets by using a tunnel destination address of the plurality of encapsulated packets;
第三发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用非聚合组播树方式, 使用 所述虚拟 PE的 IP地址作为所述隧道源地址以及使用所述第一 VPLS实例对 应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 向加入 到所述组播树中的所述第一 PE以外的 PE发送所述封装后的报文;  a third sending unit, configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses a non-aggregated multicast tree mode, use the The IP address of the virtual PE is used as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the Ethernet frame and join the multicast tree. The PE other than the first PE sends the encapsulated packet;
第四发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用聚合组播树方式, 使用所 述虚拟 PE的 IP地址作为所述隧道源地址以及使用所述第一 VPLS实例对应 的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 所述封装 后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第 一 VPLS实例分配的 VPLS标签,所述第一 VPLS标签的标签类型为上游分配 标签, 向加入到所述组播树中的所述第一 PE以外的 PE发送所述封装后的报 文。  a fourth sending unit, configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an aggregate multicast tree mode, use the virtual The IP address of the PE is used as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet carries the first packet. a VPLS label, the first VPLS label is a VPLS label allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is an upstream allocation label, and is added to the multicast tree. The PE other than the first PE sends the encapsulated packet.
11、 根据权利要求 10所述的第一运营商边缘设备, 其特征在于, 所述第三发送单元还用于将所述以太帧发送到所述第二 PE上,使得所述 第二 PE使用所述虚拟 PE的 IP地址作为隧道源地址以及使用所述第一 VPLS 实例对应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 通过与所述第一 VPLS 实例对应的组播树向加入到所述组播树中的所述第二 PE以外的 PE发送经所述第二 PE封装后的报文; The first carrier edge device according to claim 10, wherein the third sending unit is further configured to send the Ethernet frame to the second PE, so that the second PE uses Encapsulating the Ethernet frame by using the IP address of the virtual PE as the tunnel source address and the multicast IP address of the multicast tree corresponding to the first VPLS instance as the tunnel destination address, and corresponding to the first VPLS instance Transmitting, by the multicast tree, a packet encapsulated by the second PE to a PE other than the second PE that is added to the multicast tree;
所述第四发送单元, 还用于将所述以太帧发送到所述第二 PE上, 使得所 述第二 PE使用所述虚拟 PE的 IP地址作为所述隧道源地址以及使用所述第一 VPLS实例对应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行 封装, 经所述第二 PE封装后的报文携带第一 VPLS标签, 所述第一 VPLS标 签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS 标签的标签类型为上游分配标签, 通过与所述第一 VPLS 实例对应的组播树 向加入到所述组播树中的所述第二 PE以外的 PE发送所述经所述第二 PE封 装后的报文。 The fourth sending unit is further configured to send the Ethernet frame to the second PE, so that the second PE uses an IP address of the virtual PE as the tunnel source address and uses the first The multicast IP address of the multicast tree corresponding to the VPLS instance encapsulates the Ethernet frame as the tunnel destination address, and the packet encapsulated by the second PE carries the first VPLS label, and the first VPLS label The VPLS label that is allocated to the first VPLS instance by the virtual PE, the label type of the first VPLS label is an upstream allocation label, and the multicast tree corresponding to the first VPLS instance is added to the A PE other than the second PE in the multicast tree sends the packet encapsulated by the second PE.
12、 根据权利要求 9所述的第一运营商边缘设备, 其特征在于, 所述第 一 PE包括: The first carrier edge device according to claim 9, wherein the first PE comprises:
第一获取模块, 用于获取 RG信息, 所述 RG信息包括所述 RG对应的所 述虚拟 PE的 IP地址、 所述 RG对应的所述第一 VPLS实例的 VPLS 标识、 所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签和 /或属于所述 RG的其 他成员 PE的 IP地址;  a first acquiring module, configured to acquire RG information, where the RG information includes an IP address of the virtual PE corresponding to the RG, a VPLS identifier of the first VPLS instance corresponding to the RG, and the virtual PE is a The VPLS label allocated by the first VPLS instance and/or the IP address of other member PEs belonging to the RG;
发布模块, 用于通过路由协议发布所述虚拟 PE的 IP地址对应的路由可 达性信息;  a publishing module, configured to advertise a route reachability information corresponding to an IP address of the virtual PE by using a routing protocol;
所述发布模块, 还用于当确定所述第一 PE为主用 PE后, 发布所述第一 VPLS实例的可达性信息, 所述第一 VPLS实例的可达性信息包括所述 RG对 应的 VPLS实例的 VPLS 标识和所述虚拟 PE为所述 VPLS实例分配的 VPLS 标签以及虚拟 PE的 IP地址。  The issuing module is further configured to: after determining that the first PE is a primary PE, advertise the reachability information of the first VPLS instance, where the reachability information of the first VPLS instance includes the RG The VPLS identifier of the VPLS instance and the VPLS label assigned by the virtual PE to the VPLS instance and the IP address of the virtual PE.
13、 一种第三运营商边缘设备, 其特征在于, 所述第三运营商边缘设备 PE用于在网络中使用, 所述网络还包括虚拟 PE , 所述虚拟 PE对应的 RG的 成员 PE包括第一 PE和第二 PE,所述虚拟 PE具有 IP地址,,所述第一 VPLS 实例为中间系统到中间系统 ISIS VPLS实例, 所述虚拟 PE和所述第三 PE都 是第一 VPLS实例的成员 PE, 所述第一 PE为所述 RG中距离所述第三 PE路 由最短的成员 PE, 第二 CE是所述第三 PE在第一 VPLS实例内的本地 CE, 所述第三 PE包括: A third carrier edge device, wherein the third carrier edge device PE is used in a network, the network further includes a virtual PE, and the member PE of the RG corresponding to the virtual PE includes The first PE and the second PE, the virtual PE has an IP address, and the first VPLS instance is an intermediate system to an intermediate system ISIS VPLS instance, and the virtual PE and the third PE are both the first VPLS instance. a member PE, the first PE is a member PE of the RG that is the shortest route from the third PE, and the second CE is a local CE of the third PE in the first VPLS instance, and the third PE includes :
第二接收模块, 用于接收到从所述第二 CE发送过来的以太帧; 第二发送模块, 用于使用所述虚拟 PE的 IP地址或者第一 VPLS实例对 应的组播树的组播 IP地址作为隧道目的地址对所述以太帧进行封装, 并将封 装后的报文发送给所述虚拟 PE,使得所述虚拟 PE对应的 RG的成员 PE接收 到所述封装后的报文并进行解封装, 并将解封装后的报文转发给第一 CE, 所 述第一 CE为所述虚拟 PE在所述第一 VPLS实例内的本地 CE, 并且所述第 一 CE以跨框链路聚合组 MC-LAG方式分别和所述第一 PE和所述第二 PE相 连。 a second receiving module, configured to receive an Ethernet frame sent from the second CE, and a second sending module, configured to use an IP address of the virtual PE or a multicast IP of a multicast tree corresponding to the first VPLS instance The address is used as the tunnel destination address to encapsulate the Ethernet frame, and the encapsulated packet is sent to the virtual PE, so that the member PE of the RG corresponding to the virtual PE receives the encapsulated packet and performs solution. Encapsulating, and forwarding the decapsulated packet to the first CE, where the first CE is a local CE of the virtual PE in the first VPLS instance, and the A CE is connected to the first PE and the second PE in an inter-frame link aggregation group MC-LAG manner.
14、 根据权利要求 13所述的第三运营商边缘设备, 其特征在于, 所述第 二发送模块至少包括以下任一单元: The third carrier edge device according to claim 13, wherein the second sending module comprises at least one of the following units:
第五发送单元, 用于当所述以太帧为已知目的地单播以太帧时, 如果所 述以太帧的目的 MAC地址对应的下一跳 PE为所述虚拟 PE,则使用所述虚拟 PE的 IP地址作为隧道目的地址以及使用所述第三运营商边缘设备的 IP地址 作为隧道源地址对所述以太帧进行封装, 封装后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS 标签的标签类型为下游分配标签, 将所述封装后的报文发送 给所述第一 PE, 使得所述第一 PE接收所述封装后的报文并进行解封装, 并 将解封装后的报文转发给所述第一 CE;  a fifth sending unit, configured to: when the Ethernet frame is a known destination unicast Ethernet frame, if the next hop PE corresponding to the destination MAC address of the Ethernet frame is the virtual PE, use the virtual PE The IP address is used as the tunnel destination address and the IP address of the edge device of the third carrier is used as the tunnel source address to encapsulate the Ethernet frame, and the encapsulated packet carries the first VPLS label, where the first VPLS label is The virtual PE is a VPLS label that is allocated to the first VPLS instance, and the label type of the first VPLS label is a downstream allocation label, and the encapsulated packet is sent to the first PE, so that the first Receiving, by the PE, the encapsulated packet and decapsulating the packet, and forwarding the decapsulated packet to the first CE;
第六发送单元, 用于当所述以太帧为未知目的地单播以太帧、 组播以太 帧或广播以太帧时, 如果所述第一 VPLS 实例釆用入口复制方式, 则对所述 以太帧进行复制, 得到数量与所述第三 PE在所述第一 VPLS 实例内的远端 PE的数量相同的多个所述以太帧; 对所述多个以太帧分别进行封装得到多个 封装后的报文, 其中, 每个所述封装后的报文的隧道源地址均为所述第三 PE 的 IP地址, 每个所述封装后的 ^艮文的隧道目的地址为所述第三 PE的远端 PE 中的一个 PE的 IP地址, 所述多个封装后的 ^艮文的隧道目的地址互不相同; 将所述多个封装后的报文发送给对应的远端 PE, 使得所述第一 PE接收隧道 目的地址为所述虚拟 PE的 IP地址的封装后的报文并进行解封装, 并将解封 装后的报文转发给所述第一 CE, 其中所述隧道目的地址为所述虚拟 PE的 IP 地址的封装后的报文携带第一 VPLS标签, 所述第一 VPLS标签为所述虚拟 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第一 VPLS标签的标签类 型为下游分配标签;  a sixth sending unit, configured to: when the Ethernet frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses an ingress copy mode, the Ethernet frame is used Performing the copying to obtain a plurality of the Ethernet frames having the same number of remote PEs as the third PE in the first VPLS instance; and encapsulating the plurality of Ethernet frames to obtain a plurality of encapsulated a packet, where the tunnel source address of each encapsulated packet is an IP address of the third PE, and the tunnel destination address of each encapsulated packet is the third PE The IP address of a PE in the remote PE, and the tunnel destination addresses of the plurality of encapsulated packets are different from each other; the plurality of encapsulated packets are sent to the corresponding remote PE, so that the The first PE receives the encapsulated packet whose tunnel destination address is the IP address of the virtual PE, decapsulates the packet, and forwards the decapsulated packet to the first CE, where the tunnel destination address is Encapsulation of the IP address of the virtual PE The packet carries the first VPLS label, and the first VPLS label is a VPLS label that is allocated by the virtual PE to the first VPLS instance, and the label type of the first VPLS label is a downstream label.
第七发送单元, 用于所述第一 PE为主用 PE, 所述第二 PE为备用 PE, 所述第一 PE加入到与所述第一 VPLS对应的组播树, 并且所述以太帧为未知 目的地单播以太帧、 组播以太帧或广播以太帧时, 如果第一 VPLS 实例釆用 非聚合组播树方式,使用所述第一 VPLS实例对应的组播树的组播 IP地址作 为隧道目的地址以及使用所述第三 PE的 IP地址作为隧道源地址对所述以太 帧进行封装, 将封装后的报文通过与所述第一 VPLS 实例对应的组播树进行 转发, 使得所述第一 PE接收所述封装后的报文并进行解封装, 并将解封装后 的报文转发给所述第一 CE;; a seventh sending unit, configured to: the first PE is a primary PE, the second PE is a standby PE, the first PE is added to a multicast tree corresponding to the first VPLS, and the Ethernet frame is When unicasting an Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame for an unknown destination, if the first VPLS instance uses the non-aggregated multicast tree mode, the multicast IP address of the multicast tree corresponding to the first VPLS instance is used. As the tunnel destination address and using the IP address of the third PE as the tunnel source address to the ether The frame is encapsulated, and the encapsulated packet is forwarded by the multicast tree corresponding to the first VPLS instance, so that the first PE receives the encapsulated packet and decapsulates the packet, and decapsulates the packet. The message is forwarded to the first CE;
第八发送单元, 用于当所述第一 PE为主用 PE, 所述第二 PE为备用 PE, 所述第一 PE加入到与所述第一 VPLS对应的组播树, 并且所述以太帧为未知 目的地单播以太帧、 组播以太帧或广播以太帧时, 如果所述第一 VPLS 实例 釆用聚合组播树方式, 使用所述第一 VPLS实例对应的组播树的组播 IP地址 作为隧道目的地址以及使用所述第三 PE的 IP地址作为隧道源地址对所述以 太帧进行封装,封装后的报文携带第三 VPLS标签,所述第三 VPLS标签为所 述第三 PE为所述第一 VPLS实例分配的 VPLS标签, 所述第三 VPLS标签的 标签类型为上游分配标签, 将所述封装后的报文通过组播树进行转发, 使得 所述第一 PE接收所述封装后的报文并进行解封装,并将解封装后的报文转发 给所述第一 CE。  An eighth sending unit, configured to: when the first PE is a primary PE, the second PE is a standby PE, the first PE is added to a multicast tree corresponding to the first VPLS, and the ether is If the frame is an unknown destination unicast Ethernet frame, a multicast Ethernet frame, or a broadcast Ethernet frame, if the first VPLS instance uses the aggregate multicast tree mode, the multicast of the multicast tree corresponding to the first VPLS instance is used. The IP address is used as the tunnel destination address, and the IP address of the third PE is used as the tunnel source address to encapsulate the Ethernet frame. The encapsulated packet carries a third VPLS label, and the third VPLS label is the third. The PE is the VPLS label allocated by the first VPLS instance, and the label type of the third VPLS label is an upstream allocation label, and the encapsulated packet is forwarded through the multicast tree, so that the first PE receiving station The encapsulated packet is decapsulated and the decapsulated packet is forwarded to the first CE.
15、 根据权利要求 12、 13或 14所述的第三运营商边缘设备, 其特征在 于, 所述第三运营商边缘设备还包括: The third carrier edge device according to claim 12, 13 or 14, wherein the third carrier edge device further comprises:
第三接收模块, 用于接收所述虚拟 PE中的任一个或多个成员 PE通过路 由协议发布的所述虚拟 PE的 IP地址对应的路由可达性信息;  a third receiving module, configured to receive route reachability information corresponding to an IP address of the virtual PE that is advertised by the PE in the virtual PE by the routing protocol;
所述第三接收模块, 还用于接收由作为主用 PE的所述第一 PE发布的所 述 RG对应的 VPLS实例的可达性信息,所述 VPLS实例的可达性信息包括所 述 RG对应的 VPLS实例的 VPLS 标识,所述虚拟 PE为所述 VPLS实例分配 的 VPLS标签以及所述虚拟 PE的 IP地址。  The third receiving module is further configured to receive reachability information of the VPLS instance corresponding to the RG that is advertised by the first PE that is the primary PE, where the reachability information of the VPLS instance includes the RG The VPLS identifier of the corresponding VPLS instance, the virtual PE is the VPLS label allocated by the VPLS instance and the IP address of the virtual PE.
PCT/CN2012/087246 2012-03-22 2012-12-24 Method for forwarding packet in network and provider edge device WO2013139159A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210079144.1A CN103326940B (en) 2012-03-22 2012-03-22 Method for forwarding message in network and edge device of operator
CN201210079144.1 2012-03-22

Publications (1)

Publication Number Publication Date
WO2013139159A1 true WO2013139159A1 (en) 2013-09-26

Family

ID=49195480

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087246 WO2013139159A1 (en) 2012-03-22 2012-12-24 Method for forwarding packet in network and provider edge device

Country Status (2)

Country Link
CN (1) CN103326940B (en)
WO (1) WO2013139159A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110601882A (en) * 2019-09-04 2019-12-20 厦门网宿有限公司 Two-layer private network system and configuration method
CN113746715A (en) * 2021-07-16 2021-12-03 北京华三通信技术有限公司 Communication method and device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106856446B (en) * 2015-12-09 2019-12-10 中国电信股份有限公司 Method and system for improving virtual network reliability
CN107835126B (en) * 2017-10-19 2021-08-24 苏州盛科通信股份有限公司 Message forwarding method and system
CN110798403B (en) * 2018-08-01 2021-02-23 华为技术有限公司 Communication method, communication device and communication system
CN113824647A (en) 2018-10-19 2021-12-21 华为技术有限公司 Method, equipment and system for determining DF (distribution function) of multicast flow
CN111585899A (en) * 2019-02-19 2020-08-25 华为技术有限公司 EVPN multicast method, device and system
US11894948B2 (en) 2020-04-02 2024-02-06 PrimeWan Limited Method of forming a virtual network
CN115552860A (en) * 2020-05-11 2022-12-30 质一科技有限公司 Virtual network
CN114039814B (en) * 2021-11-30 2024-02-23 锐捷网络股份有限公司 Message forwarding method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070253326A1 (en) * 2006-04-28 2007-11-01 Alcatel System and method for resilient VPLS over multi-nodal APS protected provider edge nodes
CN101459606A (en) * 2008-12-31 2009-06-17 华为技术有限公司 Extranet networking method, system and device for multicast VPN
US7715310B1 (en) * 2004-05-28 2010-05-11 Cisco Technology, Inc. L2VPN redundancy with ethernet access domain
CN102347889A (en) * 2010-08-04 2012-02-08 杭州华三通信技术有限公司 Message forwarding method, system and device in H-VPLS (Hierarchical Virtual Private local area network service)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7715310B1 (en) * 2004-05-28 2010-05-11 Cisco Technology, Inc. L2VPN redundancy with ethernet access domain
US20070253326A1 (en) * 2006-04-28 2007-11-01 Alcatel System and method for resilient VPLS over multi-nodal APS protected provider edge nodes
CN101459606A (en) * 2008-12-31 2009-06-17 华为技术有限公司 Extranet networking method, system and device for multicast VPN
CN102347889A (en) * 2010-08-04 2012-02-08 杭州华三通信技术有限公司 Message forwarding method, system and device in H-VPLS (Hierarchical Virtual Private local area network service)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110601882A (en) * 2019-09-04 2019-12-20 厦门网宿有限公司 Two-layer private network system and configuration method
CN110601882B (en) * 2019-09-04 2022-08-16 厦门网宿有限公司 Two-layer private network system and configuration method
CN113746715A (en) * 2021-07-16 2021-12-03 北京华三通信技术有限公司 Communication method and device
CN113746715B (en) * 2021-07-16 2023-03-31 北京华三通信技术有限公司 Method and device for realizing cross-three-layer transmission of two-layer message

Also Published As

Publication number Publication date
CN103326940A (en) 2013-09-25
CN103326940B (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN109218178B (en) Message processing method and network equipment
EP3070877B1 (en) Evpn inter-subnet multicast forwarding
US9832097B2 (en) Method and apparatus for MPLS label allocation for a BGP MAC-VPN
US7339929B2 (en) Virtual private LAN service using a multicast protocol
US8537816B2 (en) Multicast VPN support for IP-VPN lite
US8953590B1 (en) Layer two virtual private network having control plane address learning supporting multi-homed customer networks
WO2013139159A1 (en) Method for forwarding packet in network and provider edge device
WO2019105462A1 (en) Method and apparatus for sending packet, method and apparatus for processing packet, pe node, and node
US8531941B2 (en) Intra-domain and inter-domain bridging over MPLS using MAC distribution via border gateway protocol
US9391885B1 (en) MPLS label usage in Ethernet virtual private networks
WO2016198016A2 (en) Method, device and system for transmitting bier control information
WO2016015497A1 (en) Method, device and system for forwarding packet
WO2009033428A1 (en) Method, system and device for removing media access control address
WO2015074394A1 (en) Method and device for message forwarding
WO2011103764A1 (en) Method for sending ethernet frames in ethernet tree service and provider edge device
WO2018014767A1 (en) Information determination method and device, and storage medium
WO2013139270A1 (en) Method, device, and system for implementing layer3 virtual private network
WO2009082905A1 (en) Method, system and switch device for dynamically establishing multicast virtual local area network
WO2021093463A1 (en) Packet forwarding method, first network device, and first device group
WO2012122844A1 (en) Method and system for domain-based interconnection of transparent interconnection over lots of links network
WO2011140921A1 (en) Method, device and system for forwarding data frames of virtual private local area network service (vpls)
WO2022117018A1 (en) Packet transmission method and apparatus
WO2007048296A1 (en) A method and system for realizing the consistency of the virtual circuit status
WO2007104201A1 (en) A method for forwarding message in the service tunnel of the ethernet application and a system thereof
JP4011528B2 (en) Network virtualization system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12871928

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12871928

Country of ref document: EP

Kind code of ref document: A1