WO2014166073A1 - 报文转发方法和网络设备 - Google Patents

报文转发方法和网络设备 Download PDF

Info

Publication number
WO2014166073A1
WO2014166073A1 PCT/CN2013/073985 CN2013073985W WO2014166073A1 WO 2014166073 A1 WO2014166073 A1 WO 2014166073A1 CN 2013073985 W CN2013073985 W CN 2013073985W WO 2014166073 A1 WO2014166073 A1 WO 2014166073A1
Authority
WO
WIPO (PCT)
Prior art keywords
forwarding
network device
message
label
action information
Prior art date
Application number
PCT/CN2013/073985
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 PCT/CN2013/073985 priority Critical patent/WO2014166073A1/zh
Priority to CN201380000374.7A priority patent/CN104488235B/zh
Publication of WO2014166073A1 publication Critical patent/WO2014166073A1/zh

Links

Classifications

    • 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
    • H04L45/745Address table lookup; Address filtering

Definitions

  • the present invention relates to the field of communications, and in particular, to a packet forwarding method and a network device. Background technique
  • OUTPUT is the outbound interface forwarding action defined by the OpenFlow standard.
  • the number (OUTPUT PORTID) is indicated.
  • the existing OpenFlow hardware forwarding plane is simple.
  • the OUTPUT action relies on the outbound interface encapsulation method of the hardware device.
  • the general hardware such as x86
  • software is used for forwarding, and the forwarding capability is limited and the forwarding speed is slow.
  • the embodiment of the present invention addresses the problem that the network, for example, the OpenFlow network has limited forwarding capability and slow forwarding speed.
  • a packet forwarding method including:
  • the network device receives the message
  • the network device searches the flow table according to the matching item corresponding to the packet to obtain a first outbound interface, where the first outbound interface is an outbound interface corresponding to the matching item, and the flow table includes at least one flow entry, where the flow entry includes a matching item and a corresponding outbound interface;
  • the network device searches for the forwarding relationship mapping information by using the first outgoing interface as a key to obtain the first forwarding action information, where the first forwarding action information is corresponding to the first outgoing interface, and the first forwarding action information is used by The first forwarding mode and the first forwarding label are identified, and the forwarding relationship mapping information is stored in the network device, where the forwarding relationship mapping information includes: a correspondence between the outgoing interface and the forwarding action information;
  • the network device forwards the packet according to the first forwarding action information.
  • the first forwarding label is an IP address
  • the network device forwards the information according to the first forwarding action information.
  • the message includes: the network device searches the routing table by using the first forwarding label as a key to forward the packet.
  • the first forwarding label is a virtual local area network identifier VLAN ID; And forwarding, by the network device, the media access control MAC address table of the VLAN to which the VLAN ID belongs according to the first forwarding label; and the network device according to the purpose of the packet
  • the MAC address looks up the MAC address table to forward the message.
  • the first forwarding label when the first forwarding mode is Ethernet forwarding, the first forwarding label is a MAC address, and the network device forwards the information according to the first forwarding action information.
  • the message includes: the network device searches the MAC address table by using the first forwarding label as a key to forward the packet.
  • the first forwarding label includes a VLAN ID and a MAC address
  • the network device forwarding the packet according to the first forwarding action information includes: the network device Obtaining, according to the first forwarding label, a MAC address table of a VLAN to which the VLAN ID belongs; and
  • the network device searches the MAC address table according to the MAC address to forward the packet.
  • the first forwarding label is a virtual private network identifier VPN ID
  • the first forwarding action information forwarding the message includes: the network device obtaining, according to the first forwarding label, a routing table of a VPN to which the VPN ID belongs;
  • the network device searches the routing table of the VPN to which the VPN ID belongs according to the destination IP address of the packet to forward the packet.
  • the network device when the first forwarding mode is multi-protocol label switching MPLS forwarding, the first forwarding label is an MPLS label LABEL; the network device is according to the first Forwarding the message to forward the message includes: the network device searches the MPLS forwarding table by using the first forwarding label as a key to forward the packet.
  • the first forwarding label is a tunnel identifier TUNNEL ID; and the network device is configured according to the first forwarding action.
  • the information forwarding the message includes: the network device searches the tunnel forwarding table by using the TUNNEL ID as a key to forward the packet.
  • a packet forwarding method including:
  • the network device receives the message
  • the network device obtains, according to the packet header of the packet, the packet corresponding to the packet Match
  • the network device searches for the forwarding information table according to the matching item corresponding to the packet, and obtains the first forwarding action information, where the first forwarding action information is used to identify the first forwarding mode and the first forwarding label, and the forwarding information table
  • the network device generates, according to the flow table and the forwarding relationship mapping information, the forwarding information table includes: the matching item and the forwarding action information; the flow table includes a matching item and the outbound interface;
  • the mapping information includes: a correspondence between the outgoing interface and the forwarding action information;
  • the network device forwards the packet according to the first forwarding action information.
  • the first forwarding label is an IP address
  • the network device forwards the information according to the first forwarding action information.
  • the message includes: the network device searches the routing table by using the first forwarding label as a key to forward the packet.
  • the first forwarding label is a VLAN ID
  • the network device forwards the information according to the first forwarding action information.
  • the packet includes: the network device obtaining, according to the first forwarding label, a MAC address table of a VLAN to which the VLAN ID belongs; and
  • the network device searches the MAC address table according to the destination MAC address of the packet to forward the packet.
  • the first forwarding label is a MAC address
  • the network device forwards the information according to the first forwarding action information.
  • the message includes: the network device searches the MAC address table by using the first forwarding label as a key to forward the packet.
  • the first forwarding label further includes a MAC address
  • the network device is configured according to the first forwarding action
  • Forwarding the message includes: obtaining, by the network device, a MAC address table of a VLAN to which the VLAN ID belongs according to the first forwarding label;
  • the network device searches the MAC address table according to the MAC address to forward the packet.
  • the first forwarding label is a VPN ID
  • the network device forwards the information according to the first forwarding action information.
  • the packet includes: the network device obtaining, according to the first forwarding label, a routing table of a VPN to which the VPN ID belongs;
  • the network device searches the routing table of the VPN to which the VPN ID belongs according to the destination IP address of the packet to forward the packet.
  • the first forwarding label is an MPLS label LABEL; and the network device forwards according to the first forwarding action information.
  • the packet includes: the network device searches the MPLS forwarding table by using the first forwarding label as a key to forward the packet.
  • the first forwarding label is a TUNNEL ID; and the network device forwards the information according to the first forwarding action information.
  • the message includes: the network device searches the tunnel forwarding table by using the TUNNEL ID as a key to forward the packet.
  • a network device including a receiving unit, a processing unit, and a sending unit, where:
  • the receiving unit is configured to receive a message
  • the processing unit is configured to obtain, according to the packet header of the packet, a matching item corresponding to the packet, and find the flow table according to the matching item corresponding to the packet. Obtaining a first outbound interface, where the first outbound interface is an outbound interface corresponding to the matching item, and the flow table includes at least one flow entry, where the flow entry includes a matching item and a corresponding outbound interface.
  • the forwarding relationship mapping information To obtain the first forwarding action information, where the first forwarding action information is corresponding to the first outgoing interface, and the first forwarding action information is used to identify a forwarding mode and a first forwarding label, where the forwarding relationship mapping information is stored in the network device, where the forwarding relationship mapping information includes: a correspondence between the outbound interface and the forwarding action information;
  • the sending unit is configured to forward the packet according to the first forwarding action information.
  • the processing unit when the first forwarding mode is IP forwarding, the first forwarding label is an IP address, and the processing unit triggers the sending unit according to the first
  • the forwarding action information forwarding the message includes: the processing unit triggers the sending unit to use the first forwarding tag as a key to search a routing table to forward the message.
  • the processing unit triggers the sending unit according to the first Forwarding the message to forward the message includes: the processing unit triggers the sending unit to obtain, according to the first forwarding label, a MAC address table of a VLAN to which the VLAN ID belongs, and search for a destination MAC address according to the destination MAC address of the packet.
  • the MAC address table is described to forward the message.
  • the processing unit triggers the sending unit according to the first
  • the forwarding action information forwarding the message includes: the processing unit triggers the sending unit to use the first forwarding label as a key to search a MAC address table to forward the message.
  • a network device including a receiving unit, a processing unit, and a sending unit, where:
  • the receiving unit is configured to receive a message
  • the processing unit is configured to obtain, according to the packet header of the packet, a matching item corresponding to the packet, and find a forwarding information table according to the matching item corresponding to the packet, and obtain the first forwarding action information, where The first forwarding action information is used to identify the first forwarding mode and the first forwarding label, where the forwarding information table is generated by the network device according to the flow table and the forwarding relationship mapping information, where the forwarding information table includes: the matching And the forwarding action information; the flow table includes a matching item and the outbound interface; the forwarding relationship mapping information includes: a correspondence between the outgoing interface and the forwarding action information;
  • the sending unit is configured to forward the packet according to the first forwarding action information.
  • the processing unit when the first forwarding mode is IP forwarding, the first forwarding label is an IP address, and the processing unit triggers the sending unit according to the first
  • the forwarding action information forwarding the message includes: the processing unit triggers the sending unit to use the first forwarding tag as a key to search a routing table to forward the message.
  • the processing unit when the first forwarding mode is VLAN forwarding, the first forwarding label is a VLAN ID; the processing unit triggers the sending unit to be according to the first Forwarding the message to forward the message includes: the processing unit triggers the sending unit to obtain, according to the first forwarding label, a MAC address table of a VLAN to which the VLAN ID belongs, and search for a destination MAC address according to the destination MAC address of the packet.
  • the MAC address table is described to forward the message.
  • the processing unit when the first forwarding mode is Ethernet forwarding, the first forwarding label is a MAC address, and the processing unit triggers the sending unit according to the first Forwarding action information forwarding
  • the message includes: the processing unit triggers the sending unit to use the first forwarding label as a key to search a MAC address table to forward the packet.
  • the network device receives the packet, and obtains the first forwarding action information corresponding to the packet according to the forwarding relationship mapping information, and forwards the packet according to the first forwarding action information, and is not subject to the network, for example: OpenFlow network
  • OpenFlow network The hardware capabilities, which improve the forwarding and forwarding speed of the network.
  • FIG. 1 is a flowchart of a packet forwarding method according to Embodiment 1 of the present invention
  • Figure lb is a schematic diagram of forwarding of OpenFlow in a packet forwarding method according to a first embodiment of the present invention
  • FIG. 1 is a schematic diagram of a conventional forwarding plane in a packet forwarding method according to Embodiment 1 of the present invention
  • FIG. 2a is a flowchart of a packet forwarding method according to Embodiment 2 of the present invention.
  • FIG. 2b is a schematic diagram of application of a packet forwarding method in an OpenFlow network according to Embodiment 2 of the present invention
  • FIG. 2c is a schematic diagram of a route in IP forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • FIG. 2 is a schematic diagram of VLAN forwarding in a packet forwarding method according to Embodiment 2 of the present invention
  • FIG. 2 e is a schematic diagram of V PN forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • FIG. 2 is a schematic diagram of MPLS forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • FIG. 2G is a schematic diagram of tunnel forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • FIG. 3 is a flowchart of a method for forwarding a packet according to Embodiment 3 of the present invention.
  • FIG. 4a is a flowchart of a packet forwarding method according to Embodiment 4 of the present invention.
  • FIG. 4b is a schematic diagram of an application of a packet forwarding method in an OpenFlow network according to Embodiment 4 of the present invention.
  • FIG. 5 is a structural block diagram of a network device according to Embodiment 5 of the present invention.
  • FIG. 6 is a structural block diagram of a network device according to Embodiment 6 of the present invention.
  • FIG. 7 is a structural block diagram of a network device according to Embodiment 7 of the present invention. detailed description
  • FIG la is a flowchart of a packet forwarding method according to the embodiment of the present invention. As shown in Figure la, the packet forwarding method may include the following steps: Step 101: The network device receives the packet.
  • Step 102 The network device obtains, according to the packet header of the packet, a matching item corresponding to the packet.
  • Step 103 The network device searches for the flow table according to the matching item corresponding to the packet, and obtains a first outbound interface, where the first outbound interface is an outbound interface corresponding to the matching item corresponding to the packet;
  • the flow table includes at least one flow entry, and the flow entry includes a matching item (MATCH Field(s)) and a corresponding outgoing interface (OUTPUT);
  • Step 104 The network device searches for the forwarding relationship mapping information by using the first outbound interface as a key (KEY) to obtain the first forwarding action information, where the first forwarding action information corresponds to the first outgoing interface, where the The forwarding action information is used to identify the first forwarding mode and the first forwarding label, and the forwarding relationship mapping information is stored in the network device, where the forwarding relationship mapping information includes: a correspondence between the outbound interface and the forwarding action information;
  • the forwarding relationship mapping information may be manually configured, or generated according to information sent by the controller, such as: outbound interface attribute information, a switch forwarding table, such as a MAC address table, a LAN forwarding table, and an IP routing table.
  • a switch forwarding table such as a MAC address table, a LAN forwarding table, and an IP routing table.
  • Step 105 The network device forwards the packet according to the first forwarding action information.
  • the scenario in which the network device forwards the packet may include, but is not limited to, any one or more of the following scenarios, for the different first forwarding modes and the first forwarding label.
  • the first forwarding label is an IP address
  • the network device forwards the packet according to the first forwarding action information.
  • the network device searches the routing table by using the first forwarding label as a key to forward the packet.
  • the first forwarding mode is a VLAN (Virtual Local Area)
  • the virtual local area network is forwarded
  • the first forwarding label is a virtual local area network identifier VLAN ID
  • the network device forwarding the message according to the first forwarding action information includes: the network device is forwarded according to the first forwarding Obtaining, by the tag, a media access control MAC (Media Access Control) forwarding table of the VLAN to which the VLAN ID belongs;
  • MAC Media Access Control
  • the network device searches the MAC address table according to the destination MAC address of the packet to forward the packet.
  • the network device forwarding the packet according to the first forwarding action information includes:
  • the network device searches the MAC address table according to the MAC address to forward the packet.
  • Scenario 3 When the first forwarding mode is Ethernet forwarding, the first forwarding label is a MAC address, and the network device forwarding the packet according to the first forwarding action information includes: The first forwarding label searches for a MAC address table for a keyword to forward the message.
  • the first forwarding mode is a VPN (Virtual Private Network) forwarding
  • the first forwarding label is a virtual private network identifier VPN ID
  • the network device is configured according to the first forwarding action information. Forwarding the packet includes: the network device obtaining, according to the first forwarding label, a routing table of a VPN to which the VPN ID belongs;
  • the network device searches the routing table of the VPN to which the VPN ID belongs according to the destination IP address of the packet to forward the packet.
  • Scenario 5 When the first forwarding mode is MPLS (Multi-Protocol Label Switching) forwarding, the first forwarding label
  • the MPLS label LABEL is forwarded by the network device according to the first forwarding action information.
  • the network device searches for the MPLS forwarding table by using the first forwarding label as a key to forward the packet.
  • MPLS Multi-Protocol Label Switching
  • the network device forwarding the packet according to the first forwarding action information includes: the network The device searches the tunnel forwarding table by using the TUNNEL ID as a key to forward the packet.
  • the network for example, the forwarding of the OpenFlow network is combined with the traditional forwarding, and the requirements of the outgoing interface are implemented by using the traditional forwarding, so that the forwarding of the OpenFlow and the traditional forwarding are coordinated.
  • a network device that combines the OpenFlow and the traditional forwarding mode that is, the OpenFlow Hybrid (OF-Hybrid) network device, forwards the packet.
  • Figure lb is a schematic diagram of forwarding of OpenFlow in the packet forwarding method according to the embodiment of the present invention. As shown in Figure lb, the processing packet is transmitted through the flowtable pipeline, and finally the packet is sent out through the outbound interface (OUTPUT). .
  • Figure lc is a schematic diagram of a conventional forwarding plane in a packet forwarding method according to a first embodiment of the present invention.
  • a conventional forwarding device may perform any one of IP, VLAN, MAC, VPN, MPLS, tunnel (TUNNEL) or the like.
  • IP IP
  • VLAN virtual local area network
  • MAC physical access control
  • VPN virtual private network
  • the network device may obtain the first outgoing interface according to the matching entry of the packet, and use the first outgoing interface as a keyword to search for the forwarding relationship mapping information, obtain the first forwarding action information, and adopt the first forwarding action.
  • the information is forwarded by the message, and the packet forwarding method is not subject to the hardware capability of the network, which improves the forwarding capability and forwarding speed of the network.
  • the interface (OUTPUT) action can be realized, which is easy to standardize.
  • the types of outgoing interfaces are various, for example, the physical outgoing interface, the logical outgoing interface, and the tunnel outgoing interface can be unified. OUTPUT PORTID expression.
  • FIG. 2 is a flowchart of a packet forwarding method according to Embodiment 2 of the present invention
  • FIG. 2b is a schematic diagram of application of a packet forwarding method in an OpenFlow network according to Embodiment 2 of the present invention.
  • the application of the packet forwarding method in an OpenFlow network may specifically include the following steps:
  • Step 201 In an OpenFlow network, a network device, such as a HAL (Hardware Abstract Layer) of a switch, sends forwarding relationship mapping information to a forwarding plane.
  • HAL Hardware Abstract Layer
  • the forwarding relationship mapping information may include: a correspondence between the outbound interface and the forwarding action information, for example, the first outbound interface OUTPUT PORTID_l corresponds to REDIRECT IP and the like.
  • the forwarding relationship mapping information may be manually configured, or generated according to information sent by the controller, such as: outbound interface attribute information, switch forwarding table, such as: MAC address table, LAN forwarding table, IP routing table, and the like.
  • the forwarding relationship mapping information is pre-configured or generated in the forwarding plane, and may be pre-configured or generated in the HAL and sent to the forwarding plane by the HAL.
  • Step 202 The flow table sent by the HAL receiving controller (Controller) to the switch (Switch);
  • Step 203 The HAL sends the received flow table to a forwarding plane of the switch (Switch).
  • Step 204 After receiving the packet, the forwarding plane obtains the matching item corresponding to the packet from the packet header of the packet, for example: MATCH_1 in Figure 2b, first searching from the OpenFlow forwarding table, if the matching entry is The outbound interface extracted from the flow table of the MATCH_1 hit is the first outbound interface OUTPUT PORTID 1 , and the OUTPUT PORTID_l is used as the key (KEY ) to search in the forwarding relationship mapping information, for example: from the forwarding relationship mapping table including the forwarding relationship mapping information Hit The first forwarding action information corresponding to the first outgoing interface is extracted from the entry.
  • MATCH_1 in Figure 2b first searching from the OpenFlow forwarding table, if the matching entry is The outbound interface extracted from the flow table of the MATCH_1 hit is the first outbound interface OUTPUT PORTID 1 , and the OUTPUT PORTID_l is used as the key (KEY ) to search in the forwarding relationship mapping information, for example: from the forward
  • Step 205 The forwarding plane forwards the packet according to the first forwarding action information. Specifically, when the first forwarding mode of the first forwarding action information is different from the first forwarding label, the method for forwarding the packet is different, and may include, but is not limited to, any one or more of the following scenarios.
  • the first forwarding label is an IP address.
  • the first forwarding action information in the entry _1 of the first outbound interface OUTPUT PORTID_1 is REDIRECT IP
  • the first forwarding mode is IP forwarding
  • the first forwarding label is an IP address.
  • the IP address specified by the first forwarding label in the redirected IP (REDIRECT IP) is used as a key to look up the routing table of the traditional forwarding plane IP forwarding (IP FORWARDING), and the packet is matched from the routing entry matching the IP address.
  • the specified outgoing interface is sent out.
  • the direct-connected IP route can be used to abstract the outgoing interface, that is, the IP address of the peer interface is used as the abstraction of the outgoing interface.
  • the direct route can also be replaced with the route of the protocol route and the static route.
  • FIG. 2c is a schematic diagram of a route in IP forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • OUTPUT G 1/ 1/01 indicates that a packet is sent from a G 1/ 1/01 interface.
  • Setting OUTPUT G 1/ 1/01 on OF-Hybrid network devices Rl, R2 can be translated as REDIRECT 10.
  • 1.1.2, Check FIB (Forward Information Base) table is sent from G 1/ 1/01 ;
  • the outbound interface can be converted into a traditional forwarding such as VLAN, MAC, VPN, MPLS, and TUNNEL.
  • a traditional forwarding such as VLAN, MAC, VPN, MPLS, and TUNNEL.
  • FIG. 2 is a schematic diagram of VLAN forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • the first forwarding mode is VLAN forwarding
  • the first forwarding label VLAN ID is VLAN_1.
  • the MAC address table of the VLAN to which the VLAN_1 belongs may also be searched according to the MAC address specified by the first forwarding label. If there is a matching entry, the outgoing interface is forwarded directly from the MAC address entry. Or, if it does not match any MAC address entry, it forwards the packet directly from all interfaces of the VLAN to which this VLAN_1 belongs. Of course, if no match is made, it is achievable to forward packets directly from all interfaces of the VLAN to which this VLAN_1 belongs.
  • Scenario 3 When the first forwarding mode is Ethernet forwarding, the first forwarding label is a MAC address. This scenario is generally applied to a Layer 2 switch and has no Layer 3 function.
  • the first forwarding action information of the entry_1_1 of the first outbound interface OUTPUT PORTID_1 is REDIRECT MAC
  • the first forwarding mode is Ethernet forwarding
  • the first forwarding label is MAC address.
  • the interface is forwarded to the Ethernet.
  • the MAC address table is used to query the MAC address table. If there is a matching MAC address entry, the interface forwards the packet from the MAC address entry.
  • FIG. 2 is a schematic diagram of V PN forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • the first forwarding action information of the entry_1_1 of the first outbound interface OUTPUT PORTID_1 is REDIRECT VPN_1
  • the first forwarding mode is VPN forwarding
  • the first forwarding label VPN ID is VPN_1.
  • the forwarding process can update the Layer 2 header information of the data packet.
  • Scenario 5 For the selected forwarding mode, MPLS forwarding;
  • FIG. 2f is a schematic diagram of MPLS forwarding in a packet forwarding method according to Embodiment 2 of the present invention.
  • the first forwarding action information of the entry_1_1 of the first outbound interface OUTPUT PORTID_1 is REDIRECT LABEL 1
  • the first forwarding mode is MPLS forwarding
  • the first forwarding label LABEL ID is LABEL_1.
  • you can redirect to MPLS forwarding look up the MPLS forwarding table with LABEL_1 as the key word, and encapsulate and forward the packet according to the outgoing interface and encapsulation requirements of LABEL_1 in the MPLS forwarding table.
  • the packet is a newly encapsulated Layer 2 header and an MPLS label for the LSP (Label Switched Path) tunnel.
  • LSP Label Switched Path
  • the P device forwards the packet.
  • the Layer 2 header of the packet and the MPLS label are removed.
  • FIG. 2g is a schematic diagram of tunnel forwarding in the packet forwarding method according to the second embodiment of the present invention, as shown in FIG. 2g, if the first outbound interface OUTPUT PORTID_l hits the entry
  • the first forwarding action information REDIRECT TUNNEL 1 of _1 indicates that the first forwarding mode is tunnel (TUNNEL) forwarding, and the first forwarding label tunnel identifier (TUNNEL ID) is TUNNEL_1.
  • the TUNNEL_1 is used to query the TUNNEL forwarding table, and the packet is encapsulated and forwarded according to the outbound interface and encapsulation requirements of the TUNNEL forwarding table.
  • the TUNNEL forwarding table may be a tunnel type such as a GRE (Generic Routing Encapsulation), an LSP, an L2TP (Layer 2 Tunneling Protocol), or an IPsec (Internet Protocol Security) protocol.
  • GRE Generic Routing Encapsulation
  • LSP Layer 2 Tunneling Protocol
  • L2TP Layer 2 Tunneling Protocol
  • IPsec Internet Protocol Security
  • the switch may obtain the first outbound interface according to the matching entry of the packet, and use the first outbound interface as a key to search for the forwarding relationship mapping information, and obtain the first forwarding action information.
  • the forwarding action information forwards the packet, and the packet forwarding method is not subject to the hardware capability of the network, and improves the forwarding capability and forwarding speed of the network.
  • the OUTPUT action can be implemented, which is easy to standardize.
  • the types of outgoing interfaces are various, for example: physical outgoing interface, logical outgoing interface, tunnel outgoing interface, etc., which can be uniformly expressed by using OUTPUT PORTID.
  • FIG. 3 is a flowchart of a packet forwarding method according to Embodiment 3 of the present invention. As shown in FIG. 3, the packet forwarding method may include the following steps:
  • Step 301 A network device receives a packet.
  • Step 302 The network device obtains, according to the packet header of the packet, a matching item corresponding to the packet.
  • Step 303 The network device searches for the forwarding information table according to the matching item corresponding to the packet, and obtains the first forwarding action information, where the first forwarding action information is used to identify the first forwarding mode and the first forwarding label.
  • the forwarding information table is generated by the network device according to the flow table and the forwarding relationship mapping information, where the forwarding information table includes: the matching item and forwarding action information; the flow table includes a matching item and the outgoing interface
  • the forwarding relationship mapping information includes: the outbound interface and Corresponding relationship of forwarding action information;
  • Step 304 The network device forwards the packet according to the first forwarding action information.
  • the scenario in which the network device forwards the packet may include, but is not limited to, any one or more of the following scenarios, for the different first forwarding modes and the first forwarding label.
  • Scenario 1 When the first forwarding mode is IP forwarding, the first forwarding label is an IP address, and the network device forwarding the packet according to the first forwarding action information includes: The first forwarding label is a keyword lookup routing table to forward the packet.
  • the network device forwarding the packet according to the first forwarding action information includes: Determining, by the first forwarding label, a MAC address table of a VLAN to which the VLAN ID belongs;
  • the network device searches the MAC address table according to the destination MAC address of the packet to forward the packet.
  • the network device forwarding the packet according to the first forwarding action information includes:
  • the network device searches the MAC address table according to the MAC address to forward the packet.
  • Scenario 3 When the first forwarding mode is Ethernet forwarding, the first forwarding label is a MAC address, and the network device forwarding the packet according to the first forwarding action information includes: The first forwarding label searches for a MAC address table for a keyword to forward the message.
  • Scenario 4 When the first forwarding mode is VPN forwarding, the first forwarding label is a VPN ID, and the network device forwarding the packet according to the first forwarding action information includes: The first forwarding label obtains a routing table of the VPN to which the VPN ID belongs;
  • the network device searches the routing table of the VPN to which the VPN ID belongs according to the destination IP address of the packet to forward the packet.
  • the first forwarding label is an MPLS label LABEL; and the network device forwarding the packet according to the first forwarding action information includes: The first forwarding label searches for an MPLS forwarding table for a keyword to forward the packet.
  • the first forwarding mode is TUNNEL forwarding
  • the first forwarding label is a TUNNEL ID
  • the network device forwarding the packet according to the first forwarding action information includes:
  • the TUNNEL ID is a keyword lookup tunnel forwarding table to forward the message.
  • the forwarding of the network for example, the OpenFlow network
  • the traditional forwarding is used to implement the outbound interface.
  • the OF-Hybrid device forwards packets.
  • the network device may generate a forwarding information table according to the flow table and the forwarding relationship mapping information.
  • the forwarding information table includes: a matching item and a forwarding action information.
  • the network device may find the matching item according to the packet.
  • the forwarding information table is used to obtain the first forwarding action information, and the first forwarding action information is used to forward the message.
  • the packet forwarding method is not subject to the hardware capability of the network, and improves the forwarding capability and forwarding speed of the network. And on any hybrid device with traditional forwarding capability, such as: OF-Hybrid device, the interface (OUTPUT) action can be realized, which is easy to standardize. Further, the types of outgoing interfaces are various, for example, the physical outgoing interface, the logical outgoing interface, and the tunnel outgoing interface can be uniformly expressed. Embodiment 4
  • FIG. 4a is a flowchart of a packet forwarding method according to Embodiment 4 of the present invention
  • FIG. 4b is a schematic diagram of application of a packet forwarding method in an OpenFlow network according to Embodiment 4 of the present invention.
  • the application of the packet forwarding method in an OpenFlow network may specifically include the following steps:
  • Step 401 In an OpenFlow network, a flow carrying the outbound interface information sent by the HAL receiving controller (Controller) of the switch (Switch), where the forwarding relationship mapping information may include: an outbound interface and a forwarding action Correspondence of information, for example: First outbound interface OUTPUT PORTID_l corresponds to REDIRECT IP and so on.
  • the forwarding relationship mapping information may be manually configured, or generated according to information sent by the controller, such as: outbound interface attribute information, switch forwarding table, such as: MAC address table, LAN forwarding table, IP routing table, and the like.
  • the forwarding relationship mapping information may be pre-configured or generated in the HAL.
  • Step 402 The HAL generates a forwarding information table according to the flow table and the forwarding relationship mapping information, where the forwarding information table includes: a matching item and forwarding action information, for example: MATCH_1 in FIG. 4b is a matching item, and REDIRECT IP is a forwarding action. information.
  • Step 403 The HAL of the switch sends the translated forwarding information table to the forwarding plane of the switch.
  • Step 404 After receiving the packet, the forwarding plane obtains a matching item corresponding to the packet from the packet header of the packet, for example: MATCH_1, searches for a matching flow table from the forwarding information table, and extracts the flow table from the hitting flow table.
  • the first forwarding action information is, for example, REDIRECT IP, wherein the first forwarding action information corresponds to the first outbound interface OUTPUT PORTID 1.
  • Step 405 The forwarding plane forwards the packet according to the first forwarding action information. Specifically, the first forwarding manner and the first in the first forwarding action information When a forwarding label is different, the method for forwarding the packet is different, for example, redirecting to any one or more forwarding modes such as IP, VLAN, MAC, VPN, MPLS, tunnel (TUNNEL), etc., but may be referred to, but not limited to, Each scenario in the second embodiment above.
  • the method for forwarding the packet is different, for example, redirecting to any one or more forwarding modes such as IP, VLAN, MAC, VPN, MPLS, tunnel (TUNNEL), etc.
  • the network device may generate a forwarding information table according to the flow table and the forwarding relationship mapping information.
  • the forwarding information table includes: a matching item and a forwarding action information.
  • the network device may find the matching item according to the packet.
  • the forwarding information table is used to obtain the first forwarding action information, and the first forwarding action information is used to forward the message.
  • the packet forwarding method is not subject to the hardware capability of the network, and improves the forwarding capability and forwarding speed of the network.
  • the interface (OUTPUT) action can be realized, which is easy to standardize.
  • the types of outgoing interfaces are various, for example, the physical outgoing interface, the logical outgoing interface, and the tunnel outgoing interface can be uniformly expressed by using OUTPUT PORTID.
  • the network device includes: a receiving unit 5 1 , a processing unit 53 , and a sending unit 55 , where the receiving unit 51 is configured to receive Message
  • the processing unit 53 is configured to obtain, according to the packet header of the packet, a matching item corresponding to the packet, and find the first outbound interface according to the matching item corresponding to the packet.
  • the first outbound interface is an outbound interface corresponding to the matching item, and the flow table includes at least one flow entry, where the flow entry includes a matching item and a corresponding outbound interface;
  • the interface searches for the forwarding relationship mapping information as a key, and obtains the first forwarding action information, where the first forwarding action information is corresponding to the first outgoing interface, and the first forwarding action information is used to identify the first forwarding mode and the first forwarding a label, the forwarding relationship mapping information is saved in
  • the forwarding relationship mapping information includes: a correspondence between an outgoing interface and forwarding action information;
  • the sending unit 55 is configured to forward the message according to the first forwarding action information.
  • the processing unit 53 of the network device triggering the sending unit 55 to forward the packet may include, but is not limited to, any one or more of the following scenarios. Related descriptions in the packet forwarding method in the first embodiment and the second embodiment.
  • the first forwarding label is an IP address.
  • the processing unit 53 triggers the sending unit 55 to forward the packet according to the first forwarding action information.
  • the processing unit 53 triggers the sending unit 55 to use the first forwarding label as a key to search a routing table to forward the packet.
  • Scenario 2 When the first forwarding mode is VLAN forwarding, the first forwarding label is a VLAN ID, and the processing unit 53 triggers the sending unit 55 to forward the packet according to the first forwarding action information.
  • the processing unit 53 triggers the sending unit 55 to obtain a MAC address table of the VLAN to which the VLAN ID belongs according to the first forwarding label, and search the MAC address table according to the destination MAC address of the packet to forward the Said message.
  • the processing unit 53 triggers the sending unit 55 to forward the packet according to the first forwarding action information, where the processing unit 53 is:
  • the sending unit 55 is configured to obtain a MAC address table of a VLAN to which the VLAN ID belongs according to the first forwarding label, and search the MAC address table according to the MAC address to forward the packet.
  • Scenario 3 When the first forwarding mode is Ethernet forwarding, the first forwarding label is a MAC address; the processing unit 53 triggers the sending unit 55 to The first forwarding action information forwarding the message includes: the processing unit 53 triggers the sending unit 55 to search the MAC address table by using the first forwarding label as a key to forward the message.
  • the processing unit 53 triggers the sending unit 55 to forward the information according to the first forwarding action information.
  • the processing unit includes: the processing unit 53 triggers the sending unit 55 to obtain a routing table of the VPN to which the VPN ID belongs according to the first forwarding label, and search for the VPN ID according to the destination IP address of the packet. The routing table of the VPN to forward the message.
  • Scenario 5 When the first forwarding mode is MPLS forwarding, the first forwarding label is an MPLS label LABEL; the processing unit 53 triggers the sending unit 55 to forward the packet according to the first forwarding action information. The processing unit 53 triggers the sending unit 55 to search the MPLS forwarding table by using the first forwarding label as a key to forward the packet.
  • the processing unit 53 triggers the sending unit 55 to forward the information according to the first forwarding action information.
  • the message includes: the processing unit 53 triggers the sending unit 55 to search the tunnel forwarding table by using the TUNNEL ID as a key to forward the packet.
  • the processing unit of the network device in this embodiment may obtain the first outbound interface according to the matching entry search flow table corresponding to the packet, and use the first outgoing interface as a key to search for the forwarding relationship mapping information, obtain the first forwarding action information, and trigger the sending.
  • the unit forwards the message by using the first forwarding action information, which is not subject to the hardware capability of the network, and improves the forwarding capability and forwarding speed of the network.
  • the interface (OUTPUT) action can be realized, which is easy to standardize.
  • the types of outgoing interfaces are various, for example, physical outgoing interface, logical outgoing interface, tunnel outgoing interface, etc.
  • FIG. 6 is a structural block diagram of a network device according to Embodiment 6 of the present invention.
  • the network device includes a receiving unit 61, a processing unit 63, and a sending unit 65, where: the receiving unit 61 is configured to receive a message;
  • the processing unit 63 is configured to obtain, according to the packet header of the packet, a matching item corresponding to the packet, and find a forwarding information table according to the matching item corresponding to the packet, to obtain the first forwarding action information, where The first forwarding action information is used to identify the first forwarding mode and the first forwarding label, where the forwarding information table is generated by the network device according to the flow table and the forwarding relationship mapping information, where the forwarding information table includes: a matching item and forwarding action information; the flow table includes a matching item and the outbound interface; and the forwarding relationship mapping information includes: a correspondence between the outgoing interface and the forwarding action information;
  • the sending unit 65 is configured to forward the message according to the first forwarding action information.
  • the processing unit 63 of the network device triggering the sending unit 65 to forward the packet may include, but is not limited to, any one or more of the following scenarios. Related descriptions in the third embodiment and the fourth embodiment of the packet forwarding method.
  • the first forwarding label is an IP address.
  • the processing unit 63 triggers the sending unit 65 to forward the packet according to the first forwarding action information.
  • the processing unit 63 triggers the sending unit 65 to use the first forwarding label as a key to search a routing table to forward the message.
  • Scenario 2 When the first forwarding mode is VLAN forwarding, the first forwarding label is a VLAN ID, and the processing unit 63 triggers the sending unit 65 to forward the packet according to the first forwarding action information.
  • the processing unit 63 The sending unit 65 is configured to obtain a MAC address table of the VLAN to which the VLAN ID belongs according to the first forwarding label, and search the MAC address table according to the destination MAC address of the packet to forward the packet.
  • the processing unit 63 triggers the sending unit 65 to forward the packet according to the first forwarding action information, and the processing unit 63 triggers:
  • the sending unit 65 obtains a MAC address table of the VLAN to which the VLAN ID belongs according to the first forwarding label, and searches the MAC address table according to the MAC address to forward the packet.
  • Scenario 3 When the first forwarding mode is Ethernet forwarding, the first forwarding label is a MAC address, and the processing unit 63 triggers the sending unit 65 to forward the packet according to the first forwarding action information. The processing unit 63 triggers the sending unit 65 to search the MAC address table by using the first forwarding label as a key to forward the packet.
  • the processing unit 63 triggers the sending unit 65 to forward the information according to the first forwarding action information.
  • the processing unit 63 includes: the processing unit 63 triggers the sending unit 65 to obtain a routing table of the VPN to which the VPN ID belongs according to the first forwarding label, and search for the VPN ID according to the destination IP address of the packet. The routing table of the VPN to forward the message.
  • Scenario 5 When the first forwarding mode is MPLS forwarding, the first forwarding label is an MPLS label LABEL; the processing unit 63 triggers the sending unit 65 to forward the packet according to the first forwarding action information. The processing unit 63 triggers the sending unit 65 to search the MPLS forwarding table by using the first forwarding label as a key to forward the packet.
  • the processing unit 63 triggers The transmitting unit 65 forwards the packet according to the first forwarding action information, and the processing unit 63 triggers the sending unit 65 to search the tunnel forwarding table by using the TUNNEL ID as a key to forward the packet.
  • the processing unit of the network device in this embodiment may generate a forwarding information table according to the flow table and the forwarding relationship mapping information, where the forwarding information table includes: a matching item and a forwarding action information; after receiving the packet, the network device may match according to the packet.
  • the item finds the forwarding information table, obtains the first forwarding action information, and the trigger sending unit uses the first forwarding action information to forward the message, which is not subject to the hardware capability of the network, and improves the forwarding capability and forwarding speed of the network.
  • the interface (OUTPUT) action can be realized, which is easy to standardize.
  • the types of outgoing interfaces are various, for example, physical outgoing interface, logical outgoing interface, tunnel outgoing interface, etc.
  • the network device may be a host server with a computing capability, a personal computer PC, or a portable computer or terminal that can be carried.
  • the specific embodiment of the present invention does not limit the specific implementation of the computing node.
  • the network device includes a processor (processor ⁇ 1, a communication interface 72, a memory array 73, and a bus 74.
  • the processor 71, the communication interface 72, and the memory 73 are completed by the bus 74. Communication.
  • the communication interface 72 is for communicating with a network element, wherein the network element includes, for example, a virtual machine management center, shared storage, and the like.
  • the processor 71 is for executing a program.
  • the processor 71 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated systems configured to implement embodiments of the present invention. Circuit.
  • ASIC application specific integrated circuit
  • the memory 73 is used to store files.
  • the memory 73 may contain high speed RAM memory and may also include non-volatile memory such as at least one disk memory.
  • Memory 73 can also be a memory array.
  • the memory 73 may also be partitioned, and the blocks may be combined into a virtual volume according to certain rules.
  • the above program may be program code including computer operating instructions.
  • the program is specifically applicable to:
  • the outbound interface corresponding to the matching item, the flow table includes at least one flow entry, and the flow entry includes a matching item and a corresponding outgoing interface;
  • the forwarding relationship mapping information is stored in the network device, and the forwarding relationship mapping information includes: a correspondence between the outbound interface and the forwarding action information; the network device is forwarded according to the first forwarding The action information forwards the message.
  • the program is specifically configured to: receive a message;
  • the network device in this embodiment is not subject to the hardware capability of the network, and improves the forwarding capability and forwarding speed of the network.
  • the interface (OUTPUT) can be implemented on any hybrid device with traditional forwarding capabilities such as OF-Hybrid device, which is easy to standardize.
  • the types of outgoing interfaces are various, for example, physical outgoing interfaces, logical outgoing interfaces, tunnel outgoing interfaces, etc., can be uniformly expressed.
  • the function is implemented in the form of computer software and sold or used as a stand-alone product, all or part of the technical solution of the embodiments of the present invention (for example, a part contributing to the prior art) may be considered to some extent.
  • the computer software product is typically stored in a computer readable storage medium, including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of various embodiments of the present invention. .
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Abstract

一种报文转发方法和网络设备,其中,该方法包括:网络设备接收报文;所述网络设备根据所述报文的报文头获得所述报文对应的匹配项;所述网络设备根据所述报文对应的匹配项查找流表以获得第一出接口;所述网络设备以所述第一出接口作为关键字查找转发关系映射信息以获得第一转发动作信息,所述第一转发动作信息对应所述第一出接口,所述转发关系映射信息保存在所述网络设备中,所述转发关系映射信息包括:出接口和转发动作信息的对应关系,所述网络设备根据所述第一转发动作信息转发所述报文。本发明实施例可以将网络例如:开放流转发与传统转发结合,提高网络的转发能力和转发速度。

Description

说 明 书
报文转发方法和网络设备
技术领域
本发明涉及通信领域, 尤其涉及一种报文转发方法和网络 设备。 背景技术
在开放流 ( OpenFlow ) 转发中, 报文通过流表流水线 ( flowtable pipeline ) 传递处理, 最后由出接口 (OUTPUT ) 发 送出去, 其中, OUTPUT是 OpenFlow标准定义的出接口转发 动作; 一般采用出接口端口号 (OUTPUT PORTID ) 表示。
现有 OpenFlow硬件转发平面简单, OUTPUT动作依赖硬件 设备的出接口封装方法, 基本是使用通用硬件(比如 x86 ) 加软 件来实现转发, 其转发能力受限、 转发速度慢。 发明内容
技术问题
有鉴于此, 本发明实施例要解决网络例如: 开放流 ( OpenFlow ) 网络的转发能力受限、 转发速度慢的问题。
技术方案
为了解决上述技术问题, 根据本发明的实施例, 在第一方 面, 提供了一种报文转发方法, 包括:
网络设备接收报文;
所述网络设备根据所述报文的报文头获得所述报文对应的 匹配项;
所述网络设备根据所述报文对应的匹配项查找流表以获得 第一出接口, 所述第一出接口为所述报文对应的匹配项对应的 出接口, 所述流表包括至少一个流表项, 所述流表项包括匹配 项和对应的出接口;
所述网络设备以所述第一出接口作为关键字查找转发关系 映射信息以获取第一转发动作信息, 所述第一转发动作信息对 应所述第一出接口, 所述第一转发动作信息用于标识第一转发 方式和第一转发标签, 所述转发关系映射信息保存在所述网络 设备中, 所述转发关系映射信息包括: 出接口和转发动作信息 的对应关系;
所述网络设备根据所述第一转发动作信息转发所述报文。 结合第一方面, 在一种可能的实现方式中, 当所述第一转 发方式为 IP转发时, 所述第一转发标签为 IP地址; 所述网络设 备根据所述第一转发动作信息转发所述报文包括: 所述网络设 备以所述第一转发标签为关键字查找路由表来转发所述报文。
结合第一方面, 在一种可能的实现方式中, 当所述第一转 发方式为虚拟局域网 VLAN转发时, 所述第一转发标签为虚拟 局域网标识 VLAN ID ; 所述网络设备根据所述第一转发动作信 息转发所述报文包括: 所述网络设备根据所述第一转发标签获 得所述 VLAN ID所属的 VLAN的媒体接入控制 MAC地址表; 和 所述网络设备根据所述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
结合第一方面, 在一种可能的实现方式中, 当所述第一转 发方式为以太转发时, 所述第一转发标签为 MAC地址; 所述网 络设备根据所述第一转发动作信息转发所述报文包括: 所述网 络设备以所述第一转发标签为关键字查找 MAC地址表来转发 所述报文。 结合第一方面, 在一种可能的实现方式中, 所述第一转发 标签包括 VLAN ID和 MAC地址; 所述网络设备根据所述第一转 发动作信息转发所述报文包括: 所述网络设备根据所述第一转 发标签获得所述 VLAN ID所属的 VLAN的 MAC地址表; 和
所述网络设备根据所述 MAC地址查找所述 MAC地址表来 转发所述报文。
结合第一方面, 在一种可能的实现方式中, 当所述第一转 发方式为虚拟专用网 VPN转发时, 所述第一转发标签为虚拟专 用网标识 VPN ID ; 所述网络设备根据所述第一转发动作信息转 发所述报文包括: 所述网络设备根据所述第一转发标签获得所 述 VPN ID所属的 VPN的路由表; 和
所述网络设备根据所述报文的目的 IP地址查找所述 VPN ID所属的 VPN的路由表来转发所述报文。
结合第一方面, 在一种可能的实现方式中, 当所述第一转 发方式为多协议标签交换 MPLS转发时, 所述第一转发标签为 MPLS标签 LABEL ; 所述网络设备根据所述第一转发动作信息 转发所述报文包括: 所述网络设备以所述第一转发标签为关键 字查找 MPLS转发表来转发所述报文。
结合第一方面, 在一种可能的实现方式中, 当所述第一转 发方式为隧道 TUNNEL转发时, 所述第一转发标签为隧道标识 TUNNEL ID ; 所述网络设备根据所述第一转发动作信息转发所 述报文包括: 所述网络设备以所述 TUNNEL ID为关键字查找隧 道转发表来转发所述报文。
为了解决上述技术问题, 根据本发明的实施例, 在第二方 面, 提供了一种报文转发方法, 包括:
网络设备接收报文;
所述网络设备根据所述报文的报文头获得所述报文对应的 匹配项;
所述网络设备根据所述报文对应的匹配项查找转发信息 表, 获得第一转发动作信息, 所述第一转发动作信息用于标识 第一转发方式和第一转发标签, 所述转发信息表由所述网络设 备根据流表和所述转发关系映射信息生成, 所述转发信息表包 括: 所述匹配项和转发动作信息; 所述流表包括匹配项和所述 出接口; 所述转发关系映射信息包括: 所述出接口和转发动作 信息的对应关系;
所述网络设备根据所述第一转发动作信息转发所述报文。 结合第二方面, 在一种可能的实现方式中, 当所述第一转 发方式为 IP转发时, 所述第一转发标签为 IP地址; 所述网络设 备根据所述第一转发动作信息转发所述报文包括: 所述网络设 备以所述第一转发标签为关键字查找路由表来转发所述报文。
结合第二方面, 在一种可能的实现方式中, 当所述第一转 发方式为 VLAN转发时, 所述第一转发标签为 VLAN ID ; 所述 网络设备根据所述第一转发动作信息转发所述报文包括: 所述 网络设备根据所述第一转发标签获得所述 VLAN ID所属的 VLAN的 MAC地址表; 和
所述网络设备根据所述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
结合第二方面, 在一种可能的实现方式中, 当所述第一转 发方式为以太转发时, 所述第一转发标签为 MAC地址; 所述网 络设备根据所述第一转发动作信息转发所述报文包括: 所述网 络设备以所述第一转发标签为关键字查找 MAC地址表来转发 所述报文。
结合第二方面, 在一种可能的实现方式中, 所述第一转发 标签还包括 MAC地址; 所述网络设备根据所述第一转发动作信 息转发所述报文包括: 所述网络设备根据所述第一转发标签获 得所述 VLAN ID所属的 VLAN的 MAC地址表; 和
所述网络设备根据所述 MAC地址查找所述 MAC地址表来 转发所述报文。
结合第二方面, 在一种可能的实现方式中, 当所述第一转 发方式为 VPN转发时, 所述第一转发标签为 VPN ID ; 所述网络 设备根据所述第一转发动作信息转发所述报文包括: 所述网络 设备根据所述第一转发标签获得所述 VPN ID所属的 VPN的路 由表; 和
所述网络设备根据所述报文的目的 IP地址查找所述 VPN ID所属的 VPN的路由表来转发所述报文。
结合第二方面, 在一种可能的实现方式中, 当所述第一转 发方式为 MPLS转发时, 所述第一转发标签为 MPLS标签 LABEL ; 所述网络设备根据所述第一转发动作信息转发所述报 文包括: 所述网络设备以所述第一转发标签为关键字查找 MPLS转发表来转发所述报文。
结合第二方面, 在一种可能的实现方式中, 当所述第一转 发方式为 TUNNEL转发时, 所述第一转发标签为 TUNNEL ID ; 所述网络设备根据所述第一转发动作信息转发所述报文包括: 所述网络设备以所述 TUNNEL ID为关键字查找隧道转发表来 转发所述报文。
为了解决上述技术问题, 根据本发明的实施例, 在第三方 面, 提供了一种网络设备, 包括接收单元、 处理单元和发送单 元, 其中:
所述接收单元, 用于接收报文;
所述处理单元, 用于根据所述报文的报文头获得所述报文 对应的匹配项; 根据所述报文对应的匹配项查找到所述流表以 获得第一出接口, 所述第一出接口为所述报文对应的匹配项对 应的出接口, 所述流表包括至少一个流表项, 所述流表项包括 匹配项和对应的出接口; 以所述第一出接口作为关键字查找转 发关系映射信息以获取第一转发动作信息, 所述第一转发动作 信息对应所述第一出接口, 所述第一转发动作信息用于标识第 一转发方式和第一转发标签, 所述转发关系映射信息保存在所 述网络设备中, 所述转发关系映射信息包括: 出接口和转发动 作信息的对应关系;
所述发送单元, 用于根据所述第一转发动作信息转发所述 报文。
结合第三方面, 在一种可能的实现方式中, 当所述第一转 发方式为 IP转发时, 所述第一转发标签为 IP地址; 所述处理单 元触发所述发送单元根据所述第一转发动作信息转发所述报文 包括: 所述处理单元触发所述发送单元以所述第一转发标签为 关键字查找路由表来转发所述报文。
结合第三方面, 在一种可能的实现方式中, 当所述第一转 发方式为 VLAN转发时, 所述第一转发标签为 VLAN ID ; 所述 处理单元触发所述发送单元根据所述第一转发动作信息转发所 述报文包括: 所述处理单元触发所述发送单元根据所述第一转 发标签获得所述 VLAN ID所属的 VLAN的 MAC地址表, 根据所 述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
结合第三方面, 在一种可能的实现方式中, 当所述第一转 发方式为以太转发时, 所述第一转发标签为 MAC地址; 所述处 理单元触发所述发送单元根据所述第一转发动作信息转发所述 报文包括: 所述处理单元触发所述发送单元以所述第一转发标 签为关键字查找 MAC地址表来转发所述报文。
为了解决上述技术问题, 根据本发明的实施例, 在第四方 面, 提供了一种网络设备, 包括接收单元、 处理单元和发送单 元, 其中:
所述接收单元, 用于接收报文;
所述处理单元, 用于根据所述报文的报文头获得所述报文 对应的匹配项;根据所述报文对应的匹配项查找到转发信息表, 获得第一转发动作信息, 所述第一转发动作信息用于标识第一 转发方式和第一转发标签, 所述转发信息表由所述网络设备根 据流表和所述转发关系映射信息生成, 所述转发信息表包括: 所述匹配项和转发动作信息; 所述流表包括匹配项和所述出接 口; 所述转发关系映射信息包括: 所述出接口和转发动作信息 的对应关系;
所述发送单元, 用于根据所述第一转发动作信息转发所述 报文。
结合第四方面, 在一种可能的实现方式中, 当所述第一转 发方式为 IP转发时, 所述第一转发标签为 IP地址; 所述处理单 元触发所述发送单元根据所述第一转发动作信息转发所述报文 包括: 所述处理单元触发所述发送单元以所述第一转发标签为 关键字查找路由表来转发所述报文。
结合第四方面, 在一种可能的实现方式中, 当所述第一转 发方式为 VLAN转发时, 所述第一转发标签为 VLAN ID ; 所述 处理单元触发所述发送单元根据所述第一转发动作信息转发所 述报文包括: 所述处理单元触发所述发送单元根据所述第一转 发标签获得所述 VLAN ID所属的 VLAN的 MAC地址表, 根据所 述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
结合第四方面, 在一种可能的实现方式中, 当所述第一转 发方式为以太转发时, 所述第一转发标签为 MAC地址; 所述处 理单元触发所述发送单元根据所述第一转发动作信息转发所述 报文包括: 所述处理单元触发所述发送单元以所述第一转发标 签为关键字查找 MAC地址表来转发所述报文。
有益效果
本发明实施例网络设备接收到报文, 根据转发关系映射信 息, 获取报文对应的第一转发动作信息, 根据第一转发动作信 息转发报文, 不受制于网络例如: 开放流 (OpenFlow ) 网络的 硬件能力, 从而提高了网络的转发能力和转发速度。 附图说明
包含在说明书中并且构成说明书的一部分的附图与说明书 一起示出了本发明的示例性实施例、 特征和方面, 并且用于解 释本发明的原理。
图 l a为本发明实施例一报文转发方法的流程图;
图 lb为本发明实施例一报文转发方法中 OpenFlow的转发 的示意图;
图 l c为本发明实施例一报文转发方法中传统的转发平面的 示意图;
图 2a为本发明实施例二报文转发方法的流程图;
图 2b为 本发 明 实施例 二报文转发方法在开放流 ( OpenFlow ) 网络中应用的示意图;
图 2c为本发明实施例二报文转发方法中 IP转发中路由的示 意图;
图 2d为本发明实施例二报文转发方法中 VLAN转发的示意 图;
图 2 e为本发明实施例二报文转发方法中 V PN转发的示意 图;
图 2f为本发明实施例二报文转发方法中 MPLS转发的示意 图;
图 2g为本发明实施例二报文转发方法中隧道转发的示意 图;
图 3为本发明实施例三报文转发方法的流程图;
图 4 a为本发明实施例四报文转发方法的流程图;
图 4b为 本发 明 实施例 四 报文转发方法在开放流 ( OpenFlow ) 网络中应用的示意图;
图 5为本发明实施例五网络设备的结构框图;
图 6为本发明实施例六网络设备的结构框图;
图 7为本发明实施例七网络设备的结构框图。 具体实施方式
以下将参考附图详细说明本发明的各种示例性实施例、 特 征和方面。附图中相同的附图标记表示功能相同或相似的元件。 尽管在附图中示出了实施例的各种方面, 但是除非特别指出, 不必按比例绘制附图。
在这里专用的词 "示例性" 意为 "用作例子、 实施例或说 明性"。 这里作为 "示例性"所说明的任何实施例不必解释为优 于或好于其它实施例。
另外, 为了更好的说明本发明, 在下文的具体实施方式中 给出了众多的具体细节。 本领域技术人员应当理解, 没有这些 具体细节, 本发明同样可以实施。 在另外一些实例中, 对于大 家熟知的方法、 手段、 元件和电路未作详细描述, 以便于凸显 本发明的主旨。
实施例一
图 l a为本发明实施例一报文转发方法的流程图, 如图 l a所 示, 该报文转发方法可以包括以下歩骤: 歩骤 101、 网络设备接收报文;
歩骤 102、网络设备根据所述报文的报文头获得所述报文对 应的匹配项;
歩骤 103、网络设备根据所述报文对应的匹配项查找到所述 流表, 获得第一出接口, 所述第一出接口为所述报文对应的匹 配项对应的出接口; 其中, 所述流表包括至少一个流表项, 所 述流表项包括匹配项 ( MATCH Field(s) ) 和对应的出接口 ( OUTPUT ) ;
歩骤 104、 网络设备以所述第一出接口作为关键字 (KEY ) 查找转发关系映射信息以获取第一转发动作信息, 所述第一转 发动作信息对应所述第一出接口, 所述第一转发动作信息用于 标识第一转发方式和第一转发标签, 所述转发关系映射信息保 存在所述网络设备中, 所述转发关系映射信息包括: 出接口和 转发动作信息的对应关系;
其中, 该转发关系映射信息可以为手工配置, 或者根据控 制器 (Controller ) 下发的信息例如: 出接口属性信息、 交换机 转发表例如: MAC地址表、 LAN转发表、 IP路由表等信息生成。
歩骤 105、网络设备根据所述第一转发动作信息转发所述报 文。
其中, 对于不同的第一转发方式和第一转发标签, 网络设 备转发报文的场景可以包括但不限于以下场景中的任意一个或 者多个。
场景一、 当所述第一转发方式为 IP ( Internet Protocol , 互 联网协议) 转发时, 所述第一转发标签为 IP地址; 所述网络设 备根据所述第一转发动作信息转发所述报文包括: 所述网络设 备以所述第一转发标签为关键字查找路由表来转发所述报文。
场景二、 当所述第一转发方式为 VLAN ( Virtual Local Area Network, 虚拟局域网)转发时, 所述第一转发标签为虚拟局域 网标识 VLAN ID ; 所述网络设备根据所述第一转发动作信息转 发所述报文包括: 所述网络设备根据所述第一转发标签获得所 述 VLAN ID所属的 VLAN的媒体接入控制 MAC ( Media Access Control , 媒体接入控制) 转发表;
所述网络设备根据所述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
在场景二中, 如果所述第一转发标签包括 VLAN ID和 MAC 地址; 所述网络设备根据所述第一转发动作信息转发所述报文 包括:
所述网络设备根据所述第一转发标签获得所述 VLAN ID所 属的 VLAN的 MAC地址表; 和
所述网络设备根据所述 MAC地址查找所述 MAC地址表来 转发所述报文。
场景三、 当所述第一转发方式为以太转发时, 所述第一转 发标签为 MAC地址; 所述网络设备根据所述第一转发动作信息 转发所述报文包括: 所述网络设备以所述第一转发标签为关键 字查找 MAC地址表来转发所述报文。
场景四、 当所述第一转发方式为 VPN ( Virtual Private Network, 虚拟专用网)转发时, 所述第一转发标签为虚拟专用 网标识 VPN ID ; 所述网络设备根据所述第一转发动作信息转发 所述报文包括: 所述网络设备根据所述第一转发标签获得所述 VPN ID所属的 VPN的路由表;
所述网络设备根据所述报文的目的 IP地址查找所述 VPN ID所属的 VPN的路由表来转发所述报文。
场景五、 当所述第一转发方式为 MPLS ( Multi-Protocol Label Switching , 多协议标签交换) 转发时, 所述第一转发标 签为 MPLS标签 LABEL ; 所述网络设备根据所述第一转发动作 信息转发所述报文包括: 所述网络设备以所述第一转发标签为 关键字查找 MPLS转发表来转发所述报文。
场景六、 当所述第一转发方式为隧道 TUNNEL转发时, 所 述第一转发标签为隧道标识 TUNNEL ID ; 所述网络设备根据所 述第一转发动作信息转发所述报文包括: 所述网络设备以所述 TUNNEL ID为关键字查找隧道转发表来转发所述报文。
本发明实施例中可以将网络例如: 开放流 (OpenFlow ) 网 络的转发与传统转发结合, 利用传统转发实现出接口的要求, 从而实现 OpenFlow的转发和传统转发协调配合的转发方式。 例 如, 采用一种 OpenFlow转发方式和传统转发方式相结合的网络 设备, 即开放流混合 (OpenFlow Hybrid, 简称: OF-Hybrid ) 网络设备进行报文的转发。 图 lb为本发明实施例一报文转发方 法中 OpenFlow的转发的示意图, 如图 lb所示, 通过流表流水线 ( flowtable pipeline ) 传递处理报文, 最后通过出接 口 ( OUTPUT ) 将报文发送出去。 图 l c为本发明实施例一报文转 发方法中传统的转发平面的示意图, 如图 l c所示, 传统转发设 备可以进行 IP、 VLAN、 MAC , VPN, MPLS , 隧道 (TUNNEL ) 等任意一种或者多种普通转发。
本实施例网络设备可以根据报文对应的匹配项查找流表获 得第一出接口, 以所述第一出接口作为关键字查找转发关系映 射信息, 获取第一转发动作信息, 采用第一转发动作信息转发 该报文, 该报文转发方法不受制于网络的硬件能力, 提高了网 络的转发能力和转发速度。 并且在任何具有传统转发能力的混 合设备例如: OF-Hybrid设备上都能够实现出接口 (OUTPUT ) 动作, 容易标准化。 进一歩地, 出接口类型各种各样, 例如: 物理出接口、 逻辑出接口、 隧道出接口等, 可以统一为采用 OUTPUT PORTID表达。
实施例二
在上述实施例的基础上, 图 2a为本发明实施例二报文转发 方法的流程图, 图 2b为本发明实施例二报文转发方法在开放流 ( OpenFlow ) 网络中应用的示意图, 如图 2a和图 2b所示, 该报 文转发方法在开放流 (OpenFlow ) 网络中的应用具体可以包括 以下歩骤:
歩骤 201、 在开放流 (OpenFlow ) 网络中, 网络设备例如: 交换机 ( Switch ) 的 HAL ( Hardware Abstract Layer, 硬件抽象 层) 向转发平面下发转发关系映射信息;
其中, 转发关系映射信息中可以包括: 出接口和转发动作 信息的对应关系, 例如: 第一出接口 OUTPUT PORTID_l对应 REDIRECT IP等。 该转发关系映射信息可以为手工配置, 或者 根据控制器 (Controller ) 下发的信息例如: 出接口属性信息、 交换机转发表例如: MAC地址表、 LAN转发表、 IP路由表等信 息生成。 该转发关系映射信息预先配置或生成在转发平面, 也 可以预先配置或生成在 HAL , 在由 HAL下发给转发平面。
歩骤 202、 HAL接收控制器(Controller )给交换机(Switch ) 下发的流表;
歩骤 203、 HAL将接收到的流表下发到交换机 (Switch ) 的 转发平面;
歩骤 204、转发平面收到报文后, 从报文的报文头获得报文 对应的匹配项例如: 图 2b中 的 MATCH_1, 先从开放流 ( OpenFlow ) 转发表中查找, 如果从匹配项 MATCH_1命中的 流表中取出的出接口为第一出接口 OUTPUT PORTID 1 , 则以 OUTPUT PORTID_l为关键字 (KEY ) 在转发关系映射信息中 查找, 例如: 从包括转发关系映射信息的转发关系映射表命中 的表项中取出第一出接口对应的第一转发动作信息。
歩骤 205、 转发平面根据第一转发动作信息转发该报文。 具体地, 第一转发动作信息中的第一转发方式和第一转发 标签不同时, 转发该报文的方法也不同, 可以包括但不限于以 下场景的任意一个或者多个。
场景一、 当第一转发方式为 IP转发时, 第一转发标签为 IP 地址;
如图 2b所示, 例如: 第一出接口 OUTPUT PORTID_l命中 的表项 _1中的第一转发动作信息为 REDIRECT IP , 则表示的第 一转发方式为 IP转发, 第一转发标签为 IP地址。 这时, 以重定 向 IP ( REDIRECT IP ) 中第一转发标签指定的 IP地址为关键字, 查找传统转发平面 IP转发 (IP FORWARDING ) 的路由表, 将报 文从与 IP地址匹配的路由表项所指定出接口发送出去。
本实施例可以采用直连 I P路由来抽象出接口, 即以对端接 口 I P地址作为出接口的抽象, 当然直连路由也可以替换为用协 议路由、 静态路由等路由。 例如: 图 2c为本发明实施例二报文 转发方法中 IP转发中路由的示意图, 如图 2c所示, OUTPUT G 1/ 1/01 , 表示从 G 1/ 1/01接口将报文发送出去; 在 OF-Hybrid 网 络设备 Rl 、 R2上设置 OUTPUT G 1/ 1/01可 以 转译为 REDIRECT 10. 1.1.2 , 查 FIB ( Forward Information Base , 转发 信息库) 表从 G 1/ 1/01发送出去;
这样对于流表转发, 对于 OpenFlow的出接口转发动作, 则 转换为策略路由重定向处理, 无需关心具体的物理接口转发流 程。
扩展地, 根据传统转发模块的转发能力, 可以将出接口转 换为 VLAN、 MAC , VPN, MPLS , TUNNEL等传统转发, 具体 实现可以参见下述各个场景的描述。 场景二、 当第一转发方式为 VLAN转发时, 第一转发标签 为 VLAN ID ;
图 2d为本发明实施例二报文转发方法中 VLAN转发的示意 图, 如图 2d所示, 如果第一出接口 OUTPUT PORTID_l命中的 表项 _1的第一转发动作信息为 REDIRECT VLAN_1, 则表示的 第一转发方式为 VLAN转发, 第一转发标签 VLAN ID为 VLAN_1。 这时可以重定向到 VLAN转发, 将报文 (DATA ) 转 发给 VLAN_1所属的 VLAN处理。 在 VLAN_1所属的 VLAN的 MAC地址表中查找是否有与报文的二层目的 MAC地址对应的 MAC地址表项。 此外, 如果第一转发标签还包括 MAC地址, 则 也可以根据该第一转发标签指定的 MAC地址查找 VLAN_1所属 的 VLAN的 MAC地址表。 如果有匹配的表项, 则直接从该 MAC 地址表项指定出接口转发报文。 或者, 如果不匹配任何 MAC地 址表项, 直接从这个 VLAN_1所属的 VLAN的所有接口转发报 文。 当然, 如果不进行任何匹配, 直接从这个 VLAN_1所属的 VLAN的所有接口转发报文也是可以实现的。
场景三、 当第一转发方式为以太转发时, 第一转发标签为 MAC地址: 这种场景一般应用于二层交换机, 没有三层功能。
如图 2b所示, 如果第一出接口 OUTPUT PORTID_l命中的 表项 _1的第一转发动作信息为 REDIRECT MAC , 则表示的第一 转发方式为以太转发, 第一转发标签为 MAC地址, 则重定向到 以太转发, 使用第一转发标签指定的 MAC地址查询 MAC地址 表, 如果有匹配的 MAC地址表项, 则直接从该 MAC地址表项指 定出接口转发报文。
上述的场景二和场景三都是二层转发, 除 OpenFlow流表的 动作 (action ) 夕卜, 可以不对报文头做其他改动。
场景四、 当第一转发方式为 VPN转发时, 第一转发标签为 VPN ID ;
图 2 e为本发明实施例二报文转发方法中 V PN转发的示意 图, 如图 2e所示, 如果第一出接口 OUTPUT PORTID_l命中的 表项 _1的第一转发动作信息为 REDIRECT VPN_1, 则表示的第 一转发方式为 VPN转发, 第一转发标签 VPN ID为 VPN_1。 可以 重定向到 VPN转发, 将报文转发给 VPN_1所属的 VPN处理; 在 VPN_1所属的 VPN的私网 IP表中查找是否有与报文的目的 IP地 址对应的私网 IP表项, 如果有, 则从该私网 IP表项指定出接口 转发报文, 转发处理过程可以更新数据报文的二层头信息。
场景五、 对于选定转发方式为 MPLS转发;
图 2f为本发明实施例二报文转发方法中 MPLS转发的示意 图, 如图 2f所示, 如果第一出接口 OUTPUT PORTID_l命中的表 项_1的第一转发动作信息为 REDIRECT LABEL 1, 则表示的第 一转发方式为 MPLS转发, 第一转发标签 LABEL ID为 LABEL_1。 这时可以重定向到 MPLS转发, 以 LABEL_1为关键 字查找 MPLS转发表, 按照 MPLS转发表中与 LABEL_1匹配的出 接口及封装要求封装并转发报文。 根据具体的应用场景, 对于 入 LSP ( Label Switched Path , 标签交换路径) 隧道, 报文是 新封装二层头及 MPLS标签; 对于 LSP转发路径上的中间设备例 如: P设备转发, 则是更换报文的二层头及 MPLS标签; 对于出 LSP隧道, 则是去除报文的二层头和 MPLS标签。
场景六、 对于选定转发方式为隧道 (TUNNEL ) 转发; 图 2g为本发明实施例二报文转发方法中隧道转发的示意 图, 如图 2g所示, 如果第一出接口 OUTPUT PORTID_l命中的 表项 _1的第一转发动作信息 REDIRECT TUNNEL 1 , 则表示的 第一转发方式为隧道 (TUNNEL ) 转发, 第一转发标签隧道标 识( TUNNEL ID )为 TUNNEL_ 1。可以重定向到隧道( TUNNEL ) 转发, 则用 TUNNEL_1查询 TUNNEL转发表, 按照 TUNNEL转 发表中与 TUNNEL_1匹配的出接口及封装要求封装并转发报 文。 其中, TUNNEL转发表可以是指 GRE ( Generic Routing Encapsulation , 通用路由封装协议)、 LSP、 L2TP ( Layer 2 Tunneling Protocol , 二层隧道协议 )、 IPsec ( Internet Protocol Security, 因特网协议安全协议) 等隧道类型。
本实施例网络设备例如: 交换机可以根据报文对应的匹配 项查找流表获得第一出接口, 以所述第一出接口作为关键字查 找转发关系映射信息, 获取第一转发动作信息, 采用第一转发 动作信息转发该报文, 该报文转发方法不受制于网络的硬件能 力, 提高了网络的转发能力和转发速度。 并且在任何具有传统 转发能力的混合设备例如: OF-Hybrid设备上都能够实现出接口 ( OUTPUT ) 动作, 容易标准化。 进一歩地, 出接口类型各种 各样, 例如: 物理出接口、 逻辑出接口、 隧道出接口等, 可以 统一为采用 OUTPUT PORTID表达。
实施例三
图 3为本发明实施例三报文转发方法的流程图,如图 3所示, 该报文转发方法可以包括以下歩骤:
歩骤 301、 网络设备接收报文;
歩骤 302、网络设备根据所述报文的报文头获得所述报文对 应的匹配项;
歩骤 303、网络设备根据所述报文对应的匹配项查找到所述 转发信息表, 获得第一转发动作信息, 所述第一转发动作信息 用于标识第一转发方式和第一转发标签, 所述转发信息表由所 述网络设备根据流表和所述转发关系映射信息生成, 所述转发 信息表包括: 所述匹配项和转发动作信息; 所述流表包括匹配 项和所述出接口; 所述转发关系映射信息包括: 所述出接口和 转发动作信息的对应关系;
歩骤 304、网络设备根据所述第一转发动作信息转发所述报 文。
其中, 对于不同的第一转发方式和第一转发标签, 网络设 备转发报文的场景可以包括但不限于以下场景中的任意一个或 者多个。
场景一、 当所述第一转发方式为 IP转发时, 所述第一转发 标签为 IP地址; 所述网络设备根据所述第一转发动作信息转发 所述报文包括: 所述网络设备以所述第一转发标签为关键字查 找路由表来转发所述报文。
场景二、 当所述第一转发方式为 VLAN转发时, 所述第一 转发标签为 VLAN ID ; 所述网络设备根据所述第一转发动作信 息转发所述报文包括: 所述网络设备根据所述第一转发标签获 得所述 VLAN ID所属的 VLAN的 MAC地址表;
所述网络设备根据所述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
在场景二中, 如果所述第一转发标签包括 VLAN ID和 MAC 地址; 所述网络设备根据所述第一转发动作信息转发所述报文 包括:
所述网络设备根据所述第一转发标签获得所述 VLAN ID所 属的 VLAN的 MAC地址表; 和
所述网络设备根据所述 MAC地址查找所述 MAC地址表来 转发所述报文。
场景三、 当所述第一转发方式为以太转发时, 所述第一转 发标签为 MAC地址; 所述网络设备根据所述第一转发动作信息 转发所述报文包括: 所述网络设备以所述第一转发标签为关键 字查找 MAC地址表来转发所述报文。 场景四、 当所述第一转发方式为 VPN转发时, 所述第一转 发标签为 VPN ID ; 所述网络设备根据所述第一转发动作信息转 发所述报文包括: 所述网络设备根据所述第一转发标签获得所 述 VPN ID所属的 VPN的路由表;
所述网络设备根据所述报文的目的 IP地址查找所述 VPN ID所属的 VPN的路由表来转发所述报文。
场景五、 当所述第一转发方式为 MPLS转发时, 所述第一 转发标签为 MPLS标签 LABEL ; 所述网络设备根据所述第一转 发动作信息转发所述报文包括: 所述网络设备以所述第一转发 标签为关键字查找 MPLS转发表来转发所述报文。
场景六、 当所述第一转发方式为 TUNNEL转发时, 所述第 一转发标签为 TUNNEL ID ; 所述网络设备根据所述第一转发动 作信息转发所述报文包括: 所述网络设备以所述 TUNNEL ID为 关键字查找隧道转发表来转发所述报文。
本发明实施例中可以将网络例如: 开放流 (OpenFlow ) 网 络的转发与传统转发结合, 利用传统转发实现出接口的要求, 从而实现传统转发协调配合的转发方式。 例如, OF-Hybrid设备 进行报文的转发。
本实施例网络设备可以根据流表和转发关系映射信息生成 转发信息表, 转发信息表中包括: 匹配项和转发动作信息; 网 络设备接收到报文后, 可以根据报文对应的匹配项查找到转发 信息表, 获取第一转发动作信息, 采用第一转发动作信息转发 该报文, 该报文转发方法不受制于网络的硬件能力, 提高了网 络的转发能力和转发速度。 并且在任何具有传统转发能力的混 合设备例如: OF-Hybrid设备上都能够实现出接口 (OUTPUT ) 动作, 容易标准化。 进一歩地, 出接口类型各种各样, 例如: 物理出接口、 逻辑出接口、 隧道出接口等, 可以统一表达。 实施例四
在上述实施例的基础上, 图 4a为本发明实施例四报文转发 方法的流程图, 图 4b为本发明实施例四报文转发方法在开放流 ( OpenFlow ) 网络中应用的示意图, 如图 4a和图 4b所示, 该报 文转发方法在开放流 (OpenFlow ) 网络中的应用具体可以包括 以下歩骤:
歩骤 401、 在开放流(OpenFlow ) 网络中, 交换机(Switch ) 的 HAL的接收控制器 (Controller) 下发的携带出接口信息的流 其中, 转发关系映射信息中可以包括: 出接口和转发动作 信息的对应关系, 例如: 第一出接口 OUTPUT PORTID_l对应 REDIRECT IP等。 该转发关系映射信息可以为手工配置, 或者 根据控制器 (Controller ) 下发的信息例如: 出接口属性信息、 交换机转发表例如: MAC地址表、 LAN转发表、 IP路由表等信 息生成。 该转发关系映射信息可以预先配置或生成在 HAL。
歩骤 402、 HAL根据流表和转发关系映射信息, 生成转发信 息表, 其中, 转发信息表包括: 匹配项和转发动作信息, 例如: 图 4b中的 MATCH_ 1为匹配项, REDIRECT IP为转发动作信息。
歩骤 403、交换机的 HAL将转换后的转发信息表下发到交换 机的转发平面。
歩骤 404、转发平面收到报文后, 从报文的报文头获得报文 对应的匹配项例如: MATCH_1, 从转发信息表中查找匹配项命 中的流表, 从命中的流表中取出第一转发动作信息例如: REDIRECT IP , 其中该第一转发动作信息与第一出接口 OUTPUT PORTID 1对应。
歩骤 405、 转发平面根据第一转发动作信息转发该报文。 其中, 具体地, 第一转发动作信息中的第一转发方式和第 一转发标签不同时, 转发该报文的方法也不同, 例如: 重定向 到 IP、 VLAN、 MAC , VPN, MPLS , 隧道 (TUNNEL ) 等任意 一种或者多种转发方式, 具体可以参照但不限于上述实施例二 中的各个场景。
本实施例网络设备可以根据流表和转发关系映射信息生成 转发信息表, 转发信息表中包括: 匹配项和转发动作信息; 网 络设备接收到报文后, 可以根据报文对应的匹配项查找到转发 信息表, 获取第一转发动作信息, 采用第一转发动作信息转发 该报文, 该报文转发方法不受制于网络的硬件能力, 提高了网 络的转发能力和转发速度。 并且在任何具有传统转发能力的混 合设备例如: OF-Hybrid设备上都能够实现出接口 (OUTPUT ) 动作, 容易标准化。 进一歩地, 出接口类型各种各样, 例如: 物理出接口、 逻辑出接口、 隧道出接口等, 可以统一为采用 OUTPUT PORTID表达。
实施例五
图 5为本发明实施例五网络设备的结构框图, 如图 5所示, 该网络设备包括: 接收单元 5 1、 处理单元 53和发送单元 55, 其 中- 所述接收单元 5 1, 用于接收报文;
所述处理单元 53, 用于根据所述报文的报文头获得所述报 文对应的匹配项; 根据所述报文对应的匹配项查找到所述流表 以获得第一出接口, 所述第一出接口为所述报文对应的匹配项 对应的出接口, 所述流表包括至少一个流表项, 所述流表项包 括匹配项和对应的出接口; 以所述第一出接口作为关键字查找 转发关系映射信息, 获取第一转发动作信息, 所述第一转发动 作信息对应所述第一出接口, 所述第一转发动作信息用于标识 第一转发方式和第一转发标签, 所述转发关系映射信息保存在 所述网络设备中, 所述转发关系映射信息包括: 出接口和转发 动作信息的对应关系;
所述发送单元 55, 用于根据所述第一转发动作信息转发所 述报文。
具体地, 对于不同的第一转发方式和第一转发标签, 网络 设备的处理单元 53触发发送单元 55转发报文的场景可以包括但 不限于以下场景中的任意一个或者多个, 具体可以参照上述实 施例一和实施例二报文转发方法中的相关描述。
场景一、 当所述第一转发方式为 IP转发时, 所述第一转发 标签为 IP地址; 所述处理单元 53触发所述发送单元 55根据所述 第一转发动作信息转发所述报文包括: 所述处理单元 53触发所 述发送单元 55以所述第一转发标签为关键字查找路由表来转发 所述报文。
场景二、 当所述第一转发方式为 VLAN转发时, 所述第一 转发标签为 VLAN ID ; 所述处理单元 53触发所述发送单元 55根 据所述第一转发动作信息转发所述报文包括: 所述处理单元 53 触发所述发送单元 55根据所述第一转发标签获得所述 VLAN ID 所属的 VLAN的 MAC地址表, 根据所述报文的目的 MAC地址查 找所述 MAC地址表来转发所述报文。
在场景二中, 如果所述第一转发标签包括 VLAN ID和 MAC 地址; 所述处理单元 53触发所述发送单元 55根据所述第一转发 动作信息转发所述报文包括: 所述处理单元 53触发所述发送单 元 55根据所述第一转发标签获得所述 VLAN ID所属的 VLAN的 MAC地址表, 根据所述 MAC地址查找所述 MAC地址表来转发 所述报文。
场景三、 当所述第一转发方式为以太转发时, 所述第一转 发标签为 MAC地址; 所述处理单元 53触发所述发送单元 55根据 所述第一转发动作信息转发所述报文包括: 所述处理单元 53触 发所述发送单元 55以所述第一转发标签为关键字查找 MAC地 址表来转发所述报文。
场景四、 当所述第一转发方式为 VPN转发时, 所述第一转 发标签为虚拟专用网标识 VPN ID ; 所述处理单元 53触发所述发 送单元 55根据所述第一转发动作信息转发所述报文包括: 所述 处理单元 53触发所述发送单元 55根据所述第一转发标签获得所 述 VPN ID所属的 VPN的路由表, 根据所述报文的目的 IP地址查 找所述 VPN ID所属的 VPN的路由表来转发所述报文。
场景五、 当所述第一转发方式为 MPLS转发时, 所述第一 转发标签为 MPLS标签 LABEL ; 所述处理单元 53触发所述发送 单元 55根据所述第一转发动作信息转发所述报文包括: 所述处 理单元 53触发所述发送单元 55以所述第一转发标签为关键字查 找 MPLS转发表来转发所述报文。
场景六、 当所述第一转发方式为隧道 TUNNEL转发时, 所 述第一转发标签为隧道标识 TUNNEL ID ; 所述处理单元 53触发 所述发送单元 55根据所述第一转发动作信息转发所述报文包 括: 所述处理单元 53触发所述发送单元 55以所述 TUNNEL ID为 关键字查找隧道转发表来转发所述报文。
本实施例网络设备的处理单元可以根据报文对应的匹配项 查找流表获得第一出接口, 以所述第一出接口作为关键字查找 转发关系映射信息, 获取第一转发动作信息, 触发发送单元采 用第一转发动作信息转发该报文, 不受制于网络的硬件能力, 提高了网络的转发能力和转发速度。 并且在任何具有传统转发 能力的混合设备例如: OF-Hybrid设备上都能够实现出接口 ( OUTPUT ) 动作, 容易标准化。 进一歩地, 出接口类型各种 各样, 例如: 物理出接口、 逻辑出接口、 隧道出接口等, 可以 实施例六
图 6为本发明实施例六网络设备的结构框图, 如图 6所示, 该网络设备包括接收单元 61、 处理单元 63和发送单元 65, 其中: 所述接收单元 61, 用于接收报文;
所述处理单元 63, 用于根据所述报文的报文头获得所述报 文对应的匹配项; 根据所述报文对应的匹配项查找到转发信息 表, 获得第一转发动作信息, 所述第一转发动作信息用于标识 第一转发方式和第一转发标签, 所述转发信息表由所述网络设 备根据流表和所述转发关系映射信息生成, 所述转发信息表包 括: 所述匹配项和转发动作信息; 所述流表包括匹配项和所述 出接口; 所述转发关系映射信息包括: 所述出接口和转发动作 信息的对应关系;
所述发送单元 65, 用于根据所述第一转发动作信息转发所 述报文。
具体地, 对于不同的第一转发方式和第一转发标签, 网络 设备的处理单元 63触发发送单元 65转发报文的场景可以包括但 不限于以下场景中的任意一个或者多个, 具体可以参照上述实 施例三和实施例四报文转发方法中的相关描述。
场景一、 当所述第一转发方式为 IP转发时, 所述第一转发 标签为 IP地址; 所述处理单元 63触发所述发送单元 65根据所述 第一转发动作信息转发所述报文包括: 所述处理单元 63触发所 述发送单元 65以所述第一转发标签为关键字查找路由表来转发 所述报文。
场景二、 当所述第一转发方式为 VLAN转发时, 所述第一 转发标签为 VLAN ID ; 所述处理单元 63触发所述发送单元 65根 据所述第一转发动作信息转发所述报文包括: 所述处理单元 63 触发所述发送单元 65根据所述第一转发标签获得所述 VLAN ID 所属的 VLAN的 MAC地址表, 根据所述报文的目的 MAC地址查 找所述 MAC地址表来转发所述报文。
在场景二中, 如果所述第一转发标签包括 VLAN ID MAC 地址; 所述处理单元 63触发所述发送单元 65根据所述第一转发 动作信息转发所述报文包括: 所述处理单元 63触发所述发送单 元 65根据所述第一转发标签获得所述 VLAN ID所属的 VLAN的 MAC地址表, 根据所述 MAC地址查找所述 MAC地址表来转发 所述报文。
场景三、 当所述第一转发方式为以太转发时, 所述第一转 发标签为 MAC地址; 所述处理单元 63触发所述发送单元 65根据 所述第一转发动作信息转发所述报文包括: 所述处理单元 63触 发所述发送单元 65以所述第一转发标签为关键字查找 MAC地 址表来转发所述报文。
场景四、 当所述第一转发方式为 VPN转发时, 所述第一转 发标签为虚拟专用网标识 VPN ID ; 所述处理单元 63触发所述发 送单元 65根据所述第一转发动作信息转发所述报文包括: 所述 处理单元 63触发所述发送单元 65根据所述第一转发标签获得所 述 VPN ID所属的 VPN的路由表, 根据所述报文的目的 IP地址查 找所述 VPN ID所属的 VPN的路由表来转发所述报文。
场景五、 当所述第一转发方式为 MPLS转发时, 所述第一 转发标签为 MPLS标签 LABEL ; 所述处理单元 63触发所述发送 单元 65根据所述第一转发动作信息转发所述报文包括: 所述处 理单元 63触发所述发送单元 65以所述第一转发标签为关键字查 找 MPLS转发表来转发所述报文。
场景六、 当所述第一转发方式为隧道 TUNNEL转发时, 所 述第一转发标签为隧道标识 TUNNEL ID ; 所述处理单元 63触发 所述发送单元 65根据所述第一转发动作信息转发所述报文包 括: 所述处理单元 63触发所述发送单元 65以所述 TUNNEL ID为 关键字查找隧道转发表来转发所述报文。
本实施例网络设备的处理单元可以根据流表和转发关系映 射信息生成转发信息表, 转发信息表中包括: 匹配项和转发动 作信息; 网络设备接收到报文后, 可以根据报文对应的匹配项 查找到转发信息表, 获取第一转发动作信息, 触发发送单元采 用第一转发动作信息转发该报文, 不受制于网络的硬件能力, 提高了网络的转发能力和转发速度。 并且在任何具有传统转发 能力的混合设备例如: OF-Hybrid设备上都能够实现出接口 ( OUTPUT ) 动作, 容易标准化。 进一歩地, 出接口类型各种 各样, 例如: 物理出接口、 逻辑出接口、 隧道出接口等, 可以 实施例七
图 7为本发明实施例七网络设备的结构框图, 如图 7所示, 网络设备可以是具备计算能力的主机服务器、 个人计算机 PC、 或者可携带的便携式计算机或终端等。 本发明具体实施例并不 对计算节点的具体实现做限定。
所述网络设备包括处理器(processor^ 1、 通信接 口 (Communications Interface)72、 存储器 (memory array)73禾口总线 74。 其中, 处理器 71、 通信接口 72、 以及存储器 73通过总线 74 完成相互间的通信。
通信接口 72用于与网元通信, 其中网元包括例如虚拟机管 理中心、 共享存储等。
处理器 71用于执行程序。 处理器 71可能是一个中央处理器 CPU,或者是专用集成电路 ASIC( Application Specific Integrated Circuit ) ,或者是被配置成实施本发明实施例的一个或多个集成 电路。
存储器 73用于存放文件。 存储器 73可能包含高速 RAM存储 器, 也可能还包括非易失性存储器(non- volatile memory) , 例如 至少一个磁盘存储器。 存储器 73也可以是存储器阵列。 存储器 73还可能被分块, 并且所述块可按一定的规则组合成虚拟卷。
在一种可能的实施方式中, 上述程序可为包括计算机操作 指令的程序代码。
在一种可能的实现方式中, 该程序具体可用于:
接收报文;
根据所述报文的报文头获得所述报文对应的匹配项; 根据所述报文对应的匹配项查找流表以获得第一出接口, 所述第一出接口为所述报文对应的匹配项对应的出接口, 所述 流表包括至少一个流表项, 所述流表项包括匹配项和对应的出 接口;
以所述第一出接口作为关键字查找转发关系映射信息以获 取第一转发动作信息, 所述第一转发动作信息对应所述第一出 接口, 所述第一转发动作信息用于标识第一转发方式和第一转 发标签, 所述转发关系映射信息保存在所述网络设备中, 所述 转发关系映射信息包括: 出接口和转发动作信息的对应关系; 所述网络设备根据所述第一转发动作信息转发所述报文。 在另一种可能的实现方式中, 该程序具体还可用于: 接收报文;
根据所述报文的报文头获得所述报文对应的匹配项; 根据所述报文对应的匹配项查找转发信息表, 获得第一转 发动作信息, 所述第一转发动作信息用于标识第一转发方式和 第一转发标签, 所述转发信息表由所述网络设备根据流表和所 述转发关系映射信息生成, 所述转发信息表包括: 所述匹配项 和转发动作信息; 所述流表包括匹配项和所述出接口; 所述转 发关系映射信息包括:所述出接口和转发动作信息的对应关系; 根据所述第一转发动作信息转发所述报文。
该程序执行报文转发方法的具体动作, 可以参见本发明上 述各个实施例中的报文转发方法的相关描述。
本实施例网络设备不受制于网络的硬件能力, 提高了网络 的转发能力和转发速度。 并且在任何具有传统转发能力的混合 设备例如: OF-Hybrid设备上都能够实现出接口 (OUTPUT ) 动 作, 容易标准化。 进一歩地, 出接口类型各种各样, 例如: 物 理出接口、 逻辑出接口、 隧道出接口等, 可以统一表达。
本领域普通技术人员可以意识到, 本文所描述的实施例中 的各示例性单元及算法歩骤, 能够以电子硬件、 或者计算机软 件和电子硬件的结合来实现。 这些功能究竟以硬件还是软件形 式来实现, 取决于技术方案的特定应用和设计约束条件。 专业 技术人员可以针对特定的应用选择不同的方法来实现所描述的 功能, 但是这种实现不应认为超出本发明的范围。
如果以计算机软件的形式来实现所述功能并作为独立的产 品销售或使用时, 则在一定程度上可认为本发明实施例的技术 方案的全部或部分 (例如对现有技术做出贡献的部分) 是以计 算机软件产品的形式体现的。 该计算机软件产品通常存储在计 算机可读取的存储介质中, 包括若干指令用以使得计算机设备 (可以是个人计算机、 服务器、 或者网络设备等) 执行本发明 各实施例方法的全部或部分歩骤。 而前述的存储介质包括 U盘、 移动硬盘、 只读存储器 (ROM , Read-Only Memory )、 随机存 取存储器 (RAM , Random Access Memory )、 磁碟或者光盘等 各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护 范围并不局限于此, 也可以考虑将发明应用于 LTE-A的异构网 络中, 任何熟悉本技术领域的技术人员在本发明揭露的技术范 围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应所述以权利要求的保护范围 为准。

Claims

权 利 要 求 书
1、 一种报文转发方法, 其特征在于, 包括:
网络设备接收报文;
所述网络设备根据所述报文的报文头获得所述报文对应的 匹配项;
所述网络设备根据所述报文对应的匹配项查找流表以获得 第一出接口, 所述第一出接口为所述报文对应的匹配项对应的 出接口, 所述流表包括至少一个流表项, 所述流表项包括匹配 项和对应的出接口;
所述网络设备以所述第一出接口作为关键字查找转发关系 映射信息以获取第一转发动作信息, 所述第一转发动作信息对 应所述第一出接口, 所述第一转发动作信息用于标识第一转发 方式和第一转发标签, 所述转发关系映射信息保存在所述网络 设备中, 所述转发关系映射信息包括: 出接口和转发动作信息 的对应关系;
所述网络设备根据所述第一转发动作信息转发所述报文。
2、 根据权利要求 1所述的方法, 其特征在于, 当所述第一 转发方式为 IP转发时, 所述第一转发标签为 IP地址;
所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述第一转发标签为关键字查找路由表来 转发所述报文。
3、 根据权利要求 1所述的方法, 其特征在于, 当所述第一 转发方式为虚拟局域网 VLAN转发时, 所述第一转发标签为虚 拟局域网标识 VLAN ID;
所述网络设备根据所述第一转发动作信息转发所述报文包 括:
所述网络设备根据所述第一转发标签获得所述 VLAN ID所 属的 VLAN的媒体接入控制 MAC地址表; 和 所述网络设备根据所述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
4、 根据权利要求 1所述的方法, 其特征在于, 当所述第一 转发方式为以太转发时, 所述第一转发标签为 MAC地址;
所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述第一转发标签为关键字查找 MAC地址 表来转发所述报文。
5、 根据权利要求 1所述的方法, 其特征在于, 所述第一转 发标签包括 VLAN ID和 MAC地址;
所述网络设备根据所述第一转发动作信息转发所述报文包 括:
所述网络设备根据所述第一转发标签获得所述 VLAN ID所 属的 VLAN的 MAC地址表; 和
所述网络设备根据所述 MAC地址查找所述 MAC地址表来 转发所述报文。
6、 根据权利要求 1所述的方法, 其特征在于, 当所述第一 转发方式为虚拟专用网 VPN转发时, 所述第一转发标签为虚拟 专用网标识 VPN ID ;
所述网络设备根据所述第一转发动作信息转发所述报文包 括:
所述网络设备根据所述第一转发标签获得所述 VPN ID所 属的 VPN的路由表; 和
所述网络设备根据所述报文的目的 IP地址查找所述 VPN ID所属的 VPN的路由表来转发所述报文。
7、 根据权利要求 1所述的方法, 其特征在于, 当所述第一 转发方式为多协议标签交换 MPLS转发时, 所述第一转发标签 为 MPLS标签 LABEL ; 所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述第一转发标签为关键字查找 MPLS转 发表来转发所述报文。
8、 根据权利要求 1所述的方法, 其特征在于, 当所述第一 转发方式为隧道 TUNNEL转发时, 所述第一转发标签为隧道标 识 TUNNEL ID ;
所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述 TUNNEL ID为关键字查找隧道转发表 来转发所述报文。
9、 一种报文转发方法, 其特征在于, 包括:
网络设备接收报文;
所述网络设备根据所述报文的报文头获得所述报文对应的 匹配项;
所述网络设备根据所述报文对应的匹配项查找转发信息 表, 获得第一转发动作信息, 所述第一转发动作信息用于标识 第一转发方式和第一转发标签, 所述转发信息表由所述网络设 备根据流表和所述转发关系映射信息生成, 所述转发信息表包 括: 所述匹配项和转发动作信息; 所述流表包括匹配项和对应 的出接口; 所述转发关系映射信息包括: 所述出接口和转发动 作信息的对应关系;
所述网络设备根据所述第一转发动作信息转发所述报文。
10、 根据权利要求 9所述的方法, 其特征在于, 当所述第一 转发方式为 IP转发时, 所述第一转发标签为 IP地址;
所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述第一转发标签为关键字查找路由表来 转发所述报文。
1 1、 根据权利要求 9所述的方法, 其特征在于, 当所述第一 转发方式为 VLAN转发时, 所述第一转发标签为 VLAN ID ; 所述网络设备根据所述第一转发动作信息转发所述报文包 括:
所述网络设备根据所述第一转发标签获得所述 VLAN ID所 属的 VLAN的 MAC地址表; 和
所述网络设备根据所述报文的目的 MAC地址查找所述 MAC地址表来转发所述报文。
12、 根据权利要求 9所述的方法, 其特征在于, 当所述第一 转发方式为以太转发时, 所述第一转发标签为 MAC地址;
所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述第一转发标签为关键字查找 MAC地址 表来转发所述报文。
13、 根据权利要求 9所述的方法, 其特征在于, 所述第一转 发标签包括 VLAN ID和 MAC地址;
所述网络设备根据所述第一转发动作信息转发所述报文包 括:
所述网络设备根据所述第一转发标签获得所述 VLAN ID所 属的 VLAN的 MAC地址表; 和
所述网络设备根据所述 MAC地址查找所述 MAC地址表来 转发所述报文。
14、 根据权利要求 9所述的方法, 其特征在于, 当所述第一 转发方式为 VPN转发时, 所述第一转发标签为 VPN ID ;
所述网络设备根据所述第一转发动作信息转发所述报文包 括:
所述网络设备根据所述第一转发标签获得所述 VPN ID所 属的 VPN的路由表; 和
所述网络设备根据所述报文的目的 IP地址查找所述 VPN ID所属的 VPN的路由表来转发所述报文。
15、 根据权利要求 9所述的方法, 其特征在于, 当所述第一 转发方式为 MPLS转发时, 所述第一转发标签为 MPLS标签 LABEL ;
所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述第一转发标签为关键字查找 MPLS转 发表来转发所述报文。
16、 根据权利要求 9所述的方法, 其特征在于, 当所述第一 转发方式为 TUNNEL转发时, 所述第一转发标签为 TUNNEL ID ;
所述网络设备根据所述第一转发动作信息转发所述报文包 括: 所述网络设备以所述 TUNNEL ID为关键字查找隧道转发表 来转发所述报文。
17、 一种网络设备, 其特征在于, 所述网络设备包括接收 单元、 处理单元和发送单元, 其中:
所述接收单元, 用于接收报文;
所述处理单元, 用于根据所述报文的报文头获得所述报文 对应的匹配项; 根据所述报文对应的匹配项查找到所述流表以 获得第一出接口, 所述第一出接口为所述报文对应的匹配项对 应的出接口, 所述流表包括至少一个流表项, 所述流表项包括 匹配项和对应的出接口; 以所述第一出接口作为关键字查找转 发关系映射信息以获取第一转发动作信息, 所述第一转发动作 信息对应所述第一出接口, 所述第一转发动作信息用于标识第 一转发方式和第一转发标签, 所述转发关系映射信息保存在所 述网络设备中, 所述转发关系映射信息包括: 出接口和转发动 作信息的对应关系;
所述发送单元, 用于根据所述第一转发动作信息转发所述 报文。
18、 根据权利要求 17所述的网络设备, 其特征在于, 当所 述第一转发方式为 IP转发时, 所述第一转发标签为 IP地址; 所 述处理单元触发所述发送单元根据所述第一转发动作信息转发 所述报文包括: 所述处理单元触发所述发送单元以所述第一转 发标签为关键字查找路由表来转发所述报文。
19、 根据权利要求 17所述的网络设备, 其特征在于, 当所 述第一转发方式为 VLAN转发时, 所述第一转发标签为 VLAN ID ; 所述处理单元触发所述发送单元根据所述第一转发动作信 息转发所述报文包括: 所述处理单元触发所述发送单元根据所 述第一转发标签获得所述 VLAN ID所属的 VLAN的 MAC地址 表,根据所述报文的目的 MAC地址查找所述 MAC地址表来转发 所述报文。
20、 根据权利要求 17所述的网络设备, 其特征在于, 当所 述第一转发方式为以太转发时, 所述第一转发标签为 MAC地 址; 所述处理单元触发所述发送单元根据所述第一转发动作信 息转发所述报文包括: 所述处理单元触发所述发送单元以所述 第一转发标签为关键字查找 MAC地址表来转发所述报文。
21、 一种网络设备, 其特征在于, 所述网络设备包括接收 单元、 处理单元和发送单元, 其中:
所述接收单元, 用于接收报文;
所述处理单元, 用于根据所述报文的报文头获得所述报文 对应的匹配项;根据所述报文对应的匹配项查找到转发信息表, 获得第一转发动作信息, 所述第一转发动作信息用于标识第一 转发方式和第一转发标签, 所述转发信息表由所述网络设备根 据流表和所述转发关系映射信息生成, 所述转发信息表包括: 所述匹配项和转发动作信息; 所述流表包括匹配项和所述出接 口; 所述转发关系映射信息包括: 所述出接口和转发动作信息 的对应关系;
所述发送单元, 用于根据所述第一转发动作信息转发所述 报文。
22、 根据权利要求 21所述的网络设备, 其特征在于, 当所 述第一转发方式为 IP转发时, 所述第一转发标签为 IP地址; 所 述处理单元触发所述发送单元根据所述第一转发动作信息转发 所述报文包括: 所述处理单元触发所述发送单元以所述第一转 发标签为关键字查找路由表来转发所述报文。
23、 根据权利要求 21所述的网络设备, 其特征在于, 当所 述第一转发方式为 VLAN转发时, 所述第一转发标签为 VLAN ID ; 所述处理单元触发所述发送单元根据所述第一转发动作信 息转发所述报文包括: 所述处理单元触发所述发送单元根据所 述第一转发标签获得所述 VLAN ID所属的 VLAN的 MAC地址 表,根据所述报文的目的 MAC地址查找所述 MAC地址表来转发 所述报文。
24、 根据权利要求 21所述的网络设备, 其特征在于, 当所 述第一转发方式为以太转发时, 所述第一转发标签为 MAC地 址; 所述处理单元触发所述发送单元根据所述第一转发动作信 息转发所述报文包括: 所述处理单元触发所述发送单元以所述 第一转发标签为关键字查找 MAC地址表来转发所述报文。
PCT/CN2013/073985 2013-04-09 2013-04-09 报文转发方法和网络设备 WO2014166073A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/073985 WO2014166073A1 (zh) 2013-04-09 2013-04-09 报文转发方法和网络设备
CN201380000374.7A CN104488235B (zh) 2013-04-09 2013-04-09 报文转发方法和网络设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/073985 WO2014166073A1 (zh) 2013-04-09 2013-04-09 报文转发方法和网络设备

Publications (1)

Publication Number Publication Date
WO2014166073A1 true WO2014166073A1 (zh) 2014-10-16

Family

ID=51688849

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/073985 WO2014166073A1 (zh) 2013-04-09 2013-04-09 报文转发方法和网络设备

Country Status (2)

Country Link
CN (1) CN104488235B (zh)
WO (1) WO2014166073A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2658889C1 (ru) * 2014-10-21 2018-06-25 ЗетТиИ Корпорейшн Способ и устройство табличного поиска для таблиц OpenFlow, а также носитель данных
CN113556345A (zh) * 2021-07-22 2021-10-26 锐捷网络股份有限公司 一种报文处理方法、装置、设备及介质
CN113992584A (zh) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 一种报文转发方法及装置
CN113556345B (zh) * 2021-07-22 2024-04-19 锐捷网络股份有限公司 一种报文处理方法、装置、设备及介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114566B (zh) * 2017-09-25 2022-03-29 华为技术有限公司 一种报文转发的方法及网络设备
CN108173765B (zh) * 2017-12-28 2020-09-15 新华三技术有限公司 一种报文转发方法和装置
CN110324241B (zh) * 2018-03-30 2022-05-31 北京华为数字技术有限公司 一种流量转发路径的调整方法、报文转发方法和装置
CN109617646B (zh) * 2018-10-22 2022-10-25 中国平安财产保险股份有限公司 报文转换方法、装置、计算机设备及计算机可读存储介质
CN110430138B (zh) * 2019-07-26 2022-02-22 新华三技术有限公司合肥分公司 数据流转发状态记录方法及网络设备
CN111556084B (zh) * 2020-06-30 2022-08-23 成都卫士通信息产业股份有限公司 Vpn设备间的通信方法、装置、系统、介质和电子设备
CN113472665B (zh) * 2021-06-17 2022-11-18 新华三信息安全技术有限公司 Evpn下不同组网对接的实现方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009103225A1 (zh) * 2008-02-18 2009-08-27 华为技术有限公司 一种报文转发的方法和设备
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102957603A (zh) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 基于多级流表的Openflow报文转发方法及系统
CN103004147A (zh) * 2012-09-25 2013-03-27 华为技术有限公司 报文转发路径确定方法及网络设备、控制设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011144495A1 (en) * 2010-05-19 2011-11-24 Telefonaktiebolaget L M Ericsson (Publ) Methods and apparatus for use in an openflow network
CN102271079B (zh) * 2010-06-04 2014-11-05 华为技术有限公司 报文转发的方法、节点和系统
US8964563B2 (en) * 2011-07-08 2015-02-24 Telefonaktiebolaget L M Ericsson (Publ) Controller driven OAM for OpenFlow

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009103225A1 (zh) * 2008-02-18 2009-08-27 华为技术有限公司 一种报文转发的方法和设备
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN103004147A (zh) * 2012-09-25 2013-03-27 华为技术有限公司 报文转发路径确定方法及网络设备、控制设备
CN102957603A (zh) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 基于多级流表的Openflow报文转发方法及系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2658889C1 (ru) * 2014-10-21 2018-06-25 ЗетТиИ Корпорейшн Способ и устройство табличного поиска для таблиц OpenFlow, а также носитель данных
CN113556345A (zh) * 2021-07-22 2021-10-26 锐捷网络股份有限公司 一种报文处理方法、装置、设备及介质
CN113556345B (zh) * 2021-07-22 2024-04-19 锐捷网络股份有限公司 一种报文处理方法、装置、设备及介质
CN113992584A (zh) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 一种报文转发方法及装置

Also Published As

Publication number Publication date
CN104488235B (zh) 2017-08-04
CN104488235A (zh) 2015-04-01

Similar Documents

Publication Publication Date Title
WO2014166073A1 (zh) 报文转发方法和网络设备
US10116559B2 (en) Operations, administration and management (OAM) in overlay data center environments
US10050877B2 (en) Packet forwarding method and apparatus
US20150358232A1 (en) Packet Forwarding Method and VXLAN Gateway
US8982707B2 (en) Interoperability of data plane based overlays and control plane based overlays in a network environment
US20220078114A1 (en) Method and Apparatus for Providing Service for Traffic Flow
WO2016192686A1 (zh) 数据报文转发
WO2017197885A1 (zh) 用于虚拟可扩展局域网的通信方法和装置
WO2017198163A1 (zh) 接入控制
US10313154B2 (en) Packet forwarding
WO2014201974A1 (zh) 业务路由报文处理方法、装置及网络系统
WO2017113300A1 (zh) 路由确定方法、网络配置方法以及相关装置
WO2017025005A1 (zh) 实现云平台安全
US11283645B2 (en) Forwarding packet
WO2017000802A1 (zh) 一种业务故障定位方法及装置
US11522792B2 (en) Method for discovering forwarding path and related device thereof
EP3292663B1 (en) Packet forwarding
JP2014150364A (ja) アドレス生成装置
JP7216120B2 (ja) Bgpメッセージ送信方法、bgpメッセージ受信方法、及びデバイス
US10313274B2 (en) Packet forwarding
WO2015149367A1 (zh) 报文处理的方法与设备
CN110752989A (zh) 一种东西向流量转发方法与装置
WO2014101192A1 (zh) 网络设备以及处理报文方法
WO2022100511A1 (zh) 转发表项的处理方法和装置
WO2015137977A1 (en) A switching fabric including a virtual switch

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

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

Country of ref document: EP

Kind code of ref document: A1