WO2015074397A1 - 一种网络报文的传送方法和设备 - Google Patents

一种网络报文的传送方法和设备 Download PDF

Info

Publication number
WO2015074397A1
WO2015074397A1 PCT/CN2014/078481 CN2014078481W WO2015074397A1 WO 2015074397 A1 WO2015074397 A1 WO 2015074397A1 CN 2014078481 W CN2014078481 W CN 2014078481W WO 2015074397 A1 WO2015074397 A1 WO 2015074397A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
priority
port
network message
sent
Prior art date
Application number
PCT/CN2014/078481
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 EP14864209.3A priority Critical patent/EP3029897B1/en
Publication of WO2015074397A1 publication Critical patent/WO2015074397A1/zh
Priority to US15/053,392 priority patent/US10057175B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2408Traffic characterised by specific attributes, e.g. priority or QoS for supporting different services, e.g. a differentiated services [DiffServ] type of service

Definitions

  • the present invention relates to the field of computers, and in particular, to a method and a device for transmitting network messages.
  • a physical server can be virtualized into multiple virtual machines (VMs).
  • VMs virtual machines
  • Each VM is equivalent to a separate computer, with its own virtual network card, and a virtual MAC (Media Access Control) address.
  • virtual IP Internet Protocol
  • the multiple physical VMs on the same physical server share the physical network port on the physical server.
  • a general server is configured with multiple physical network ports. These physical network ports usually use the bonding technology to improve the network throughput of the host or improve the availability. When the physical network port is faulty, the other physical network ports will forward the traffic on the network port to avoid the impact on normal network communication.
  • the prior art implements service load sharing based on VM NIC.
  • the current service load sharing method is to mix traffic of different services, and at most one VM service can be achieved. It can be sent from a physical network port. If the traffic of some users is too large (such as file download, online video, etc.), the port will be congested and the packets will be discarded. Then the important service packets of the user are also It will be discarded, so that the user's requirements for service quality cannot be guaranteed, resulting in a reduced experience.
  • Embodiments of the present invention provide a method and a device for transmitting a network packet, which can be
  • the service priority is load-sharing between multiple ports.
  • the service quality is improved and the user experience satisfaction is improved.
  • the first aspect provides a method for transmitting a network packet, where the method includes: acquiring a network packet;
  • the obtaining the priority of the network packet according to the service type of the network packet includes:
  • the setting, by the network packet, a priority mark corresponding to the priority of the network packet includes:
  • the value range of the coded value of the service-division code point corresponding to the priority is set in advance, and the value range of the code value of the service-division code point determines the priority of the network message.
  • the network port corresponding to the priority of the network packet is preset
  • the priority of the network packet includes at least two priorities, and each priority corresponds to one or more network ports.
  • the fourth possible implementation port is configured to include: And identifying, according to the service class identifier in the service class identifier byte in the data packet of the network packet, identifying a priority of the network message; sending.
  • the method when the first network port corresponding to the priority of the network is faulty, the method is Also includes:
  • the network port corresponding to the priority of the network is only the first network port, or all the network ports corresponding to the priority of the network message are faulty, the network is passed through the third In conjunction with the third possible implementation of the first aspect, in a sixth possible implementation,
  • the method further includes:
  • the network port corresponding to the priority of the network is only the first network port, or all the network ports corresponding to the priority of the network message are faulty, the network is passed through the fifth The network port sends, and the priority corresponding to the fifth network port is higher than the priority of the network port.
  • the second aspect provides a method for transmitting a network packet, where the method includes: recording a source port number, a source IP address, a destination port number, and a destination IP of the network received on each physical port;
  • the link aggregation group is a group connected to the same network device.
  • the source port number and the destination port number of the network packets to be sent with the destination port number and source port number of the network packets received on all the physical ports in the link aggregation group. Describe the physical port corresponding to the sent network packet;
  • the source port number, the destination port number of the network packet to be sent, and the physical port received in the recorded link aggregation group are received.
  • the destination port number and the source port number of the network packet are compared, and the physical port corresponding to the network to be sent is found.
  • the source port number of the network packet to be sent is the same as the destination port number of a received network packet, or the destination port number of the network packet to be sent and the source port number of a received network packet
  • the physical port of the network packet is received as the physical port corresponding to the network to be sent.
  • the method further includes:
  • a third aspect provides a network device, where the network device includes:
  • a virtual machine configured to acquire a network packet
  • a bridge unit configured to acquire a priority of the network packet according to a service type of the network packet; and send the first network port.
  • the bridging unit includes: a packet analyzing unit, configured to identify the network packet according to a source port number or a destination port number of the network packet business type;
  • a grading unit configured to determine a priority of the network according to a service type of the network packet and a preset rule
  • a marking unit configured to set a priority marking corresponding to the priority of the network packet for the network packet.
  • the marking unit is specifically used to:
  • the value range of the coded value of the service-division code point corresponding to the priority is set in advance, and the value range of the code value of the service-division code point determines the priority of the network message.
  • the network port corresponding to the priority of the network packet is preset
  • the priority of the network packet includes at least two priorities, and each of the priorities corresponds to one network port or multiple network ports. .
  • the binding unit is specifically configured to:
  • the binding unit is further configured to:
  • the binding unit is also specifically used to:
  • the network is Sending through the fourth network port
  • the network port corresponding to the priority of the network is only the first network port, or all the network ports corresponding to the priority of the network message are faulty, the network is passed through the fifth The network port sends, and the priority corresponding to the fifth network port is higher than the priority of the network port.
  • a switching device is further provided, where the switching device includes:
  • a recording unit that records the source port number and source of the network received on each physical port
  • IP destination port number, and destination IP
  • the Querying Unit is configured to use, according to the source IP or the destination IP group of the network packet to be sent, a set of physical ports connected to the same network device;
  • a determining unit configured to perform a source port number, a destination port number of the network packet to be sent, and a destination port number and a source port number of the network packet received on all physical ports in the recorded link aggregation group
  • the physical port corresponding to the network packet to be sent is found out; ' ' , , ,
  • the determining unit is specifically configured to:
  • the source port number of the network packet to be sent is the same as the destination port number of a received network packet, or the destination port number of the network packet to be sent and the source port number of a received network packet
  • the physical port of the network packet is received as the physical port corresponding to the network to be sent.
  • the sending unit is further configured to:
  • Embodiments of the present invention provide a method and a device for transmitting a network packet, first, a network
  • the network device obtains the network packet, and obtains the network packet transmission according to the service type of the network packet. Then, when receiving the packet sent by the network device, the switching device records the network received on each physical port.
  • the source port number, the source IP address, the destination port number, and the destination IP address, and the link aggregation group for sending the network packet to be sent is found according to the source IP address or the destination IP address of the network packet to be sent.
  • the source port number and the destination port number of the network packet to be sent are compared with the destination port number and source port number of the network packet received on all the physical ports in the recorded link aggregation group.
  • the network port to be sent is sent.
  • different priorities are sent from different network ports on the server. Services of the same priority on the switch are received or sent from the same physical port to complete the distribution of service load and improve services of different services. Quality, improved user experience satisfaction.
  • FIG. 1 is a schematic flowchart 1 of a method for transmitting a network packet according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart 2 of a method for transmitting a network packet according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart 3 of a method for transmitting a network packet according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a network packet according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart 4 of a method for transmitting a network packet according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram 1 of a network device according to an embodiment of the present invention
  • FIG. 7 is a schematic structural diagram 2 of a network device according to an embodiment of the present invention
  • FIG. 8 is a schematic diagram of a switching device according to an embodiment of the present invention
  • Schematic is a schematic structural diagram of another network device according to an embodiment of the present invention
  • FIG. 10 is a schematic structural diagram of another switching device according to an embodiment of the present invention.
  • the embodiment of the invention provides a method for transmitting a network packet, which is based on the network device side, as shown in FIG. 1 , the method includes:
  • An embodiment of the present invention further provides another method for transmitting a network packet, which is based on the switching device side. As shown in FIG. 2, the method includes:
  • the network device may be a server, and the switching device may be a switch.
  • An embodiment of the present invention provides a method for transmitting a network packet.
  • the network device acquires a network packet, and obtains the network packet according to the service type of the network packet. Then, the switching device is in the receiving network.
  • the source port number, source IP address, destination port number, and destination IP address of the network packets received on each physical port are recorded.
  • the link aggregation group for sending the network packet to be sent is found, and the source port number, the destination port number, and the recorded chain of the network packet to be sent are sent.
  • the destination port number and the source port number of the network packets received on all the physical ports in the route aggregation group are compared.
  • the physical port corresponding to the network packet to be sent is found.
  • a method for transmitting a network packet according to an embodiment of the present invention is described in detail by using a specific embodiment.
  • One or more virtual machines are running on the network device, and the network device further includes a bridge unit and a binding unit.
  • the virtual machine is simply referred to as a VM.
  • the method includes:
  • the network may be generated by an application in a VM running on a network device. After generating these network packets, the virtual machine sends the network packets to the bridge module in the network device.
  • the bridge module of the network device can identify and analyze the source port number or the destination port number.
  • the service type of the packet sent by the user VM is usually distinguished by different port numbers.
  • the general port number of the WEB service is 80, and the general port number of the TELNET service is 23 (the TELNET protocol is the standard protocol for the Internet remote login service), and the general port number of the desktop cloud office ICA protocol is 1494.
  • any one of the source port number and the destination port number of the different network packets is a specific port number, and the different network packets are considered to be the service type corresponding to the specific port number.
  • the source port number of a network packet is 80
  • the destination port number is the temporary port number 1033
  • the source port number of another network text is the temporary port number 1135
  • the destination port number is 80.
  • the business types are all WEB month services.
  • the ICA (Independent Computing Architecture) protocol of the desktop cloud office can be set to the highest priority, the TELNET service is the second, the WEB service of the website is again, the other ports have the lowest service priority, and the service can be performed according to the actual needs of the user. Prioritization.
  • ICA Independent Computing Architecture
  • the priority of the network can be determined according to the preset priority rule.
  • the value range of the coded value of the service coded point corresponding to the priority is set in advance, and the value range of the coded value of the service coded point determines the priority of the network message.
  • a Differentiated Services Code Point is set in a Type Of Service (TOS) of a message, and a total of 6 bits of the DSCP are used.
  • the range is: 0 ⁇ 63.
  • the location of DSCP in the TOS of the message is shown in Figure 4.
  • Different priorities can be set according to different business needs. The default is divided into 4 categories: Class Selector (CS), the range of values: OxXXX 000; Expedited Forwarding (EF), value: 0x101 110; Assured Forwarding (AF), the range of values: OxXXX ⁇ 0; Default (BE), take Value: 0x000 000.
  • CS Class Selector
  • EF Expedited Forwarding
  • AF Assured Forwarding
  • the X in the range of values is 0, or 1.
  • the DSCP value is set to EF
  • the DSCP value range of the TELNET service is set to AF
  • the DSCP value of other service priorities is set to the default value BE.
  • the mapping between the different priority services and the DSCP value or value range can be set as required.
  • the bridge module in the network device will carry
  • the binding module of the network device first identifies the network packet according to the DSCP in the TOS in the data packet of the network packet. The mouth is sent.
  • the network port corresponding to the priority of the network packet is preset.
  • the priority of the network packet is the priority of the network packet.
  • the priority of the network packet includes at least two priorities.
  • the priority corresponds to one or more network ports, for example, six physical network ports are selected, and £ is set to eth0, ethl, eth2, eth3, eth4, eth5, and i6 physical network ports respectively with priority CS, EF, AF, BE binding, where CS corresponds to eth0, ethl, EF corresponds to eth2, AF corresponds to eth3, and BE corresponds to eth4 and eth5.
  • the priority of the network packet is determined to be CS, so that ethO can be used as the first network that sends the network message. mouth.
  • the priority CS corresponds to eth0, ethl
  • EF corresponds to eth2
  • AF corresponds to eth3
  • BE corresponds to eth4, eth5, and the priority of network packets is CS, when ethO fails, such as blocking or disconnecting, Network packets are sent from ethl with the same priority as ethO.
  • the network passes the text.
  • the third network port sends the priority of the third network port to be lower than the priority of the network.
  • the priority CS corresponds to ethl
  • EF corresponds to eth2
  • AF corresponds to eth3
  • BE corresponds to eth4, eth5, and network 4 ⁇ priority is CS, when ethO fails, such as blocking or disconnecting, It is preferred to send the network from eth2 with a lower priority than ethl.
  • the priority CS corresponds to eth0, ethl
  • EF corresponds to eth2
  • AF corresponds to eth3
  • BE corresponds to eth4, eth5
  • the priority of network 4 is CS, where when both ethO and ethl fail, such as blocking or disconnecting, The network is sent from eth2 with a lower priority than ethl and ethl.
  • the network priority is corresponding to the fourth network port, and the network is sent through the fourth network port.
  • the priority CS corresponds to eth0, ethl
  • EF corresponds to eth2
  • AF corresponds to eth3
  • BE corresponds to eth4, eth5, and the priority of the network is BE, then eth4 is determined to be the priority of the network.
  • the network is sent through the fifth network port.
  • the priority of the fifth network port is higher than the priority of the network port.
  • the network port of the high priority service can be selected to send the lowest priority service to ensure the availability of the service.
  • the priority CS corresponds to eth0, ethl
  • EF corresponds to eth2
  • AF corresponds to eth3
  • BE corresponds to eth4
  • network priority is BE.
  • eth4 fails, priority is higher than eth4.
  • Level eth3 sends network packets.
  • the priority CS corresponds to eth0, ethl
  • EF corresponds to eth2
  • AF corresponds to eth3
  • BE corresponds to eth4, eth5, and the priority of the network is BE.
  • eth4 and eth5 fail, priority is given from eth4 and eth5.
  • a higher priority eth3 sends a network packet.
  • the network packet has a higher priority and the number of network ports is smaller, in this case, several lower priorities can be set to correspond to the same network port.
  • the network is divided into six priorities, but the number of network ports is only four.
  • the network of the priority 5 and the priority 6 can be set to correspond to one network port.
  • the network device in the embodiment of the present invention may be a physical host such as a server or a computer or an IP packet receiving unit.
  • An embodiment of the present invention provides a method for transmitting a network packet, which first obtains a network packet, and then identifies a service type of the network packet according to a source port number or a destination port number of the network packet, and then according to the service type of the network packet. And the preset rule determines the priority of the network packet, and sets a priority flag corresponding to the priority of the network packet for the network packet, where the first network port corresponding to the last priority is faulty and corresponds to the second network port. , the network is sent through the second network port; if the first network port corresponding to the priority of the network is faulty, and corresponding If the first network port or the corresponding network port except the first network port is faulty, the network port is sent through the third network port.
  • the third network port corresponds to the lower priority than the network.
  • Priority of the network if the priority of the network is the lowest and the corresponding first network port is faulty, the network priority is corresponding to the fourth network port, then the network is passed through the fourth network port.
  • Sending if the priority of the network is the lowest and the corresponding first network port is faulty or the corresponding network ports except the first network port are faulty, then the network is sent through the fifth network port.
  • the priority of the fifth network port is higher than the priority of the network port.
  • the embodiment of the present invention further provides another method for transmitting a network packet. Based on the switching device side, in order to enable a person skilled in the art to more clearly understand the technical solution provided by the embodiment of the present invention, The method is described in detail, as shown in Figure 5, the method includes:
  • the source IP address, the source port number, the destination IP address, and the destination port number of the network packet received by each port on the switching device are recorded on the switching device.
  • the link aggregation group used to send the network packet to be sent is found according to the source IP address or the destination IP address of the network packet to be sent.
  • the link aggregation control protocol is implemented on the switching device, and multiple ports on the switching device are aggregated to form a link aggregation group, and the link aggregation group refers to the connection on the switching device.
  • the ports on one switching device can form multiple link aggregation groups.
  • the source port number of the network packet to be sent is the same as the destination port number of a received network packet, or the destination port number of the network packet to be sent and a received If the source port number of the network packet is the same, the physical port that receives the network packet is the physical port corresponding to the network to be sent.
  • a source port number of a network message to be sent by a WEB service is 80, and a destination port number is 1020.
  • a service type in the record of the switching device is also a source of the WEB service network packet of the website.
  • the port number is 1245, the destination port number is 80, and the network text is received through the physical port 1 of the switch. Then, the physical port 1 of the switch is used as the outgoing port of the network packet to be sent.
  • the network packet to be sent is a desktop cloud office ICA protocol packet
  • the destination port number of the network packet is 1494
  • the source port number is 1494 in the record of the switching device.
  • the network packet of the ICA protocol of the desktop cloud office is assumed to be received by the network port 2 connected to the server through the physical port 2 of the switching device, and the network packet to be sent is sent from the switching device.
  • the physical port 2 and the connected network port 2 are sent back to the server.
  • different network packets of the same service type can be sent back to the server through the same physical port on the switching device and the network port connected to the port and the server.
  • the network port is also sent to the same network port, so that the network packet is sent and returned with the same priority. Quality is guaranteed.
  • the non-congested physical port in the link aggregation group is selected first. After the physical port corresponding to the network is detected on the switching device, the corresponding physical port is sent out.
  • the network device in the embodiment of the present invention may be a physical host such as a server or a computer or an IP packet receiving unit, and the switching device may be a switch.
  • the embodiment of the present invention further provides a method for transmitting a network packet, which records a source port number, a source IP address, a destination port number, and a destination IP address of a network packet received on each physical port, according to the network to be sent.
  • the source IP address or the destination IP address of the packet is used to find the link aggregation group for sending the network packet to be sent, and the source port number of the network packet to be sent.
  • the destination port number is compared with the destination port number and source port number of the network packets received on all the physical ports in the link aggregation group. If the source port number of the network packet to be sent is the same as the received network.
  • the physical port of the network will be received as the network to be sent.
  • the physical port corresponding to the text sends the network packet to be sent from the corresponding physical port. If the port corresponding to the network packet to be sent cannot be found, select any available physical port in the link aggregation group to be sent.
  • the network message is sent.
  • the physical port of the switching device that sends network packets is selected according to the port number of the network packet.
  • the network device 00 includes:
  • the virtual machine 10 is configured to acquire a network packet.
  • the bridge unit 20 is configured to acquire the priority of the network packet according to the service type of the network packet.
  • the network port is sent.
  • the bridge unit 20 may include:
  • the message analyzing unit 21 is configured to identify a service type of the network according to a source port number or a destination port number of the network packet.
  • the grading unit 22 is configured to determine the priority of the network packet according to the service type of the network packet and the preset rule.
  • the marking unit 23 is configured to set a priority flag corresponding to the priority of the network for the network.
  • the marking unit 23 can be specifically configured to:
  • the value range of the coded value of the service coded point corresponding to the priority is set in advance, and the value range of the coded value of the service coded point is determined to determine the priority of the network message.
  • the network port corresponding to the priority of the network packet is preset;
  • the priority of the network packet includes at least two priorities, and each priority corresponds to one or more network ports.
  • the binding unit 30 may be specifically configured to:
  • the binding unit may also be specifically used for:
  • the binding unit 30 may be specifically configured to: If the priority is corresponding to the fourth network port, the network is sent through the fourth network port;
  • the network port corresponding to the priority of the network is only the first network port, or all the network ports corresponding to the network priority are faulty, the network is sent through the fifth network port, and the fifth network port is sent.
  • the corresponding priority is higher than the priority of the network packet.
  • An embodiment of the present invention provides a network device, which first obtains a network packet, and then identifies a service type of the network packet according to a source port number or a destination port number of the network packet, and then according to the service type of the network packet and the preset
  • the rule determines the priority of the network packet, sets the priority label corresponding to the priority of the network packet for the network packet, and finally sends the network packet from the first network port corresponding to the priority of the network packet, if the network If the first network port corresponding to the priority of the packet is faulty and the second network port is also configured, the network port is sent through the second network port; if the first network port corresponding to the priority of the network is faulty, If the corresponding network port only has the first network port or the other network ports except the first network port, the network port is sent through the third network port, and the third network port corresponds to the lower priority than the network.
  • Priority of the text If the priority of the network is the lowest and the corresponding first network port is faulty, the priority of the network is corresponding to the fourth network port, then the network is sent through the fourth network port; If the priority of the authentication is the lowest and the corresponding first network port is faulty or the corresponding network ports except the first network port are faulty, the network is sent through the fifth network port.
  • the priority of the port corresponds to the priority of the network.
  • the embodiment of the present invention further provides a switching device 80.
  • the switching device 80 includes:
  • the recording unit 81 is configured to record a source port number, a source IP address, a destination port number, and a destination IP address of the network received on each physical port.
  • the query unit 82 is configured to: according to the source IP address or destination IP determining unit 83 of the network packet to be sent, the source port number and the destination port number of the network to be sent, and the recorded link aggregation group in the link The destination port number and the source port number of the network packets received on all the physical ports are compared. The physical port corresponding to the network packet to be sent is found.
  • the issuing unit 84 is configured to send the network packet to be sent from the corresponding physical port.
  • the determining unit 83 may be specifically configured to:
  • the source port number and the destination port number of the network to be sent are compared with the destination port number and source port number of the network packets received on all the physical ports in the link aggregation group.
  • the physical port that receives a network packet is used as the physical port corresponding to the network to be sent.
  • the sending unit 84 may be specifically configured to:
  • any available physical port in the link aggregation group to send the network packet to be sent.
  • the non-congested physical port in the link aggregation group is preferentially selected to send the network packet to be sent.
  • the embodiment of the present invention further provides a switching device, which first records a source port number, a source IP address, a destination port number, and a destination IP address of a network packet received on each physical port, according to the network packet to be sent.
  • the source IP address or the destination IP address is used to find the link aggregation group for sending the network packet to be sent, and the source port number, the destination port number of the network packet to be sent, and all the recorded link aggregation groups.
  • the destination port number and the source port number of the network packets received on the physical port are compared. If the source port number of the network packet to be sent is the same as the destination port number of a received network packet, or the network packet to be sent is sent.
  • the physical port of the network 4 is received as the physical port corresponding to the network to be sent, and the network packet to be sent is sent from the network port.
  • the corresponding physical port is sent; if the port corresponding to the network packet to be sent cannot be found, select any available physical port in the link aggregation group to be sent. Packet sent.
  • the physical port of the switching device that sends network packets is selected according to the port number of the network packet.
  • the network device connection switching device provided by the embodiment of the present invention is only exemplary.
  • the network packet transmission method provided by the embodiment of the present invention can also be used for the switching device connection switching device.
  • the scenario also applies to scenarios where network devices are connected to network devices.
  • the network packet view provided by the embodiment of the present invention is also applicable to the non-virtualized scenario, such as replacing the virtual machine in the above embodiment with a single server or a computer, and replacing the virtual bridge with a switch. The same applies to the scenario in this scenario.
  • the method is the same as the previous embodiment and will not be described again.
  • the embodiment of the present invention further provides a network device 90.
  • the device 90 includes: a bus 94; and a processor 91, a memory 92 and an interface 93 connected to the bus 94, wherein the interface 93 is used for communication.
  • the memory 92 is used to store the instruction 921, and the processor 91 executes the instruction 921 for:
  • the priority of the network packet is obtained according to the service type of the network packet.
  • the network packet is sent from the first network port corresponding to the priority of the network.
  • the processor 91 executes the instruction 921, where the priority of the network packet is obtained according to the service type of the network packet, which may include:
  • the priority of the network packet is determined according to the service type of the network packet and the preset rule
  • the processor 91 executes the instruction 921, where the priority flag corresponding to the priority of the network packet is set for the network packet, which may include:
  • the value range of the coded value of the service coded point corresponding to the priority is set in advance, and the value range of the coded value of the service coded point is determined to determine the priority of the network message.
  • the network port corresponding to the priority of the network packet is preset; wherein the priority of the network packet includes at least two priorities, and each priority corresponds to one or more network ports.
  • the processor 91 executes the instruction 921, where the network packet is sent from the first network port corresponding to the priority of the network packet, and specifically includes:
  • the processor 91 executing the instruction 921 may also be used to:
  • the network message is sent through the second network port
  • the network port corresponding to the priority of the network is only the first network port, or all the network ports corresponding to the network priority are faulty, the network is sent through the third network port, and the third network port is sent.
  • the corresponding priority is lower than the priority of the network.
  • the first network port corresponding to the priority of the network is faulty, and the network is
  • the processor 91 executes the command 921, and may be further configured to: if the priority of the network 4 corresponds to the fourth network port, send the network message through the fourth network port;
  • the network port corresponding to the priority of the network is only the first network port, or all the network ports corresponding to the network priority are faulty, the network is sent through the fifth network port, and the fifth network port is sent.
  • the corresponding priority is higher than the priority of the network packet.
  • An embodiment of the present invention provides a network device, which first obtains a network packet, and then identifies a service type of the network packet according to a source port number or a destination port number of the network packet, and then according to the service type of the network packet and the preset
  • the rule determines the priority of the network packet, sets the priority label corresponding to the priority of the network packet for the network packet, and finally sends the network packet from the first network port corresponding to the priority of the network packet, if the network If the first network port corresponding to the priority of the packet is faulty and the second network port is also configured, the network port is sent through the second network port; if the first network port corresponding to the priority of the network is faulty, If the corresponding network port only has the first network port or the other network ports except the first network port, the network port is sent through the third network port, and the third network port corresponds to the lower priority than the network.
  • Priority of the text if the priority of the network 4 is the lowest and the corresponding first network port fails, the priority of the network is corresponding to the fourth network port, then the network is passed the fourth Network port sending If the priority of the network is the lowest and the corresponding first network port is faulty or the corresponding network ports except the first network port are faulty, the network is sent through the fifth network port. The priority of the five network ports is higher than the priority of the network.
  • An embodiment of the present invention also provides a switching device 60, as shown in FIG. 10, comprising: a bus 64; and a processor 61, a memory 62 and an interface 63 connected to the bus 64, wherein the interface 63 is for communication
  • the memory 62 is used to store instructions 621, and the processor 61 executes the instructions 621 for:
  • the link aggregation group for sending the network packet to be sent is found according to the source IP address or the destination IP address of the network packet to be sent; the link aggregation group is a group of physical ports connected to the same network device; Compare the source port number and destination port number of the network packets to be sent with the destination port number and source port number of the network packets received on all physical ports in the recorded link aggregation group. Physical port corresponding to the network packet;
  • the network packet to be sent is sent from the corresponding physical port.
  • the processor 61 executes the instruction 621, where the source port number, the destination port number of the network packet to be sent, and the destination port number of the network packet received on all physical ports in the recorded link aggregation group. And the source port number is compared, and the physical port corresponding to the network packet to be sent is found, which may include:
  • the physical port that receives a network packet is used as the physical port corresponding to the network to be sent.
  • the processor 61 executing the command 621 can also be used to:
  • the embodiment of the present invention further provides a switching device, which first records the source port number and the destination port number of the network packet received on each port, and then the source port number and the destination port number and the record of the network packet to be sent.
  • the source port number and the destination port number of the network packet received on each port are compared, and any one of the source port number and the destination port number of the network packet to be sent and the source of a received network packet are compared. If the port number and the destination port number are the same, the port that receives the network packet is the port corresponding to the network packet to be sent, and the network packet to be sent is sent from the corresponding physical port.
  • For the port corresponding to the network packet to be sent select any available port on the switch to send the network packet to be sent.
  • the switch port that sends network packets is selected according to the port number of the network packet.
  • the disclosed methods and apparatus may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the distinguishing of the units is only a logical function distinction, and the actual implementation may have another distinguishing manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the units described as separate components may or may not be physically separated.
  • the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform part of the steps of the method of the various embodiments of the present invention.
  • the foregoing storage mediums include: U disk, mobile hard disk, read only memory (Read-Only
  • ROM Read Only Memory
  • RAM Random Access Memory
  • disk or optical disk and other media that can store program code.

Abstract

本发明的实施例提供一种网络报文的传送方法和设备,涉及计算机领域,通过区分业务的优先级,按照业务的优先级在多个端口间进行业务负载分担,提升了不同业务的服务质量,提高了用户体验满意度。具体方案为:首先网络设备获取网络报文以及该网络报文的优先级,将网络报文从网络报文的优先级对应的网口发送,而后,交换设备在接收网络设备发送的报文时,记录每个物理端口上接收的网络报文的源端口号、源IP、目的端口号和目的IP,再在交换设备的记录中查找出待发出的网络报文对应的物理端口并从该物理端口发出该网络报文。本发明用于网络报文的传送。

Description

一种网络报文的传送方法和设备
本申请要求于 2013 年 1 1 月 25 日提交中国专利局、 申请号为 201310607930.9、 发明名称为 "一种网络 4艮文的传送方法和设备" 的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机领域,尤其涉及一种网络报文的传送方法和设 备。
背景技术
随着云计算技术的发展,一个物理服务器可以被虚拟成多个虚拟 机( Virtual Machine ,VM ) , 每个 VM相当于一个独立的计算机, 拥 有自己的虚拟网卡, 虚拟 MAC(Media Access Control)地址, 以及虚 拟 IP(Internet Protocol )地址,同一个物理服务器上的多个 VM共用这 台物理服务器上的物理网口。基于可靠性和带宽需求的考虑, 一般服 务器配置多个物理网口, 这些物理网口通常釆用绑定 (Bonding ) 技 术, 来提升主机的网络吞吐量或者是提高可用性, 实现网络流量在多 个物理网口间负载均衡, 同时当某一个物理网口故障时, 其他的物理 网口会承担该网口上流量的转发工作,避免对正常的网络通信造成影 响。
现有技术实现了基于 VM 网卡的业务负载分担, 但是对于一个 服务器上运行多个 VM的情况,当前的业务负载分担方式是把不同业 务的流量混杂在一起,最多只能做到一个 VM的业务可以从一个物理 网口发出, 如果由于某些用户业务流量过大(例如文件下载, 在线视 频等) , 则会导致端口拥塞, 从而开始丟弃拥塞的报文, 那么用户的 重要业务报文也会被丟弃, 从而无法保证用户对业务服务质量的要 求, 导致体验降低。
发明内容
本发明的实施例提供一种网络报文的传送方法和设备,能够按照 业务的优先级在多个端口间进行负载分担,在完成业务负载分担的同 时, 提升了服务质量, 提高了用户体验满意度。
为达到上述目的, 本发明的实施例釆用如下技术方案: 第一方面, 提供一种网络报文的传送方法, 所述方法包括: 获取网络报文;
根据所述网络报文的业务类型获取所述网络报文的优先级;
结合第一方面, 在第一种可能的实现方式中, 所述根据所述网络 报文的业务类型获取所述网络报文的优先级包括:
根据所述网络报文的源端口号或目的端口号识别所述网络报文 的业务类型;
根据所述网络报文的业务类型以及预设的规则确定所述网络报 文的优先级; 记。
结合第一方面的第一种可能的实现方式,在第二种可能的实现方 式中,所述为所述网络报文设置与所述网络报文的优先级对应的优先 级标记包括:
在所述网络报文的数据包中的服务类别标识字节中设置区分服 务编码点;
其中,预先设置有与优先级对应的区分服务编码点的编码值的取 值范围,所述区分服务编码点的编码值所属的取值范围确定了所述网 络报文的优先级。
结合第一方面, 在第三种可能的实现方式中, 网络报文的优先级 对应的网口是预先设置的;
其中, 网络报文的优先级包括至少两种优先级,每一种优先级对 应一个或者多个网口。
结合第一方面的第二种可能的实现方式,在第四种可能的实现方 口发送包括: 根据所述网络报文的数据包中的服务类别标识字节中的区分服 务编码,、识别所述网络 ^艮文的优先级; 送。 、 ' ' ^ ' 结合第一方面的第三种可能的实现方式,在第五种可能的实现方 式中, 当所述网络 ^艮文的优先级对应的第一网口故障时, 所述方法还 包括:
若所述网络 ^艮文的优先级还对应有第二网口,则将所述网络 ^艮文 通过所述第二网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障,则将所述网络 ^艮文通过第三 结合第一方面的第三种可能的实现方式,在第六种可能的实现方 式中,
当所述网络 ^艮文的优先级对应的第一网口故障 ,且所述网络 ^艮文 的优先级为最低优先级时, 所述方法还包括:
若所述网络 ^艮文的优先级还对应有第四网口,则将所述网络 ^艮文 通过所述第四网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障 ,则将所述网络 ^艮文通过第五 网口发送, 所述第五网口对应的优先级高于所述网络 ^艮文的优先级。
第二方面, 还提供一种网络报文的传送方法, 所述方法包括: 记录每个物理端口上接收的网络 4艮文的源端口号、 源 IP、 目的 端口号和目的 IP;
根据所述待发出的网络报文的源 IP或者目的 IP查找出用于发送 所述待发出的网络报文的链路聚合组;所述链路聚合组为连接到同一 个网络设备的一组物理端口;
将待发出的网络报文的源端口号、目的端口号与记录的所述链路 聚合组中的所有物理端口上收到的网络报文的目的端口号、源端口号 进行比较, 查找出所述待发出的网络报文对应的物理端口; 结合第二方面, 在第一种可能的实现方式中, 所述将待发出的网 络报文的源端口号、目的端口号与记录的所述链路聚合组中的所有物 理端口上收到的网络报文的目的端口号、 源端口号进行比较, 查找出 所述待发出的网络" ^艮文对应的物理端口包括:
将所述待发出的网络 4艮文的源端口号、目的端口号和记录的所述 链路聚合组中的所有物理端口上收到的网络报文的目的端口号、源端 口号进行比较;
若所述待发出的网络报文的源端口号与一个接收的网络报文的 目的端口号相同,或者所述待发出的网络报文的目的端口号与一个接 收的网络报文的源端口号相同,则将接收所述一个网络报文的物理端 口作为所述待发出的网络^艮文对应的物理端口。
结合第二方面, 在第二种可能的实现方式中, 若无法查找出所述 待发出的网络 "^艮文对应的物理端口, 所述方法还包括:
选择所述链路聚合组中任一可用的物理端口将所述待发出的网 络报文发出。
第三方面, 提供一种网络设备, 所述网络设备包括:
虚拟机, 用于获取网络报文;
网桥单元,用于根据所述网络报文的业务类型获取所述网络报文 的优先级; 第一网口发送。
结合第三方面,在第一种可能的实现方式中,所述网桥单元包括: 报文分析单元,用于根据所述网络报文的源端口号或目的端口号 识别所述网络报文的业务类型;
定级单元,用于根据所述网络报文的业务类型以及预设的规则确 定所述网络 ^艮文的优先级;
标记单元,用于为所述网络报文设置与所述网络报文的优先级对 应的优先级标记。
结合第三方面的第一种可能的实现方式,在第二种可能的实现方 式中,
所述标记单元具体用于:
在所述网络报文的数据包中的服务类别标识字节中设置区分服 务编码点;
其中,预先设置有与优先级对应的区分服务编码点的编码值的取 值范围,所述区分服务编码点的编码值所属的取值范围确定了所述网 络报文的优先级。
结合第三方面, 在第三种可能的实现方式中, 网络报文的优先级 对应的网口是预先设置的;
其中, 网络报文的优先级包括至少两种优先级,每一种优先级对 应一个或者多个网口或者多个优先级对应一个网口。 。
结合第三方面的第二种可能的实现方式,在第四种可能的实现方 式中, 所述绑定单元具体用于:
根据所述网络报文的数据包中的服务类别标识字节中的区分服 务编码,、识别所述网络 ^艮文的优先级; 送。 、 ' ' ^ ' 结合第三方面的第三种可能的实现方式,在第五种可能的实现方 式中,
当所述网络 ^艮文的优先级对应的第一网口故障时,所述绑定单元 还具体用于:
若所述网络 ^艮文的优先级还对应有第二网口,则将所述网络 ^艮文 通过所述第二网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障,则将所述网络 ^艮文通过第三 结合第三方面的第三种可能的实现方式,在第六种可能的实现方 式中, 当所述网络 ^艮文的优先级对应的第一网口故障, 且所述网络才艮 文的优先级为最低优先级时, 所述绑定单元还具体用于:
若所述网络 ^艮文的优先级还对应有第四网口,则将所述网络 ^艮文 通过所述第四网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障 ,则将所述网络 ^艮文通过第五 网口发送, 所述第五网口对应的优先级高于所述网络 ^艮文的优先级。
第四方面, 还提供一种交换设备, 所述交换设备包括:
记录单元, 记录每个物理端口上接收的网络 ^艮文的源端口号、 源
IP、 目的端口号和目的 IP;
查询单元, 用于根据所述待发出的网络报文的源 IP或者目的 IP 组为连接到同一个网络设备的一组物理端口;
确定单元, 用于将待发出的网络报文的源端口号、 目的端口号与 记录的所述链路聚合组中的所有物理端口上收到的网络报文的目的 端口号、 源端口号进行比较, 查找出所述待发出的网络报文对应的物 理端口; 发出。 ' ' 、 , 、
结合第四方面, 在第一种可能的实现方式中, 所述确定单元具体 用于:
将所述待发出的网络 4艮文的源端口号和目的端口号和记录的所 述链路聚合组中的所有物理端口上收到的网络报文的目的端口号、源 端口号进行比较;
若所述待发出的网络报文的源端口号与一个接收的网络报文的 目的端口号相同,或者所述待发出的网络报文的目的端口号与一个接 收的网络报文的源端口号相同,则将接收所述一个网络报文的物理端 口作为所述待发出的网络^艮文对应的物理端口。
结合第四方面, 在第二种可能的实现方式中, 若无法查找出所述 待发出的网络才艮文对应的物理端口, 所述发出单元还具体用于:
选择所述链路聚合组中任一可用的物理端口将所述待发出的网 络报文发出。
本发明的实施例提供了一种网络报文的传送方法和设备,首先网 络设备获取网络报文,根据所述网络报文的业务类型获取所述网络报 口发送; 而后, 交换设备在接收网络设备发送的报文时, 记录每个物 理端口上接收的网络 ^艮文的源端口号、 源 IP、 目的端口号和目的 IP, 根据所述待发出的网络报文的源 IP或者目的 IP查找出用于发送所述 待发出的网络报文的链路聚合组, 将待发出的网络报文的源端口号、 目的端口号与记录的所述链路聚合组中的所有物理端口上收到的网 络报文的目的端口号、 源端口号进行比较, 查找出所述待发出的网络 口发出。 通过对业务区分优先级, 将不同优先级的业务从服务器上不 同的网口发出,交换机上相同优先级的业务从相同的物理端口接收或 发出, 完成业务负载的分发, 提升了不同业务的服务质量, 提高了用 户体验满意度。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员 来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附 图。
图 1 为本发明实施例提供的一种网络报文的传送方法的流程示 意图一;
图 2 为本发明实施例提供的一种网络报文的传送方法的流程示 意图二;
图 3 为本发明实施例提供的一种网络报文的传送方法的流程示 意图三;
图 4为本发明实施例提供的一种网络报文的组成示意图; 图 5 为本发明实施例提供的一种网络报文的传送方法的流程示 意图四;
图 6为本发明实施例提供的一种网络设备的结构示意图一; 图 7为本发明实施例提供的一种网络设备的结构示意图二; 图 8为本发明实施例提供的一种交换设备的结构示意图; 图 9为本发明实施例提供的另一种网络设备的结构示意图; 图 10为本发明实施例提供的另一种交换设备的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进 行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没 有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的 范围。
本发明实施例提供一种网络报文的传送方法, 基于网络设备一 侧, 如图 1所示, 该方法包括:
101、 获取网络 4艮文。
102、 根据网络报文的业务类型获取网络报文的优先级。
103、 将网络 ^艮文从网络 ^艮文的优先级对应的第一网口发送。 本发明的实施例还提供另一种网络报文的传送方法,基于交换设 备一侧, 如图 2所示, 该方法包括:
201、 记录每个物理端口上接收的网络 ^艮文的源端口号、 源 IP、 目的端口号和目的 IP。
202、 根据待发出的网络报文的源 IP或者目的 IP查找出用于发 送待发出的网络报文的链路聚合组。
203、 将待发出的网络报文的源端口号、 目的端口号与记录的该 链路聚合组中的所有物理端口上收到的网络报文的目的端口号、源端 口号进行比较, 查找出待发出的网络报文对应的物理端口。
204、 将待发出的网络报文从对应的物理端口发出。
其中, 在本发明实施例中, 网络设备可以是服务器, 交换设备可 以是交换机。
本发明的实施例提供了一种网络报文的传送方法,首先网络设备 获取网络报文,根据所述网络报文的业务类型获取所述网络报文的优 送; 而后, 交换设备在接收网络设备发送的报文时, 记录每个物理端 口上接收的网络报文的源端口号、 源 IP、 目的端口号和目的 IP, 根 据待发出的网络报文的源 IP或者目的 IP查找出用于发送待发出的网 络报文的链路聚合组, 将待发出的网络报文的源端口号、 目的端口号 与记录的该链路聚合组中的所有物理端口上收到的网络报文的目的 端口号、 源端口号进行比较, 查找出待发出的网络报文对应的物理端 口。 通过对业务区分优先级, 将不同优先级的业务从服务器上不同的 网口发出,交换设备上相同优先级的业务从相同的物理端口接收或发 出, 完成业务负载的分发, 提升了不同业务的服务质量, 提高了用户 体验满意度。
为了使本领域技术人员能够更清楚地理解本发明实施例提供的 技术方案, 下面通过具体的实施例, 对本发明实施例提供的一种网络 报文的传送方法进行详细说明 ,在本实施例中网络设备上运行有一个 或多个虚拟机, 该网络设备还包括网桥单元和绑定单元, 为了方便说 明在本实施例中将虚拟机简称为 VM, 如图 3所示, 该方法包括:
301、 获取网络才艮文。
示例性的, 网络 ^艮文可以是由网络设备上运行的 VM 中的应用 程序产生的。 在产生这些网络报文后, 虚拟机会将网络报文发送至网 络设备中的网桥模块中。
302、 根据网络报文的源端口号或目的端口号识别网络报文的业 务类型。
具体的, 在 IP网络中, 不同的业务类型通常釆用不同的端口号 进行区分, 因此网络设备的网桥模块在收到网络报文后, 就可以依据 源端口号或目的端口号识别分析从用户 VM发送的报文的业务类型。
其中, 示例性的 , 网站 WEB服务一般端口号是 80 , TELNET 服务一般端口号是 23 ( TELNET协议是 Internet远程登陆服务的标准 协议) , 桌面云办公的 ICA协议一般端口号是 1494。 这里要指出的 是,不同的网络报文的源端口号和目的端口号中任意一个是特定端口 号就认为不同的网络报文均为特定端口号对应的业务类型。例如一个 网络报文的源端口号是 80 , 目的端口号是临时端口号 1033 , 另外一 个网络 文的源端口号是临时端口号 1135 , 目的端口号是 80 , 则认 为这两个网络 4艮文的业务类型均为网站 WEB月良务。
303、 根据网络报文的业务类型以及预设的规则确定网络报文的 优先级。
示例性的, 可以预先设置桌面云办公的 ICA ( Independent Computing Architecture ) 协议优先级最高, TELNET服务次之, 网站 WEB服务再次之, 其他端口的业务优先级最低, 也可以根据用户的 实际需要进行业务的优先级区分。
因此, 在网络报文的业务类型确定后,根据上述的预设优先级规 则就可以确定网络 ^艮文的优先级。
304、 为网络 ^艮文设置与网络 ^艮文的优先级对应的优先级标记。 具体的,在网络报文的数据包中的服务类别标识字节中设置区分 服务编码点;
其中,预先设置有与优先级对应的区分服务编码点的编码值的取 值范围,该区分服务编码点的编码值所属的取值范围确定了网络报文 的优先级。
示例性的, 依据 RFC2474的定义, 在报文的服务类别标示字节 ( Type Of Service , TOS ) 中设置区分服务编码点 (Differentiated Services Code Point, DSCP ) , DSCP共 6个 bit位, 其取值范围为: 0~63。 具体的, DSCP在报文的 TOS 中的位置如图 4所示。 可根据 不同的业务需要, 设置不同的优先级。 默认分为 4 类: Class Selector(CS) , 取值范围: OxXXX 000; Expedited Forwarding(EF) , 取 值: 0x101 110; Assured Forwarding(AF) , 取值范围: OxXXX ΧΧ0; Default(BE) , 取值: 0x000 000。 其中取值范围中的 X为 0 , 或者 1。 对于最高优先级的业务 (例如桌面云办公的 ICA协议) 的 DSCP值 设为 EF , TELNET业务的 DSCP取值范围设置为 AF , 其他业务优先 级的 DSCP值设置为缺省值 BE。 具体不同优先级业务与 DSCP取值 或取值范围的映射关系, 可以根据需要设置。
为网络报文设置优先级标记完成后,网络设备中的网桥模块将携
具体的,网络设备的绑定模块在收到携带优先级标记的网络报文 后, 首先根据网络报文的数据包中的 TOS中的 DSCP识别网络报文 口发送。
其中, 网络报文的优先级对应的网口是预先设置的, 具体是通过 将多个物理网口按照业务优先级绑定在一起,网络报文的优先级包括 至少两种优先级, 每一种优先级对应一个或者多个网口, 比如选取 6 个物理网口, £设为 eth0、 ethl、 eth2、 eth3 、 eth4、 eth5 , i 6 个物理网口分别与优先级 CS、 EF、 AF、 BE绑定,其中 CS对应 eth0、 ethl , EF对应 eth2 , AF对应 eth3 , BE对应 eth4、 eth5。
示例性的, 假设绑定模块收到的网络报文的 DSCP 的值属于 OxXXX 000范围内,则确定网络报文的优先级为 CS ,从而可以将 ethO 作为发送该网络 4艮文的第一网口。
306、 若网络 ^艮文的优先级对应的第一网口故障且还对应有第二 网口, 则将网络 ^艮文通过第二网口发送。
示例性的, 叚设优先级 CS对应 eth0、 ethl , EF对应 eth2 , AF 对应 eth3 , BE对应 eth4、 eth5 , 网络报文的优先级为 CS ,其中当 ethO 发生故障时, 比如堵塞或者断开, 优先从与 ethO同优先级的 ethl发 送网络报文。
307、 若网络 ^艮文的优先级对应的第一网口故障, 且对应的网口 只有第一网口或者对应的除第一网口外的其余网口都故障,则将网络 才艮文通过第三网口发送,第三网口对应的优先级低于网络 ^艮文的优先 级。
示例性的 , 4叚设优先级 CS对应 ethl , EF对应 eth2 , AF对应 eth3 , BE对应 eth4、 eth5 , 网络 4艮文的优先级为 CS , 其中当 ethO发生故障 时, 比如堵塞或者断开, 优先从与比 ethl低一个优先级的 eth2发送 网络才艮文。
或者, 优先级 CS对应 eth0、 ethl , EF对应 eth2 , AF对应 eth3 , BE对应 eth4、 eth5 , 网络 4艮文的优先级为 CS , 其中当 ethO和 ethl 都发生故障时, 比如堵塞或者断开, 优先从与比 ethl和 ethl低一个 优先级的 eth2发送网络 ^艮文。
308、 若网络 ^艮文的优先级为最低且对应的第一网口故障时, 网 络才艮文的优先级还对应有第四网口, 则将网络 ^艮文通过第四网口发 送。 示例性的, 叚设优先级 CS对应 eth0、 ethl , EF对应 eth2 , AF 对应 eth3 , BE对应 eth4、 eth5 , 网络才艮文的优先级为 BE,则确定 eth4 为网络 ^艮文优先级对应的第一网口, 其中当 eth4发生故障时, 比如 堵塞或者断开时, 优先从与 eth4同优先级的 eth5发送网络报文。
309、 若网络 ^艮文的优先级为最低且对应的唯一的第一网口故障 或者对应的除第一网口外的其余网口都故障时,则将网络 ^艮文通过第 五网口发送, 第五网口对应的优先级高于网络 ^艮文的优先级。
具体的, 如果最低优先级的业务对应的所有网口全部故障, 为了 避免网络中断对业务造成影响,则可以选择高优先级业务的网口发送 最低优先级的业务保证该业务的可用性。
示例性的, 叚设优先级 CS对应 eth0、 ethl , EF对应 eth2 , AF 对应 eth3 , BE对应 eth4 , 网络才艮文的优先级为 BE, 其中当 eth4发 生故障时, 优先从比 eth4高一个优先级的 eth3发送网络报文。
或者, 优先级 CS对应 eth0、 ethl , EF对应 eth2 , AF对应 eth3 , BE对应 eth4、 eth5 , 网络才艮文的优先级为 BE, 其中当 eth4和 eth5 都发生故障时, 优先从比 eth4和 eth5高一个优先级的 eth3发送网络 报文。
还需要特别说明的是, 如果网络报文的优先级划分的比较多, 网 口的个数比较少,这种情况下可以设置几个较低的优先级对应同一个 网口。 例如对网络 ^艮文划分了 6 个优先级, 但是网口的个数只有 4 个, 这种情况下, 可以设置优先级 5和优先级 6的网络^艮文对应一个 网口。
另外, 在本发明的实施例中的网络设备可以是服务器、计算机等 物理主机或者 IP报文接收单元。
本发明的实施例提供一种网络报文的传送方法,首先获取网络报 文,然后根据网络报文的源端口号或目的端口号识别网络报文的业务 类型,再根据网络报文的业务类型以及预设的规则确定网络报文的优 先级, 为网络报文设置与网络报文的优先级对应的优先级标记, 最后 的优先级对应的第一网口故障且还对应有第二网口,则将网络 ^艮文通 过第二网口发送; 若网络 ^艮文的优先级对应的第一网口故障, 且对应 的网口只有第一网口或者对应的除第一网口外的其余网口都故障,则 将网络 ^艮文通过第三网口发送,第三网口对应的优先级低于网络 ^艮文 的优先级; 若网络 ^艮文的优先级为最低且对应的第一网口故障时, 网 络才艮文的优先级还对应有第四网口, 则将网络 ^艮文通过第四网口发 送;若网络 ^艮文的优先级为最低且对应的唯一的第一网口故障或者对 应的除第一网口外的其余网口都故障时,则将网络 ^艮文通过第五网口 发送, 第五网口对应的优先级高于网络 ^艮文的优先级。 通过对业务区 分优先级, 将不同优先级的业务从不同的网口发出, 在完成业务负载 分发的同时, 提升了不同业务的服务质量, 提高了用户体验满意度。
本发明实施例还提供另一种网络报文的传送方法,基于交换设备 侧,为了使本领域技术人员能够更清楚地理解本发明实施例提供的技 术方案, 下面通过具体的实施例, 对该方法进行详细说明, 如图 5 所示, 该方法包括:
401、 记录每个物理端口上接收的网络 ^艮文的源端口号、 源 IP、 目的端口号和目的 IP。
具体的,在交换设备上记录交换设备上每个端口接收到的网络报 文的源 IP, 源端口号, 目的 IP, 目的端口号。
402、 根据待发出的网络报文的源 IP或者目的 IP查找出用于发 送待发出的网络报文的链路聚合组。
示例性的,交换设备上运行链路汇聚控制协议( Link Aggregation Control Protocol, LACP ) , 该交换设备上的多个端口汇聚在一起形 成一个链路聚合组,链路聚合组是指交换设备上连接到同一个网络设 备 (比如连接到同一个服务器、 计算机等物理主机或 IP报文接收单 元)的物理端口组,一个交换设备上的端口可以组成多个链路聚合组, 要发出网络报文时根据网络报文的源 IP、 目的 IP查找发送该网络报 文需使用的链路聚合组。
403、 将待发出的网络报文的源端口号、 目的端口号与记录的该 链路聚合组中的所有物理端口上收到的网络报文的目的端口号、源端 口号进行比较。
404、 若待发出的网络报文的源端口号与一个接收的网络报文的 目的端口号相同,或者待发出的网络报文的目的端口号与一个接收的 网络报文的源端口号相同,则将接收一个网络报文的物理端口作为待 发出的网络才艮文对应的物理端口。
示例性的, 假设一个业务类型为网站 WEB服务的待发出的网络 报文的源端口号为 80 , 目的端口号为 1020 , 交换设备的记录中有一 个业务类型也是网站 WEB服务网络报文的源端口号是 1245 , 目的端 口号为 80 , 而且该网络 文是经过交换机的物理端口 1接收的, 那 么就将交换机的物理端口 1作为待发出的网络报文的发出端口。
405、 将待发出的网络报文从对应的物理端口发出。
示例性的,假设待发出的网络报文是一个业务类型为桌面云办公 ICA协议报文, 该网络报文的目的端口号是 1494 , 然后在交换设备 的记录里查找源端口号是 1494的业务类型为桌面云办公的 ICA协议 的网络报文, 假设满足条件的网络报文是经过交换设备的物理端口 2 从与服务器相连的网口 2接收的,那么将待发出的网络报文从交换设 备的物理端口 2以及相连的网口 2发送回服务器。 这样, 可以使同样 业务类型的不同网络报文通过交换设备上同一物理端口以及与该端 口与服务器相连的网口发送回服务器。这样就可以保证网络报文从网 络设备的一个网口发出后, 在返回时经过也是同一网口, 从而使得网 络报文的发出和返回经过的网口的优先级相同,使业务双向的业务服 务质量都有保证。
406、 若无法查找出待发出的网络报文对应的物理端口, 选择所 述链路聚合组中任一可用的物理端口将所述待发出的网络报文发出。
优选的, 如果无法查找出待发出的网络报文对应的物理端口,优 先选择该链路聚合组中非拥塞的物理端口。后续在交换设备上可以查 到该网络^艮文对应的物理端口以后,再从查到的对应的物理端口发送 出去。
另外, 在本发明的实施例中的网络设备可以是服务器、计算机等 物理主机或者 IP报文接收单元, 交换设备可以是交换机。
本发明的实施例还提供一种网络报文的传送方法,记录每个物理 端口上接收的网络 ^艮文的源端口号、 源 IP、 目的端口号和目的 IP, 根据所述待发出的网络报文的源 IP或者目的 IP查找出用于发送所述 待发出的网络报文的链路聚合组, 将待发出的网络报文的源端口号、 目的端口号与记录的该链路聚合组中的所有物理端口上收到的网络 报文的目的端口号、 源端口号进行比较, 若待发出的网络报文的源端 口号与一个接收的网络报文的目的端口号相同,或者待发出的网络报 文的目的端口号与一个接收的网络报文的源端口号相同,则将接收一 个网络 ^艮文的物理端口作为待发出的网络 ^艮文对应的物理端口,将待 发出的网络报文从对应的物理端口发出;若无法查找出待发出的网络 报文对应的端口,选择该链路聚合组中任一可用的物理端口将待发出 的网络报文发出。根据网络报文的端口号选择发送网络报文的交换设 备的物理端口, 在完成业务负载分发的同时, 提升了不同业务的服务 质量, 提高了用户体验满意度。
本发明的实施例提供一种网络设备, 如图 6 所示, 该网络设备 00包括:
虚拟机 10 , 用于获取网络报文。
网桥单元 20 , 用于根据网络报文的业务类型获取网络报文的优 先级。 网口发送。
可选的, 如图 7所示, 网桥单元 20可以包括:
报文分析单元 21 , 用于根据网络报文的源端口号或目的端口号 识别网络 ^艮文的业务类型。
定级单元 22 , 用于根据网络报文的业务类型以及预设的规则确 定网络报文的优先级。
标记单元 23 , 用于为网络 ^艮文设置与网络 ^艮文的优先级对应的 优先级标记。
可选的, 标记单元 23可以具体用于:
在网络报文的数据包中的服务类别标识字节中设置区分服务编 码点;
其中,预先设置有与优先级对应的区分服务编码点的编码值的取 值范围,区分服务编码点的编码值所属的取值范围确定了网络报文的 优先级。 可选的, 网络报文的优先级对应的网口是预先设置的;
其中, 网络报文的优先级包括至少两种优先级,每一种优先级对 应一个或者多个网口。
可选的, 绑定单元 30可以具体用于:
根据网络报文的数据包中的服务类别标识字节中的区分服务编 码点识别网络 4艮文的优先级;
特别的, 当网络 ^艮文的优先级对应的第一网口故障时, 绑定单元 还可以具体用于:
若所述网络 ^艮文的优先级还对应有第二网口,则将所述网络 ^艮文 通过所述第二网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障,则将所述网络 ^艮文通过第三 另外, 特别的, 当网络 ^艮文的优先级对应的第一网口故障, 且网 络报文的优先级为最低优先级时, 绑定单元 30还可以具体用于: 若网络 4艮文的优先级还对应有第四网口,则将网络 ^艮文通过第四 网口发送;
若网络 ^艮文的优先级对应的网口只有第一网口,或网络 ^艮文的优 先级对应的所有网口故障, 则将网络 ^艮文通过第五网口发送, 第五网 口对应的优先级高于网络报文的优先级。
本发明的实施例提供一种网络设备, 首先获取网络报文, 然后根 据网络报文的源端口号或目的端口号识别网络报文的业务类型,再根 据网络报文的业务类型以及预设的规则确定网络报文的优先级,为网 络报文设置与网络报文的优先级对应的优先级标记,最后将网络报文 从与网络报文的优先级对应的第一网口发送,若网络报文的优先级对 应的第一网口故障且还对应有第二网口,则将网络 ^艮文通过第二网口 发送; 若网络 ^艮文的优先级对应的第一网口故障, 且对应的网口只有 第一网口或者对应的除第一网口外的其余网口都故障,则将网络 ^艮文 通过第三网口发送, 第三网口对应的优先级低于网络 ^艮文的优先级; 若网络 ^艮文的优先级为最低且对应的第一网口故障时,网络 ^艮文的优 先级还对应有第四网口, 则将网络 ^艮文通过第四网口发送; 若网络才艮 文的优先级为最低且对应的唯一的第一网口故障或者对应的除第一 网口外的其余网口都故障时, 则将网络 ^艮文通过第五网口发送, 第五 网口对应的优先级高于网络 ^艮文的优先级。 通过对业务区分优先级, 将不同优先级的业务从不同的网口发出, 在完成业务负载分发的同 时, 提升了不同业务的服务质量, 提高了用户体验满意度。
本发明的实施例还提供一种交换设备 80 , 如图 8所示, 该交换 设备 80包括:
记录单元 81 , 用于记录每个物理端口上接收的网络 ^艮文的源端 口号、 源 IP、 目的端口号和目的 IP。
查询单元 82 , 用于根据待发出的网络报文的源 IP或者目的 IP 确定单元 83 , 用于将待发出的网络 4艮文的源端口号、 目的端口 号与记录的该链路聚合组中的所有物理端口上收到的网络报文的目 的端口号、 源端口号进行比较, 查找出待发出的网络报文对应的物理 端口 。
发出单元 84 , 用于将待发出的网络报文从对应的物理端口发出。 可选的, 确定单元 83可以具体用于:
将待发出的网络 4艮文的源端口号和目的端口号和记录的该链路 聚合组中的所有物理端口上收到的网络报文的目的端口号、源端口号 进行比较;
若待发出的网络报文的源端口号与一个接收的网络报文的目的 端口号相同,或者待发出的网络报文的目的端口号与一个接收的网络 报文的源端口号相同,则将接收一个网络报文的物理端口作为待发出 的网络 ^艮文对应的物理端口。
可选的, 若无法查找出待发出的网络报文对应的端口, 发出单元 84还可以具体用于:
选择该链路聚合组中任一可用的物理端口将所述待发出的网络 报文发出。 其中,优选的, 优先选择该链路聚合组中非拥塞的物理端口发送 待发出的网络报文。
本发明的实施例还提供一种交换设备,首先记录记录每个物理端 口上接收的网络报文的源端口号、 源 IP、 目的端口号和目的 IP, 根 据所述待发出的网络报文的源 IP或者目的 IP查找出用于发送所述待 发出的网络报文的链路聚合组, 将待发出的网络报文的源端口号、 目 的端口号与记录的该链路聚合组中的所有物理端口上收到的网络报 文的目的端口号、 源端口号进行比较, 若待发出的网络报文的源端口 号与一个接收的网络报文的目的端口号相同,或者待发出的网络报文 的目的端口号与一个接收的网络报文的源端口号相同,则将接收一个 网络 4艮文的物理端口作为待发出的网络 4艮文对应的物理端口,将待发 出的网络报文从对应的物理端口发出;若无法查找出待发出的网络报 文对应的端口,选择该链路聚合组中任一可用的物理端口将待发出的 网络报文发出。根据网络报文的端口号选择发送网络报文的交换设备 的物理端口, 在完成业务负载分发的同时, 提升了不同业务的服务质 量, 提高了用户体验满意度。
值得一提的是,本发明的实施例所提供的网络设备连接交换设备 的实施方式仅仅为示例性的,本发明实施例所提供的网络报文的传送 方法也可以用于交换设备连接交换设备的场景,同时也适用于网络设 备连接网络设备的场景。 除此之外, 本发明实施例所提供的网络报文 景, 对于非虚拟化的场景也同样适用, 比如将上述实施例中的虚拟机 替换为单个服务器或计算机, 将虚拟网桥替换为交换机, 这种场景下 同样适用, 方法与前述实施例相同, 不再赘述。
本发明实施例还提供了一种网络设备 90 , 如图 9所示, 该设备 90包括: 总线 94; 以及连接到总线 94的处理器 91、 存储器 92和接 口 93 , 其中该接口 93用于通信; 该存储器 92用于存储指令 921 , 处 理器 91执行指令 921用于:
获取网络报文;
根据网络报文的业务类型获取网络报文的优先级;
将网络 ^艮文从网络 ^艮文的优先级对应的第一网口发送。 可选的, 处理器 91执行指令 921用于根据网络报文的业务类型 获取网络报文的优先级, 具体可以包括:
根据网络报文的源端口号或目的端口号识别网络报文的业务类 型;
根据网络报文的业务类型以及预设的规则确定网络报文的优先 级;
为网络报文设置与网络报文的优先级对应的优先级标记。
可选的, 处理器 91执行指令 921用于为网络报文设置与网络报 文的优先级对应的优先级标记, 具体可以包括:
在网络报文的数据包中的服务类别标识字节中设置区分服务编 码点;
其中,预先设置有与优先级对应的区分服务编码点的编码值的取 值范围,区分服务编码点的编码值所属的取值范围确定了网络报文的 优先级。
可选的, 网络报文的优先级对应的网口是预先设置的; 其中, 网络报文的优先级包括至少两种优先级,每一种优先级对 应一个或者多个网口。
可选的, 处理器 91执行指令 921用于将网络报文从与网络报文 的优先级对应的第一网口发送, 具体可以包括:
根据网络报文的数据包中的服务类别标识字节中的区分服务编 码点识别网络 4艮文的优先级;
可选的, 当网络报文的优先级对应的第一网口故障时, 处理器 91执行指令 921还可以用于:
若网络 4艮文的优先级还对应有第二网口,则将网络 ^艮文通过所述 第二网口发送;
若网络 ^艮文的优先级对应的网口只有第一网口,或网络 ^艮文的优 先级对应的所有网口故障, 则将网络 ^艮文通过第三网口发送, 第三网 口对应的优先级低于该网络 ^艮文的优先级。
可选的, 当网络 ^艮文的优先级对应的第一网口故障, 且网络 ^艮文 的优先级为最低优先级时, 处理器 91执行指令 921还可以用于: 若网络 4艮文的优先级还对应有第四网口,则将网络 ^艮文通过第四 网口发送;
若网络 ^艮文的优先级对应的网口只有第一网口,或网络 ^艮文的优 先级对应的所有网口故障, 则将网络 ^艮文通过第五网口发送, 第五网 口对应的优先级高于网络报文的优先级。
本发明的实施例提供一种网络设备, 首先获取网络报文, 然后根 据网络报文的源端口号或目的端口号识别网络报文的业务类型,再根 据网络报文的业务类型以及预设的规则确定网络报文的优先级,为网 络报文设置与网络报文的优先级对应的优先级标记,最后将网络报文 从与网络报文的优先级对应的第一网口发送,若网络报文的优先级对 应的第一网口故障且还对应有第二网口,则将网络 ^艮文通过第二网口 发送; 若网络 ^艮文的优先级对应的第一网口故障, 且对应的网口只有 第一网口或者对应的除第一网口外的其余网口都故障,则将网络 ^艮文 通过第三网口发送, 第三网口对应的优先级低于网络 ^艮文的优先级; 若网络 4艮文的优先级为最低且对应的第一网口故障时,网络 ^艮文的优 先级还对应有第四网口, 则将网络 ^艮文通过第四网口发送; 若网络才艮 文的优先级为最低且对应的唯一的第一网口故障或者对应的除第一 网口外的其余网口都故障时, 则将网络 ^艮文通过第五网口发送, 第五 网口对应的优先级高于网络 ^艮文的优先级。 通过对业务区分优先级, 将不同优先级的业务从不同的网口发出, 在完成业务负载分发的同 时, 提升了不同业务的服务质量, 提高了用户体验满意度。
本发明的实施例还提供一种交换设备 60 , 如图 10所示, 该设备 60包括: 总线 64; 以及连接到总线 64的处理器 61、 存储器 62和接 口 63 , 其中该接口 63用于通信; 该存储器 62用于存储指令 621 , 处 理器 61执行指令 621用于:
记录每个物理端口上接收的网络 ^艮文的源端口号、 源 IP、 目的 端口号和目的 IP;
根据待发出的网络报文的源 IP或者目的 IP查找出用于发送待发 出的网络报文的链路聚合组;链路聚合组为连接到同一个网络设备的 一组物理端口; 将待发出的网络报文的源端口号、目的端口号与记录的链路聚合 组中的所有物理端口上收到的网络 ^艮文的目的端口号、源端口号进行 比较, 查找出待发出的网络报文对应的物理端口;
将待发出的网络报文从所述对应的物理端口发出。
可选的, 处理器 61执行指令 621用于将待发出的网络报文的源 端口号、目的端口号与记录的链路聚合组中的所有物理端口上收到的 网络报文的目的端口号、 源端口号进行比较, 查找出待发出的网络报 文对应的物理端口, 具体可以包括:
将待发出的网络报文的源端口号、目的端口号和记录的链路聚合 组中的所有物理端口上收到的网络 ^艮文的目的端口号、源端口号进行 比较;
若待发出的网络报文的源端口号与一个接收的网络报文的目的 端口号相同,或者待发出的网络报文的目的端口号与一个接收的网络 报文的源端口号相同,则将接收一个网络报文的物理端口作为待发出 的网络 ^艮文对应的物理端口。
可选的, 若无法查找出待发出的网络报文对应的端口, 处理器 61执行指令 621还可以用于:
选择链路聚合组中任一可用的物理端口将待发出的网络报文发 出。
本发明的实施例还提供一种交换设备,首先记录每个端口上接收 的网络报文的源端口号和目的端口号,然后将待发出的网络报文的源 端口号和目的端口号和记录的每个端口上收到网络 ^艮文的源端口号 和目的端口号进行比较, 若待发出的网络报文的源端口号、 目的端口 号中的任意一个与一个接收的网络报文的源端口号、目的端口号中任 意一个相同,则将接收该一个网络报文的端口作为待发出的网络报文 对应的端口, 将待发出的网络报文从对应的物理端口发出; 若无法查 找出待发出的网络报文对应的端口,选择交换机上任一可用的端口将 待发出的网络报文发出。根据网络报文的端口号选择发送网络报文的 交换机端口, 在完成业务负载分发的同时, 提升了不同业务的服务质 量, 提高了用户体验满意度。
另外需要说明的是, 上述文中出现的第一、 第二、 第三、 第四、 第五仅是为了区分不同的网口, 并没有先后顺序之分。
在本申请所提供的几个实施例中,应该理解到, 所揭露的方法和 设备, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅 仅是示意性的, 例如, 所述单元的区分, 仅仅为一种逻辑功能区分, 实际实现时可以有另外的区分方式,例如多个单元或组件可以结合或 者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点, 所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过 一些接口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或 其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分 开的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以 位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的 需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理 单元中, 也可以是各个单元单独物理包括, 也可以两个或两个以上单 元集成在一个单元中。 上述集成的单元既可以釆用硬件的形式实现, 也可以釆用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个 计算机可读取存储介质中。 上述软件功能单元存储在一个存储介质 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 月良 务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。 而前述的存储介质包括: U 盘、 移动硬盘、 只读存储器 (Read-Only
Memory, 简称 ROM ) 、 随机存取存储器 ( Random Access Memory, 简称 RAM ) 、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并 不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范 围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应以所述权利要求的保护范围为准。

Claims

权利要求
1、 一种网络报文的传送方法, 其特征在于, 包括:
获取网络报文;
根据所述网络报文的业务类型获取所述网络报文的优先级;
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述网 络报文的业务类型获取所述网络报文的优先级包括:
根据所述网络报文的源端口号或目的端口号识别所述网络报文 的业务类型;
根据所述网络报文的业务类型以及预设的规则确定所述网络报 文的优先级; 记。
3、 根据权利要求 2所述的方法, 其特征在于, 所述为所述网络 在所述网络报文的数据包中的服务类别标识字节中设置区分服 务编码点;
其中,预先设置有与优先级对应的区分服务编码点的编码值的取 值范围,所述区分服务编码点的编码值所属的取值范围确定了所述网 络报文的优先级。
4、 根据权利要求 1所述的方法, 其特征在于, 网络报文的优先 级对应的网口是预先设置的;
其中, 网络报文的优先级包括至少两种优先级,每一种优先级对 应一个或者多个网口或者多个优先级对应一个网口。
5、 根据权利要求 3所述的方法, 其特征在于, 所述将所述网络 报文从与所述网络报文的优先级对应的第一网口发送包括:
根据所述网络报文的数据包中的服务类别标识字节中的区分服 务编码,、识别所述网络 ^艮文的优先级; 送。 、 ' ' ^ '
6、 根据权利要求 4所述的方法, 其特征在于, 当所述网络报文 的优先级对应的第一网口故障时, 所述方法还包括: 若所述网络 ^艮文的优先级还对应有第二网口,则将所述网络 ^艮文 通过所述第二网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障,则将所述网络 ^艮文通过第三
7、 根据权利要求 4所述的方法, 其特征在于, 当所述网络报文 的优先级对应的第一网口故障,且所述网络 4艮文的优先级为最低优先 级时, 所述方法还包括:
若所述网络 ^艮文的优先级还对应有第四网口,则将所述网络 ^艮文 通过所述第四网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障 ,则将所述网络 ^艮文通过第五 网口发送, 所述第五网口对应的优先级高于所述网络 ^艮文的优先级。
8、 一种网络报文的传送方法, 其特征在于, 包括:
记录每个物理端口上接收的网络 ^艮文的源端口号、 源 IP、 目的 端口号和目的 IP;
根据所述待发出的网络报文的源 IP或者目的 IP查找出用于发送 所述待发出的网络报文的链路聚合组;所述链路聚合组为连接到同一 个网络设备的一组物理端口;
将待发出的网络报文的源端口号、目的端口号与记录的所述链路 聚合组中的所有物理端口上收到的网络报文的目的端口号、源端口号 进行比较, 查找出所述待发出的网络报文对应的物理端口;
9、 根据权利要求 8所述的方法, 其特征在于, 所述将待发出的 网络报文的源端口号、目的端口号与记录的所述链路聚合组中的所有 物理端口上收到的网络报文的目的端口号、 源端口号进行比较, 查找 出所述待发出的网络才艮文对应的物理端口包括:
将所述待发出的网络 4艮文的源端口号、目的端口号和记录的所述 链路聚合组中的所有物理端口上收到的网络报文的目的端口号、源端 口号进行比较;
若所述待发出的网络报文的源端口号与一个接收的网络报文的 目的端口号相同,或者所述待发出的网络报文的目的端口号与一个接 收的网络报文的源端口号相同,则将接收所述一个网络报文的物理端 口作为所述待发出的网络^艮文对应的物理端口。
10、 根据权利要求 8所述的方法, 其特征在于, 若无法查找出所 述待发出的网络" ^艮文对应的物理端口, 所述方法还包括:
选择所述链路聚合组中任一可用的物理端口将所述待发出的网 络报文发出。
11、 一种网络设备, 其特征在于, 包括:
虚拟机, 用于获取网络报文;
网桥单元,用于根据所述网络报文的业务类型获取所述网络报文 的优先级; 第一网口发送。
12、 根据权利要求 11所述的网络设备, 其特征在于, 所述网桥 单元包括:
报文分析单元,用于根据所述网络报文的源端口号或目的端口号 识别所述网络报文的业务类型;
定级单元,用于根据所述网络报文的业务类型以及预设的规则确 定所述网络 ^艮文的优先级;
标记单元,用于为所述网络报文设置与所述网络报文的优先级对 应的优先级标记。
13、 根据权利要求 12所述的网络设备, 其特征在于, 所述标记 单元具体用于:
在所述网络报文的数据包中的服务类别标识字节中设置区分服 务编码点;
其中,预先设置有与优先级对应的区分服务编码点的编码值的取 值范围,所述区分服务编码点的编码值所属的取值范围确定了所述网 络报文的优先级。
14、 根据权利要求 11所述的网络设备, 其特征在于, 网络报文 的优先级对应的网口是预先设置的;
其中, 网络报文的优先级包括至少两种优先级,每一种优先级对 应一个或者多个网口或者多个优先级对应一个网口。
15、 根据权利要求 13所述的网络设备, 其特征在于, 所述绑定 单元具体用于:
根据所述网络报文的数据包中的服务类别标识字节中的区分服 务编码,、识别所述网络 ^艮文的优先级; 送。 、 ' ' ^
16、 根据权利要求 14所述的网络设备, 其特征在于, 当所述网 络才艮文的优先级对应的第一网口故障时, 所述绑定单元还具体用于: 若所述网络 ^艮文的优先级还对应有第二网口,则将所述网络 ^艮文 通过所述第二网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障,则将所述网络 ^艮文通过第三
17、 根据权利要求 14所述的网络设备, 其特征在于, 当所述网 络才艮文的优先级对应的第一网口故障,且所述网络 ^艮文的优先级为最 低优先级时, 所述绑定单元还具体用于:
若所述网络 ^艮文的优先级还对应有第四网口,则将所述网络 ^艮文 通过所述第四网口发送;
若所述网络 ^艮文的优先级对应的网口只有所述第一网口,或所述 网络 ^艮文的优先级对应的所有网口故障 ,则将所述网络 ^艮文通过第五 网口发送, 所述第五网口对应的优先级高于所述网络 ^艮文的优先级。
18、 一种交换设备, 其特征在于, 包括:
记录单元, 用于记录每个物理端口上接收的网络 ^艮文的源端口 号、 源 IP、 目的端口号和目的 IP;
查询单元, 用于根据所述待发出的网络报文的源 IP或者目的 IP 组为连接到同一个网络设备的一组物理端口;
确定单元, 用于将待发出的网络报文的源端口号、 目的端口号与 记录的所述链路聚合组中的所有物理端口上收到的网络报文的目的 端口号、 源端口号进行比较, 查找出所述待发出的网络报文对应的物 理端口; 发出。 ' ' 、 , 、
19、 根据权利要求 18所述的交换设备, 其特征在于, 所述确定 单元具体用于:
将所述待发出的网络 4艮文的源端口号和目的端口号和记录的所 述链路聚合组中的所有物理端口上收到的网络报文的目的端口号、源 端口号进行比较;
若所述待发出的网络报文的源端口号与一个接收的网络报文的 目的端口号相同,或者所述待发出的网络报文的目的端口号与一个接 收的网络报文的源端口号相同,则将接收所述一个网络报文的物理端 口作为所述待发出的网络^艮文对应的物理端口。
20、 根据权利要求 18所述的交换设备, 其特征在于, 若无法查 找出所述待发出的网络报文对应的物理端口,所述发出单元还具体用 于:
选择所述链路聚合组中任一可用的物理端口将所述待发出的网络 报文发出。
PCT/CN2014/078481 2013-11-25 2014-05-27 一种网络报文的传送方法和设备 WO2015074397A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP14864209.3A EP3029897B1 (en) 2013-11-25 2014-05-27 Network packet transmission method and device
US15/053,392 US10057175B2 (en) 2013-11-25 2016-02-25 Method and device for transmitting network packet

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310607930.9 2013-11-25
CN201310607930.9A CN103634228A (zh) 2013-11-25 2013-11-25 一种网络报文的传送方法和设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/053,392 Continuation US10057175B2 (en) 2013-11-25 2016-02-25 Method and device for transmitting network packet

Publications (1)

Publication Number Publication Date
WO2015074397A1 true WO2015074397A1 (zh) 2015-05-28

Family

ID=50214868

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078481 WO2015074397A1 (zh) 2013-11-25 2014-05-27 一种网络报文的传送方法和设备

Country Status (4)

Country Link
US (1) US10057175B2 (zh)
EP (1) EP3029897B1 (zh)
CN (1) CN103634228A (zh)
WO (1) WO2015074397A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162635A (zh) * 2015-09-24 2015-12-16 浪潮(北京)电子信息产业有限公司 基于sdn控制器控制报文数据服务质量的方法及装置

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634228A (zh) * 2013-11-25 2014-03-12 华为技术有限公司 一种网络报文的传送方法和设备
CN103888370B (zh) * 2014-04-02 2017-09-15 新华三技术有限公司 一种选择选中端口的方法和设备
CN109005126B (zh) 2017-06-06 2020-06-02 华为技术有限公司 数据流的处理方法、设备和计算机可读存储介质
US10476815B2 (en) * 2017-12-11 2019-11-12 Ciena Corporation Adaptive communication network with cross-point switches
CN109922012B (zh) * 2017-12-13 2021-03-12 上海朋熙半导体有限公司 一种传输数据的方法以及相关设备
CN110213170A (zh) * 2018-02-28 2019-09-06 华为技术有限公司 一种报文传输的方法及装置
CN108540337B (zh) * 2018-03-07 2020-12-22 百富计算机技术(深圳)有限公司 一种双网口pos机及其网络状态监测系统、方法
FR3084550B1 (fr) * 2018-07-27 2020-07-24 Bcom Procede de traitement d'un paquet de donnees, dispositif, equipement de communication et programme d'ordinateur associes
CN109286575B (zh) * 2018-09-29 2021-12-17 迈普通信技术股份有限公司 报文优先级配置方法、装置及网络设备
CN110417683B (zh) * 2019-07-24 2022-07-29 新华三大数据技术有限公司 报文处理方法、装置及服务器
CN111199033A (zh) * 2020-01-09 2020-05-26 山东浪潮通软信息科技有限公司 一种运用云端技术处理身份证证件信息的方法及工具
CN114079622B (zh) * 2021-10-22 2023-05-12 深信服科技股份有限公司 丢包网口确定方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018206A (zh) * 2007-02-14 2007-08-15 华为技术有限公司 分片报文处理方法与装置
US20080019265A1 (en) * 2006-07-18 2008-01-24 Paul Alluisi Systems and methods for configuring a network to include redundant upstream connections using an upstream control protocol
CN102368736A (zh) * 2011-11-10 2012-03-07 华为技术有限公司 一种报文发送方法和设备
CN103634228A (zh) * 2013-11-25 2014-03-12 华为技术有限公司 一种网络报文的传送方法和设备

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2811180B1 (fr) * 2000-06-20 2007-08-31 Ibm Reseau de transmission de donnees ip utilisant un syteme de selection de route base sur des informations de niveau 4/5
US7792133B2 (en) * 2003-05-29 2010-09-07 Nec Corporation Packet relay device and packet method, and program
US20070008884A1 (en) * 2003-10-08 2007-01-11 Bob Tang Immediate ready implementation of virtually congestion free guarantedd service capable network
US20050100035A1 (en) * 2003-11-11 2005-05-12 Avici Systems, Inc. Adaptive source routing and packet processing
US7783784B1 (en) * 2004-08-31 2010-08-24 Oracle America, Inc. Method and apparatus for adaptive selection of algorithms to load and spread traffic on an aggregation of network interface cards
CN101005445B (zh) * 2006-01-18 2012-08-15 华为技术有限公司 一种将业务流映射到业务传输通道的方法及光网络终端
US7668081B2 (en) * 2006-11-10 2010-02-23 Alcatel-Lucent Usa Inc. Preemptive transmission protection scheme for data services with high resilience demand
JP4758362B2 (ja) * 2007-01-30 2011-08-24 株式会社日立製作所 中継装置、プログラム及び中継方法
CN101207550B (zh) 2007-03-16 2010-09-15 中国科学技术大学 负载均衡系统及多种业务实现负载均衡的方法
CN101414941A (zh) * 2007-10-16 2009-04-22 中兴通讯股份有限公司 一种g比特无源光网络系统上的业务映射方法
CN102143035B (zh) * 2010-06-04 2013-06-12 华为技术有限公司 数据业务处理方法、网络设备和网络系统
CN102148880A (zh) 2011-03-18 2011-08-10 浪潮电子信息产业股份有限公司 一种刀片服务器linux系统下双网卡绑定的方法
US8693489B2 (en) * 2011-04-28 2014-04-08 Alcatel Lucent Hierarchical profiled scheduling and shaping
US8830825B2 (en) * 2011-05-05 2014-09-09 Fujitsu Limited Method and system for priority based (1:1)n ethernet protection
CN102427483A (zh) 2011-11-15 2012-04-25 浪潮电子信息产业股份有限公司 一种linux系统下网卡名称与设备绑定的方法
US9014219B2 (en) * 2013-01-14 2015-04-21 International Business Machines Corporation Link aggregation (LAG) information exchange protocol
US9729949B2 (en) * 2014-04-23 2017-08-08 Alcatel Lucent Dynamic local decision control in software defined networking-based environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080019265A1 (en) * 2006-07-18 2008-01-24 Paul Alluisi Systems and methods for configuring a network to include redundant upstream connections using an upstream control protocol
CN101018206A (zh) * 2007-02-14 2007-08-15 华为技术有限公司 分片报文处理方法与装置
CN102368736A (zh) * 2011-11-10 2012-03-07 华为技术有限公司 一种报文发送方法和设备
CN103634228A (zh) * 2013-11-25 2014-03-12 华为技术有限公司 一种网络报文的传送方法和设备

Non-Patent Citations (1)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162635A (zh) * 2015-09-24 2015-12-16 浪潮(北京)电子信息产业有限公司 基于sdn控制器控制报文数据服务质量的方法及装置

Also Published As

Publication number Publication date
EP3029897B1 (en) 2017-08-30
CN103634228A (zh) 2014-03-12
US20160173384A1 (en) 2016-06-16
EP3029897A1 (en) 2016-06-08
US10057175B2 (en) 2018-08-21
EP3029897A4 (en) 2016-10-26

Similar Documents

Publication Publication Date Title
WO2015074397A1 (zh) 一种网络报文的传送方法和设备
EP3384386B1 (en) Enabling fine granular service chaining in a network-function virtualization architecture
US10757005B2 (en) Execution of packet-specified actions at forwarding element
US9692696B2 (en) Managing data flows in overlay networks
US9882805B2 (en) Dynamic path selection policy for multipathing in a virtualized environment
US9667538B2 (en) Method and apparatus for connecting a gateway router to a set of scalable virtual IP network appliances in overlay networks
US9887881B2 (en) DNS-assisted application identification
US20150188802A1 (en) System for supporting multi-tenant based on private ip address in virtual private cloud networks and operating method thereof
US10050807B2 (en) Network system, method of managing network system and gateway apparatus
US9910687B2 (en) Data flow affinity for heterogenous virtual machines
WO2017166136A1 (zh) 一种vnf的资源分配方法及装置
JP2016528630A (ja) アプリケーションアウェアネットワーク管理
RU2602333C2 (ru) Сетевая система, способ обработки пакетов и носитель записи
US10554513B2 (en) Technologies for filtering network packets on ingress
CN112511438B (zh) 一种利用流表转发报文的方法、装置及计算机设备
US20180091447A1 (en) Technologies for dynamically transitioning network traffic host buffer queues
US11115337B2 (en) Network traffic segregation on an application basis in a virtual computing environment
US9497088B2 (en) Method and system for end-to-end classification of level 7 application flows in networking endpoints and devices
WO2023134350A1 (zh) 一种报文发送方法、报文接收方法、信息发送方法及装置
CN115686818A (zh) 弹性网络接口eni的配置方法及装置

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

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014864209

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014864209

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE