WO2015054864A1 - 二层虚拟专用网络业务的建立方法和设备 - Google Patents

二层虚拟专用网络业务的建立方法和设备 Download PDF

Info

Publication number
WO2015054864A1
WO2015054864A1 PCT/CN2013/085395 CN2013085395W WO2015054864A1 WO 2015054864 A1 WO2015054864 A1 WO 2015054864A1 CN 2013085395 W CN2013085395 W CN 2013085395W WO 2015054864 A1 WO2015054864 A1 WO 2015054864A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet forwarding
address
controller
forwarding device
label
Prior art date
Application number
PCT/CN2013/085395
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to CN201380080323.XA priority Critical patent/CN105684400B/zh
Priority to PCT/CN2013/085395 priority patent/WO2015054864A1/zh
Publication of WO2015054864A1 publication Critical patent/WO2015054864A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0272Virtual private networks
    • 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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/16Implementing security features at a particular protocol layer
    • H04L63/164Implementing security features at a particular protocol layer at the network layer

Definitions

  • the present invention relates to the field of computer and communication technologies, and in particular, to a method for establishing a Layer 2 (L2) virtual private network (VPN) service and a device for establishing an L2VPN service.
  • L2 Layer 2
  • VPN virtual private network
  • the existing L2VPN service includes a Virtual Leased Line (VLL) service and a Virtual Private LAN Segment (VPLS) service.
  • VLL uses the Labe Distribution Protocol (LDP) as the signaling protocol to transmit data packets of various Layer 2 services between the Customer Edge (CE) devices through the tunnel.
  • LDP Labe Distribution Protocol
  • CE Customer Edge
  • VLL provides a point-to-point VPN networking solution.
  • VPLS is a networking solution based on Multi-Protocol Label Switching (MPLS) protocol, which can implement multi-point to multi-point VPN networking, which is used for many original point-to-point L2VPN services. The operator offers a more complete solution.
  • MPLS Multi-Protocol Label Switching
  • SDN Software-Defined Network
  • the packet forwarding device such as the packet forwarding device and the switch device, does not provide control functions. It relies on the control device, such as the controller, to forward packets to the packet.
  • the network operating system running on the controller provides a control function to deliver the forwarding information calculated based on the network topology information to the packet forwarding device.
  • the main application scenario of implementing the L2VPN service in the SDN is as follows: The first controller and the second controller respectively control multiple packet forwarding devices. Because the packet forwarding device does not have the control function according to the requirements of the SDN, the packet forwarding device controlled by the first controller and Controlled by the second controller How to establish an L2VPN service between packet forwarding devices.
  • the existing L2VPN service establishment mechanism is applied in the above scenario, the following problems occur:
  • the establishment mechanism of the existing L2VPN service is identified by a virtual connection (virtual connection, VC).
  • the Virtual Switch Instance (VSI) ID is used to assign labels to node devices in the VPN. If you need to establish a VPLS service between multiple packet forwarding devices controlled by one controller and other packet forwarding devices that can be controlled by another controller, or a legacy device, you cannot use labels to distinguish all node devices. .
  • the VPLS service needs to be implemented between four packet forwarding devices controlled by one controller and four packet forwarding devices controlled by another controller.
  • PW pseudowire
  • the device belongs to the same VPLS and has only one VSI.
  • the existing label distribution scheme can only distinguish the node devices at the two ends of the same PW that are involved in the label negotiation.
  • the VPLS traffic cannot be sent to a controller controlled by the label. Which packet forwarding device in the packet forwarding device.
  • the existing scheme is to select a tunnel according to a Label Switch Router (LSR) identifier (ID), so the selected tunnel is The tunnel between the Controller and the Controller.
  • LSR Label Switch Router
  • the Controller does not have the function of packet forwarding.
  • the destination of the actual VPLS traffic should be multiple packet forwarding devices controlled by the Controller, not the Controller.
  • the prior art does not provide a solution capable of implementing L2VPN in an SDN network architecture.
  • SUMMARY OF THE INVENTION The embodiments of the present invention provide a method for establishing an L2VPN service, which is used to solve the problem that the SDN network architecture cannot support the L2VPN service well.
  • an embodiment of the present invention further provides a controller and a network device.
  • the first aspect provides a method for establishing an L2VPN, including: The first controller receives the first label mapping message from the second controller, where the first label mapping message carries the pseudowire PW identifier ID, the IP address of the first packet forwarding device controlled by the first controller, and the The IP address of the second packet forwarding device controlled by the second controller, and the PW allocated by the second controller to the PW identified by the PW ID between the first packet forwarding device and the second packet forwarding device label;
  • the first controller according to the first packet forwarding message carries an IP address of the first packet forwarding device and an IP address of the second packet forwarding device, and the saved first packet forwarding device and the Determining, by the second packet forwarding device, a tunnel, an IP address of the first packet forwarding device, and an IP address of the second packet forwarding device, determining the first packet forwarding device and the first a tunnel between the two-packet forwarding device for carrying the PW identified by the PW ID;
  • the first controller generates a label forwarding entry according to the determined tunnel, and sends the label forwarding entry to the first packet forwarding device, where the label forwarding entry records the PW label and Mapping relationship of forwarding information of the tunnel.
  • the method before the first controller receives the first label mapping message from the second controller, the method further includes:
  • the first controller sends a first member discovery message to the second controller, where the first member discovery message carries the PW ID, an IP address of the first packet forwarding device, and the first controller control.
  • the second possible implementation of the first aspect is also provided, and the following:
  • the first controller receives the second member discovery message from the second controller, where the second member discovery message carries the PW ID, the IP address of the second packet forwarding device, and the second The IP address of the other packet forwarding device that establishes the PW identified by the PW ID.
  • the method further includes:
  • the first controller sends a second LDP label mapping message to the second controller, where the second LDP label mapping message carries the PW ID, the address of the first packet forwarding device controlled by the first controller, and the The address of the second packet forwarding device controlled by the second controller, And the first controller is a PW label allocated by the PW ID of the PW ID between the first packet forwarding device and the second packet forwarding device.
  • a fourth possible implementation manner of the first aspect is further provided, after the first controller receives the second member discovery message from the second controller, Also includes:
  • the first controller sends a second label mapping message to the second controller, where the second label mapping message carries the PW ID, the address of the first packet forwarding device controlled by the first controller, and the second The address of the second packet forwarding device controlled by the controller, and the PW label allocated by the PW ID of the PW ID between the first packet forwarding device and the second packet forwarding device.
  • the fifth possible implementation manner of the first aspect is further provided, where the first label mapping message includes the first type-length-value a TLV and a second TLV, the content of the type field of the first TLV indicating that the value field of the first TLV specifically includes a PW ID field, a first proxy node address field, and a second proxy node address field;
  • the PW ID is carried in the PW ID field in the first TLV, and the IP address of the second packet forwarding device is carried in the first proxy node address field, the first packet forwarding device The IP address is carried in the second proxy node address field;
  • the PW label allocated by the second controller is carried in the second TLV.
  • a sixth possible implementation manner of the first aspect is further provided, where the second member is found
  • the message includes a third TLV, where the content of the type field in the third TLV indicates that the value field in the third TLV carries the PW ID, and the address of the second packet forwarding device and the second The IP address of the other packet forwarding device that establishes the PW identified by the PW ID.
  • the message and the second member discovery message further carry a group Group identifier ID assigned by the second controller to the PW ID.
  • the first label mapping message further carries a group ID that is allocated by the second controller for the PW ID; the group ID is carried in a group included in a value field of the first TLV In the group field.
  • the ninth possible implementation manner of the first aspect is further provided, where the second member discovery message further carries the second controller as the PW a group identifier assigned by the ID; the group identifier is carried in a group field included in a value field of the third TLV.
  • the tenth possible implementation manner of the first aspect is further provided by the second, fourth, sixth, seventh, and eighth possible implementation manners of the foregoing first aspect, where the first Before the controller receives the first label mapping message from the second controller, and the first controller receives the second member discovery message from the second controller, the method further includes: the first controller and the second The controller negotiates, and confirms that the second controller has the capability of sending the first label mapping message and the second member discovery message, and the first controller is configured to parse the first label mapping message and the second member The ability to discover the message; confirming that the second controller has the capability of sending the first label mapping message and the second member discovery message, and the first controller is configured to parse the first label mapping message and the second member After the capability of discovering the message, the first controller performs the receiving the first label mapping from the second controller. Message and the second message to members of the discovery step.
  • the first possible implementation manner of the first aspect further includes: receiving a notification message sent by the second controller, where The notification message includes the PW ID, an IP address of the first packet forwarding device, an IP address of the second packet forwarding device, and a status identifier, where the status identifier includes an active status identifier and a standby status identifier.
  • the notification message is used to indicate that the status of the PW identified by the PW ID between the first packet forwarding device and the second packet forwarding device is a primary state or a standby state.
  • the foregoing first possible implementation manner of the first aspect further comprising: receiving, by the first controller, the second controller a MAC address clearing message, where the MAC address clearing message carries an IP address and a MAC address list of the first packet forwarding device;
  • the first controller instructs the first packet forwarding device to clear according to the IP address of the first packet forwarding device in the MAC address clear message. All the MAC forwarding entries are saved, and the mapping between the MAC address and the PW label allocated by the second controller is recorded in the MAC forwarding entry;
  • the first controller indicates, according to the IP address of the first packet forwarding device in the MAC address clear message, Transmitting, by the first packet forwarding device, a MAC forwarding entry that records the mapping between the MAC address in the local MAC address list and the PW label allocated by the second controller, and the local MAC address of the second packet forwarding device
  • the address includes a MAC address of the second packet forwarding device and a MAC address of another network device obtained by the second packet forwarding device through an access circuit connection.
  • the first controller is configured to receive the first label mapping message from the second controller, where the first label mapping message carries the pseudowire PW identifier ID, the IP address of the second packet forwarding device controlled by the second controller, And the second controller is a PW label allocated by the PW identified by the PW ID, where the second packet forwarding device is an endpoint device of the PW, and the first controller saves the PW ID from the first Querying, by the controller, the packet forwarding device, the first packet forwarding device corresponding to the PW ID carried in the first label mapping message, where the first packet forwarding device is another endpoint device of the PW;
  • the first controller according to the IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried by the first label mapping message, and the saved first packet forwarding device and the Determining, by the second packet forwarding device, a tunnel, an IP address of the first packet forwarding device, and an IP address of the second packet forwarding device, determining the first packet forwarding device and the first a tunnel between the two packets forwarding device for carrying the first PW;
  • the first controller generates a label forwarding entry according to the determined tunnel, and sends the label forwarding entry to the first packet forwarding device, where the label forwarding entry records the PW label and Mapping relationship of forwarding information of the tunnel.
  • the first controller queries the first label mapping message from a correspondence between a saved PW ID and a packet forwarding device controlled by the first controller. After the first packet forwarding device corresponding to the carried PW ID, the method further includes:
  • the first controller sends a second label mapping message to the second controller, where the second The label mapping message carries the PW ID, the IP address of the first packet forwarding device, and the PW label allocated by the first controller to the PW identified by the PW ID.
  • the first label mapping message includes a first type-length- a value TLV and a second TLV, the content of the type field of the first TLV indicating that the value field of the first TLV includes a PW ID field and a proxy node address field;
  • the first PW ID is carried in the PW ID field in the first TLV, and an IP address of the second packet forwarding device is carried in the proxy node address field;
  • the PW label allocated by the second controller is carried in the second TLV.
  • the first label mapping message further carries the second controller The group Group ID assigned to the PW ID.
  • a fourth possible implementation manner of the second aspect is further provided, where the first label mapping message further carries the second controller to allocate the PW ID.
  • Group ID is carried in a group field included in a value field of the first TLV.
  • the third aspect also provides a method for establishing an L2VPN, including:
  • the network device receives the first label mapping message from the controller, where the first label mapping message carries a pseudowire PW identifier ID, an IP address of a packet forwarding device controlled by the controller, and an IP of the network device.
  • An address, and the controller, for the packet forwarding setting an IP address of the packet forwarding device and an IP address of the network device carried by the network device according to the first label mapping message, and the saved network device Corresponding relationship between the packet forwarding device and the IP address of the network device and the IP address of the packet forwarding device, and the device between the packet forwarding device and the network device
  • the tunnel of the PW identified by the PW ID; the forwarding entry record records the mapping relationship between the PW label and the forwarding information of the tunnel.
  • the network device receives Before the first label mapping message of the Controller, the method further includes:
  • the network device sends a first member discovery message to the controller, where the first member discovery message carries the PW ID and an IP address of the network device.
  • the method further comprising: receiving, by the network device, the controller The second member discovery message, where the second member discovery message carries the PW ID, the IP address of the packet forwarding device, and other packet forwarding devices controlled by the controller to establish the PW identified by the PW ID. IP address.
  • a third possible implementation manner of the third aspect is further provided, after the network device receives the first label mapping message from the controller, Also includes:
  • the network device sends a second label mapping message to the controller, where the second label mapping message carries the PW ID, an address of the network device, an address of the packet forwarding device, and the network device a PW label allocated for the PW identified by the PW ID between the network device and the packet forwarding device.
  • the fourth possible implementation manner of the third aspect is further provided, after the network device receives the second member discovery message from the controller, the method further includes:
  • the network device sends a second label mapping message to the controller, where the second label mapping message carries the PW ID, an address of the network device, an address of the packet forwarding device, and the network device a PW label allocated for the PW identified by the PW ID between the network device and the packet forwarding device.
  • the fifth possible implementation manner of the third aspect is further provided, where the first label mapping message includes the first type-length-value a TLV and a second TLV, the content of the type field of the first TLV indicating that the value field of the first TLV specifically includes a PW ID field, a first proxy node address field, and a second proxy node address field;
  • the PW ID is carried in the PW ID field in the first TLV
  • the IP address of the packet forwarding device is carried in the first proxy node address field
  • the IP address of the network device is carried in The second proxy node address field
  • the PW tag allocated by the controller is carried in the second TLV.
  • the second member discovery message includes a third TLV, where the third TLV is The content of the type field indicates that the value field in the third TLV carries the PW ID, an address of the packet forwarding device, and an address of another packet forwarding device controlled by the controller.
  • a controller including:
  • a receiving unit configured to receive a first label mapping message from another controller, where the first label mapping message carries a pseudowire PW identifier ID, an IP address of the first packet forwarding device controlled by the controller, and the The IP address of the second packet forwarding device controlled by the other controller, and the PW allocated by the PW identified by the PW ID between the first packet forwarding device and the second packet forwarding device Label
  • a tunneling iteration unit configured to: according to the IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried by the first label mapping message received by the receiving unit, and the saved Determining the first relationship between a tunnel established between the packet forwarding device and the second packet forwarding device, and an IP address of the first packet forwarding device and an IP address of the second packet forwarding device a tunnel between the packet forwarding device and the second packet forwarding device to carry the PW identified by the PW ID;
  • An entry generating unit configured to generate, according to the tunnel determined by the tunnel iteration unit, a label forwarding entry, where the label forwarding entry records a mapping relationship between the PW label and the forwarding information of the tunnel;
  • the first packet forwarding device configured to generate, according to the tunnel determined by the tunnel iteration unit, a label forwarding entry, where the label forwarding entry records a mapping relationship between the PW label and the forwarding information of the tunnel.
  • the method further includes:
  • a sending unit configured to send a first member discovery message to the another controller before the receiving unit receives the first label mapping message from the another controller, where the first member discovery message carries
  • the PW ID the PW ID
  • the IP address of the first packet forwarding device and the foregoing fourth aspect, or the first possible implementation manner of the fourth aspect
  • the receiving unit is further configured to receive from the other a second member discovery message of the controller, where the second member discovery message carries the PW ID, an IP address of the second packet forwarding device, and a PW identified by the another controller to establish the PW ID.
  • the IP address of the other packet forwarding device is further configured to send from the other a second member discovery message of the controller, where the second member discovery message carries the PW ID, an IP address of the second packet forwarding device, and a PW identified by the another controller to establish the PW ID.
  • the sending unit is further configured to receive, by the receiving unit, a part from the another controller After the second member discovers the message, the second label mapping message is sent to the another controller, where the second label mapping message carries the PW ID, the address of the first packet forwarding device controlled by the controller, and the other An address of the second packet forwarding device controlled by the controller, and a PW label allocated by the PW ID of the PW ID between the first packet forwarding device and the second packet forwarding device.
  • the method further includes:
  • a negotiating unit configured to, after the receiving unit receives the second member discovery message from the another controller, negotiate with the another controller, and confirm that the another controller is configured to send the first label mapping message and The ability of the second member to discover a message, and the ability of the controller to parse the first tag mapping message and the second member discovery message; confirming, by the negotiating unit, that the another controller is configured to send the message After a tag mapping message and the ability of the second member to discover a message, and the controller has the capability of parsing the first tag mapping message and the second member discovery message, the receiving unit receives the A first label mapping message of the Controller and the second member discovery message.
  • the receiving unit is further configured to receive a notification sent by the another controller
  • the notification message includes the PW ID, an IP address of the first packet forwarding device, an IP address of the second packet forwarding device, and a status identifier, where the status identifier includes an active status identifier and a standby status.
  • the notification message is used to indicate that the status of the PW identified by the PW ID between the first packet forwarding device and the second packet forwarding device is a primary state or a standby state.
  • the receiving unit is further configured to receive a MAC sent by the another controller An address clearing message, where the MAC address clearing message carries the first packet forwarding a list of IP addresses and MAC addresses of the device;
  • the controller instructs the first packet forwarding device to clear all saved MAC forwarding entries according to the IP address of the first packet forwarding device in the MAC address clearing message.
  • a mapping relationship between the MAC address and the PW label allocated by the second controller is recorded in the MAC forwarding entry;
  • the controller indicates the first according to the IP address of the first packet forwarding device in the MAC address clear message.
  • the packet forwarding device clears the saved MAC forwarding entry with the mapping between the MAC address in the local MAC address list and the PW label allocated by the another controller, where the local MAC address of the second packet forwarding device includes The MAC address of the second packet forwarding device and the MAC address of the other network device obtained by the second packet forwarding device through the access circuit connection.
  • a fifth aspect a network device, including a memory, a processor, and an interface, where the memory is used to store program code;
  • the interface is configured to receive a first label mapping message from another network device, where the first label mapping message carries a pseudowire PW identifier ID, and an IP address of the first packet forwarding device controlled by the network device And an IP address of the second packet forwarding device controlled by the another network device, and the another network device is identified by the PW ID between the first packet forwarding device and the second packet forwarding device PW assigned PW tag;
  • the processor after reading the program code stored in the memory, performing the following steps: performing an IP address and a location of the first packet forwarding device that is carried by the first label mapping message received by the interface An IP address of the second packet forwarding device, and an established tunnel between the first packet forwarding device and the second packet forwarding device, and an IP address of the first packet forwarding device Determining, by the first packet forwarding device and the second packet forwarding device, a tunnel between the first packet forwarding device and the second packet forwarding device to carry the PW identified by the PW ID; The tunnel generates a label forwarding entry and triggers the interface to send the label forwarding entry to the first packet forwarding device, where the label forwarding entry records the PW label and the forwarding of the tunnel The mapping relationship of information.
  • the interface is further configured to send, to the another network device, before receiving the first label mapping message from the another network device Sending a first member discovery message, where the first member discovery message carries the PW ID, an IP address of the first packet forwarding device, and other PWs controlled by the network device to establish the PW ID.
  • the IP address of the packet forwarding device is further configured to send, to the another network device, before receiving the first label mapping message from the another network device Sending a first member discovery message, where the first member discovery message carries the PW ID, an IP address of the first packet forwarding device, and other PWs controlled by the network device to establish the PW ID.
  • the IP address of the packet forwarding device is further configured to send, to the another network device, before receiving the first label mapping message from the another network device Sending a first member discovery message, where the first member discovery message carries the PW ID, an IP address of the first packet forwarding device, and other PWs controlled by the network device to establish the PW ID.
  • the second possible implementation manner of the fifth aspect is further provided, where the interface is further configured to receive from the another network device The second member discovery message, where the second member discovery message carries the PW ID, the IP address of the second packet forwarding device, and the PW identified by the another network device to establish the PW ID.
  • the IP address of the other packet forwarding device is further provided.
  • a third possible implementation manner of the fifth aspect is further provided, where the interface is further configured to receive a second member from the another network device After the message is found, the second label mapping message is sent to the another network device, where the second label mapping message carries the PW ID, the address of the first packet forwarding device controlled by the network device, and the other And a PW label allocated by the PW ID of the PW ID between the first packet forwarding device and the second packet forwarding device.
  • a fourth possible implementation manner of the fifth aspect is further provided, the processor receiving, at the interface, a second from the another network device Before the member discovers the message, negotiating with the another network device by using the interface, confirming that the another network device has the capability of sending the first label mapping message and the second member discovery message, and the network device Having the ability to parse the first tag mapping message and the second member discovery message;
  • the interface Confirming that the another network device has the capability of transmitting the first label mapping message and the second member discovery message, and the network device is configured to parse the first label mapping message and the second member discovery message After the capability, the interface receives a first tag mapping message and the second member discovery message from the another network device.
  • the fifth possible implementation manner of the fifth aspect is further provided, where the interface is further configured to receive the sending by the another network device a MAC address clearing message, where the MAC address clearing message carries an IP address and a MAC address list of the first packet forwarding device;
  • the network device clears the MAC address according to the MAC address.
  • the IP address of the first packet forwarding device in the information indicating that the first packet forwarding device clears all saved MAC forwarding entries, where the MAC forwarding entry records a MAC address and the other network device allocation Mapping relationship of the PW label;
  • the network device indicates, according to the IP address of the first packet forwarding device in the MAC address clear message, a packet forwarding device clears a saved MAC forwarding entry in which the MAC address in the local MAC address list is mapped to the PW label assigned by the another network device, and the local MAC address of the second packet forwarding device
  • the address includes a MAC address of the second packet forwarding device and a MAC address of another network device obtained by the second packet forwarding device through the access circuit connection.
  • a receiving unit configured to receive a first label mapping message from another controller, where the first label mapping message carries a pseudowire PW identifier ID, an IP address of a second packet forwarding device controlled by the other controller, And the other controller is a PW label allocated by the PW identified by the PW ID, and the second packet forwarding device is an endpoint device of the PW;
  • a querying unit configured to query, from a correspondence between the saved PW ID and the packet forwarding device controlled by the controller, a first packet forwarding device corresponding to the PW ID carried in the first label mapping message, where the first packet is forwarded
  • the device is another endpoint device of the PW;
  • a tunneling iteration unit configured to: according to an IP address of the first packet forwarding device and an IP address of the second packet forwarding device carried by the first label mapping message, and the saved first packet forwarding device and the Determining, by the second packet forwarding device, the established tunnel, the IP address of the first packet forwarding device, and the IP address of the second packet forwarding device, determining the first packet forwarding device and the a tunnel between the second packet forwarding device for carrying the first PW;
  • An entry generating unit configured to generate a label forwarding entry according to the tunnel determined by the tunnel iteration unit, where the label forwarding entry records a mapping relationship between the PW label and the forwarding information of the tunnel;
  • the first packet forwarding device configured to generate a label forwarding entry according to the tunnel determined by the tunnel iteration unit, where the label forwarding entry records a mapping relationship between the PW label and the forwarding information of the tunnel.
  • the method further includes: After the query unit queries the first packet forwarding device corresponding to the PW ID carried in the first label mapping message from the corresponding relationship between the saved PW ID and the packet forwarding device controlled by the first controller, The other controller sends a second label mapping message, where the second label mapping message carries the PW ID, the IP address of the first packet forwarding device that is queried by the query unit, and the seventh aspect,
  • a network device including a memory, a processor, and an interface, wherein
  • the memory is configured to store program code
  • the interface is configured to receive a first label mapping message from another network device, where the first label mapping message carries a pseudowire PW identifier ID, and the second packet forwarding device controlled by the another network device An IP address, and the other network device is a PW tag allocated by the PW identified by the PW ID, where the second packet forwarding device is an endpoint device of the PW;
  • the processor after reading the program code stored in the memory, performs the following steps: querying the first one from a correspondence between a PW ID saved by the memory and a packet forwarding device controlled by the network device a first packet forwarding device corresponding to the PW ID carried in the label mapping message, where the first packet forwarding device is another endpoint device of the PW;
  • IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried by the first label mapping message, and the first packet forwarding device and the second saved by the memory Determining, by the packet forwarding device, the established relationship between the tunnel, the IP address of the first packet forwarding device, and the IP address of the second packet forwarding device, determining the first packet forwarding device and the second packet a tunnel between the forwarding devices to carry the first PW;
  • the interface is further used by the processor to query the first label mapping from a correspondence between a saved PW ID and a packet forwarding device controlled by the network device.
  • the second label mapping message is sent to the another network device, where the second label mapping message carries the PW ID and the first packet forwarding The IP address of the device and the PW label allocated by the network device to the PW identified by the PW ID.
  • the eighth aspect further provides a network device, including:
  • a receiving unit configured to receive a first label mapping message from the controller, where the first label mapping message carries a pseudowire PW identifier ID, an IP address of a packet forwarding device controlled by the controller, and the network device
  • the IP address, and the controller is the packet forwarding tunnel iteration unit, configured to use the IP address of the packet forwarding device and the IP address of the network device carried according to the first label mapping message, and the saved location Determining a correspondence between the established tunnel between the network device and the packet forwarding device, the IP address of the network device, and the IP address of the packet forwarding device, and determining between the packet forwarding device and the network device
  • the tunnel is used to carry the PW identified by the PW ID; the forwarding entry is saved and stored, and the label forwarding entry records the mapping relationship between the PW label and the forwarding information of the tunnel.
  • the method further includes: a sending unit, configured to send the first member discovery to the controller before the receiving unit receives the first label mapping message from the controller
  • the first member discovery message carries the PW ID and an IP address of the network device.
  • the second possible implementation manner of the eighth aspect is further provided, where the receiving unit is further configured to receive a second member discovery message from the controller,
  • the second member discovery message carries the PW ID, the IP address of the packet forwarding device, and the IP address of another packet forwarding device controlled by the Controller to establish the PW identified by the PW ID.
  • a third possible implementation of the eighth aspect is further provided, where the sending unit is further configured to receive, at the receiving unit, the
  • the second label mapping message is sent to the controller, where the second label mapping message carries the PW ID, the address of the network device, the address of the packet forwarding device, And the PW label allocated by the network device to the PW identified by the PW ID between the network device and the packet forwarding device.
  • a network device including a memory, a processor, and an interface, the storing For storing program code;
  • the interface is configured to receive a first label mapping message from the controller, where the first label mapping message carries a pseudowire PW identifier ID, an IP address of a packet forwarding device controlled by the controller, and the An IP address of the network device, and a PW label allocated by the controller to the PW identified by the PW ID between the packet forwarding device and the network device; the processor, configured to read the memory After storing the program code, performing the following steps: according to the IP address of the packet forwarding device carried by the first label mapping message and the IP address of the network device, and the network device and the saved in the memory Determining, by the packet forwarding device, the established relationship between the tunnel, the IP address of the network device, and the IP address of the packet forwarding device, determining that the packet forwarding device and the network device are used together
  • the tunnel of the PW identified by the PW ID; the forwarding forwarding entry records the mapping relationship between the PW label and the forwarding information of the tunnel.
  • the interface is further configured to: before receiving the first label mapping message from the controller, send a first member discovery message to the controller, where the first The member discovery message carries the PW ID and an IP address of the network device.
  • the second possible implementation manner of the ninth aspect is further provided, where the interface is further configured to receive a second member from the controller And the second member discovery message carries the PW ID, the IP address of the packet forwarding device, and the IP address of another packet forwarding device controlled by the Controller to establish the PW identified by the PW ID.
  • the third possible implementation manner of the ninth aspect is further provided, where the interface is further configured to send the second label mapping message to the controller.
  • the second label mapping message carries the PW ID, the address of the network device, the address of the packet forwarding device, and the network device is the network device and the second device in the foregoing ninth aspect.
  • the interface is further configured to: after receiving the second member discovery message from the controller, send the second label to the controller Mapping message, the second label mapping And carrying the PW ID, the address of the network device, the address of the packet forwarding device, and the PW of the PW ID identifier between the network device and the packet forwarding device.
  • the assigned PW tag The embodiment of the present invention performs the following functions: the PW label of the PW on the packet forwarding device controlled by the Controller is negotiated based on the label mapping message, and the forwarding entry is generated and sent to the packet forwarding device controlled by the controller. The packet forwarding device forwards the packet according to the forwarding entry sent by the controller.
  • the Controller centrally controls the PW information and the packet forwarding device assumes the target of forwarding tasks, and fully exploits the advantages of separating the SDN control and forwarding functions.
  • FIG. 1 is a schematic diagram of a deployment scenario in Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart of a method for establishing an L2VPN according to Embodiment 1 of the present invention
  • FIG. 3A is an interaction diagram of a process for establishing an L2VPN according to Embodiment 1 of the present invention
  • Schematic diagram of the deployment scenario
  • FIG. 3C is a flowchart of another L2VPN establishment process according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart of a method for establishing an L2VPN according to Embodiment 2 of the present invention
  • FIG. 6 is a schematic diagram of a deployment scenario in the third embodiment of the present invention.
  • FIG. 7 is a flowchart of a method for establishing an L2VPN according to Embodiment 3 of the present invention
  • FIG. 8 is an interaction diagram of a process for establishing an L2VPN according to Embodiment 3 of the present invention
  • Schematic diagram of the controller
  • FIG. 9B is a schematic structural diagram of another controller according to Embodiment 4 of the present invention.
  • FIG. 10 is a schematic structural diagram of a network device according to Embodiment 4 of the present invention.
  • FIG. 11 is a schematic structural diagram of a controller according to Embodiment 5 of the present invention
  • FIG. 12 is a schematic structural diagram of a network device according to Embodiment 5 of the present invention
  • FIG. 13 is a schematic structural diagram of a controller according to Embodiment 6 of the present invention
  • FIG. 14 is a schematic structural diagram of a network device according to Embodiment 6 of the present invention.
  • the embodiments of the present invention provide a solution for implementing L2VPN in an SDN network architecture. The following describes the solution in combination with an embodiment in different scenarios.
  • the application scenario of the L2VPN establishment solution provided by the embodiment of the present invention includes at least two controllers, wherein each controller controls multiple packet forwarding devices.
  • the controller of the embodiment of the present invention is a network device that can provide control functions (such as negotiating a PW label, or generating and delivering a routing and forwarding table, etc.) for other network devices, such as a packet forwarding device, such as an SDN Controller.
  • the packet forwarding device in the embodiment includes a router and a switch.
  • FIG. 1 shows a specific deployment example.
  • the two controllers included in the network environment are 1 and J are Controllerl and Controller2, and the IP address of Controllerl is 10.10.10.1.
  • the IP address of Controlle. Is 10.10.10.2.
  • the Controllerl control has four packet forwarding devices, namely Devicel, Device2, Device3, and Device4.
  • the IP address of Device1 is 1.1.1.1
  • the IP address of Device2 is 2.2.2.2
  • the IP address of Device3 is 3.3.3.3.
  • the address is 4.4.4.4.
  • the Controlle control has four packet forwarding devices, namely Device5, Device6, Device7, and Device8.
  • the IP address of Device5 is 5.5.5.5
  • the IP address of Device6 is 6.6.6.6
  • the IP address of Device7 is 7.7.7.7.
  • the IP address of Device8. Is 8.8.8.8.
  • Step 21 The controller1 receives the first label mapping message from the Controlle, where the first label mapping message carries the PW ID, the IP address of the first packet forwarding device controlled by the Controller1, and the second packet controlled by the Controlle.
  • the controller1 receives the LDP remote session or the Border Gateway Protocol (BGP) session established by the Controlle based on the IP address.
  • BGP Border Gateway Protocol
  • the first label mapping message is described; for the detailed process of establishing a remote session, please refer to the relevant standard document or existing document, which will not be described in detail here.
  • the VPLS service since the VPLS service first establishes a PW full connection between all the packet forwarding devices participating in the VPLS service before the label allocation, the PW IDs of all the PWs in the full connection are the same, so the label is allocated only according to the PW.
  • the ID cannot uniquely identify a PW, and the packet forwarding device at the two ends of the PW cannot be distinguished. Therefore, in the label allocation process, the IP address of the packet forwarding device at both ends of the PW needs to be added to the label mapping message. Different PW.
  • the first packet forwarding device is Device1
  • the second packet forwarding device is Device5
  • the PW ID of the PW between Devicel and Device5 is PW1
  • the Controlle is the PW with the PW ID of PW1 between Devicel and Device5.
  • the assigned PW label is 500.
  • the first label mapping message carries 1.1.1.1, 5.5.5.5, PW 1 and 500.
  • the specific carrying method can be pre-agreed by Controllerl and Controlle, and is not limited here.
  • Step 22 The controller 1 determines the first packet forwarding device and the second packet according to the IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried in the first label mapping message. A tunnel between the forwarding devices to carry the PW identified by the PW ID.
  • a tunnel is established in advance between the first packet forwarding device and the second packet forwarding device.
  • the tunnel may be an MPLS tunnel or an IP tunnel.
  • For detailed process of establishing a tunnel refer to related standard documents or existing documents. It will not be detailed here.
  • the mapping between the tunnel on the packet forwarding device controlled by the controller and the IP address pair at both ends of the tunnel is saved in the controller1.
  • the mapping relationship may be reported by the packet forwarding device to the controller after the tunnel is successfully established.
  • a tunnel is usually represented by a tunnel ID or a tunnel forwarding information index.
  • mapping between the tunnel ID saved in Controller1 and the IP address pair of devices at both ends of the tunnel is shown in Table 1.
  • Tunnel ID The IP address of the device at both ends of the tunnel.
  • Tunnel 50 4.4.4.4-8.8.8.8 The controller 1 searches for the IP address of the first packet forwarding device carried in the first label mapping message and the tunnel identified by the second packet identification information from the saved mapping between the tunnel and the IP address pair of the device at both ends of the tunnel. And a tunnel between the first packet forwarding device and the second packet forwarding device to carry the PW identified by the PW ID.
  • the first label mapping message carries 1.1.1.1, 5.5.5.5, PW 1 and 500, and the controller 1 queries the tunnel identifier corresponding to the IP address to 1.1.1.1-5.5.5.5 from Table 1 as the tunnel. 10: Determine that the tunnel whose tunnel ID is Tunnel 10 is the tunnel used to carry PW 1.
  • tunnel iteration The process of determining the tunnel carrying the PW in this step is also referred to as "tunnel iteration.”
  • Step 23 The controller 1 generates a label forwarding entry according to the tunnel determined in step 22, and sends the label forwarding entry to the first packet forwarding device, where the label forwarding entry records the PW label. A mapping relationship with the forwarding information of the tunnel.
  • the tunnel forwarding information may include a tunnel label.
  • the MAC forwarding entry In addition to the label forwarding entry, the MAC forwarding entry will be mentioned later in this embodiment. For the sake of clarity, in the following description, if not specifically indicated, the forwarding entry refers to the label forwarding entry.
  • the controller 1 generates a forwarding entry that records the mapping relationship between the label 500 and the forwarding information of the TUNNEL 10 according to the tunnel identifier TUNNEL 10 determined in step 22 and the label 500 carried in the first label mapping message, and The forwarding entry is sent to Device1.
  • the first packet forwarding device may send the L2 service packet to the second packet forwarding device.
  • the device encapsulates the packet according to the forwarding entry to implement the L2VPN service.
  • the controllerl generates the forwarding entry from Device1 to Device5 for Devicel.
  • Devicel sends the L2 service packet to Device5
  • the header encapsulation tunnel identifies the forwarding information of the TUNNEL 10 and the PW label 500, and then sends the encapsulated packet to the Device 5.
  • Steps 21 to 23 are described by taking only one label assignment when L2VPN is established. For example, how to obtain the forwarding entries required for L2VPN transmission with device5 is used as an example. As shown in the figure, in fact, if it is a multi-point to multi-point VPLS service, a similar label allocation process needs to be performed multiple times to generate forwarding entries for multiple packet forwarding devices participating in the VPLS service. For example, as shown by the dotted line in Figure 1, when establishing VPLS services between Device1, Device2, Device3 and Device5 controlled by Controller1, Controllerl needs to perform multiple steps 21 ⁇ 23 to generate Devicel. The forwarding entry of Device 5 and Device 6 is the forwarding entry of Device 5 and Device 6 and the forwarding entry of Device 5 and Device 6 for Device 3 . In the same way, because the packet transmission is bidirectional, the Controlle also needs to generate the forwarding entries from Device1 to Device3 for Device5, and also to forward the forwarding entries to Device1 to Device3 for Device6.
  • Controllerl needs to perform Step 21 ⁇ Step 23 to generate a forwarding entry to Device5 for Device1. Steps 21 to 23 are generated, and the forwarding entry to Device1 is generated for Device 5.
  • the first controller may learn, according to the pre-configuration, which packet forwarding devices controlled by the first controller need to establish which L2VPN service, and the second controller may also learn the second controller according to the pre-configuration. Which L2VPN services need to be established for which packet forwarding devices are controlled.
  • the Controller1 learns that the Device1 ⁇ Device3 needs to establish a VPLS service with a VSI ID of 5 with the packet forwarding device controlled by other Controllers.
  • the second Controlle may learn, according to the pre-configuration, which packet forwarding devices controlled by the first Controller1 need to establish which L2VPN services are controlled by the packet forwarding devices controlled by the Controlle, to initiate Sending the first label mapping message to the first controller; and discovering which packet forwarding devices controlled by the first controller1 need to be established with which packet forwarding devices controlled by the Controlle, by performing a discovery process before sending or receiving the label mapping message L2VPN service.
  • the discovery process is: before the step 21, the first controller sends a first member discovery message to the second controller, where the first member discovery message carries the PW ID and the first controller control Establishing an IP address of the plurality of packet forwarding devices of the PW identified by the PW ID, that is, an IP address of the first packet forwarding device and other packets controlled by the first controller and establishing a PW identified by the PW ID Forward the IP address of the device).
  • the discovery process may further include: the first controller receiving the second member discovery message from the second controller, where the second member discovery message carries the PW ID, the The IP address of the plurality of packet forwarding devices that are used by the second controller to establish the PW identified by the PW ID (ie, the IP address of the second packet forwarding device and the establishment of the PW ID by the second controller) Identifies the IP address of the other packet forwarding device of the PW).
  • FIG. 3A is a flowchart of a method for establishing an L2VPN according to an embodiment of the present invention.
  • the controller1 and the controlle of the peer device determine the packet forwarding device to be established with the L2VPN service by using the discovery process. And generating, by the following label allocation process, a forwarding entry for the packet forwarding device of the P2 to be established with the P2 to be established.
  • the L2VPN service here can be a point-to-point VLL service or a multi-point to multi-point VPLS service.
  • Step 31 Controllerl and Controlle establish a session.
  • the session can be either an LDP remote session or a BGP session.
  • Step 32 The Controller1 sends a first member discovery message to the Controlle through the established session, where the first member discovery message carries the PW ID, and the packet forwarding device controlled by the Controller1 to establish the PW identified by the PW ID. List of addresses.
  • the L2VPN service is established between the packet forwarding device controlled by the controller and the packet forwarding device controlled by the Controlle. Therefore, the address list carried in the first member discovery message has only one packet forwarding device. the address of. For example, if a VLL service is established between Device1 and Device5, and the PW ID of the service is PW2, the first member discovery message carries the IP address 1.1.1.1 of PW 2 and Device1.
  • the address list carried in the first member discovery message has at least The address of 1 packet forwarding device. For example, if the VPLS service is established between Device 1 and Device 3 and Device 5 and Device 6, the PW ID of the service is PW 3.
  • the first member discovery message carries the address lists of PW3 and Device1 ⁇ Device3. 1.1.1.1, 2.2.2.2 and 3.3.3.3.
  • Step 33 The Controlle sends a second member discovery message to the controller1 by using the foregoing session, where the first member discovery message carries a PW ID, and the address of the packet forwarding device that is controlled by the Controlle to establish the PW identified by the PW ID. List.
  • the second member discovery message carries the IP address 5.5.5.5 of PW 2 and Device 5.
  • the second member discovery message carries the address lists 5.5.5.5 and 6.6.6.6 of PW 3 and Device 5 ⁇ Device 6.
  • Step 34 The Controlle sends a first label mapping message to the controller1, where the first label mapping message carries a PW ID, an IP address of the first packet forwarding device controlled by the Controller1, and a second packet forwarding device controlled by the Controlle.
  • the first label mapping message carries the IP address of PW2, Device1, 1.1.1.1, and the IP address of Device5, 5.5.5.5, and the PW label 500, which is allocated by PW2 between Device1 and Device5.
  • the first label mapping message carries the PW3, the IP address of Devicel 1.1.1.1 and the IP address of Device5 5.5.5.5, and the PW label 600 allocated by the Controlle to the PW2 between Device1 and Device5.
  • the first label mapping message may also be a label for carrying a PW between the other packet forwarding device controlled by the Controll and the other packet forwarding device controlled by the Controlle.
  • the first label mapping message carries the IP of the Device1.
  • the IP address of the address 1.1.1.1 and Device6 is 6.6.6.6
  • the Controlle is the PW label assigned to the PW2 between Devicel and Device6.
  • the label allocation process between Device1 and Device5 is used as an example.
  • the label distribution process between other packet forwarding devices is also not described.
  • Step 35 The controller 1 determines the first packet forwarding device and the second packet according to the IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried in the first label mapping message. A tunnel between the forwarding devices to carry the PW identified by the PW ID.
  • the controller 1 determines that the tunnel whose tunnel identifier is TUNNEL 10 is the tunnel used to carry the PW 2. In the above VPLS service instance, the controller 1 determines that the tunnel whose tunnel identifier is TUNNEL 10 is the tunnel used to carry the PW 3.
  • Step 36 The controller1 generates a forwarding entry according to the tunnel determined in step 35. Specifically, the Controller1 generates a forwarding entry that records a mapping relationship between the forwarding information of the label 500 and the TUNNEL 10.
  • Step 37 The controller1 sends the forwarding entry generated in step 36 to Device1.
  • Step 38 The Controller1 sends a second label mapping message to the Controlle, where the second label mapping message carries the PW ID, the IP address of the first packet forwarding device controlled by the Controller1, and the second packet forwarding device controlled by the Controlle.
  • the second label mapping message carries the IP address of the PW2, Device1, 1.1.1.1, and the IP address of Device5, 5.5.5.5, and the Controller1 is the PW label 700 allocated by the PW2 between Device1 and Device5.
  • the second label mapping message carries the PW3, the IP address of Devicel 1.1.1.1 and the IP address of Device5 5.5.5.5, and the Controllerl is the PW label 800 allocated by PW3 between Device1 and Device5.
  • Step 39 The control, according to the second packet mapping message, the IP address of the first packet forwarding device and the IP address of the second packet forwarding device, determine the first packet forwarding device and the second packet. A tunnel between the forwarding devices to carry the PW identified by the PW ID.
  • Controlle determines that the tunnel whose tunnel identifier is TUNNEL 10 is the tunnel used to carry PW 2. In the above VPLS instance, Controlle determines that the tunnel whose tunnel identifier is TUNNEL 10 is the tunnel used to carry PW 3.
  • Step 310 The Controlle generates a forwarding entry according to the tunnel determined in step 39. Specifically, in the foregoing VLL service instance, the Controlle generates a record with a label 700 and
  • the Controlle In the above VPLS service instance, the Controlle generates a forwarding entry that records the mapping relationship between the forwarding information of the tag 800 and the TUNNEL 10.
  • Step 311 The controll sends the forwarding entry generated in step 310 to Device5.
  • Controllerl and Controlle can use similar methods to allocate PW labels and generate forwarding entries for PWs between other packet forwarding devices participating in L2VPN, which are not described here.
  • step 32 to step 33 may be that Controller1 first sends a member discovery message to Controlle, or Controlle first sends a member discovery message to Controller1.
  • the discovery process may also be two interactive member discovery messages as shown in FIG. 3A, or only one member discovery message, for example, only the member discovery message sent by Controller1 to the Controlle, or only Controlle. Member discovery message sent to Controllerl.
  • the controller 1 sends the second label mapping message according to the IP address of the first packet forwarding device and the IP address of the second packet forwarding device in the previously received first label mapping message, that is, the first In the label mapping message, the PW uniquely determined by the PW ID, the IP address of the first packet forwarding device, and the IP address of the second packet forwarding device allocates another label, in which case the second label mapping message does not need to depend on the second The member found the message.
  • Controller1 and Controlle exchange labels on the same PW, and generate forwarding entries for the packet forwarding devices at both ends of the PW. This implements bidirectional forwarding of data on this PW.
  • Controller1 selects the IP address of a packet forwarding device (for example, the IP address of device5) according to the address list of the packet forwarding device controlled by the Controlle in the second member discovery message received before. And selecting, in the packet forwarding device controlled by the controller1 and establishing the PW identified by the PW ID in the second member discovery message, a packet forwarding device (for example, an IP address of the device1), which is the PW between the device1 and the device5. ID office The identified PW allocates a PW label, generates a second label mapping message according to the IP addresses of device1 and device5, and the allocated PW label, and generates a second label mapping message to Controller2. It can be seen that in this case, the second tag mapping message does not need to depend on the first tag mapping message.
  • the label assignment process performed by Controllerl can be independent of the label assignment process performed by Controlle.
  • the classification condition may be that the L2VPN services with different characteristics are classified into one class, or the L2VPN service of the same carrier is classified.
  • the label mapping message and the member discovery message sent by the controller may also carry a group identifier (ID).
  • ID group identifier
  • the first label mapping message sent by the Controlle in FIG. 3A and the second member discovery message further carry the Group ID assigned by the Controlle to the PW ID.
  • the second label mapping message sent by the controller1 and the first member discovery message further carry the Group ID allocated by the Controller1 to the PW ID.
  • the label mapping message carries two IP addresses, a PW ID, and a PW label.
  • the specific carrying mode can be flexibly set, as long as the receiver of the label mapping message can be correctly configured. It is to be understood that the information carried in the present invention is not limited to the embodiment of the present invention.
  • This embodiment uses a first label mapping message in step 21 of FIG. 2 or step 34 of FIG. 3 as an example to introduce a specific carrying manner.
  • the first label mapping message includes two data structures of type-Length-Value (TLV), and the latter is called a TLV, and one of them is a Forwarding Equivalence Class (Forwarding Equivalence Class, The cartridge is called FEC) TLV, and the other is the label TLV.
  • TLV type-Length-Value
  • FEC Forwarding Equivalence Class
  • the existing FEC TLV is extended to carry more information, that is, the IP address of a packet forwarding device controlled by the first label mapping message sender controller (ie, the foregoing The IP address of the packet forwarding device and the IP address of a packet forwarding device controlled by the first label mapping message receiver (ie, the IP address of the first packet forwarding device mentioned above). Please refer to Table 2 for details:
  • the content of the Type (Type) field of the FEC TLV indicates that the value field of the FEC TLV specifically includes the PW ID field, the first proxy node address field (ie, the first one in Table 2)
  • the Proxied Node Address field which can also be recorded as the Local Proxied Node Address field) and the second proxy node address field (ie the second Proxied Node in Table 2)
  • the Address field may also be recorded as a Remote Proxied Node Address field;
  • the PW ID is carried in the PW ID field (ie, the PW ID field in Table 2) in the FEC TLV, and the second packet is forwarded.
  • the IP address of the device is carried in the first proxy node address field, and the IP address of the first packet forwarding device is carried in the second proxy node address field.
  • the PW label allocated by the second controller is carried in the label TLV.
  • the above names of FEC TLV and tag TLV are only used to distinguish different TLVs in the same tag mapping message, and can also be named by the first TLV or the second TLV. If the FEC TLV is named the first TLV, the tag TLV is named the second TLV.
  • the member discovery message carries the PW ID and the IP address of at least one packet forwarding device, and the specific carrying manner can be flexibly set, as long as the receiver of the member discovery message can correctly parse the output according to the setting. It is to be understood that the specific examples are not to be construed as limiting the embodiments of the present invention.
  • a second member discovery message in step 33 of FIG. 3A is taken as an example to introduce a specific carrying manner.
  • the second member discovery message includes a TLV.
  • the TLV in the second member discovery message is referred to herein as a third TLV, specifically:
  • the content of the Type field in the third TLV indicates that the PW ID (the PW ID field in Table 3) is carried in the value field in the third TLV, and Describe the address of the second packet forwarding device and the establishment of the PW ID by the second Controller control
  • the IP address of the other packet forwarding device of the PW (the Addresses field in Table 3).
  • the value of the Address Family field in Table 3 is used to indicate whether the Addresses field is filled in with an IPv6 address or an IPv4 address.
  • the first label mapping message and the second member discovery message further carry a Group ID allocated by the second controller to the PW ID;
  • the Group ID is carried in a group field (Group ID field in Table 2) included in a value field of the first TLV;
  • the Group ID is carried in a group field (Group ID field in Table 3) included in the value field of the third TLV.
  • the forwarding entry generated by the Controller1 in FIG. 2 and FIG. 3A according to the first label mapping message further records: an outbound interface parameter and a next hop on the second packet forwarding device.
  • the forwarding entry generated by the controller1 also records the interface parameters of the device 5 (for example, the network type of the outbound interface is Ethernet or asynchronous transmission mode, etc.) and the next hop.
  • the two controllers in order to avoid that the foregoing discovery process or label switching process is not supported by at least one of the controllers (for example, the above sending label mapping message or member discovery message is not supported, or Map the message or member to the received tag
  • the bandwidth is wasted due to the correct resolution of the message to obtain the PW ID, the IP address of the packet forwarding device, etc.
  • the two controllers Before the discovery process or the label distribution process, the two controllers need to confirm that the other party has the above discovery process. And the ability to assign processes to labels.
  • the discovery process is required to determine which packet forwarding devices controlled by the peer controller need to establish an L2VPN service with the packet forwarding device controlled by the controller
  • the foregoing discovery process and label distribution process are performed before the discovery process is performed.
  • the capability negotiation in the case that the packet forwarding device controlled by the peer controller needs to establish an L2VPN service with the packet forwarding device controlled by the controller, does not need to pass the discovery process, and the two controllers only pass before the label allocation process.
  • the method further includes: the Controller1 negotiates with the Controlle, and mutually confirms the Controlle Having the ability to send the first label mapping message and the second member discovery message, and the Controller 1 has the capability of parsing the first label mapping message and the second member discovery message; confirming that the Controlle has the sending After the first tag mapping message and the capability of the second member discovery message, and the Controller 1 has the capability of parsing the first tag mapping message and the second member discovery message, the Controller1 performs the receiving from the The first label mapping message of the Controlle and the step of the second member discovery message.
  • the two PWs participating in the L2VPN service may have at least two PWs in active/standby mode.
  • the standby PW may be used to transmit service packets.
  • a mechanism is required between the controllers to determine the active and standby status of the PW.
  • the L2VPN establishment method shown in FIG. 2 after the establishment of the session between the controller1 and the Controlle, further includes: the controller1 receives the notification message sent by the Controlle, where the notification message carries the PW ID and the first packet forwarding device.
  • the IP address, the IP address of the second packet forwarding device, and the status identifier are used to indicate the status of the PW identified by the PW ID between the first packet forwarding device and the second packet forwarding device. Status or standby status.
  • the specific carrying mode can be flexibly set. As long as the receiver of the notification message can correctly parse the carried information according to the setting, a specific example is not to be construed as limiting the embodiment of the present invention.
  • Said The notification message contains two TLVs, namely the FEC TLV and the status indication TLV.
  • the format of the FEC TLV is the same as that of Table 2. It also extends the existing FEC TLV to enable it to carry more information.
  • the FEC TLV carried in the notification message is referred to as a fourth TLV, a class point address field of the fourth TLV (similar to the first Proxied Node Address field in Table 2), and a second proxy node address field (similar to that in Table 2).
  • a second Proxied Node Address field the PW ID of the second packet forwarding device is carried in the first proxy node address field, and the IP address of the first packet forwarding device is carried in the The second proxy node is in the address field.
  • the status identifier is carried in the status indication TLV, and the status indication TLV is also referred to as a fifth TLV, and the status identifier includes an active status identifier and a standby status identifier.
  • the controller 1 may record the active/standby state of the PW in the generated forwarding entry, so that the first packet forwarding device refers to the forwarding service packet.
  • the PW can learn the local MAC address of the second packet forwarding device. A MAC forwarding entry that is mapped to the PW label.
  • the device After receiving the service packet, the device determines the corresponding PW label according to the destination MAC address and the MAC forwarding entry in the packet, and then determines the sending packet by using the label forwarding entry. The tunnel used.
  • the local MAC address of the second packet forwarding device includes a MAC address of the second packet forwarding device and a MAC address of another network device obtained by the second packet forwarding device through an access circuit (AC) connection.
  • AC access circuit
  • the PW label 500 assigned to the PW1 by the Controlle causes the MAC forwarding entry to be associated with the label forwarding entry.
  • Devicel receives the destination address as 55-55-55-55-55-55 or 51-51-51-51.
  • the label 500 in the publication item finds the tunnel 100 in the corresponding label forwarding entry, encapsulates the forwarding information of the tunnel identifier TUNNEL 10 and the PW label 500 in the header of the packet, and then sends the encapsulated packet to the device 5 through the tunnel.
  • the network status may change at any time, for example, some packet forwarding devices may fail, or may be manually removed, etc., and the original correct forwarding processing cannot be performed.
  • the MAC forwarding entry is updated to stop forwarding to the failed packet.
  • the device sends packets to avoid large packet delays and retransmission of a large number of packets due to delay packet loss, thereby improving network transmission performance.
  • the method for establishing the L2VPN service provided by the embodiment of the present invention, after the failure of a packet forwarding device controlled by the controller, is required to notify the MAC address of the packet forwarding device that is faulty by other controllers by using the MAC address clearing message.
  • the Controller needs to notify the packet forwarding device that received the forwarding entry to clear the forwarding entry related to the failed packet forwarding device.
  • FIG. 3C following the flow shown in FIG. 2, it is assumed that the second packet forwarding device (device5 in FIG. 3B) is a failed packet forwarding device, and the forwarding entry is generated in Controller1 and the forwarding entry is generated. After being sent to the first packet forwarding device (devicel in FIG. 3B), the method further includes:
  • Step 301 The Controller1 receives a MAC address clearing (Withdraw) message sent by the Controlle, where the MAC address clearing message carries an IP address and a MAC address list carrying the first packet forwarding device.
  • the MAC address clear message carries a list of IP addresses and MAC addresses carrying Device1.
  • Step 302 If the MAC address list in the MAC address clear message is empty, the first controller indicates the first packet according to the IP address of the first packet forwarding device in the MAC address clear message.
  • the forwarding device clears all the saved MAC forwarding entries, and the mapping between the MAC address and the PW label allocated by the second controller is recorded in the MAC forwarding entry. In an example, if the MAC address list is empty, Device1 clears all saved MAC forwarding entries.
  • Step 303 If the MAC address list carries the local MAC address of the second packet forwarding device, the first controller clears the IP address of the first packet forwarding device according to the MAC address clearing message. Instructing the first packet forwarding device to clear the saved record with the book a MAC forwarding entry of the MAC address in the MAC address list, which obviously includes a MAC forwarding entry in which the mapping between the MAC address in the local MAC address list and the PW label allocated by the second controller is recorded.
  • the local MAC address of the second packet forwarding device includes the MAC address of the second packet forwarding device and the MAC address of the other network device learned by the second packet forwarding device through the AC connection.
  • An embodiment of the present invention provides a method for establishing an L2VPN that is adapted to an SDN network architecture. From a perspective of a controller, the first controller receives the first label mapping message from the second controller.
  • the first label mapping message carries a pseudowire PW identifier ID, an IP address of the first packet forwarding device controlled by the first controller, an IP address of the second packet forwarding device controlled by the second controller, and
  • the second controller is a PW label allocated by the PW identified by the PW ID between the first packet forwarding device and the second packet forwarding device, and the first controller first label mapping message carries the The IP address of the first packet forwarding device and the IP address of the second packet forwarding device perform an address iterative process, and determine that the PW ID is carried between the first packet forwarding device and the second packet forwarding device.
  • the first controller generates a forwarding entry according to the determined tunnel, and sends the forwarding entry to the first packet forwarding device, where the forwarding Records the mapping relationship and the PW label forwarding information to the tunnel. That is, in the SDN network architecture, the controller performs the function of negotiating the PW label, generating the routing forwarding table, and sending the routing forwarding table to the packet forwarding device controlled by the controller, and the packet forwarding device sends the forwarding table according to the controller. The item forwards the message.
  • the goal of controlling the PW information and the packet forwarding device to undertake the forwarding task is realized, and the advantage of separating the SDN control and forwarding functions is fully utilized.
  • Embodiment 2 Embodiment 2
  • the controller centrally manages the PW information of the controlled packet forwarding device. That is, the Controller stores the correspondence between the packet forwarding device and the PW ID, that is, which packet forwarding devices participate.
  • the L2VPN services corresponding to the PW IDs such as the management information saved by Controller1, are shown in Table 4.
  • the PW ID in the first label mapping message received by the controller 1 is the PW7 in the table 4
  • the first label mapping message is determined by the Controlle to allocate a PW label to the PW identified by the PW7 on the Device1 controlled by the Controller1, and the PW cannot be uniquely determined by parsing the IP address of the packet forwarding device carried in the first label mapping message.
  • a scenario in which the L2VPN service is specifically a VLL service is proposed, and a schematic scheme of the L2VPN is proposed.
  • the schematic diagram of the scenario can still be referred to FIG.
  • Step 41 The controller 1 receives a first label mapping message from the Controlle, where the first label mapping message carries a PW ID, and the second packet forwarding device controlled by the Controlle is the second packet forwarding device. An endpoint device.
  • the controller 1 receives the first label mapping message by using a BGP session or an LDP remote session established by the Controlle based on the IP address in advance; for detailed process of establishing the remote session, refer to the related standard document or the existing document. It will not be detailed here.
  • the first packet forwarding device is Device4 and the second packet forwarding device is Device P, Device 4, and Device 7 have established a PW with a PW ID of PW7.
  • the PW label assigned to the PW with the PW ID of PW7 between Device 4 and Device 7 is 100.
  • the first label mapping message carries the IP addresses 7.7.7.7, PW7, and 100 of Device 7.
  • the specific carrying method can be pre-agreed by Controllerl and Controlle, and is not limited here.
  • Step 42 The controller1 queries, from the corresponding relationship between the saved PW ID and the packet forwarding device controlled by the controller1, the first packet forwarding device corresponding to the PW ID carried in the first label mapping message, where the first packet is The forwarding device is another endpoint device of the PW.
  • the controller can determine the PW identified by the PW ID in all the packet forwarding devices controlled by the controller according to the PW ID carried in the first label mapping message.
  • One of the endpoints is which of the packet forwarding devices.
  • Controllerl queries from Table 4 that the packet forwarding device corresponding to PW7 is Dcvicc4.
  • Step 43 The controller1 determines, according to the IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried in the first label mapping message, the first packet forwarding device and the first A tunnel between the two packets forwarding device to carry the first PW.
  • Controller1 queries the IP address of Table 4.4 to correspond to the tunnel identifier of 4.4.4.4-7.7.7.7 as TUNNEL 40, and then determines that the tunnel with the tunnel identifier of TUNNEL 40 is a tunnel with 7 PW 7.
  • Step 44 The controller1 generates a forwarding entry according to the determined tunnel, and sends the forwarding entry to the first packet forwarding device, where the forwarding entry records the PW label and the Mapping relationship of forwarding information of the tunnel.
  • the controller 1 generates a forwarding entry that records the mapping relationship between the label 100 and the forwarding information of the TUNNEL 40 according to the tunnel identifier TUNNEL 40 determined in step 43 and the label 100 carried in the first label mapping message, and The forwarding entry is sent to Device4.
  • the first packet forwarding device may send the L2 service packet to the second packet forwarding device.
  • the device encapsulates the packet according to the forwarding entry to implement the L2VPN service.
  • the controller1 generates the forwarding entry of Device4 to Device7 for Device1.
  • Device4 sends the L2 service packet to Device7
  • Head package The tunnel identifies the forwarding information of the TUNNEL 40 and the PW label 100, and then sends the encapsulated packet to the Device 7.
  • Controlle As the transmission of the packet is bidirectional, the Controlle also needs to generate a forwarding entry to Device4 for Device7 according to the second label mapping message sent by Controller1.
  • FIG. 5 is a schematic diagram of a method for establishing an L2VPN according to an embodiment of the present invention.
  • the controllers and Controlles that are mutually peer devices use a label allocation process to establish a VLL with a PW.
  • the packet forwarding device of the service generates a forwarding entry.
  • Step 51 Controllerl and Controlle establish a session.
  • the session can be an LDP session or a BGP session.
  • Step 52 The Controlle sends a first label mapping message to the controller1, where the first label mapping message carries the IP address 7.7.7.7 of the PW7 and the Device7, and the PW label 100 allocated by the Controlle to the PW7, where Device7 is An endpoint device for PW7.
  • Step 53 The controller1 queries, from the correspondence between the saved PW ID and the packet forwarding device controlled by the controller1, the packet forwarding device corresponding to the PW7 carried in the first label mapping message to be Device4, where Device4 is another of the PW7. For an endpoint device, perform steps 54 and 57.
  • the IP address of Device7 carried in the mapping message is 7.7.7.7.
  • the tunnel used to carry PW7 between Device4 and Device7 is TUNNEL 40.
  • the publication item records the mapping relationship between the PW label 100 carried by the first label mapping message and the forwarding information of the tunnel TUNNEL 40.
  • Step 56 The controller 1 sends the forwarding entry generated in step 55 to Device 4.
  • Step 57 The Controller1 sends a second label mapping message to the Controlle, where the second label mapping message carries the IP address 4.4.4.4 of the PW7 and Device4, and the PW label 200 allocated by the Controller1 to the PW7, where Device4 is Another endpoint device for PW7.
  • Step 58 The Controlle queries the packet forwarding device corresponding to the PW7 carried in the second label mapping message from the saved PW ID and the packet forwarding device controlled by the controller1 as Device7.
  • the IP address of Device 4, which is carried in the mapping message, is 4.4.4.4.
  • the tunnel used to carry PW7 between Device 4 and Device 7 is TUNNEL 40.
  • Step 510 The control, according to the determined tunnel, generates a forwarding entry, where the forwarding entry records a mapping relationship between the PW label 200 carried by the second label mapping message and the forwarding information of the tunnel TUNNEL 40.
  • Step 511 The Controlle sends the forwarding entry generated in step 510 to Device7.
  • Controllerl and Controlle allocate PW labels to PW7 between Device4 and Device7, and generate forwarding entries for Device4 and Device7.
  • the label mapping message and the member discovery message sent by the controller may also carry the group ID.
  • the first label mapping message sent by the Controlle in FIG. 5 also carries the Group ID assigned by the Controlle to the PW 7.
  • the second label mapping message sent by the controller1 also carries the Group ID allocated by the Controller1 for the PW 7.
  • Figure 4 and Figure 5 show that the label mapping message carries an IP address, PW ID, and PW label.
  • the specific carrying mode can be flexibly set. As long as the receiver of the label mapping message can be correctly set according to the setting. It is to be understood that the specific information is not limited to the embodiment of the present invention.
  • This embodiment takes a first label mapping message in step 41 of FIG. 4 or step 52 of FIG. 5 as an example to introduce a specific carrying manner.
  • the first label mapping message includes two TLVs, one of which is a FEC TLV and the other is a label TLV.
  • the existing FEC TLV is extended to carry more information, that is, the IP address of a packet forwarding device controlled by the first label mapping message sender controller (ie, the foregoing The IP address of the second packet forwarding device).
  • the IP address of a packet forwarding device controlled by the first label mapping message sender controller ie, the foregoing The IP address of the second packet forwarding device.
  • the content of the Type (Type) field of the FEC TLV indicates that the value field of the FEC TLV specifically includes a PW ID field, a proxy node address field (ie, a Proxied Node Address field in Table 2;
  • the PW ID is carried in the PW ID field (ie, the PW ID field in Table 5) in the FEC TLV, and the IP address of the second packet forwarding device is carried. Bring in the proxy node address field.
  • the PW label allocated by the second controller is carried in the label TLV.
  • FEC TLV and tag TLV are only used to distinguish different TLVs in the same tag mapping message, and can also be named by the first TLV or the second TLV. If the FEC TLV is named the first TLV, the tag TLV is named the second TLV.
  • the first label mapping message further carries the group ID allocated by the second controller to the PW ID; the group ID is carried in a group field included in a value field of the first TLV (Table 6 In the Group ID field).
  • the forwarding entry generated by the controller1 further records: an inbound interface of the first packet forwarding device.
  • the process of generating a forwarding entry by the controller1 includes: the inbound interface of the first packet forwarding device controlled by the saved Controller1 and the PW ID according to the PW ID identifier in the first label mapping message. And mapping the inbound interface of the first packet forwarding device corresponding to the PW ID identifier; generating a forwarding entry, and sending the forwarding entry to the first packet forwarding device, where the forwarding entry includes The inbound interface of the first packet forwarding device, and the mapping relationship between the PW label allocated by the PW and the forwarding information of the tunnel.
  • the packet forwarding device forwards the packet according to the mapping relationship between the inbound interface, the PW label, and the tunnel forwarding information in the forwarding entry.
  • the inbound interface 1 of Device1 corresponds to PW7
  • the forwarding entry generated by the controller1 records the forwarding information mapping relationship between the PW label 100 and the TUNNEL 40.
  • Device 4 After receiving the packet on the inbound interface 1, Device 4 encapsulates the TUNNEL 40 in the header of the packet. The forwarding information and the PW label 100 are then sent to the Device 7 through the tunnel.
  • the method further includes: determining, by negotiation, the capability of the other party to send or parse the label mapping message.
  • determining, by negotiation, the capability of the other party to send or parse the label mapping message Reference may be made to the related description in Embodiment 1, and details are not described herein again.
  • the embodiment of the present invention provides a solution for establishing a VLL service.
  • the message of the two controllers interacting when establishing the L2VPN is saved. Quantity, further saving network bandwidth resources and improving the establishment
  • the previous embodiment describes the solution for establishing L2VPN in the scenario of two controllers.
  • the existing traditional network architecture the control function and the forwarding function are not separated
  • the SDN network architecture may coexist in a certain period of time.
  • Figure 6 shows a simplified example of two network architecture coexistence scenarios.
  • the controller includes one Controller and one traditional network device, namely Controller 1 and Traditional_IP_Node.
  • the IP address of Controller1 is 10.10.10.1 and Traditional_IP_Node.
  • the IP address is 10.10.10.2.
  • the Controllerl control has four packet forwarding devices, namely Devicel, Device2, Device3, and Device4.
  • the IP address of Device1 is 1.1.1.1
  • the IP address of Device2 is 2.2.2.2
  • the IP address of Device3 is 3.3.3.3.
  • the address is 4.4.4.4. How to provide a method for establishing L2VPN in the scenario where the two network architectures coexist, this becomes a problem that needs to be solved.
  • the embodiment of the invention provides a method for establishing an L2VPN in a scenario where a traditional network architecture and an SDN network architecture coexist.
  • Step 701 The network device receives a first label mapping message from the controller, where the first label mapping message carries a PW ID, an IP address of a packet forwarding device controlled by the Controller1, an IP address of the network device, And the controller is the packet forwarding device, and optionally, the network device receives the first label mapping message by using a BGP session or an LDP remote session established by the controller based on the IP address in advance; establishing a remote session
  • the L2VPN service in this embodiment may be a multi-point to multi-point VPLS service, or may be a point-to-point VLL service.
  • the PW ID of the PW between the Device 1 and the Traditional_IP_Node is set to 300, and the PW ID of the PW between the Device 1 and the Traditional_IP_Node is 300.
  • the first label mapping message carries 1.1.1.1, 10.10.10.2, PW 5, and 300.
  • the specific carrying mode may be pre-agreed by Controllerl and Traditional_IP_Node, and is not limited herein.
  • Step 702 The network device is configured according to the established tunnel between the packet forwarding device and the network device, the IP address of the packet forwarding device, and the IP address of the network device, and the first Determining, between the packet forwarding device and the network device, a tunnel for the PW identified by the PW ID, between the IP address of the packet forwarding device and the IP address of the network device, .
  • a tunnel is established in advance between the packet forwarding device and the network device.
  • the tunnel may be an MPLS tunnel or an IP tunnel.
  • the network device saves the mapping between the tunnel and the IP address pairs of the devices at both ends of the tunnel.
  • the Controller also saves the tunnels on the packet forwarding device controlled by the Controller and the devices at both ends of the tunnel. Mapping relationship of IP address pairs. Tunnels are usually represented by TUNNEL IDs.
  • mapping relationship between the tunnels saved in the Traditional_IP_Node and the IP address pairs of the devices at both ends of the tunnel is as shown in Table 6.
  • the first label mapping message carries 1.1.1.1, 10.10.10.2, PW 5, and 200.
  • the traditional_IP_Node queries the IP address of Table 10.
  • the tunnel identifier corresponding to 10.10.10.2-1.1.1.1 is TUNNEL 11, and the tunnel identifier is determined as The tunnel of TUNNEL 11 is used to carry PW 5 Tunnel.
  • Step 703 The network device generates a forwarding entry according to the determined tunnel, where the forwarding entry records a mapping relationship between the PW label and the forwarding information of the tunnel.
  • the Traditional_IP_Node generates a forwarding entry in which the mapping between the forwarding information of the TUNNEL 11 and the label 200 is generated according to the tunnel identifier TUNNEL 11 determined in step 502 and the label 500 carried in the first label mapping message.
  • the traditional_IP_Node may encapsulate the packet according to the forwarding entry when the L2 service packet needs to be sent to the device1, so as to implement the L2VPN service, for example, encapsulating the tunnel TUNNEL 11 in the packet header.
  • the information and the PW label 200 are forwarded, and then the encapsulated packet is sent to Device1.
  • Steps 701 to 703 are described by taking the example of the primary label allocation in the case of establishing the L2VPN, that is, only how the traditional_IP_Node obtains the forwarding entry required for the L2VPN with the device1 as an example.
  • a multi-point VPLS service needs to perform multiple similar label allocation processes to generate forwarding entries for multiple packet forwarding devices and traditional network devices participating in the VPLS service. For example, as shown by the dotted line in Figure 6, when the VPLS service is established between Devicel, Device2, Device3, and Traditional_IP_Node controlled by Controller1, the Traditional_IP_Node needs to perform multiple steps 501 to 503 to generate the Traditional_IP_Node to Devicel, Device2, and Device3. Forward the entry. Similarly, since the packet transmission is bidirectional, Controllerl also needs to generate a forwarding entry to Traditional_IP_Node for Devicel ⁇ Device3.
  • the Traditional_IP_Node needs to perform step 701 to step 703 to generate a forwarding entry to Device1.
  • the traditional network device can learn, according to the pre-configuration, which L2VPN service needs to be established by the traditional network device according to the pre-configuration.
  • the Traditional_IP_Node is configured to establish a VPLS service with a VSI ID of 5, which is required to be associated with a packet forwarding device controlled by a certain controller.
  • the traditional network device can learn, according to the pre-configuration, which L2VPN services need to be established by the packet forwarding device that the traditional network device needs to control with the controller that is the peer of the label distribution.
  • the Controller that assigns the peer to the label can also know which L2VPN services need to be established with which legacy network devices.
  • the traditional_IP_Node is configured to establish a VPLS service with a VSI ID of 5, which is required to be associated with the packet forwarding devices Devicel ⁇ Device3 controlled by the controller1. It is also possible to discover which L2VPN services the legacy network device needs to establish with the packet forwarding devices controlled by the controller by the discovery process performed before the label mapping message is sent or received.
  • the discovery process in this embodiment is basically similar to the discovery process in the first embodiment, and will not be repeated here.
  • FIG. 8 is a flowchart of a method for establishing an L2VPN according to an embodiment of the present invention.
  • the traditional_IP_Node first determines a packet forwarding device to be established by the peer Controller1 to be established by the peer Controller1, and The label allocation process generates a forwarding entry to the packet forwarding device for the Traditional_IP_Node.
  • the L2VPN service here can be a point-to-point VLL service or a multi-point to multi-point VPLS service, which will be illustrated separately.
  • Step 81 Controllerl and Traditional_IP_Node establish a session.
  • the session can be an LDP session or a BGP session.
  • Step 82 The Traditional_IP_Node sends a first member discovery message to the controller1 through the established session, where the first member discovery message carries the IP address of the PW ID and the Traditional_IP_Node.
  • the first member discovery message is optional because Controllerl has established a session with Traditional_IP_Node, so Controllerl has obtained the IP address of Traditional_IP_Node, so Traditional_IP_Node does not need to send a member discovery message to Controllerl.
  • Step 83 The Controller1 sends a second member discovery message to the Traditional_IP_Node through the established session, where the second member discovery message carries the PW ID, and the packet forwarding device controlled by the Controller1 to establish the PW identified by the PW ID. List of addresses.
  • the address list carried in the second member discovery message has only one packet forwarding device address. For example, if a VLL service is established between Traditional_IP_Node and Device1, and the PW ID of the service is PW 4, the second member discovery message carries the PW 4 and Devicel ⁇ IP address 1.1.1.1.
  • the address list carried in the second member discovery message has at least one packet forwarding device. the address of. For example, suppose Traditional_IP_Node A VPLS service is established between Device1 and Device3. The PW ID of the service is PW5.
  • the second member discovery message carries the address lists 1.1.1.1, 2.2.2.2, and 3.3.3.3 of PW5 and Devicel ⁇ Device3.
  • Step 84 The controller1 sends a first label mapping message to the Traditional_IP_Node, where the first label mapping message carries a PW ID, an IP address of the first packet forwarding device controlled by the Controller1, an IP address of the Traditional_IP_Node, and the Controller1 is a PW label allocated by the PW identified by the PW ID between the first packet forwarding device and the Traditional_IP_Node.
  • the first label mapping message carries the IP address of the PW4, Device1, 1.1.1.1, and the IP address of the Traditional_IP_Node, 10.10.10.2, and the PW label 800 allocated by the Controller1 to the PW4 between the Device1 and the Traditional_IP_Node.
  • the first label mapping message carries the IP address 1.1.1.1 and the Traditional_IP_Node address 10.10.10.2 of the PW5, Device1, and the PW label 900 allocated by the Controller1 to the PW5 between the Devicel and the Traditional_IP_Node.
  • the first label mapping message may also be a label for carrying the PW allocated between the Traditional_IP_Node and the other packet forwarding devices controlled by the Controller1.
  • the first label mapping message carries the IP address 10.10.10.2 and Device2 of the Traditional_IP_Node.
  • the IP address 2.2.2.2, and the Controllerl is the PW label assigned to the PW5 between the Traditional_IP_Node and Device2.
  • the label allocation process between Traditional_IP_Node and Device1 is used as an example.
  • the label distribution process between other packet forwarding devices is similar, and is not described.
  • Step 85 The Traditional_IP_Node determines, according to the IP address of the first packet forwarding device and the IP address of the Traditional_IP_Node carried in the first label mapping message, the first packet forwarding device and the Traditional_IP_Node are used to carry the PW ID. Identify the tunnel of the PW.
  • the controller 1 determines that the tunnel whose tunnel identifier is TUNNEL 11 is the tunnel used to carry the PW4. For a specific tunnel iteration process, refer to the corresponding description of FIG. 3A, which is not repeated here.
  • the controller 1 determines that the tunnel whose tunnel identifier is TUNNEL 11 is the tunnel used to carry the PW5. For a specific tunnel iteration process, refer to the corresponding description of FIG. 3A, which is not repeated here.
  • Step 86 The Traditional_IP_Node generates the forwarding according to the tunnel determined in step 85.
  • the entry is stored.
  • Step 87 The Traditional_IP_Node sends a second label mapping message to the controller1, where the second label mapping message carries the PW ID, the IP address of the first packet forwarding device controlled by the Controller1, the IP address of the Traditional_IP_Node, and the Traditional_IP_Node is a PW label allocated by the PW identified by the PW ID between the first packet forwarding device and the Traditional_IP_Node.
  • the second label mapping message carries the IP address of the PW4, Device1, 1.1.1.1 and the IP address of the Traditional_IP_Node, 10.10.10.2, and the Traditional_IP_Node is the PW label 1000 allocated to the PW4 between the Traditional_IP_Node and the Device1.
  • the second label mapping message carries the IP address of the PW5, Device1, 1.1.1.1 and the IP address of the Traditional_IP_Node, 10.10.10.2, and the Traditional_IP_Node is the PW label 1100 allocated to the PW5 between the Traditional_IP_Node and Device1.
  • Step 88 The controller 1 determines, according to the IP address of the first packet forwarding device and the IP address of the Traditional_IP_Node that is carried by the second label mapping message, that the first packet forwarding device and the Traditional_IP_Node are used to carry the PW.
  • the tunnel of the PW identified by the ID.
  • the process of tunneling the Controller1 is basically similar to the description in the first embodiment, and will not be repeated here. It is assumed that, in the above-mentioned VLL service instance, the controller determines that the tunnel whose tunnel identifier is TUNNEL 11 is the tunnel that carries the PW 4. In the VPLS service instance, the controller 1 determines that the tunnel whose tunnel identifier is TUNNEL 11 is the tunnel used to carry the PW 5. . For the specific tunnel iteration process, please refer to the corresponding description of FIG. 2, which will not be repeated here.
  • Step 89 The controller1 generates a forwarding entry according to the tunnel determined in step 88. Specifically, in the foregoing VLL service instance, the controller1 generates a forwarding entry that records a mapping relationship between the TUNNEL 11 and the label 1000.
  • Controllerl In the above VPLS service instance, Controllerl generates records with TUNNEL 11 and tags. The forwarding entry of the mapping relationship between 1100.
  • Step 810 The controller1 sends the forwarding entry generated in step 89 to Device1.
  • the first label mapping message and the second label mapping message may have a sequential relationship or a sequential relationship:
  • the traditional_IP_Node sends a second label mapping message according to the IP address of the first packet forwarding device in the first label mapping message received, that is, the PW ID in the first label mapping message,
  • the PW uniquely determined by the IP address of a packet forwarding device and the IP address of the Traditional_IP_Node assigns another tag, in which case the second tag mapping message does not need to rely on the second member discovery message.
  • the Controllerl and Traditional_IP_Nodes interact with each other through a label mapping message, respectively assigning a label to the same PW, and generating a forwarding entry for the first packet forwarding device and the Traditional_IP_Node at both ends of the PW, thereby realizing bidirectional forwarding of data on the PW.
  • the second member discovery message is also unnecessary.
  • Traditional_IP_Node selects the IP address of a packet forwarding device (for example, the IP address of devicel) according to the address list of the packet forwarding device controlled by Controller1 in the previously received second member discovery message. And assigning a PW label to the PW identified by the PW ID between the Traditional_IP_Node and the device1, generating a second label mapping message according to the IP addresses of the Traditional_IP_Node and the device1 and the allocated PW label, and generating the second label mapping message to the Controllers. In this case, the second tag mapping message does not need to rely on the first tag mapping message.
  • the label allocation process performed by Traditional_IP_Node can be independent of the label allocation process performed by Controller1.
  • the label mapping message and the member discovery message sent by the controller or the traditional network device are used.
  • the first label mapping message and the second member discovery message sent by the controller 1 in FIG. 8 further carry the Group ID allocated by the Controller for the PW ID.
  • the second tag mapping message sent by the Traditional_IP_Node and the first member discovery message further carry a Group ID assigned by the Traditional_IP_Node to the PW ID.
  • the specific carrying manners of the label mapping message carrying the IP address, the PW ID, and the PW label in FIG. 7 and FIG. 8 are basically similar to those in the first embodiment.
  • only the first label mapping message in step 84 of FIG. 8 is For example, introduce a specific carrying method.
  • the PW ID is carried in the PW ID field (ie, the PW ID field in Table 2) in the FEC TLV, and the first packet is forwarded.
  • the IP address of the device is carried in the first proxy node address field, and the IP address of the legacy network device is carried in the second proxy node address field.
  • PW4 is carried in the PW ID field
  • the IP address 1.1.1.1 of Device1 is carried in the first proxy node address field
  • the IP address 10.10.10.2 of Traditional_IP_Node is carried in the second proxy.
  • the PW tag 800 allocated by the Controller 1 is carried in the tag TLV.
  • PW5 is carried in the PW ID field
  • the IP address 1.1.1.1 of Device1 is carried in the first proxy node address field
  • the IP address 10.10.10.2 of Traditional_IP_Node is carried in the second proxy node address.
  • the PW tag 900 allocated by the Controller1 is carried in the tag TLV.
  • the member of FIG. 8 finds that the specific carrying manner of the message carrying the PW ID and the IP address is similar to that in the first embodiment.
  • the second member in the step 84 is found to be in the same manner as in the first embodiment. No longer repeat.
  • the second member discovery message includes a TLV. In order not to be confused with the TLV in the previous label mapping message, the second member is found in the message.
  • the TLV is called a third TLV. Specifically, the content of the Type field (PW type field in Table 3) in the third TLV indicates that the PW ID is carried in the value field in the third TLV. (PW ID field in Table 3), and the IP address of the legacy network device, such as Traditional_IP_Node (Addresses field in Table 3).
  • the first label mapping message and the second member discovery message further carry a group identifier that is allocated by the controller for the PW ID;
  • the group identifier is carried in a group field (Group ID field in Table 2) included in a value field of the first TLV;
  • the group identifier is carried in a group field included in a value field of the third TLV (in Table 3) In the Group ID field).
  • the forwarding entry generated by the Traditional_IP_Node according to the first label mapping message in FIG. 7 and FIG. 8 further records: an outbound interface and a next hop on the packet forwarding device.
  • the interface parameter and the next hop of device1 are also recorded in the forwarding entry generated by the Traditional_IP_Node.
  • the controller 1 sends the forwarding entry to the first packet forwarding device.
  • the MAC forwarding entry stored in the first packet forwarding device also records the Traditional_IP_Node obtained by learning the MAC address.
  • MAC address The MAC address of the Device1 that is learned by the MAC address is also recorded in the MAC forwarding entry generated by the Traditional_IP_Node. It is basically similar to the first embodiment and will not be repeated here.
  • the controller and the traditional network device may negotiate to determine that the other party has the capability of performing the discovery process and the label allocation process.
  • the controller and the traditional network device may negotiate to determine that the other party has the capability of performing the discovery process and the label allocation process.
  • the notification message may further include a status identifier, where the status of the PW identified by the PW ID between the first packet forwarding device and the legacy device is used as an active state or alternately
  • a status identifier where the status of the PW identified by the PW ID between the first packet forwarding device and the legacy device is used as an active state or alternately
  • the method for establishing the L2VPN service provided by the embodiment of the present invention after the failure of a packet forwarding device controlled by the controller, is required to notify the MAC address of the packet forwarding device that fails the traditional network device by using the MAC address clearing message, so as to facilitate the traditional
  • the network is set with reference to the first embodiment, and the basic principle is similar, and will not be described in detail here.
  • the L2VPN establishment solution provided by the embodiment of the present invention is applicable to a network environment in which a traditional network architecture and an SDN network architecture coexist during a transition from a traditional network architecture to an SDN network architecture.
  • the traditional network device establishes a session with the controller, and the traditional network device receives the session.
  • the network device according to the established tunnel between the packet forwarding device and the network device, Corresponding relationship between the IP address of the packet forwarding device and the IP address of the network device, and the IP address of the packet forwarding device carried by the first label mapping message and the Determining, by the IP address of the network device, a tunnel between the packet forwarding device and the network device to carry the PW identified by the PW ID; the network device generating a forwarding entry according to the determined tunnel The forwarding entry records the mapping relationship between the PW label and the forwarding information of the tunnel.
  • the embodiment of the present invention provides a controller. As shown in FIG. 9A, the controller includes a receiving unit 901, a tunnel iteration unit 902, an entry generating unit 903, and an entry sending unit 904.
  • the receiving unit 901 is configured to receive a first label mapping message from another controller, where the first label mapping message carries a pseudowire PW identifier ID, an IP address of the first packet forwarding device controlled by the controller, and a An IP address of the second packet forwarding device controlled by another controller, and the other controller is allocated by the PW identified by the PW ID between the first packet forwarding device and the second packet forwarding device PW label;
  • the tunneling iteration unit 902 is configured to: according to the IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried by the first label mapping message received by the receiving unit 901, and a saved location Corresponding relationship between the established tunnel between the first packet forwarding device and the second packet forwarding device, the IP address of the first packet forwarding device, and the IP address of the second packet forwarding device, a tunnel between the first packet forwarding device and the second packet forwarding device to carry the PW identified by the PW ID;
  • the entry generating unit 903 is configured to generate, according to the tunnel determined by the tunnel iteration unit 902, a label forwarding entry, where the label forwarding entry records a mapping relationship between the PW label and the forwarding information of the tunnel. ;
  • the item delivery unit 904 is configured to send the label forwarding table generated by the entry generation unit 903 to the first packet forwarding device.
  • controller shown in Figure 9A further includes:
  • the sending unit 905 is configured to send, to the another controller, a first member discovery message, where the first member discovery message is carried, before the receiving unit 901 receives the first label mapping message from the another controller. And having the PW ID, an IP address of the first packet forwarding device, and an IP address of another packet forwarding device controlled by the Controller to establish a PW identified by the PW ID.
  • the receiving unit 901 is further configured to receive a second from the another controller. a member discovery message, where the second member discovery message carries the PW ID, the IP address of the second packet forwarding device, and other packet forwarding controlled by the other controller to establish the PW identified by the PW ID. IP address of the device.
  • the sending unit 905 is further configured to: after the receiving unit 901 receives the second member discovery message from the another controller, send a second label mapping message to the another controller, where the The second label mapping message carries the PW ID, the address of the first packet forwarding device controlled by the controller, the address of the second packet forwarding device controlled by the other controller, and the controller is the first packet.
  • the PW label of the PW ID identified by the PW ID between the forwarding device and the second packet forwarding device.
  • the controller shown in FIG. 9A may further include: a negotiating unit 906, configured to receive, at the receiving unit 901, a second member from the another controller. Before the message is found, negotiating with the another controller, confirming that the another controller has the capability of sending the first label mapping message and the second member discovery message, and the controller is configured to parse the first label mapping The ability of the message and the second member to discover the message;
  • a negotiating unit 906 configured to receive, at the receiving unit 901, a second member from the another controller. Before the message is found, negotiating with the another controller, confirming that the another controller has the capability of sending the first label mapping message and the second member discovery message, and the controller is configured to parse the first label mapping The ability of the message and the second member to discover the message;
  • the negotiating unit 906 Confirming, by the negotiating unit 906, that the another controller has the capability of sending the first label mapping message and the second member discovery message, and the controller is configured to parse the first label mapping message and the second After the member discovers the capability of the message, the receiving unit 901 receives the first label mapping message and the second member discovery message from the another controller.
  • the receiving unit 901 is further configured to receive a notification message sent by the another controller, where the notification message carries the PW ID and the first packet forwarding device.
  • the state of the PW identified by the PW ID between the packet forwarding devices is a primary state or a standby state.
  • the receiving unit 901 is further configured to receive a MAC address clear message sent by the another controller, where the MAC address clear message carries the first packet.
  • Forwarding device's IP address and MAC address list if the MAC If the address list is empty, the controller instructs the first packet forwarding device to clear all saved MAC forwarding entries according to the IP address of the first packet forwarding device in the MAC address clearing message, where the MAC address is a mapping relationship between the MAC address and the PW label allocated by the second controller is recorded in the publication item; if the MAC address list carries the local MAC address of the second packet forwarding device, the controller according to the The IP address of the first packet forwarding device in the MAC address clearing message, indicating that the first packet forwarding device clears the saved MAC address in the local MAC address list and the other controller.
  • the local MAC address of the second packet forwarding device includes a MAC address of the second packet forwarding device, and other information obtained by the second packet forwarding device through the access circuit connection
  • the MAC address of the network device is a MAC forwarding entry of the PW label mapping relationship, where the local MAC address of the second packet forwarding device includes a MAC address of the second packet forwarding device, and other information obtained by the second packet forwarding device through the access circuit connection.
  • the controller shown in FIG. 9A and FIG. 9B of the present embodiment can be used as the first controller in the first embodiment of the foregoing method, wherein the working principle of each unit, and the message of the label mapping message, the member discovery message, and the MAC address clearing message are For the format, please refer to the relevant description in the method embodiment.
  • the controller provided in FIG. 9A and FIG. 9B of the present embodiment performs the function of negotiating a PW label, generating a routing forwarding table, and sending the routing forwarding table to the packet forwarding device controlled by the controller, and the corresponding packet forwarding device is delivered according to the controller. Forward the entry to forward the packet.
  • the controller centrally controls the PW information and the packet forwarding device undertakes the forwarding task, and fully exploits the advantages of separating the SDN control and forwarding functions.
  • the embodiment of the present invention further provides a network device.
  • the schematic structure of the network device is as shown in FIG. 10.
  • the network device can be used as the first controller in the method embodiment, and specifically, the PE device, the router, and the SDN controller.
  • the network device includes a memory 101, a processor 102, and an interface 103.
  • the interface 103 may be other components such as a network interface card (NIC).
  • NIC network interface card
  • the memory 101 is configured to store program code
  • the interface 103 is configured to receive a first label mapping message from another network device, where the first label mapping message carries a pseudowire PW identifier ID, and an IP of the first packet forwarding device controlled by the network device An address, an IP address of the second packet forwarding device controlled by the another network device, and the another network device being the PW ID between the first packet forwarding device and the second packet forwarding device
  • the PW label assigned by the identified PW The processor 102 is configured to: after reading the program code stored in the memory 101, perform the following steps:
  • the IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried by the first label mapping message received by the interface 103, and the first packet saved by the memory 101 Determining the first packet forwarding by the correspondence between the tunnel established between the forwarding device and the second packet forwarding device, the IP address of the first packet forwarding device, and the IP address of the second packet forwarding device a tunnel between the device and the second packet forwarding device for carrying the PW identified by the PW ID;
  • the interface 103 is further configured to: before receiving the first label mapping message from the another network device, send a first member discovery message to the another network device, where the first member finds The message carries the PW ID, the IP address of the first packet forwarding device, and the IP address of another packet forwarding device controlled by the network device to establish the PW identified by the PW ID.
  • the interface 103 is further configured to receive a second member discovery message from the another network device, where the second member discovery message carries the PW ID, and the second packet forwarding device The IP address and the IP address of the other packet forwarding device that is controlled by the another network device to establish the PW identified by the PW ID.
  • the interface 103 is further configured to: after receiving the second member discovery message from the another network device, send a second label mapping message to the another network device, where the second label mapping message is The PW ID, the address of the first packet forwarding device controlled by the network device, the address of the second packet forwarding device controlled by the another network device, and the network device forwarding the first packet The PW label of the PW ID identified by the PW ID between the device and the second packet forwarding device.
  • the processor 102 after the interface 103 receives the second member discovery message from the another network device, negotiates with the another network device through the interface 103, and confirms the another The network device has the capability of transmitting the first label mapping message and the second member discovery message, and the network device has the capability of parsing the first label mapping message and the second member discovery message; Confirming that the another network device has the capability of transmitting the first label mapping message and the second member discovery message, and the network device is configured to parse the first label mapping message and the second member discovery message After the capability, the interface 103 receives a first tag mapping message and the second member discovery message from the another network device.
  • the interface 103 is further configured to receive the notification message sent by the another network device, where the notification message carries the PW ID, an IP address of the first packet forwarding device, and the second An IP address and a status identifier of the packet forwarding device, where the status identifier includes an active status identifier and a standby status identifier, where the notification message is used to indicate that the first packet forwarding device and the second packet forwarding device are The status of the PW identified by the PW ID is the active state or the standby state.
  • the interface 103 is further configured to receive a MAC address clear message sent by the another network device, where the MAC address clear message carries an IP address and a MAC address list of the first packet forwarding device; If the MAC address list is empty, the network device instructs the first packet forwarding device to clear all saved MAC forwarding entries according to the IP address of the first packet forwarding device in the MAC address clear message.
  • the mapping between the MAC address and the PW label allocated by the another network device is recorded in the MAC forwarding entry; if the MAC address list carries the local MAC address of the second packet forwarding device, And the network device, according to the IP address of the first packet forwarding device in the MAC address clearing message, indicating a MAC forwarding entry of the PW label mapping relationship that is allocated by the first packet to the network device,
  • the local MAC address of the second packet forwarding device includes the MAC address of the second packet forwarding device, and other networks obtained by the second packet forwarding device through the access circuit connection. MAC address of the device.
  • the network device shown in FIG. 10 of the present embodiment can be used as the first controller in the first method embodiment, and the working principle, and the format of each message such as a label mapping message, a member discovery message, and a MAC address clearing message, refer to the method. A related description in the embodiment.
  • Embodiment 5
  • the embodiment of the present invention provides a controller. As shown in FIG. 11, the controller includes a receiving unit 111, a query unit 112, a tunnel iteration unit 113, an entry generating unit 114, and an entry sending unit 115, where:
  • the receiving unit 111 is configured to receive a first label mapping message from another controller, where
  • the first label mapping message carries the pseudowire PW identifier ID, the IP address of the second packet forwarding device controlled by the other controller, and the PW label allocated by the other controller to the PW identified by the PW ID.
  • the second packet forwarding device is an endpoint device of the PW
  • the querying unit 112 is configured to query, by the correspondence between the saved PW ID and the packet forwarding device controlled by the controller, the receiving unit 111 a first packet forwarding device corresponding to the PW ID carried in the first label mapping message, where the first packet forwarding device is another endpoint device of the PW;
  • the tunneling iteration unit 113 is configured to: according to the IP address of the first packet forwarding device that is found by the querying unit 112, and the IP address of the second packet forwarding device that is carried by the first label mapping message, and the saved Corresponding relationship between the established tunnel between the first packet forwarding device and the second packet forwarding device, the IP address of the first packet forwarding device, and the IP address of the second packet forwarding device, a tunnel between the first packet forwarding device and the second packet forwarding device for carrying the first PW; generating a label forwarding entry, where the label forwarding entry records the PW label and the tunnel Forwarding information mapping relationship; sending the first packet forwarding device.
  • controller shown in FIG. 11 further includes:
  • the sending unit 116 is configured to query, in the correspondence between the saved PW ID and the packet forwarding device controlled by the first controller, the first corresponding to the PW ID carried in the first label mapping message. After the packet forwarding device sends a second label mapping message to the another controller, the second label mapping message carries the PW ID, and the IP address of the first packet forwarding device that is queried by the query unit. And the PW label allocated by the controller to the PW identified by the PW ID.
  • the controller shown in FIG. 11 of the present embodiment can be used as the first controller in the second embodiment of the foregoing method.
  • the working principle, and the format of each message such as the label mapping message and the member discovery message, refer to the related description in the method embodiment. .
  • the embodiment of the present invention further provides a network device, which is shown in FIG. 12, and the network device can be used as the first controller in the second embodiment of the method, which may be a PE device, a router, and an SDN Controller.
  • the network device includes a memory 121, a processor 122, and an interface 123.
  • the interface 123 may specifically be other components such as a NIC.
  • the above memory 121, processor 122 and interface 123 are connected by a bus 124.
  • the memory 121 is configured to store program code
  • the interface 123 is configured to receive a first label mapping message from another network device, where the first label mapping message carries a pseudowire PW identifier ID, and the second packet forwarding device controlled by the another network device An IP address, and a PW label allocated by the another network device to the PW identified by the PW ID, where the second packet forwarding device is an endpoint device of the PW;
  • the processor 122 is configured to: after reading the program code stored in the memory, perform the following steps:
  • the first packet forwarding device corresponding to the PW ID carried in the first label mapping message, where the first packet is forwarded
  • the device is another endpoint device of the PW;
  • IP address of the first packet forwarding device and the IP address of the second packet forwarding device carried by the first label mapping message, and the first packet forwarding device and the first saved by the memory 121 Determining, by the second packet forwarding device, the established relationship between the tunnel, the IP address of the first packet forwarding device, and the IP address of the second packet forwarding device, determining the first packet forwarding device and the second a tunnel between the packet forwarding devices for carrying the first PW;
  • the interface 123 is further used by the processor 122 to query, according to the PW ID of the saved PW ID and the packet forwarding device controlled by the network device, the PW ID that is carried in the first label mapping message.
  • the second label mapping message is sent to the another network device, where the second label mapping message carries the PW ID and the first packet forwarding device.
  • the network device shown in FIG. 12 of the present embodiment can be used as the first controller in the second embodiment of the foregoing method, and the working principle, and the format of each message such as a label mapping message, a member discovery message, and a MAC address clearing message, refer to the method. A related description in the embodiment.
  • the embodiment of the present invention provides a network device.
  • the network device includes a receiving unit 131, a tunnel iteration unit 132, and an entry maintenance unit 133, where:
  • the receiving unit 131 is configured to use a first label mapping message from the controller, where the first label mapping message carries a pseudowire PW identifier ID, an IP address of a packet forwarding device controlled by the controller, and the network An IP address of the device, and a PW label allocated by the controller to the PW identified by the PW ID between the packet forwarding device and the network device; a tunnel iteration unit 132, configured to map according to the first label The IP address of the packet forwarding device carried by the message and the IP address of the network device, and the established tunnel between the network device and the packet forwarding device, and the IP address and location of the network device Determining a correspondence between the IP address of the packet forwarding device, and determining, between the packet forwarding device and the network device, a tunnel for carrying the PW identified by the PW ID;
  • the entry maintenance unit 133 is configured to generate and save a label forwarding entry according to the tunnel determined by the tunnel iteration unit 132, where the label forwarding entry records the mapping of the PW label and the forwarding information of the tunnel. relationship.
  • the network device shown in Figure 13 further includes:
  • the sending unit 134 is configured to send a first member discovery message to the controller, where the first member discovery message carries the PW, before the receiving unit 131 receives the first label mapping message from the controller. ID, the IP address of the network device.
  • the receiving unit 131 is further configured to receive a second member discovery message from the controller, where the second member discovery message carries the PW ID, an IP address and a location of the packet forwarding device.
  • the sending unit 134 is further configured to: after the receiving unit 131 receives the second member discovery message from the Controller, send the second label mapping to the controller.
  • the second label mapping message carries the PW ID, an address of the network device, an address of the packet forwarding device, and the network device is between the network device and the packet forwarding device.
  • the PW ID of the PW ID identified by the PW ID.
  • the network device shown in FIG. 13 of the present embodiment can be used as the traditional network device in the foregoing method embodiment.
  • the working principle of each unit, and the format of each message such as a label mapping message and a member discovery message, refer to the method embodiment. Related description in . It is applicable to the network environment where the traditional network architecture and the SDN network architecture coexist during the transition from the traditional network architecture to the SDN network architecture.
  • the embodiment of the present invention further provides a network device, and a schematic structural diagram thereof is shown in FIG. 14.
  • the network device can be used as a traditional network device in the third embodiment of the method, and specifically, a PE device and a router.
  • the network device includes a memory 141, a processor 142, and an interface 143, which may specifically be other components such as a NIC.
  • the above memory 121, processor 122 and interface 123 are connected by a bus 124.
  • the memory 141 is configured to store program code
  • the interface 143 is configured to receive a first label mapping message from the controller, where the first label mapping message carries a pseudowire PW identifier ID, and an IP address of a packet forwarding device controlled by the controller. An IP address of the network device, and a PW label allocated by the controller to the PW identified by the PW ID between the packet forwarding device and the network device;
  • the processor 142 is configured to: after reading the program code stored in the memory 141, perform the following steps:
  • the label forwarding entry records the mapping relationship between the PW label and the forwarding information of the tunnel.
  • the interface 143 is further configured to: before receiving the first label mapping message from the Controller, send a first member discovery message to the controller, where the first member discovery message is The PW ID and the IP address of the network device are carried in the network.
  • the interface 143 is further configured to receive a second member discovery message from the controller, where the second member discovery message carries the PW ID, an IP address of the packet forwarding device, and the The IP address of the other packet forwarding device that establishes the PW identified by the PW ID.
  • the interface 143 is further configured to send a second label mapping message to the controller, where the second label mapping message carries the PW ID, an address of the network device, and the packet forwarding device. An address, and a PW label allocated by the network device to the PW identified by the PW ID between the network device and the packet forwarding device.
  • the interface 143 sends a second label mapping message according to the second member discovery message.
  • the network device shown in FIG. 14 of the present embodiment can be used as the traditional network device in the foregoing method embodiment 3.
  • the working principle, and the format of each message such as a label mapping message, a member discovery message, and a MAC address clearing message, refer to the method.
  • a related description in the embodiment Those of ordinary skill in the art will appreciate that various aspects of the present invention, or possible implementations of various aspects, can be embodied as a system, method, or computer program product.
  • aspects of the invention, or possible implementations of various aspects may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," “modules,” or “systems.”
  • aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is a computer readable program code stored in a computer readable medium.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
  • the computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), Erase programmable read-only memory (EPROM or flash memory), optical fiber, portable read-only memory (CD-ROM).
  • the processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
  • the computer readable program code can be executed entirely on the user's local computer, in part on the user Executed on the local computer, as a separate package, partly on the user's local computer and partly on the remote computer, or entirely on the remote computer or server. It should also be noted that in some alternative implementations, the functions noted in the various steps of the flowcharts or in the blocks of the block diagrams may not occur in the order noted in the drawings. For example, two steps, or two blocks shown in succession may be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. The spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and the modifications of the invention

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种L2VPN的建立方法和设备,用以解决SDN网络架构不能很好地支持L2VPN业务的问题。所述方法包括:第一Controller接收来自于第二Controller的第一标签映射消息,所述第一标签映射消息中携带有PW ID、所述第一Controller控制的第一包转发设备的IP地址、所述第二Controller控制的第二包转发设备的IP地址、以及所述第二Controller为所述所述PW ID所标识的PW分配的PW标签;所述第一Controller根据所述第一标签映射消息携带的所述第一包转发设备的IP地址和所述第二包转发设备的IP地址,确定所述第一包转发设备和所述第二包转发设备之间用以承载所述PW ID所标识的PW的隧道;所述第一Controller根据确定出的所述隧道,生成标签转发表项并将所述标签转发表项下发给所述第一包转发设备。

Description

二层虚拟专用网絡业务的建立方法和设备 技术领域
本发明涉及计算机及通信技术领域, 尤其涉及一种二层(Layer 2, 筒称 L2 )虚拟专用网络( Virtual Private Network , 筒称 VPN )业务的建立方法及 一种 L2VPN业务的建立装置。
背景技术 现有的 L2VPN业务包括虚拟租用线( Virtual Leased Line, 筒称 VLL )业 务和虚拟专用局域网网段( Virtual Private LAN Segment , 筒称 VPLS )业务。 其中, VLL业务以标签分发协议( Labe Distribution Protocol, 筒称 LDP ) 为 信令协议, 通过隧道传输用户边缘( Customer Edge, 筒称 CE )设备之间的各 种二层业务的数据报文, 从而来承载各种二层业务。 从用户的角度来看, 二 层业务的数据报文的传输过程是透明的。 VLL提供了一种点到点的 VPN组网 方案。 VPLS是一种基于多协议标签交换 ( Multi-Protocol Label Switching , 筒 称 MPLS )协议的组网方案, 可以实现多点到多点的 VPN组网, 以此为许多 原来使用点到点 L2VPN业务的运营商提供了一种更完备的方案。
当前, 软件定义网络(Software-Defined Network, 筒称 SDN ) 已经成为 业界研究的热点, 由于低成本、 业务实现和开发周期较短的优点, 有可能成 为未来普遍应用的网络架构。 SDN的一个基本要求是控制功能和转发功能的 分离。 包转发设备, 如报文转发 ( Packet Forwarding ) 设备和交换机设备 ( Switcher ), 不提供控制功能, 完全依赖控制设备, 如控制器( Controller ), 下发的转发信息进行报文的分组转发。运行于 Controller上的网络操作系统统 一提供控制功能, 将根据网络拓朴信息计算得到的转发信息下发给包转发设 备。
在上述现状下, 如何在 SDN中实现 L2VPN业务成为了一个需要解决的 问题。 SDN 中实现 L2VPN业务主要的应用场景是: 第一 Controller和第二 Controller分别控制多个包转发设备, 由于按照 SDN的要求, 包转发设备不具 有控制功能, 由第一 Controller控制的包转发设备和由第二 Controller控制的 包转发设备之间如何建立 L2VPN业务。
现有的 L2VPN业务的建立机制如果在上述场景中应用会出现以下问题: 在标签分配阶段, 现有 L2VPN 业务的建立机制通过虚连接 ( Virtual Connection , 筒称 VC )标识( identifier , 筒称 ID )或者虚拟交换实例( Virtual Switch Instance, 筒称 VSI ) ID来为 VPN中的节点设备分配标签。 如果需要 在一个 Controller控制的多个包转发设备和其他设 可以是另一个 Controller 控制的多个包转发设备, 也可以是传统设备)之间建立 VPLS 业务, 将无法 使用标签对所有节点设备进行区分。 举例来说, 在上述场景中, 需要在一个 Controller控制的 4台包转发设备要与另一个 Controller控制的 4台包转发设 备之间实现 VPLS业务, 需要 16个伪线 (Pseudo wire, 筒称 PW ), 即一个 Controller控制的一个包转发设备分别与另一个 Controller控制的每个包转发 设备之间的 PW, 但是当 Controller与传统设备建立 LDP远端会话时, 按照 VSI来建立 PW, 由于上述 8个设备属于同一 VPLS, 只有一个 VSI, 而现有 的标签分配方案只能通过标签来区分参与标签协商的同一 PW两端的节点设 备, 而无法通过标签区分 VPLS流量应该发送到一个 Controller控制的 4台包 转发设备中的哪台包转发设备。
此外, 在确定承载伪线的隧道(也被称为迭代隧道) 时, 现有方案是按 照标签交换路由器( Label Switch Router, 筒称 LSR )标识( ID )来选择隧道, 因此选择出的隧道是 Controller与 Controller之间的隧道,而根据 SDN的要求, Controller不具备包转发的功能, 实际 VPLS 流量的目的方应该是 Controller 控制的多个包转发设备, 而并非 Controller
有鉴于此, 现有技术没有提供能够在 SDN网络架构中实现 L2VPN的方 案。 发明内容 本发明实施例提供一种 L2VPN业务的建立方法, 用以解决 SDN网络架 构不能很好地支持 L2VPN业务的问题。
对应地, 本发明实施例还提供了一种 Controller和网络设备。
本发明实施例提供的技术方案如下:
第一方面, 提供了一种 L2VPN的建立方法, 包括: 第一 Controller接收来自于第二 Controller的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述第一 Controller控制的第一 包转发设备的 IP地址、所述第二 Controller控制的第二包转发设备的 IP地址、 以及所述第二 Controller为所述第一包转发设备和所述第二包转发设备之间的 所述 PW ID所标识的 PW分配的 PW标签;
所述第一 Controller根据所述第一标签映射消息携带的所述第一包转发设 备的 IP地址和所述第二包转发设备的 IP地址,以及保存的所述第一包转发设 备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP地 址和所述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备和 所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道;
所述第一 Controller根据确定出的所述隧道, 生成标签转发表项并将所述 标签转发表项下发给所述第一包转发设备,所述标签转发表项记录有所述 PW 标签和所述隧道的转发信息的映射关系。
在上述第一方面的第一种可能的实现方式中, 所述第一 Controller接收来 自于所述第二 Controller的第一标签映射消息之前, 还包括:
所述第一 Controller向所述第二 Controller发送第一成员发现消息, 所述 第一成员发现消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址和所 述第一 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP地址。
结合第一方面、 或第一方面的第一种可能的实现方式, 还提供了第一方 面的第二种可能的实现方式, 还包括:
所述第一 Controller接收来自于所述第二 Controller的第二成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述第二包转发设备的 IP地址 和所述第二 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备 的 IP地址。
在第一方面的第三种可能的实现方式中, 所述第一 Controller接收来自于 第二 Controller的第一标签映射消息之后, 还包括:
所述第一 Controller向第二 Controller发送第二 LDP标签映射消息, 所述 第二 LDP标签映射消息中携带有所述 PW ID、 所述第一 Controller控制的第 一包转发设备的地址、 所述第二 Controller控制的第二包转发设备的地址、 以 及所述第一 Controller为所述第一包转发设备和所述第二包转发设备之间的所 述 PW ID标识的 PW分配的 PW标签。
结合所述第一方面的第二种可能的实现方式中, 还提供了第一方面的第 四种可能的实现方式, 第一 Controller接收来自于所述第二 Controller的第二 成员发现消息之后, 还包括:
所述第一 Controller向第二 Controller发送第二标签映射消息, 所述第二 标签映射消息中携带有所述 PW ID、所述第一 Controller控制的第一包转发设 备的地址、 所述第二 Controller控制的第二包转发设备的地址、 以及所述第一 Controller为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID标 识的 PW分配的 PW标签。
结合上述第一方面、 或第一方面的任意一种可能的实现方式, 还提供了 第一方面的第五种可能的实现方式, 所述第一标签映射消息中包含第一类型- 长度-值 TLV和第二 TLV,所述第一 TLV的类型字段的内容指示所述第一 TLV 的值字段具体包含 PW ID字段、 第一被代理节点地址字段和第二被代理节点 地址字段;
所述 PW ID携带在所述第一 TLV中的所述 PW ID字段中, 所述第二包 转发设备的 IP地址携带在所述第一被代理节点地址字段中, 所述第一包转发 设备的 IP地址携带在所述第二被代理节点地址字段中;
所述第二 Controller分配的 PW标签携带在所述第二 TLV中。
结合上述第一方面的第二种可能的实现方式、 以及第一方面的第四种可 能的实现方式, 还提供了所述第一方面的第六种可能的实现方式, 所述第二 成员发现消息中包含第三 TLV, 所述第三 TLV中的类型字段的内容指示所述 第三 TLV中的值字段中携带所述 PW ID、 以及所述第二包转发设备的地址和 所述第二 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP地址。
结合上述第一方面的第二种可能的实现方式、 以及第一方面的第四种可 能的实现方式, 还提供了所述第一方面的第七种可能的实现方式, 所述第一 标签映射消息和所述第二成员发现消息中还携带所述第二 Controller 为所述 PW ID分配的群组 Group标识 ID。
结合上述第一方面的第五种可能的实现方式, 还提供了所述第一方面的 第八种可能的实现方式, 所述第一标签映射消息中还携带所述第二 Controller 为所述 PW ID分配的 Group ID; 所述 Group ID携带在所述第一 TLV的值字 段包含的群组字段中。
结合上述第一方面的第六种可能的实现方式, 还提供了所述第一方面的 第九种可能的实现方式, 所述第二成员发现消息中还携带所述第二 Controller 为所述 PW ID分配的群组标识; 所述群组标识携带在所述第三 TLV的值字段 包含的群组字段中。
结合上述第一方面的第二种、 第四种、 第六种、 第七种和第八种可能的 实现方式还提供了所述第一方面的第十种可能的实现方式, 所述第一 Controller接收来自于第二 Controller的第一标签映射消息之前、 且所述第一 Controller接收来自于所述第二 Controller的第二成员发现消息之前, 还包括: 所述第一 Controller与所述第二 Controller协商,确认所述第二 Controller具备 发送所述第一标签映射消息和所述第二成员发现消息的能力、 以及所述第一 Controller具备解析所述第一标签映射消息和所述第二成员发现消息的能力; 确认第二 Controller具备发送所述第一标签映射消息和所述第二成员发现 消息的能力、且所述第一 Controller具备解析所述第一标签映射消息和所述第 二成员发现消息的能力之后,所述第一 Controller执行所述接收来自于所述第 二 Controller的第一标签映射消息和所述第二成员发现消息的步骤。
结合上述第一方面、 或第一方面的任意一种可能的实现方式, 还提供了 第一方面第十一种可能的实现方式, 还包括: 接收所述第二 Controller发送的 通知消息,所示通知消息中携带所述 PW ID、所述第一包转发设备的 IP地址、 所述第二包转发设备的 IP地址和状态标识, 所述状态标识包括主用状态标识 和备用状态标识; 所述通知消息用以指示所述第一包转发设备和所述第二包 转发设备之间所述 PW ID所标识的 PW的状态为主用状态或备用状态。
结合上述第一方面、 或第一方面的任意一种可能的实现方式, 还提供了 第一方面第十二种可能的实现方式, 还包括: 所述第一 Controller接收所述第 二 Controller发送的 MAC地址清除消息, 所述 MAC地址清除消息中携带所 述第一包转发设备的的 IP地址和 MAC地址列表;
若所述 MAC地址列表为空, 则所述第一 Controller根据所述 MAC地址 清除消息中的所述第一包转发设备的 IP地址, 指示所述第一包转发设备清除 保存的所有 MAC转发表项, 所述 MAC转发表项中记录有 MAC地址与所述 第二 Controller分配的所述 PW标签的映射关系;
若所述 MAC地址列表中携带有所述第二包转发设备的本地 MAC地址, 则所述第一 Controller根据所述 MAC地址清除消息中的所述第一包转发设备 的 IP地址, 指示所述第一包转发设备清除保存的记录有所述本地 MAC地址 列表中的 MAC地址与所述第二 Controller分配的所述 PW标签映射关系的 MAC转发表项, 所述第二包转发设备的本地 MAC地址包括所述第二包转发 设备的 MAC地址、以及所述第二包转发设备通过接入电路连接获得的其他网 络设备的 MAC地址。 第二方面, 提供了一种 L2VPN业务的建立方法, 包括:
第一控制器 Controller接收来自于第二 Controller的第一标签映射消息, 所述第一标签映射消息中携带有伪线 PW标识 ID、 所述第二 Controller控制 的第二包转发设备的 IP地址、 以及所述第二 Controller为所述 PW ID所标识 的 PW分配的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备; 所述第一 Controller从保存的 PW ID与所述第一 Controller控制的包转发 设备的对应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一包 转发设备, 所述第一包转发设备为所述 PW的另一个端点设备;
所述第一 Controller根据所述第一包转发设备的 IP地址和所述第一标签 映射消息携带的所述第二包转发设备的 IP地址, 以及保存的所述第一包转发 设备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP 地址和所述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备 和所述第二包转发设备之间用以承载所述第一 PW的隧道;
所述第一 Controller根据确定出的所述隧道, 生成标签转发表项并将所述 标签转发表项下发给所述第一包转发设备,所述标签转发表项记录有所述 PW 标签和所述隧道的转发信息的映射关系。
在所述第二方面的第一种可能的实现方式中, 所述第一 Controller从保存 的 PW ID与所述第一 Controller控制的包转发设备的对应关系中查询所述第一 标签映射消息中携带的 PW ID对应的第一包转发设备之后, 还包括:
第一 Controller向所述第二 Controller发送第二标签映射消息, 所述第二 标签映射消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址、 以及所 述第一 Controller为所述 PW ID所标识的 PW分配的 PW标签。
结合上述第二方面、 或第二方面的第一种可能的实现方式, 在所述第二 方面的第二种可能的实现方式中, 所述第一标签映射消息中包含第一类型-长 度-值 TLV和第二 TLV, 所述第一 TLV的类型字段的内容指示所述第一 TLV 的值字段包含 PW ID字段和被代理节点地址字段;
所述第一 PW ID携带在所述第一 TLV中的所述 PW ID字段中, 所述第 二包转发设备的 IP地址携带在所述被代理节点地址字段中;
所述第二 Controller分配的 PW标签携带在所述第二 TLV中。
结合上述第二方面、 或第二方面的第一种可能的实现方式, 在所述第一 方面的第三种可能的实现方式中, 所述第一标签映射消息中还携带所述第二 Controller为所述 PW ID分配的群组 Group标识 ID。
结合上述第二方面的第二种可能的实现方式, 还提供了第二方面的第四 种可能的实现方式,所述第一标签映射消息中还携带所述第二 Controller为所 述 PW ID分配的群组标识; 所述 Group ID携带在所述第一 TLV的值字段中 包含的群组字段中。 第三方面, 还提供了一种 L2VPN的建立方法, 包括:
网络设备接收来自于控制器 Controller的第一标签映射消息, 所述第一标 签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一个包转发设 备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包转发设 所述网络设备根据所述第一标签映射消息携带的所述包转发设备的 IP地 址和所述网络设备的 IP地址, 以及保存的所述网络设备与所述包转发设备之 间已建立的隧道、与所述网络设备的 IP地址和所述包转发设备的 IP地址的对 应关系, 确定所述包转发设备和所述网络设备之间用以承载所述 PW ID所标 识的 PW的隧道; 签转发表项记录有所述 PW标签和所述隧道的转发信息的映射关系。
在所述第三方面的第一种可能的实现方式中, 所述网络设备接收来自于 所述 Controller的第一标签映射消息之前, 还包括:
所述网络设备向所述 Controller发送第一成员发现消息,所述第一成员发 现消息中携带有所述 PW ID、 所述网络设备的 IP地址。
结合所述第三方面、 以及第三方面的第一种可能的实现方式, 还提供了 所述第三方面的第二种可能的实现方式, 还包括: 所述网络设备接收来自于 所述 Controller 的第二成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述包转发设备的 IP地址和所述 Controller控制的建立所述 PW ID 所标识的 PW的其他包转发设备的 IP地址。
结合上述第三方面、 以及第三方面的任意一种可能的实现方式, 还提供 了第三方面的第三种可能的实现方式, 所述网络设备接收来自于 Controller的 第一标签映射消息之后, 还包括:
所述网络设备向所述 Controller发送第二标签映射消息,所述第二标签映 射消息中携带有所述 PW ID、 所述网络设备的地址、 所述包转发设备的地址、 以及所述网络设备为所述网络设备和所述包转发设备之间的所述 PW ID标识 的 PW分配的 PW标签。
结合上述第三方面的第二种可能的实现方式, 还提供了第三方面的第四 种可能的实现方式,所述网络设备接收来自于所述 Controller的第二成员发现 消息之后, 还包括:
所述网络设备向所述 Controller发送第二标签映射消息,所述第二标签映 射消息中携带有所述 PW ID、 所述网络设备的地址、 所述包转发设备的地址、 以及所述网络设备为所述网络设备和所述包转发设备之间的所述 PW ID标识 的 PW分配的 PW标签。
结合上述第三方面、 以及第三方面的任意一种可能的实现方式, 还提供 了第三方面的第五种可能的实现方式, 所述第一标签映射消息中包含第一类 型-长度-值 TLV和第二 TLV, 所述第一 TLV的类型字段的内容指示所述第一 TLV的值字段具体包含 PW ID字段、 第一被代理节点地址字段和第二被代理 节点地址字段;
所述 PW ID携带在所述第一 TLV中的所述 PW ID字段中, 所述包转发 设备的 IP地址携带在所述第一被代理节点地址字段中,所述网络设备的 IP地 址携带在所述第二被代理节点地址字段中; 所述 Controller分配的 PW标签携带在所述第二 TLV中。
结合第三方面的第二种或第四种可能的实现方式, 在第三方面的第六种 可能的实现方式中, 所述第二成员发现消息中包含第三 TLV, 所述第三 TLV 中的类型字段的内容指示所述第三 TLV中的值字段中携带所述 PW ID、 所述 包转发设备的地址以及所述 Controller控制的其他包转发设备的地址。 第四方面, 提供了一种 Controller, 包括:
接收单元, 用于接收来自于另一 Controller的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的第一包转 发设备的 IP地址、 所述另一 Controller控制的第二包转发设备的 IP地址、 以 及所述另一 Controller为所述第一包转发设备和所述第二包转发设备之间的所 述 PW ID所标识的 PW分配的 PW标签;
隧道迭代单元, 用于根据所述接收单元接收的所述第一标签映射消息携 带的所述第一包转发设备的 IP地址和所述第二包转发设备的 IP地址,以及保 存的所述第一包转发设备与所述第二包转发设备之间已建立的隧道、 与所述 第一包转发设备的 IP地址和所述第二包转发设备的 IP地址的对应关系,确定 所述第一包转发设备和所述第二包转发设备之间用以承载所述 PW ID所标识 的 PW的隧道;
表项生成单元, 用于根据所述隧道迭代单元确定出的所述隧道, 生成标 签转发表项, 所述标签转发表项记录有所述 PW标签和所述隧道的转发信息 的映射关系; 给所述第一包转发设备。
在上述第四方面的第一种可能的实现方式中, 还包括:
发送单元,用于在所述接收单元接收来自于所述另一 Controller的第一标 签映射消息之前, 向所述另一 Controller发送第一成员发现消息, 所述第一成 员发现消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址和所述 结合上述第四方面、 或第四方面的第一种可能的实现方式, 在第四方面 的第二种可能的实现方式中, 所述接收单元, 还用于接收来自于所述另一 Controller的第二成员发现消息,所述第二成员发现消息中携带有所述 PW ID、 所述第二包转发设备的 IP地址和所述另一 Controller控制的建立所述 PW ID 所标识的 PW的其他包转发设备的 IP地址。
结合上述第四方面的第二种可能的实现方式, 在第四方面第三种可能的 实现方式中, 所述发送单元, 还用于在所述接收单元接收来自于所述另一 Controller的第二成员发现消息之后, 向所述另一 Controller发送第二标签映 射消息, 所述第二标签映射消息中携带有所述 PW ID、 所述 Controller控制的 第一包转发设备的地址、 所述另一 Controller控制的第二包转发设备的地址、 以及所述 Controller为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID标识的 PW分配的 PW标签。
结合上述第四方面的第二种可能的实现方式, 在第四方面第四种可能的 实现方式中, 还包括:
协商单元,用于在所述接收单元接收来自于所述另一 Controller的第二成 员发现消息之前, 与所述另一 Controller协商, 确认所述另一 Controller具备 发送所述第一标签映射消息和所述第二成员发现消息的能力、 以及所述 Controller具备解析所述第一标签映射消息和所述第二成员发现消息的能力; 在所述协商单元确认所述另一 Controller具备发送所述第一标签映射消息 和所述第二成员发现消息的能力、且所述 Controller具备解析所述第一标签映 射消息和所述第二成员发现消息的能力之后, 所述接收单元接收来自于所述 另一 Controller的第一标签映射消息和所述第二成员发现消息。
结合上述第四方面、 或第四方面的任意一种可能的实现方式, 在第四方 面的第五种可能的实现方式中,所述接收单元,还用于接收所述另一 Controller 发送的通知消息, 所示通知消息中携带所述 PW ID、 所述第一包转发设备的 IP地址、 所述第二包转发设备的 IP地址和状态标识, 所述状态标识包括主用 状态标识和备用状态标识; 所述通知消息用以指示所述第一包转发设备和所 述第二包转发设备之间所述 PW ID所标识的 PW的状态为主用状态或备用状 态。
结合上述第四方面、 或第四方面的任意一种可能的实现方式, 在第四方 面的第六种可能的实现方式中,所述接收单元,还用于接收所述另一 Controller 发送的 MAC地址清除消息, 所述 MAC地址清除消息中携带所述第一包转发 设备的的 IP地址和 MAC地址列表;
若所述 MAC地址列表为空, 则所述 Controller根据所述 MAC地址清除 消息中的所述第一包转发设备的 IP地址, 指示所述第一包转发设备清除保存 的所有 MAC转发表项, 所述 MAC转发表项中记录有 MAC地址与所述第二 Controller分配的所述 PW标签的映射关系;
若所述 MAC地址列表中携带有所述第二包转发设备的本地 MAC地址, 则所述 Controller根据所述 MAC地址清除消息中的所述第一包转发设备的 IP 地址,指示所述第一包转发设备清除保存的记录有所述本地 MAC地址列表中 的 MAC地址与所述另一 Controller分配的所述 PW标签映射关系的 MAC转 发表项, 所述第二包转发设备的本地 MAC地址包括所述第二包转发设备的 MAC地址、 以及所述第二包转发设备通过接入电路连接获得的其他网络设备 的 MAC地址。
第五方面, 还提供了一种网络设备, 包括存储器、 处理器和接口, 所述 存储器, 用于存储程序代码;
所述接口, 用于接收来自于另一网络设备的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述网络设备控制的第一包转发 设备的 IP地址、所述另一网络设备控制的第二包转发设备的 IP地址、 以及所 述另一网络设备为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID所标识的 PW分配的 PW标签;
所述处理器, 用于读取所述存储器中存储的程序代码后, 执行以下步骤: 根据所述接口接收的所述第一标签映射消息携带的所述第一包转发设备 的 IP地址和所述第二包转发设备的 IP地址,以及所述存储器保存的所述第一 包转发设备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设 备的 IP地址和所述第二包转发设备的 IP地址的对应关系,确定所述第一包转 发设备和所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道; 根据确定出的所述隧道, 生成标签转发表项并触发所述接口将所述标签 转发表项下发给所述第一包转发设备, 所述标签转发表项记录有所述 PW标 签和所述隧道的转发信息的映射关系。
在上述第五方面的第一种可能的实现方式中, 所述接口, 还用于在接收 来自于所述另一网络设备的第一标签映射消息之前, 向所述另一网络设备发 送第一成员发现消息, 所述第一成员发现消息中携带有所述 PW ID、 所述第 一包转发设备的 IP地址和所述网络设备控制的建立所述 PW ID所标识的 PW 的其他包转发设备的 IP地址。
结合上述第五方面、 或第五方面的第一种可能的实现方式, 还提供了第 五方面的第二种可能的实现方式, 所述接口, 还用于接收来自于所述另一网 络设备的第二成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述第二包转发设备的 IP地址和所述另一网络设备控制的建立所述 PW ID所 标识的 PW的其他包转发设备的 IP地址。
在上述第五方面的第二种可能的实现方式中, 还提供了第五方面的第三 种可能的实现方式, 所述接口, 还用于接收来自于所述另一网络设备的第二 成员发现消息之后, 向所述另一网络设备发送第二标签映射消息, 所述第二 标签映射消息中携带有所述 PW ID、 所述网络设备控制的第一包转发设备的 地址、 所述另一网络设备控制的第二包转发设备的地址、 以及所述网络设备 为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID标识的 PW 分配的 PW标签。
在上述第五方面的第二种可能的实现方式中, 还提供了第五方面的第四 种可能的实现方式, 所述处理器在所述接口接收来自于所述另一网络设备的 第二成员发现消息之前, 通过所述接口与所述另一网络设备协商, 确认所述 另一网络设备具备发送所述第一标签映射消息和所述第二成员发现消息的能 力、 以及所述网络设备具备解析所述第一标签映射消息和所述第二成员发现 消息的能力;
在确认所述另一网络设备具备发送所述第一标签映射消息和所述第二成 员发现消息的能力、 且所述网络设备具备解析所述第一标签映射消息和所述 第二成员发现消息的能力之后, 所述接口接收来自于所述另一网络设备的第 一标签映射消息和所述第二成员发现消息。
结合上述第五方面、 或第五方面的任意一种可能的实现方式, 还提供了 第五方面的第五种可能的实现方式, 所述接口, 还用于接收所述另一网络设 备发送的 MAC地址清除消息, 所述 MAC地址清除消息中携带所述第一包转 发设备的的 IP地址和 MAC地址列表;
若所述 MAC地址列表为空, 则所述网络设备根据所述 MAC地址清除消 息中的所述第一包转发设备的 IP地址, 指示所述第一包转发设备清除保存的 所有 MAC转发表项, 所述 MAC转发表项中记录有 MAC地址与所述另一网 络设备分配的所述 PW标签的映射关系;
若所述 MAC地址列表中携带有所述第二包转发设备的本地 MAC地址, 则所述网络设备根据所述 MAC地址清除消息中的所述第一包转发设备的 IP 地址,指示所述第一包转发设备清除保存的记录有所述本地 MAC地址列表中 的 MAC地址与所述另一网络设备分配的所述 PW标签映射关系的 MAC转发 表项, 所述第二包转发设备的本地 MAC 地址包括所述第二包转发设备的 MAC地址、 以及所述第二包转发设备通过接入电路连接获得的其他网络设备 的 MAC地址。 第六方面, 还提供了一种 Controller, 其特征在于, 包括:
接收单元, 用于接收来自于另一 Controller的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述另一 Controller控制的第二 包转发设备的 IP地址、 以及所述另一 Controller为所述 PW ID所标识的 PW 分配的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备;
查询单元,用于从保存的 PW ID与所述 Controller控制的包转发设备的对 应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一包转发设 备, 所述第一包转发设备为所述 PW的另一个端点设备;
隧道迭代单元, 用于根据所述第一包转发设备的 IP地址和所述第一标签 映射消息携带的所述第二包转发设备的 IP地址, 以及保存的所述第一包转发 设备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP 地址和所述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备 和所述第二包转发设备之间用以承载所述第一 PW的隧道;
表项生成单元, 用于根据所述隧道迭代单元确定出的所述隧道, 生成标 签转发表项, 所述标签转发表项记录有所述 PW标签和所述隧道的转发信息 的映射关系; 述第一包转发设备。
在上述第六方面的第一种可能的实现方式中, 还包括发送单元, 用于在 所述查询单元从保存的 PW ID与所述第一 Controller控制的包转发设备的对应 关系中查询到所述第一标签映射消息中携带的 PW ID对应的第一包转发设备 之后, 向所述另一 Controller发送第二标签映射消息, 所述第二标签映射消息 中携带有所述 PW ID、所述所述查询单元查询到的第一包转发设备的 IP地址、 第七方面, 还提供了一种网络设备, 包括存储器、 处理器和接口, 其特 征在于,
所述存储器, 用于存储程序代码;
所述接口, 用于接收来自于另一网络设备的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述另一网络设备控制的第二包 转发设备的 IP地址、以及所述另一网络设备为所述 PW ID所标识的 PW分配 的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备;
所述处理器, 用于读取所述存储器中存储的程序代码后, 执行以下步骤: 从所述存储器保存的 PW ID与所述网络设备控制的包转发设备的对应关 系中查询所述第一标签映射消息中携带的 PW ID对应的第一包转发设备, 所 述第一包转发设备为所述 PW的另一个端点设备;
根据所述第一包转发设备的 IP地址和所述第一标签映射消息携带的所述 第二包转发设备的 IP地址, 以及所述存储器保存的所述第一包转发设备与所 述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP地址和所 述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备和所述第 二包转发设备之间用以承载所述第一 PW的隧道;
根据确定出的所述隧道, 生成标签转发表项并触发所述接口将所述标签 转发表项下发给所述第一包转发设备, 所述标签转发表项记录有所述 PW标 签和所述隧道的转发信息的映射关系。
在第七方面的第一种可能的实现方式中, 所述接口还用于所述处理器从 保存的 PW ID与所述网络设备控制的包转发设备的对应关系中查询所述第一 标签映射消息中携带的 PW ID对应的第一包转发设备之后, 向所述另一网络 设备发送第二标签映射消息, 所述第二标签映射消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址、 以及所述网络设备为所述 PW ID所标识的 PW分配的 PW标签。 第八方面, 还提供了一种网络设备, 其特征在于, 包括:
接收单元, 用于来自于控制器 Controller的第一标签映射消息, 所述第一 标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一个包转发 设备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包转发 隧道迭代单元, 用于根据所述第一标签映射消息携带的所述包转发设备 的 IP地址和所述网络设备的 IP地址,以及保存的所述网络设备与所述包转发 设备之间已建立的隧道、与所述网络设备的 IP地址和所述包转发设备的 IP地 址的对应关系, 确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID所标识的 PW的隧道; 转发表项并保存, 所述标签转发表项记录有所述 PW标签和所述隧道的转发 信息的映射关系。
在第八方面的第一种可能的实现方式中, 还包括: 发送单元, 用于在所 述接收单元接收来自于所述 Controller 的第一标签映射消息之前, 向所述 Controller发送第一成员发现消息, 所述第一成员发现消息中携带有所述 PW ID、 所述网络设备的 IP地址。
在第八方面的第一种可能的实现方式中, 还提供了第八方面的第二种可 能的实现方式, 所述接收单元, 还用于接收来自于所述 Controller的第二成员 发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述包转发设备的 IP地址和所述 Controller控制的建立所述 PW ID所标识的 PW的其他包转发 设备的 IP地址。
在第八方面的第二种可能的实现方式中, 还提供了第八方面的第三种可 能的实现方式, 所述发送单元, 还用于在所述接收单元接收来自于所述
Controller的第二成员发现消息之后, 向所述 Controller发送第二标签映射消 息, 所述第二标签映射消息中携带有所述 PW ID、 所述网络设备的地址、 所 述包转发设备的地址、 以及所述网络设备为所述网络设备和所述包转发设备 之间的所述 PW ID标识的 PW分配的 PW标签。
第九方面, 还提供了网络设备, 包括存储器、 处理器和接口, 所述存储 器, 用于存储程序代码;
所述接口, 用于接收来自于控制器 Controller的第一标签映射消息, 所述 第一标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一个包 转发设备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包 转发设备和所述网络设备之间的所述 PW ID所标识的 PW分配的 PW标签; 所述处理器, 用于读取所述存储器中存储的程序代码后, 执行以下步骤: 根据所述第一标签映射消息携带的所述包转发设备的 IP地址和所述网络 设备的 IP地址, 以及所述存储器中保存的所述网络设备与所述包转发设备之 间已建立的隧道、与所述网络设备的 IP地址和所述包转发设备的 IP地址的对 应关系, 确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID所标 识的 PW的隧道; 签转发表项记录有所述 PW标签和所述隧道的转发信息的映射关系。
在第九方面的第一种可能的实现方式中, 所述接口, 还用于接收来自于 所述 Controller的第一标签映射消息之前, 向所述 Controller发送第一成员发 现消息, 所述第一成员发现消息中携带有所述 PW ID、 所述网络设备的 IP地 址。
结合上述第九方面、 或第九方面的第一种可能的实现方式, 还提供了第 九方面的第二种可能的实现方式, 所述接口还用于接收来自于所述 Controller 的第二成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述包 转发设备的 IP地址和所述 Controller控制的建立所述 PW ID所标识的 PW的 其他包转发设备的 IP地址。
结合上述第九方面、 或第九方面的任意一种可能的实现方式, 还提供了 第九方面的第三种可能的实现方式,所述接口还用于向所述 Controller发送第 二标签映射消息, 所述第二标签映射消息中携带有所述 PW ID、 所述网络设 备的地址、 所述包转发设备的地址、 以及所述网络设备为所述网络设备和所 在上述第九方面的第二种可能的实现方式中, 还提供了第九方面的第四 种可能的实现方式,所述接口还用于接收来自于所述 Controller的第二成员发 现消息之后, 向所述 Controller发送第二标签映射消息, 所述第二标签映射消 息中携带有所述 PW ID、 所述网络设备的地址、 所述包转发设备的地址、 以 及所述网络设备为所述网络设备和所述包转发设备之间的所述 PW ID标识的 PW分配的 PW标签。 本发明实施例通过由 Controller执行以下功能:基于标签映射消息来执行 协商该 Controller控制的包转发设备上 PW的 PW标签、生成转发表项并下发 给该 Controller所控制的包转发设备的。 以使包转发设备根据 Controller下发 的转发表项进行报文转发。 实现了在控制与转发功能分离的网络架构中 Controller集中控制 PW信息、 包转发设备承担转发任务的目标, 充分发挥了 SDN控制与转发功能分离的优势。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一筒单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例一中的部署场景示意图;
图 2为本发明实施例一中提供的 L2VPN的建立方法的流程图; 图 3A为本发明实施例一中提供的 L2VPN的建立过程的交互图; 图 3B为本发明实施例一中另一种的部署场景示意图;
图 3C为本发明实施例一中提供的另一种 L2VPN的建立过程的流程图; 图 4为本发明实施例二中提供的 L2VPN的建立方法的流程图; 图 5为本发明实施例二中提供的 L2VPN的建立过程的交互图; 图 6为本发明实施例三中的部署场景示意图;
图 7为本发明实施例三中提供的 L2VPN的建立方法的流程图; 图 8为本发明实施例三中提供的 L2VPN的建立过程的交互图; 图 9A为本发明实施例四提供的一种控制器的结构示意图;
图 9B为本发明实施例四提供的另一种控制器的结构示意图;
图 10为本发明实施例四提供的一种网络设备的结构示意图;
图 11为本发明实施例五提供的一种控制器的结构示意图; 图 12为本发明实施例五提供的一种网络设备的结构示意图; 图 13为本发明实施例六提供的一种控制器的结构示意图;
图 14为本发明实施例六提供的一种网络设备的结构示意图。 具体实施方式 本发明实施例提供了在 SDN网络架构中实现 L2VPN的方案, 下面将结 合不同场景下的实施例对该方案进行描述。
实施例一
本发明实施例提供的 L2VPN 建立方案的应用场景中包括至少两个控制 器,其中每个控制器控制多个包转发设备。本发明实施例中的控制器 Controller 是指可以为其他网络设备, 例如包转发设备,提供控制功能(例如协商 PW标 签、 或生成及下发路由转发表等等)的网络设备, 例如 SDN Controller 本实 施例中的包转发设备包括路由器和交换机。
为了便于理解, 附图 1给出了一个具体部署实例, 该网络环境中包含的 2 个 Controller分另1 J为 Controllerl 和 Controller2, Controllerl 的 IP ( Internet Protocol )地址为 10.10.10.1 , Controlle 的 IP地址为 10.10.10.2。 Controllerl 控制有 4个包转发设备,分别为 Devicel、 Device2, Device3和 Device4, Device 1 的 IP地址为 1.1.1.1 , Device2的 IP地址为 2.2.2.2, Device3的 IP地址为 3.3.3.3 , Device4 的 IP地址为 4.4.4.4。 Controlle 控制有 4个包转发设备, 分别为 Device5、 Device6、 Device7和 Device8 , Device5的 IP地址为 5.5.5.5 , Device6 的 IP地址为 6.6.6.6, Device7的 IP地址为 7.7.7.7, Device8的 IP地址为 8.8.8.8。
下面将结合图 1 , 从 Controllerl的角度对图 2所示本发明实施例提供的 L2VPN的建立方法进行详细介绍:
步骤 21 , Controllerl接收来自于 Controlle 的第一标签映射消息, 所述 第一标签映射消息中携带有 PW ID、 所述 Controllerl控制的第一包转发设备 的 IP地址、 所述 Controlle 控制的第二包转发设备的 IP地址、 以及所述 Controlle 为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID 所标识的 PW分配的 PW标签。
可选地, Controllerl是通过与 Controlle 预先基于 IP地址建立的 LDP远 端会话或边界网关协议( Border Gateway Protocol , 筒称 BGP )会话来接收所 述第一标签映射消息的; 建立远端会话的详细流程请参照相关标准文稿或现 有文档, 在这里不再详述。
具体来说, 由于 VPLS业务在标签分配之前首先要建立所有参与该 VPLS 业务的包转发设备之间的 PW全连接,全连接中的所有 PW的 PW ID均相同, 所以在标签分配时仅根据 PW ID无法唯一地确定一条 PW , 也就无法区分不 同 PW两端的报文转发设备, 所以在标签分配过程中, 需要在标签映射消息 中添加 PW两端的报文转发设备的 IP地址, 以此来区分不同的 PW。
在一个实例中, 假设第一包转发设备为 Devicel , 第二包转发设备为 Device5, Devicel和 Device5之间 PW的 PW ID为 PW 1 , Controlle 为所述 Devicel和 Device5之间 PW ID为 PW1的 PW分配的 PW标签为 500。 则上 述第一标签映射消息中携带有 1.1.1.1、 5.5.5.5、 PW 1和 500。 具体的携带方 式可以是 Controllerl和 Controlle 预先约定的, 在这里不进行限制。
步骤 22, Controllerl根据所述第一标签映射消息携带的所述第一包转发 设备的 IP地址和所述第二包转发设备的 IP地址,确定所述第一包转发设备和 所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道。
其中, 第一包转发设备和第二包转发设备之间预先已建立有隧道, 该隧 道可以是 MPLS隧道, 也可以是 IP隧道, 隧道的建立详细流程请参照相关标 准文稿或现有文档, 在这里不再详述。 在隧道建立成功后, Controllerl中会保 存该 Controller所控制的包转发设备上的隧道与隧道两端设备 IP地址对的映 射关系。可选地,该映射关系可以是包转发设备在隧道建立成功后向 Controller 上报的。 隧道通常是用隧道标识 ID或者隧道转发信息索引来代表的。
例如, Controllerl中保存的隧道标识与隧道两端设备 IP地址对的映射关 系如表 1所示。
表 1
隧道标识 隧道两端设备的 IP地址
Tunnel 10 1.1.1.1-5.5.5.5
Tunnel 20 1.1.1.1-6.6.6.6
Tunnel 40 4.4.4.4-7.7.7.7
Tunnel 50 4.4.4.4-8.8.8.8 Controllerl从保存的如表 1所示的隧道与隧道两端设备 IP地址对的映射 关系中, 查询第一标签映射消息中携带的第一包转发设备的 IP地址和第二包 识所标识的隧道作为所述第一包转发设备和所述第二包转发设备之间用以承 载所述 PW ID所标识的 PW的隧道。
例如, 在一个实例中, 第一标签映射消息中携带有 1.1.1.1、 5.5.5.5、 PW 1 和 500, Controllerl从表 1中查询 IP地址对 1.1.1.1-5.5.5.5对应的隧道标识为 Tunnel 10, 则确定隧道标识为 Tunnel 10的隧道是用以承载 PW 1的隧道。
本步骤的确定承载 PW的隧道的过程也被成为 "隧道迭代"。
步骤 23, Controllerl根据步骤 22确定出的所述隧道, 生成标签转发表项 并将所述标签转发表项下发给所述第一包转发设备, 所述标签转发表项记录 有所述 PW标签和所述隧道的转发信息的映射关系。
在 Controller 中保存有隧道的标识与隧道转发信息的对应关系, 对于 MPLS隧道, 隧道转发信息可以包括隧道标签( Label )。
除了标签转发表项之外, 本实施例后面还将提到 MAC转发表项, 为了筒 明起见在后面的描述中, 如果没有特别指出, 转发表项所指的是标签转发表 项。
在一个实例中, Controllerl根据步骤 22确定出的隧道标识 TUNNEL 10 和第一标签映射消息中携带的标签 500, 生成记录有标签 500和 TUNNEL 10 的转发信息之间映射关系的转发表项, 并将该转发表项下发给 Devicel。
相应地, 第一包转发设备在获得了记录有标签 500和 TUNNEL 100的转 发信息之间映射关系的转发表项的转发表项之后, 可以在有 L2业务报文需要 向第二包转发设备发送时, 根据转发表项对报文进行封装, 以实现 L2VPN业 务, 例如, 通过上述步骤, Controllerl为 Devicel生成了 Devicel到 Device5 的转发表项, Devicel在有 L2业务报文向 Device5发送时, 在报文头部封装 隧道标识 TUNNEL 10的转发信息和 PW标签 500, 然后将封装后的报文发送 给 Device5。
步骤 21~步骤 23是仅以建立 L2VPN时的一次标签分配为例进行说明的, 即仅以 Devicel如何获得与 device5进行 L2VPN传输所需的转发表项为例进 行说明的, 实际上如果是多点到多点的 VPLS 业务, 则需要执行多次类似的 标签分配过程, 从而为参与 VPLS 业务的多个包转发设备生成转发表项。 例 如, 如图 1中的虚线所示, 在 Controllerl控制的 Devicel、 Device2、 Device3 和 Controlle 控制的 Device5、 Device6之间建立 VPLS业务时, Controllerl 需要执行多次步骤 21~步骤 23 , 分别为 Devicel生成到 Device5、 Device6的 转发表项, 为 Device2生成到 Device5、 Device6的转发表项, 为 Device3生成 到 Device5、 Device6的转发表项。同理,由于报文的传输是双向的, Controlle 也需要为 Device5生成到 Devicel~ Device3的转发表项,也需要为 Device6生 成到 Devicel ~ Device3的转发表项。
又例如,在 Controllerl控制的 Devicel和 Controlle 控制的 Device5之间 要建立点到点的 VLL业务时, Controllerl需要执行 1次步骤 21~步骤 23 , 为 Devicel生成到 Device5的转发表项, Controlle 需要执行 1次步骤 21~步骤 23 , 为 Device5生成到 Devicel的转发表项。
作为一种可能的实现方式, 第一 Controller可以根据预先配置获知所述第 一 Controller控制的哪些包转发设备需要建立哪种 L2VPN 业务, 同理第二 Controller也可以根据预先配置获知所述第二 Controller控制的哪些包转发设 备需要建立哪种 L2VPN业务。 例如, Controllerl根据预先配置获知 Devicel~ Device3需要与其他 Controller控制的包转发设备建立 VSI ID为 5的 VPLS业 务。
可选地, 在附图 2所示的流程中, 第二 Controlle 可以根据预先配置获 知第一 Controllerl控制的哪些包转发设备需要与所述 Controlle 控制的哪些 包转发设备建立哪种 L2VPN业务, 以发起向第一 Controller发送第一标签映 射消息; 也可以通过在发送或接收标签映射消息之前的执行的发现过程发现 第一 Controllerl控制的哪些包转发设备需要与所述 Controlle 控制的哪些包 转发设备建立哪种 L2VPN业务。
发现过程是指:在步骤 21之前,所述第一 Controller向所述第二 Controller 发送第一成员发现消息, 所述第一成员发现消息中携带有所述 PW ID和所述 第一 Controller控制的建立所述 PW ID所标识的 PW的多个包转发设备的 IP 地址(即所述第一包转发设备的 IP地址和所述第一 Controller控制的建立所 述 PW ID所标识的 PW的其他包转发设备的 IP地址)。 由于 PW标签分配是双向的, 发现过程还可以包括: 所述第一 Controller 接收来自于所述第二 Controller的第二成员发现消息, 所述第二成员发现消息 中携带有所述 PW ID、 所述第二 Controller控制的建立所述 PW ID所标识的 PW的多个包转发设备的 IP地址(即所述第二包转发设备的 IP地址和所述第 二 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP地 址)。
需要说明的是: 上述第一成员发现消息和第二成员发现消息中的 "第一" 和 "第二" 仅是为了区分不同的成员发现消息, 并不是表示顺序关系。 附图 3A以交互流程图的方式, 对本发明实施例提供的 L2VPN的建立方 法进行详细介绍, 其中, 互为对端设备的 Controllerl和 Controlle 先通过发 现过程确定对端待建立 L2VPN业务的包转发设备, 并通过接下来的标签分配 过程为相互之间已建立 PW的待建立 L2VPN业务的包转发设备生成转发表 项。 这里的 L2VPN业务可以是点到点的 VLL业务, 也可以是多点到多点的 VPLS业务。
步骤 31 , Controllerl和 Controlle 建立会话。 该会话可以是 LDP远端会 话, 也可以是 BGP会话。
步骤 32, Controllerl通过已建立的会话向 Controlle 发送第一成员发现 消息, 所述第一成员发现消息中携带有 PW ID, 以及所述 Controllerl控制的 建立所述 PW ID所标识的 PW的包转发设备的地址列表。
对于点到点的 VLL业务而言, 由于是 Controllerl控制的一个包转发设备 与 Controlle 控制的一个包转发设备之间建立 L2VPN业务,所以第一成员发 现消息中携带的地址列表只有 1 个包转发设备的地址。 例如, 假设 Devicel 和 Device5之间建立 VLL业务, 该业务中 PW ID为 PW 2, 则第一成员发现 消息中携带有 PW 2和 Devicel的 IP地址 1.1.1.1。
对于多点到多点的 VPLS业务而言, 由于是 Controllerl控制的多个包转 发设备与 Controlle 控制的多个包转发设备之间建立 L2VPN业务,所以第一 成员发现消息中携带的地址列表至少有 1 个包转发设备的地址。 例如, 假设 Device l~Device3和 Device5、 Device6之间建立 VPLS业务, 该业务中 PW ID 为 PW 3,则第一成员发现消息中携带有 PW3和 Devicel ~Device3的地址列表 1.1.1.1、 2.2.2.2和 3.3.3.3。
步骤 33 , Controlle 通过上述会话向 Controllerl发送第二成员发现消息, 所述第一成员发现消息中携带有 PW ID , 以及所述 Controlle 控制的建立所 述 PW ID所标识的 PW的包转发设备的地址列表。
在上述 VLL业务实例中, 第二成员发现消息中携带有 PW 2和 Device5 的 IP地址 5.5.5.5。
在上述 VPLS 业务实例中, 第二成员发现消息中携带有 PW 3 和 Device5~Device6的地址列表 5.5.5.5和 6.6.6.6。
步骤 34, Controlle 向 Controllerl发送第一标签映射消息, 所述第一标 签映射消息中携带有 PW ID、 所述 Controllerl控制的第一包转发设备的 IP地 址、 所述 Controlle 控制的第二包转发设备的 IP地址、 以及所述 Controlle 为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID 所标识的 PW分配的 PW标签。
在上述 VLL业务实例中, 第一标签映射消息携带有 PW2、 Devicel的 IP 地址 1.1.1.1和 Device5的 IP地址 5.5.5.5、以及 Controlle 为 Devicel和 Device5 之间的 PW2分配的 PW标签 500。
在上述 VPLS业务实例中,第一标签映射消息携带有 PW3、 Devicel的 IP 地址 1.1.1.1和 Device5的 IP地址 5.5.5.5、以及 Controlle 为 Devicel和 Device5 之间的 PW2分配的 PW标签 600。 当然, 第一标签映射消息也可以是用于携 带 Controlle 为 Controllerl控制的其他包转发设备和 Controlle 控制的其他 包转发设备之间的 PW分配的标签, 例如, 第一标签映射消息携带有 Devicel 的 IP地址 1.1.1.1和 Device6的 IP地址 6.6.6.6、 以及 Controlle 为 Devicel 和 Device6之间的 PW2分配的 PW标签。 本实施例仅以 Devicel和 Device5 之间的标签分配过程为例进行介绍, 其他包转发设备之间的标签分配过程也 类 , 不再一一说明。
步骤 35 , Controllerl根据所述第一标签映射消息携带的所述第一包转发 设备的 IP地址和所述第二包转发设备的 IP地址,确定所述第一包转发设备和 所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道。
在上述 VLL业务实例中, Controllerl确定隧道标识为 TUNNEL 10的隧 道是用以承载 PW 2的隧道。 在上述 VPLS业务实例中, Controllerl确定隧道标识为 TUNNEL 10的隧 道是用以承载 PW 3的隧道。
具体的隧道迭代过程请参照附图 2对应的说明, 在这里不再重复。
步骤 36, Controllerl根据步骤 35确定出的所述隧道, 生成转发表项。 具体的, Controllerl生成记录有标签 500和 TUNNEL 10的转发信息之间 映射关系的转发表项。
在上述 VLL业务实例中, 转发表项中至少记录有 500和 TUNNEL 10的 转发信息的映射关系。
在上述 VPLS业务实例中, 转发表项中至少记录有 600和 TUNNEL 10 的转发信息的映射关系。
步骤 37, Controllerl将步骤 36生成的转发表项下发给 Devicel。
步骤 38, Controllerl向 Controlle 发送第二标签映射消息, 所述第二标 签映射消息中携带有 PW ID、 所述 Controllerl控制的第一包转发设备的 IP地 址、 所述 Controlle 控制的第二包转发设备的 IP地址、 以及所述 Controllerl 为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID 所标识的 PW分配的 PW标签。
在上述 VLL业务实例中, 第二标签映射消息携带有 PW2、 Devicel的 IP 地址 1.1.1.1和 Device5的 IP地址 5.5.5.5、以及 Controllerl为 Devicel和 Device5 之间的 PW2分配的 PW标签 700。
在上述 VPLS业务实例中,第二标签映射消息携带有 PW3、 Devicel的 IP 地址 1.1.1.1和 Device5的 IP地址 5.5.5.5、以及 Controllerl为 Devicel和 Device5 之间的 PW3分配的 PW标签 800。
步骤 39, Controlle 根据所述第二标签映射消息携带的所述第一包转发 设备的 IP地址和所述第二包转发设备的 IP地址,确定所述第一包转发设备和 所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道。
Controlle 进行隧道迭代的过程与 Controllel基本类似,在这里不再重复。 假设在上述 VLL实例中, Controlle 确定隧道标识为 TUNNEL 10的隧道是 用以承载 PW 2的隧道。 在上述 VPLS实例中, Controlle 确定隧道标识为 TUNNEL 10的隧道是用以承载 PW 3的隧道。
具体的隧道迭代过程请参照附图 2对应的说明, 在这里不再重复。 步骤 310, Controlle 根据步骤 39确定出的所述隧道, 生成转发表项。 具体的, 在上述 VLL业务实例中, Controlle 生成记录有标签 700和
TUNNEL 10的转发信息之间映射关系的转发表项。
在上述 VPLS业务实例中, Controlle 生成记录有标签 800和 TUNNEL 10 的转发信息之间映射关系的转发表项。
步骤 311 , Controlle 将步骤 310生成的转发表项下发给 Device5。
后续, Controllerl和 Controlle 可以采用类似的方法为其他参与 L2VPN 的包转发设备之间的 PW分配 PW标签以及生成转发表项, 在这里不再—— 说明。
在这里需要说明的是:步骤 32~步骤 33所示的发现过程可以是 Controllerl 先向 Controlle 发送成员发现消息, 也可以是 Controlle 先向 Controllerl发 送成员发现消息。
另夕卜, 发现过程也可以是如图 3A所示的两个交互的成员发现消息, 也可 以仅有一个成员发现消息, 例如仅有 Controllerl向 Controlle 发送的成员发 现消息, 也可以是仅有 Controlle 向 Controllerl发送的成员发现消息。
第一标签映射消息和第二标签映射消息可以有先后顺序关系, 也可以没 有先后顺序关系:
对于有先后顺序关系的情况: Controllerl根据之前接收到的第一标签映射 消息中的第一包转发设备的 IP地址和第二包转发设备的 IP地址,发送第二标 签映射消息, 即为第一标签映射消息中通过 PW ID、 第一包转发设备的 IP地 址和第二包转发设备的 IP地址所唯一确定的 PW分配另一个标签, 在这种情 况下第二标签映射消息无需依赖于第二成员发现消息。 Controllerl 和 Controlle 通过一次标签映射消息交互,分别为同一条 PW分配了标签, 以及 为这条 PW两端的包转发设备生成转发表项, 实现了这条 PW上的数据双向 转发。
对于没有先后顺序关系的情况: Controllerl依据之前收到的第二成员发现 消息中的 Controlle 控制的包转发设备的地址列表, 从中选择出一个包转发 设备的 IP地址 (例如, device5的 IP地址 ), 并在 Controllerl控制的、 且建立 第二成员发现消息中 PW ID所标识的 PW的包转发设备中选择出一个包转发 设备 (例如, devicel的 IP地址 ), 为 devicel和 device5之间的所述 PW ID所 标识的 PW分配 PW标签, 根据 devicel和 device5的 IP地址以及分配的 PW 标签生成第二标签映射消息, 并将第二标签映射消息发生给 Controller2。可见 在这种情况下, 第二标签映射消息无需依赖于第一标签映射消息。 Controllerl 执行的标签分配过程可以与 Controlle 执行的标签分配过程相互独立。
可选地,为了在 L2VPN业务数目较多的情况下,便于 Controller对 L2VPN 业务进行分类分组管理(分类的条件可以是将具有不同特点的 L2VPN业务分 为一类、 或者把同一运营商的 L2VPN业务分为一类等等, 不一而足), 在这 种情况下, Controller发送的标签映射消息和成员发现消息中还可以携带群组 ( Group )标识(ID )。 例如, 附图 3A中 Controlle 发送的第一标签映射消 息和所述第二成员发现消息中还携带所述 Controlle 为所述 PW ID分配的 Group ID。 同理, Controllerl发送的第二标签映射消息和所述第一成员发现消 息中还携带所述 Controllerl为所述 PW ID分配的 Group ID。 通过附图 2和附图 3A的描述可以看出标签映射消息中要携带两个 IP地 址、 PW ID和 PW标签, 具体的携带方式可以灵活设置, 只要保证标签映射 消息的接收方能够正确根据设定解析出所携带的信息即可, 本实施例中给出 了一种具体实例不应被理解为对本发明实施例的限制。
本实施例以图 2步骤 21、 或图 3A步骤 34中的第一标签映射消息为例, 介绍一种具体的携带方式。 所述第一标签映射消息中包含两个类型-长度-值 ( Type-Length- Value, 筒称 TLV ) 的数据结构, 后面将筒称为 TLV, 其中一 个是转发等价类 (Forwarding Equivalence Class , 筒称 FEC ) TLV, 另一个是 标签 TLV。 本实施例对现有的 FEC TLV进行了扩展, 使之能够携带更多的信 息, 即能够携带第一标签映射消息发送方 Controller所控制的一个包转发设备 的 IP地址(即前面所说的第二包转发设备的 IP地址)、 以及第一标签映射消 息接收方 Controller所控制的一个包转发设备的 IP地址(即前面所说的第一 包转发设备的 IP地址)。 具体的请参照表 2所示:
FEC TLV的类型 ( Type ) 字段(即表 2中的 PW type字段) 的内容指示 所述 FEC TLV的值字段具体包含 PW ID字段、 第一被代理节点地址字段(即 表 2中的第一个 Proxied Node Address字段,也可以被记为 Local Proxied Node Address字段)和第二被代理节点地址字段 (即表 2中的第二个 Proxied Node Address字段,也可以被记为 Remote Proxied Node Address字段);所述 PW ID 携带在所述 FEC TLV中的所述 PW ID字段(即表 2中的 PW ID字段 ) 中, 所述第二包转发设备的 IP地址携带在所述第一被代理节点地址字段中, 所述 第一包转发设备的 IP地址携带在所述第二被代理节点地址字段中。
所述第二 Controller分配的 PW标签携带在所述标签 TLV中。
表 2
+ +
I PW type | PW i nfo Length |
+ +
I Group I D I
+ +
I PW I D I
+ +
I Prox i ed Node Add ress (Loca l ) |
+ +
I Prox i ed Node Address (Remote) |
+ +
本领域技术人员可以理解,以上 FEC TLV和标签 TLV这样的名称只是为 了区分同一个标签映射消息中的不同 TLV,也可以用第一 TLV或第二 TLV这 样的命名方式来命名。如 FEC TLV被命名为第一 TLV,标签 TLV被命名为第 二 TLV。 通过附图 3A的描述可以看出成员发现消息中要携带 PW ID和至少一个 包转发设备的 IP地址, 具体的携带方式可以灵活设置, 只要保证成员发现消 息的接收方能够正确根据设定解析出所携带的信息即可, 本实施例中给出了 一种具体实例不应被理解为对本发明实施例的限制。
本实施例以图 3A步骤 33中的第二成员发现消息为例, 介绍一种具体的 携带方式。 所述第二成员发现消息中包含一个 TLV, 为了不至于与前面标签 映射消息中的 TLV相混淆,这里把第二成员发现消息中的 TLV称为第三 TLV, 具体的:
所述第三 TLV中的类型 ( Type )字段(表 3中的 type字段)的内容指示 所述第三 TLV中的值字段中携带所述 PW ID (表 3中的 PW ID字段)、 以及 所述第二包转发设备的地址和所述第二 Controller控制的建立所述 PW ID所标 识的 PW的其他包转发设备的 IP地址(表 3中的 Addresses字段)。 表 3中的 Address Family字段的值用以指示 Addresses字段填写的是 IPv6 地址还是 IPv4地址。
I type I Length
+
I Group I D
+
I PW I D
+
I Address Fam i I y |
Addresses
+- -+
可选地, 在第一标签映射消息和所述第二成员发现消息中还携带所述第 二 Controller为所述 PW ID分配的 Group ID;
所述 Group ID携带在所述第一 TLV的值字段包含的群组字段(表 2中 的 Group ID字段) 中;
所述 Group ID携带在所述第三 TLV的值字段包含的群组字段(表 3中的 Group ID字段) 中。
可选地,图 2和图 3A中的 Controllerl根据第一标签映射消息生成的转发 表项还记录有: 第二包转发设备上的出接口参数和下一跳。 例如, 在附图 3A 的步骤 36中, Controllerl生成的转发表项中还记录有 device5的接口参数(例 如出接口连接的网络类型为以太网还是异步传输模式等等 )和下一跳。 进一步的, 在上述两个控制器交互的过程中, 为了避免由于其中的至少 一个控制器不支持上述的发现过程或标签交换过程(例如不支持以上的发送 标签映射消息或成员发现消息、 或者无法对接收到的标签映射消息或成员发 现消息进行正确解析从而获得 PW ID、 包转发设备的 IP地址等)所造成的带 宽资源浪费现象, 在执行发现过程或标签分配过程之前两个控制器需要通过 协商来确认对方具备执行上述发现过程和标签分配过程的能力。 显然, 在需 要通过发现过程来确定对端 Controller 控制的哪些包转发设备需要与本 Controller控制的包转发设备建立 L2VPN业务的那种情况下, 在执行发现过 程之前要进行上述发现过程和标签分配过程的能力协商, 在不需要通过发现 过程来确定对端 Controller控制的哪些包转发设备需要与本 Controller控制的 包转发设备建立 L2VPN业务的另一种情况, 两个 Controller只要在标签分配 过程之前, 通过协商确定对方有发送或解析标签映射消息的能力即可。
具体的:
所述 Controllerl接收来自于 Controlle 的第一标签映射消息之前、 且所 述 Controllerl接收来自于所述 Controlle 的第二成员发现消息之前,还包括: 所述 Controllerl与所述 Controlle 协商 , 相互确认所述 Controlle 具备 发送所述第一标签映射消息和所述第二成员发现消息的能力、 以及所述 Controllerl具备解析所述第一标签映射消息和所述第二成员发现消息的能力; 确认 Controlle 具备发送所述第一标签映射消息和所述第二成员发现消 息的能力、 且所述 Controllerl具备解析所述第一标签映射消息和所述第二成 员发现消息的能力之后,所述 Controllerl执行所述接收来自于所述 Controlle 的第一标签映射消息和所述第二成员发现消息的步骤。 可选地, 为了提高可靠性, 参与 L2VPN业务的两个包转发设备之间可以 有至少 2条 PW互为主备, 在主用 PW故障后, 可以使用备用 PW传送业务 报文, 因此两个 Controller之间需要有一个机制来确定 PW的主备状态。 相应 地,附图 2所示的 L2VPN建立方法在 Controllerl和 Controlle 建立会话之后, 还包括: Controllerl接收 Controlle 发送的通知消息, 所示通知消息中携带 所述 PW ID、所述第一包转发设备的 IP地址、所述第二包转发设备的 IP地址 和状态标识, 用以指示所述第一包转发设备和所述第二包转发设备之间所述 PW ID所标识的 PW的状态为主用状态或备用状态。 具体的携带方式可以灵 活设置, 只要通知消息的接收方能够正确根据设定解析出所携带的信息即可, 本实施例中给出了一种具体实例不应被理解为对本发明实施例的限制。 所述 通知消息包含两个 TLV , 即 FEC TLV和状态指示 TLV , 该 FEC TLV的格式 与表 2—致,也是对现有的 FEC TLV进行了扩展,使之能够携带更多的信息, 为了相区分这里把通知消息中携带的 FEC TLV称为第四 TLV ,第四 TLV的类 点地址字段 (类似表 2中的第一个 Proxied Node Address字段)、 第二被代理 节点地址字段(类似表 2中的第二个 Proxied Node Address字段);所述 PW ID 所述第二包转发设备的 IP地址携带在所述第一被代理节点地址字段中, 所述 第一包转发设备的 IP地址携带在所述第二被代理节点地址字段中。 所述状态 标识携带在状态指示 TLV中,状态指示 TLV也被称为第五 TLV, 所述状态标 识包括主用状态标识和备用状态标识。
Controllerl在通过上述通知消息确定一条 PW的状态后,可以在生成的转 发表项中记录 PW的主备状态, 以供第一包转发设备在转发业务报文时参考。 可选地, 在附图 2所示的 L2VPN建立方法中, 在第一包转发设备接收到 Controllerl下发的转发表项之后,还可以通过 PW学习到记录有第二包转发设 备的本地 MAC地址和 PW标签的映射关系的 MAC转发表项, 以便于接收到 业务报文后, 根据报文中的目的 MAC地址和 MAC转发表项确定对应的 PW 标签, 再通过标签转发表项确定发送报文使用的隧道。 第二包转发设备的本 地 MAC地址包括所述第二包转发设备的 MAC地址以及所述第二包转发设备 通过接入电路 ( attached circuit, 筒称 AC )连接获得的其他网络设备的 MAC 地址。 例如, 请参照附图 3B所示, Device5通过已建立的 PW (其中包括通 过与 Devicel之间的 PW1 )发送携带有 Device5的 MAC地址 55-55-55-55-55-55 的未知单播报文; Devicel接收到 Device5通过 PW1发送的未知单播消息之 后, 建立了记录有 Device5的 MAC地址 55-55-55-55-55-55和 Controlle 为 PW1分配的标签 500的 MAC转发表项、以及 Device5连接的用户边缘( Client Edge, 筒称 CE )设备的 MAC地址 51-51-51-51-51-51 和 Controlle 为 PW1 分配的标签 500的 MAC转发表项。 通过 Controlle 为 PW1分配的 PW标签 500,使得 MAC转发表项和标签转发表项发生了关联, Devicel在接收到目的 地址为 55-55-55-55-55-55或 51-51-51-51-51-51的业务报文后, 通过 MAC转 发表项中的标签 500查找到对应标签转发表项中的隧道 100,在该报文头部封 装隧道标识 TUNNEL 10的转发信息和 PW标签 500, 然后将封装后的报文通 过隧道发送给 Device5。
由于网络状况随时都可能发生改变, 例如, 某些包转发设备发生故障、 或者人为移除等原因而不能进行原本正确的转发处理,这时通过更新 MAC转 发表项, 停止向发生故障的包转发设备发送报文, 避免大量报文延迟和由于 延迟丢包造成的大量报文重传, 从而改善网络的传输性能。 为了适应这一需 求, 本发明实施例提供的 L2VPN业务的建立方法 Controller在该 Controller 控制的某个包转发设备发生故障之后,需要通过 MAC地址清除消息通知其他 Controller发生故障的包转发设备的 MAC地址,以便于其他 Controller通知所 述其他 Controller控制的包转发设备清除保存的与发生故障的包转发设备的 MAC地址相关的 MAC转发表项。从接收 MAC地址清除消息的 Controller的 角度来说, Controller需要通知之前接收转发表项的包转发设备清除与发生故 障的包转发设备相关的转发表项。 请参照附图 3C , 接着附图 2所示的流程, 假设第二包转发设备(附图 3B 中的 device5 )是发生故障的包转发设备, 在 Controllerl生成转发表项并将所述转发表项下发给所述第一包转发设备(附图 3B中的 devicel )之后, 还包括:
步骤 301 , 所述 Controllerl接收所述 Controlle 发送的 MAC地址清除 ( Withdraw )消息, 所述 MAC地址清除消息中携带携带所述第一包转发设备 的的 IP地址和 MAC地址列表。 在一个实例中 MAC地址清除消息中携带携 带 Devicel的 IP地址和 MAC地址列表。
步骤 302, 若所述 MAC地址清除消息中的 MAC地址列表为空, 则所述 第一 Controller根据所述 MAC地址清除消息中的所述第一包转发设备的 IP地 址, 指示所述第一包转发设备清除保存的所有 MAC转发表项, 所述 MAC转 发表项中记录有 MAC地址与所述第二 Controller分配的所述 PW标签的映射 关系。 在一个实例中, MAC地址列表为空, 则 Devicel清除了所保存的所有 MAC转发表项。
步骤 303 , 若所述 MAC地址列表中携带有所述第二包转发设备的本地 MAC地址, 则所述第一 Controller根据所述 MAC地址清除消息中的所述第 一包转发设备的 IP地址, 指示所述第一包转发设备清除保存的记录有所述本 地 MAC地址列表中的 MAC地址的 MAC转发表项 (显然包括记录有所述本 地 MAC地址列表中的 MAC地址与所述第二 Controller分配的所述 PW标签 映射关系的 MAC转发表项), 所述第二包转发设备的本地 MAC地址包括所 述第二包转发设备的 MAC地址、以及所述第二包转发设备通过 AC连接学习 到的其他网络设备的 MAC地址。在一个实例中, MAC地址列表中为 Device5 的本地 MAC地址,则 Devicel清除了记录有 Device5的本地 MAC地址的 MAC 转发表项。 本发明实施例提供了一种适应于 SDN网络构架的 L2VPN的建立方法, 从一个 Controller的角度来看, 以第一 Controller为例, 第一 Controller接收来 自于第二 Controller的第一标签映射消息, 所述第一标签映射消息中携带有伪 线 PW标识 ID、 所述第一 Controller控制的第一包转发设备的 IP地址、 所述 第二 Controller控制的第二包转发设备的 IP地址、以及所述第二 Controller为 所述第一包转发设备和所述第二包转发设备之间的所述 PW ID所标识的 PW 分配的 PW标签; 所述第一 Controller第一标签映射消息携带的所述第一包转 发设备的 IP地址和所述第二包转发设备的 IP地址执行地址迭代过程,确定所 述第一包转发设备和所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道; 所述第一 Controller根据确定出的所述隧道, 生成转发表项并将 所述转发表项下发给所述第一包转发设备, 所述转发表项记录有所述 PW标 签和所述隧道的转发信息的映射关系。 也就是说, 在 SDN 网络架构中由 Controller来执行协商 PW标签、 生成路由转发表并将路由转发表下发给该 Controller所控制的包转发设备的功能, 包转发设备根据 Controller下发的转 发表项进行报文转发。 实现了 Controller集中控制 PW信息、 包转发设备承担 转发任务的目标, 充分发挥了 SDN控制与转发功能分离的优势。 实施例二
VLL业务与 VPLS业务的区别在于, VLL是一种点到点的 L2VPN业务, 而 VPLS业务是一种多点到多点的 L2VPN业务。 在实施例一所示的场景下, Controller对所控制的包转发设备的 PW信息进行集中管理。 也就是说, Controller存储有包转发设备与 PW ID的对应关系, 即哪些包转发设备参与哪 些 PW ID对应的 L2VPN业务, 例如 Controllerl保存的管理信息如表 4所示。
表 4
Figure imgf000034_0001
对于 VLPS业务而言, 参与同一 VPLS业务的多个包转发设备之间建立 PW全连接之后, 该 VPLS业务的所有的 PW都具备相同的 PW ID , 因此在图 2步骤 21中, 假设 Controllerl接收到的第一标签映射消息中的 PW ID为表 5 签。 然而对于 VLL业务来说, 同一 VLL业务只建立一条 PW。 不同 VLL业 务的 PW ID不同, 因此在 L2VPN业务为 VLL业务的场景下, 在图 2步骤 21 中,假设 Controllerl接收到的第一标签映射消息中的 PW ID为表 4中的 PW7 , 则可以直接确定该第一标签映射消息是 Controlle 为 Controllerl 控制的 Devicel上 PW7所标识的 PW分配 PW标签, 而无需通过解析第一标签映射 消息中携带的包转发设备的 IP地址才能唯一的确定 PW。
因此, 本实施例对 L2VPN业务具体为 VLL业务的场景, 提出了一种筒 化的 L2VPN的建立方案, 场景示意图仍可以参照附图 1 , 原理流程图如附图 4所示。
步骤 41 , Controllerl接收来自于 Controlle 的第一标签映射消息, 所述 第一标签映射消息中携带有 PW ID、 所述 Controlle 控制的第二包转发设备 所述第二包转发设备是所述 PW的一个端点设备。
可选地, Controllerl是通过与 Controlle 预先基于 IP地址建立的 BGP会 话或 LDP远端会话来接收所述第一标签映射消息的; 建立远端会话的详细流 程请参照相关标准文稿或现有文档, 在这里不再详述。
在一个实例中, 假设第一包转发设备为 Device4 , 第二包转发设备为 Device7, Device4和 Device7建立了 PW ID为 PW7的 PW。 Controlle 为 Device4和 Device7之间 PW ID为 PW7的 PW分配的 PW标签为 100。 则上 述第一标签映射消息中携带有 Device7的 IP地址 7.7.7.7、 PW7和 100。 具体 的携带方式可以是 Controllerl和 Controlle 预先约定的,在这里不进行限制。
步骤 42,所述 Controllerl从保存的 PW ID与所述 Controllerl控制的包转 发设备的对应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一 包转发设备, 所述第一包转发设备为所述 PW的另一个端点设备。
由于本实施例开始部分所介绍的原因, 在 VLL 业务场景下, Controller 根据第一标签映射消息中携带的 PW ID就可以确定在本 Controller控制的所有 包转发设备中,该 PW ID所标识的 PW的一个端点是其中的哪个包转发设备。
在一个实例中, Controllerl 从表 4 中查询到 PW7对应的包转发设备为 Dcvicc4。
步骤 43 ,所述 Controllerl根据所述第一包转发设备的 IP地址和所述第一 标签映射消息携带的所述第二包转发设备的 IP地址, 确定所述第一包转发设 备和所述第二包转发设备之间用以承载所述第一 PW的隧道。
隧道迭代的过程与实施例一中步骤 22中的描述基本类似, 在这里不再重 复。 在上述实例中, 假设 Controllerl从表 1 中查询 IP地址对 4.4.4.4-7.7.7.7 对应的隧道标识为 TUNNEL 40, 则确定隧道标识为 TUNNEL 40的隧道是用 以 7 载 PW 7的隧道。
步骤 44, 所述 Controllerl根据确定出的所述隧道, 生成转发表项并将所 述转发表项下发给所述第一包转发设备, 所述转发表项记录有所述 PW标签 和所述隧道的转发信息的映射关系。
在一个实例中, Controllerl根据步骤 43确定出的隧道标识 TUNNEL 40 和第一标签映射消息中携带的标签 100, 生成记录有标签 100和 TUNNEL 40 的转发信息之间映射关系的转发表项, 并将该转发表项下发给 Device4。
相应地, 第一包转发设备在获得了记录有标签 500和 TUNNEL 10的转 发信息之间映射关系的转发表项的转发表项之后, 可以在有 L2业务报文需要 向第二包转发设备发送时, 根据转发表项对报文进行封装, 以实现 L2VPN业 务, 例如, 通过上述步骤, Controllerl为 Devicel生成了 Device4到 Device7 的转发表项, Device4在有 L2业务报文向 Device7发送时, 在报文头部封装 隧道标识 TUNNEL 40的转发信息和 PW标签 100, 然后将封装后的报文发送 给 Device7。
由于报文的传输是双向的, Controlle 也需要根据 Controllerl发送的第 二标签映射消息为 Device7生成到 Device4的转发表项。
附图 5以交互流程图的方式,对本发明实施例提供的 L2VPN的建立方法 进行详细介绍, 其中, 互为对端设备的 Controllerl和 Controlle 通过标签分 配过程为相互之间已建立 PW 的待建立 VLL业务的包转发设备生成转发表 项。
步骤 51 , Controllerl和 Controlle 建立会话。 该会话可以是 LDP会话 , 也可以是 BGP会话。
步骤 52, Controlle 向 Controllerl发送第一标签映射消息, 所述第一标 签映射消息中携带有 PW7、 Device7的 IP地址 7.7.7.7、 以及所述 Controlle 为所述 PW7分配的 PW标签 100, 其中 Device7是 PW7的一个端点设备。
步骤 53 , Controllerl从保存的 PW ID与所述 Controllerl控制的包转发设 备的对应关系中查询所述第一标签映射消息中携带的 PW7对应的包转发设备 为 Device4, 其中 Device4为所述 PW7的另一个端点设备, 执行步骤 54和步 骤 57。 映射消息携带的 Device7的 IP地址 7.7.7.7,确定 Device4和 Device7之间用以 承载 PW7的隧道为 TUNNEL 40。 发表项记录有第一标签映射消息携带的 PW标签 100和所述隧道 TUNNEL 40 的转发信息的映射关系。
步骤 56,所述 Controllerl将步骤 55生成的所述转发表项下发给 Device4。 步骤 57, Controllerl向 Controlle 发送第二标签映射消息, 所述第二标 签映射消息中携带有 PW7、 Device4的 IP地址 4.4.4.4、 以及所述 Controllerl 为所述 PW7分配的 PW标签 200, 其中 Device4是 PW7的另一个端点设备。
步骤 58, Controlle 从保存的 PW ID与所述 Controllerl控制的包转发设 备的对应关系中查询所述第二标签映射消息中携带的 PW7对应的包转发设备 为 Device7。 映射消息携带的 Device4的 IP地址 4.4.4.4,确定 Device4和 Device7之间用以 承载 PW7的隧道为 TUNNEL 40。
步骤 510, 所述 Controlle 根据确定出的所述隧道, 生成转发表项, 所述 转发表项记录有第二标签映射消息携带的 PW标签 200和所述隧道 TUNNEL 40的转发信息的映射关系。
步骤 511 , 所述 Controlle 将步骤 510 生成的所述转发表项下发给 Device7。
通过步骤 51~步骤 59, Controllerl和 Controlle 为 Device4和 Device7之 间的 PW7分配 PW标签, 并为 Device4和 Device7生成转发表项。
与实施例一相类似, 为了在 L2VPN 业务数目较多的情况下, 便于 Controller对 L2VPN业务进行分类分组管理, Controller发送的标签映射消息 和成员发现消息中还可以携带 Group ID。 例如, 附图 5中 Controlle 发送的 第一标签映射消息还携带所述 Controlle 为所述 PW 7分配的 Group ID。 同 理, Controllerl发送的第二标签映射消息还携带所述 Controllerl为所述 PW 7 分配的 Group ID。
通过附图 4和附图 5的描述可以看出标签映射消息中要携带一个 IP地址、 PW ID和 PW标签, 具体的携带方式可以灵活设置, 只要保证标签映射消息 的接收方能够正确根据设定解析出所携带的信息即可, 本实施例中给出了一 种具体实例不应被理解为对本发明实施例的限制。
本实施例以图 4步骤 41、 或图 5步骤 52中的第一标签映射消息为例, 介 绍一种具体的携带方式。 所述第一标签映射消息中包含两个 TLV, 其中一个 是 FEC TLV, 另一个是标签 TLV。 本实施例对现有的 FEC TLV进行了扩展, 使之能够携带更多的信息, 即能够携带第一标签映射消息发送方 Controller所 控制的一个包转发设备的 IP地址(即前面所说的第二包转发设备的 IP地址)。 具体的请参照表 5所示:
FEC TLV的类型 ( Type ) 字段(即表 5中的 PW type字段) 的内容指示 所述 FEC TLV的值字段具体包含 PW ID字段、 被代理节点地址字段 (即表 2 中的 Proxied Node Address字段; 所述 PW ID携带在所述 FEC TLV中的所述 PW ID字段(即表 5中的 PW ID字段)中, 所述第二包转发设备的 IP地址携 带在所述被代理节点地址字段中。
所述第二 Controller分配的 PW标签携带在所述标签 TLV中。
表 5
+ +
I PW type | PW i nfo Length |
+ +
I Group I D I
+ +
I PW I D I
+ +
I Prox i ed Node Add ress |
+ +
本领域技术人员可以理解,以上 FEC TLV和标签 TLV这样的名称只是为 了区分同一个标签映射消息中的不同 TLV,也可以用第一 TLV或第二 TLV这 样的命名方式来命名。如 FEC TLV被命名为第一 TLV,标签 TLV被命名为第 二 TLV。
可选地,在第一标签映射消息中还携带所述第二 Controller为所述 PW ID 分配的 Group ID; 所述 Group ID携带在所述第一 TLV的值字段包含的群组 字段(表 6中的 Group ID字段) 中。
可选地, 在附图 4步骤 44中, Controllerl生成的转发表项还记录有: 第 一包转发设备的入接口。 相应地, Controllerl生成转发表项的过程包括: 所述 Controllerl根据第一标签映射消息中的所述 PW ID标识, 从保存的 所述 Controllerl控制的第一包转发设备的入接口与所述 PW ID标识的映射关 系, 查询所述 PW ID标识对应的第一包转发设备的入接口; 生成转发表项并 将所述转发表项下发给所述第一包转发设备, 所述转发表项包括所述第一包 转发设备的入接口、 所述 Controlle 为所述 PW分配的 PW标签和所述隧道 的转发信息三者的映射关系。
在 VLL业务的场景下, 包转发设备进行报文转发时是根据转发表项中记 录入接口、 PW标签和隧道转发信息这三者的映射关系进行转发的。 例如, 假设 Controllerl 查询到 Device4 的入接口 1 对应 PW7 , 通过上述步骤 Controllerl生成的转发表项记录有 PW标签 100和 TUNNEL 40的转发信息映 射关系。 Device4通过入接口 1接收报文后, 在该报文头部封装 TUNNEL 40 的转发信息和 PW标签 100, 然后将封装后的报文通过隧道发送给 Device7。 可选地, 与实施例一类似, 在两个 Controller发送标签映射消息之前, 还 包括: 通过协商确定对方有发送或解析标签映射消息的能力。 可以参照实施 例一中的相关描述, 在这里不再赘述。
本发明实施例提供了一种建立 VLL业务的方案, 在可以实现实施例一中 所描述方案的有益效果的基础上, 与实施例一相比, 节约了建立 L2VPN时两 个 Controller 交互的消息的数量, 进一步节约了网络带宽资源, 提高了建立
L2VPN的效率。 实施例三
前面的实施例介绍了两个 Controller的场景下建立 L2VPN的方案。 然而 由于网络架构的推广难以一蹴而就, 现有传统的网络架构 (控制功能和转发 功能没有分离 )和 SDN网络架构可能会在一定时期内存在共存的现象。 附图 6给出了两种网络架构共存场景的一个筒化示例, 该网络环境中包含的 1 个 Controller和一个传统网络设备, 分别为 Controller 1和 Traditional_IP_Node, Controllerl的 IP地址为 10.10.10.1 , Traditional_IP_Node的 IP地址为 10.10.10.2。 Controllerl 控制有 4个包转发设备, 分别为 Devicel、 Device2、 Device3 和 Device4, Device 1的 IP地址为 1.1.1.1 , Device2的 IP地址为 2.2.2.2, Device3 的 IP地址为 3.3.3.3 , Device4的 IP地址为 4.4.4.4。 如何在这种两种网络架构 共存的场景下提供一种建立 L2VPN的方法, 这成为了一个需要解决的问题。
本发明实施例提供了一种在传统的网络架构和 SDN网络架构共存场景下 建立 L2VPN的方法。
请参照附图 7所示, 该方法是从传统网络设备的角度进行描述的。
步骤 701 , 网络设备接收来自于 Controller的第一标签映射消息, 所述第 一标签映射消息中携带有 PW ID、 所述 Controllerl控制的一个包转发设备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包转发设备和 可选地, 网络设备是通过与 Controller预先基于 IP地址建立的 BGP会话 或 LDP远端会话来接收所述第一标签映射消息的; 建立远端会话的详细流程 请参照相关标准文稿或现有文档, 在这里不再详述。 与实施例一中的情况类似, 本实施例中的 L2VPN业务可以是多点到多点 的 VPLS业务, 也可以是点到点的 VLL业务。 在一个实例中, 假设包转发设 备为 Devicel , Device 1和 Traditional_IP_Node之间 PW的 PW ID为 PW 5, Controller为所述 Devicel和 Traditional_IP_Node之间 PW分配的 PW标签为 300。 则上述第一标签映射消息中携带有 1.1.1.1、 10.10.10.2、 PW 5和 300。 具体的携带方式可以是 Controllerl和 Traditional_IP_Node预先约定的, 在这 里不进行限制。
步骤 702,所述网络设备根据保存的所述包转发设备与所述网络设备之间 已建立的隧道、与所述包转发设备的 IP地址和网络设备的 IP地址的对应关系, 以及所述第一标签映射消息携带的所述包转发设备的 IP地址和所述网络设备 的 IP地址,确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID所 标识的 PW的隧道。
其中, 所述包转发设备和所述网络设备之间预先已建立有隧道, 该隧道 可以是 MPLS隧道, 也可以是 IP隧道, 隧道的建立详细流程请参照相关标准 文稿或现有文档, 在这里不再详述。 在隧道建立成功后, 一方面, 网络设备 会保存隧道与隧道两端设备 IP地址对的映射关系; 另一方面, Controller也会 保存该 Controller所控制的包转发设备上的隧道与隧道两端设备 IP地址对的 映射关系。 隧道通常是用 TUNNEL ID来代表的。
例如, 在一个实例中, Traditional_IP_Node中保存的隧道与隧道两端设备 IP地址对的映射关系如表 6所示。
表 6
Figure imgf000040_0001
第一标签映射消息中携带有 1.1.1.1、 10.10.10.2、 PW 5 和 200 , Traditional_IP_Node从表 6中查询 IP地址对 10.10.10.2-1.1.1.1对应的隧道标 识为 TUNNEL 11 , 则确定隧道标识为 TUNNEL 11的隧道是用以承载 PW 5 的隧道。
步骤 703 , 所述网络设备根据确定出的所述隧道生成转发表项, 所述转发 表项记录有所述 PW标签和所述隧道的转发信息的映射关系。
在一个实例中, Traditional_IP_Node 根据步骤 502 确定出的隧道标识 TUNNEL 11和第一标签映射消息中携带的标签 500, 生成记录有 TUNNEL 11 的转发信息和标签 200之间映射关系的转发表项。 Traditional_IP_Node在生成 了该转发表项之后, 可以在有 L2业务报文需要向 devicel发送时, 根据转发 表项对报文进行封装, 以实现 L2VPN 业务, 例如, 在报文头部封装隧道 TUNNEL 11的转发信息和 PW标签 200,然后将封装后的报文发送给 Devicel。
步骤 701~步骤 703是仅以建立 L2VPN时的一次标签分配为例进行说明 的, 即仅以 Traditional_IP_Node如何获得与 devicel进行 L2VPN所需的转发 表项为例进行说明的, 实际上如果是多点到多点的 VPLS 业务, 则需要执行 多次类似的标签分配过程, 从而为参与 VPLS 业务的多个包转发设备和传统 网络设备生成转发表项。 例如, 如图 6中的虚线所示, 在 Controllerl控制的 Devicel、 Device2、 Device3和 Traditional_IP_Node之间建立 VPLS业务时, Traditional_IP_Node 需要执行多次步骤 501 ~步骤 503 , 分别生成 Traditional_IP_Node到 Devicel、 Device2和 Device3的转发表项。 同理, 由于 报文的传输是双向的, Controllerl 也需要为 Devicel~ Device3 分别生成到 Traditional_IP_Node的转发表项。
又例如,在 Controllerl控制的 Devicel和 Traditional_IP_Node之间要建立 点到点的 VLL业务时, Traditional_IP_Node需要执行 1次步骤 701~步骤 703 , 生成到 Devicel的转发表项。
作为一种可能的实现方式, 传统网络设备可以根据预先配置可以根据预 先配置获知该传统网络设备需要建立哪种 L2VPN 业务。 例如, Traditional_IP_Node根据预先配置获知需要与某个 Controller控制的包转发设 备建立 VSI ID为 5的 VPLS业务。
可选地, 在附图 7所示的流程中, 传统网络设备可以根据预先配置获知 该传统网络设备需要与作为标签分配对端的 Controller控制的哪些包转发设备 需要建立哪种 L2VPN业务, 同理作为标签分配对端的 Controller也可以根据 预先配置获知需要与哪些传统网络设备需要建立哪种 L2VPN 业务。 例如, Traditional_IP_Node根据预先配置获知需要与 Controllerl控制的包转发设备 Devicel~Device3建立 VSI ID为 5的 VPLS业务。也可以通过在发送或接收标 签映射消息之前的执行的发现过程发现传统网络设备需要与 Controller控制的 哪些包转发设备建立哪种 L2VPN业务。本实施例中的发现过程与实施例一中 的发现过程基本类似, 在这里不再重复。
附图 8以交互流程图的方式,对本发明实施例提供的 L2VPN的建立方法 进行详细介绍,其中, Traditional_IP_Node先通过发现过程确定对端 Controllerl 所控制的待建立 L2VPN业务的包转发设备, 并通过接下来的标签分配过程为 Traditional_IP_Node生成到所述包转发设备的转发表项。 这里的 L2VPN业务 可以是点到点的 VLL业务, 也可以是多点到多点的 VPLS业务, 将分别举例 说明。
步骤 81 , Controllerl和 Traditional_IP_Node建立会话。该会话可以是 LDP 会话, 也可以是 BGP会话。
步骤 82, Traditional_IP_Node通过已建立的会话向 Controllerl发送第一 成员发现消息,所述第一成员发现消息中携带有 PW ID和 Traditional_IP_Node 的 IP地址。
当然, 第一成员发现消息是可选的, 因为 Controllerl 已经与 Traditional_IP_Node建立了会话, 所以 Controllerl已获得 Traditional_IP_Node 的 IP地址, 所以 Traditional_IP_Node无需向 Controllerl发送成员发现消息。
步骤 83 , Controllerl通过已建立的会话向 Traditional_IP_Node发送第二 成员发现消息,所述第二成员发现消息中携带有 PW ID, 以及所述 Controllerl 控制的建立所述 PW ID所标识的 PW的包转发设备的地址列表。
对于点到点的 VLL业务而言, 由于是传统网络设备与 Controllerl控制的 一个包转发设备之间建立 L2VPN业务,所以第二成员发现消息中携带的地址 列表只有 1个包转发设备的地址。 例如, 假设 Traditional_IP_Node和 Devicel 之间建立 VLL业务, 该业务中 PW ID为 PW 4, 则第二成员发现消息中携带 有 PW 4和 Devicel ^ IP地址 1.1.1.1。
对于多点到多点的 VPLS 业务而言, 由于是传统网络设备与 Controllerl 控制的多个包转发设备之间建立 L2VPN业务,所以第二成员发现消息中携带 的地址列表至少有 1 个包转发设备的地址。 例如, 假设 Traditional_IP_Node 和 Devicel ~Device3之间建立 VPLS业务, 该业务中 PW ID为 PW5 , 则第二 成员发现消息中携带有 PW5和 Devicel~Device3的地址列表 1.1.1.1、 2.2.2.2 和 3.3.3.3。
步骤 84, Controllerl向 Traditional_IP_Node发送第一标签映射消息, 所 述第一标签映射消息中携带有 PW ID、 所述 Controllerl控制的第一包转发设 备的 IP地址、 Traditional_IP_Node的 IP地址、 以及所述 Controllerl为所述第 一包转发设备和所述 Traditional_IP_Node之间的所述 PW ID所标识的 PW分 配的 PW标签。
在上述 VLL业务实例中, 第一标签映射消息携带有 PW4、 Devicel的 IP 地址 1.1.1.1和 Traditional_IP_Node的 IP地址 10.10.10.2、 以及 Controllerl为 Devicel和 Traditional_IP_Node之间的 PW4分配的 PW标签 800。
在上述 VPLS业务实例中,第一标签映射消息携带有 PW5、 Devicel的 IP 地址 1.1.1.1和 Traditional_IP_Node地址 10.10.10.2、以及 Controllerl为 Devicel 和 Traditional_IP_Node之间的 PW5分配的 PW标签 900。 当然, 第一标签映 射消息也可以是用于携带 Controllerl为 Traditional_IP_Node和 Controllerl控 制的其他包转发设备之间的 PW分配的标签, 例如, 第一标签映射消息携带 有 Traditional_IP_Node的 IP地址 10.10.10.2和 Device2的 IP地址 2.2.2.2、 以 及 Controllerl为 Traditional_IP_Node和 Device2之间的 PW5分配的 PW标签。 本实施例仅以 Traditional_IP_Node和 Devicel之间的标签分配过程为例进行介 绍, 其他包转发设备之间的标签分配过程也类似, 不再——说明。
步骤 85 , Traditional_IP_Node根据所述第一标签映射消息携带的所述第 一包转发设备的 IP地址和 Traditional_IP_Node的 IP地址,确定所述第一包转 发设备和 Traditional_IP_Node之间用以承载所述 PW ID所标识的 PW的隧道。
在上述 VLL业务实例中, Controllerl确定隧道标识为 TUNNEL 11的隧 道是用以承载 PW4的隧道。具体的隧道迭代过程请参照附图 3A对应的描述, 在这里不再重复。
在上述 VPLS业务实例中, Controllerl确定隧道标识为 TUNNEL 11的隧 道是用以承载 PW5的隧道。具体的隧道迭代过程请参照附图 3A对应的描述, 在这里不再重复。
步骤 86, Traditional_IP_Node根据步骤 85确定出的所述隧道, 生成转发 表项并存储。
在上述 VLL业务实例中, 转发表项中至少记录有 TUNNEL 11和 800的 映射关系。
在上述 VPLS业务实例中,转发表项中至少记录有 TUNNEL 11和 900的 映射关系。
步骤 87, Traditional_IP_Node向 Controllerl发送第二标签映射消息, 所 述第二标签映射消息中携带有 PW ID、 所述 Controllerl控制的第一包转发设 备的 IP地址、 Traditional_IP_Node的 IP地址、 以及所述 Traditional_IP_Node 为所述第一包转发设备和 Traditional_IP_Node之间的所述 PW ID所标识的 PW 分配的 PW标签。
在上述 VLL业务实例中, 第二标签映射消息携带有 PW4、 Devicel的 IP 地址 1.1.1.1 和 Traditional_IP_Node 的 IP 地址 10.10.10.2、 以及 Traditional_IP_Node为 Traditional_IP_Node和 Devicel之间的 PW4分配的 PW 标签 1000。
在上述 VPLS业务实例中,第二标签映射消息携带有 PW5、 Devicel的 IP 地址 1.1.1.1 和 Traditional_IP_Node 的 IP 地址 10.10.10.2、 以及 Traditional_IP_Node为 Traditional_IP_Node和 Devicel之间的 PW5分配的 PW 标签 1100。
步骤 88, Controllerl根据所述第二标签映射消息携带的所述第一包转发 设备的 IP地址和 Traditional_IP_Node的 IP地址,确定所述第一包转发设备和 所述 Traditional_IP_Node之间用以承载所述 PW ID所标识的 PW的隧道。
Controllerl进行隧道迭代的过程与实施例一中的描述基本类似,在这里不 再重复。 假设在上述 VLL业务实例中, Controllerl确定隧道标识为 TUNNEL 11的隧道是用以承载 PW 4的隧道, 在上述 VPLS业务实例中, Controllerl确 定隧道标识为 TUNNEL 11的隧道是用以承载 PW 5的隧道。 具体的隧道迭代 过程请参照附图 2对应的说明, 在这里不再重复。
步骤 89, Controllerl根据步骤 88确定出的所述隧道, 生成转发表项。 具体的, 在上述 VLL业务实例中, Controllerl生成记录有 TUNNEL 11 和标签 1000之间映射关系的转发表项。
在上述 VPLS业务实例中, Controllerl生成记录有 TUNNEL 11和标签 1100之间映射关系的转发表项。
步骤 810, Controllerl将步骤 89生成的转发表项下发给 Devicel。
后续, Traditional_IP_Node和 Controllerl可以采用类似的方法为其他参与
L2VPN的包转发设备与 Traditional_IP_Node之间的 PW分配 PW标签以及生 成转发表项, 在这里不再——说明。
在这里需要特别说明的是: 附图 8 中的部分消息之间并没有顺序上的限 定。 与实施例一中的情况相类似, 第一标签映射消息和第二标签映射消息可 以有先后顺序关系, 也可以没有先后顺序关系:
对于有先后顺序关系的情况: Traditional_IP_Node根据之前接收到的第一 标签映射消息中的第一包转发设备的 IP地址, 发送第二标签映射消息, 即为 第一标签映射消息中通过 PW ID、 第一包转发设备的 IP 地址和 Traditional_IP_Node的 IP地址所唯一确定的 PW分配另一个标签, 在这种情 况下第二标签映射消息无需依赖于第二成员发现消息。 Controllerl 和 Traditional_IP_Node通过一次标签映射消息交互,分别为同一条 PW分配了标 签, 以及为作为这条 PW两端的第一包转发设备和 Traditional_IP_Node生成 转发表项, 实现了这条 PW上的数据双向转发。 在这种情况下, 第二成员发 现消息也是不必要的。
对于没有先后顺序关系的情况: Traditional_IP_Node依据之前收到的第二 成员发现消息中的 Controllerl控制的包转发设备的地址列表, 从中选择出一 个包转发设备的 IP地址(例如, devicel的 IP地址),并为 Traditional_IP_Node 和 devicel 之间的所述 PW ID 所标识的 PW 分配 PW 标签, 根据 Traditional_IP_Node和 devicel的 IP地址以及分配的 PW标签生成第二标签映 射消息, 并将第二标签映射消息发生给 Controllers 可见在这种情况下, 第二 标签映射消息无需依赖于第一标签映射消息。 Traditional_IP_Node执行的标签 分配过程可以与 Controllerl执行的标签分配过程相互独立。
可选地, 为了在 L2VPN业务数目较多的情况下, 便于 Controller和传统 网络设备对 L2VPN业务进行分类分组管理, 在这种情况下, Controller或传 统网络设备发送的标签映射消息和成员发现消息中还可以携带 Group ID。 例 如, 附图 8中 Controllerl发送的第一标签映射消息和所述第二成员发现消息 中还携带所述 Controller 为所述 PW ID 分配的 Group ID。 同理, Traditional_IP_Node发送的第二标签映射消息和所述第一成员发现消息中还 携带 Traditional_IP_Node为所述 PW ID分配的 Group ID。
附图 7和附图 8中标签映射消息携带 IP地址、 PW ID和 PW标签时具体 的携带方式与实施例一中的基本类似, 这里仅以附图 8步骤 84中的第一标签 映射消息为例, 介绍一种具体的携带方式。 对 FEC TLV的扩展方式请参照实 施例一中的介绍,所述 PW ID携带在所述 FEC TLV中的所述 PW ID字段(即 表 2中的 PW ID字段 )中, 所述第一包转发设备的 IP地址携带在所述第一被 代理节点地址字段中, 所述传统网络设备的 IP地址携带在所述第二被代理节 点地址字段中。 例如, 在步骤 84的 VLL业务实例中, PW4携带在 PW ID字 段中, Devicel 的 IP 地址 1.1.1.1 携带在第一被代理节点地址字段中, Traditional_IP_Node的 IP地址 10.10.10.2携带在第二被代理节点地址字段中。 所述 Controllerl分配的 PW标签 800携带在所述标签 TLV中。 在步骤 84的 VPLS业务实例中, PW5携带在 PW ID字段中, Devicel的 IP地址 1.1.1.1携 带在第一被代理节点地址字段中, Traditional_IP_Node 的 IP地址 10.10.10.2 携带在第二被代理节点地址字段中。 所述 Controllerl分配的 PW标签 900携 带在所述标签 TLV中。
附图 8中成员发现消息携带 PW ID和 IP地址时具体的携带方式与实施例 一中的也基本类似, 步骤 84中的第二成员发现消息的携带方式与实施例一中 完全相同, 在这里不再重复。 步骤 83中的第一成员发现消息的格式请参照表 3, 所述第二成员发现消息中包含一个 TLV, 为了不至于与前面标签映射消息 中的 TLV相混淆,这里把第二成员发现消息中的 TLV称为第三 TLV,具体的: 所述第三 TLV中的类型 (Type )字段(表 3中的 PW type字段) 的内容 指示所述第三 TLV中的值字段中携带所述 PW ID (表 3中的 PW ID字段)、 以及所述传统网络设备,如 Traditional_IP_Node的 IP地址(表 3中的 Addresses 字段)。
可选地, 在第一标签映射消息和所述第二成员发现消息中还携带所述 Controller为所述 PW ID分配的群组标识;
所述群组标识携带在所述第一 TLV的值字段包含的群组字段(表 2中的 Group ID字段) 中;
所述群组标识携带在所述第三 TLV的值字段包含的群组字段(表 3中的 Group ID字段) 中。
可选地, 图 7和图 8中的 Traditional_IP_Node根据第一标签映射消息生 成的转发表项还记录有: 包转发设备上的出接口和下一跳。 例如, 在附图 8 的步骤 86中, Traditional_IP_Node生成的转发表项中还记录有 devicel的接口 参数和下一跳。
可选地, 附图 8中步骤 87, Controllerl将转发表项下发给第一包转发设 备,如 devicel之后,第一包转发设备存储的 MAC转发表项中还记录有 MAC 地址学习得到的 Traditional_IP_Node的 MAC地址。 Traditional_IP_Node生成 的 MAC转发表项中还记录有 MAC地址学习得到的 Devicel的 MAC地址, 与实施例一基本类似, 在这里不再重复。
可选地, 在两种网络架构并存场景下的 L2VPN的建立方法中, 发现过程 或标签分配过程之前还可以包括 Controller和传统网络设备协商确定对方具有 执行发现过程和标签分配过程的能力。 具体可以参照实施例一。
可选地, 在通知消息中还可以携带状态标识, 用以指示所述第一包转发 设备和所述传统设备之间所述 PW ID所标识的 PW的状态为主用状态或备用 可选地, 本发明实施例提供的 L2VPN 业务的建立方法 Controller在该 Controller控制的某个包转发设备发生故障之后, 需要通过 MAC地址清除消 息通知传统网络设备发生故障的包转发设备的 MAC地址,以便于传统网络设 以参照实施例一, 基本原理类似, 在这里不再详述。
本发明实施例提供的 L2VPN的建立方案适用于传统的网络架构向 SDN 网络架构过渡期间, 传统的网络架构和 SDN网络架构共存的网络环境, 传统 网络设备与 Controller建立会话, 传统网络设备接收来自于 Controller的第一 标签映射消息, 所述第一标签映射消息中携带有伪线 PW 标识 ID、 所述 Controller控制的一个包转发设备的 IP地址、 所述网络设备的 IP地址、 以及 所述 Controller为所述包转发设备和所述网络设备之间的所述 PW ID所标识的 PW分配的 PW标签;所述网络设备根据保存的所述包转发设备与所述网络设 备之间已建立的隧道、与所述包转发设备的 IP地址和网络设备的 IP地址的对 应关系, 以及所述第一标签映射消息携带的所述包转发设备的 IP地址和所述 网络设备的 IP地址, 确定所述包转发设备和所述网络设备之间用以承载所述 PW ID所标识的 PW的隧道; 所述网络设备根据确定出的所述隧道生成转发 表项, 所述转发表项记录有所述 PW标签和所述隧道的转发信息的映射关系。 实施例四
本发明实施例提供了一种控制器, 如图 9A所示, 该控制器包括接收单元 901、 隧道迭代单元 902、 表项生成单元 903和表项下发单元 904,
接收单元 901 , 用于接收来自于另一 Controller的第一标签映射消息, 所 述第一标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的第一 包转发设备的 IP地址、所述另一 Controller控制的第二包转发设备的 IP地址、 以及所述另一 Controller为所述第一包转发设备和所述第二包转发设备之间的 所述 PW ID所标识的 PW分配的 PW标签;
隧道迭代单元 902,用于根据所述接收单元 901接收的所述第一标签映射 消息携带的所述第一包转发设备的 IP地址和所述第二包转发设备的 IP地址, 以及保存的所述第一包转发设备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP地址和所述第二包转发设备的 IP地址的对应关 系, 确定所述第一包转发设备和所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道;
表项生成单元 903, 用于根据所述隧道迭代单元 902确定出的所述隧道, 生成标签转发表项, 所述标签转发表项记录有所述 PW标签和所述隧道的转 发信息的映射关系;
表项下发单元 904,用于将所述表项生成单元 903生成的所述标签转发表 项下发给所述第一包转发设备。
可选地, 附图 9A所示的控制器还包括:
发送单元 905, 用于在所述接收单元 901接收来自于所述另一 Controller 的第一标签映射消息之前, 向所述另一 Controller发送第一成员发现消息, 所 述第一成员发现消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址和 所述 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP 地址。
可选地,所述接收单元 901还用于接收来自于所述另一 Controller的第二 成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述第二包转 发设备的 IP地址和所述另一 Controller控制的建立所述 PW ID所标识的 PW 的其他包转发设备的 IP地址。
相应地, 所述发送单元 905 ,还用于在所述接收单元 901接收来自于所述 另一 Controller的第二成员发现消息之后, 向所述另一 Controller发送第二标 签映射消息, 所述第二标签映射消息中携带有所述 PW ID、 所述 Controller控 制的第一包转发设备的地址、所述另一 Controller控制的第二包转发设备的地 址、 以及所述 Controller为所述第一包转发设备和所述第二包转发设备之间的 所述 PW ID标识的 PW分配的 PW标签。
可选地, 请参照附图附图 9B , 在附图 9A所示的 Controller, 还可以进一 步包括: 协商单元 906 , 用于在所述接收单元 901 接收来自于所述另一 Controller的第二成员发现消息之前, 与所述另一 Controller协商, 确认所述 另一 Controller具备发送所述第一标签映射消息和所述第二成员发现消息的能 力、以及所述 Controller具备解析所述第一标签映射消息和所述第二成员发现 消息的能力;
在所述协商单元 906确认所述另一 Controller具备发送所述第一标签映射 消息和所述第二成员发现消息的能力、且所述 Controller具备解析所述第一标 签映射消息和所述第二成员发现消息的能力之后, 所述接收单元 901接收来 自于所述另一 Controller的第一标签映射消息和所述第二成员发现消息。
协商单元与另一 Controller的具体协商过程请参照前面方法实施例一中的 描述, 在这里不再重复。
附图 9A和 9B所示的 Controller中, 所述接收单元 901 , 还用于接收所述 另一 Controller发送的通知消息, 所示通知消息中携带所述 PW ID、 所述第一 包转发设备的 IP地址、所述第二包转发设备的 IP地址和状态标识, 所述状态 标识包括主用状态标识和备用状态标识; 所述通知消息用以指示所述第一包 转发设备和所述第二包转发设备之间所述 PW ID所标识的 PW的状态为主用 状态或备用状态。
可选地, 附图 9A和 9B所示的 Controller中, 所述接收单元 901 , 还用于 接收所述另一 Controller发送的 MAC地址清除消息, 所述 MAC地址清除消 息中携带所述第一包转发设备的的 IP地址和 MAC地址列表; 若所述 MAC 地址列表为空, 则所述 Controller根据所述 MAC地址清除消息中的所述第一 包转发设备的 IP地址, 指示所述第一包转发设备清除保存的所有 MAC转发 表项, 所述 MAC转发表项中记录有 MAC地址与所述第二 Controller分配的 所述 PW标签的映射关系;若所述 MAC地址列表中携带有所述第二包转发设 备的本地 MAC地址, 则所述 Controller根据所述 MAC地址清除消息中的所 述第一包转发设备的 IP地址, 指示所述第一包转发设备清除保存的记录有所 述本地 MAC地址列表中的 MAC地址与所述另一 Controller分配的所述 PW 标签映射关系的 MAC转发表项, 所述第二包转发设备的本地 MAC地址包括 所述第二包转发设备的 MAC地址、以及所述第二包转发设备通过接入电路连 接获得的其他网络设备的 MAC地址。
本实施例附图 9A和 9B所示的 Controller可以作为前面方法实施例一中 的第一 Controller, 其中各单元的工作原理、 以及标签映射消息、 成员发现消 息、 以及 MAC地址清除消息等各消息的格式请参照方法实施例中的相关描 述。 本实施例附图 9A和 9B所提供的 Controller执行协商 PW标签、 生成路 由转发表并将路由转发表下发给该 Controller所控制的包转发设备的功能,相 应的包转发设备根据 Controller 下发的转发表项进行报文转发。 实现了 Controller集中控制 PW信息、 包转发设备承担转发任务的目标, 充分发挥了 SDN控制与转发功能分离的优势。 本发明实施例还提供了一种网络设备,其原理结构图请参照附图 10所示, 该网络设备可以作为方法实施例中的第一 Controller工作, 具体可以是 PE设 备、 路由器和 SDN Controller 该网络设备包括存储器 101、 处理器 102和接 口 103, 接口 103具体可以是网卡(Network Interface Card, 筒称 NIC )等其 他元件。 上述存储器 101、 处理器 102和接口 103通过总线 104连接。
所述存储器 101 , 用于存储程序代码;
所述接口 103, 用于接收来自于另一网络设备的第一标签映射消息, 所述 第一标签映射消息中携带有伪线 PW标识 ID、 所述网络设备控制的第一包转 发设备的 IP地址、所述另一网络设备控制的第二包转发设备的 IP地址、 以及 所述另一网络设备为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID所标识的 PW分配的 PW标签; 所述处理器 102, 用于读取所述存储器 101中存储的程序代码后, 执行以 下步骤:
根据所述接口 103接收的所述第一标签映射消息携带的所述第一包转发 设备的 IP地址和所述第二包转发设备的 IP地址,以及所述存储器 101保存的 所述第一包转发设备与所述第二包转发设备之间已建立的隧道、 与所述第一 包转发设备的 IP地址和所述第二包转发设备的 IP地址的对应关系,确定所述 第一包转发设备和所述第二包转发设备之间用以承载所述 PW ID 所标识的 PW的隧道;
根据确定出的所述隧道, 生成标签转发表项并触发所述接口 103将所述 标签转发表项下发给所述第一包转发设备,所述标签转发表项记录有所述 PW 标签和所述隧道的转发信息的映射关系。
可选地, 所述接口 103, 还用于在接收来自于所述另一网络设备的第一标 签映射消息之前, 向所述另一网络设备发送第一成员发现消息, 所述第一成 员发现消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址和所述网络 设备控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP地址。
可选地, 所述接口 103, 还用于接收来自于所述另一网络设备的第二成员 发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述第二包转发设 备的 IP地址和所述另一网络设备控制的建立所述 PW ID所标识的 PW的其他 包转发设备的 IP地址。
可选地, 所述接口 103, 还用于接收来自于所述另一网络设备的第二成员 发现消息之后, 向所述另一网络设备发送第二标签映射消息, 所述第二标签 映射消息中携带有所述 PW ID、 所述网络设备控制的第一包转发设备的地址、 所述另一网络设备控制的第二包转发设备的地址、 以及所述网络设备为所述 第一包转发设备和所述第二包转发设备之间的所述 PW ID标识的 PW分配的 PW标签。
可选地, 所述处理器 102在所述接口 103接收来自于所述另一网络设备 的第二成员发现消息之前, 通过所述接口 103 与所述另一网络设备协商, 确 认所述另一网络设备具备发送所述第一标签映射消息和所述第二成员发现消 息的能力、 以及所述网络设备具备解析所述第一标签映射消息和所述第二成 员发现消息的能力; 在确认所述另一网络设备具备发送所述第一标签映射消息和所述第二成 员发现消息的能力、 且所述网络设备具备解析所述第一标签映射消息和所述 第二成员发现消息的能力之后, 所述接口 103接收来自于所述另一网络设备 的第一标签映射消息和所述第二成员发现消息。
可选地, 所述接口 103, 还用于接收所述另一网络设备发送的通知消息, 所示通知消息中携带所述 PW ID、 所述第一包转发设备的 IP地址、 所述第二 包转发设备的 IP地址和状态标识, 所述状态标识包括主用状态标识和备用状 态标识; 所述通知消息用以指示所述第一包转发设备和所述第二包转发设备 之间所述 PW ID所标识的 PW的状态为主用状态或备用状态。
可选地, 所述接口 103 , 还用于接收所述另一网络设备发送的 MAC地址 清除消息, 所述 MAC地址清除消息中携带所述第一包转发设备的的 IP地址 和 MAC地址列表; 若所述 MAC地址列表为空, 则所述网络设备根据所述 MAC地址清除消息中的所述第一包转发设备的 IP地址, 指示所述第一包转 发设备清除保存的所有 MAC转发表项, 所述 MAC转发表项中记录有 MAC 地址与所述另一网络设备分配的所述 PW标签的映射关系;若所述 MAC地址 列表中携带有所述第二包转发设备的本地 MAC地址,则所述网络设备根据所 述 MAC地址清除消息中的所述第一包转发设备的 IP地址, 指示所述第一包 一网络设备分配的所述 PW标签映射关系的 MAC转发表项,所述第二包转发 设备的本地 MAC地址包括所述第二包转发设备的 MAC地址、 以及所述第二 包转发设备通过接入电路连接获得的其他网络设备的 MAC地址。
本实施例附图 10 所示的网络设备可以作为前面方法实施例一中的第一 Controller, 其工作原理、 以及标签映射消息、 成员发现消息、 以及 MAC地址 清除消息等各消息的格式请参照方法实施例中的相关描述。 实施例五
本发明实施例提供了一种控制器, 如图 11所示, 该控制器包括接收单元 111、 查询单元 112、 隧道迭代单元 113、 表项生成单元 114和表项下发单元 115, 其中:
接收单元 111 , 用于接收来自于另一 Controller的第一标签映射消息, 所 述第一标签映射消息中携带有伪线 PW标识 ID、 所述另一 Controller控制的 第二包转发设备的 IP地址、 以及所述另一 Controller为所述 PW ID所标识的 PW分配的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备; 查询单元 112, 用于从保存的 PW ID与所述 Controller控制的包转发设备 的对应关系中, 查询所述接收单元 111 接收的所述第一标签映射消息中携带 的 PW ID对应的第一包转发设备, 所述第一包转发设备为所述 PW的另一个 端点设备;
隧道迭代单元 113,用于根据所述查询单元 112查找到的所述第一包转发 设备的 IP地址和所述第一标签映射消息携带的所述第二包转发设备的 IP地 址, 以及保存的所述第一包转发设备与所述第二包转发设备之间已建立的隧 道、与所述第一包转发设备的 IP地址和所述第二包转发设备的 IP地址的对应 关系, 确定所述第一包转发设备和所述第二包转发设备之间用以承载所述第 一 PW的隧道; 生成标签转发表项, 所述标签转发表项记录有所述 PW标签和所述隧道的转 发信息的映射关系; 发给所述第一包转发设备。
可选地, 附图 11所示的 Controller还包括:
发送单元 116, 用于在所述查询单元 112从保存的 PW ID 与所述第一 Controller控制的包转发设备的对应关系中查询到所述第一标签映射消息中携 带的 PW ID对应的第一包转发设备之后,向所述另一 Controller发送第二标签 映射消息, 所述第二标签映射消息中携带有所述 PW ID、 所述所述查询单元 查询到的第一包转发设备的 IP地址、 以及所述 Controller为所述 PW ID所标 识的 PW分配的 PW标签。
本实施例附图 11 所示的控制器可以作为前面方法实施例二中的第一 Controller, 其工作原理、 以及标签映射消息、 成员发现消息等各消息的格式 请参照方法实施例中的相关描述。
本发明实施例提供的 Controller与其他 Controller建立 VLL业务时,在实 施例四所描述方案的有益效果的基础上,与实施例四相比,节约了建立 L2VPN 时两个 Controller交互的消息的数量, 进一步节约了网络带宽资源, 提高了建 立 L2VPN的效率。 本发明实施例还提供了一种网络设备,其原理结构图请参照附图 12所示, 该网络设备可以作为方法实施例二中的第一 Controller工作, 具体可以是 PE 设备、 路由器和 SDN Controller 该网络设备包括存储器 121、 处理器 122和 接口 123, 接口 123具体可以是 NIC等其他元件。 上述存储器 121、 处理器 122和接口 123通过总线 124连接。
所述存储器 121 , 用于存储程序代码;
所述接口 123, 用于接收来自于另一网络设备的第一标签映射消息, 所述 第一标签映射消息中携带有伪线 PW标识 ID、 所述另一网络设备控制的第二 包转发设备的 IP地址、以及所述另一网络设备为所述 PW ID所标识的 PW分 配的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备;
所述处理器 122, 用于读取所述存储器中存储的程序代码后, 执行以下步 骤:
从所述存储器 121保存的 PW ID与所述网络设备控制的包转发设备的对 应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一包转发设 备, 所述第一包转发设备为所述 PW的另一个端点设备;
根据所述第一包转发设备的 IP地址和所述第一标签映射消息携带的所述 第二包转发设备的 IP地址, 以及所述存储器 121保存的所述第一包转发设备 与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP地址 和所述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备和所 述第二包转发设备之间用以承载所述第一 PW的隧道;
根据确定出的所述隧道, 生成标签转发表项并触发所述接口 123将所述 标签转发表项下发给所述第一包转发设备,所述标签转发表项记录有所述 PW 标签和所述隧道的转发信息的映射关系。
可选地, 所述接口 123还用于所述处理器 122从保存的 PW ID与所述网 络设备控制的包转发设备的对应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一包转发设备之后, 向所述另一网络设备发送第二标签映射 消息, 所述第二标签映射消息中携带有所述 PW ID、 所述第一包转发设备的 本实施例附图 12 所示的网络设备可以作为前面方法实施例二中的第一 Controller, 其工作原理、 以及标签映射消息、 成员发现消息、 以及 MAC地址 清除消息等各消息的格式请参照方法实施例中的相关描述。 实施例六
本发明实施例提供了一种网络设备, 如图 13所示, 该网络设备包括接收 单元 131、 隧道迭代单元 132、 表项维护单元 133, 其中:
接收单元 131 , 用于来自于控制器 Controller的第一标签映射消息, 所述 第一标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一个包 转发设备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包 转发设备和所述网络设备之间的所述 PW ID所标识的 PW分配的 PW标签; 隧道迭代单元 132,用于根据所述第一标签映射消息携带的所述包转发设 备的 IP地址和所述网络设备的 IP地址,以及保存的所述网络设备与所述包转 发设备之间已建立的隧道、 与所述网络设备的 IP地址和所述包转发设备的 IP 地址的对应关系,确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID所标识的 PW的隧道;
表项维护单元 133,用于根据所述隧道迭代单元 132确定出的所述隧道生 成标签转发表项并保存, 所述标签转发表项记录有所述 PW标签和所述隧道 的转发信息的映射关系。
可选地, 附图 13所示的网络设备还包括:
发送单元 134, 用于在所述接收单元 131接收来自于所述 Controller的第 一标签映射消息之前, 向所述 Controller发送第一成员发现消息, 所述第一成 员发现消息中携带有所述 PW ID、 所述网络设备的 IP地址。
可选地,所述接收单元 131还用于接收来自于所述 Controller的第二成员 发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述包转发设备的 IP地址和所述 Controller控制的建立所述 PW ID所标识的 PW的其他包转发 设备的 IP地址。
相应地, 所述发送单元 134还用于在所述接收单元 131接收来自于所述 Controller的第二成员发现消息之后, 向所述 Controller发送第二标签映射消 息, 所述第二标签映射消息中携带有所述 PW ID、 所述网络设备的地址、 所 述包转发设备的地址、 以及所述网络设备为所述网络设备和所述包转发设备 之间的所述 PW ID标识的 PW分配的 PW标签。
本实施例附图 13所示的网络设备可以作为前面方法实施例三中的传统网 络设备工作, 其中各单元的工作原理、 以及标签映射消息、 成员发现消息等 各消息的格式请参照方法实施例中的相关描述。 适用于传统的网络架构向 SDN网络架构过渡期间, 传统的网络架构和 SDN网络架构共存的网络环境。 本发明实施例还提供了一种网络设备,其原理结构图请参照附图 14所示, 该网络设备可以作为方法实施例三中的传统网络设备工作,具体可以是 PE设 备、 路由器。 该网络设备包括存储器 141、 处理器 142和接口 143, 接口 143 具体可以是 NIC等其他元件。 上述存储器 121、 处理器 122和接口 123通过 总线 124连接。
所述存储器 141 , 用于存储程序代码;
所述接口 143, 用于接收来自于控制器 Controller的第一标签映射消息, 所述第一标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一 个包转发设备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所 述包转发设备和所述网络设备之间的所述 PW ID所标识的 PW分配的 PW标 签;
所述处理器 142, 用于读取所述存储器 141中存储的程序代码后, 执行以 下步骤:
根据所述第一标签映射消息携带的所述包转发设备的 IP地址和所述网络 设备的 IP地址, 以及所述存储器 141中保存的所述网络设备与所述包转发设 备之间已建立的隧道、与所述网络设备的 IP地址和所述包转发设备的 IP地址 的对应关系, 确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID 所标识的 PW的隧道; 标签转发表项记录有所述 PW标签和所述隧道的转发信息的映射关系。
可选地,所述接口 143还用于接收来自于所述 Controller的第一标签映射 消息之前, 向所述 Controller发送第一成员发现消息, 所述第一成员发现消息 中携带有所述 PW ID、 所述网络设备的 IP地址。
可选地,所述接口 143还用于接收来自于所述 Controller的第二成员发现 消息, 所述第二成员发现消息中携带有所述 PW ID、 所述包转发设备的 IP地 址和所述 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP地址。
可选地, 所述接口 143还用于向所述 Controller发送第二标签映射消息, 所述第二标签映射消息中携带有所述 PW ID、 所述网络设备的地址、 所述包 转发设备的地址、 以及所述网络设备为所述网络设备和所述包转发设备之间 的所述 PW ID标识的 PW分配的 PW标签。 优选地, 所述接口 143接收到所 述第二成员发现消息后, 根据所述第二成员发现消息发送第二标签映射消息。
本实施例附图 14所示的网络设备可以作为前面方法实施例三中的传统网 络设备, 其工作原理、 以及标签映射消息、 成员发现消息、 以及 MAC地址清 除消息等各消息的格式请参照方法实施例中的相关描述。 本领域普通技术人员将会理解, 本发明的各个方面、 或各个方面的可能 实现方式可以被具体实施为系统、 方法或者计算机程序产品。 因此, 本发明 的各方面、 或各个方面的可能实现方式可以采用完全硬件实施例、 完全软件 实施例 (包括固件、 驻留软件等等), 或者组合软件和硬件方面的实施例的形 式, 在这里都统称为"电路"、 "模块 "或者 "系统"。 此外, 本发明的各方面、 或 各个方面的可能实现方式可以采用计算机程序产品的形式, 计算机程序产品 是指存储在计算机可读介质中的计算机可读程序代码。
计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。 计算机可读存储介质包含但不限于电子、 磁性、 光学、 电磁、 红外或半导体 系统、 设备或者装置,或者前述的任意适当组合,如随机存取存储器 (RAM)、 只读存储器 (ROM)、可擦除可编程只读存储器 (EPROM或者快闪存储器)、光 纤、 便携式只读存储器 (CD-ROM)。
计算机中的处理器读取存储在计算机可读介质中的计算机可读程序代 码, 使得处理器能够执行在流程图中每个步骤、 或各步骤的组合中规定的功 能动作; 生成实施在框图的每一块、 或各块的组合中规定的功能动作的装置。
计算机可读程序代码可以完全在用户的本地计算机上执行、 部分在用户 的本地计算机上执行、 作为单独的软件包、 部分在用户的本地计算机上并且 部分在远程计算机上, 或者完全在远程计算机或者服务器上执行。 也应该注 意, 在某些替代实施方案中, 在流程图中各步骤、 或框图中各块所注明的功 能可能不按图中注明的顺序发生。 例如, 依赖于所涉及的功能, 接连示出的 两个步骤、 或两个块实际上可能被大致同时执行, 或者这些块有时候可能被 以相反顺序执行。 发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权利要 求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。

Claims

权 利 要 求
1、 一种二层虚拟专用网络 L2VPN的建立方法, 其特征在于, 包括: 第一控制器 Controller接收来自于第二 Controller的第一标签映射消息, 所述第一标签映射消息中携带有伪线 PW标识 ID、 所述第一 Controller控制 的第一包转发设备的 IP地址、 所述第二 Controller控制的第二包转发设备的 IP地址、以及所述第二 Controller为所述第一包转发设备和所述第二包转发设 备之间的所述 PW ID所标识的 PW分配的 PW标签;
所述第一 Controller根据所述第一标签映射消息携带的所述第一包转发设 备的 IP地址和所述第二包转发设备的 IP地址,以及保存的所述第一包转发设 备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP地 址和所述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备和 所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道;
所述第一 Controller根据确定出的所述隧道, 生成标签转发表项并将所述 标签转发表项下发给所述第一包转发设备,所述标签转发表项记录有所述 PW 标签和所述隧道的转发信息的映射关系。
2、 如权利要求 1所述的方法, 其特征在于, 所述第一 Controller接收来 自于所述第二 Controller的第一标签映射消息之前, 还包括:
所述第一 Controller向所述第二 Controller发送第一成员发现消息, 所述 第一成员发现消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址和所 述第一 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP地址。
3、 如权利要求 1或 2所述的方法, 其特征在于, 还包括:
所述第一 Controller接收来自于所述第二 Controller的第二成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述第二包转发设备的 IP地址 和所述第二 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备 的 IP地址。
4、 如权利要求 3所述的方法, 其特征在于, 所述第一 Controller接收来 自于所述第二 Controller的第二成员发现消息之后, 还包括:
所述第一 Controller向第二 Controller发送第二标签映射消息, 所述第二 标签映射消息中携带有所述 PW ID、所述第一 Controller控制的第一包转发设 备的地址、 所述第二 Controller控制的第二包转发设备的地址、 以及所述第一 Controller为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID标 识的 PW分配的 PW标签。
5、 如权利要求 1至 4中任一所述的方法, 其特征在于, 所述第一标签映 射消息中包含第一类型-长度-值 TLV和第二 TLV, 所述第一 TLV的类型字段 的内容指示所述第一 TLV的值字段具体包含 PW ID字段、第一被代理节点地 址字段和第二被代理节点地址字段;
所述 PW ID携带在所述第一 TLV中的所述 PW ID字段中, 所述第二包 转发设备的 IP地址携带在所述第一被代理节点地址字段中, 所述第一包转发 设备的 IP地址携带在所述第二被代理节点地址字段中;
所述第二 Controller分配的 PW标签携带在所述第二 TLV中。
6、 如权利要求 3或 4所述的方法, 其特征在于, 所述第二成员发现消息 中包含第三 TLV,所述第三 TLV中的类型字段的内容指示所述第三 TLV中的 值字段中携带所述 PW ID、 以及所述第二包转发设备的地址和所述第二
7、 如权利要求 3或 4所述的方法, 其特征在于, 所述第一标签映射消息 和所述第二成员发现消息中还携带所述第二 Controller为所述 PW ID分配的群 组 Group标识 ID。
8、 如权利要求 5所述的方法, 其特征在于, 所述第一标签映射消息中还 携带所述第二 Controller为所述 PW ID分配的 Group ID; 所述 Group ID携带 在所述第一 TLV的值字段包含的群组字段中。
9、 如权利要求 6所述的方法, 其特征在于, 所述第二成员发现消息中还 携带所述第二 Controller为所述 PW ID分配的群组标识;所述群组标识携带在 所述第三 TLV的值字段包含的群组字段中。
10、如权利要求 3、 4、 6、 7或 8所述的方法,其特征在于,所述第一 Controller 接收来自于第二 Controller的第一标签映射消息之前、 且所述第一 Controller 接收来自于所述第二 Controller的第二成员发现消息之前, 还包括:
所述第一 Controller与所述第二 Controller协商 , 确认所述第二 Controller 具备发送所述第一标签映射消息和所述第二成员发现消息的能力、 以及所述 第一 Controller具备解析所述第一标签映射消息和所述第二成员发现消息的能 力;
确认第二 Controller具备发送所述第一标签映射消息和所述第二成员发现 消息的能力、且所述第一 Controller具备解析所述第一标签映射消息和所述第 二成员发现消息的能力之后,所述第一 Controller执行所述接收来自于所述第 二 Controller的第一标签映射消息和所述第二成员发现消息的步骤。
11、 如权利要求 1至 10中任一所述的方法, 其特征在于, 还包括: 接收所述第二 Controller发送的通知消息, 所示通知消息中携带所述 PW
ID、所述第一包转发设备的 IP地址、所述第二包转发设备的 IP地址和状态标 示所述第一包转发设备和所述第二包转发设备之间所述 PW ID所标识的 PW 的状态为主用状态或备用状态。
12、 如权利要求 1至 11任一所述的方法, 其特征在于, 还包括: 所述第一 Controller接收所述第二 Controller发送的 MAC地址清除消息, 所述 MAC地址清除消息中携带所述第一包转发设备的的 IP地址和 MAC地 址列表;
若所述 MAC地址列表为空, 则所述第一 Controller根据所述 MAC地址 清除消息中的所述第一包转发设备的 IP地址, 指示所述第一包转发设备清除 保存的所有 MAC转发表项, 所述 MAC转发表项中记录有 MAC地址与所述 第二 Controller分配的所述 PW标签的映射关系;
若所述 MAC地址列表中携带有所述第二包转发设备的本地 MAC地址, 则所述第一 Controller根据所述 MAC地址清除消息中的所述第一包转发设备 的 IP地址, 指示所述第一包转发设备清除保存的记录有所述本地 MAC地址 列表中的 MAC地址与所述第二 Controller分配的所述 PW标签映射关系的 MAC转发表项, 所述第二包转发设备的本地 MAC地址包括所述第二包转发 设备的 MAC地址、以及所述第二包转发设备通过接入电路连接获得的其他网 络设备的 MAC地址。
13、 一种 L2VPN业务的建立方法, 其特征在于, 包括:
第一控制器 Controller接收来自于第二 Controller的第一标签映射消息, 所述第一标签映射消息中携带有伪线 PW标识 ID、 所述第二 Controller控制 的第二包转发设备的 IP地址、 以及所述第二 Controller为所述 PW ID所标识 的 PW分配的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备; 所述第一 Controller从保存的 PW ID与所述第一 Controller控制的包转发 设备的对应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一包 转发设备, 所述第一包转发设备为所述 PW的另一个端点设备;
所述第一 Controller根据所述第一包转发设备的 IP地址和所述第一标签 映射消息携带的所述第二包转发设备的 IP地址, 以及保存的所述第一包转发 设备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP 地址和所述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备 和所述第二包转发设备之间用以承载所述第一 PW的隧道;
所述第一 Controller根据确定出的所述隧道, 生成标签转发表项并将所述 标签转发表项下发给所述第一包转发设备,所述标签转发表项记录有所述 PW 标签和所述隧道的转发信息的映射关系。
14、 如权利要求 13所述的方法, 其特征在于, 所述第一 Controller从保 存的 PW ID与所述第一 Controller控制的包转发设备的对应关系中查询所述第 一标签映射消息中携带的 PW ID对应的第一包转发设备之后, 还包括:
第一 Controller向所述第二 Controller发送第二标签映射消息, 所述第二 标签映射消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址、 以及所 述第一 Controller为所述 PW ID所标识的 PW分配的 PW标签。
15、 如权利要求 13或 14所述的方法, 其特征在于, 所述第一标签映射 消息中包含第一类型-长度-值 TLV和第二 TLV, 所述第一 TLV的类型字段的 内容指示所述第一 TLV的值字段包含 PW ID字段和被代理节点地址字段; 所述第一 PW ID携带在所述第一 TLV中的所述 PW ID字段中, 所述第 二包转发设备的 IP地址携带在所述被代理节点地址字段中;
所述第二 Controller分配的 PW标签携带在所述第二 TLV中。
16、 如权利要求 13或 14所述的方法, 其特征在于, 所述第一标签映射 消息中还携带所述第二 Controller为所述 PW ID分配的群组 Group标识 ID。
17、 如权利要求 15所述的方法, 其特征在于, 所述第一标签映射消息中 还携带所述第二 Controller为所述 PW ID分配的群组标识;
所述 Group ID携带在所述第一 TLV的值字段中包含的群组字段中。
18、 一种 L2VPN的建立方法, 其特征在于, 包括:
网络设备接收来自于控制器 Controller的第一标签映射消息, 所述第一标 签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一个包转发设 备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包转发设 所述网络设备根据所述第一标签映射消息携带的所述包转发设备的 IP地 址和所述网络设备的 IP地址, 以及保存的所述网络设备与所述包转发设备之 间已建立的隧道、与所述网络设备的 IP地址和所述包转发设备的 IP地址的对 应关系, 确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID所标 识的 PW的隧道; 签转发表项记录有所述 PW标签和所述隧道的转发信息的映射关系。
19、 如权利要求 18所述的方法, 其特征在于, 所述网络设备接收来自于 所述 Controller的第一标签映射消息之前, 还包括:
所述网络设备向所述 Controller发送第一成员发现消息, 所述第一成员发 现消息中携带有所述 PW ID、 所述网络设备的 IP地址。
20、 如权利要求 18或 19所述方法, 其特征在于, 还包括:
所述网络设备接收来自于所述 Controller的第二成员发现消息, 所述第二 成员发现消息中携带有所述 PW ID、 所述包转发设备的 IP 地址和所述
21、 如权利要求 19所述的方法, 其特征在于, 所述网络设备接收来自于 所述 Controller的第二成员发现消息之后, 还包括:
所述网络设备向所述 Controller发送第二标签映射消息, 所述第二标签映 射消息中携带有所述 PW ID、 所述网络设备的地址、 所述包转发设备的地址、 以及所述网络设备为所述网络设备和所述包转发设备之间的所述 PW ID标识 的 PW分配的 PW标签。
22、 如权利要求 18至 21任一所述的方法, 其特征在于, 所述第一标签 映射消息中包含第一类型-长度-值 TLV和第二 TLV, 所述第一 TLV的类型字 段的内容指示所述第一 TLV的值字段具体包含 PW ID字段、第一被代理节点 地址字段和第二被代理节点地址字段;
所述 PW ID携带在所述第一 TLV中的所述 PW ID字段中, 所述包转发 设备的 IP地址携带在所述第一被代理节点地址字段中,所述网络设备的 IP地 址携带在所述第二被代理节点地址字段中;
所述 Controller分配的 PW标签携带在所述第二 TLV中。
23、 如权利要求 20或 21所述的方法, 其特征在于, 所述第二成员发现 消息中包含第三 TLV, 所述第三 TLV中的类型字段的内容指示所述第三 TLV 中的值字段中携带所述 PW ID、所述包转发设备的地址以及所述 Controller控 制的其他包转发设备的地址。
24、 一种控制器 Controller, 其特征在于, 包括:
接收单元, 用于接收来自于另一 Controller的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的第一包转 发设备的 IP地址、 所述另一 Controller控制的第二包转发设备的 IP地址、 以 及所述另一 Controller为所述第一包转发设备和所述第二包转发设备之间的所 述 PW ID所标识的 PW分配的 PW标签;
隧道迭代单元, 用于根据所述接收单元接收的所述第一标签映射消息携 带的所述第一包转发设备的 IP地址和所述第二包转发设备的 IP地址,以及保 存的所述第一包转发设备与所述第二包转发设备之间已建立的隧道、 与所述 第一包转发设备的 IP地址和所述第二包转发设备的 IP地址的对应关系,确定 所述第一包转发设备和所述第二包转发设备之间用以承载所述 PW ID所标识 的 PW的隧道;
表项生成单元, 用于根据所述隧道迭代单元确定出的所述隧道, 生成标 签转发表项, 所述标签转发表项记录有所述 PW标签和所述隧道的转发信息 的映射关系; 给所述第一包转发设备。
25、 如权利要求 24所述的 Controller, 其特征在于, 还包括:
发送单元, 用于在所述接收单元接收来自于所述另一 Controller的第一标 签映射消息之前, 向所述另一 Controller发送第一成员发现消息, 所述第一成 员发现消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址和所述
26、 如权利要求 24或 25所述的 Controller, 其特征在于,
所述接收单元,还用于接收来自于所述另一 Controller的第二成员发现消 息, 所述第二成员发现消息中携带有所述 PW ID、 所述第二包转发设备的 IP 地址和所述另一 Controller控制的建立所述 PW ID所标识的 PW的其他包转发 设备的 IP地址。
27、 如权利要求 26所述的 Controller, 其特征在于,
所述发送单元,还用于在所述接收单元接收来自于所述另一 Controller的 第二成员发现消息之后, 向所述另一 Controller发送第二标签映射消息, 所述 第二标签映射消息中携带有所述 PW ID、所述 Controller控制的第一包转发设 备的地址、 所述另一 Controller控制的第二包转发设备的地址、 以及所述 Controller为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID标 识的 PW分配的 PW标签。
28、 如权利要求 26所述的 Controller, 其特征在于, 还包括:
协商单元, 用于在所述接收单元接收来自于所述另一 Controller的第二成 员发现消息之前, 与所述另一 Controller协商, 确认所述另一 Controller具备 发送所述第一标签映射消息和所述第二成员发现消息的能力、 以及所述 Controller具备解析所述第一标签映射消息和所述第二成员发现消息的能力; 在所述协商单元确认所述另一 Controller具备发送所述第一标签映射消息 和所述第二成员发现消息的能力、且所述 Controller具备解析所述第一标签映 射消息和所述第二成员发现消息的能力之后, 所述接收单元接收来自于所述 另一 Controller的第一标签映射消息和所述第二成员发现消息。
29、 如权利要求 24至 28任一所述的 Controller, 其特征在于,
所述接收单元, 还用于接收所述另一 Controller发送的通知消息, 所示通 知消息中携带所述 PW ID、 所述第一包转发设备的 IP地址、 所述第二包转发 所述通知消息用以指示所述第一包转发设备和所述第二包转发设备之间所述 PW ID所标识的 PW的状态为主用状态或备用状态。
30、 如权利要求 24至 29任一所述的 Controller, 其特征在于, 所述接收单元, 还用于接收所述另一 Controller发送的 MAC地址清除消 息,所述 MAC地址清除消息中携带所述第一包转发设备的的 IP地址和 MAC 地址列表;
若所述 MAC地址列表为空, 则所述 Controller根据所述 MAC地址清除 消息中的所述第一包转发设备的 IP地址, 指示所述第一包转发设备清除保存 的所有 MAC转发表项, 所述 MAC转发表项中记录有 MAC地址与所述第二 Controller分配的所述 PW标签的映射关系;
若所述 MAC地址列表中携带有所述第二包转发设备的本地 MAC地址, 则所述 Controller根据所述 MAC地址清除消息中的所述第一包转发设备的 IP 地址,指示所述第一包转发设备清除保存的记录有所述本地 MAC地址列表中 的 MAC地址与所述另一 Controller分配的所述 PW标签映射关系的 MAC转 发表项, 所述第二包转发设备的本地 MAC地址包括所述第二包转发设备的 MAC地址、 以及所述第二包转发设备通过接入电路连接获得的其他网络设备 的 MAC地址。
31、 一种网络设备, 包括存储器、 处理器和接口, 其特征在于, 所述存储器, 用于存储程序代码;
所述接口, 用于接收来自于另一网络设备的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述网络设备控制的第一包转发 设备的 IP地址、所述另一网络设备控制的第二包转发设备的 IP地址、 以及所 述另一网络设备为所述第一包转发设备和所述第二包转发设备之间的所述 PW ID所标识的 PW分配的 PW标签;
所述处理器, 用于读取所述存储器中存储的程序代码后, 执行以下步骤: 根据所述接口接收的所述第一标签映射消息携带的所述第一包转发设备 的 IP地址和所述第二包转发设备的 IP地址,以及所述存储器保存的所述第一 包转发设备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设 备的 IP地址和所述第二包转发设备的 IP地址的对应关系,确定所述第一包转 发设备和所述第二包转发设备之间用以承载所述 PW ID所标识的 PW的隧道; 根据确定出的所述隧道, 生成标签转发表项并触发所述接口将所述标签 转发表项下发给所述第一包转发设备, 所述标签转发表项记录有所述 PW标 签和所述隧道的转发信息的映射关系。
32、 如权利要求 31所述的设备, 其特征在于,
所述接口, 还用于在接收来自于所述另一网络设备的第一标签映射消息 之前, 向所述另一网络设备发送第一成员发现消息, 所述第一成员发现消息 中携带有所述 PW ID、 所述第一包转发设备的 IP地址和所述网络设备控制的 建立所述 PW ID所标识的 PW的其他包转发设备的 IP地址。
33、 如权利要求 31或 32所述的设备, 其特征在于,
所述接口, 还用于接收来自于所述另一网络设备的第二成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述第二包转发设备的 IP地址 和所述另一网络设备控制的建立所述 PW ID所标识的 PW的其他包转发设备 的 IP地址。
34、 如权利要求 33所述的设备, 其特征在于,
所述接口, 还用于接收来自于所述另一网络设备的第二成员发现消息之 后, 向所述另一网络设备发送第二标签映射消息, 所述第二标签映射消息中 携带有所述 PW ID、 所述网络设备控制的第一包转发设备的地址、 所述另一 网络设备控制的第二包转发设备的地址、 以及所述网络设备为所述第一包转
35、 一种控制器 Controller, 其特征在于, 包括:
接收单元, 用于接收来自于另一 Controller的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述另一 Controller控制的第二 包转发设备的 IP地址、 以及所述另一 Controller为所述 PW ID所标识的 PW 分配的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备;
查询单元,用于从保存的 PW ID与所述 Controller控制的包转发设备的对 应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一包转发设 备, 所述第一包转发设备为所述 PW的另一个端点设备;
隧道迭代单元, 用于根据所述第一包转发设备的 IP地址和所述第一标签 映射消息携带的所述第二包转发设备的 IP地址, 以及保存的所述第一包转发 设备与所述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP 地址和所述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备 和所述第二包转发设备之间用以承载所述第一 PW的隧道; 表项生成单元, 用于根据所述隧道迭代单元确定出的所述隧道, 生成标 签转发表项, 所述标签转发表项记录有所述 PW标签和所述隧道的转发信息 的映射关系; 述第一包转发设备。
36、 如权利要求 35所述的 Controller, 其特征在于, 还包括:
发送单元, 用于在所述查询单元从保存的 PW ID与所述第一 Controller 控制的包转发设备的对应关系中查询到所述第一标签映射消息中携带的 PW ID对应的第一包转发设备之后, 向所述另一 Controller发送第二标签映射消 息, 所述第二标签映射消息中携带有所述 PW ID、 所述所述查询单元查询到 的第一包转发设备的 IP地址、以及所述 Controller为所述 PW ID所标识的 PW 分配的 PW标签。
37、 一种网络设备, 包括存储器、 处理器和接口, 其特征在于, 所述存储器, 用于存储程序代码;
所述接口, 用于接收来自于另一网络设备的第一标签映射消息, 所述第 一标签映射消息中携带有伪线 PW标识 ID、 所述另一网络设备控制的第二包 转发设备的 IP地址、以及所述另一网络设备为所述 PW ID所标识的 PW分配 的 PW标签, 所述第二包转发设备是所述 PW的一个端点设备;
所述处理器, 用于读取所述存储器中存储的程序代码后, 执行以下步骤: 从所述存储器保存的 PW ID与所述网络设备控制的包转发设备的对应关 系中查询所述第一标签映射消息中携带的 PW ID对应的第一包转发设备, 所 述第一包转发设备为所述 PW的另一个端点设备;
根据所述第一包转发设备的 IP地址和所述第一标签映射消息携带的所述 第二包转发设备的 IP地址, 以及所述存储器保存的所述第一包转发设备与所 述第二包转发设备之间已建立的隧道、 与所述第一包转发设备的 IP地址和所 述第二包转发设备的 IP地址的对应关系, 确定所述第一包转发设备和所述第 二包转发设备之间用以承载所述第一 PW的隧道;
根据确定出的所述隧道, 生成标签转发表项并触发所述接口将所述标签 转发表项下发给所述第一包转发设备, 所述标签转发表项记录有所述 PW标 签和所述隧道的转发信息的映射关系。
38、 如权利要求 37所述的网络设备, 其特征在于,
所述接口还用于所述处理器从保存的 PW ID与所述网络设备控制的包转 发设备的对应关系中查询所述第一标签映射消息中携带的 PW ID对应的第一 包转发设备之后, 向所述另一网络设备发送第二标签映射消息, 所述第二标 签映射消息中携带有所述 PW ID、 所述第一包转发设备的 IP地址、 以及所述
39、 一种网络设备, 其特征在于, 包括:
接收单元, 用于来自于控制器 Controller的第一标签映射消息, 所述第一 标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一个包转发 设备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包转发 隧道迭代单元, 用于根据所述第一标签映射消息携带的所述包转发设备 的 IP地址和所述网络设备的 IP地址,以及保存的所述网络设备与所述包转发 设备之间已建立的隧道、与所述网络设备的 IP地址和所述包转发设备的 IP地 址的对应关系, 确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID所标识的 PW的隧道; 转发表项并保存, 所述标签转发表项记录有所述 PW标签和所述隧道的转发 信息的映射关系。
40、 如权利要求 39所述的网络设备, 其特征在于, 还包括:
发送单元, 用于在所述接收单元接收来自于所述 Controller的第一标签映 射消息之前, 向所述 Controller发送第一成员发现消息, 所述第一成员发现消 息中携带有所述 PW ID、 所述网络设备的 IP地址。
41、 如权利要求 40所述的网络设备, 其特征在于,
所述接收单元, 还用于接收来自于所述 Controller的第二成员发现消息, 所述第二成员发现消息中携带有所述 PW ID、 所述包转发设备的 IP地址和所 述 Controller控制的建立所述 PW ID所标识的 PW的其他包转发设备的 IP地 址。
42、 如权利要求 41所述的网络设备, 其特征在于, 所述发送单元,还用于在所述接收单元接收来自于所述 Controller的第二 成员发现消息之后, 向所述 Controller发送第二标签映射消息, 所述第二标签 映射消息中携带有所述 PW ID、 所述网络设备的地址、 所述包转发设备的地 址、 以及所述网络设备为所述网络设备和所述包转发设备之间的所述 PW ID 标识的 PW分配的 PW标签。
43、 一种网络设备, 包括存储器、 处理器和接口, 其特征在于, 所述存储器, 用于存储程序代码;
所述接口, 用于接收来自于控制器 Controller的第一标签映射消息, 所述 第一标签映射消息中携带有伪线 PW标识 ID、 所述 Controller控制的一个包 转发设备的 IP地址、 所述网络设备的 IP地址、 以及所述 Controller为所述包 转发设备和所述网络设备之间的所述 PW ID所标识的 PW分配的 PW标签; 所述处理器, 用于读取所述存储器中存储的程序代码后, 执行以下步骤: 根据所述第一标签映射消息携带的所述包转发设备的 IP地址和所述网络 设备的 IP地址, 以及所述存储器中保存的所述网络设备与所述包转发设备之 间已建立的隧道、与所述网络设备的 IP地址和所述包转发设备的 IP地址的对 应关系, 确定所述包转发设备和所述网络设备之间用以 7 载所述 PW ID所标 识的 PW的隧道;
签转发表项记录有所述 PW标签和所述隧道的转发信息的映射关系。
44、 如权利要求 43所述的网络设备, 其特征在于,
所述接口, 还用于接收来自于所述 Controller的第一标签映射消息之前, 向所述 Controller发送第一成员发现消息,所述第一成员发现消息中携带有所 述 PW ID、 所述网络设备的 IP地址。
45、 如权利要求 43或 44所述的网络设备, 其特征在于,
所述接口还用于接收来自于所述 Controller的第二成员发现消息, 所述第 二成员发现消息中携带有所述 PW ID、 所述包转发设备的 IP地址和所述
46、 如权利要求 45所述的网络设备, 其特征在于,
所述接口还用于接收来自于所述 Controller的第二成员发现消息之后, 向 所述 Controller发送第二标签映射消息, 所述第二标签映射消息中携带有所述 PW ID、 所述网络设备的地址、 所述包转发设备的地址、 以及所述网络设备为 所述网络设备和所述包转发设备之间的所述 PW ID标识的 PW分配的 PW标
PCT/CN2013/085395 2013-10-17 2013-10-17 二层虚拟专用网络业务的建立方法和设备 WO2015054864A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201380080323.XA CN105684400B (zh) 2013-10-17 2013-10-17 二层虚拟专用网络业务的建立方法和设备
PCT/CN2013/085395 WO2015054864A1 (zh) 2013-10-17 2013-10-17 二层虚拟专用网络业务的建立方法和设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/085395 WO2015054864A1 (zh) 2013-10-17 2013-10-17 二层虚拟专用网络业务的建立方法和设备

Publications (1)

Publication Number Publication Date
WO2015054864A1 true WO2015054864A1 (zh) 2015-04-23

Family

ID=52827568

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/085395 WO2015054864A1 (zh) 2013-10-17 2013-10-17 二层虚拟专用网络业务的建立方法和设备

Country Status (2)

Country Link
CN (1) CN105684400B (zh)
WO (1) WO2015054864A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10598834B2 (en) 2015-12-01 2020-03-24 AGC Inc. Near-infrared light blocking optical filter having high visible light transmission and an imaging device using the optical filter

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111414B (zh) * 2016-11-25 2021-01-26 新华三技术有限公司 一种基于段路由的标签部署方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277245A (zh) * 2008-05-06 2008-10-01 华为技术有限公司 一种l2vpn跨域的实现方法、系统和装置
CN102185778A (zh) * 2011-05-11 2011-09-14 杭州华三通信技术有限公司 一种基于vll的数据传输方法及其装置
CN102932499A (zh) * 2012-11-01 2013-02-13 杭州华三通信技术有限公司 Vpls网络中的mac地址学习方法及设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100496984B1 (ko) * 2002-08-21 2005-06-23 한국전자통신연구원 레이블 분배 프로토콜의 확장을 이용한 QoS지원 2계층가상 사설 망 양방향 터널 설정 및 구성정보 분배방법
ES2531546T3 (es) * 2009-06-29 2015-03-17 Huawei Technologies Co., Ltd. Aparato y método para establecer un denominado pseudo-conductor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277245A (zh) * 2008-05-06 2008-10-01 华为技术有限公司 一种l2vpn跨域的实现方法、系统和装置
CN102185778A (zh) * 2011-05-11 2011-09-14 杭州华三通信技术有限公司 一种基于vll的数据传输方法及其装置
CN102932499A (zh) * 2012-11-01 2013-02-13 杭州华三通信技术有限公司 Vpls网络中的mac地址学习方法及设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10598834B2 (en) 2015-12-01 2020-03-24 AGC Inc. Near-infrared light blocking optical filter having high visible light transmission and an imaging device using the optical filter

Also Published As

Publication number Publication date
CN105684400B (zh) 2019-02-01
CN105684400A (zh) 2016-06-15

Similar Documents

Publication Publication Date Title
US11431526B2 (en) Deterministic forwarding across L2 and L3 networks
CN110635935B (zh) 为用户接口的相应服务接口使用多个evpn路由
US11374857B2 (en) Network device management method and apparatus, and system for indicating a network device to perform management operation
US10057116B2 (en) Method and device for configuring and managing network element equipment, and network element equipment
JP5867940B2 (ja) 接続確立要求を送信するための方法、スイッチ、サーバ、およびシステム
EP1693996B1 (en) Automatic discovery of psuedo-wire peer addresses in ethernet-based networks
WO2015000375A1 (zh) 报文转发方法、装置及系统
WO2011037105A1 (ja) コンテンツベーススイッチシステム、及びコンテンツベーススイッチ方法
WO2011103781A2 (zh) 身份标识与位置分离的实现方法、设备及数据封装方法
WO2015192501A1 (zh) 地址信息的发布方法及装置
WO2010127570A1 (zh) 一种双向点到多点标签交换路径的建立方法、装置及系统
US20090327797A1 (en) Method and Provider Edge Device for Advertising and Processing Pseudo-Wire Information
WO2011047598A1 (zh) 网络通信方法和网络节点设备
WO2011113393A2 (zh) 一种实现虚拟局域网标识转换的方法及装置
WO2014194711A1 (zh) 报文处理方法、设备标签处理方法及设备
WO2014186978A1 (zh) 用于以太虚拟专用网的方法和设备
WO2013139270A1 (zh) 实现三层虚拟专用网络的方法、设备及系统
WO2014019348A1 (zh) 操作、管理和维护oam配置的方法、设备及系统
WO2013071866A1 (zh) 一种传递主机名的方法和装置
WO2015032275A1 (zh) 隧道建立的方法及路由器
WO2014180153A1 (zh) 建立标签交换路径的方法、设备及系统
WO2015180120A1 (zh) 报文转发方法、转发表项下发方法及网络设备
WO2013139234A1 (zh) 一种组播传输方法、装置和网络系统
WO2014180213A1 (zh) 一种tcp会话建立方法、装置、宿主节点和卫星节点
WO2011147341A1 (zh) 一种分配mpls标签的方法和网络装置

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: 13895774

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: 13895774

Country of ref document: EP

Kind code of ref document: A1