WO2014173235A1 - Procédé, commande et système de génération d'itinéraires de transmission - Google Patents

Procédé, commande et système de génération d'itinéraires de transmission Download PDF

Info

Publication number
WO2014173235A1
WO2014173235A1 PCT/CN2014/075149 CN2014075149W WO2014173235A1 WO 2014173235 A1 WO2014173235 A1 WO 2014173235A1 CN 2014075149 W CN2014075149 W CN 2014075149W WO 2014173235 A1 WO2014173235 A1 WO 2014173235A1
Authority
WO
WIPO (PCT)
Prior art keywords
host
address
controller
switch
gateway
Prior art date
Application number
PCT/CN2014/075149
Other languages
English (en)
Chinese (zh)
Inventor
李泉材
田应军
王文健
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2014173235A1 publication Critical patent/WO2014173235A1/fr

Links

Classifications

    • 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]

Definitions

  • the present invention relates to the field of network technologies, and in particular, to a method, a controller, and a system for generating a forwarding path.
  • OpenFlow is a new type of network switching model, including OpenFlow switch (OpenFlow Switch) and controller (Crontroller); Among them, OpenFlow switch forwards the data layer; controller controls the network centrally to realize the function of the control layer.
  • OpenFlow switches fall into two categories: dedicated OpenFlow switches and switches that support OpenFlow.
  • a dedicated OpenFlow switch does not have control logic. It is only a simple path component for forwarding data packets between ports. The received data packets are forwarded according to OpenFlow mode.
  • the switches supporting OpenFlow can forward data according to OpenFlow mode. Packets can also be forwarded according to the forwarding mode of the existing switch.
  • FIG. 1 illustrates an implementation environment of an existing openflow network, where the implementation environment includes a controller 120, a first host 140 and a second host 142, a first switch 160, a second switch 162, and a third switch 164.
  • the fourth switch 166 and the fifth switch 168 wherein the first host 140 and the second host 142 belong to different subnets, respectively connected to ports of the first switch 160 and the second switch 162, and the fourth switch 166 and the fifth switch 168, respectively, implements the configuration gateway function of the first host 140 and the second host 142, that is, the first host 140 configures the first gateway, the second host 142 configures the second gateway, and the functions of the first gateway and the second gateway are respectively performed by the fourth switch 166 and fifth switch 168 are implemented.
  • the first host 140 first obtains the MAC of the first gateway through an ARP (Address Resolution Protocol) learning process between the first host 140 and the fourth switch 166 (Medium/ Media Access Control, medium access control layer) address, after obtaining the MAC address of the first gateway, the first host sends a data packet of the destination host to the second host 142 to the fourth switch 166, and after receiving the data packet, the fourth switch receives the data packet.
  • ARP Address Resolution Protocol
  • the fourth switch 166 Medium/ Media Access Control, medium access control layer
  • the data packet is reported to the controller, and the controller sends the forwarding flow table according to the subnet information and the destination IP address of the data packet, and the fourth The switch 166 forwards the data packet to the fifth switch 168.
  • the fifth switch 168 and the second host 142 obtain the MAC address of the second host 142 through the ARP learning process, and obtain the MAC address of the second host 142.
  • the data packet is forwarded to the second host 142.
  • Some OpenFlow switches need to undertake gateway/routing functions, such as the fourth switch 166 and the fifth switch 168 in FIG. 1, but in the OpenFlow network. This function cannot be implemented by a dedicated OpenFlow switch, that is, if the fourth switch 166 and the fifth switch 168 acting as gateways are dedicated Openflow switches, this function cannot be implemented.
  • the embodiment of the present invention provides a method, a controller, and a system for generating a forwarding path.
  • the technical solution is as follows:
  • an embodiment of the present invention provides a method for generating a forwarding path, where the method includes:
  • the controller obtains the network information of the first host by using the received first ARP request, where the first ARP request is sent by the first host, and the switch connected to the first host cannot find the forwarding flow table. An ARP request forwarded to the controller;
  • the controller acquires network information of the second host by constructing a second ARP request
  • the controller generates a forwarding path between the first host and the second host according to the network information of the first host and the network information of the second host; Transmitting, by the controller, a forwarding flow table to each switch on the forwarding path, so that each switch on the forwarding path is between the first host and the second host according to the forwarding flow table Forward the packet.
  • the controller further includes: the controller feeding back a first ARP response to the first host by using a switch connected to the first host, where The source MAC address and the source IP address in the first ARP response are respectively the MAC address and the IP address of the first gateway.
  • the controller acquires network information of the second host by constructing the second ARP request, including:
  • a destination MAC address of the data packet is a MAC address of the first gateway, and a destination IP address is an IP address of the second host; Constructing a second ARP request according to the IP address of the second host, where the source MAC address and the source IP address of the second ARP request are respectively a MAC address and an IP address of the second gateway, and the destination IP address is the second host IP address, the second gateway is a configuration gateway of the second host;
  • the controller sends the second ARP request to all hosts in the subnet where the second host is located by using a switch in a subnet where the second host is located;
  • the controller before the acquiring, by the controller, the network information of the first host by using the received first ARP request, the controller further includes:
  • the controller pre-stores a gateway, a network number, and a subnet mask of a subnet where the first host and the second host are located, and a MAC address and an IP address of the first gateway and the second gateway;
  • the controller sends the second ARP request by using a switch of a subnet where the second host is located All hosts in the subnet where the second host is located, including;
  • the controller sends the second ARP request to all hosts in the subnet where the second host is located according to the gateway, the network number, and the subnet mask of the subnet where the second host is located.
  • the acquiring the first ARP request by using the received After a host's network information it also includes:
  • the controller feeds back a first ARP response to the first host by using a switch connected to the first host, where a source MAC address in the first ARP response is a MAC address of the first proxy device, and a source IP address is The IP address of the second host, so that the first host uses the MAC address of the first proxy device as the MAC address of the second host, where the first proxy device is located corresponding to the first host A proxy device within a subnet.
  • the controller by configuring the second ARP request, to obtain the network information of the second host, includes:
  • the device generates a second ARP request according to the IP address of the second host, where the source MAC address of the second ARP request is the MAC address of the second proxy device, and the source IP address is the IP address of the first host, and the destination IP address.
  • the address is the IP address of the second host, so that the second host uses the MAC address of the second proxy device as the MAC address of the first host, and the second proxy device corresponds to the second The proxy device in the subnet where the host is located;
  • the controller sends the second ARP request to all hosts in the subnet where the second host is located by using a switch in a subnet where the second host is located;
  • the controller before the acquiring, by the first ARP request, the network information of the first host, the controller further includes: The controller pre-stores a gateway, a network number, and a subnet mask of a subnet where the first host and the second host are located, and a MAC address of the first proxy device and the second proxy device; The controller sends the second ARP request to all hosts in the subnet where the second host is located by using a switch of the subnet where the second host is located, including:
  • the controller sends the second ARP request to all hosts in the subnet where the second host is located according to the gateway, the network number, and the subnet mask of the subnet where the second host is located.
  • the The network information of the first host and the network information of the second host determine a forwarding path between the first host and the second host, including:
  • a controller for use in an OpenFlow network including at least one switch, where the controller includes:
  • a first information acquiring module configured to acquire network information of the first host by using the received first ARP request, where the first ARP request is a switch sent by the first host and connected to the first host The ARP request forwarded to the controller after forwarding the flow table cannot be found;
  • a second information acquiring module configured to acquire network information of the second host by constructing a second ARP request
  • a path generating module configured to generate the first host and the network according to the network information of the first host acquired by the first information acquiring module and the network information of the second host acquired by the second information acquiring module a forwarding path between the second hosts;
  • a flow table issuing module configured to perform each exchange on a forwarding path generated by the path generation module
  • the forwarding flow table is sent by the machine, so that each switch on the forwarding path forwards the data packet between the first host and the second host according to the forwarding flow table.
  • the first gateway is a configuration gateway of the first host, where The controller also includes:
  • a first feedback module configured to feed back, by the switch connected to the first host, the first ARP response to the first host, where the source MAC address and the source IP address in the first ARP response are respectively the first The MAC address and IP address of the gateway.
  • the second information acquiring module includes:
  • a first receiving unit configured to receive a data packet sent by the first host, where a destination MAC address of the data packet is a MAC address of the first gateway, and a destination IP address is an IP address of the second host;
  • a first constructing unit configured to construct a second ARP request according to the IP address of the second host in the data packet received by the first receiving unit, where the source MAC address and the source IP address of the second ARP request are respectively The MAC address and the IP address of the second gateway, the destination IP address is the IP address of the second host, and the second gateway is the configuration gateway of the second host;
  • a first sending unit configured to send, by using a switch in a subnet where the second host is located, a second ARP request configured by the first configuration unit to all hosts in a subnet where the second host is located; a unit, configured to receive, by using a switch that is connected to the second host, a second ARP response that is sent by the second host, where the source MAC address and the source IP address of the second ARP response are respectively the MAC address of the second host Address and IP address.
  • the controller further includes:
  • a first pre-storage module configured to pre-store a gateway, a network number, and a subnet mask of a subnet where the first host and the second host are located, and a MAC address of the first gateway and the second gateway IP address;
  • the first sending unit is specifically configured to be pre-stored according to the first pre-storage module
  • the gateway, the network number, and the subnet mask of the subnet where the second host is located sends the second ARP request to all hosts in the subnet where the second host is located.
  • the controller further includes:
  • a second feedback module configured to feed back, by the switch connected to the first host, a first ARP response to the first host, where a source MAC address in the first ARP response is a MAC address of the first proxy device, and a source
  • the IP address is the IP address of the second host, so that the first host uses the MAC address of the first proxy device as the MAC address of the second host, and the first proxy device corresponds to the first A proxy device in a subnet where the host resides.
  • the second information acquiring module includes:
  • a third receiving unit configured to receive a data packet sent by the first host, where a destination MAC address of the data packet is a MAC address of the first proxy device, and a destination IP address is an IP address of the second host;
  • a second constructing unit configured to construct a second ARP request according to the IP address of the second host in the data packet received by the third receiving unit, where the source MAC address of the second ARP request is the MAC address of the second proxy device An address, a source IP address is an IP address of the first host, and a destination IP address is an IP address of the second host, so that the second host uses the MAC address of the second proxy device as the first host MAC address, the second proxy device is a proxy device corresponding to a subnet in which the second host is located;
  • a second sending unit configured to send, by using a switch in a subnet where the second host is located, a second ARP request configured by the second configuration unit to all hosts in a subnet where the second host is located; a unit, configured to receive, by using a switch that is connected to the second host, a second ARP response that is sent by the second host, where the source MAC address and the source IP address of the second ARP response are respectively the MAC address of the second host Address IP address.
  • the controller further includes:
  • a second pre-storage module configured to pre-store the first host and the second host a gateway, a network number, and a subnet mask of the network, and a MAC address of the first proxy device and the second proxy device;
  • the second sending unit is configured to send the second ARP request to the second host according to a gateway, a network number, and a subnet mask of a subnet where the second host is pre-stored by the second pre-storage module. All hosts in the subnet.
  • the path Generate modules including:
  • a shortest generating unit configured to calculate, according to the network information of the first host acquired by the first information acquiring module and the network information of the second host acquired by the second information acquiring module, the first host and the first a shortest forwarding path between the two hosts; using the shortest forwarding path as a forwarding path between the first host and the second host;
  • An optimal generating unit configured to calculate the first host and the network according to the network information of the first host acquired by the first information acquiring module and the network information of the second host acquired by the second information acquiring module An optimal forwarding path between the second host; the optimal forwarding path is used as a forwarding path between the first host and the second host.
  • a forwarding path generation system comprising the controller, the first host and the second host of any of the second aspect and the various possible implementations of the second aspect.
  • the controller replaces part of the OpenFlow switch that implements the gateway/routing function in the OpenFlow network, thereby solving the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the function, and the OpenFlow network does not need to be separately set to function as a gateway/ The effect of the routing function of the switch.
  • FIG. 1 is a schematic diagram of an implementation environment of an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for generating a forwarding path according to Embodiment 1 of the present invention
  • FIG. 3 is a flowchart of a method for generating a forwarding path according to Embodiment 2 of the present invention
  • FIG. 4 is a flowchart of Embodiment 2 of the present invention
  • FIG. 5 is a flowchart of a method for generating a forwarding path according to Embodiment 3 of the present invention
  • FIG. 6 is a schematic diagram of an implementation environment of Embodiment 3 of the present invention.
  • FIG. 7 is a schematic structural diagram of a controller according to Embodiment 4 of the present invention.
  • Embodiment 8 is a schematic structural diagram of a controller according to Embodiment 5 of the present invention.
  • FIG. 9 is a schematic structural diagram of a controller according to Embodiment 6 of the present invention.
  • Figure 10 is a block diagram showing the structure of a system for generating a forwarding path according to a seventh embodiment of the present invention
  • Figure 11 is a block diagram showing the structure of a controller according to Embodiment 8 of the present invention
  • Figure 12 is a block diagram showing the structure of a controller provided in Embodiments 9 and 10 of the present invention.
  • FIG. 2 a flowchart of a method for generating a forwarding path according to Embodiment 1 of the present invention is shown.
  • the method for generating the forwarding path is applied to the controller as an example for illustration.
  • the method for generating the forwarding path includes:
  • Step 201 The controller acquires network information of the first host by using the received first ARP request.
  • the controller acquires network information of the first host by using the received first ARP request, where the first
  • the ARP request is sent by the first host, and the switch connected to the first host cannot find the ARP request forwarded to the controller after forwarding the flow table.
  • Step 202 The controller acquires network information of the second host by constructing a second ARP request. To generate a forwarding path between the first host and the second host, the controller constructs the second
  • Step 203 The controller generates a forwarding path between the first host and the second host according to the network information of the first host and the network information of the second host.
  • the controller generates a forwarding path according to the network information of the first host and the network information of the second host, so that the first host and the second host communicate according to the forwarding path.
  • Step 204 The controller sends a forwarding flow table to each switch on the forwarding path.
  • the controller generates a corresponding forwarding flow table for the switch on the forwarding path according to the generated forwarding path, and sends the generated forwarding flow table to the corresponding switch, so that the corresponding switch updates the local forwarding flow table according to the forwarding flow table, and according to The updated forwarding flow table forwards the communication data packet between the first host and the second host.
  • the controller obtains the network information of the first host and the second host, and generates a forwarding path according to the obtained network information of the first host and the second host.
  • the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the function is solved, and the effect that the switch functioning as the gateway/routing function is not required in the OpenFlow network is achieved.
  • the specific implementation environment may be divided into two situations.
  • the controller implements the functions of the first gateway and the second gateway.
  • the controller implements the functions of the first proxy device and the second proxy device.
  • FIG. 3 is a flowchart of a method for generating a forwarding path according to Embodiment 2 of the present invention. This embodiment is mainly illustrated by applying the forwarding path generation method to the implementation environment shown in FIG. 4. Referring to FIG. 3,
  • the implementation environment includes a controller 420, a first host 440, a second host 442, a third host 444, and a fourth host 446, a first switch 460, a second switch 462, a third switch 464, and a fourth The switch 466 and the fifth switch 468, wherein the first host 440 belongs to the first subnet, the second host 442, the third host 444, and the fourth host 446 belong to the second subnet, and the first host 440 and the third host 444 are connected to On the port of the first switch 460, the first The second host 442 is connected to the port of the second switch 462, and the fourth host 446 is connected to the port of the fifth switch 468.
  • the gateway the first host 440 belongs to the first subnet, the second host 442, the third host 444, and the fourth host 446 belong to the second subnet, and the first gateway and the second gateway are implemented by the controller 420.
  • the method includes:
  • Step 301 Pre-store a gateway, a network number, and a subnet mask of a subnet where the first host and the second host are located, and a MAC address and an IP address of the first gateway and the second gateway.
  • the controller pre-stores the gateway, the network number and the subnet mask of the subnet where the first host 440 and the second host 442 are located, and the MAC address and IP address of the first gateway and the second gateway, so that the controller 420 is in the subsequent process.
  • a first gateway corresponding to the first host 440 and a second gateway corresponding to the second host 442 to obtain MAC address, IP address, and port information of the first host 440 and the second host 442; and simultaneously according to the gateway of the subnet , network number and subnet mask decision forwarding path.
  • Step 302 The first host sends a first ARP request to the first switch.
  • the first host 440 needs to communicate with the outside world. First, the MAC address of the first gateway is queried according to the configured gateway, that is, the IP address of the first gateway. Therefore, the first host 440 constructs a first ARP request, and the source MAC address of the first ARP request. The address is the MAC address of the first host 440, the source IP address is the IP address of the first host 440, the destination MAC address is 0, and the destination IP address is the IP address of the first gateway. The first host 440 sends the first ARP request to the first switch 460.
  • the first switch 460 receives the first ARP request.
  • Step 303 The first switch queries the local forwarding flow table. If the forwarding flow table information corresponding to the received first ARP request is not found, the first switch sends the information to the controller in the form of a packet input message (Packet-ln).
  • Packet-ln a packet input message
  • the first switch 460 queries the local forwarding flow table according to the destination IP address in the received first ARP request, and if the forwarding flow table information corresponding to the destination IP address is queried, the forwarding is performed according to the forwarding flow table information; To the forwarding flow table information corresponding to the destination IP address, the received first ARP request is sent to the controller 420 in the form of a packet input message.
  • the controller 420 receives the first ARP request.
  • Step 304 The controller acquires network information of the first host by using the received first ARP request.
  • the controller 420 obtains the MAC address and the IP address of the first host 440 according to the received first ARP request, and uses the MAC address and the IP address of the first host 440 as the network information of the first host 440; due to the first ARP request
  • the controller 420 can also obtain the port information of the first host 440 according to the need, and the MAC address, the IP address, and the port information of the first host 440 are used as the first host 440.
  • Network information may include the MAC address and IP address of the first host 440, and may also include the MAC address, IP address, and port information of the first host 440.
  • Step 305 The controller constructs a first ARP response, and feeds back the first ARP response to the first host by using a switch connected to the first host.
  • the controller 420 implements the function of the first gateway, when the first ARP request is received and the destination IP address is found to be the IP address of the first gateway, the controller 420 actively constructs a first ARP response, the first ARP response.
  • the source MAC address is the MAC address of the first gateway
  • the source IP address is the IP address of the first gateway
  • the destination MAC address is the MAC address of the first host 440
  • the destination IP address is the IP address of the first host 440
  • the packet is The output message (Packet-Out) is sent in the form of a first ARP response from the first switch 460 to the port of the first host 440.
  • the first host 440 receives the first ARP response.
  • Step 306 The first host saves a MAC address of the first gateway.
  • the first host 440 After receiving the first ARP response, the first host 440 saves the MAC address of the first gateway in the first ARP response.
  • the first host 440 completes the ARP learning process between the first gateway implemented by the controller 420.
  • Step 307 The first host sends a data packet whose destination host is the second host to the first switch.
  • the first host 440 has obtained the MAC address of the first gateway by using the step 302 to the step 305, so the first host 440 goes to the second host.
  • the host 442 sends a data packet
  • the destination MAC address in the data packet is the MAC address of the first gateway
  • the destination IP address is the IP address of the second host 442
  • the first host 440 sends the data packet to the first switch 460.
  • the first switch 460 receives the data packet.
  • Step 308 the first switch queries the local forwarding flow table, and if the query does not correspond to the data packet, The forwarding flow table information is sent to the controller in the form of a packet input message;
  • the first switch 460 receives the data packet sent by the first host 440, and queries the local forwarding flow table according to the IP address in the data packet. If the forwarding flow table information corresponding to the destination IP address is queried, the information is forwarded according to the forwarding flow table information. Forwarding; if the forwarding flow table information corresponding to the destination IP address is not found, the data packet is sent to the controller 420 in the form of a packet input message.
  • the controller 420 receives the data packet.
  • Step 309 The controller constructs a second ARP request according to the IP address of the second host, and sends the second ARP request to all hosts in the subnet where the second host is located through the switch in the subnet where the second host is located.
  • the controller 420 When the controller 420 receives the data packet, it does not know the MAC address of the second host 442. Since the controller 420 implements the role of the second gateway, the data of the IP address of the second host 442 is received at the destination IP address.
  • the second ARP request When the packet is configured, the second ARP request is actively constructed.
  • the source MAC address and the source IP address of the second ARP request are respectively the MAC address and the IP address of the second gateway, the destination MAC address is all zero, and the destination IP address is the IP address of the second host.
  • all hosts in the subnet where the second host 442 is located receive the second ARP request, such as the second host 442, the third host 444, and the fourth host 446, where the third host 444 and the fourth host 446 are not in the Marked in Figure 3.
  • Step 310 The second host responds to the second ARP request.
  • the second host 442 receives the second ARP request sent by the second switch 462, and finds that the destination IP address in the second ARP request is the same as its own IP address, and then constructs a second ARP response, the source MAC address of the second ARP response.
  • the address and the source IP address are respectively the MAC address and the IP address of the second host 442, and the destination MAC address and the destination IP address are respectively the MAC address IP address of the second gateway, and the second switch 462 sends the second to the controller 420.
  • ARP response is respectively the MAC address and the IP address of the second host 442
  • the destination MAC address and the destination IP address are respectively the MAC address IP address of the second gateway
  • the controller 420 receives the second ARP response fed back by the second host 442 through the switch 462 connected to the second host.
  • Step 31 The controller acquires network information of the second host.
  • the controller 420 obtains the MAC address and the IP address of the second host 442 according to the received second ARP response, and uses the MAC address and the IP address of the second host 442 as the network information of the second host 442; due to the first ARP request
  • the controller 420 can also obtain the port information of the second host 442 as needed, and use the MAC address, the IP address, and the port information of the second host 442 as the second host 442.
  • Network information may include the MAC address and IP address of the second host 442, and may also include the MAC address, IP address, and port information of the second host 442.
  • step 307 to step 31 1 the controller completes the ARP learning process between the implemented second gateway and the second host 442;
  • Step 312 The controller calculates a shortest forwarding path between the first host and the second host according to the network information of the first host and the network information of the second host.
  • the shortest forwarding path is used as forwarding between the first host and the second host. Path
  • the controller 420 analyzes the destination IP address of the data packet sent by the first switch 460, and finds that the destination host of the data packet, that is, the second host 442 and the first host 440 are in different subnets, and determines that it is a three-layer forwarding, and The network information of the first host 440 and the second host 442 is obtained through the ARP learning process, and the forwarding path is generated according to the routing algorithm. If the forwarding path is generated according to the shortest path policy, the generated forwarding path may be: ⁇ -> Third switch 464 ⁇ -> Second switch 462.
  • the controller 420 can determine that the IP address of the first host 440 and the second host 442 is three-layer forwarding.
  • the forwarding path is generated according to the routing algorithm decision. If the forwarding path is generated according to the shortest path policy, the forwarding path generated according to the port information of the first host 440 and the second host 442 may be: the first switch 460 ⁇ ->the third switch 464 ⁇ -> second switch 462.
  • controller 420 may further calculate an optimal forwarding path between the first host 440 and the second host 442 according to the network information of the first host 440 and the network information of the second host 442.
  • the optimal forwarding path is a chain.
  • the optimal path of the path is used as the forwarding path between the first host 440 and the second host 442.
  • the shortest path policy is used as an example for description.
  • Step 313 The controller generates a corresponding switch for the switch on the forwarding path according to the generated forwarding path. Forwarding the flow table, and sending the generated forwarding flow table to the corresponding switch;
  • the controller 420 generates a corresponding forwarding flow table for the switch on the forwarding path according to the generated forwarding path, and sends the generated forwarding flow table to the corresponding switch.
  • the controller 420 is the first switch 460 on the shortest path.
  • the third switch 464 and the second switch 462 generate a corresponding forwarding flow table, and send the forwarding flow table corresponding to the first switch 460 to the first switch 460, and send the forwarding flow table corresponding to the third switch 464 to the third switch. 464.
  • the third switch 464 is not labeled in Figure 3.
  • Step 314 The corresponding switch updates the local forwarding flow table according to the forwarding flow table.
  • the first switch 460, the third switch 464, and the second switch 462 on the corresponding shortest path update the local forwarding flow table.
  • Step 315 The corresponding switch forwards the communication data packet between the first host and the second host according to the updated forwarding flow table.
  • the first switch 460, the third switch 464, and the second switch 462 on the corresponding shortest path forward the communication data packet between the first host 440 and the second host 442 according to the updated forwarding flow table.
  • the method for generating a forwarding path replaces a part of an OpenFlow switch that implements a gateway/routing function in an OpenFlow network by using a controller, and the ARP function of the first gateway and the second gateway is implemented by the controller. Therefore, all the switches in the Open Flow network can implement the simple forwarding function, thereby solving the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the gateway/routing function, and the OpenFlow network does not need to be separately set up. The effect of the gateway/route function switch.
  • the second case will be described in detail below;
  • FIG. 5 is a flowchart of a method for generating a forwarding path according to Embodiment 3 of the present invention.
  • This embodiment is mainly illustrated by applying the method for generating the forwarding path to the implementation environment shown in FIG. 6.
  • the implementation environment includes a controller 620, a first host 640, The second host 642, the third host 644 and the fourth host 646, the first switch 660, the second switch 662, the third switch 664, the fourth switch 666, and the fifth switch 668, wherein the first host 640 belongs to the first subnet
  • the second host 642, the third host 644, and the fourth host 646 belong to the second subnet.
  • the first host 640 and the third host 644 are connected to the port of the first switch 660, and the second host 642 is connected to the second switch 662. On the port, the fourth host 646 is connected to the port of the fifth switch 668. It is assumed that the first host 640 and the second host 642 are not configured with a default gateway.
  • the first host 640 belongs to the first subnet, and the second host 642 and the third host.
  • the host 644 and the fourth host 646 belong to the second subnet, and the information about the subnet where the first host 640 and the second host 642 are located (including the gateway, the network number, and the subnet mask) are pre-stored on the controller 620 and respectively correspond to The first proxy device and the second proxy device of the two subnets.
  • the method includes:
  • Step 501 The memory pre-stores a gateway, a network number, and a subnet mask of the subnet where the first host and the second host are located, and a MAC address of the first proxy device and the second proxy device.
  • the controller 620 pre-stores the gateway, the network number and the subnet mask of the subnet where the first host 640 and the second host 642 are located, and the MAC addresses of the first proxy device and the second proxy device; so that the controller 620 is in the subsequent process.
  • the first proxy device corresponding to the subnet where the first host 640 is located and the second proxy device corresponding to the subnet where the second host 642 is located are configured to obtain network information of the first host 640 and the second host 642, where the network information includes the MAC address. Address, IP address, and port information; and decide the forwarding path based on the information of the subnet.
  • Step 502 The first host sends a first ARP request to the first switch.
  • the first host 640 is to communicate with the second host 642. First, the MAC address of the second host 642 is queried according to the IP address of the second host 642. Therefore, the first host 640 constructs a first ARP request, and the first ARP request source MAC For the MAC of the first host 640, the source IP address is the IP address of the first host 640, the destination MAC address is 0, and the destination IP address is the IP address of the second host 642. The first host 640 sends the first ARP request to the first switch 660.
  • the first switch 660 receives the first ARP request.
  • Step 503 The first switch queries the local forwarding flow table. If the forwarding flow table information corresponding to the received first ARP request is not found, the first switch sends the information to the controller in the form of a packet input message.
  • the destination IP address in the first ARP request is queried locally.
  • the forwarding flow table if the forwarding flow table information corresponding to the destination IP address is queried, is forwarded according to the forwarding flow table information; if the forwarding flow table information corresponding to the destination IP address is not queried, the received An ARP request is sent to the controller 620 in the form of a packet input message.
  • the controller 620 receives the first ARP request.
  • Step 504 The controller acquires the network information of the first host by using the received first ARP request.
  • the controller 620 acquires the MAC address and the IP address of the first host 640 according to the received first ARP request, and the first host 640 is obtained.
  • the MAC address and the IP address are used as the network information of the first host 640. Since the first ARP request is sent to the controller 620 in the form of a packet input message, the controller 620 can also obtain the port of the first host 640 as needed.
  • the information, the MAC address, the IP address, and the port information of the first host 640 are used as the network information of the first host 640.
  • the network information of the first host 640 may include the MAC address and IP address of the first host 640, and may also include the MAC address, IP address, and port information of the first host 640.
  • Step 505 The controller constructs a first ARP response, and feeds back the first ARP response to the first host by using a switch connected to the first host.
  • the controller 620 Since the controller 620 implements the role of the first proxy device, the controller 620 actively constructs a first ARP response, when the first ARP request is received and the destination IP address is the IP address of the second host 142.
  • the ARP response source MAC address is the MAC address of the first proxy device, the source IP address is the IP address of the second host 642, the destination MAC address is the MAC address of the first host 640, and the destination IP address is the IP address of the first host 640.
  • the first ARP response is sent from the port of the first switch 660 to the first host 640 in the form of a packet output message.
  • the first host 640 receives the first ARP response.
  • Step 506 The first host saves a MAC address of the first proxy device.
  • the first host 640 After receiving the first ARP response, the first host 640 saves the MAC address of the first proxy device in the first ARP response as the MAC address of the second host 642.
  • the first host 640 completes the ARP learning process between the first proxy device implemented by the controller 620.
  • Step 507 The first host sends a data packet whose destination host is the second host to the first switch.
  • the first host 640 has obtained the MAC address of the first proxy device, and And the MAC address of the first proxy device is saved as the MAC address of the second host 642, so the first host 640 sends the destination MAC address of the data packet to the second host 642 as the MAC address of the first proxy device.
  • the IP address is the IP address of the second host 642, and the first host 640 sends the data packet to the first switch 660.
  • the first switch 660 receives the data packet.
  • Step 508 The first switch queries the local forwarding flow table. If the forwarding flow table information corresponding to the data packet is not found, the first switch sends the information to the controller in the form of a packet input message.
  • the first switch 660 receives the data packet sent by the first host 640, and queries the local forwarding flow table according to the IP address in the data packet. If the forwarding flow table information corresponding to the destination IP address is queried, the information is forwarded according to the forwarding flow table information. Forwarding; if the forwarding flow table information corresponding to the destination IP address is not found, the data packet is sent to the controller 620 in the form of a packet input message.
  • the controller 620 receives the data packet.
  • Step 509 The controller constructs a second ARP request according to the IP address of the second host, and sends the second ARP request to all hosts in the subnet where the second host is located through the switch in the subnet where the second host is located.
  • the controller 620 When the controller 620 receives the data packet, it does not know the MAC address of the second host 642. Since the controller 620 implements the role of the second proxy device, the destination IP address is received as the IP address of the second host 642. In the case of the data packet, the second ARP request is actively constructed.
  • the second ARP request source MAC address is the MAC address of the second proxy device, the source IP address is the IP address of the first host 640, the destination MAC address is all zero, and the destination IP address is The IP address of the second host 642 is sent to all the subnets of the second host 642 in the form of a packet output message according to the gateway, the network number, and the subnet mask of the subnet where the second host 642 is located. Host.
  • all the hosts in the subnet where the second host 642 is located receive the second ARP request, such as the second host 642, the third host 644 and the fourth host 646, wherein the three hosts 644 and the fourth host 646 are not in the Marked in Figure 5.
  • Step 510 The second host responds to the second ARP request.
  • the second host 642 receives the second ARP request sent by the second switch 662, and finds that the destination IP address in the second ARP request is the same as its own IP address, and then constructs a second ARP response.
  • the second ARP response source MAC address is the MAC address of the second host 642
  • the source IP address is the IP address of the second host 642
  • the destination MAC address is the MAC address of the second proxy device
  • the destination IP is the IP address of the first host 640.
  • the address is sent by the second switch 662 to the controller 620 for the second ARP response.
  • the controller 620 receives the second ARP response.
  • Step 51 The controller acquires network information of the second host.
  • the controller 620 obtains the MAC address and the IP address of the second host 642 according to the received second ARP response, and uses the MAC address and the IP address of the second host 642 as the network information of the second host 642;
  • the controller 620 can also obtain the port information of the second host 642 as needed, and use the MAC address, IP address, and port information of the second host 642 as the second host 642.
  • Network information may include the MAC address and IP address of the second host 642, and may also include the MAC address, IP address, and port information of the second host 642.
  • the controller completes the ARP learning process between the implemented second proxy device and the second host 642;
  • Step 512 The controller calculates a shortest forwarding path between the first host and the second host according to the network information of the first host and the network information of the second host.
  • the shortest forwarding path is used as the forwarding between the first host and the second host.
  • the controller 620 analyzes the destination IP address of the data packet sent by the first switch 660, and finds that the destination host of the data packet, that is, the second host 642 and the first host 640 are in different subnets, and determines that it is a three-layer forwarding, and The MAC address, IP address, and port information of the first host 640 and the second host 642 are obtained through the ARP learning process, and the forwarding path is generated according to the routing algorithm decision. If the forwarding path is generated according to the shortest path policy, the generated forwarding path may be generated.
  • the first switch 660 ⁇ -> the third switch 664 ⁇ -> the second switch 662.
  • the controller 620 can determine that the IP address of the first host 640 and the second host 642 is three-layer forwarding. Generating a forwarding path according to the routing algorithm decision, and assuming that the forwarding path is generated according to the shortest path policy, the forwarding path generated according to the port information of the first host 640 and the second host 642 It may be: a first switch 660 ⁇ -> a third switch 664 ⁇ -> a second switch 662.
  • controller 620 may further calculate an optimal forwarding path between the first host 640 and the second host 642 according to the network information of the first host 640 and the network information of the second host 642.
  • the optimal forwarding path is a chain.
  • the optimal path of the path is used as the forwarding path between the first host 640 and the second host 642.
  • the shortest path policy is used as an example for description.
  • Step 513 The controller generates a corresponding forwarding flow table for the switch on the forwarding path according to the generated forwarding path, and sends the generated forwarding flow table to the corresponding switch.
  • the controller 620 generates a corresponding forwarding flow table for the switch on the forwarding path according to the generated forwarding path, and sends the generated forwarding flow table to the corresponding switch.
  • the controller 620 is the first switch 660 on the shortest path.
  • the third switch 664 and the second switch 662 generate a corresponding forwarding flow table, and send the forwarding flow table corresponding to the first switch 660 to the first switch 660, and send the forwarding flow table corresponding to the third switch 664 to the third switch. 664. Send the forwarding flow table corresponding to the second switch 662 to the second switch 662.
  • the third switch 664 is not labeled in Figure 5.
  • Step 514 The corresponding switch updates the local forwarding flow table according to the forwarding flow table.
  • the first switch 660, the third switch 664, and the second switch 662 on the corresponding shortest path update the local forwarding flow table information.
  • Step 515 The corresponding switch forwards the communication data packet between the first host and the second host according to the updated forwarding flow table.
  • the first switch 660, the third switch 664, and the second switch 662 on the corresponding shortest path forward the communication data packet between the first host 640 and the second host 642 according to the updated forwarding flow table.
  • the implementation method of the three-layer forwarding replaces the partial OpenFlow switch that implements the gateway/routing function in the OpenFlow network by using the controller, and the controller implements the first two subnets corresponding to the communication.
  • the proxy ARP function of the proxy device and the second proxy device enables all switches in the OpenFlow network to implement a simple forwarding function, thereby solving the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the gateway/routing function. There is no need to separately set up a switch functioning as a gateway/router in the OpenFlow network. Effect.
  • control message can be transmitted between the controller and the switch through a dedicated network, and the communication path for forwarding data between the switch and the switch is isolated on the physical link; or the communication path for forwarding data with the switch is the same path.
  • Different rules are used to distinguish between control messages between the controller and the switch and forwarding data between the switches. The following is an embodiment of the device of the present invention, and the content that is not described in detail may be referred to the corresponding method embodiment.
  • FIG. 7 is a schematic structural diagram of a controller according to Embodiment 4 of the present invention.
  • the controller includes: a first information acquiring module 710, a second information acquiring module 720, a path generating module 730, and a flow table.
  • Send module 740 is a schematic structural diagram of a controller according to Embodiment 4 of the present invention.
  • the first information obtaining module 710 is configured to acquire network information of the first host by using the received first ARP request, where the first ARP request is sent by the first host, and is related to the first host The connected switch cannot find the ARP request that is forwarded to the controller after forwarding the flow table.
  • the second information obtaining module 720 is configured to acquire the network information of the second host by constructing the second ARP request.
  • the path generation module 730 is configured to generate, according to the network information of the first host acquired by the first information acquiring module 710 and the network information of the second host acquired by the second information acquiring module 720. a forwarding path between a host and the second host;
  • the flow table issuing module 740 is configured to send a forwarding flow table to each switch on the forwarding path generated by the path generation module 730, so that each switch on the forwarding path is in accordance with the forwarding flow table. Transmitting a data packet between the first host and the second host.
  • the controller provided in this embodiment generates a forwarding path according to the obtained network information of the first host and the second host by acquiring the network information of the first host and the second host, so that the first host and the first host and The second host communicates, which solves the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the function, and achieves the effect that the switch that does not need to be separately set to the gateway/route function is required in the OpenFlow network.
  • Embodiment 5 Embodiment 5
  • FIG. 8 is a schematic structural diagram of a controller provided in Embodiment 5 of the present invention.
  • the implementation environment includes a controller 420, a first host 440, a second host 442, a third host 444, and a fourth host 446, a first switch 460, a second switch 462, a third switch 464, and a fourth The switch 466 and the fifth switch 468, wherein the first host 440 belongs to the first subnet, the second host 442, the third host 444, and the fourth host 446 belong to the second subnet, and the first host 440 and the third host 444 are connected to On the port of the first switch 460, the second host 442 is connected to the port of the second switch 462, and the fourth host 446 is connected to the port of the fifth switch 468.
  • the second host 442 is configured as a second gateway, the first host 440 belongs to the first subnet, and the second host 442, the third host 444, and the fourth host 446 belong to the second subnet, and the first gateway and the second gateway are controlled.
  • the 420 is implemented on the controller 420, and the information about the subnet where the first host 440 and the second host 442 are located (including the gateway, the network number, and the subnet mask) and corresponding Gateway information (including IP address and MAC address of the gateway).
  • the controller includes: a first pre-storage module 810, a first information acquisition module 820, a first feedback module 830, a second information acquisition module 840, a path generation module 850, and a flow table delivery module 860.
  • the first pre-storage module 810 is configured to pre-store a gateway, a network number, and a subnet mask of a subnet where the first host 440 and the second host 442 are located, and the first gateway and the second The MAC address and IP address of the gateway.
  • the first information obtaining module 820 is configured to acquire network information of the first host 440 by using the received first ARP request, where the first ARP request is sent by the first host 440, and the first A switch connected to a host 440 cannot find an ARP request forwarded to the controller 420 after forwarding the flow table.
  • the first information acquiring module 820 includes: a fourth receiving unit 821 and a first acquiring unit 822.
  • the fourth receiving unit 821 is configured to receive the first ARP request sent by the first host 440.
  • the first obtaining unit 822 is configured to acquire network information of the first host 440 by using the first ARP request received by the fourth receiving unit 821.
  • the first feedback module 830 is configured to feed back a first ARP response to the first host 440 by using a switch connected to the first host 440, where a source MAC address and a source IP address in the first ARP response are respectively Is the MAC address and IP address of the first gateway.
  • the second information acquiring module 840 is configured to acquire network information of the second host 442 by constructing a second ARP request.
  • the second information acquiring module 840 includes: a first receiving unit 841, a first constructing unit 842, a first sending unit 843, a second receiving unit 844, and a second acquiring unit 845.
  • the first receiving unit 841 is configured to receive a data packet sent by the first host 440, where a destination MAC address of the data packet is a MAC address of the first gateway, and a destination IP address is the second host 442. IP address.
  • the first constructing unit 842 is configured to construct a second ARP request according to an IP address of the second host 442 in the data packet received by the first receiving unit 841, a source MAC address and a source of the second ARP request.
  • the IP address is the MAC address and the IP address of the second gateway
  • the destination IP address is the IP address of the second host 442
  • the second gateway is the configuration gateway of the second host 442.
  • the first sending unit 843 is configured to use, according to the gateway, the network number, and the subnet mask of the subnet where the second host 442 is pre-stored by the first pre-storage module 810, by using the second host 442 in the subnet
  • the switch sends the second ARP request constructed by the first construction unit 842 to all hosts in the subnet where the second host 442 is located.
  • the second receiving unit 844 is configured to receive, by using a switch connected to the second host 442, a second ARP response that is sent by the second host 442, where the source MAC address and the source IP address of the second ARP response are respectively It is the MAC address and IP address of the second host 442.
  • the second obtaining unit 845 is configured to acquire network information of the second host 442 according to the second ARP response received by the second receiving unit 844.
  • the path generation module 850 is configured to: according to the network information of the first host 440 acquired by the first information acquiring module 820 and the second host acquired by the second information acquiring module 840 The network information decision of 442 generates a forwarding path between the first host 440 and the second host 442.
  • the path generation module 850 specifically includes: a shortest generation unit 851, or an optimal generation unit 852.
  • the shortest generation unit 851 is configured to calculate, according to the network information of the first host 440 acquired by the first information acquiring module 820 and the network information of the second host 442 acquired by the second information acquiring module 840.
  • the shortest forwarding path between the first host 440 and the second host 442; the shortest forwarding path is used as a forwarding path between the first host 440 and the second host 442.
  • the optimal generation unit 852 is configured to calculate, according to the network information of the first host 440 acquired by the first information acquiring module 820 and the network information of the second host 442 acquired by the second information acquiring module 840. An optimal forwarding path between the first host 440 and the second host 442; the optimal forwarding path is used as a forwarding path between the first host 440 and the second host 442.
  • the flow table issuing module 860 is configured to deliver a forwarding flow table to each switch on the forwarding path generated by the path generation module 850, so that each switch on the forwarding path is in accordance with the forwarding flow table.
  • the data packet is forwarded between the first host 440 and the second host 442.
  • the controller provided in this embodiment obtains network information of the first host and the second host by implementing the ARP function of the first gateway and the second gateway, according to the first host and the pre-stored
  • the information about the subnet where the second host is located and the corresponding gateway information and the obtained network information of the first host and the second host determine a forwarding path, so that all switches in the OpenFlow network can implement a simple forwarding function, thereby solving
  • the dedicated OpenFlow switch in the OpenFlow network cannot implement the gateway/routing function, and the effect of the switch that does not need to be separately set to the gateway/routing function in the OpenFlow network is achieved.
  • FIG. 9 is a schematic structural diagram of a controller provided in Embodiment 6 of the present invention.
  • This embodiment is mainly illustrated by the application of the controller to the implementation environment shown in FIG. 6.
  • the implementation environment includes a controller 620, a first host 640, a second host 642, a third host 644, and a fourth host 646, a first switch 660, a second switch 662, a third switch 664, a fourth switch 666, and The fifth switch 668, wherein the first host 640 belongs to the first subnet, the second host 642, the third host 644, and the fourth host 646 belong to the second subnet, and the first host 640 and the third host 644 are connected to the first switch.
  • the second host 642 is connected to the port of the second switch 662, and the fourth host 646 is connected to the port of the fifth switch 668. It is assumed that the first host 640 and the second host 642 are not configured with a default gateway.
  • the host 640 belongs to the first subnet, and the second host 642, the third host 644, and the fourth host 646 belong to the second subnet.
  • the controller 620 pre-stores information about the subnet where the first host 640 and the second host 642 are located ( The gateway, the network number, and the subnet mask are included, and the first proxy device and the second proxy device respectively correspond to the two subnets.
  • the controller includes: a second pre-storage module 910, a first information acquisition module 920, a second feedback module 930, a second information acquisition module 940, a path generation module 950, and a flow table delivery module 960.
  • the second pre-storage module 910 is configured to pre-store a gateway, a network number, and a subnet mask of a subnet where the first host 640 and the second host 642 are located, and the first proxy device and the first The MAC address of the second proxy device.
  • the first information obtaining module 920 is configured to acquire network information of the first host 640 by using the received first ARP request, where the first ARP request is sent by the first host 640 and is related to the first A switch connected to a host 640 cannot find an ARP request forwarded to the controller 620 after forwarding the flow table.
  • the first information acquiring module 920 includes: a fourth receiving unit 921 and a first acquiring unit 922.
  • the fourth receiving unit 921 is configured to receive the first ARP request sent by the first host 640.
  • the first obtaining unit 922 is configured to acquire network information of the first host 440 by using the first ARP request received by the fourth receiving unit 921.
  • the second feedback module 930 is configured to feed back, by the switch connected to the first host 640, the first ARP response to the first host 640, where the source MAC address in the first ARP response is the first proxy device.
  • MAC address the source IP address is the IP address of the second host, so as to
  • the first host 640 uses the MAC address of the first proxy device as the MAC address of the second host 642, and the first proxy device is a proxy device corresponding to the subnet in which the first host 640 is located.
  • the second information acquiring module 940 is configured to acquire network information of the second host 642 by constructing a second ARP request.
  • the second information acquiring module 940 includes: a third receiving unit 941, a second constructing unit 942, a second sending unit 943, a second receiving unit 944, and a second obtaining unit 945.
  • the third receiving unit 941 is configured to receive a data packet sent by the first host 640, where a destination MAC address of the data packet is a MAC address of the first proxy device, and a destination IP address is the second host 642 IP address.
  • the second constructing unit 942 is configured to construct a second ARP request according to the IP address of the second host 642 in the data packet received by the third receiving unit 941, where the source MAC address of the second ARP request is The MAC address of the second proxy device, the source IP address being the IP address of the first host 640, and the destination IP address being the IP address of the second host 642, so that the second host 642 will be the second proxy device
  • the MAC address is used as the MAC address of the first host 640
  • the second proxy device is a proxy device corresponding to the subnet in which the second host 642 is located.
  • the second sending unit 943 is configured to send, by using a switch in a subnet where the second host 642 is located, a second ARP request configured by the second configuration unit 942 to a subnet in which the second host 642 is located. All hosts.
  • the second receiving unit 944 is configured to use a switch connected to the second host 642 according to a gateway, a network number, and a subnet mask of a subnet where the second host 642 is pre-stored by the second pre-storage module 910. And receiving, by the second host 642, the second ARP response, where the source MAC address and the source IP address of the second ARP response are respectively the MAC address IP address of the second host 642.
  • the second obtaining unit 945 is configured to acquire network information of the second host 642 according to the second ARP response received by the second receiving unit 944.
  • the path generation module 950 is configured to generate, according to the network information of the first host 640 acquired by the first information acquiring module 920 and the network information decision generation of the second host 642 acquired by the second information acquiring module 940. Forwarding between the first host 640 and the second host 642 Path.
  • the path generation module 950 specifically includes: a shortest generation unit 951, or an optimal generation unit 952.
  • the shortest generation unit 951 is configured to calculate, according to the network information of the first host 640 acquired by the first information acquiring module 920 and the network information of the second host 642 acquired by the second information acquiring module 940.
  • the optimal generation unit 952 is configured to calculate, according to the network information of the first host 640 acquired by the first information acquiring module 920 and the network information of the second host 642 acquired by the second information acquiring module 940.
  • the optimal forwarding path between the first host 640 and the second host 642 is used as the forwarding path between the first host 640 and the second host 642.
  • the flow table issuing module 960 is configured to send a forwarding flow table to each switch on the forwarding path generated by the path generating module 950, so that each switch on the forwarding path is in accordance with the forwarding flow table.
  • the data packet is forwarded between the first host 640 and the second host 642.
  • the controller provided by the embodiment obtains the network information of the first host and the second host by implementing the proxy ARP function of the first proxy device and the second proxy device, according to the first host stored in advance. And the information about the subnet where the second host is located and the corresponding gateway information and the obtained network information of the first host and the second host determine a forwarding path, so that all switches in the OpenFlow network can implement a simple forwarding function. Therefore, the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the gateway/routing function is solved, and the effect that the switch functioning as the gateway/routing function is not required in the OpenFlow network is achieved.
  • FIG. 10 a block diagram showing the structure of a forwarding path generating system provided in Embodiment 7 of the present invention is shown.
  • the system includes the controller 1010, the first host 1020, and the second host 1030 provided in the fifth embodiment or the sixth embodiment.
  • the system for generating a forwarding path obtains the network information of the first host and the second host by using the controller, and generates a forwarding path according to the obtained network information of the first host and the second host.
  • the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the function is solved, and the effect that the switch functioning as the gateway/routing function is not required in the OpenFlow network is achieved.
  • the controller includes: a processor 1 101 and a transmitter 1 102.
  • the processor 1101 is configured to acquire network information of the first host by using the received first ARP request, where the first ARP request is sent by the first host and connected to the first host.
  • the switch cannot find the ARP request forwarded to the controller after forwarding the flow table.
  • the processor 1101 is further configured to acquire network information of the second host by constructing a second ARP request.
  • the processor 1101 is further configured to generate, according to the acquired network information of the first host and the network information of the second host, a forwarding path between the first host and the second host.
  • the transmitter 1102 is configured to send, to each switch on the forwarding path generated by the processor 1 101, a forwarding flow table, so that each switch on the forwarding path is configured according to the forwarding flow table.
  • a data packet is forwarded between the first host and the second host.
  • the controller provided in this embodiment generates a forwarding path according to the obtained network information of the first host and the second host by acquiring the network information of the first host and the second host, so that the first host and the first host and The second host communicates and resolves the dedicated one in the OpenFlow network.
  • the OpenFlow switch cannot implement the problem of this function, and the effect of the switch that does not need to be separately set to the gateway/routing function in the OpenFlow network is achieved.
  • FIG. 12 a block diagram showing the structure of a controller provided in Embodiment 9 of the present invention is shown. This embodiment is mainly illustrated by the application of the controller to the implementation environment shown in FIG.
  • the controller includes: a memory 1201, a processor 1202, a transmitter 1203, and a receiver 1204.
  • the memory 1201 is configured to pre-store a gateway, a network number, and a subnet mask of a subnet where the first host 440 and the second host 442 are located, and a MAC address of the first gateway and the second gateway. And IP address.
  • the processor 1202 is configured to obtain network information of the first host 440 by using the received first ARP request, where the first ARP request is sent by the first host 440 and is related to the first host 440.
  • the connected switch cannot find the ARP request forwarded to the controller 420 after forwarding the flow table.
  • the processor 1202 is specifically configured to control the receiver 1204 to receive the first ARP request sent by the first host 440.
  • the processor 1202 is further configured to acquire network information of the first host 440 by using the first ARP request received by the receiver 1204.
  • the transmitter 1203 is configured to feed back, by the switch connected to the first host 440, the first ARP response to the first host 440, where the source MAC address and the source IP address in the first ARP response are respectively The MAC address and IP address of the first gateway.
  • the processor 1202 is further configured to acquire network information of the second host 442 by constructing a second ARP request.
  • the processor 1202 is specifically configured to control the receiver 1204 to receive a data packet sent by the first host 440, where a destination MAC address of the data packet is a MAC address of the first gateway, and The IP address is the IP address of the second host 442.
  • the processor 1202 is further configured to construct a second ARP request according to the IP address of the second host 442 in the data packet received by the receiver 1204.
  • the source MAC address and the source IP address of the second ARP request are respectively the MAC address and the IP address of the second gateway, and the destination IP address is the IP of the second host 442.
  • the second gateway is a configuration gateway of the second host 442.
  • the processor 1202 is further configured to control a subnet where the second host 442 is pre-stored by the transmitter 1203 according to the memory 1201. a gateway, a network number, and a subnet mask, where the second ARP request is sent to all hosts in the subnet where the second host 442 is located by using a switch in the subnet where the second host 442 is located; the processor 1202
  • the receiver 1202 is further configured to receive, by using a switch connected to the second host 442, a second ARP response fed back by the second host 442, a source MAC address and a source IP address of the second ARP response.
  • the processor is configured to obtain the network information of the second host 442 according to the second ARP response received by the receiver 1204.
  • the processor 1202 is further configured to generate the first host 440 and the second host 442 according to the acquired network information of the first host 440 and the acquired network information of the second host 442. The forwarding path between.
  • the processor 1202 is further configured to calculate the first host 440 and the network according to the acquired network information of the first host 440 and the acquired network information of the second host 442.
  • the shortest forwarding path between the second host 442; the shortest forwarding path is used as a forwarding path between the first host 440 and the second host 442; or the processor 1202 is further configured to be used according to Calculating the optimal forwarding path between the first host 440 and the second host 442 by using the acquired network information of the first host 440 and the acquired network information of the second host 442;
  • the optimal forwarding path is used as a forwarding path between the first host 440 and the second host 442.
  • the processor 1202 is further configured to send a forwarding flow table to each switch on the generated forwarding path, so that each switch on the forwarding path is in the first host 440 according to the forwarding flow table. And forwarding the data packet with the second host 442.
  • the controller provided in this embodiment obtains network information of the first host and the second host by implementing the ARP function of the first gateway and the second gateway, according to the first host and the pre-stored
  • the information about the subnet where the second host is located and the corresponding gateway information and the obtained network information of the first host and the second host determine a forwarding path, so that all switches in the Open Flow network can implement a simple forwarding function. Resolved a dedicated in the OpenFlow network
  • the OpenFlow switch cannot implement the problem of the gateway/routing function, and the effect of the switch that does not need to be separately set to the gateway/routing function in the OpenFlow network is achieved.
  • FIG. 12 shows a structural block diagram of a controller provided in Embodiment 10 of the present invention. This embodiment is mainly illustrated by the application of the controller to the implementation environment shown in FIG. 6.
  • the controller includes: a memory 1201, a processor 1202, a transmitter 1203, and a receiver 1204.
  • the memory 1201 is configured to pre-store a gateway, a network number, and a subnet mask of a subnet where the first host 640 and the second host 642 are located, and the first proxy device and the second proxy device. MAC address.
  • the processor 1202 is configured to acquire network information of the first host 640 by using the received first ARP request, where the first ARP request is sent by the first host 640 and is related to the first host 640 The connected switch cannot find the ARP request forwarded to the controller 620 after forwarding the flow table.
  • the processor 1202 is specifically configured to control the receiver 1204 to receive the first ARP request sent by the first host 640.
  • the processor 1202 is further configured to pass the receiver.
  • the received first ARP request of 1204 acquires network information of the first host 440.
  • the transmitter 1203 is configured to feed back, by the switch connected to the first host 640, the first ARP response to the first host 640, where the source MAC address in the first ARP response is the MAC address of the first proxy device.
  • the address, the source IP address is the IP address of the second host, so that the first host 640 uses the MAC address of the first proxy device as the MAC address of the second host 642, and the first proxy device corresponds to the The proxy device in the subnet where the first host 640 is located.
  • the processor 1202 is further configured to acquire network information of the second host 642 by constructing a second ARP request.
  • the processor 1202 is specifically configured to control the receiver 1204 to receive a data packet sent by the first host 640, where a destination MAC address of the data packet is a MAC address of the first proxy device, The destination IP address is the IP address of the second host 642.
  • the processor 1202 is further configured to use the second host 642 in the data packet received by the receiver 1204.
  • the IP address of the second ARP request is configured, the source MAC address of the second ARP request is the MAC address of the second proxy device, the source IP address is the IP address of the first host 640, and the destination IP address is the second The IP address of the host 642, so that the second host 642 uses the MAC address of the second proxy device as the MAC address of the first host 640, and the second proxy device corresponds to the second host 642.
  • the proxy device in the subnet; the processor 1202 is further configured to control the sender 1203 to send the second ARP request to the second host by using a switch in a subnet where the second host 642 is located
  • the processor 1202 is further configured to control, according to the gateway, the network number, and the subnet mask of the subnet where the second host 642 is pre-stored by the receiver 1204 according to the memory 1201.
  • the second ARP response fed back by the second host 642 is received by the switch connected to the second host 642, where the source MAC address and the source IP address of the second ARP response are respectively the MAC address of the second host 642. IP address;
  • Processor 1202 is also configured to acquire the second host network response information 642 according to the second ARP received by the receiver 1204.
  • the processor 1202 is further configured to generate the first host 640 and the second host 642 according to the acquired network information of the first host 640 and the acquired network information of the second host 642. The forwarding path between.
  • the processor 1202 is specifically configured to calculate, according to the acquired network information of the first host 640 and the acquired network information of the second host 642, the first host 640 and the first The shortest forwarding path between the two hosts 642; the shortest forwarding path is used as a forwarding path between the first host 640 and the second host 642; or the processor 1202 is further configured to be used according to the Calculating the optimal forwarding path between the first host 640 and the second host 642 by calculating the obtained network information of the first host 640 and the acquired network information of the second host 642; The forwarding path is used as a forwarding path between the first host 640 and the second host 642.
  • the transmitter 1203 is further configured to send, to each switch on the forwarding path generated by the processor 1202, a forwarding flow table, so that each switch on the forwarding path is in the foregoing according to the forwarding flow table.
  • a data packet is forwarded between a host 640 and the second host 642.
  • the controller provided in this embodiment implements the first proxy device and the second proxy.
  • the proxy ARP function of the device acquires network information of the first host and the second host, according to pre-stored information of the first host and the second host where the second host is located, and corresponding gateway information and the obtained first host.
  • the network information of the second host determines the forwarding path, so that all the switches in the OpenFlow network can implement the simple forwarding function, thereby solving the problem that the dedicated OpenFlow switch in the OpenFlow network cannot implement the gateway/routing function. There is no need to separately set the effect of the switch functioning as a gateway/routing function in the OpenFlow network.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

La présente invention appartient au domaine technique des réseaux, et concerne un procédé, une commande et un système de génération d'itinéraires de transmission. Le procédé comporte les étapes consistant à: obtenir des informations de réseau d'un premier hôte en utilisant une première demande d'ARP reçue; obtenir des informations de réseau d'un deuxième hôte en construisant une deuxième demande d'ARP; décider de générer un itinéraire de transmission selon les informations de réseau du premier hôte et du deuxième hôte; et distribuer une table de flux de transmission à chaque commutateur situé sur l'itinéraire de transmission, de telle façon que chaque commutateur situé sur l'itinéraire de transmission transmette un paquet de données entre le premier hôte et le deuxième hôte d'après la table de flux de transmission. Selon la présente invention, une commande est utilisée pour remplacer une partie des commutateurs OpenFlow qui mettent en œuvre une passerelle/un routeur dans un réseau OpenFlow, de façon à résoudre le problème de l'impossibilité pour un commutateur OpenFlow dédié du réseau OpenFlow de mettre en œuvre la fonction, et à faire en sorte qu'il ne soit pas nécessaire de spécifier séparément dans le réseau OpenFlow un commutateur fonctionnant comme passerelle/routeur.
PCT/CN2014/075149 2013-04-22 2014-04-11 Procédé, commande et système de génération d'itinéraires de transmission WO2014173235A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310140475.6 2013-04-22
CN201310140475.6A CN104113474B (zh) 2013-04-22 2013-04-22 转发路径的生成方法、控制器和系统

Publications (1)

Publication Number Publication Date
WO2014173235A1 true WO2014173235A1 (fr) 2014-10-30

Family

ID=51710110

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/075149 WO2014173235A1 (fr) 2013-04-22 2014-04-11 Procédé, commande et système de génération d'itinéraires de transmission

Country Status (2)

Country Link
CN (1) CN104113474B (fr)
WO (1) WO2014173235A1 (fr)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847161B (zh) * 2015-01-15 2019-07-23 南宁富桂精密工业有限公司 控制设备及其控制交换机更新流表的方法
CN107181681B (zh) * 2016-03-10 2022-02-25 中兴通讯股份有限公司 Sdn二层转发方法及系统
CN107465770B (zh) * 2017-08-07 2022-04-15 刘昱 一种sdn网络与非sdn网络通信的方法及装置
CN107404546B (zh) * 2017-08-07 2022-10-14 刘昱 一种sdn网络内的通信方法及装置
CN114172750B (zh) * 2022-02-14 2022-05-13 南京易科腾信息技术有限公司 基于加密机制的网络通信方法、装置及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102349268A (zh) * 2009-03-09 2012-02-08 日本电气株式会社 OpenFlow通信系统和OpenFlow通信方法
WO2012137646A1 (fr) * 2011-04-04 2012-10-11 日本電気株式会社 Système de réseau, commutateur et procédé de détection de terminal de connexion
CN102938794A (zh) * 2012-11-14 2013-02-20 华为技术有限公司 地址解析协议arp消息转发方法、交换机和控制器

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100455130B1 (ko) * 2000-12-23 2004-11-08 엘지전자 주식회사 가상 에이알피 패킷을 이용한 프록시 에이알피 동작 방법
US20060209818A1 (en) * 2005-03-18 2006-09-21 Purser Jimmy R Methods and devices for preventing ARP cache poisoning
CN101072238A (zh) * 2007-07-09 2007-11-14 中兴通讯股份有限公司 在mpls三层虚拟专用网中实现同一子网通信的方法
CN101383835B (zh) * 2008-10-21 2011-07-27 杭州华三通信技术有限公司 一种实现服务器安全隔离的方法及装置
WO2012033041A1 (fr) * 2010-09-09 2012-03-15 日本電気株式会社 Système informatique et procédé de communication dans le système informatique

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102349268A (zh) * 2009-03-09 2012-02-08 日本电气株式会社 OpenFlow通信系统和OpenFlow通信方法
WO2012137646A1 (fr) * 2011-04-04 2012-10-11 日本電気株式会社 Système de réseau, commutateur et procédé de détection de terminal de connexion
CN102938794A (zh) * 2012-11-14 2013-02-20 华为技术有限公司 地址解析协议arp消息转发方法、交换机和控制器

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHANG, HE ET AL.: "An Implement of Cross-network Transmission Based on OpenFlow", SCIENCEPAPER, 13 July 2011 (2011-07-13), Retrieved from the Internet <URL:http://www.paper.edu.cn/releasepaper/content/201107-194> *

Also Published As

Publication number Publication date
CN104113474A (zh) 2014-10-22
CN104113474B (zh) 2017-08-29

Similar Documents

Publication Publication Date Title
US8995444B2 (en) Method and system for extending routing domain to non-routing end stations
EP2974133B1 (fr) Procédé et système de contrôle de réseau physique sous-jacent par un réseau défini par logiciel
EP2907279B1 (fr) Garantie d&#39;accessibilité sans contraintes au moyen d&#39;une transmission de couche 3 opportuniste dans des environnements de centre de données à grande échelle
JP2017028698A (ja) トラフィック切り替え方法、デバイス、およびシステム
US20160330167A1 (en) Arp Implementation Method, Switch Device, and Control Device
WO2011120459A2 (fr) Procédé, équipement, et dispositif de réseau pour réacheminements de messages
WO2015180084A1 (fr) Procédé de transfert de paquets, et passerelle vxlan
JP6570740B2 (ja) クラスター通信
WO2008077333A1 (fr) Procédé, système et routeur pour mettre en œuvre une communication entre des dispositifs ip
JP2012217178A5 (fr)
CN101043430B (zh) 一种设备之间网络地址转换的方法
JP3813571B2 (ja) 境界ルータ装置、通信システム、ルーティング方法、及びルーティングプログラム
WO2012075731A1 (fr) Procédé et dispositif de détection d&#39;incident sur liaison et de reprise subséquente par interaction par protocole de résolution d&#39;adresse (arp)
WO2014173235A1 (fr) Procédé, commande et système de génération d&#39;itinéraires de transmission
CN101257447A (zh) 一种负载分担的方法、系统及路由装置
WO2012130083A1 (fr) Procédé et dispositif de configuration d&#39;entrée de table de protocole de résolution d&#39;adresses (protocole arp)
CN102801623A (zh) 一种多接入数据转发方法及设备
JP2007208818A (ja) マルチホーム接続方法と装置
US9755939B2 (en) Network wide source group tag binding propagation
US20160218958A1 (en) Method and system for forwarding packet in id/locator separation environment
WO2013152496A1 (fr) Procédés et appareils d&#39;envoi et de réception d&#39;informations
WO2012041168A1 (fr) Procédé de traitement pour une connexion à distance destinée à un réseau ipv6 et dispositif associé
WO2009121265A1 (fr) Procédé et équipement pour mettre en œuvre une ingénierie de trafic dans un réseau à hébergement multiple et à espace adresse multiple
WO2015010532A1 (fr) Procédé de génération d&#39;entrées de table de routage et entité de protocole de passerelle frontière
WO2015100551A1 (fr) Procédé, dispositif et système de transmission d&#39;informations

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14787842

Country of ref document: EP

Kind code of ref document: A1