WO2018171529A1 - 一种实现双控制平面的方法、装置、计算机存储介质 - Google Patents

一种实现双控制平面的方法、装置、计算机存储介质 Download PDF

Info

Publication number
WO2018171529A1
WO2018171529A1 PCT/CN2018/079340 CN2018079340W WO2018171529A1 WO 2018171529 A1 WO2018171529 A1 WO 2018171529A1 CN 2018079340 W CN2018079340 W CN 2018079340W WO 2018171529 A1 WO2018171529 A1 WO 2018171529A1
Authority
WO
WIPO (PCT)
Prior art keywords
arp
protocol stack
packet
sdn
virtual interface
Prior art date
Application number
PCT/CN2018/079340
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 EP18771396.1A priority Critical patent/EP3605959B1/en
Publication of WO2018171529A1 publication Critical patent/WO2018171529A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • 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/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/044Network management architectures or arrangements comprising hierarchical management structures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0894Policy-based network configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/34Signalling channels for network management communication
    • H04L41/342Signalling channels for network management communication between virtual entities, e.g. orchestrators, SDN or NFV entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/036Updating the topology between route computation elements, e.g. between OpenFlow controllers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • 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/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L2012/4629LAN interconnection over a backbone network, e.g. Internet, Frame Relay using multilayer switching, e.g. layer 3 switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/08Learning-based routing, e.g. using neural networks or artificial intelligence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/64Routing or path finding of packets in data switching networks using an overlay routing layer

Definitions

  • the present application relates to data exchange technologies in the field of Ethernet data centers, and in particular, to a method, device, and computer storage medium for implementing dual control planes.
  • SDN Software Defined Network
  • OpenFlow OpenFlow
  • the embodiment of the present application provides a method, an apparatus, and a computer storage medium for implementing a dual control plane.
  • An address resolution protocol (ARP) learning mechanism of the first control plane and the second control plane is set on the layer 3 switching device, wherein the first control plane has a higher priority than the second control plane. priority;
  • the ARP packet is forwarded based on the ARP packet forwarding mechanism on the Layer 2 switching device.
  • the ARP learning mechanism of the first control plane is a self-learning mechanism
  • the ARP learning mechanism of the second control plane is a controller delivery mechanism
  • the learning the ARP based on the ARP learning mechanism on the Layer 3 switching device includes:
  • the ARP address corresponding to the ARP packet is queried in the local routing table.
  • the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as self-learning;
  • the entry corresponding to the ARP address is marked as self-learning and the ARP is The entry corresponding to the address is refreshed by the update time;
  • the ARP address corresponding to the ARP packet is in the local routing table.
  • the corresponding entry is overwritten, and the entry corresponding to the ARP address is marked as self-learning.
  • the learning the ARP based on the ARP learning mechanism on the Layer 3 switching device includes:
  • the Layer 3 switching device When the Layer 3 switching device receives the ARP flow table addition message from the controller, querying whether the ARP address corresponding to the ARP flow table adding message exists in the local routing table;
  • the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as a controller.
  • the local routing table is kept unchanged;
  • the ARP address exists in the local routing table, and the MAC address corresponding to the ARP address is inconsistent with the MAC address corresponding to the egress port, if the corresponding entry in the local routing table is marked as self-learning, The local routing table is unchanged. If the corresponding entry in the local routing table is marked as being sent by the controller, the ARP address corresponding to the message is added to the corresponding table in the local routing table according to the ARP flow table. Items are covered.
  • the first virtual interface is an IP protocol stack virtual interface
  • the second virtual interface is an SDN protocol stack virtual interface
  • the Layer 3 switching device advertises the route of the SDN network to the egress router through the virtual interface of the IP protocol stack;
  • the Layer 3 switching device receives the flow table sent by the controller through the SDN protocol stack virtual interface.
  • the Layer 3 switching device includes: an SDN protocol stack module, an IP protocol stack module, and a transceiver packet module;
  • the forwarding of the traffic between the first control plane and the second control plane by using the bridge interface on the Layer 3 switching device includes:
  • the SDN protocol stack module receives the ARP request sent by the controller, and the SDN protocol stack module marks the virtual interface of the SDN protocol stack on the ARP request, and sends the identifier to the transceiver packet module, and sends the packet to the transceiver module.
  • the tag of the virtual interface of the SDN protocol stack is replaced with the tag of the virtual interface of the IP protocol stack, and sent to the IP protocol stack module;
  • the IP protocol stack module learns the ARP, marks the virtual interface of the IP protocol stack in the ARP response, and sends the identifier to the transceiver packet module, and replaces the label of the virtual protocol stack virtual interface with the SDN through the transceiver module.
  • the mark of the virtual interface of the protocol stack is sent to the SDN protocol stack module;
  • the SDN protocol stack module sends the ARP response to the controller, and triggers the controller to perform ARP learning according to the ARP response.
  • the Layer 3 switching device includes: an SDN protocol stack module, an IP protocol stack module, and a transceiver packet module;
  • the forwarding of the traffic between the first control plane and the second control plane by using the bridge interface on the Layer 3 switching device includes:
  • the packet is sent to the IP protocol stack module through the network segment route; the IP protocol stack The module performs a route query according to the destination IP address of the packet. If the egress route of the virtual interface of the IP protocol stack is queried, the IP protocol stack module marks the virtual interface of the IP protocol stack on the packet; The IP protocol stack module triggers the APR learning of the self-learning mechanism to the egress route of the virtual interface of the IP protocol stack;
  • the IP protocol stack module sends the tagged message of the virtual interface of the IP protocol stack to the transceiver module, and replaces the tag of the virtual interface of the IP protocol stack with the tag of the virtual interface of the SDN protocol stack by using the transceiver module. And sent to the SDN protocol stack module;
  • the packet is sent to the controller, and the controller is triggered to perform ARP learning;
  • the SDN protocol stack module receives the flow table sent by the controller.
  • the ARP packet forwarding mechanism is forwarded based on the ARP packet forwarding mechanism on the Layer 2 switching device, including:
  • the Layer 2 switching device When receiving the ARP packet sent by the server, the Layer 2 switching device sends the ARP packet to the Layer 3 switching device for ARP learning, and sends the ARP packet to the controller for ARP learning.
  • the controller After the default route of the egress router is configured in the SDN domain, the controller actively triggers the next hop ARP learning of the default route.
  • the controller When the packet is not found on the bridge interface of the Layer 3 switching device, the controller is configured to trigger the ARP learning by using the packet. The controller sends the flow table to the Layer 3 switching device.
  • the controller actively triggers the next hop ARP learning of the default route, including:
  • the controller sends an ARP request to the SDN protocol stack module of the Layer 3 switching device, where the SDN protocol stack module puts the virtual interface of the SDN protocol stack on the ARP request. Marking and sending to the transceiver module, replacing the mark of the SDN protocol stack virtual interface with the mark of the IP protocol stack virtual interface by the transceiver module, and transmitting the mark to the IP protocol stack module; the IP protocol stack module pair
  • the ARP learns to mark the virtual interface of the IP protocol stack in the ARP response, and sends the tag to the transceiver module, and replaces the tag of the virtual interface of the IP protocol stack with the tag of the virtual interface of the SDN protocol stack by using the transceiver module. And sent to the SDN protocol stack module;
  • the controller receives the ARP response sent by the SDN protocol stack module, and performs ARP learning according to the ARP response.
  • the controller when the packet reaches the bridge interface of the Layer 3 switching device, the controller is triggered to perform ARP learning by using the packet, including:
  • the controller receives the encapsulated packet sent by the SDN protocol stack module, where the encapsulated packet is generated by the following method: when the Layer 3 packet reaches the bridge interface and the route is not found. After the layer packet reaches the bridge interface and the route is not found, the packet is sent to the IP protocol stack module by using the network segment route; the IP protocol stack module performs routing query according to the destination IP address of the packet, if Querying the egress route of the virtual interface of the IP protocol stack, the IP protocol stack module marks the virtual interface of the IP protocol stack on the packet; the IP protocol stack module is marked with the mark of the virtual interface of the IP protocol stack.
  • the message is sent to the transceiver module, and the tag of the virtual interface of the IP protocol stack is replaced by the tag of the virtual interface of the SDN protocol stack by the transceiver module, and sent to the SDN protocol stack module; the SDN protocol stack module Encapsulate the packet and obtain the encapsulated packet.
  • the controller After receiving the encapsulated packet, the controller performs ARP learning and updates the flow table.
  • the controller sends the updated flow table to the SDN protocol stack module in the layer 3 switching device.
  • the method further includes:
  • the controller periodically compares the routing table on the local routing table and the switching device, and when the entries in the local routing table are inconsistent with the entries in the routing table on the switching device, the table on the switch is The item is updated to local.
  • the first configuration unit is configured to set an ARP learning mechanism of the first control plane and the second control plane on the layer 3 switching device, where the priority of the first control plane is higher than the priority of the second control plane And setting a bridge interface on the layer 3 switching device, where the bridge interface is bound to the first virtual interface and the second virtual interface, where the first virtual interface corresponds to the first control plane, and the second virtual An interface corresponding to the second control plane;
  • the second configuration unit is configured to set an ARP packet forwarding mechanism on the Layer 2 switching device.
  • the first processing unit is configured to learn the ARP based on the ARP learning mechanism on the Layer 3 switching device, and perform the traffic between the first control plane and the second control plane based on the bridge interface on the Layer 3 switching device. Forward
  • the second processing unit is configured to forward the ARP packet based on the ARP packet forwarding mechanism on the Layer 2 switching device.
  • the ARP learning mechanism of the first control plane is a self-learning mechanism
  • the ARP learning mechanism of the second control plane is a controller delivery mechanism
  • the first processing unit includes:
  • the first learning sub-unit is configured to: when the ARP packet is received by the Layer 3 switching device, query whether the ARP address corresponding to the ARP packet exists in the local routing table; if the local routing table does not exist, An ARP address, the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as self-learning; if the ARP address exists in the local routing table, and the ARP is If the MAC address corresponding to the address is the same as the MAC address corresponding to the egress port, the entry corresponding to the ARP address is marked as self-learning and the update time of the entry corresponding to the ARP address is updated; if the local routing table is If the ARP address exists, and the MAC address corresponding to the ARP address is inconsistent with the MAC address corresponding to the egress port, the corresponding entry in the local routing table is overwritten according to the ARP address corresponding to the ARP packet. And marking the entry corresponding to the ARP address as self-learning.
  • the first processing unit includes:
  • a second learning sub-unit configured to: when the ARP flow table adding message is received from the controller, querying whether the ARP address corresponding to the ARP flow table adding message exists in the local routing table; If the ARP address does not exist in the routing table, the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as a controller, if the local routing table exists.
  • the local routing table is kept unchanged; if the ARP address exists in the local routing table, If the MAC address corresponding to the ARP address is inconsistent with the MAC address corresponding to the egress port, if the corresponding entry in the local routing table is marked as self-learning, the local routing table is kept unchanged, if the local routing table corresponds to The entry is marked as being sent by the controller, and the corresponding entry in the local routing table is overwritten according to the ARP address added by the ARP flow table.
  • the first virtual interface is an IP protocol stack virtual interface
  • the second virtual interface is an SDN protocol stack virtual interface
  • the Layer 3 switching device advertises the route of the SDN network to the egress router through the virtual interface of the IP protocol stack;
  • the Layer 3 switching device receives the flow table sent by the controller through the SDN protocol stack virtual interface.
  • the Layer 3 switching device includes: an SDN protocol stack module, an IP protocol stack module, and a transceiver module;
  • the SDN protocol stack module receives an ARP request sent by the controller, and the SDN protocol stack module marks the virtual interface of the SDN protocol stack on the ARP request, and sends the identifier to the transceiver packet module, and the transceiver module Replace the tag of the virtual interface of the SDN protocol stack with the tag of the virtual interface of the IP protocol stack, and send the tag to the IP protocol stack module;
  • the IP protocol stack module learns the ARP, marks the virtual interface of the IP protocol stack in the ARP response, and sends the identifier to the transceiver packet module, and replaces the label of the virtual protocol stack virtual interface with the SDN through the transceiver module.
  • the mark of the virtual interface of the protocol stack is sent to the SDN protocol stack module;
  • the SDN protocol stack module sends the ARP response to the controller, and triggers the controller to perform ARP learning according to the ARP response.
  • the Layer 3 switching device includes: an SDN protocol stack module, an IP protocol stack module, and a transceiver module;
  • the packet is sent to the IP protocol stack module through the network segment route; the IP protocol stack The module performs a route query according to the destination IP address of the packet. If the egress route of the virtual interface of the IP protocol stack is queried, the IP protocol stack module marks the virtual interface of the IP protocol stack on the packet; The IP protocol stack module triggers the APR learning of the self-learning mechanism to the egress route of the virtual interface of the IP protocol stack;
  • the IP protocol stack module sends the tagged message of the virtual interface of the IP protocol stack to the transceiver module, and replaces the tag of the virtual interface of the IP protocol stack with the tag of the virtual interface of the SDN protocol stack by using the transceiver module. And sent to the SDN protocol stack module;
  • the packet is sent to the controller, and the controller is triggered to perform ARP learning;
  • the SDN protocol stack module receives the flow table sent by the controller.
  • the second processing unit is specifically configured to send the ARP packet to the Layer 3 switching device for ARP learning when the Layer 2 switching device receives the ARP packet sent by the server. And sending the ARP packet to the controller for ARP learning.
  • the first learning unit is configured to: after the default route of the egress router is configured in the SDN domain, the controller actively triggers the next hop ARP learning of the default route;
  • the second learning unit is configured to trigger the controller to perform ARP learning by using the packet when the packet reaches the bridge interface of the Layer 3 switching device and the route is not found;
  • the flow table is delivered to the Layer 3 switching device.
  • the first learning unit is specifically configured to: after the SDN domain is configured with the default route of the egress router, send an ARP request to the SDN protocol stack module of the layer 3 switching device, where the SDN protocol
  • the stack module marks the virtual interface of the SDN protocol stack on the ARP request, and sends the tag to the transceiver module, and replaces the tag of the virtual interface of the SDN protocol stack with the tag of the virtual interface of the IP protocol stack by using the transceiver module.
  • the IP protocol stack module learns the ARP, marks the virtual interface of the IP protocol stack in the ARP response, and sends the identifier to the transceiver module, and the IP protocol is sent through the transceiver module.
  • the tag of the virtual interface of the stack is replaced with the tag of the virtual interface of the SDN protocol stack, and sent to the SDN protocol stack module.
  • the ARP response sent by the SDN protocol stack module is received, and ARP learning is performed according to the ARP response.
  • the second learning unit is specifically configured to: when the three-layer packet reaches the bridge interface and does not find a route, the controller receives the encapsulated packet sent by the SDN protocol stack module.
  • the encapsulated packet is generated by the following method: when the Layer 3 packet does not find the route after the bridge interface is reached, the packet is sent to the IP protocol stack module through the network segment route; The IP protocol stack module performs a route query according to the destination IP address of the packet. If the egress route of the virtual interface of the IP protocol stack is queried, the IP protocol stack module marks the virtual interface of the IP protocol stack on the packet.
  • the IP protocol stack module sends the tagged message of the virtual interface of the IP protocol stack to the transceiver module, and replaces the tag of the virtual interface of the IP protocol stack with the tag of the virtual interface of the SDN protocol stack by using the transceiver module. And sending the SDN protocol stack module; the SDN protocol stack module encapsulates the packet to obtain the encapsulated packet; after receiving the encapsulated packet, performing ARP learning and updating the flow table.
  • the device further includes: a third learning unit, configured to periodically compare the local routing table and the routing table on the switching device, when the entries in the local routing table and the routing on the switching device When the entries in the table are inconsistent, the entries on the switch are updated to the local.
  • a third learning unit configured to periodically compare the local routing table and the routing table on the switching device, when the entries in the local routing table and the routing on the switching device When the entries in the table are inconsistent, the entries on the switch are updated to the local.
  • the embodiment of the present application further provides a computer storage medium storing a computer program configured to perform the above method for implementing a dual control plane.
  • the ARP learning mechanism of the first control plane and the second control plane is set on the layer 3 switching device, where the priority of the first control plane is higher than that of the second control plane.
  • Setting a bridge interface where the bridge interface is bound to the first virtual interface and the second virtual interface, where the first virtual interface corresponds to the first control plane, the first The second virtual interface corresponds to the second control plane;
  • the ARP packet forwarding mechanism is set on the Layer 2 switching device;
  • the ARP learning mechanism is learned based on the ARP learning mechanism on the Layer 3 switching device;
  • the bridge interface on the device forwards the traffic between the first control plane and the second control plane.
  • the ARP packet forwarding mechanism is forwarded based on the ARP packet forwarding mechanism on the Layer 2 switching device.
  • the convenience brought by the SDN network increases the stability of the entire network, and the entire network can keep the route smoothly according to the traditional control plane when the controller fails or is dropped. It is extremely practical in the field of data centers.
  • FIG. 1 is a schematic flowchart 1 of a method for implementing a dual control plane according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart 2 of a method for implementing a dual control plane according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart 3 of a method for implementing a dual control plane according to an embodiment of the present application
  • FIG. 4 is a topological diagram of a network networking according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram 1 of a network device according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram 2 of a network device according to an embodiment of the present application.
  • FIG. 7 is a working flow chart of a bridge interface according to an embodiment of the present application.
  • FIG. 8 is a flowchart of triggering a learning next hop ARP by a controller according to an embodiment of the present application
  • FIG. 9 is a flowchart of a traffic trigger controller learning ARP according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram 1 of a device for implementing a dual control plane according to an embodiment of the present application
  • FIG. 11 is a second structural diagram of a device for implementing a dual control plane according to an embodiment of the present application.
  • the embodiment of the present application provides a scheme for mixing the SDN control plane and the traditional control plane, that is, the switching device can run on the traditional control plane or on the SDN control plane. Because the SDN control plane and the traditional control plane coexist, it is necessary to solve the problem that the SDN control plane and the traditional control plane listen to the commander, that is, the issue of the priority of the entry; because the SDN control plane and the traditional control plane coexist, the data center The traffic of the interface between the internal network and the external router needs to go to the traditional control plane to take the SDN control plane. How to handle the traffic between the control planes is also a problem solved by the embodiment of the present application. The traditional control plane needs to run various routing protocols to learn dynamic routing and learn the next hop routing.
  • the SDN control plane needs packets to trigger the controller to learn the precise flow table.
  • the technical solutions of the embodiments of the present application are described in the following four aspects: the dual control plane entry priority control, the SDN network and the traditional network bridging, the processing of the southbound traffic and the northbound traffic, and the access device ARP processing. Specific implementation details of the embodiments of the present application.
  • FIG. 1 is a schematic flowchart of a method for implementing a dual control plane according to an embodiment of the present application.
  • the method for implementing a dual control plane in this example is applied to a switching device side. As shown in FIG. 1 , the method includes the following steps:
  • Step 101 Set an ARP learning mechanism of the first control plane and the second control plane on the Layer 3 switching device, where the priority of the first control plane is higher than the priority of the second control plane.
  • a three-layer virtual switching device (VXLAN, Virtual eXtensible LAN) is configured for the Layer 3 switching device.
  • the data center includes multiple sets of network device structures, for example, an A/B device, a C/D device, a ServerA/ServerB, an E/F device, a G/H device, and a ServerC/ServerD.
  • A, B, E, and F devices are Layer 3 switching devices
  • C, D, G, and H are Layer 2 switching devices.
  • the embodiment of the present application uses an A/B device, a C/D device, and a Server A/ServerB as an example for explanation.
  • the E/F device, the G/H device, and the ServerC/ServerD are similar.
  • the VXLAN tunnel is taken between the A/B device and the C/D device, the L3VXLAN configuration is configured on the A/B device in the traditional control plane, and the L2VXLAN configuration is configured on the C/D device in the traditional control plane. .
  • the A/B device is connected to the controller, and in addition, the C/D device is also connected to the controller.
  • the ARP learning mechanism of the first control plane is a self-learning mechanism
  • the ARP learning mechanism of the second control plane is a controller delivery mechanism
  • the VXLAN ARP learning for the network device A/B supports both the traditional self-learning and the controller to issue two control planes, and the self-learning priority is always the highest.
  • Step 102 Set a bridge interface on the layer 3 switching device, where the bridge interface is bound to the first virtual interface and the second virtual interface, where the first virtual interface corresponds to the first control plane, where the The second virtual interface corresponds to the second control plane.
  • Step 103 Set an ARP packet forwarding mechanism on the Layer 2 switching device.
  • Step 104 Learning the ARP based on the ARP learning mechanism on the Layer 3 switching device, and forwarding the traffic between the first control plane and the second control plane based on the bridge interface on the Layer 3 switching device.
  • the learning the ARP based on the ARP learning mechanism on the Layer 3 switching device includes:
  • the ARP address corresponding to the ARP packet is queried in the local routing table.
  • the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as self-learning;
  • the entry corresponding to the ARP address is marked as self-learning and the ARP is The entry corresponding to the address is refreshed by the update time;
  • the ARP address corresponding to the ARP packet is in the local routing table.
  • the corresponding entry is overwritten, and the entry corresponding to the ARP address is marked as self-learning.
  • the learning the ARP based on the ARP learning mechanism on the Layer 3 switching device includes:
  • the Layer 3 switching device When the Layer 3 switching device receives the ARP flow table addition message from the controller, querying whether the ARP address corresponding to the ARP flow table adding message exists in the local routing table;
  • the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as a controller.
  • the local routing table is kept unchanged;
  • the ARP address exists in the local routing table, and the MAC address corresponding to the ARP address is inconsistent with the MAC address corresponding to the egress port, if the corresponding entry in the local routing table is marked as self-learning, The local routing table is unchanged. If the corresponding entry in the local routing table is marked as being sent by the controller, the ARP address corresponding to the message is added to the corresponding table in the local routing table according to the ARP flow table. Items are covered.
  • the traditional self-learning includes: when the network device A/B receives the VXLAN ARP packet from the service port, the ARP packet is processed according to the traditional self-learning process. Conduct dynamic learning, that is, self-learning. 1) If the ARP address is not included in the local routing table, the entry is directly added, and the FLAG is marked as dynamic learning or self-learning. 2) If the ARP address already exists locally and the MAC and outgoing port information are consistent, the FLAG is marked as dynamic learning. Change the status of ARP to dynamic learning or self-learning. 3) If the MAC and outgoing ports do not cover the original entries, FLAG is marked as dynamic learning or self-learning.
  • the ARP sent by the controller specifically includes: when the network device A/B receives the ARP flow table addition message from the controller, 1) if the local routing table does not have the ARP address, The entry is added, and the FLAG is marked as the controller. 2) If the ARP address already exists in the local area and the MAC and outgoing port information are the same, no processing is performed. 3) If the ARP address already exists in the local area, but the MAC and the outbound port information are inconsistent, if the original FLAG flag is dynamically learned, no processing is performed. If the original FLAG flag is sent by the controller, the original Entry.
  • the VXLAN ARP learned by the traditional control plane has a high priority.
  • the controller compares the ARP saved by itself with the ARP table period on the switch to ensure synchronization between the two. If the controller does not exist on the switch, it is sent to the switch. The switch, if both have, but the exports are inconsistent, the controller retrieves the local coverage on the switch.
  • the traffic is forwarded according to the entries learned by the traditional control plane.
  • the traditional plane does not learn the related entries, the traffic is forwarded according to the flow table sent by the controller.
  • the virtual machine migration scenario occurs.
  • the controller retrieves the traditionally learned entries to cover the local implementation synchronization.
  • the solution of the embodiment of the present application may further include:
  • the first virtual interface is an IP protocol stack virtual interface
  • the second virtual interface is an SDN protocol stack virtual interface
  • the Layer 3 switching device advertises the route of the SDN network to the egress router through the virtual interface of the IP protocol stack;
  • the Layer 3 switching device receives the flow table sent by the controller through the SDN protocol stack virtual interface.
  • the Layer 3 switching device includes: an SDN protocol stack module, an IP protocol stack module, and a transceiver module; the SDN protocol stack module receives an ARP request sent by the controller, and the SDN protocol stack module is in the The ARP request is tagged with the virtual interface of the SDN protocol stack, and sent to the transceiver module, and the tag of the virtual interface of the SDN protocol stack is replaced with the tag of the virtual interface of the IP protocol stack by the transceiver module, and sent to the IP address.
  • Protocol stack module ;
  • the IP protocol stack module learns the ARP, marks the virtual interface of the IP protocol stack in the ARP response, and sends the identifier to the transceiver packet module, and replaces the label of the virtual protocol stack virtual interface with the SDN through the transceiver module.
  • the mark of the virtual interface of the protocol stack is sent to the SDN protocol stack module;
  • the SDN protocol stack module sends the ARP response to the controller, and triggers the controller to perform ARP learning according to the ARP response.
  • the packet is sent to the IP protocol stack through the network segment route.
  • the module of the IP protocol stack performs a route query according to the destination IP address of the packet. If the egress route of the virtual interface of the IP protocol stack is queried, the IP protocol stack module puts an IP protocol stack virtual on the packet. The label of the interface; if the egress route of the virtual interface of the IP protocol stack is not queried, the IP protocol stack module triggers the APR learning of the self-learning mechanism;
  • the IP protocol stack module sends the tagged message of the virtual interface of the IP protocol stack to the transceiver module, and replaces the tag of the virtual interface of the IP protocol stack with the tag of the virtual interface of the SDN protocol stack by using the transceiver module. And sent to the SDN protocol stack module;
  • the packet is sent to the controller, and the controller is triggered to perform ARP learning;
  • the SDN protocol stack module receives the flow table sent by the controller.
  • the bridge interface For the bridging of the traffic between the SDN domain and the legacy domain, the bridge interface is adopted, and the interface can use the characteristics of the existing control plane of the traditional control plane to advertise the route of the internal SDN network to the uplink router (egress router) to send the external
  • the traffic in the data center (DC, Data Center) is taken down, and at the same time, in response to the controller's instructions, the flow table exit from the SDN to the external traffic is taken.
  • the bridge interface is an extension of the general physical interface and the SDN port.
  • the common physical interface can only send the received protocol packets to the traditional IPSTACK process.
  • the SDN port can only send the protocol packets to the SDN-related protocol.
  • the concept of the bridge interface is proposed here, that is, the traditional routing protocol can be released through this interface, and can be controlled by the controller as an interface from the SDN domain to the outside domain.
  • the two control planes of the switch belong to different processes.
  • the bridge interface two virtual interfaces are bound, which are called the traditional protocol stack virtual interface and the SDN control plane virtual interface.
  • IPSTACK_VP and SDN_VP respectively.
  • the two virtual interfaces are bound to the physical interface of the bridge interface.
  • the binding relationship is delivered after the user configures the bridge port.
  • the switch does not need to save the virtual egress route. It only needs to save the route used for the actual forwarding. However, the packet is sent to the packet between the traditional IP protocol stack process and the SDN protocol.
  • the forwarding controller for the southbound traffic will send a network segment routing exit to the traditional control plane IP protocol stack to point to IPSTACK_VP, which is the network segment of the network where the virtual machine is located.
  • IPSTACK_VP the network segment of the network where the virtual machine is located.
  • the scheme of the bridge interface is adopted, and the virtual interface is used to prevent the traditional plane and SDN plane data packets and protocol packets from interfering with each other without changing the traditional control plane data forwarding and the protocol packet sending process of the existing switch. .
  • the controller After the default outgoing route is configured for the SDN domain, the controller will automatically trigger the next-hop ARP learning of the default route.
  • the controller sends an ARP request to the SDN protocol stack of the switch.
  • the SDN protocol stack will carry the message with the SDN_VP exit tag, and then the message will be sent to an IP protocol stack.
  • the IP protocol stack is responsible for learning the ARP in the traditional control plane.
  • the ARP reply packet is sent to the switch SDN protocol stack and marked with the IPSTACK_VP.
  • the SDN controller learns the ARP and sends the related flow table of the default route.
  • the exchange of the two protocol stacks is implemented by using the transceiver module to switch back, that is, the two protocol stacks do not directly exchange information through the transceiver module, so that the processing mode of the existing switch protocol stack is not required to be changed. .
  • the most critical process for the southbound traffic is to send a control flow to the switch to send the flow table to the switch after the packet is not found.
  • the switch After receiving the Layer 3 packet, the switch will send the network segment route to the traditional IP protocol stack if there is no route. If the IP protocol stack matches IPSTACK_VP, it will be marked with IPSTACK_VP, and then the SDN protocol stack will receive the report.
  • the SDN protocol stack is responsible for the SDN protocol message (for example, OPEN_FLOW) and then sent to the SDN controller. After receiving the SDN controller, the ARP learning is triggered and the intranet host route is delivered.
  • the traffic from south to north can learn the exit information of the next hop on the traditional control plane without the next hop, and then deliver the route of the external network direction; the traffic entering the data center from north to south is If the data packet is not matched to the accurate flow table, the data packet is uploaded to the protocol stack of the traditional control plane and then bridged to the SDN-related protocol stack to trigger the controller to deliver the accurate flow table.
  • Step 105 Forward the ARP packet based on the ARP packet forwarding mechanism on the Layer 2 switching device.
  • the ARP packet forwarding mechanism is forwarded based on the ARP packet forwarding mechanism on the Layer 2 switching device, including:
  • the Layer 2 switching device When receiving the ARP packet sent by the server, the Layer 2 switching device sends the ARP packet to the Layer 3 switching device for ARP learning, and sends the ARP packet to the controller for ARP learning.
  • FIG. 2 is a schematic flowchart 2 of a method for implementing a dual control plane according to an embodiment of the present application.
  • the method for implementing a dual control plane in this example is applied to a controller side. As shown in FIG. 2, the method includes the following steps:
  • Step 201 After the default route of the egress router is configured in the SDN domain, the controller actively triggers the next hop ARP learning of the default route.
  • the controller sends an ARP request to the SDN protocol stack module of the layer 3 switching device, where the SDN protocol stack module puts an SDN protocol stack on the ARP request.
  • the tag of the virtual interface is sent to the transceiver module, and the tag of the virtual interface of the SDN protocol stack is replaced by the tag of the virtual interface of the IP protocol stack by the transceiver module, and sent to the IP protocol stack module; the IP protocol The stack module learns the ARP, marks the virtual interface of the IP protocol stack in the ARP response, and sends it to the transceiver module, and replaces the label of the virtual interface of the IP protocol stack with the virtual interface of the SDN protocol stack by using the transceiver module.
  • the tag is sent to the SDN protocol stack module; the controller receives the ARP response sent by the SDN protocol stack module, and performs ARP learning according to the ARP response.
  • the controller will automatically trigger the next-hop ARP learning of the default route.
  • the controller sends an ARP request to the SDN protocol stack of the switch.
  • the SDN protocol stack will carry the message with the SDN_VP exit tag, and then the message will be sent to an IP protocol stack.
  • the IP protocol stack is responsible for learning the ARP in the traditional control plane.
  • the ARP reply packet is sent to the switch SDN protocol stack and marked with the IPSTACK_VP.
  • the SDN controller learns the ARP and sends the related flow table of the default route.
  • the exchange of the two protocol stacks is implemented by using the transceiver module to switch back, that is, the two protocol stacks do not directly exchange information through the transceiver module, so that the processing mode of the existing switch protocol stack is not required to be changed. .
  • Step 202 When the packet reaches the bridge interface of the Layer 3 switching device, the controller is configured to perform ARP learning by using the packet; the controller sends the flow table to the Layer 3 switching device.
  • the controller receives the encapsulated packet sent by the SDN protocol stack module, where the encapsulated packet is generated by the following manner, when the route is not found after the Layer 3 packet reaches the bridge interface.
  • the packet is sent to the IP protocol stack module through the network segment route; the IP protocol stack module performs routing according to the destination IP address of the packet. Querying, if the egress route of the virtual interface of the IP protocol stack is queried, the IP protocol stack module marks the virtual interface of the IP protocol stack on the packet; the IP protocol stack module is marked with the virtual interface of the IP protocol stack.
  • the tagged message is sent to the transceiver module, and the tag of the virtual interface of the IP protocol stack is replaced by the tag of the virtual interface of the SDN protocol stack by the transceiver module, and sent to the SDN protocol stack module; the SDN protocol stack module Encapsulating the packet to obtain the encapsulated packet; after receiving the encapsulated packet, the controller performs ARP learning and updates the flow table; and the controller sends the updated flow table to The SDN protocol stack module in the Layer 3 switching device.
  • the most critical process for the southbound traffic is that the packet is not detected after the packet arrives at the bridge interface, and the control learning host ARP is triggered, and then sent to the switch to send the flow table.
  • the switch After receiving the Layer 3 packet, the switch will send the network segment route to the traditional IP protocol stack if there is no route. If the IP protocol stack matches IPSTACK_VP, it will be marked with IPSTACK_VP, and then the SDN protocol stack will receive the report.
  • the SDN protocol stack is responsible for the SDN protocol message (for example, OPEN_FLOW) and then sent to the SDN controller. After receiving the SDN controller, the ARP learning is triggered and the intranet host route is delivered.
  • the controller can learn the next hop exit information and then send the external network direction route on the traditional control plane without the next hop; the north to the south enter the data center.
  • the data packet is uploaded to the protocol stack of the traditional control plane without being matched to the accurate flow table, and then bridged to the SDN-related protocol stack and triggers the controller to deliver the accurate flow table.
  • the controller periodically compares the routing table on the local routing table and the switching device, and when the entries in the local routing table are inconsistent with the entries in the routing table on the switching device, The entries on the switch are updated to the local.
  • FIG. 3 is a schematic flowchart of a method for implementing a dual control plane according to an embodiment of the present disclosure.
  • the method for implementing a dual control plane in this example is applied to a switching device side. As shown in FIG. 3, the method includes the following steps:
  • Step 301 The Layer 2 switching device receives an ARP packet from the service interface.
  • the configuration of the layer 2 VXLAN is performed on the layer 2 switching device.
  • the layer 2 switching device is connected to the controller.
  • the controller For details, refer to the network topology diagram shown in FIG. 4 .
  • Step 302 When the Layer 2 switching device sends the ARP packet to the Layer 3 switching device, the ARP packet is sent to the controller at the same time.
  • the Layer 2 switching device that is, the network device connected to the SERVER distinguishes the downlink port (connected with other network devices) and the uplink port (ports connected to the SERVER).
  • the ARP packet needs to be supported in the normal control plane forwarding (LOCAL forwarding in the local VLAN and tunneling into the VXLAN Tunnel End Point (VTEP)).
  • LOCAL forwarding in the local VLAN and tunneling into the VXLAN Tunnel End Point (VTEP) One for the controller, for the downstream port, the ARP packet is forwarded according to the common traditional control plane, without copying and sending the controller.
  • the access network device sends the ARP packet sent by the SERVER to the upstream network device, so that the uplink network device learns the ARP in the traditional plane and also sends the ARP to the controller, so that the ARP can be learned in both the controller and the traditional plane.
  • the access network device sends the ARP packet sent by the SERVER to the upstream network device, so that the uplink network device learns the ARP in the traditional plane and also sends the ARP to the controller, so that the ARP can be learned in both the controller and the traditional plane.
  • FIG. 4 is a technical background of the present application.
  • the servers A, B, C, and D respectively access the network devices C, D, G, and H, and the connection ports with the network devices C, D, G, and H are SDN instance ports.
  • the network device C and the network device D are configured in a stack, the network device C is load-balanced to connect the network device A and the network device B, and the network device D is load-balanced to connect the network device A and the network device B.
  • the VXLAN tunnel between the network devices C and D and the network devices A and B is configured.
  • the C/D is used as the L2VTEP access, and the A and B are the L3VXLAN gateways.
  • the ports controlled by the controller are the network device C and the SDN instance port of the network device D and the bridge interfaces of the network device A and the network device B, respectively.
  • the routing protocol is started on the bridge interface, and the controller can advertise the route of the internal SDN network to the external network router (egress router). Traffic from north to south takes the L2 access of the VXLAN on the network devices C and D. After the packet is tunneled, it enters the network device A/B. After decapsulating the device, the route is sent to the external router. The traffic from south to north is routed on the network device A/B and routed to the tunnel through the L3VXLAN. After reaching the network C/D, the VXLAN is decapsulated and then L2 is forwarded to ServerA/ServerB.
  • FIG. 5 is a main component diagram of a network device according to the present application, which mainly includes a data configuration module, a protocol stack module, a transceiver module, and a forwarding control module.
  • the protocol stack module is divided into an SDN-related protocol stack (such as an OPENFLOW protocol stack) and a traditional control plane protocol stack (such as IPSTACK), and the SDN-related protocol stack is configured to encapsulate the received packet into a PACKET_IN message and send it to the controller or parse.
  • the controller sends the protocol packet to the switch, and then sends the controller command to the network device; the traditional control plane protocol stack is responsible for the unified processing of the IP protocol stack.
  • the bridge interface has both traditional traffic and SDN traffic, so there is some interaction between the traditional protocol stack and the SDN related protocol stack.
  • the interaction is implemented by using the traditional protocol stack virtual interface and the SDN control plane virtual interface, namely IPSTACK_VP and SDN_VP.
  • IPSTACK_VP IPSTACK_VP
  • SDN_VP SDN control plane virtual interface
  • the binding between the physical port of the bridge interface and the two virtual interfaces is delivered after the user configures the hybrid port.
  • the configuration module is configured to provide a user layer configuration interface, and the configuration is sent to the forwarding control module.
  • the forwarding controller module is responsible for recording the information, and sends the forwarding action of the SDN domain to the switching chip. Show.
  • Embodiment 1 Gateway device dual control plane northbound traffic forwarding processing
  • the network device C/D is a Layer 2 access device
  • the network device A/B is a Layer 3 gateway device.
  • the SERVER sends traffic to the external network, since the internal IP (DIP) is not the IP of the local network segment, the destination MAC address of the gateway is requested.
  • DIP internal IP
  • the destination MAC address of the packets sent by the SERVER is the MAC of the Layer 3 gateway, that is, the MAC of the network device A/B, and the destination IP is the external network IP.
  • the traffic is searched on the access network device (that is, the network device C/D shown in FIG. 4) to find the Layer 2 accurate flow table (MAC table). If the VXLAN tunnel is found, the network device C/D encapsulates the packet into the VXLAN. The packet header is then forwarded to the network device A/B. The packet looks up the default flow table sent by the controller on the network device A/B, and the egress points to the external network.
  • the default flow table sent by the network device A/B is sent by the SDN domain controller. After the default route is configured, the controller will trigger the next hop ARP learning. The entire learning process is obtained from the SDN control plane to the traditional control plane. ARP. The process of learning the default route next hop ARP learning by the controller is shown in Figure 8. This process is divided into six steps, corresponding to 1, 2, 3, 4, 5, and 6 in the figure:
  • the default outgoing route is configured in the SDN domain, and the controller sends an ARP request packet to the SDN-related protocol stack.
  • the SDN-related protocol stack sends the ARP request packet (with the SDN_VP egress flag) to the switch transceiver module.
  • the switch receiving and sending packet module receives the packet sent by the SDN protocol stack. If the SDN_VP egress flag is used, the virtual port is converted into IPSTACK_VP according to the mapping relationship, and then sent to the traditional IP protocol stack plane.
  • the traditional IP protocol stack When the traditional IP protocol stack receives the ARP request, it will reply to the ARP reply message.
  • the traditional IP protocol stack sends an ARP reply packet (with the IPSTACK_VP exit flag) to the transceiver module.
  • the receiving and receiving packet module receives the packet sent by the traditional IP protocol stack. If the IPSTACK_VP egress flag is received, the virtual port is converted to the SDN_VP and sent to the SDN protocol stack according to the mapping relationship, and the PACKET_IN header is encapsulated by the SDN protocol stack. The department sends the SDN controller.
  • the SDN controller learns the ARP and sends the intranet host route.
  • the VXLAN header is encapsulated in the C/D device and enters the VXLAN tunnel to point to the network device A/B as shown.
  • the device A/B performs VXLAN decapsulation, and then queries the default route sent by the controller to enter the external network.
  • Embodiment 2 Gateway device dual controller plane southbound traffic processing
  • the traditional interface advertises the routes of the intranet network segment to the connected external network router through the routing protocol enabled on the bridge interface. The traffic sent to the SDN intranet is taken down.
  • the network device A/B When the traffic reaches the network device A/B as shown in the figure, if the exact entry (host route) can be found, the VXLAN tunnel is directly entered according to the egress and encapsulation information of the entry, and the traffic is sent to the network device. C/D, the network device C/D decapsulates the VXLAN message and sends it to SERVER.
  • the network device A/B For traffic that does not match the host route, the network device A/B needs to send the traffic to the traditional IP protocol stack plane, and then trigger the SDN protocol plane triggering controller to learn the host flow table in the SDN domain through the traditional protocol stack plane notification. 9 process is as follows:
  • the data packet received on the bridge interface of the network device A/B if the forwarding module finds that there is no host route in the hardware routing table, the network segment of the network segment to which the virtual machine belongs is sent to the CPU.
  • the transceiver packet module After receiving the data packet sent by the CPU, the transceiver packet module sends the data packet to the IP protocol stack of the traditional controller plane.
  • the route is queried by the DIP of the packet. If the IPSTACK_VP egress route is matched, the IP protocol stack process of the traditional control plane sends a data packet (with the IPSTACK_VP egress flag) to the transceiver module. . Otherwise, the IP stack process of the traditional control plane triggers the traditional ARP learning.
  • the transceiver module receives the data packet sent by the IP protocol stack process of the traditional control plane. If the IPSTACK_VP exit flag is used, the transceiver module converts it into the corresponding SDN_VP according to the mapping relationship of the virtual port and sends it to the SDN protocol. Stack process,
  • the ARP learning is triggered and sent to the SDN protocol stack.
  • the SDN-related protocol stack sends the entry to the forwarding module.
  • the packet when the same packet is sent from the external network to the internal network, the packet enters the network device A/B, and then the exact entry (host route) is encapsulated into the VXLAN packet header to enter the tunnel.
  • the network device C/D is decapsulated and sent to SERVER.
  • Embodiment 3 Learning processing of access network device ARP
  • the L2VXLAN tunnel is configured on the traditional control plane of the network device C/D and the mapping relationship between the VLAN and the VNI is configured.
  • the network device C/D is a Layer 2 VXLAN access device
  • the network device A/B is a Layer 3 VXLAN gateway device.
  • the SERVER Before the SERVER wants to send traffic to the external network, because the DIP is not the local network segment, it needs to send an ARP request to resolve the gateway MAC.
  • the network device C/D receives the ARP request sent by the server, the device encapsulates the VXLAN packet into the VTEP tunnel, and sends the ARP packet encapsulating the VXLAN packet header to the network device A/B. The network device A/B then learns the ARP of this VXLAN message on the traditional control plane.
  • the network device C/D When the ARP packet is imported into the VTEP tunnel, the network device C/D also copies the ARP packet to the SDN-related protocol stack process, and then the packet is encapsulated and sent to the Openflow protocol. Controller, so the controller learned this ARP.
  • the access network device sends the ARP packet sent by the SERVER to the upstream network device, so that the uplink network device learns the ARP in the traditional plane and also sends it to the controller, so that the ARP can be learned in both the controller and the traditional plane.
  • the controller can also detect the change of the virtual machine in the first time.
  • the ARP packet sent to the network device C/D by the network device A/B follows the forwarding of the common traditional control plane, and does not need to be copied and sent to the controller.
  • Embodiment 4 Priority Control
  • the ARP learning of the VXLAN on the network device A/B supports both the traditional self-learning and the controller to issue two control planes, and the self-learning priority is always the highest.
  • the network device A/B receives an ARP packet from the service port, it dynamically learns the ARP according to the traditional self-learning process.
  • the specific process is as follows:
  • the controller compares the ARP table saved by itself with the ARP table period on the switch to ensure synchronization between the two. If the controller does not exist on the switch, it is sent to the switch. If both are available, but the export is inconsistent, The controller retrieves the local coverage on the switch.
  • the MAC of the VXLAN on the network device C/D is only controlled by the traditional plane, and is obtained through self-learning, and is not controlled by the controller.
  • FIG. 10 is a first schematic structural diagram of a device for implementing a dual control plane according to an embodiment of the present application. As shown in FIG. 10, the device includes:
  • the first configuration unit 1001 is configured to set an ARP learning mechanism of the first control plane and the second control plane on the Layer 3 switching device, where the priority of the first control plane is higher than the priority of the second control plane a bridge interface, where the bridge interface is bound to the first virtual interface and the second virtual interface, where the first virtual interface corresponds to the first control plane, and the second a virtual interface corresponding to the second control plane;
  • the second configuration unit 1002 is configured to set an ARP packet forwarding mechanism on the Layer 2 switching device.
  • the first processing unit 1003 is configured to learn the ARP based on the ARP learning mechanism on the Layer 3 switching device, and configure the traffic between the first control plane and the second control plane based on the bridge interface on the Layer 3 switching device. Forwarding;
  • the second processing unit 1004 is configured to forward the ARP packet based on the ARP packet forwarding mechanism on the Layer 2 switching device.
  • the ARP learning mechanism of the first control plane is a self-learning mechanism
  • the ARP learning mechanism of the second control plane is a controller delivery mechanism
  • the first processing unit 1003 includes:
  • the first learning sub-unit is configured to: when the ARP packet is received by the Layer 3 switching device, query whether the ARP address corresponding to the ARP packet exists in the local routing table; if the local routing table does not exist, An ARP address, the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as self-learning; if the ARP address exists in the local routing table, and the ARP is If the MAC address corresponding to the address is the same as the MAC address corresponding to the egress port, the entry corresponding to the ARP address is marked as self-learning and the update time of the entry corresponding to the ARP address is updated; if the local routing table is If the ARP address exists, and the MAC address corresponding to the ARP address is inconsistent with the MAC address corresponding to the egress port, the corresponding entry in the local routing table is overwritten according to the ARP address corresponding to the ARP packet. And marking the entry corresponding to the ARP address as self-learning.
  • the first processing unit 1003 includes:
  • a second learning sub-unit configured to: when the ARP flow table adding message is received from the controller, querying whether the ARP address corresponding to the ARP flow table adding message exists in the local routing table; If the ARP address does not exist in the routing table, the ARP address is added to the local routing table, and the entry corresponding to the ARP address is marked as a controller, if the local routing table exists.
  • the local routing table is kept unchanged; if the ARP address exists in the local routing table, If the MAC address corresponding to the ARP address is inconsistent with the MAC address corresponding to the egress port, if the corresponding entry in the local routing table is marked as self-learning, the local routing table is kept unchanged, if the local routing table corresponds to The entry is marked as being sent by the controller, and the corresponding entry in the local routing table is overwritten according to the ARP address added by the ARP flow table.
  • the first virtual interface is an IP protocol stack virtual interface
  • the second virtual interface is an SDN protocol stack virtual interface
  • the Layer 3 switching device advertises the route of the SDN network to the egress router through the virtual interface of the IP protocol stack;
  • the Layer 3 switching device receives the flow table sent by the controller through the SDN protocol stack virtual interface.
  • the Layer 3 switching device includes: an SDN protocol stack module, an IP protocol stack module, and a transceiver module;
  • the SDN protocol stack module receives an ARP request sent by the controller, and the SDN protocol stack module marks the virtual interface of the SDN protocol stack on the ARP request, and sends the identifier to the transceiver packet module, and the transceiver module Replace the tag of the virtual interface of the SDN protocol stack with the tag of the virtual interface of the IP protocol stack, and send the tag to the IP protocol stack module;
  • the IP protocol stack module learns the ARP, marks the virtual interface of the IP protocol stack in the ARP response, and sends the identifier to the transceiver packet module, and replaces the label of the virtual protocol stack virtual interface with the SDN through the transceiver module.
  • the mark of the virtual interface of the protocol stack is sent to the SDN protocol stack module;
  • the SDN protocol stack module sends the ARP response to the controller, and triggers the controller to perform ARP learning according to the ARP response.
  • the Layer 3 switching device includes: an SDN protocol stack module, an IP protocol stack module, and a transceiver module;
  • the packet is sent to the IP protocol stack module through the network segment route; the IP protocol stack The module performs a route query according to the destination IP address of the packet. If the egress route of the virtual interface of the IP protocol stack is queried, the IP protocol stack module marks the virtual interface of the IP protocol stack on the packet; The IP protocol stack module triggers the APR learning of the self-learning mechanism to the egress route of the virtual interface of the IP protocol stack;
  • the IP protocol stack module sends the tagged message of the virtual interface of the IP protocol stack to the transceiver module, and replaces the tag of the virtual interface of the IP protocol stack with the tag of the virtual interface of the SDN protocol stack by using the transceiver module. And sent to the SDN protocol stack module;
  • the packet is sent to the controller, and the controller is triggered to perform ARP learning;
  • the SDN protocol stack module receives the flow table sent by the controller.
  • the second processing unit 1004 is specifically configured to send the ARP packet to the Layer 3 switching device for ARP when the Layer 2 switching device receives the ARP packet sent by the server. Learning, and sending the ARP message to the controller for ARP learning.
  • each unit in the apparatus for implementing dual control planes may be implemented by a central processing unit (CPU) or a microprocessor (MPU) located in a device implementing dual control planes.
  • CPU central processing unit
  • MPU microprocessor
  • Micro Processor Unit Micro Processor Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • FIG. 11 is a second structural diagram of a device for implementing a dual control plane according to an embodiment of the present application. As shown in FIG. 11, the device includes:
  • the first learning unit 1101 is configured to: after the default route of the egress router is configured in the SDN domain, the controller actively triggers the next hop ARP learning of the default route;
  • the second learning unit 1102 is configured to trigger the controller to perform ARP learning by using the packet when the packet reaches the bridge interface of the Layer 3 switching device and the route is not found.
  • the flow table issuing unit 1103 is configured to send the flow table to the Layer 3 switching device.
  • the first learning unit 1101 is specifically configured to: after the SDN domain is configured with the default route of the egress router, send an ARP request to the SDN protocol stack module of the Layer 3 switching device, where the SDN The protocol stack module marks the virtual interface of the SDN protocol stack on the ARP request, and sends the identifier to the transceiver module, and replaces the label of the virtual interface of the SDN protocol stack with the identifier of the virtual interface of the IP protocol stack by using the transceiver module.
  • the IP protocol stack module learns the ARP, marks the virtual protocol stack virtual interface in the ARP response, and sends the packet to the transceiver packet module, and the IP packet is sent through the transceiver module
  • the tag of the virtual interface of the protocol stack is replaced with the tag of the virtual interface of the SDN protocol stack, and sent to the SDN protocol stack module.
  • the ARP response sent by the SDN protocol stack module is received, and ARP learning is performed according to the ARP response.
  • the second learning unit 1102 is specifically configured to: when the Layer 3 packet reaches the bridge interface and does not find a route, the controller receives the encapsulated report sent by the SDN protocol stack module.
  • the packet is sent in the following manner: when the Layer 3 packet does not find the route after the bridge interface is reached, the packet is sent to the IP protocol stack module through the network segment route;
  • the IP protocol stack module performs a route query according to the destination IP address of the packet. If the egress route of the virtual interface of the IP protocol stack is queried, the IP protocol stack module marks the virtual protocol stack virtual interface on the packet.
  • the IP protocol stack module sends the tagged message of the virtual interface of the IP protocol stack to the transceiver module, and replaces the tag of the virtual interface of the IP protocol stack with the tag of the virtual interface of the SDN protocol stack by using the transceiver module And sending to the SDN protocol stack module; the SDN protocol stack module encapsulates the packet to obtain the encapsulated packet; after receiving the encapsulated packet, performing ARP learning and updating the flow table.
  • the device further includes a second learning unit, configured to periodically compare the local routing table and the routing table on the switching device, when the entries in the local routing table and the routing table on the switching device When the entries in the table are inconsistent, the entries on the switch are updated to the local.
  • a second learning unit configured to periodically compare the local routing table and the routing table on the switching device, when the entries in the local routing table and the routing table on the switching device When the entries in the table are inconsistent, the entries on the switch are updated to the local.
  • the functions implemented by the various units in the device implementing the dual control plane can be implemented by a CPU, an MPU, or a DSP, or an FPGA or the like located in a device implementing the dual control plane.
  • embodiments of the present application can be provided as a method, system, or computer program product. Accordingly, the application can take the form of a hardware embodiment, a software embodiment, or an embodiment in combination with software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • an embodiment of the present invention further provides a computer storage medium, wherein a computer program is configured, and the computer program is configured to execute a method for implementing a dual control plane according to an embodiment of the present invention.
  • the ARP learning mechanism of the first control plane and the second control plane is set on the Layer 3 switching device, where the priority of the first control plane is higher than the priority of the second control plane.
  • a bridge interface where the bridge interface is bound to the first virtual interface and the second virtual interface, where the first virtual interface corresponds to the first control plane, and the second The virtual interface is associated with the second control plane;
  • the ARP packet forwarding mechanism is set on the Layer 2 switching device;
  • the ARP learning mechanism is learned based on the ARP learning mechanism on the Layer 3 switching device;
  • the upper bridge interface forwards the traffic between the first control plane and the second control plane.
  • the ARP packet forwarding mechanism is forwarded based on the ARP packet forwarding mechanism on the Layer 2 switching device.
  • the convenience brought by the SDN network increases the stability of the entire network, and the entire network can keep the route smoothly according to the traditional control plane when the controller fails or is dropped. It is extremely practical in the field of data centers.

Abstract

本申请公开了一种实现双控制平面的方法、装置、计算机存储介质,所述方法包括:在三层交换设备上设置第一控制平面和第二控制平面的地址解析协议ARP学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;在二层交换设备上设置ARP报文转发机制;基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。

Description

一种实现双控制平面的方法、装置、计算机存储介质
相关申请的交叉引用
本申请基于申请号为201710165894.3、申请日为2017年03月20日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及以太网数据中心领域中的数据交换技术,尤其涉及一种实现双控制平面的方法、装置、计算机存储介质。
背景技术
软件定义网络(SDN,Software Defined Network),是Emulex网络一种新型网络创新架构,是网络虚拟化的一种实现方式,其核心技术OpenFlow通过将网络设备控制面与数据面分离开来,从而实现了网络流量的灵活控制,使网络作为管道变得更加智能。
传统IT架构中的网络,根据业务需求部署上线以后,如果业务需求发生变动,重新修改相应网络设备(路由器、交换机、防火墙)上的配置是一件非常繁琐的事情。在互联网/移动互联网瞬息万变的业务环境下,网络的高稳定与高性能还不足以满足业务需求,灵活性和敏捷性反而更为关键。SDN所做的事是将网络设备上的控制权分离出来,由集中的控制器管理,无须依赖底层网络设备(路由器、交换机、防火墙),屏蔽了来自底层网络设备的差异。而控制权是完全开放的,用户可以自定义任何想实现的网络路由和传输规则策略,从而更加灵活和智能。
近年来由于数据中心的网络虚拟化要求,SDN技术迅速崛起,SDN为 网络设计带来了极大便利,SDN时代的网络,不再是以设备为中心,而是以应用为中心,应用驱动网络变革。这就需要很多深度定制的工作,云计算网络尤其如此。
虽然SDN在网络设备组网的应用前景非常明朗,它所带来的技术革命也被广泛认可,但是目前全SDN网络的应用存在极高的风险,因为SDN网络完全受控于器控制,一旦控制器发生故障或者掉线会造成整个网络的瘫痪。
发明内容
为解决上述技术问题,本申请实施例提供了一种实现双控制平面的方法、装置、计算机存储介质。
本申请实施例提供的实现双控制平面的方法,包括:
在三层交换设备上设置第一控制平面和第二控制平面的地址解析协议(ARP,Address Resolution Protocol)学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;
在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;
在二层交换设备上设置ARP报文转发机制;
基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;
基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。
本申请实施例中,所述第一控制平面的ARP学习机制为自学习机制,所述第二控制平面的ARP学习机制为控制器下发机制。
本申请实施例中,所述基于所述三层交换设备上的ARP学习机制,对 ARP进行学习,包括:
当所述三层交换设备接收到ARP报文时,查询本地路由表里是否存在所述ARP报文对应的ARP地址;
如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为自学习;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,将所述ARP地址对应的表项标记为自学习并对所述ARP地址对应的表项进行更新时间的刷新;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,依据所述ARP报文对应的ARP地址对所述本地路由表里中对应的表项进行覆盖,并且将所述ARP地址对应的表项标记为自学习。
本申请实施例中,所述基于所述三层交换设备上的ARP学习机制,对ARP进行学习,包括:
当所述三层交换设备从控制器接收到ARP流表添加消息时,查询本地路由表里是否存在所述ARP流表添加消息对应的ARP地址;
如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为控制器下发;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,则保持所述本地路由表不变;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,如果所述本地路由表里对应的表项标记为自学习,则保持所述本地路由表不变,如果所述本地路由表里对应的表项标记为控制器下发,则依据所述ARP流表添加消息对应的ARP地址对所述本地路由表里中对应的表项进行覆盖。
本申请实施例中,所述第一虚拟接口为IP协议栈虚拟接口,所述第二虚拟接口为SDN协议栈虚拟接口,其中,
所述三层交换设备通过所述IP协议栈虚拟接口将SDN网络的路由发布至出口路由器;
所述三层交换设备通过所述SDN协议栈虚拟接口接收控制器下发的流表。
本申请实施例中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;
所述基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发,包括:
SDN协议栈模块接收所述控制器发送的ARP请求,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;
所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块将所述ARP应答发送给控制器,触发所述控制器根据所述ARP应答进行ARP学习。
本申请实施例中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;
所述基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发,包括:
针对南向流量的三层报文,当所述三层报文达到所述桥接口后没有查 到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;如果未查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块触发自学习机制的APR学习;
所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块对所述报文进行封装后,发送给所述控制器,触发所述控制器进行ARP学习;
所述SDN协议栈模块接收所述控制器下发的流表。
本申请实施例中,所述基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发,包括:
所述二层交换设备接收到服务器发送的ARP报文时,将所述ARP报文发送给所述三层交换设备进行ARP学习,以及将所述ARP报文发送给控制器进行ARP学习。
本申请另一实施例提供的实现双控制平面的方法,包括:
在SDN域配置好出口路由器的默认路由后,控制器主动触发所述默认路由的下一跳ARP学习;
报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习;所述控制器将流表下发给所述三层交换设备。
本申请实施例中,所述在SDN域配置好出口路由器的默认路由后,控制器主动触发所述默认路由的下一跳ARP学习,包括:
SDN域配置好出口路由器的默认路由后,控制器发送ARP请求给所述三层交换设备的SDN协议栈模块,其中,所述SDN协议栈模块在所述ARP 请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
控制器接收所述SDN协议栈模块发送的ARP应答,根据所述ARP应答进行ARP学习。
本申请实施例中,所述报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习,包括:
当三层报文达到所述桥接口后没有查到路由时,所述控制器接收SDN协议栈模块发送的封装后的报文,其中,所述封装后的报文通过以下方式生成:当三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;所述SDN协议栈模块对所述报文进行封装,得到封装后的报文;
所述控制器接收到所述封装后的报文后,进行ARP学习并更新流表;
所述控制器将更新的流表发送至三层交换设备中的SDN协议栈模块。
本申请实施例中,所述方法还包括:
所述控制器周期性地比较本地路由表和交换设备上的路由表,当所述本地路由表中的表项与交换设备上的路由表中的表项不一致时,将所述交 换机上的表项更新至本地。
本申请实施例提供的实现双控制平面的装置,包括:
第一配置单元,配置为在三层交换设备上设置第一控制平面和第二控制平面的ARP学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;
第二配置单元,配置为在二层交换设备上设置ARP报文转发机制;
第一处理单元,配置为基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;
第二处理单元,配置为基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。
本申请实施例中,所述第一控制平面的ARP学习机制为自学习机制,所述第二控制平面的ARP学习机制为控制器下发机制。
本申请实施例中,所述第一处理单元包括:
第一学习子单元,配置为当所述三层交换设备接收到ARP报文时,查询本地路由表里是否存在所述ARP报文对应的ARP地址;如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为自学习;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,将所述ARP地址对应的表项标记为自学习并对所述ARP地址对应的表项进行更新时间的刷新;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,依据所述ARP报文对应的ARP地址对所述本地路由表里中对应的表项 进行覆盖,并且将所述ARP地址对应的表项标记为自学习。
本申请实施例中,所述第一处理单元包括:
第二学习子单元,配置为当所述三层交换设备从控制器接收到ARP流表添加消息时,查询本地路由表里是否存在所述ARP流表添加消息对应的ARP地址;如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为控制器下发;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,则保持所述本地路由表不变;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,如果所述本地路由表里对应的表项标记为自学习,则保持所述本地路由表不变,如果所述本地路由表里对应的表项标记为控制器下发,则依据所述ARP流表添加消息对应的ARP地址对所述本地路由表里中对应的表项进行覆盖。
本申请实施例中,所述第一虚拟接口为IP协议栈虚拟接口,所述第二虚拟接口为SDN协议栈虚拟接口;其中,
所述三层交换设备通过所述IP协议栈虚拟接口将SDN网络的路由发布至出口路由器;
所述三层交换设备通过所述SDN协议栈虚拟接口接收控制器下发的流表。
本申请实施例中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;其中,
所述SDN协议栈模块接收所述控制器发送的ARP请求,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;
所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块将所述ARP应答发送给控制器,触发所述控制器根据所述ARP应答进行ARP学习。
本申请实施例中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;其中,
针对南向流量的三层报文,当所述三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;如果未查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块触发自学习机制的APR学习;
所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块对所述报文进行封装后,发送给所述控制器,触发所述控制器进行ARP学习;
所述SDN协议栈模块接收所述控制器下发的流表。
本申请实施例中,所述第二处理单元,具体用于当所述二层交换设备接收到服务器发送的ARP报文时,将所述ARP报文发送给所述三层交换设备进行ARP学习,以及将所述ARP报文发送给控制器进行ARP学习。
本申请另一实施例提供的实现双控制平面的装置,包括:
第一学习单元,配置为在SDN域配置好出口路由器的默认路由后,控 制器主动触发所述默认路由的下一跳ARP学习;
第二学习单元,配置为报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习;
流表下发单元,配置为将流表下发给所述三层交换设备。
本申请实施例中,所述第一学习单元,具体用于:SDN域配置好出口路由器的默认路由后,发送ARP请求给所述三层交换设备的SDN协议栈模块,其中,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;接收所述SDN协议栈模块发送的ARP应答,根据所述ARP应答进行ARP学习。
本申请实施例中,所述第二学习单元,具体用于:当三层报文达到所述桥接口后没有查到路由时,所述控制器接收SDN协议栈模块发送的封装后的报文,其中,所述封装后的报文通过以下方式生成:当三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;所述SDN协议栈模块对所述报文进行封装,得到封装后的报文;接收到所述封装后的报文后,进行ARP学习并更新流表。
本申请实施例中,所述装置还包括:第三学习单元,配置为周期性地比较本地路由表和交换设备上的路由表,当所述本地路由表中的表项与交换设备上的路由表中的表项不一致时,将所述交换机上的表项更新至本地。
本申请实施例还提供一种计算机存储介质,该计算机存储介质存储有计算机程序,该计算机程序配置为执行上述实现双控制平面的方法。
本申请实施例的技术方案中,在三层交换设备上设置第一控制平面和第二控制平面的ARP学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;在二层交换设备上设置ARP报文转发机制;基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。采用本申请实施例的技术方案,利用SDN网络带来的便利的同时还增加了整个网络的稳定性,当控制器发生故障或者掉线时整个网络还能够依据传统控制平面保持路由的顺利进行,在数据中心领域中有极高的实用性。
附图说明
附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。
图1为本申请实施例的实现双控制平面的方法的流程示意图一;
图2为本申请实施例的实现双控制平面的方法的流程示意图二;
图3为本申请实施例的实现双控制平面的方法的流程示意图三;
图4为本申请实施例的网络组网的拓扑图;
图5为本申请实施例的网络设备的结构示意图一;
图6为本申请实施例的网络设备的结构示意图二;
图7为本申请实施例的桥接口的工作流程图;
图8为本申请实施例的控制器触发学习下一跳ARP的流程图;
图9为本申请实施例的流量触发控制器学习ARP的流程图;
图10为本申请实施例的实现双控制平面的装置的结构组成示意图一;
图11为本申请实施例的实现双控制平面的装置的结构组成示意图二。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
本申请实施例给出一种SDN控制平面和传统控制平面混跑的方案,即交换设备即可以运行在传统控制平面,也可以运行在SDN控制平面。由于SDN控制平面和传统控制平面共存,所以要解决SDN控制平面和传统控制平面双大脑听谁指挥的问题,即表项下发优先级的问题;由于SDN控制平面和传统控制平面共存,数据中心内部网络与外部路由器之间的接口的流量有的需要走传统控制平面有的要走SDN控制平面,如何处理控制平面之间的流量也是本申请实施例解决的问题。传统控制平面需要跑各种路由协议学习动态路由,以及学习下一跳路由;SDN控制平面需要报文能触发控制器学习精确流表。本申请实施例将从双控制平面表项优先级控制、SDN网络与传统网络桥接、南向流量和北向流量的处理以及接入设备ARP处理四个方面系统阐述本申请实施例的技术方案,以下为本申请实施例的具体实施细节。
图1为本申请实施例的实现双控制平面的方法的流程示意图一,本示例中的实现双控制平面的方法应用于交换设备侧,如图1所示,所述方法包括以下步骤:
步骤101:在三层交换设备上设置第一控制平面和第二控制平面的ARP 学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级。
预先,对三层交换设备进行三层虚拟可扩展局域网(VXLAN,Virtual eXtensible LAN)的配置。
如图4所示的网络拓扑中,数据中心内部包括多组网络设备结构,例如,A/B设备、C/D设备、ServerA/ServerB;E/F设备、G/H设备、ServerC/ServerD。其中,A、B、E、F设备为三层交换设备,而C、D、G、H为二层交换设备。本申请实施例以A/B设备、C/D设备、ServerA/ServerB,为例进行解释说明,E/F设备、G/H设备、ServerC/ServerD同理。
如图4所示的网络拓扑中,A/B设备与C/D设备之间走VXLAN隧道,A/B设备在传统控制平面配置L3VXLAN相关配置,C/D设备在传统控制平面配置L2VXLAN相关配置。
如图4所示的网络拓扑中,A/B设备与控制器相连,此外,C/D设备也与控制器相连。
本申请实施例中,所述第一控制平面的ARP学习机制为自学习机制,所述第二控制平面的ARP学习机制为控制器下发机制。
如图4所示的网络拓扑中,对于网络设备A/B的VXLAN ARP的学习同时支持传统自学习以及控制器下发两个控制面,且自学习的优先级始终最高。
步骤102:在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应。
步骤103:在二层交换设备上设置ARP报文转发机制。
步骤104:基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之 间流量进行转发。
本申请实施例中,所述基于所述三层交换设备上的ARP学习机制,对ARP进行学习,包括:
当所述三层交换设备接收到ARP报文时,查询本地路由表里是否存在所述ARP报文对应的ARP地址;
如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为自学习;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,将所述ARP地址对应的表项标记为自学习并对所述ARP地址对应的表项进行更新时间的刷新;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,依据所述ARP报文对应的ARP地址对所述本地路由表里中对应的表项进行覆盖,并且将所述ARP地址对应的表项标记为自学习。
本申请实施例中,所述基于所述三层交换设备上的ARP学习机制,对ARP进行学习,包括:
当所述三层交换设备从控制器接收到ARP流表添加消息时,查询本地路由表里是否存在所述ARP流表添加消息对应的ARP地址;
如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为控制器下发;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,则保持所述本地路由表不变;
如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,如果所述本地路由表里对应的表项标记为自学习,则保持所述本地路由表不变,如果所述本地路由 表里对应的表项标记为控制器下发,则依据所述ARP流表添加消息对应的ARP地址对所述本地路由表里中对应的表项进行覆盖。
上述方案中,提出了双控制平面表项优先级的控制,具体地:
如图4所示的网络拓扑中,传统自学习(对应自学习机制)具体包括:当网络设备A/B从业务端口收到VXLAN ARP报文时,会按照传统自学习流程对该ARP报文进行动态学习,也即自学习。1)若本地路由表里没有该ARP地址,则直接添加表项,FLAG标记为动态学习或自学习;2)若本地已存在该ARP地址,且MAC和出端口信息一致,FLAG标记为动态学习修改ARP的状态为动态学习或自学习,3)如果MAC和出端口不一致覆盖原有表项,FLAG标记为动态学习或自学习。
如图4所示的网络拓扑中,控制器下发ARP具体包括:当网络设备A/B从控制器收到ARP流表添加消息时,1)若本地路由表中没有该ARP地址,则直接添加表项,FLAG标记为控制器下发;2)若本地已存在该ARP地址,且MAC和出端口信息一致,则不做任何处理。3)若本地已存在该ARP地址,但MAC和出端口信息不一致,若原有的FLAG标记为动态学习的,不做任何处理,若原有的FLAG标记是控制器下发的,则覆盖原有的表项。
传统控制平面学习到的VXLAN ARP的优先级高,控制器对本身保存的ARP和交换机上的ARP表周期进行对比来保障两者之间的同步;若控制器有而交换机上没有则下发给交换机,如果两者都有,但是出口不一致,则控制器取回交换机上的覆盖本地的。
通过上述方法当控制器异常时流量会按照传统控制平面学习的表项转发,当传统平面没有学习到相关表项时流量会按照控制器下发的流表转发流量,当虚拟机迁移场景发生时,控制器上的表项与传统控制平面学习到的表项数据不同步时,控制器会取回传统平面学到的表项覆盖本地实现同 步。
基于图1所示的方法,本申请实施例的方案还可以包括:
所述第一虚拟接口为IP协议栈虚拟接口,所述第二虚拟接口为SDN协议栈虚拟接口;其中,
所述三层交换设备通过所述IP协议栈虚拟接口将SDN网络的路由发布至出口路由器;
所述三层交换设备通过所述SDN协议栈虚拟接口接收控制器下发的流表。
在一实施方式中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;SDN协议栈模块接收所述控制器发送的ARP请求,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;
所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块将所述ARP应答发送给控制器,触发所述控制器根据所述ARP应答进行ARP学习。
在另一实施方式中,针对南向流量的三层报文,当所述三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;如果未查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块触发自学习机制的APR学习;
所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块对所述报文进行封装后,发送给所述控制器,触发所述控制器进行ARP学习;
所述SDN协议栈模块接收所述控制器下发的流表。
上述方案中,提出了内部网络与外部网络的桥接、南向流量和北向流量的处理,具体地:
1)内部网络与外部网络的桥接
由于采用传统控制平面和SDN控制平面共存的模式,这就对于内部网络和外部网络桥接的端口的报文收发提出了挑战,因为需要采用一种合理的方式让报文上送到对的协议栈(传统IP协议栈与SDN协议栈)。
对于SDN域和传统域之间的流量的桥接采用桥接口的方式,该接口即可以发挥传统控制平面现有路由协议的特点将内部SDN网络的路由发布到上行路由器(出口路由器)从而将外部发往数据中心(DC,Data Center)内的流量引下来,同时又能响应控制器的指令承担由SDN内部发往外部流量的流表出口。桥接口是普通物理口和SDN端口概念的延伸,普通物理口对于接受到的协议报文只能上送到传统IPSTACK进程,SDN端口对于接收到协议报文只能上送到SDN相关协议进程。对于传统控制平面和SDN控制平面共存的场景,这里提出桥接口的概念,即通过这个接口即能发布传统路由协议,又能受控制器的控制作为SDN域到域外的接口。
由于交换机的两个控制平面(传统协议栈控制平面和SDN控制平面)属于不同的进程,对于桥接口会绑定两个虚拟接口,分别称为传统协议栈虚拟接口以及SDN控制平面虚拟接口,我们在下文中分别称为IPSTACK_VP以及SDN_VP。这两个虚拟接口与桥接口的物理口绑定,绑 定关系在用户配置桥接端口后下发。交换机底层不需要保存虚拟出口路由,只需要保存实际转发使用的路由,但要实现传统IP协议栈进程与SDN协议进程之间的报文上送通道,即要根据报文下发(来自传统IP协议栈进程与SDN协议进程)信息中的虚拟出口标记(IPSTACK_VP或者SDN_VP),决定将报文上送给相应的进程。此外,对于南向流量的转发控制器会给传统控制平面IP协议栈下发一个网段路由出口指向IPSTACK_VP,该网段是虚拟机所在网络的网段。这样当南向数据报文没有匹配到精确的流表时,会走该网段路由上送到控制器,控制器会下发精确流表的表项。桥接口的实现流程可参见附图7所述。
通过引入桥接口的方案,采用虚拟接口的方式在不改动现有交换机传统控制平面数据转发以及协议报文上送流程的情况下,实现传统平面和SDN平面数据报文和协议报文互不干扰。
2)南向流量和北向流量的处理
对于北向流量,SDN域配置默认出口路由后,控制器会主动触发默认路由下一跳ARP学习。控制器发送ARP请求给交换机的SDN协议栈,SDN协议栈会将此报文带上SDN_VP的出口标记,然后这个报文会送个IP协议栈,IP协议栈负责在传统的控制平面学到ARP后,再给交换机SDN协议栈发送ARP回复报文并打上IPSTACK_VP的标记,最后SDN控制器收到ARP应答后,学习到ARP,下发默认路由的相关流表。这里实现两个协议栈的交换采用收发包模块换回的方式实现,即两个协议栈不直接交换信息通过收发包模块中转,这样的好处是不需要改动现有交换机协议栈收发包的处理模式。
对于南向流量最关键的处理是报文到达桥接口后没有查到路由要触发控制学习主机ARP,然后下发给交换机下发流表。交换机在收到三层报文后如果没有路由会走网段路由上送给传统IP协议栈,IP协议栈如果能匹配 IPSTACK_VP,就会打上IPSTACK_VP的标记,然后SDN协议栈就会收到这个报文,SDN协议栈负责封SDN的协议报文(例如OPEN_FLOW)后送SDN控制器。SDN控制器收到后,触发ARP学习,下发内网主机路由。
通过上述方法由南到北的流量在没有下一跳的情况下控制器可以在传统控制平面上学到下一跳的出口信息然后下发外网方向路由;由北向南进入数据中心内部的流量在没有匹配到精确流表的情况下数据报文通过上传到传统控制平面的协议栈然后再桥接到SDN相关协议栈并触发控制器下发精确流表。
步骤105:基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。
本申请实施例中,所述基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发,包括:
所述二层交换设备接收到服务器发送的ARP报文时,将所述ARP报文发送给所述三层交换设备进行ARP学习,以及将所述ARP报文发送给控制器进行ARP学习。
图2为本申请实施例的实现双控制平面的方法的流程示意图二,本示例中的实现双控制平面的方法应用于控制器侧,如图2所示,所述方法包括以下步骤:
步骤201:在SDN域配置好出口路由器的默认路由后,控制器主动触发所述默认路由的下一跳ARP学习。
具体地,SDN域配置好出口路由器的默认路由后,控制器发送ARP请求给所述三层交换设备的SDN协议栈模块,其中,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;所述IP协议栈模块对ARP 进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;控制器接收所述SDN协议栈模块发送的ARP应答,根据所述ARP应答进行ARP学习。
上述方案中,对于北向流量,SDN域配置默认出口路由后,控制器会主动触发默认路由下一跳ARP学习。控制器发送ARP请求给交换机的SDN协议栈,SDN协议栈会将此报文带上SDN_VP的出口标记,然后这个报文会送个IP协议栈,IP协议栈负责在传统的控制平面学到ARP后,再给交换机SDN协议栈发送ARP回复报文并打上IPSTACK_VP的标记,最后SDN控制器收到ARP应答后,学习到ARP,下发默认路由的相关流表。这里实现两个协议栈的交换采用收发包模块换回的方式实现,即两个协议栈不直接交换信息通过收发包模块中转,这样的好处是不需要改动现有交换机协议栈收发包的处理模式。
步骤202:报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习;所述控制器将流表下发给所述三层交换设备。
具体地,当三层报文达到所述桥接口后没有查到路由时,所述控制器接收SDN协议栈模块发送的封装后的报文,其中,所述封装后的报文通过以下方式生成:当三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;所述SDN协议栈模块对所述报文进 行封装,得到封装后的报文;所述控制器接收到所述封装后的报文后,进行ARP学习并更新流表;所述控制器将更新的流表发送至三层交换设备中的SDN协议栈模块。
上述方案中,对于南向流量最关键的处理是报文到达桥接口后没有查到路由要触发控制学习主机ARP,然后下发给交换机下发流表。交换机在收到三层报文后如果没有路由会走网段路由上送给传统IP协议栈,IP协议栈如果能匹配IPSTACK_VP,就会打上IPSTACK_VP的标记,然后SDN协议栈就会收到这个报文,SDN协议栈负责封SDN的协议报文(例如OPEN_FLOW)后送SDN控制器。SDN控制器收到后,触发ARP学习,下发内网主机路由。
本申请实施例中,由南到北的流量在没有下一跳的情况下控制器可以在传统控制平面上学到下一跳的出口信息然后下发外网方向路由;由北向南进入数据中心内部的流量在没有匹配到精确流表的情况下数据报文通过上传到传统控制平面的协议栈然后再桥接到SDN相关协议栈并触发控制器下发精确流表。
本申请实施例中,所述控制器周期性地比较本地路由表和交换设备上的路由表,当所述本地路由表中的表项与交换设备上的路由表中的表项不一致时,将所述交换机上的表项更新至本地。
图3为本申请实施例的实现双控制平面的方法的流程示意图三,本示例中的实现双控制平面的方法应用于交换设备侧,如图3所示,所述方法包括以下步骤:
步骤301:二层交换设备从业务接口接收ARP报文。
本申请实施例中,首先对所述二层交换设备进行二层VXLAN的配置;将所述二层交换设备连接至控制器,具体可参照图4所示的网络拓扑图。
步骤302:所述二层交换设备将所述ARP报文发送给三层交换设备时, 同时将所述ARP报文发送给控制器。
本申请实施例中,二层交换设备(即与SERVER连接的网络设备)对下行口(与其他网络设备连接)和上行口(与SERVER连接的口)做不同的区分。对上行口,对ARP报文需要支持在普通传统控制平面转发(本地VLAN内的LOCAL转发以及进入VXLAN隧道终端(VTEP,VXLAN Tunnel End Point)隧道转发)的同时,还要对该ARP报文复制一份给控制器,对下行口,对ARP报文是遵循普通传统控制面的转发,无需复制和上送控制器。
通过上述方案,接入网络设备将SERVER发送的ARP报文给上游网络设备使上行网络设备在传统平面内学习ARP的同时还上送到控制器,这样在控制器和传统平面都能学习到ARP,从而实现双备份。
下面结合具体场景对本申请实施例的方案做进一步详细描述,以下以OPENFLOW协议类型的控制器为例进行说明。
图4为本申请的技术背景,服务器A、B、C、D分别单网卡接入网络设备C、D、G、H,与网络设备C、D、G、H的连接口为SDN实例口。网络设备C与网络设备D做堆叠配置,网络设备C负载分担连接网络设备A和网络设备B,网络设备D负载分担连接网络设备A和网络设备B。传统控制平面上配置网络设备C、D与网络设备A、B之间的VXLAN隧道,C/D做为L2VTEP接入,A和B做L3VXLAN网关。受控制器控制的端口分别是网络设备C以及网络设备D的SDN实例口以及网络设备A和网络设备B的桥接口。桥接口上启动路由协议,控制器可以将内部SDN网络的路由发布到外网路由器(出口路由器)上。由北向南的流量在网络设备C和D上走VXLAN的L2接入,报文上隧道后进入网络设备A/B,在此设备上解封装后查路由发送给外部路由器。由南到北的流量在网络设备A/B上查路由走L3VXLAN封装到隧道,到达网络C/D后VXLAN解封装后走L2 转发到ServerA/ServerB。
图5为本申请所述的网络设备的主要部件图,主要包括数据配置模块、协议栈模块、收发包模块、转发控制模块。其中,协议栈模块分为SDN相关协议栈(例如OPENFLOW协议栈)和传统控制平面协议栈(例如IPSTACK),SDN相关协议栈负责将收到的报文封装成PACKET_IN报文发送给控制器或者解析控制器发送给交换机的协议报文,然后给网络设备下发控制器的指令;传统控制平面协议栈负责IP协议栈的统一处理。这里由于采用双平面控制,桥接口即有传统业务流量又有SDN流量,所以传统协议栈和SDN相关协议栈之间存在一些交互。交互是借助传统协议栈虚接口以及SDN控制平面虚拟接口即IPSTACK_VP以及SDN_VP实现的。桥接口的物理端口和这两个虚拟接口的绑定关系在用户配置混合端口后下发的。配置模块负责提供用户层配置接口,并且将该配置下发给转发控制模块,转发控制器模块负责记录该信息,并且向交换芯片下发SDN域的转发动作,本申请的系统框图如图6所示。
实施例一:网关设备双控制平面北向流量转发处理
如所述附图4所示,网络设备C/D为二层接入设备,网络设备A/B为三层网关设备。SERVER在向外部网络发送流量之前,由于内部IP(DIP)不是本网段的IP,所以要请求网关的目的MAC信息。
对于北向流量(从数据中心内部网络到外部网络方向),SERVER发出的报文的目的MAC为三层网关的MAC,即网络设备A/B的MAC,目的IP为外网IP。流量在接入网络设备上(即如附图4所示的网络设备C/D)查找二层精确流表(MAC表),如果查到走VXLAN隧道,网络设备C/D将报文封装VXLAN报文头然后传递给网络设备A/B,报文在网络设备A/B上查找控制器下发的默认流表,出口指向外部网络。
在网络设备A/B上下发的默认流表由SDN域控制器下发,配置默认路 由后,控制器会主动触发下一跳ARP学习,整个学习的过程是从SDN控制平面向传统控制平面获取ARP。控制器学习默认路由下一跳ARP学习的过程如附图8所示,这个过程分为六步,分别对应图中的1、2、3、4、5、6:
(1)SDN域配置默认出口路由,控制器下发ARP请求报文给SDN相关协议栈。
(2)SDN相关协议栈将ARP请求报文(带SDN_VP出口标记)下发给交换机收发包模块。
(3)交换机收发包模块收到SDN协议栈下发的报文,如果带SDN_VP出口标记,就会根据映射关系将该虚拟端口转成IPSTACK_VP,然后上送传统IP协议栈平面。
(4)传统IP协议栈收到ARP请求,会回复ARP应答报文。传统IP协议栈下发ARP应答报文(带IPSTACK_VP出口标记)给收发包模块。
(5)收发包模块收到传统IP协议栈下发的报文包,如果带IPSTACK_VP出口标记,就会根据映射关系将改虚拟端口转成SDN_VP上送SDN协议栈,由SDN协议栈封装PACKET_IN头部后送SDN控制器。
(6)SDN控制器收到ARP应答后,学习到ARP,下发内网主机路由。
控制器下发了外部路由后,当SERVER发出的流量到达附图4所示的网络设备C/D后,在C/D设备封装VXLAN头进入VXLAN隧道指向所示网络设备A/B,到达网络设备A/B后进行VXLAN解封装,然后查询控制器下发的默认路由进入外网。
实施例二:网关设备双控制器平面南向流量处理
传统面通过桥接口上开启的路由协议,将内网网段路由发布给连接的外网路由器。将发往SDN内网的流量引下来。
流量到达如附图所示的网络设备A/B时,如果能查到精确表项(主机 路由),则直接按照该表项的出口以及封装信息进入VXLAN隧道,将流量发给所述网络设备C/D,网络设备C/D将VXLAN报文解封装后,发给SERVER.
对于没有匹配主机路由的流量,网络设备A/B需要将流量上送到传统IP协议栈平面,然后通过传统协议栈平面通知触发SDN协议平面触发控制器学习SDN域内的主机流表,如附图9过程如下:
在网络设备A/B的桥接口上收到的数据包,转发模块如果查硬件路由表发现无主机路由,查询虚机所属网段的网段路由上送CPU。
(1)收发包模块收到CPU发送的数据报文后,将该数据报文上送到传统控制器平面的IP协议栈。
(2)在传统控制平面的IP协议栈,用报文的DIP查询路由,如果匹配到IPSTACK_VP出口路由,则传统控制平面的IP协议栈进程下发数据包(带IPSTACK_VP出口标记)给收发包模块。否则传统控制平面的IP协议栈进程触发传统面的ARP学习。
(3)收发包模块收到传统控制平面的IP协议栈进程下发的数据包,如果带IPSTACK_VP出口标记,则收发包模块根据虚拟端口的映射关系将其转换成相应的SDN_VP然后发给SDN协议栈进程,
(4)然后由其封装pkt in头部后送SDN控制器。
(5)SDN控制器收到后,触发ARP学习,发送给SDN协议栈。
(6)SDN相关协议栈将表项下发给转发模块。
上述过程完成后,相同的报文由外网发往内网时,报文进入网络设备A/B后,就会查找精确表项(主机路由)封装VXLAN报文头进入隧道,然后经由所述网络设备C/D解封装发给SERVER。
实施例三:接入网络设备ARP的学习处理
如图4所示,在网络设备C/D的传统的控制平面上配置L2VXLAN隧 道并且配置VLAN与VNI的映射关系。所述网络设备C/D为二层VXLAN接入设备,所述网络设备A/B为三层VXLAN网关设备。
当SERVER要向外部网络发送流量前,因为DIP不是本网段所以需要发送ARP请求解决网关MAC。当网络设备C/D接收到Server发送过来的ARP请求时,对ARP报文封装VXLAN报文进入VTEP隧道,从而将这个封装了VXLAN报文头的ARP报文上送到了网络设备A/B,然后网络设备A/B在传统的控制平面学习这个VXLAN报文的ARP。
网络设备C/D在将该ARP报文引入VTEP隧道的同时还要将这个ARP报文复制一份上送到SDN相关协议栈进程,然后由该进程将报文按照openflow协议封装并上送给控制器,这样控制器就学到了这个ARP。
通过上述方法,接入网络设备将SERVER发送的ARP报文给上游网络设备使上行网络设备在传统平面内学习ARP的同时还上送到控制器,这样在控制器和传统平面都能学习到ARP,从而实现双备份,此外当虚机迁移时控制器也能在第一时间感知到虚机的变化。
对与下行口,即由网络设备A/B发给网络设备C/D的ARP报文遵循普通传统控制面的转发,无需复制和上送控制器。
实施例四:优先级控制
网络设备A/B上VXLAN的ARP的学习同时支持传统自学习以及控制器下发两个控制面,且自学习的优先级始终最高。如附图一所示,当网络设备A/B从业务端口收到ARP报文时,会按照传统自学习流程对该ARP进行动态学习,具体流程如下:
a)若本地路由表里没有该ARP地址,则直接添加表项,FLAG标记是动态学习。
b)若本地已存在该ARP地址,且MAC和出端口信息一致,则:
i若原有FLAG标记是动态学习的,则进行timeout的刷新;
ii若原有FLAG标记为控制器下发的,则将表项的FLAG修改为动态学习。
c)若本地已存在该ARP地址,但MAC或者出端口不一致,则覆盖原有表项,且将FLAG标记设置为动态学习。
当交换机从控制收到ARP流表添加消息时,也需要进行ARP的学习,具体过程如下:
a)若本地路由表中没有该ARP地址,则直接添加表项,FLAG标记为控制器下发;
b)若本地已存在该ARP地址,且MAC和出端口信息一致,则不做任何处理。
c)若本地已存在该ARP地址,但是MAC和出端口信息不一致,则
i若原有的FLAG标记为动态学习的,不做任何处理;
ii若原有的FLAG标记是控制器下发的,则覆盖原有的表项。
控制器对本身保存的ARP和交换机上的ARP表周期进行对比来保障两者之间的同步;若控制器有而交换机上没有则下发给交换机,如果两者都有,但是出口不一致,则控制器取回交换机上的覆盖本地的。
另外,网络设备C/D上VXLAN的MAC只受传统平面控制,通过自学习得到,并不受控制器的控制。
图10为本申请实施例的实现双控制平面的装置的结构组成示意图一,如图10所示,所述装置包括:
第一配置单元1001,配置为在三层交换设备上设置第一控制平面和第二控制平面的ARP学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;
第二配置单元1002,配置为在二层交换设备上设置ARP报文转发机制;
第一处理单元1003,配置为基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;
第二处理单元1004,配置为基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。
本申请实施例中,所述第一控制平面的ARP学习机制为自学习机制,所述第二控制平面的ARP学习机制为控制器下发机制。
本申请实施例中,所述第一处理单元1003包括:
第一学习子单元,配置为当所述三层交换设备接收到ARP报文时,查询本地路由表里是否存在所述ARP报文对应的ARP地址;如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为自学习;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,将所述ARP地址对应的表项标记为自学习并对所述ARP地址对应的表项进行更新时间的刷新;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,依据所述ARP报文对应的ARP地址对所述本地路由表里中对应的表项进行覆盖,并且将所述ARP地址对应的表项标记为自学习。
本申请实施例中,所述第一处理单元1003包括:
第二学习子单元,配置为当所述三层交换设备从控制器接收到ARP流表添加消息时,查询本地路由表里是否存在所述ARP流表添加消息对应的ARP地址;如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为控制器下发;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对 应的MAC地址与出端口对应的MAC地址一致时,则保持所述本地路由表不变;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,如果所述本地路由表里对应的表项标记为自学习,则保持所述本地路由表不变,如果所述本地路由表里对应的表项标记为控制器下发,则依据所述ARP流表添加消息对应的ARP地址对所述本地路由表里中对应的表项进行覆盖。
本申请实施例中,所述第一虚拟接口为IP协议栈虚拟接口,所述第二虚拟接口为SDN协议栈虚拟接口;其中,
所述三层交换设备通过所述IP协议栈虚拟接口将SDN网络的路由发布至出口路由器;
所述三层交换设备通过所述SDN协议栈虚拟接口接收控制器下发的流表。
本申请实施例中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;其中,
所述SDN协议栈模块接收所述控制器发送的ARP请求,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;
所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块将所述ARP应答发送给控制器,触发所述控制器根据所述ARP应答进行ARP学习。
本申请实施例中,所述三层交换设备包括:SDN协议栈模块、IP协议 栈模块、收发包模块;其中,
针对南向流量的三层报文,当所述三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;如果未查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块触发自学习机制的APR学习;
所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
所述SDN协议栈模块对所述报文进行封装后,发送给所述控制器,触发所述控制器进行ARP学习;
所述SDN协议栈模块接收所述控制器下发的流表。
本申请实施例中,所述第二处理单元1004,具体用于当所述二层交换设备接收到服务器发送的ARP报文时,将所述ARP报文发送给所述三层交换设备进行ARP学习,以及将所述ARP报文发送给控制器进行ARP学习。
在实际应用中,所述实现双控制平面的装置中的各个单元所实现的功能,均可由位于实现双控制平面的装置中的中央处理器(CPU,Central Processing Unit)、或微处理器(MPU,Micro Processor Unit)、或数字信号处理器(DSP,Digital Signal Processor)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现。
图11为本申请实施例的实现双控制平面的装置的结构组成示意图二,如图11所示,所述装置包括:
第一学习单元1101,配置为在SDN域配置好出口路由器的默认路由后,控制器主动触发所述默认路由的下一跳ARP学习;
第二学习单元1102,配置为报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习;
流表下发单元1103,配置为将流表下发给所述三层交换设备。
本申请实施例中,所述第一学习单元1101,具体用于:SDN域配置好出口路由器的默认路由后,发送ARP请求给所述三层交换设备的SDN协议栈模块,其中,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;接收所述SDN协议栈模块发送的ARP应答,根据所述ARP应答进行ARP学习。
本申请实施例中,所述第二学习单元1102,具体用于:当三层报文达到所述桥接口后没有查到路由时,所述控制器接收SDN协议栈模块发送的封装后的报文,其中,所述封装后的报文通过以下方式生成:当三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;所述SDN协议栈模块对所述报文进行封装,得到封装后的报文;接收到所述封装后的报文后,进行ARP学习并更新流表。
本申请实施例中,所述装置还包括第二学习单元,配置为周期性地比 较本地路由表和交换设备上的路由表,当所述本地路由表中的表项与交换设备上的路由表中的表项不一致时,将所述交换机上的表项更新至本地。
在实际应用中,所述实现双控制平面的装置中的各个单元所实现的功能,均可由位于实现双控制平面的装置中的CPU、或MPU、或DSP、或FPGA等实现。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现 在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
相应地,本发明实施例还提供一种计算机存储介质,其中存储有计算机程序,该计算机程序配置为执行本发明实施例的实现双控制平面的方法。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
工业实用性
本申请实施例的技术方案,在三层交换设备上设置第一控制平面和第二控制平面的ARP学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;在二层交换设备上设置ARP报文转发机制;基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。采用本申请实施例的技术方案,利用SDN网络带来的便利的同时还增加了整个网络的稳定性,当控制器发生故障或者掉线时整个网络还能够依据传统控制平面保持路由的顺利进行,在数据中心领域中有极高的实用性。

Claims (25)

  1. 一种实现双控制平面的方法,所述方法包括:
    在三层交换设备上设置第一控制平面和第二控制平面的地址解析协议ARP学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;
    在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;
    在二层交换设备上设置ARP报文转发机制;
    基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;
    基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。
  2. 根据权利要求1所述的方法,其中,所述第一控制平面的ARP学习机制为自学习机制,所述第二控制平面的ARP学习机制为控制器下发机制。
  3. 根据权利要求2所述的方法,其中,所述基于所述三层交换设备上的ARP学习机制,对ARP进行学习,包括:
    当所述三层交换设备接收到ARP报文时,查询本地路由表里是否存在所述ARP报文对应的ARP地址;
    如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为自学习;
    如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,将所述ARP地址对应的表项标记为自学习并对所述ARP地址对应的表项进行更新时间的刷新;
    如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,依据所述ARP报文对应的ARP地址对所述本地路由表里中对应的表项进行覆盖,并且将所述ARP地址对应的表项标记为自学习。
  4. 根据权利要求2所述的方法,其中,所述基于所述三层交换设备上的ARP学习机制,对ARP进行学习,包括:
    当所述三层交换设备从控制器接收到ARP流表添加消息时,查询本地路由表里是否存在所述ARP流表添加消息对应的ARP地址;
    如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为控制器下发;
    如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,则保持所述本地路由表不变;
    如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,如果所述本地路由表里对应的表项标记为自学习,则保持所述本地路由表不变,如果所述本地路由表里对应的表项标记为控制器下发,则依据所述ARP流表添加消息对应的ARP地址对所述本地路由表里中对应的表项进行覆盖。
  5. 根据权利要求1所述的方法,其中,所述第一虚拟接口为IP协议栈虚拟接口,所述第二虚拟接口为软件定义网络SDN协议栈虚拟接口,其中,
    所述三层交换设备通过所述IP协议栈虚拟接口将SDN网络的路由发布至出口路由器;
    所述三层交换设备通过所述SDN协议栈虚拟接口接收控制器下发的 流表。
  6. 根据权利要求5所述的方法,其中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;
    所述基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发,包括:
    SDN协议栈模块接收所述控制器发送的ARP请求,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;
    所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
    所述SDN协议栈模块将所述ARP应答发送给控制器,触发所述控制器根据所述ARP应答进行ARP学习。
  7. 根据权利要求5所述的方法,其中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;
    所述基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发,包括:
    针对南向流量的三层报文,当所述三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;如果未查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块触发自学习机制的APR学习;
    所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
    所述SDN协议栈模块对所述报文进行封装后,发送给所述控制器,触发所述控制器进行ARP学习;
    所述SDN协议栈模块接收所述控制器下发的流表。
  8. 根据权利要求1所述的方法,其中,所述基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发,包括:
    所述二层交换设备接收到服务器发送的ARP报文时,将所述ARP报文发送给所述三层交换设备进行ARP学习,以及将所述ARP报文发送给控制器进行ARP学习。
  9. 一种实现双控制平面的方法,所述方法包括:
    在SDN域配置好出口路由器的默认路由后,控制器主动触发所述默认路由的下一跳ARP学习;
    报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习;所述控制器将流表下发给所述三层交换设备。
  10. 根据权利要求9所述的方法,其中,所述在SDN域配置好出口路由器的默认路由后,控制器主动触发所述默认路由的下一跳ARP学习,包括:
    SDN域配置好出口路由器的默认路由后,控制器发送ARP请求给所述三层交换设备的SDN协议栈模块,其中,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发 包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
    控制器接收所述SDN协议栈模块发送的ARP应答,根据所述ARP应答进行ARP学习。
  11. 根据权利要求9所述的方法,其中,所述报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习,包括:
    当三层报文达到所述桥接口后没有查到路由时,所述控制器接收SDN协议栈模块发送的封装后的报文,其中,所述封装后的报文通过以下方式生成:当三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;所述SDN协议栈模块对所述报文进行封装,得到封装后的报文;
    所述控制器接收到所述封装后的报文后,进行ARP学习并更新流表;
    所述控制器将更新的流表发送至三层交换设备中的SDN协议栈模块。
  12. 根据权利要求9所述的方法,其中,所述方法还包括:
    所述控制器周期性地比较本地路由表和交换设备上的路由表,当所述本地路由表中的表项与交换设备上的路由表中的表项不一致时,将所述交换机上的表项更新至本地。
  13. 一种实现双控制平面的装置,所述装置包括:
    第一配置单元,配置为在三层交换设备上设置第一控制平面和第二控制平面的ARP学习机制,其中,所述第一控制平面的优先级高于所述第二控制平面的优先级;在三层交换设备上设置桥接口,所述桥接口绑定第一虚拟接口和第二虚拟接口,其中,所述第一虚拟接口与所述第一控制平面相对应,所述第二虚拟接口与所述第二控制平面相对应;
    第二配置单元,配置为在二层交换设备上设置ARP报文转发机制;
    第一处理单元,配置为基于所述三层交换设备上的ARP学习机制,对ARP进行学习;基于所述三层交换设备上的桥接口对第一控制平面与第二控制平面之间流量进行转发;
    第二处理单元,配置为基于所述二层交换设备上ARP报文转发机制,对ARP报文进行转发。
  14. 根据权利要求13所述的装置,其中,所述第一控制平面的ARP学习机制为自学习机制,所述第二控制平面的ARP学习机制为控制器下发机制。
  15. 根据权利要求14所述的装置,其中,所述第一处理单元包括:
    第一学习子单元,配置为当所述三层交换设备接收到ARP报文时,查询本地路由表里是否存在所述ARP报文对应的ARP地址;如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为自学习;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,将所述ARP地址对应的表项标记为自学习并对所述ARP地址对应的表项进行更新时间的刷新;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,依据所述ARP报文对应的ARP地址对所述本地路由表里中对应的表项进行覆盖,并且将所述ARP地址对应的表项标 记为自学习。
  16. 根据权利要求14所述的装置,其中,所述第一处理单元包括:
    第二学习子单元,配置为当所述三层交换设备从控制器接收到ARP流表添加消息时,查询本地路由表里是否存在所述ARP流表添加消息对应的ARP地址;如果所述本地路由表里不存在所述ARP地址,则将所述ARP地址添加至所述本地路由表里,并且将所述ARP地址对应的表项标记为控制器下发;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址一致时,则保持所述本地路由表不变;如果所述本地路由表里存在所述ARP地址,且所述ARP地址对应的MAC地址与出端口对应的MAC地址不一致时,如果所述本地路由表里对应的表项标记为自学习,则保持所述本地路由表不变,如果所述本地路由表里对应的表项标记为控制器下发,则依据所述ARP流表添加消息对应的ARP地址对所述本地路由表里中对应的表项进行覆盖。
  17. 根据权利要求13所述的装置,其中,所述第一虚拟接口为IP协议栈虚拟接口,所述第二虚拟接口为SDN协议栈虚拟接口;其中,
    所述三层交换设备通过所述IP协议栈虚拟接口将SDN网络的路由发布至出口路由器;
    所述三层交换设备通过所述SDN协议栈虚拟接口接收控制器下发的流表。
  18. 根据权利要求17所述的装置,其中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;其中,
    所述SDN协议栈模块接收所述控制器发送的ARP请求,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标 记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;
    所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
    所述SDN协议栈模块将所述ARP应答发送给控制器,触发所述控制器根据所述ARP应答进行ARP学习。
  19. 根据权利要求17所述的装置,其中,所述三层交换设备包括:SDN协议栈模块、IP协议栈模块、收发包模块;其中,
    针对南向流量的三层报文,当所述三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;如果未查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块触发自学习机制的APR学习;
    所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;
    所述SDN协议栈模块对所述报文进行封装后,发送给所述控制器,触发所述控制器进行ARP学习;
    所述SDN协议栈模块接收所述控制器下发的流表。
  20. 根据权利要求13所述的装置,其中,所述第二处理单元,具体用于当所述二层交换设备接收到服务器发送的ARP报文时,将所述ARP报文发送给所述三层交换设备进行ARP学习,以及将所述ARP报文发送给控制器进行ARP学习。
  21. 一种实现双控制平面的装置,所述装置包括:
    第一学习单元,配置为在SDN域配置好出口路由器的默认路由后,控制器主动触发所述默认路由的下一跳ARP学习;
    第二学习单元,配置为报文达到三层交换设备的桥接口后没有查到路由时,通过报文触发所述控制器进行ARP学习;
    流表下发单元,配置为将流表下发给所述三层交换设备。
  22. 根据权利要求21所述的装置,其中,所述第一学习单元,具体用于:SDN域配置好出口路由器的默认路由后,发送ARP请求给所述三层交换设备的SDN协议栈模块,其中,所述SDN协议栈模块在所述ARP请求上打上SDN协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述SDN协议栈虚拟接口的标记替换为IP协议栈虚拟接口的标记,并发送给IP协议栈模块;所述IP协议栈模块对ARP进行学习,在ARP应答中打上IP协议栈虚拟接口的标记,并发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈虚拟接口的标记,并发送给SDN协议栈模块;接收所述SDN协议栈模块发送的ARP应答,根据所述ARP应答进行ARP学习。
  23. 根据权利要求21所述的装置,其中,所述第二学习单元,具体用于:当三层报文达到所述桥接口后没有查到路由时,所述控制器接收SDN协议栈模块发送的封装后的报文,其中,所述封装后的报文通过以下方式生成:当三层报文达到所述桥接口后没有查到路由时,将所述报文通过网段路由发送给IP协议栈模块;所述IP协议栈模块根据所述报文的目的IP进行路由查询,如果查询到IP协议栈虚拟接口的出口路由,则所述IP协议栈模块在所述报文上打上IP协议栈虚拟接口的标记;所述IP协议栈模块将打上IP协议栈虚拟接口的标记的报文发送给收发包模块,通过所述收发包模块将所述IP协议栈虚拟接口的标记替换为SDN协议栈 虚拟接口的标记,并发送给SDN协议栈模块;所述SDN协议栈模块对所述报文进行封装,得到封装后的报文;接收到所述封装后的报文后,进行ARP学习并更新流表。
  24. 根据权利要求21所述的装置,其中,所述装置还包括:第三学习单元,配置为周期性地比较本地路由表和交换设备上的路由表,当所述本地路由表中的表项与交换设备上的路由表中的表项不一致时,将所述交换机上的表项更新至本地。
  25. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令配置为执行权利要求1-8任一项所述的实现双控制平面的方法,或者权利要求9-12任一项所述的实现双控制平面的方法。
PCT/CN2018/079340 2017-03-20 2018-03-16 一种实现双控制平面的方法、装置、计算机存储介质 WO2018171529A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP18771396.1A EP3605959B1 (en) 2017-03-20 2018-03-16 Method, device and computer storage medium for implementing double control plane

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710165894.3 2017-03-20
CN201710165894.3A CN108632122B (zh) 2017-03-20 2017-03-20 一种实现双控制平面的方法、装置

Publications (1)

Publication Number Publication Date
WO2018171529A1 true WO2018171529A1 (zh) 2018-09-27

Family

ID=63584924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/079340 WO2018171529A1 (zh) 2017-03-20 2018-03-16 一种实现双控制平面的方法、装置、计算机存储介质

Country Status (3)

Country Link
EP (1) EP3605959B1 (zh)
CN (1) CN108632122B (zh)
WO (1) WO2018171529A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637105A (zh) * 2019-09-24 2021-04-09 中国电信股份有限公司 切换防火墙的方法、系统、装置及计算机可读存储介质
CN112994948A (zh) * 2021-03-31 2021-06-18 杭州迪普科技股份有限公司 静默双机切换方法、装置、设备及计算机可读存储介质
CN113709046A (zh) * 2021-07-19 2021-11-26 国网上海市电力公司 一种基于prp的跨三层交换并行冗余方法
CN116248595A (zh) * 2023-03-15 2023-06-09 安超云软件有限公司 一种云内网与物理网通信的方法、装置、设备以及介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474534B (zh) * 2018-11-02 2021-04-06 莫冰 基于fpga的路由加速转发系统、路由器及转发方法
CN111654560B (zh) * 2020-06-02 2022-10-21 中电科航空电子有限公司 一种机载软硬堆叠交换机的物理地址表管理交互方法
US20240146641A1 (en) * 2022-10-26 2024-05-02 Schweitzer Engineering Laboratories, Inc. Communication device operable under multiple control planes
US20240146647A1 (en) * 2022-10-26 2024-05-02 Schweitzer Engineering Laboratories, Inc. Communication device operable to switch between multiple control plane types

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160226817A1 (en) * 2015-02-03 2016-08-04 Electronics And Telecommunications Research Institute Apparatus and method for creating block-type structure using sketch-based user interaction
WO2016166403A1 (en) * 2015-04-17 2016-10-20 Coriant Oy A configuration system for configuring the control-plane of a software-defined network
CN106105117A (zh) * 2013-12-26 2016-11-09 华为技术有限公司 分层软件定义网络中的流量工程控制器
CN106210157A (zh) * 2015-04-30 2016-12-07 中国电信股份有限公司 抑制地址解析协议消息的方法与系统、控制器

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8718070B2 (en) * 2010-07-06 2014-05-06 Nicira, Inc. Distributed network virtualization apparatus and method
CN103152264B (zh) * 2013-02-25 2015-11-25 北京百度网讯科技有限公司 Openflow网络和IP网络互连通信方法及Openflow子网边缘交换机
US9426060B2 (en) * 2013-08-07 2016-08-23 International Business Machines Corporation Software defined network (SDN) switch clusters having layer-3 distributed router functionality
WO2015170204A1 (en) * 2014-05-05 2015-11-12 Telefonaktiebolaget L M Ericsson (Publ) Implementing a 3g packet core in a cloud computer with openflow data and control planes
CN105450532B (zh) * 2014-09-28 2018-10-09 新华三技术有限公司 软件定义网络中的三层转发方法及装置
US10798048B2 (en) * 2015-04-07 2020-10-06 Nicira, Inc. Address resolution protocol suppression using a flow-based forwarding element
CN106331018B (zh) * 2015-06-30 2019-04-02 上海宽带技术及应用工程研究中心 基于负载均衡的sdn网络主机发现方法及系统
CN108028801B (zh) * 2015-07-27 2021-02-23 华为技术有限公司 一种基于sdn的arp实现方法及装置
CN105245632B (zh) * 2015-10-16 2018-08-14 电子科技大学 一种sdn网络中不同网段主机间通信方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106105117A (zh) * 2013-12-26 2016-11-09 华为技术有限公司 分层软件定义网络中的流量工程控制器
US20160226817A1 (en) * 2015-02-03 2016-08-04 Electronics And Telecommunications Research Institute Apparatus and method for creating block-type structure using sketch-based user interaction
WO2016166403A1 (en) * 2015-04-17 2016-10-20 Coriant Oy A configuration system for configuring the control-plane of a software-defined network
CN106210157A (zh) * 2015-04-30 2016-12-07 中国电信股份有限公司 抑制地址解析协议消息的方法与系统、控制器

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3605959A4 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637105A (zh) * 2019-09-24 2021-04-09 中国电信股份有限公司 切换防火墙的方法、系统、装置及计算机可读存储介质
CN112637105B (zh) * 2019-09-24 2022-08-02 中国电信股份有限公司 切换防火墙的方法、系统、装置及计算机可读存储介质
CN112994948A (zh) * 2021-03-31 2021-06-18 杭州迪普科技股份有限公司 静默双机切换方法、装置、设备及计算机可读存储介质
CN112994948B (zh) * 2021-03-31 2022-11-25 杭州迪普科技股份有限公司 静默双机切换方法、装置、设备及计算机可读存储介质
CN113709046A (zh) * 2021-07-19 2021-11-26 国网上海市电力公司 一种基于prp的跨三层交换并行冗余方法
CN116248595A (zh) * 2023-03-15 2023-06-09 安超云软件有限公司 一种云内网与物理网通信的方法、装置、设备以及介质
CN116248595B (zh) * 2023-03-15 2024-02-02 安超云软件有限公司 一种云内网与物理网通信的方法、装置、设备以及介质

Also Published As

Publication number Publication date
EP3605959B1 (en) 2022-01-12
CN108632122B (zh) 2022-01-07
EP3605959A4 (en) 2021-01-13
EP3605959A1 (en) 2020-02-05
CN108632122A (zh) 2018-10-09

Similar Documents

Publication Publication Date Title
WO2018171529A1 (zh) 一种实现双控制平面的方法、装置、计算机存储介质
CN106936777B (zh) 基于OpenFlow的云计算分布式网络实现方法、系统
US10333836B2 (en) Convergence for EVPN multi-homed networks
CN109873760B (zh) 处理路由的方法和装置、以及数据传输的方法和装置
EP3304815B1 (en) Operations, administration and management (oam) in overlay data center environments
EP3065342B1 (en) Update of mac routes in evpn single-active topology
US10382332B2 (en) Route signaling and convergence in EVPN of port extenders
EP2874359B1 (en) Extended ethernet fabric switches
EP3020164B1 (en) Support for virtual extensible local area network segments across multiple data center sites
EP3240250B1 (en) Virtual router terminating an overlay tunnel in a storage area network
US9112817B2 (en) Efficient TRILL forwarding
WO2017114196A1 (zh) 一种报文处理方法、相关装置及nvo3网络系统
US8787149B1 (en) MAC address synchronization for multi-homing with multichassis link aggregation
US9448821B2 (en) Method and system for realizing virtual machine mobility
WO2018054156A1 (zh) 一种vxlan报文的转发方法、设备及系统
US9178816B1 (en) Control plane messaging in all-active multi-homed ethernet virtual private networks
US9100213B1 (en) Synchronizing VPLS gateway MAC addresses
US20150172190A1 (en) Packet forwarding
WO2014136864A1 (ja) パケット書換装置、制御装置、通信システム、パケット送信方法及びプログラム
WO2017099971A1 (en) Interconnection of switches based on hierarchical overlay tunneling
CN107948041B (zh) 构建vxlan集中式多活网关的方法和设备
EP3528441B1 (en) Message forwarding
US11349749B2 (en) Node protection for bum traffic for multi-homed node failure
TW201541262A (zh) 以軟體定義網路(sdn)支援虛擬機器遷移之方法
EP3095216B1 (en) Single hop overlay architecture for line rate performance in campus networks

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018771396

Country of ref document: EP

Effective date: 20191021