WO2020093871A1 - 下行报文发送、转发方法和装置 - Google Patents

下行报文发送、转发方法和装置 Download PDF

Info

Publication number
WO2020093871A1
WO2020093871A1 PCT/CN2019/112793 CN2019112793W WO2020093871A1 WO 2020093871 A1 WO2020093871 A1 WO 2020093871A1 CN 2019112793 W CN2019112793 W CN 2019112793W WO 2020093871 A1 WO2020093871 A1 WO 2020093871A1
Authority
WO
WIPO (PCT)
Prior art keywords
mac address
downlink
terminal device
source mac
forwarding path
Prior art date
Application number
PCT/CN2019/112793
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 EP19882510.1A priority Critical patent/EP3734917B1/en
Publication of WO2020093871A1 publication Critical patent/WO2020093871A1/zh
Priority to US16/991,775 priority patent/US11388089B2/en

Links

Images

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/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/66Layer 2 routing, e.g. in Ethernet based MAN's
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6215Individual queue per QOS, rate or priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3027Output queuing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Definitions

  • This application relates to communication technology, and in particular to a method and device for sending and forwarding downlink messages.
  • SDN Software Defined Network
  • SDN transforms the traditional distributed forwarding architecture into a centralized forwarding architecture, which requires a large amount of space on the forwarding surface for storing flow tables, which simplifies the network to a limited extent.
  • the present application provides a method and device for sending and forwarding downlink messages, which can reduce costs, improve efficiency, and simplify network traffic.
  • the present application provides a routing information delivery method, including:
  • the ARP response includes the destination MAC address.
  • This application writes routing information into the destination MAC address and combines with existing ARP to deliver routing information, which can reduce costs, improve efficiency, and simplify network traffic.
  • the method before generating the destination MAC address according to the upstream forwarding path, the method further includes: determining the priority of the terminal device; generating the destination MAC address according to the upstream forwarding path, including: generating the destination MAC according to the upstream forwarding path and priority address.
  • after sending an ARP response to the terminal device it also includes: judging whether to switch the upstream forwarding path of the terminal device according to the network topology and network traffic; if switching the upstream forwarding path of the terminal device, according to the network The topology and network traffic configure a new upstream forwarding path for the terminal device, and generate a new destination MAC address according to the new upstream forwarding path.
  • the method further includes: determining whether the priority of the terminal device needs to be changed; if the priority of the terminal device needs to be changed, determining the new priority of the terminal device, and Generate a new destination MAC address according to the new priority.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • the method further includes: sending free ARP to the terminal device, and the free ARP includes the new destination MAC address.
  • this application provides a method for obtaining routing information, including:
  • the ARP request is used to trigger the core switch to configure the upstream forwarding path of the upstream packet, and the destination MAC address is generated according to the upstream forwarding path.
  • the destination MAC address is used to indicate the upstream forwarding path.
  • the ARP response includes the destination MAC address; store the destination MAC address in the locally stored ARP table.
  • This application writes routing information into the destination MAC address and combines with existing ARP to deliver routing information, which can reduce costs, improve efficiency, and simplify network traffic.
  • the destination MAC address is also used to indicate the priority of the terminal device.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • the method further includes: receiving the free ARP sent by the core switch.
  • the free ARP includes the new destination MAC address, and the new destination MAC address includes the new Upstream forwarding path and / or new priority; update the ARP table according to the new destination MAC address.
  • the present application provides an uplink packet sending method, including:
  • the destination MAC address is obtained according to the locally stored ARP table.
  • the destination MAC address is used to indicate the upstream forwarding path of the upstream packet; the upstream packet is sent to the forwarding switch, and the upstream packet includes the destination MAC address.
  • the terminal device carries the destination MAC address indicating the upstream forwarding path in the upstream message, so that the forwarding switch can forward the upstream message according to the destination MAC address.
  • No label is needed during the forwarding process, and no entry needs to be stored, which can reduce costs. , Improve efficiency and simplify network traffic.
  • the destination MAC address is also used to indicate the priority of the terminal device.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • this application provides an upstream packet forwarding method, including:
  • the upstream message includes the destination MAC address.
  • the destination MAC address is used to indicate the upstream forwarding path of the upstream message; determine the egress port corresponding to the upstream message according to the destination MAC address; Text.
  • the terminal device carries the destination MAC address indicating the upstream forwarding path in the upstream message.
  • the forwarding switch can forward the upstream message according to the destination MAC address. No label is required during the forwarding process, and no entry is required. Improve efficiency and simplify network traffic.
  • the destination MAC address is also used to indicate the priority of the terminal device; sending the upstream message through the outgoing port includes: putting the upstream message into the forwarding queue corresponding to the priority, and upon arrival In the sequence of sending upstream packets, the upstream packets are sent through the outgoing port.
  • the method further includes: using the destination MAC address to indicate that the bit position of the outgoing port is zero.
  • determining the outgoing port corresponding to the upstream message according to the destination MAC address includes: starting from the lowest byte of the destination MAC address to the higher byte to find the non-zero byte, and the first non-zero The egress port indicated by the value of the byte serves as the egress port.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • this application provides a method for sending a downlink message, including:
  • Configure the downlink forwarding path of the downlink packet for the terminal device ; generate a source MAC address according to the downlink forwarding path, and the source MAC address is used to indicate the downlink forwarding path; send the downlink packet to the forwarding switch, and the downlink packet includes the source MAC address.
  • the core switch carries the source MAC address indicating the downlink forwarding path in the downlink message, so that the forwarding switch can forward the downlink message according to the source MAC address.
  • No label is needed during the forwarding process, and there is no need to save table entries, which can reduce costs , Improve efficiency and simplify network traffic.
  • the method before generating the source MAC address according to the downlink forwarding path, the method further includes: determining the priority of the terminal device; generating the source MAC address according to the downlink forwarding path, including: generating the source MAC according to the downlink forwarding path and priority address.
  • the forwarding switch after sending the downlink message to the forwarding switch, it further includes: judging whether to switch the downlink forwarding path of the terminal device and / or changing the priority of the terminal device according to the network topology and network traffic; if necessary Switch the downlink forwarding path of the terminal device and / or need to change the priority of the terminal device, then configure a new downlink forwarding path and / or new priority for the terminal device according to the network topology and network traffic; according to the new downlink forwarding path and / or Or a new priority generates a new source MAC address.
  • the highest byte in the source MAC address is used to indicate the type of the source MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the downlink forwarding path of the downlink packet.
  • the present application provides a downlink packet forwarding method, including:
  • the downlink message includes the source MAC address, and the source MAC address is used to indicate the downlink forwarding path of the downlink message; the outgoing port corresponding to the downlink message is determined according to the source MAC address; the downlink message is sent through the outgoing port Text.
  • the core switch carries the source MAC address indicating the downlink forwarding path in the downlink message.
  • the forwarding switch can forward the downlink message according to the source MAC address. No tag is needed during the forwarding process, and there is no need to save table entries. Improve efficiency and simplify network traffic.
  • the source MAC address is also used to indicate the priority of the terminal device; sending the downlink message through the outgoing port includes: placing the downlink message in a forwarding queue corresponding to the priority, and upon arrival In the sequence of sending downlink packets, the downlink packets are sent through the outgoing port.
  • the method further includes: using the source MAC address to indicate the bit position of the outgoing port to zero.
  • determining the outgoing port corresponding to the downstream message according to the source MAC address includes: starting from the lowest byte of the source MAC address to the higher byte to find the non-zero byte, and the first non-zero The egress port indicated by the value of the byte serves as the egress port.
  • the highest byte in the source MAC address is used to indicate the type of the source MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the downlink forwarding path of the downlink packet.
  • the present application provides a routing information delivery device, including: a receiving module, a configuration module, a generating module, and a sending module, and the device is used to implement the method described in any one of the first aspects above.
  • the present application provides a routing information acquisition device, including: a sending module, a receiving module, and a storage module, and the device is used to implement the method described in any one of the second aspects above.
  • the present application provides an apparatus for sending an upstream message, including: an acquiring module and a sending module, the apparatus being used to implement the method described in any one of the third aspects above.
  • the present application provides an upstream packet forwarding device, including: a receiving module, a determining module, and a sending module, and the device is used to implement the method described in any one of the above fourth aspects.
  • the present application provides a downlink packet sending device, including: a configuration module, a generating module, and a sending module, and the device is used to implement the method described in any one of the fifth aspects above.
  • the present application provides a downlink message forwarding device, including: a receiving module, a determining module, and a sending module, and the device is used to implement the method described in any one of the sixth aspects above.
  • this application provides a gateway device, including:
  • One or more processors are One or more processors;
  • Memory used to store one or more programs
  • the one or more processors When one or more programs are executed by one or more processors, the one or more processors implement the method according to any one of the first aspect or the fifth aspect.
  • the gateway device may be a core switch.
  • this application provides a forwarding device, including:
  • One or more processors are One or more processors;
  • Memory used to store one or more programs
  • the one or more processors implement the method according to any one of the fourth aspect or the sixth aspect.
  • the forwarding device may be an access switch or an aggregation switch.
  • this application provides a terminal device, including:
  • One or more processors are One or more processors;
  • Memory used to store one or more programs
  • the one or more processors When one or more programs are executed by one or more processors, the one or more processors implement the method described in any one of the second or third aspects.
  • the terminal device may be user equipment.
  • the present application provides a computer-readable storage medium that stores instructions, which when executed on a computer, is used to perform any of the above-mentioned first to sixth aspects. Described method.
  • the present application provides a computer program product including instructions, which when executed on a computer, are used to perform the method described in any one of the first to sixth aspects.
  • MAC address to indicate path information is an implementation of this application.
  • other content in the message can also be used to indicate path information.
  • the principle of implementation and the use of MAC address indication The realization principle of the path information is similar.
  • FIG. 1 is a schematic diagram of an enterprise network architecture provided by an embodiment of this application.
  • FIG. 2 is a schematic diagram of priorities of an enterprise network architecture provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a routing information delivery method provided by an embodiment of this application.
  • FIG. 4 is a flowchart of a method for obtaining routing information provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a routing information interaction method provided by an embodiment of this application.
  • FIG. 6 is a flowchart of another routing information interaction method provided by an embodiment of the present application.
  • FIG. 11 is a flowchart of a method for sending a downlink message provided by an embodiment of this application.
  • FIG. 13 is a flowchart of a method for sending and forwarding a downlink message provided by an embodiment of the present application
  • FIG. 14 is a schematic structural diagram of an apparatus for delivering routing information according to an embodiment of the present application.
  • 15 is a schematic structural diagram of an apparatus for obtaining routing information according to an embodiment of the present application.
  • 16 is a schematic structural diagram of an apparatus for sending an uplink message according to an embodiment of the present application.
  • 17 is a schematic structural diagram of an apparatus for forwarding an upstream message provided by an embodiment of the present application.
  • FIG. 19 is a schematic structural diagram of a downlink packet forwarding device provided by an embodiment of this application.
  • FIG. 20 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • SDN uses the flow table method to deliver the flow table corresponding to the data flow to the switch along the way, thereby controlling the forwarding path of the data flow.
  • SDN separates the control plane and the forwarding plane.
  • the forwarding plane is deployed on the repeater, and the control plane is deployed on the controller.
  • the controller and the repeater exchange information through the OpenFlow protocol.
  • the controller completes the creation of the flow table, and the repeater completes the data forwarding according to the flow table issued by the controller.
  • Flow table (Flow) is a forwarding table that has nothing to do with business, mainly including matching fields and actions.
  • the controller directly controls the forwarding behavior of the repeater by issuing the flow table to realize the control and management of the repeater.
  • the matching field in the flow table matches the packet, and the corresponding action is performed on the matching.
  • SDN transforms the traditional distributed forwarding architecture into a centralized forwarding architecture, which requires a large amount of space on the forwarding surface for storing flow tables, which simplifies the network to a limited extent.
  • FIG. 1 is an enterprise network provided by an embodiment of the application Schematic diagram of the architecture, as shown in Figure 1, the enterprise network includes core switch (Root), aggregation switch 1 (X1), aggregation switch 2 (X2), access switch 1 (X3), access switch 2 (X4), Terminal equipment A and terminal equipment B.
  • core switch Leaf
  • aggregation switch 1 X1
  • aggregation switch 2 X2
  • access switch 1 X3
  • access switch 2 X4
  • Terminal equipment A and terminal equipment B There are a plurality of downstream egress ports and upstream egress ports on the forwarding switches (aggregation switch 1, aggregation switch 2, access switch 1 and access switch 2), and different egress ports correspond to different forwarding paths.
  • Table 1 is a flow table of an embodiment of the enterprise network architecture of the present application.
  • the IP address of terminal device A is 10.10.10.2, and there is an upstream forwarding path (X3.1 ⁇ X1.1) and a downstream forwarding path (Root.4 ⁇ X1.4 ⁇ X3.3), its priority is 1
  • the IP address of terminal device B is 10.10.20.
  • the priority is 7.
  • FIG. 2 is a schematic diagram of priority of an enterprise network architecture provided by an embodiment of the present application.
  • the upstream egress port 2 of the access switch 2 corresponds to 8 CoS queues
  • the priority of the terminal device B is 7. Therefore, in the access switch 2, the upstream message of the terminal device B is included in the CoS queue with a priority of 7.
  • the core switch and the terminal device A forward the message through the aggregation switch 1 and the access switch 1, the core switch and the terminal device B forward the message through the aggregation switch 1 or 2, and the access switch 2.
  • the core switch sends the downlink message to the terminal device, and it needs to inform the forwarding switch on the downlink forwarding path from which downlink outgoing port to send the downlink message, and the terminal device sends the uplink message to the core switch, and also needs to inform that it is on the uplink forwarding path From which upstream egress port of the forwarding switch sends upstream packets.
  • the terminal device since the topology of the entire network cannot be known, it is necessary to request the core switch that knows the network topology to send the uplink forwarding path of the uplink message.
  • FIG. 3 is a flowchart of a routing information delivery method provided by an embodiment of the present application. As shown in FIG. 3, the routing information delivery method may be performed by the core switch in FIG. 1, and the method may include:
  • Step 101 Receive an ARP request sent by a terminal device.
  • Step 102 In response to the ARP request, configure an uplink forwarding path for uplink packets for the terminal device.
  • the terminal device that wants to send an upstream message sends an ARP request to the core switch.
  • the core switch configures the upstream forwarding path for the terminal device, that is, which forwarding switch to pass through in the forwarding process of the upstream message from the terminal device to the core switch. Which outgoing port of the forwarding switch is sent out.
  • the core switch can discover the upstream forwarding path from the terminal device to the core switch through the network topology. If there is only one, then select this path. If there are multiple paths, select one of them.
  • the selection methods include: one is to choose one at will , The other is to select the light-loaded one by monitoring the traffic of multiple paths, and the other is to select one by using the source MAC address hash.
  • Step 103 Generate a destination MAC address according to the upstream forwarding path.
  • the destination MAC address in this application is more likely to be an indication information used to indicate the upstream forwarding path. In order to be compatible with the existing network, it borrows the existing destination MAC address encapsulation method, that is, the format line of the destination MAC address indication information real. It can be understood that the use of the MAC address to indicate the path information is one of the implementation manners. In the specific implementation process, other content in the packet may also be used to indicate the path information.
  • the core switch generates the destination MAC address according to the upstream forwarding path, and writes the outgoing port number of each forwarding switch in the upstream packet forwarding process in the predetermined bytes in the destination MAC address. Exemplarily, the core switch in this application may generate the following destination MAC addresses for terminal device B according to the information in Table 1:
  • the most significant byte (02) is used to indicate the type of the destination MAC address
  • 02 means that the MAC address is the destination MAC address with the forwarding path and the priority of the terminal device
  • the address is a multicast MAC address.
  • the next highest byte (E0) is used to indicate the priority of the terminal device B.
  • the upper 3 bits of the next highest byte (E0) are used to indicate the priority of the terminal device B.
  • E0 is represented in binary by 11100000, the high bit 3 One bit is 111, indicating that the priority of the terminal device B corresponding to the destination MAC address is 7.
  • the destination MAC address may also include the priority of the terminal device, so that the forwarding device can determine the sending order of the packets according to the priority when forwarding the packet of the terminal device. Starting from the lowest byte to the higher byte one by one, it is used to indicate that the outgoing port of the switch is forwarded one by one on the upstream forwarding path of the upstream packet of terminal device B. The 02 of the lowest byte indicates that the upstream packet exits from terminal device B. After accessing switch 2, access switch 2 needs to send upstream packets from outgoing port 2.
  • the next lowest byte 01 indicates that upstream packets arrive at aggregation switch 2 from outgoing port 2 of access switch 2, and aggregation switch 2 should The outgoing port 1 sends an upstream packet to reach the core switch.
  • the destination MAC address (02.E0.00.00.01.02) in the example, it can support up to 5 layers of enterprise network architecture.
  • the above destination MAC address is an example of the destination MAC address used in the embodiments of the present application. Both the destination MAC address and the source MAC address involved in the following embodiments may use this format, but this application does not The method for compiling the forwarding path and priority in the destination MAC address and the source MAC address is not limited.
  • Step 104 Send an ARP response to the terminal device, where the ARP response includes the destination MAC address.
  • the core switch sends the destination MAC address to the terminal device through the Address Resolution Protocol (ARP) response.
  • ARP Address Resolution Protocol
  • the terminal device writes the destination MAC address to the locally saved ARP table, so that each terminal device can learn the core switch Configure the upstream forwarding path of the upstream packet for yourself.
  • the terminal device sends an ARP request to the core switch, and the core switch sends the destination MAC address to the terminal device through an ARP response, which can completely inherit the existing Ethernet protocol.
  • This application writes routing information into the destination MAC address and combines with existing ARP to deliver routing information, which can reduce costs, improve efficiency, and simplify network traffic.
  • FIG. 4 is a flowchart of a method for obtaining routing information provided by an embodiment of the present application.
  • the method for obtaining routing information may be executed by the terminal device (A or B) in FIG. 1, and the technical solution in this embodiment Corresponding to the technical solution in the method embodiment shown in FIG. 3, the core switch and the terminal device implement routing information distribution through information interaction.
  • the method of this embodiment may include:
  • Step 201 Send an ARP request to the core switch.
  • the ARP request is used to trigger the core switch to configure the upstream forwarding path of the upstream message sent by the terminal device, and generate a destination MAC address according to the upstream forwarding path, and the destination MAC address is used to indicate the upstream forwarding path.
  • Step 202 Receive an ARP response sent by the core switch, where the ARP response includes the destination MAC address.
  • the terminal device sends an ARP request to the core switch, and the core switch sends the destination MAC address to the terminal device through the ARP response, which can completely inherit the existing Ethernet protocol.
  • Step 203 Store the destination MAC address in the locally stored ARP table.
  • the terminal device maintains an ARP table locally, and the terminal device parses out the destination MAC address from the ARP response, and then adds it to the ARP table.
  • This application writes routing information into the destination MAC address and combines with existing ARP to deliver routing information, which can reduce costs, improve efficiency, and simplify network traffic.
  • FIG. 5 is a flowchart of a routing information interaction method provided by an embodiment of the present application. As shown in FIG. 5, the method in this embodiment may include:
  • Step 301 Terminal device B sends an ARP request to the core switch.
  • Terminal device B sends an ARP request.
  • the ARP request can be forwarded to the core switch by the forwarding switch, or can be forwarded to the core switch by other network nodes or communication links. If it is forwarded by the forwarding switch, the forwarding switch can choose an uplink The outgoing port sends an ARP request.
  • Step 302 The core switch configures the upstream forwarding path of the upstream packet for terminal device B and determines the priority of terminal device B, and generates a destination MAC address according to the upstream forwarding path and priority.
  • the upstream forwarding path configured by the core switch for terminal device B is X4.2 ⁇ X2.1, and the destination MAC address 02.E0.00.00 is generated according to the upstream forwarding path and the priority 7 of terminal device B in the flow table. .01.02.
  • Step 303 The core switch sends an ARP response to the terminal device B, where the ARP response includes the destination MAC address.
  • the core switch sends an ARP response to terminal device B, which carries the destination MAC address 02.E0.00.00.01.02, and can also carry the IP address of the core switch 10.10.20.1.
  • the ARP response can be forwarded to the terminal device through the forwarding switch, or can be forwarded to the terminal device through other network nodes or communication links. If it is forwarded by the forwarding switch, the forwarding switch can choose any downstream outgoing port to issue ARP response.
  • Step 304 Terminal device B stores the destination MAC address in the locally stored ARP table.
  • terminal device B After receiving the ARP response, terminal device B parses out the destination MAC address and gateway IP address, and then adds it to the ARP table.
  • routing information is written into the destination MAC address and combined with existing ARP to implement routing information distribution, which can reduce costs, improve efficiency, and simplify network traffic.
  • FIG. 6 is a flowchart of another routing information interaction method provided by an embodiment of the present application. As shown in FIG. 6, the method in this embodiment may include:
  • Step 401 The core switch determines whether to switch the upstream forwarding path of terminal device B according to the network topology and network traffic.
  • the core switch controls the entire network traffic forwarding. Combined with the network topology, you can learn the forwarding path of each packet and the traffic of each path. Based on this, the core switch determines whether it is necessary to switch the upstream forwarding path of terminal device B (that is, whether it needs to Device B's upstream forwarding path redirection), so as to achieve the upstream load balancing of terminal device B.
  • Path number Forwarding path Forwarding path type flow 1 X3.1 ⁇ X1.1 Up 10Mbps 2 X4.1 ⁇ X1.1 Up 10Mbps 3 X4.2 ⁇ X2.1 Up 43Mbps 4 Root.4 ⁇ X1.4 Down 5Mbps 5 Root.4 ⁇ X1.7 Down 5Mbps 6 Root.5 ⁇ X2.8 Down 28Mbps
  • Table 2 is a flow table before switching the upstream forwarding path in the second embodiment of the routing information distribution method of the present application
  • Table 3 is a flow table before switching the upstream forwarding path in the second embodiment of the routing information distribution method of the present application.
  • the upstream forwarding path X4.2 ⁇ X2.1 traffic originally configured by terminal B reaches 43Mbps, while the other upstream forwarding path X4.1 ⁇ X1.1 traffic is only 10Mbps, so the core The switch determines that terminal device B needs to switch the upstream forwarding path.
  • Step 402 If it is necessary to switch the upstream forwarding path of terminal device B, the core switch configures a new upstream forwarding path for terminal device B according to the network topology and network traffic, and generates a new destination MAC address according to the new upstream forwarding path.
  • Table 4 is a flow table after switching the upstream forwarding path of the second embodiment of the routing information distribution method of the present application.
  • the new upstream forwarding path configured by the core switch for terminal device B is X4.1 ⁇ X1. 1.
  • the core switch generates a new destination MAC address 02.E0.00.00.01.01 according to the new upstream forwarding path.
  • Step 403 The core switch sends free ARP to terminal device B, where the free ARP includes a new destination MAC address.
  • the core switch sends free ARP to terminal device B, which carries the new destination MAC address 02.E0.00.00.01.01, and can also carry the IP address of the core switch 10.10.20.1.
  • the free ARP can be forwarded to the terminal device through the forwarding switch, or can be forwarded to the terminal device through other network nodes or communication links. .
  • Step 404 The terminal device B updates the new destination MAC address in the ARP table.
  • terminal device B After receiving free ARP, terminal device B parses out the destination MAC address and gateway IP address, and then updates the corresponding entry in the ARP table.
  • Path number Forwarding path Forwarding path type flow 1 X3.1 ⁇ X1.1 Up 10Mbps 2 X4.1 ⁇ X1.1 Up 25Mbps
  • Table 5 is the flow table after switching the upstream forwarding path in the second embodiment of the method for issuing routing information of the present application.
  • the traffic of the path has changed, the upstream forwarding path X4.2 ⁇ X2.1 traffic is reduced to 28Mbps, and the upstream forwarding path X4.1 ⁇ X1.1 traffic is increased to 25Mbps, which reaches the load balance of the two upstream forwarding paths. purpose.
  • the routing information is redirected to the terminal device by writing the routing information into the destination MAC address and combining with the existing ARP.
  • FIG. 7 is a flowchart of a priority change method provided by an embodiment of the present application. As shown in FIG. 7, the method in this embodiment may include:
  • Step 501 The core switch determines whether the priority of terminal device B needs to be changed.
  • the core switch can modify the user service level according to business requirements, that is, change the priority of the terminal equipment to provide more optimized services.
  • Step 502 If the priority of the terminal device B needs to be changed, determine the new priority of the terminal device B, and generate a new destination MAC address according to the new priority.
  • the original priority of terminal B is 7, and now it needs to be changed to 0.
  • the core switch refreshes the flow table entry of terminal B, changes the priority field from 7 to 0, and generates a new destination MAC address 02.00 .00.00.01.02.
  • Table 6 is a flow table after the priority is changed in the embodiment of the priority change method of the present application. As shown in Table 6, the priority of the terminal device B is changed from 7 in Table 1 to 0.
  • Step 503 The core switch sends free ARP to terminal device B, where the free ARP includes a new destination MAC address.
  • the core switch sends free ARP to terminal device B, which carries the new destination MAC address 02.00.00.00.01.02, and can also carry the IP address of the core switch 10.10.20.1.
  • the free ARP can be forwarded to the terminal device through the forwarding switch, or can be forwarded to the terminal device through other network nodes or communication links. .
  • Step 504 The terminal device B updates the new destination MAC address in the ARP table.
  • terminal device B After receiving free ARP, terminal device B parses out the destination MAC address and gateway IP address, and then updates the corresponding entry in the ARP table.
  • the priority is written into the destination MAC address and combined with the existing ARP to modify the user service level.
  • the core switch can carry the upstream forwarding path in the destination MAC address and send it to the terminal device, and after the terminal device reaches the destination MAC address, it updates the ARP table in time, and subsequently uses the destination MAC address as The routing information forwarded by the upstream message is used to send the upstream message.
  • FIG. 8 is a flowchart of an uplink packet sending method provided by an embodiment of the present application. As shown in FIG. 8, the uplink packet sending method may be performed by the terminal device (A or B) in FIG. 1, and the method may include:
  • Step 601 Acquire a destination MAC address according to a locally stored ARP table.
  • the destination MAC address is used to indicate an upstream forwarding path of an upstream packet.
  • the terminal device To send an upstream message, the terminal device first obtains the destination MAC address of the core switch from the ARP table.
  • the destination MAC address is configured by the core switch to the terminal device in the foregoing embodiment, and is used to indicate the upstream message sent by the terminal device. Upstream forwarding path.
  • the source network address and the destination MAC address are encapsulated in the upstream message in the current network, where the source MAC address refers to the terminal device's own MAC address, and the destination MAC address refers to the purpose of the upstream message
  • the MAC address of the device in order to be compatible with this format, also encapsulates the destination MAC address in the upstream message, the difference is that the destination MAC address is used as the destination MAC address to indicate the upstream forwarding path.
  • Step 602 Send an upstream message to the forwarding switch, where the upstream message includes the destination MAC address.
  • the terminal device may send the upstream packet encapsulating the destination MAC address to the forwarding switch through the connection port with the forwarding switch.
  • the terminal device carries the destination MAC address indicating the upstream forwarding path in the upstream message, so that the forwarding switch can forward the upstream message according to the destination MAC address.
  • No label is needed during the forwarding process, and no entry needs to be stored, which can reduce costs. , Improve efficiency and simplify network traffic.
  • FIG. 9 is a flowchart of an upstream message forwarding method provided by an embodiment of the present application.
  • the upstream message sending method may be performed by the forwarding switch (aggregation switch 1, aggregation switch 2, and access switch in FIG. 1). 1 and the access switch 2).
  • the technical solution in this embodiment corresponds to the technical solution in the method embodiment shown in FIG. 8.
  • the terminal device and the forwarding switch implement the sending and forwarding of uplink messages through information interaction.
  • the method of this embodiment may include:
  • Step 701 Receive an upstream message sent by a terminal device.
  • the upstream message includes a destination MAC address, and the destination MAC address is used to indicate an upstream forwarding path of the upstream message.
  • Step 702 Determine the egress port corresponding to the upstream packet according to the destination MAC address.
  • the forwarding switch After receiving the upstream message, the forwarding switch directly parses the destination MAC address from the upstream message, and searches for the non-zero byte from the lowest byte to the higher byte. At this time, the value in the first non-zero byte is The indicated egress port represents the egress port of the next hop, and then the forwarding switch will use the bit position of the egress port to be zero.
  • the forwarding switch can zero the corresponding bit position according to the number of bits representing the output port, for example, the output port is represented by 6 bits, Then the forwarding switch should set 6 bit bits to zero, and the output port is represented by 2 bytes (16 bits), then the forwarding switch should set 16 bit bits to zero.
  • This application does not specify the number of bits representing the port limited.
  • Step 703 Send the upstream message through the outgoing port.
  • the forwarding switch may put the upstream message in the forwarding queue corresponding to the priority of the terminal device that sent the upstream message, and send the upstream message from the next hop's egress port when it reaches the sending order of the upstream message.
  • the terminal device carries the destination MAC address indicating the upstream forwarding path in the upstream message.
  • the forwarding switch can forward the upstream message according to the destination MAC address. No label is required during the forwarding process, and no entry is required. Improve efficiency and simplify network traffic.
  • FIG. 10 is a flowchart of an uplink packet sending and forwarding method provided by an embodiment of the present application. As shown in FIG. 10, the method in this embodiment may include:
  • Step 801 Terminal device B obtains the destination MAC address corresponding to the uplink message according to the ARP table.
  • terminal device B To send an upstream message, terminal device B first obtains the destination MAC address 02.E0.00.00.01.02 of the gateway (core switch) from the ARP table, and encapsulates it in the upstream message.
  • Step 802 Terminal device B sends an upstream message to access switch 2.
  • the terminal device B sends the uplink message encapsulated with the destination MAC address to the access switch through the connection port with the access switch 2.
  • Step 803 The access switch 2 obtains the outgoing port 2 and priority 7 corresponding to the upstream packet from the destination MAC address.
  • the access switch 2 After receiving the upstream message, the access switch 2 directly parses the destination MAC address 02.E0.00.00.01.02 from the upstream message, and searches for the non-zero byte from the lowest byte to the higher byte. At this time, the first The value in each non-zero byte indicates that the outgoing port of the next hop is 2, and the access switch 2 determines that port 2 clears the first non-zero byte (the least significant byte). The access switch 2 also parses out that the priority of the terminal device B is 7 from the highest 3 bits of the next highest byte, so the access switch 2 puts the upstream packet into the forwarding queue with priority 7, when it arrives The upstream packets are sent out of the outgoing port 2 in the order.
  • Step 804 The access switch 2 sends the uplink message from the egress port 2 to the aggregation switch 2.
  • Step 805 The aggregation switch 2 obtains the outgoing port 1 and the priority 7 corresponding to the upstream message from the destination MAC address.
  • the processing of the aggregation switch 2 is similar to that of the access switch 2, that is, the destination MAC address 02.E0.00.00.01.00 is parsed directly from the upstream message, starting from the lowest byte to the high word.
  • the section searches for non-zero bytes.
  • the first non-zero byte is the next-lowest byte.
  • the value in the next-lowest byte indicates that the next-hop outgoing port is 1.
  • the aggregation switch 2 determines the first port after determining the port 1. A non-zero byte (second lower byte) is cleared.
  • Aggregation switch 2 also parses the priority of terminal device B from the highest 3 bits of the next highest byte, so the aggregation switch puts the upstream packet in the forwarding queue with priority 7. When the upstream report is reached The order of the text is sent out from the output port 1.
  • Step 806 The aggregation switch 2 sends the uplink message from the egress port 1 to the core switch.
  • the terminal device carries the destination MAC address indicating the upstream forwarding path in the upstream message.
  • the forwarding switch can forward the upstream message according to the destination MAC address. No label is required during the forwarding process, and no entry is required. Improve efficiency and simplify network traffic.
  • FIG. 11 is a flowchart of a downlink packet sending method provided by an embodiment of the present application. As shown in FIG. 11, the downlink packet sending method is performed by the core switch in FIG. 1, and the method may include:
  • Step 901 Configure a downlink forwarding path for downlink messages for the terminal device.
  • the core switch To send a downlink message to a terminal device, the core switch first determines the downlink forwarding path of the downlink message sent to the terminal device.
  • the core switch can configure the downlink forwarding path of the terminal device according to the Active flag in Table 1.
  • Step 902 Generate a source MAC address according to the downlink forwarding path, where the source MAC address is used to indicate the downlink forwarding path.
  • the source network address and the destination MAC address are encapsulated in the downlink message in the current network.
  • the source MAC address refers to the core switch's own MAC address
  • the destination MAC address refers to the purpose of the downlink message.
  • the application also encapsulates the source MAC address in the upstream message, the difference is that the source MAC address is used as a source MAC address to indicate the downlink forwarding path.
  • Step 903 Send a downlink message to the forwarding switch, where the downlink message includes the source MAC address.
  • the core switch sends the downlink packet encapsulated with the source MAC address to the forwarding switch through the connection port with the forwarding switch.
  • the core switch carries the source MAC address indicating the downlink forwarding path in the downlink message, so that the forwarding switch can forward the downlink message according to the source MAC address.
  • No label is needed during the forwarding process, and there is no need to save table entries, which can reduce costs , Improve efficiency and simplify network traffic.
  • FIG. 12 is a flowchart of a downlink message forwarding method provided by an embodiment of the present application.
  • the downlink message sending method may be performed by the forwarding switch (aggregation switch 1, aggregation switch 2, and access switch in FIG. 1). 1 and the access switch 2) implementation, the technical solution in this embodiment corresponds to the technical solution in the method embodiment shown in FIG. 11, the core switch and the forwarding switch implement the sending and forwarding of downlink messages through information interaction.
  • the method of this embodiment may include:
  • Step 1001 Receive a downlink message sent by a core switch.
  • the downlink message includes a source MAC address, and the source MAC address is used to indicate a downlink forwarding path of the downlink message.
  • Step 1002 Determine the outgoing port corresponding to the downlink packet according to the source MAC address.
  • the forwarding switch After receiving the downstream packet, the forwarding switch directly parses the source MAC address from the downstream packet, and searches for the non-zero byte from the lowest byte to the higher byte. At this time, the value in the first non-zero byte is The indicated egress port represents the egress port of the next hop, and then the forwarding switch will use the bit position of the egress port to be zero.
  • Step 1003 Send a downlink message through the egress port.
  • the forwarding switch may put the downlink message in a forwarding queue corresponding to the priority of the terminal device that sent the downlink message, and when the transmission order of the downlink message is reached, it will be sent out from the egress port of the next hop.
  • the core switch carries the source MAC address indicating the downlink forwarding path in the downlink message.
  • the forwarding switch can forward the downlink message according to the source MAC address. No tag is needed during the forwarding process, and there is no need to save table entries. Improve efficiency and simplify network traffic.
  • FIG. 13 is a flowchart of a method for sending and forwarding a downlink message provided by an embodiment of the present application. As shown in FIG. 13, the method in this embodiment may include:
  • Step 1101 the core switch configures a downlink forwarding path for terminal device B, and generates a source MAC address according to the downlink forwarding path.
  • the core switch To send a downlink message to terminal device B, the core switch must first determine the downlink forwarding path, generate the source MAC address 02.E0.00.00.06.08 according to the downlink forwarding path of the Active label in Table 1, and encapsulate it as a downlink message in.
  • Step 1102 The core switch sends a downlink message to the aggregation switch 2.
  • the core switch sends the downlink packet to the aggregation switch 2 from the root outgoing port of the downlink forwarding path.
  • Step 1103 The aggregation switch 2 obtains the outgoing port 8 and priority 7 corresponding to the downlink packet from the source MAC address.
  • the aggregation switch 2 After the downstream message arrives at the aggregation switch 2, the aggregation switch 2 directly parses the source MAC address 02.E0.00.00.06.08 from the downstream message, and searches for the non-zero byte from the lowest byte to the higher byte. A non-zero byte is the least significant byte. The value in the least significant byte indicates that the egress port of the next hop is 8. After the aggregation switch 2 determines that port 8 is the first non-zero byte (least significant byte) ) Cleared.
  • the aggregation switch 2 also parses the priority of the terminal device B from the highest 3 bits of the next highest byte is 7, so the aggregation switch 2 puts the downstream packet into the forwarding queue with priority 7, when it reaches the downstream Packets are sent out of port 8 in order.
  • Step 1104 The aggregation switch 2 sends the downlink message from the egress port 8 to the access switch 2.
  • Step 1105 The access switch 2 obtains the outgoing port 6 and the priority 7 corresponding to the downlink packet from the source MAC address.
  • the processing of the access switch 2 is similar to that of the aggregation switch 2, that is, the source MAC address 02.E0.00.00.06.00 is parsed directly from the downstream packet, starting from the lowest byte to the high bit. Byte search for non-zero bytes. At this time, the first non-zero byte is the next-lowest byte. The value in the next-lowest byte indicates that the output port of the next hop is 6. A non-zero byte (lower-order byte) is cleared. The access switch 2 also parses the priority of the terminal device B from the highest 3 bits of the next highest byte is 7, so the access switch 2 puts the downstream packet into the forwarding queue with priority 7, when it arrives The downstream packets are sent out of the output port 6 in sequence.
  • Step 1106 The access switch 2 sends the downlink message from the egress port 6 to the terminal device B.
  • the terminal device carries the source MAC address indicating the downlink forwarding path in the downlink message.
  • the forwarding switch can forward the downlink message according to the source MAC address. No label is required during the forwarding process, and no entry needs to be stored. Improve efficiency and simplify network traffic.
  • the core switch can also redirect the downstream forwarding path of the terminal device, but the difference with the upstream is that the upstream switch requires the core switch to send free ARP after reconfiguring the upstream forwarding path of the terminal device to carry the new The destination MAC address is given to the terminal device.
  • the downstream does not need to specifically inform the terminal equipment.
  • the core switch directly encapsulates the source MAC address generated according to the switched downstream forwarding path in the downstream message. In this way, the downstream message is forwarded along the way.
  • the forwarding switch can parse out the source MAC address from the downstream packet to know which outgoing port of the next hop.
  • FIG. 14 is a schematic structural diagram of an apparatus for delivering routing information provided by an embodiment of the present application.
  • the apparatus of this embodiment may include: a receiving module 11, a configuration module 12, a generating module 13, and a sending module 14.
  • the receiving module 11 is used to receive the ARP request sent by the terminal device;
  • the configuration module 12 is used to configure the uplink forwarding path of the uplink message for the terminal device in response to the ARP request;
  • the generation module 13 is used to generate according to the uplink forwarding path Destination MAC address.
  • the destination MAC address is used to indicate the upstream forwarding path.
  • the sending module 14 is used to send an ARP response to the terminal device.
  • the ARP response includes the destination MAC address.
  • the configuration module 12 is also used to determine the priority of the terminal device; the address generation module is also used to generate the destination MAC address according to the uplink forwarding path and priority.
  • the configuration module 12 is also used to determine whether the terminal device needs to switch the uplink forwarding path of the terminal device based on the network topology and network traffic; if the terminal device needs to switch the uplink forwarding path, the network topology is used And network traffic configure a new upstream forwarding path for the terminal device; generate a new destination MAC address based on the new upstream forwarding path.
  • the configuration module 12 is also used to determine whether the priority of the terminal device needs to be changed; if the priority of the terminal device needs to be changed, the new priority of the terminal device is determined; according to the new priority Generate a new destination MAC address.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • the sending module 14 is also used to send free ARP to the terminal device, and the free ARP includes a new destination MAC address.
  • the apparatus of this embodiment may be used to execute the related technical solutions of the method embodiments shown in FIG. 3, FIG. 5, FIG. 6, or FIG. 7.
  • the implementation principles and technical effects are similar, and are not repeated here.
  • the apparatus of this embodiment may include: a sending module 21, a receiving module 22, and a storage module 23.
  • the sending module 21 is used to send an ARP request to the core switch.
  • the ARP request is used to trigger the core switch to configure an upstream forwarding path for upstream packets and generate a destination MAC address according to the upstream forwarding path.
  • the destination MAC address is used to indicate the upstream forwarding path.
  • the receiving module 22 is used to receive the ARP response sent by the core switch, and the ARP response includes the destination MAC address; the storage module 23 is used to store the destination MAC address into a locally saved ARP table.
  • the destination MAC address is also used to indicate the priority of the terminal device.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • the receiving module 22 is also used to receive free ARP sent by the core switch.
  • the free ARP includes a new destination MAC address, and the new destination MAC address includes a new upstream forwarding path and / or a new priority.
  • the storage module is also used to update the ARP table according to the new destination MAC address.
  • the device of this embodiment may be used to execute the related technical solutions of the method embodiments shown in FIG. 4, FIG. 5, FIG. 6, or FIG. 7.
  • the implementation principles and technical effects are similar, and are not repeated here.
  • FIG. 16 is a schematic structural diagram of an apparatus for sending an uplink message according to an embodiment of the present application.
  • the apparatus in this embodiment may include: an obtaining module 31 and a sending module 32.
  • the obtaining module 31 is used to obtain the destination MAC address according to the locally stored ARP table, and the destination MAC address is used to indicate the upstream forwarding path of the upstream message;
  • the sending module 32 is used to send the upstream message and the upstream message to the forwarding switch Including the destination MAC address.
  • the destination MAC address is also used to indicate the priority of the terminal device.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • the apparatus of this embodiment may be used to execute the related technical solutions of the method embodiments shown in FIG. 8 or FIG. 10, and the implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 17 is a schematic structural diagram of an upstream packet forwarding apparatus provided by an embodiment of the present application.
  • the apparatus of this embodiment may include: a receiving module 41, a determining module 42, and a sending module 43.
  • the receiving module 41 is used to receive the uplink message sent by the terminal device, the uplink message includes the destination MAC address, and the destination MAC address is used to indicate the upstream forwarding path of the uplink message;
  • the determination module 42 is used to determine the destination MAC address The outgoing port corresponding to the upstream message;
  • the sending module 43 is used to send the upstream message through the outgoing port.
  • the destination MAC address is also used to indicate the priority of the terminal device; the sending module 43 is specifically used to put the upstream message in the forwarding queue corresponding to the priority, and arrive at the upstream message When sending the order, the upstream packet is sent through the outgoing port.
  • the determination module 42 is also used to zero out the bit position used to indicate the output port in the destination MAC address.
  • the determination module 42 is specifically used to search for the non-zero byte from the lowest byte of the destination MAC address to the high-order byte, and indicate the value of the first non-zero byte.
  • the port serves as the egress port.
  • the highest byte in the destination MAC address is used to indicate the type of the destination MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the upstream forwarding path of the upstream packet.
  • the apparatus of this embodiment may be used to execute the related technical solutions of the method embodiments shown in FIG. 9 or FIG. 10, and the implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 18 is a schematic structural diagram of a downlink packet sending apparatus provided by an embodiment of the present application.
  • the apparatus of this embodiment may include: a configuration module 51, a generating module 52, and a sending module 53.
  • the configuration module 51 is used to configure the downlink forwarding path of the downlink message sent to the terminal device for the terminal device;
  • the generation module 52 is used to generate the source MAC address according to the downlink forwarding path, and the source MAC address is used to indicate the downlink forwarding path;
  • the sending module 53 is configured to send a downlink message to the forwarding switch, where the downlink message includes the source MAC address.
  • the configuration module 51 is also used to determine the priority of the terminal device; the generation module 52 is also used to generate the source MAC address according to the downlink forwarding path and priority.
  • the configuration module 51 is also used to determine whether the downlink forwarding path of the terminal device needs to be switched and / or the priority of the terminal device needs to be changed according to the network topology and network traffic; if the downlink of the terminal device needs to be switched Forwarding path and / or the priority of the terminal device needs to be changed, the terminal device is configured with a new downlink forwarding path and / or a new priority according to the network topology and network traffic; the generating module 52 is also used for according to the new downlink forwarding path And / or a new priority to generate a new source MAC address.
  • the highest byte in the source MAC address is used to indicate the type of the source MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the downlink forwarding path of the downlink packet.
  • the apparatus of this embodiment may be used to execute the related technical solutions of the method embodiments shown in FIG. 11 or FIG. 13, and the implementation principles and technical effects are similar, and are not described here again.
  • FIG. 19 is a schematic structural diagram of a downlink packet forwarding apparatus provided by an embodiment of the present application.
  • the apparatus of this embodiment may include: a receiving module 61, a determining module 62, and a sending module 63.
  • the receiving module 61 is used to receive the downlink message sent by the core switch to the terminal device.
  • the downlink message includes the source MAC address, and the source MAC address is used to indicate the downlink forwarding path of the downlink message;
  • the determination module 62 is used to The outgoing port corresponding to the downstream packet is determined according to the source MAC address;
  • the sending module 63 is used to send the downstream packet through the outgoing port.
  • the source MAC address is also used to indicate the priority of the terminal device; the sending module 63 is specifically used to put the downlink packet into the forwarding queue corresponding to the priority, and arrive at the downlink packet When sending the order, the downstream packets are sent through the outgoing port.
  • the determining module 62 is also used to zero the bit position used to indicate the outgoing port in the source MAC address.
  • the determining module 62 is specifically configured to search for the non-zero byte from the lowest byte of the source MAC address to the higher byte, and indicate the value of the first non-zero byte.
  • the port serves as the egress port.
  • the highest byte in the source MAC address is used to indicate the type of the source MAC address, and the next highest byte is used to indicate the priority of the terminal device, starting from the lowest byte to the higher byte.
  • One by one is used to indicate that the outgoing ports of the switch are forwarded one by one on the downlink forwarding path of the downlink packet.
  • the apparatus of this embodiment may be used to execute the related technical solutions of the method embodiments shown in FIG. 12 or FIG. 13, and the implementation principles and technical effects are similar, and are not described here again.
  • FIG. 20 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • the device includes a processor 70, a memory 71, and a communication interface 72; the number of processors 70 in the device may be one or more, and FIG. 20 Taking a processor 70 as an example; the processor 70, the memory 71, and the communication interface 72 in the device may be connected through a bus or in other ways. In FIG. 20, the connection through a bus is used as an example.
  • the memory 71 as a computer-readable storage medium may be used to store software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the method in the embodiments of the present application.
  • the processor 70 executes the software functions, instructions, and modules stored in the memory 71 to execute various functional applications and data processing of the device, that is, to implement the above method.
  • the memory 71 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system and application programs required for at least one function; the storage data area may store data created according to the use of the terminal, and the like.
  • the memory 71 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 71 may further include memories remotely provided with respect to the processor 70, and these remote memories may be connected to the device through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • the communication interface 72 can be used to receive or send data, and generate signal input and output related to user settings and function control of the device.
  • the device may be a core switch
  • the device may be an aggregation switch or an access switch
  • the device may be a terminal device, for example, may be user equipment.
  • the present application provides a computer-readable storage medium, the computer-readable storage medium stores instructions, which when executed on a computer, are used to execute any one of FIGS. 3-13 Technical solutions of method embodiments.
  • the present application provides a computer program product including instructions, which when executed on a computer, are used to execute the technical solution of any of the method embodiments shown in FIGS. 3-13.
  • the above-mentioned embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server or data center Transmit to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device including a server, a data center, and the like integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, Solid State Disk (SSD)) or the like.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a DVD
  • a semiconductor medium for example, Solid State Disk (SSD)

Abstract

本申请提供一种下行报文发送、转发方法和装置。本申请下行报文发送方法,包括:为终端设备配置下行报文的下行转发路径;根据下行转发路径生成源MAC地址,源MAC地址用于指示下行转发路径;向转发交换机发送下行报文,下行报文包括源MAC地址。本申请可以降低成本、提高效率且简化网络流量。

Description

下行报文发送、转发方法和装置
本申请要求于2018年11月5日提交中国专利局、申请号为201811308475.1、申请名称为“下行报文发送、转发方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术,尤其涉及一种下行报文发送、转发方法和装置。
背景技术
随着企业网络规模越来越大,连接设备数量越来越多,业务越来越丰富,信息通信技术(Information Communications Technology,ICT)应用呈爆炸式增长,这导致了企业网络流量越来越多。同时,企业业务体验的要求越来越高,需要更加实时、更加高质量的业务体验。这些趋势都带来了这样一个需求,即企业网络需要更加简洁、更加高效。
目前简化企业网络的一个方向是简化网络流量转发,例如,软件定义网络(Software Defined Network,SDN)使用流表方式将数据流对应的流表下发到沿途交换机,从而控制数据流的转发路径。
但是,SDN将传统的分布式转发架构变为集中式转发架构,在转发面上需要有大量的空间用于存储流表,对网络的简化程度有限。
发明内容
本申请提供一种下行报文发送、转发方法和装置,可以降低成本、提高效率且简化网络流量。
第一方面,本申请提供一种路由信息下发方法,包括:
接收终端设备发送的ARP请求;响应于ARP请求,为终端设备配置上行报文的上行转发路径;根据上行转发路径生成目的MAC地址,目的MAC地址用于指示上行转发路径;向终端设备发送ARP响应,ARP响应包括目的MAC地址。
本申请通过将路由信息写入目的MAC地址中,并与现有ARP结合,实现路由信息的下发,可以降低成本、提高效率且简化网络流量。
在一种可能的实现方式中,根据上行转发路径生成目的MAC地址之前,还包括:确定终端设备的优先级;根据上行转发路径生成目的MAC地址,包括:根据上行转发路径和优先级生成目的MAC地址。
在一种可能的实现方式中,向终端设备发送ARP响应之后,还包括:根据网络拓扑和网络流量判断是否需要切换终端设备的上行转发路径;若需要切换终端设备的上行转发路径,则根据网络拓扑和网络流量为终端设备配置新的上行转发路径,并根据新的上行转发路径生成新的目的MAC地址。
在一种可能的实现方式中,向终端设备发送ARP响应之后,还包括:判断是否需要变更终端设备的优先级;若需要变更终端设备的优先级,则确定终端设备的新的优先级,并根据新的优先级生成新的目的MAC地址。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
在一种可能的实现方式中,生成新的目的MAC地址之后,还包括:向终端设备发送免费ARP,免费ARP包括新的目的MAC地址。
第二方面,本申请提供一种路由信息获取方法,包括:
向核心交换机发送ARP请求,ARP请求用于触发核心交换机配置上行报文的上行转发路径,并根据上行转发路径生成目的MAC地址,目的MAC地址用于指示上行转发路径;接收核心交换机发送的ARP响应,ARP响应包括目的MAC地址;将目的MAC地址存入本地保存的ARP表。
本申请通过将路由信息写入目的MAC地址中,并与现有ARP结合,实现路由信息的下发,可以降低成本、提高效率且简化网络流量。
在一种可能的实现方式中,目的MAC地址还用于指示终端设备的优先级。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
在一种可能的实现方式中,将目的MAC地址存入本地保存的ARP表之后,还包括:接收核心交换机发送的免费ARP,免费ARP包括新的目的MAC地址,新的目的MAC地址包括新的上行转发路径和/或新的优先级;根据新的目的MAC地址更新ARP表。
第三方面,本申请提供一种上行报文发送方法,包括:
根据本地保存的ARP表获取目的MAC地址,目的MAC地址用于指示上行报文的上行转发路径;向转发交换机发送上行报文,上行报文包括目的MAC地址。
本实施例终端设备在上行报文中携带了指示上行转发路径的目的MAC地址,使得转发交换机可以根据目的MAC地址实现上行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
在一种可能的实现方式中,目的MAC地址还用于指示终端设备的优先级。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
第四方面,本申请提供一种上行报文转发方法,包括:
接收终端设备发送的上行报文,上行报文包括目的MAC地址,目的MAC地址用于指示上行报文的上行转发路径;根据目的MAC地址确定上行报文对应的出端口;通过出端口发送上行报文。
本实施例终端设备在上行报文中携带了指示上行转发路径的目的MAC地址,转发交换机可以根据目的MAC地址实现上行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
在一种可能的实现方式中,目的MAC地址还用于指示终端设备的优先级;通过出端口发送上行报文,包括:将上行报文放入与优先级对应的转发队列中,并在到达上行报文的发送顺序时通过出端口发送上行报文。
在一种可能的实现方式中,根据目的MAC地址确定上行报文对应的出端口之后,还包括:将目的MAC地址中用于表示出端口的bit位置零。
在一种可能的实现方式中,根据目的MAC地址确定上行报文对应的出端口,包括:从目的MAC地址的最低位字节开始向高位字节查找非零字节,将第一个非零字节的数值所指示的出端口作为出端口。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
第五方面,本申请提供一种下行报文发送方法,包括:
为终端设备配置下行报文的下行转发路径;根据下行转发路径生成源MAC地址,源MAC地址用于指示下行转发路径;向转发交换机发送下行报文,下行报文包括源MAC地址。
本实施例核心交换机在下行报文中携带了指示下行转发路径的源MAC地址,使得转发交换机可以根据源MAC地址实现下行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
在一种可能的实现方式中,根据下行转发路径生成源MAC地址之前,还包括:确定终端设备的优先级;根据下行转发路径生成源MAC地址,包括:根据下行转发路径和优先级生成源MAC地址。
在一种可能的实现方式中,向转发交换机发送下行报文之后,还包括:根据网络拓扑和网络流量判断是否需要切换终端设备的下行转发路径和/或需要变更终端设备的优先级;若需要切换终端设备的下行转发路径和/或需要变更终端设备的优先级,则根据网络拓扑和网络流量为终端设备配置新的下行转发路径和/或新的优先级;根据新的下行转发路径和/或新的优先级生成新的源MAC地址。
在一种可能的实现方式中,源MAC地址中的最高位字节用于表示源MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在下行报文的下行转发路径上逐个转发交换机的出端口。
第六方面,本申请提供一种下行报文转发方法,包括:
接收核心交换机发送的下行报文,下行报文包括源MAC地址,源MAC地址用于指示下行报文的下行转发路径;根据源MAC地址确定下行报文对应的出端口;通过出端口发送下行报文。
本实施例核心交换机在下行报文中携带了指示下行转发路径的源MAC地址,转发交换机可以根据源MAC地址实现下行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
在一种可能的实现方式中,源MAC地址还用于指示终端设备的优先级;通过出端口发送下行报文,包括:将下行报文放入与优先级对应的转发队列中,并在到达下行报文的发送顺序时通过出端口发送下行报文。
在一种可能的实现方式中,根据源MAC地址确定下行报文对应的出端口之后,还包括:将源MAC地址中用于表示出端口的bit位置零。
在一种可能的实现方式中,根据源MAC地址确定下行报文对应的出端口,包括:从 源MAC地址的最低位字节开始向高位字节查找非零字节,将第一个非零字节的数值所指示的出端口作为出端口。
在一种可能的实现方式中,源MAC地址中的最高位字节用于表示源MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在下行报文的下行转发路径上逐个转发交换机的出端口。
第七方面,本申请提供一种路由信息下发装置,包括:接收模块、配置模块、生成模块和发送模块,该装置用于实现上述第一方面中任一项所述的方法。
第八方面,本申请提供一种路由信息获取装置,包括:发送模块、接收模块和存储模块,该装置用于实现上述第二方面中任一项所述的方法。
第九方面,本申请提供一种上行报文发送装置,包括:获取模块和发送模块,该装置用于实现上述第三方面中任一项所述的方法。
第十方面,本申请提供一种上行报文转发装置,包括:接收模块、确定模块和发送模块,该装置用于实现上述第四方面中任一项所述的方法。
对应第十一方面,本申请提供一种下行报文发送装置,包括:配置模块、生成模块和发送模块,该装置用于实现上述第五方面中任一项所述的方法。
第十二方面,本申请提供一种下行报文转发装置,包括:接收模块、确定模块和发送模块,该装置用于实现上述第六方面中任一项所述的方法。
对应第十三方面,本申请提供一种网关设备,包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现上述第一方面或第五方面中任一项所述的方法。在一种可能的实现方式中,所述网关设备可以为核心交换机。
第十四方面,本申请提供一种转发设备,包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现上述第四方面或第六方面中任一项所述的方法。在一种可能的实现方式中,所述转发设备可以为接入交换机或汇聚交换机。
第十五方面,本申请提供一种终端设备,包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现上述第二方面或第三方面中任一项所述的方法。在一种可能的实现方式中,所述终端设备可以为用户设备。
第十六方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质存储有指令,当其在计算机上运行时,用于执行上述第一方面至第六方面中任一项所述的方法。
第十七方面,本申请提供一种包括指令的计算机程序产品,当其在计算机上运行时,用于执行上述第一方面至第六方面中任一项所述的方法。
需要指出的是,采用MAC地址来指示路径信息是本申请的一种实现方式,在具体实现过程中,还可以采用报文中的其它内容来指示路径信息,其实现的原理和采用MAC地址指示路径信息的实现原理类似。
附图说明
图1为本申请实施例提供的企业网架构的示意图;
图2为本申请实施例提供的企业网架构的优先级示意图;
图3为本申请实施例提供的路由信息下发方法的流程图;
图4为本申请实施例提供的路由信息获取方法的流程图;
图5为本申请实施例提供的路由信息交互方法的流程图;
图6为本申请实施例提供的另一个路由信息交互方法的流程图;
图7为本申请实施例提供的优先级变更方法的流程图;
图8为本申请实施例提供的上行报文发送方法的流程图;
图9为本申请实施例提供的上行报文转发方法的流程图;
图10为本申请实施例提供的上行报文发送和转发方法的流程图;
图11为本申请实施例提供的下行报文发送方法的流程图;
图12为本申请实施例提供的下行报文转发方法的流程图;
图13为本申请实施例提供的下行报文发送和转发方法的流程图;
图14为本申请实施例提供的路由信息下发装置的结构示意图;
图15为本申请实施例提供的路由信息获取装置的结构示意图;
图16为本申请实施例提供的上行报文发送装置的结构示意图;
图17为本申请实施例提供的上行报文转发装置的结构示意图;
图18为本申请实施例提供的下行报文发送装置的结构示意图;
图19为本申请实施例提供的下行报文转发装置的结构示意图;
图20为本申请实施例提供的设备的结构示意图。
具体实施方式
下面将结合本申请中的附图,对本申请中的技术方案进行描述。
目前简化企业网络的一个方向是简化网络流量转发,例如,SDN使用流表方式将数据流对应的流表下发到沿途交换机,从而控制数据流的转发路径。SDN将控制平面和转发平面分离开来,其中,转发平面部署在转发器上,控制平面部署在控制器上,控制器和转发器之间通过OpenFlow协议完成信息的交互。控制器完成流表的创建,转发器根据控制器下发的流表,完成数据的转发。流表(Flow Table)是一种与业务无关的转发表,主要包括匹配域和动作,控制器通过下发流表直接控制转发器的转发行为,实现对转发器的控制和管理,转发器根据流表中的匹配域对报文进行匹配,匹配上则执行相应的动作。但是,SDN将传统的分布式转发架构变为集中式转发架构,在转发面上需要有大量的空间用于存储流表,对网络的简化程度有限。
为了解决上述问题,本申请提供一种路由信息的下发方法,该方法可应用于任何网络架构,例如,企业网、园区网等,示例性的,图1为本申请实施例提供的企业网架构的示 意图,如图1所示,该企业网络包括核心交换机(Root)、汇聚交换机1(X1)、汇聚交换机2(X2)、接入交换机1(X3)、接入交换机2(X4)、终端设备A以及终端设备B。在转发交换机(汇聚交换机1、汇聚交换机2、接入交换机1以及接入交换机2)上分别有多个下行出端口和上行出端口,不同的出端口对应不同的转发路径。
表1
Figure PCTCN2019112793-appb-000001
表1是本申请企业网架构实施例的流表,如表1所示,终端设备A的IP地址是10.10.10.2,有一条上行转发路径(X3.1→X1.1)和一条下行转发路径(Root.4→X1.4→X3.3),其优先级是1,终端设备B的IP地址是10.10.20.3,有两条上行转发路径(X4.1→X1.1和X4.2→X2.1)和两条下行转发路径(Root.4→X1.7→X4.6和Root.5→X2.8→X4.6),其优先级是7。通过标记Active记录在终端设备B的两条上行转发路径中当前使用的是哪一条转发路径,同样在终端设备B的两条下行转发路径中也是通过标记Active记录当前使用的是哪一条转发路径。终端设备的优先级表示该终端设备的服务等级(Class of Service,CoS),转发交换机的每个出端口对应多个CoS队列。示例性的,图2为本申请实施例提供的企业网架构的优先级示意图,如图2所示,接入交换机2的上行出端口2对应了8个CoS队列,终端设备B的优先级是7,因此在接入交换机2中将终端设备B的上行报文列入优先级为7的CoS队列。
由表1可知核心交换机和终端设备A通过汇聚交换机1和接入交换机1转发报文,核心交换机和终端设备B通过汇聚交换机1或2,以及接入交换机2转发报文。核心交换机向终端设备发送下行报文,需要告知位于下行转发路径上的转发交换机从哪个下行出端口将下行报文发送出去,终端设备向核心交换机发送上行报文,同样需要告知位于上行转发路径上的转发交换机从哪个上行出端口将上行报文发送出去。而对于终端设备来讲,由于无法获知整个网络的拓扑,因此需要向知道网络拓扑的核心交换机请求发送上行报文的上行转发路径。
下面以图1所示的企业网为应用场景,通过具体的实施例对本申请的方法实施例的技术方案进行详细说明。
图3为本申请实施例提供的路由信息下发方法的流程图,如图3所示,该路由信息下发方法可以由图1中的核心交换机执行,该方法可以包括:
步骤101、接收终端设备发送的ARP请求。
步骤102、响应于ARP请求,为终端设备配置上行报文的上行转发路径。
本申请中要发送上行报文的终端设备向核心交换机发送ARP请求,核心交换机为终端设备配置上行转发路径,即在上行报文从终端设备到达核心交换机的转发过程中要经过哪些转发交换机,从转发交换机的哪个出端口发出去。核心交换机通过网络拓扑可发现从终端设备到核心交换机的上行转发路径,如果只有一条,那就选择这条路径,如果有多条,则从中选择一条,选择的方式包括:一种是任意选择一条,另一种是通过监控多条路径的流量,选择轻载的一条,还有一种是采用源MAC地址Hash的方式选择一条。
步骤103、根据上行转发路径生成目的MAC地址。
本申请中的目的MAC地址更倾向于是一种用于指示上行转发路径的指示信息,为了兼容现网其借用了现有的目的MAC地址的封装方式,即借目的MAC地址的格式行指示信息之实。可以理解的是,采用MAC地址来指示路径信息是其中一种实现方式,在具体实现过程中,还可以采用报文中的其它内容来指示路径信息。核心交换机根据上行转发路径生成目的MAC地址,在目的MAC地址中预先约定的字节中写入上行报文转发过程中的每个转发交换机的出端口号。示例性的,本申请中核心交换机可以根据表1的信息为终端设备B生成以下目的MAC地址:
02.E0.00.00.01.02
其中,最高位字节(02)用于表示目的MAC地址的类型,02表示该MAC地址是带有转发路径和终端设备的优先级的目的MAC地址,而最高位字节若是01可以表示该MAC地址是组播MAC地址。次高位字节(E0)用于表示终端设备B的优先级,例如,次高位字节(E0)的高位3个bit用于表示终端设备B的优先级,E0用二进制表示是11100000,高位3个bit是111,表示该目的MAC地址对应的终端设备B的优先级是7。目的MAC地址中除了转发路径,还可以包括终端设备的优先级,这样转发设备在转发终端设备的报文时可以根据优先级确定报文的发送顺序。从最低位字节开始向高位字节逐一用于表示在终端设备B的上行报文的上行转发路径上逐个转发交换机的出端口,最低位字节的02表示上行报文出了终端设备B进入接入交换机2后,接入交换机2要从出端口2发出上行报文,次低位字节的01表示上行报文从接入交换机2的出端口2到达汇聚交换机2后,汇聚交换机2要从出端口1发出上行报文即可到达核心交换机。按照示例中的目的MAC地址(02.E0.00.00.01.02),可以最多支持深度为5层的企业网络架构。需要说明的是,上述目的MAC地址是本申请实施例所采用的目的MAC地址的一个示例,在以下的实施例中涉及到的目的MAC地址和源MAC地址均可以采用该格式,但本申请并不对目的MAC地址和源MAC地址中转发路径和优先级的编制方法做限定。
步骤104、向终端设备发送ARP响应,该ARP响应包括目的MAC地址。
核心交换机将该目的MAC地址通过地址解析协议(Address Resolution Protocol,ARP)响应发送给终端设备,终端设备将目的MAC地址写入本地保存的ARP表,如此一来每个终端设备都可以获知核心交换机给自己配置的上行报文的上行转发路径。本申请中终端设备向核心交换机发送ARP请求,核心交换机将目的MAC地址通过ARP响应发送给终端设备,可以完全继承现有以太协议。
本申请通过将路由信息写入目的MAC地址中,并与现有ARP结合,实现路由信息的下发,可以降低成本、提高效率且简化网络流量。
图4为本申请实施例提供的路由信息获取方法的流程图,如图4所示,该路由信息获取方法可以由图1中的终端设备(A或B)执行,本实施例中的技术方案与图3所示方法实施例中的技术方案相对应,核心交换机和终端设备通过信息交互实现路由信息的下发。本实施例的方法可以包括:
步骤201、向核心交换机发送ARP请求。
ARP请求用于触发核心交换机配置由终端设备发送的上行报文的上行转发路径,并根据上行转发路径生成目的MAC地址,目的MAC地址用于指示上行转发路径。
步骤202、接收核心交换机发送的ARP响应,ARP响应包括目的MAC地址。
本申请中终端设备向核心交换机发送ARP请求,核心交换机将目的MAC地址通过ARP响应发送个终端设备,可以完全继承现有以太协议。
步骤203、将目的MAC地址存入本地保存的ARP表。
终端设备本地维护有ARP表,终端设备从ARP响应中解析出目的MAC地址,然后将其添加到ARP表中。
本申请通过将路由信息写入目的MAC地址中,并与现有ARP结合,实现路由信息的下发,可以降低成本、提高效率且简化网络流量。
在图3和图4所示方法实施例的基础上,图5为本申请实施例提供的路由信息交互方法的流程图,如图5所示,本实施例的方法可以包括:
步骤301、终端设备B向核心交换机发送ARP请求。
终端设备B发送ARP请求,该ARP请求可以借由转发交换机转发给核心交换机,也可以借由其他网络节点或通信链路转发给核心交换机,若是由转发交换机转发,则转发交换机可以任选一个上行出端口发出ARP请求。
步骤302、核心交换机为终端设备B配置上行报文的上行转发路径并确定终端设备B的优先级,根据上行转发路径和优先级生成目的MAC地址。
基于表1,核心交换机为终端设备B配置的上行转发路径是X4.2→X2.1,根据该上行转发路径,以及流表中终端设备B的优先级7生成目的MAC地址02.E0.00.00.01.02。
步骤303、核心交换机向终端设备B发送ARP响应,该ARP响应包括目的MAC地址。
核心交换机向终端设备B发送ARP响应,其中携带了目的MAC地址02.E0.00.00.01.02,还可以携带核心交换机的IP地址10.10.20.1。同样的,该ARP响应可以借由转发交换机转发给终端设备,也可以借由其他网络节点或通信链路转发给终端设备,若是由转发交换机转发,则转发交换机可以任选一个下行出端口发出ARP响应。
步骤304、终端设备B将目的MAC地址存入本地保存的ARP表。
终端设备B接收到ARP响应后,从中解析出目的MAC地址和网关IP地址,然后将其添加到ARP表中。
本实施例,通过将路由信息写入目的MAC地址中,并与现有ARP结合,实现路由信息的下发,可以降低成本、提高效率且简化网络流量。
在图3和图4所示方法实施例的基础上,图6为本申请实施例提供的另一个路由信息交互方法的流程图,如图6所示,本实施例的方法可以包括:
步骤401、核心交换机根据网络拓扑和网络流量判断是否需要切换终端设备B的上行转发路径。
核心交换机控制了整网流量转发,结合网络拓扑,可以获知每条报文的转发路径和每条路径的流量,核心交换机据此判断是否需要切换终端设备B的上行转发路径(即是否需要对终端设备B的上行转发路径重定向),以此实现终端设备B的上行负载均衡。
表2
Figure PCTCN2019112793-appb-000002
Figure PCTCN2019112793-appb-000003
表3
路径编号 转发路径 转发路径类型 流量
1 X3.1→X1.1 上行 10Mbps
2 X4.1→X1.1 上行 10Mbps
3 X4.2→X2.1 上行 43Mbps
4 Root.4→X1.4 下行 5Mbps
5 Root.4→X1.7 下行 5Mbps
6 Root.5→X2.8 下行 28Mbps
表2是本申请路由信息的下发方法实施例二的切换上行转发路径之前的流表,表3是本申请路由信息的下发方法实施例二的切换上行转发路径之前的流量表。如表2和表3所示,终端设备B原本配置的上行转发路径X4.2→X2.1流量达到了43Mbps,而另一条上行转发路径X4.1→X1.1的流量才10Mbps,因此核心交换机判断终端设备B需要切换上行转发路径。
步骤402、若需要切换终端设备B的上行转发路径,则核心交换机根据网络拓扑和网络流量为终端设备B配置新的上行转发路径,并根据新的上行转发路径生成新的目的MAC地址。
表4
Figure PCTCN2019112793-appb-000004
表4是本申请路由信息的下发方法实施例二的切换上行转发路径之后的流表,如表4所示,核心交换机为终端设备B配置的新的上行转发路径是X4.1→X1.1。核心交换机根据新的上行转发路径生成新的目的MAC地址02.E0.00.00.01.01。
步骤403、核心交换机向终端设备B发送免费ARP,该免费ARP包括新的目的MAC地址。
核心交换机向终端设备B发送免费ARP,其中携带了新的目的MAC地址02.E0.00.00.01.01,还可以携带核心交换机的IP地址10.10.20.1。同样的,该免费ARP可以借由转发交换机转发给终端设备,也可以借由其他网络节点或通信链路转发给终端设备,若是由转发交换机转发,则转发交换机任选一个下行出端口发出免费ARP。
步骤404、终端设备B将新的目的MAC地址更新在ARP表中。
终端设备B接收到免费ARP后,从中解析出目的MAC地址和网关IP地址,然后更新ARP表的对应表项。
表5
路径编号 转发路径 转发路径类型 流量
1 X3.1→X1.1 上行 10Mbps
2 X4.1→X1.1 上行 25Mbps
3 X4.2→X2.1 上行 28Mbps
4 Root.4→X1.4 下行 5Mbps
5 Root.4→X1.7 下行 5Mbps
6 Root.5→X2.8 下行 28Mbps
表5是本申请路由信息的下发方法实施例二的切换上行转发路径之后的流量表,如表5所示,终端设备B切换为新的上行转发路径后,终端设备B的两条上行转发路径的流量均发生了变化,上行转发路径X4.2→X2.1流量降到28Mbps,上行转发路径X4.1→X1.1的流量升至25Mbps,达到了两条上行转发路径的负载均衡的目的。
本实施例,通过将路由信息写入目的MAC地址中,并与现有ARP结合,实现终端设备的上行转发路径重定向。
在图3和图4所示方法实施例的基础上,图7为本申请实施例提供的优先级变更方法的流程图,如图7所示,本实施例的方法可以包括:
步骤501、核心交换机判断是否需要变更终端设备B的优先级。
核心交换机可以根据业务需求实现对用户服务等级的修改,即变更终端设备的优先级,以提供更优化的服务。
步骤502、若需要变更终端设备B的优先级,则确定终端设备B的新的优先级,并根据新的优先级生成新的目的MAC地址。
终端设备B原本的优先级是7,现需要将其优先级变更为0,核心交换机刷新终端设备B的流表表项,将优先级字段从7变为0,并生成新的目的MAC地址02.00.00.00.01.02。
表6
Figure PCTCN2019112793-appb-000005
表6是本申请优先级变更方法实施例的变更优先级之后的流表,如表6所示,终端设备B的优先级从表1中的7变更为了0。
步骤503、核心交换机向终端设备B发送免费ARP,该免费ARP包括新的目的MAC地址。
核心交换机向终端设备B发送免费ARP,其中携带了新的目的MAC地址02.00.00.00.01.02,还可以携带核心交换机的IP地址10.10.20.1。同样的,该免费ARP可以借由转发交换机转发给终端设备,也可以借由其他网络节点或通信链路转发给终端设备,若是由转发交换机转发,则转发交换机任选一个下行出端口发出免费ARP。
步骤504、终端设备B将新的目的MAC地址更新在ARP表中。
终端设备B接收到免费ARP后,从中解析出目的MAC地址和网关IP地址,然后更新ARP表的对应表项。
本实施例,通过将优先级写入目的MAC地址中,并与现有ARP结合,实现对用户服务等级的修改。
通过上述方法实施例,核心交换机可以将上行转发路径携带于目的MAC地址中发送给终端设备,而终端设备在的到该目的MAC地址后,及时更新ARP表,并在后续将该目 的MAC地址作为上行报文转发的路由信息进行上行报文的发送。
图8为本申请实施例提供的上行报文发送方法的流程图,如图8所示,该上行报文发送方法可以由图1中的终端设备(A或B)执行,该方法可以包括:
步骤601、根据本地保存的ARP表获取目的MAC地址,目的MAC地址用于指示上行报文的上行转发路径。
终端设备要发送上行报文,先从ARP表中获取核心交换机的目的MAC地址,该目的MAC地址是上述实施例中由核心交换机配置给终端设备的,用于指示由终端设备发送的上行报文的上行转发路径。
终端设备发送上行报文时,现网中是在上行报文中封装源MAC地址和目的MAC地址,其中源MAC地址是指终端设备自己的MAC地址,而目的MAC地址是指上行报文的目的设备的MAC地址,本申请为了兼容该格式,同样在上行报文中封装目的MAC地址,区别在于该目的MAC地址是用作指示上行转发路径的目的MAC地址。
步骤602、向转发交换机发送上行报文,上行报文包括目的MAC地址。
终端设备可以将封装了目的MAC地址的上行报文通过与转发交换机的连接端口发送给转发交换机。
本实施例终端设备在上行报文中携带了指示上行转发路径的目的MAC地址,使得转发交换机可以根据目的MAC地址实现上行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
图9为本申请实施例提供的上行报文转发方法的流程图,如图9所示,该上行报文发送方法可以由图1中的转发交换机(汇聚交换机1、汇聚交换机2、接入交换机1以及接入交换机2)执行,本实施例中的技术方案与图8所示方法实施例中的技术方案相对应,终端设备和转发交换机通过信息交互实现上行报文的发送和转发。本实施例的方法可以包括:
步骤701、接收终端设备发送的上行报文,上行报文包括目的MAC地址,目的MAC地址用于指示上行报文的上行转发路径。
步骤702、根据目的MAC地址确定上行报文对应的出端口。
转发交换机接收到上行报文后,直接从上行报文中解析出目的MAC地址,从最低位字节开始向高位字节查找非零字节,此时第一个非零字节中的数值所指示的出端口表示下一跳的出端口,然后转发交换机将用于表示出端口的bit位置零。如上所述,转发交换机在从最低位字节开始向高位字节查找非零字节后,可以根据表示出端口的bit数,将相应的bit位置零,例如,出端口由6个bit表示,那么转发交换机就要置零6个bit位,出端口由2个字节(16个bit)表示,那么转发交换机就要置零16个bit位,本申请对表示出端口的bit数不做具体限定。
步骤703、通过出端口发送上行报文。
转发交换机可以将上行报文放入与发出该上行报文的终端设备的优先级对应的转发队列中,当到达该上行报文的发送顺序时将其从下一跳的出端口发送出去。
本实施例终端设备在上行报文中携带了指示上行转发路径的目的MAC地址,转发交换机可以根据目的MAC地址实现上行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
在图8和图9所示方法实施例的基础上,图10为本申请实施例提供的上行报文发送和转发方法的流程图,如图10所示,本实施例的方法可以包括:
步骤801、终端设备B根据ARP表获取上行报文对应的目的MAC地址。
终端设备B要发送上行报文,先从ARP表中获取网关(核心交换机)的目的MAC地址02.E0.00.00.01.02,将其封装于上行报文中。
步骤802、终端设备B向接入交换机2发送上行报文。
终端设备B将封装了目的MAC地址的上行报文通过与接入交换机2的连接端口发送给接入交换机。
步骤803、接入交换机2从目的MAC地址获取上行报文对应的出端口2和优先级7。
接入交换机2接收到上行报文后,直接从上行报文中解析出目的MAC地址02.E0.00.00.01.02,从最低位字节开始向高位字节查找非零字节,此时第一个非零字节中的数值表示下一跳的出端口是2,接入交换机2确定出端口2后将第一个非零字节(最低位字节)清零。接入交换机2还从次高位字节的最高位3个bit中解析出终端设备B的优先级是7,因此接入交换机2将上行报文放入优先级为7的转发队列中,当到达该上行报文的顺序时将其从出端口2上发送出去。
步骤804、接入交换机2将上行报文从出端口2发送给汇聚交换机2。
步骤805、汇聚交换机2从目的MAC地址获取上行报文对应的出端口1和优先级7。
上行报文到达汇聚交换机2后,汇聚交换机2的处理与接入交换机2类似,即直接从上行报文中解析出目的MAC地址02.E0.00.00.01.00,从最低位字节开始向高位字节查找非零字节,此时第一个非零字节是次低位字节,次低位字节中的数值表示下一跳的出端口是1,汇聚交换机2确定出端口1后将第一个非零字节(次低位字节)清零。汇聚交换机2还从次高位字节的最高位3个bit中解析出终端设备B的优先级是7,因此汇聚交换机将上行报文放入优先级为7的转发队列中,当到达该上行报文的顺序时将其从出端口1上发送出去。
步骤806、汇聚交换机2将上行报文从出端口1发送给核心交换机。
本实施例终端设备在上行报文中携带了指示上行转发路径的目的MAC地址,转发交换机可以根据目的MAC地址实现上行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
图11为本申请实施例提供的下行报文发送方法的流程图,如图11所示,该下行报文发送方法由图1中的核心交换机执行,该方法可以包括:
步骤901、为终端设备配置下行报文的下行转发路径。
核心交换机要向终端设备发送下行报文,先要确定发送给该终端设备的下行报文的下行转发路径,核心交换机可以根据表1中的Active标识配置终端设备的下行转发路径。
步骤902、根据下行转发路径生成源MAC地址,源MAC地址用于指示下行转发路径。
核心交换机发送下行报文时,现网中是在下行报文中封装源MAC地址和目的MAC地址,其中源MAC地址是指核心交换机自己的MAC地址,而目的MAC地址是指下行报文的目的设备的MAC地址,本申请为了兼容该格式,同样在上行报文中封装源MAC地址,区别在于该源MAC地址是用作指示下行转发路径的源MAC地址。
步骤903、向转发交换机发送下行报文,下行报文包括源MAC地址。
核心交换机将封装了源MAC地址的下行报文通过与转发交换机的连接端口发送给转发交换机。
本实施例核心交换机在下行报文中携带了指示下行转发路径的源MAC地址,使得转发交换机可以根据源MAC地址实现下行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
图12为本申请实施例提供的下行报文转发方法的流程图,如图12所示,该下行报文发送方法可以由图1中的转发交换机(汇聚交换机1、汇聚交换机2、接入交换机1以及接入交换机2)执行,本实施例中的技术方案与图11所示方法实施例中的技术方案相对应,核心交换机和转发交换机通过信息交互实现下行报文的发送和转发。本实施例的方法可以包括:
步骤1001、接收核心交换机发送的下行报文,下行报文包括源MAC地址,源MAC地址用于指示下行报文的下行转发路径。
步骤1002、根据源MAC地址确定下行报文对应的出端口。
转发交换机接收到下行报文后,直接从下行报文中解析出源MAC地址,从最低位字节开始向高位字节查找非零字节,此时第一个非零字节中的数值所指示的出端口表示下一跳的出端口,然后转发交换机将用于表示出端口的bit位置零。
步骤1003、通过出端口发送下行报文。
转发交换机可以将下行报文放入与发出该下行报文的终端设备的优先级对应的转发队列中,当到达该下行报文的发送顺序时将其从下一跳的出端口发送出去。
本实施例核心交换机在下行报文中携带了指示下行转发路径的源MAC地址,转发交换机可以根据源MAC地址实现下行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
在图11和图12所示方法实施例的基础上,图13为本申请实施例提供的下行报文发送和转发方法的流程图,如图13所示,本实施例的方法可以包括:
步骤1101、核心交换机为终端设备B配置下行转发路径,根据下行转发路径生成源MAC地址。
核心交换机要向终端设备B发送下行报文,先要确定下行转发路径,根据表1中的Active标识的下行转发路径生成源MAC地址02.E0.00.00.06.08,将其作封装在下行报文中。
步骤1102、核心交换机向汇聚交换机2发送下行报文。
核心交换机从下行转发路径的Root出端口向汇聚交换机2发送下行报文。
步骤1103、汇聚交换机2从源MAC地址获取下行报文对应的出端口8和优先级7。
下行报文到达汇聚交换机2后,汇聚交换机2直接从下行报文中解析出源MAC地址02.E0.00.00.06.08,从最低位字节开始向高位字节查找非零字节,此时第一个非零字节是最低位字节,最低位字节中的数值表示下一跳的出端口是8,汇聚交换机2确定出端口8后将第一个非零字节(最低位字节)清零。汇聚交换机2还从次高位字节的最高位3个bit中解析出终端设备B的优先级是7,因此汇聚交换机2将下行报文放入优先级为7的转发队列中,当到达该下行报文的顺序时将其从出端口8上发送出去。
步骤1104、汇聚交换机2将下行报文从出端口8发送给接入交换机2。
步骤1105、接入交换机2从源MAC地址获取下行报文对应的出端口6和优先级7。
下行报文到达接入交换机2后,接入交换机2的处理与汇聚交换机2类似,即直接从下行报文中解析出源MAC地址02.E0.00.00.06.00,从最低位字节开始向高位字节查找非零字节,此时第一个非零字节是次低位字节,次低位字节中的数值表示下一跳的出端口是6,接入交换机确定出端口6后将第一个非零字节(次低位字节)清零。接入交换机2还从次高位字节的最高位3个bit中解析出终端设备B的优先级是7,因此接入交换机2将下行报文放入优先级为7的转发队列中,当到达该下行报文的顺序时将其从出端口6上发送出去。
步骤1106、接入交换机2将下行报文从出端口6发送给终端设备B。
本实施例终端设备在下行报文中携带了指示下行转发路径的源MAC地址,转发交换机可以根据源MAC地址实现下行报文的转发,转发过程中无需标签,无需存表项,可以降低成本、提高效率且简化网络流量。
与上行的情况类似,核心交换机同样可以对终端设备的下行转发路径进行重定向,但与上行的区别在于,上行需要核心交换机在重新配置了终端设备的上行转发路径后发送免费ARP携带上新的目的MAC地址给终端设备。但下行不需要专门告知终端设备,核心交换机在发送下行报文时直接将根据切换后的下行转发路径生成的源MAC地址封装在下行报文中,这样下行报文在转发的过程中,沿途的转发交换机从下行报文中解析出源MAC地址即可知道下一跳的出端口是哪一个。
图14为本申请实施例提供的路由信息下发装置的结构示意图,如图14所示,本实施例的装置可以包括:接收模块11、配置模块12、生成模块13和发送模块14。其中,接收模块11,用于接收终端设备发送的ARP请求;配置模块12,用于响应于ARP请求,为终端设备配置上行报文的上行转发路径;生成模块13,用于根据上行转发路径生成目的MAC地址,目的MAC地址用于指示上行转发路径;发送模块14,用于向终端设备发送ARP响应,ARP响应包括目的MAC地址。
在一种可能的实现方式中,配置模块12,还用于确定终端设备的优先级;地址生成模块,还用于根据上行转发路径和优先级生成目的MAC地址。
在一种可能的实现方式中,配置模块12,还用于根据网络拓扑和网络流量判断是否需要切换终端设备的上行转发路径的终端设备;若需要切换终端设备的上行转发路径,则根据网络拓扑和网络流量为终端设备配置新的上行转发路径;根据新的上行转发路径生成新的目的MAC地址。
在一种可能的实现方式中,配置模块12,还用于判断是否需要变更终端设备的优先级;若需要变更终端设备的优先级,则确定终端设备的新的优先级;根据新的优先级生成新的目的MAC地址。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
在一种可能的实现方式中,发送模块14,还用于向终端设备发送免费ARP,免费ARP包括新的目的MAC地址。
本实施例的装置,可以用于执行图3、图5、图6或图7所示方法实施例的相关技术方案,其实现原理和技术效果类似,此处不再赘述。
图15为本申请实施例提供的路由信息获取装置的结构示意图,如图15所示,本实施例的装置可以包括:发送模块21、接收模块22和存储模块23。其中,发送模块21,用于向核心交换机发送ARP请求,ARP请求用于触发核心交换机配置上行报文的上行转发路径,并根据上行转发路径生成目的MAC地址,目的MAC地址用于指示上行转发路径;接收模块22,用于接收核心交换机发送的ARP响应,ARP响应包括目的MAC地址;存储模块23,用于将目的MAC地址存入本地保存的ARP表。
在一种可能的实现方式中,目的MAC地址还用于指示终端设备的优先级。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
在一种可能的实现方式中,接收模块22,还用于接收核心交换机发送的免费ARP,免费ARP包括新的目的MAC地址,新的目的MAC地址包括新的上行转发路径和/或新的优先级;存储模块,还用于根据新的目的MAC地址更新ARP表。
本实施例的装置,可以用于执行图4、图5、图6或图7所示方法实施例的相关技术方案,其实现原理和技术效果类似,此处不再赘述。
图16为本申请实施例提供的上行报文发送装置的结构示意图,如图16所示,本实施例的装置可以包括:获取模块31和发送模块32。其中,获取模块31,用于根据本地保存的ARP表获取目的MAC地址,目的MAC地址用于指示上行报文的上行转发路径;发送模块32,用于向转发交换机发送上行报文,上行报文包括目的MAC地址。
在一种可能的实现方式中,目的MAC地址还用于指示终端设备的优先级。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
本实施例的装置,可以用于执行图8或图10所示方法实施例的相关技术方案,其实现原理和技术效果类似,此处不再赘述。
图17为本申请实施例提供的上行报文转发装置的结构示意图,如图17所示,本实施例的装置可以包括:接收模块41、确定模块42和发送模块43。其中,接收模块41,用于接收终端设备发送的上行报文,上行报文包括目的MAC地址,目的MAC地址用于指示上行报文的上行转发路径;确定模块42,用于根据目的MAC地址确定上行报文对应的出端口;发送模块43,用于通过出端口发送上行报文。
在一种可能的实现方式中,目的MAC地址还用于指示终端设备的优先级;发送模块43,具体用于将上行报文放入与优先级对应的转发队列中,并在到达上行报文的发送顺序时通过出端口发送上行报文。
在一种可能的实现方式中,确定模块42,还用于将目的MAC地址中用于表示出端口的bit位置零。
在一种可能的实现方式中,确定模块42,具体用于从目的MAC地址的最低位字节开始向高位字节查找非零字节,将第一个非零字节的数值所指示的出端口作为出端口。
在一种可能的实现方式中,目的MAC地址中的最高位字节用于表示目的MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在上行报文的上行转发路径上逐个转发交换机的出端口。
本实施例的装置,可以用于执行图9或图10所示方法实施例的相关技术方案,其实现原理和技术效果类似,此处不再赘述。
图18为本申请实施例提供的下行报文发送装置的结构示意图,如图18所示,本实施例的装置可以包括:配置模块51、生成模块52和发送模块53。其中,配置模块51,用于为终端设备配置发送给终端设备的下行报文的下行转发路径;生成模块52,用于根据下行转发路径生成源MAC地址,源MAC地址用于指示下行转发路径;发送模块53,用于向转发交换机发送下行报文,下行报文包括源MAC地址。
在一种可能的实现方式中,配置模块51,还用于确定终端设备的优先级;生成模块52,还用于根据下行转发路径和优先级生成源MAC地址。
在一种可能的实现方式中,配置模块51,还用于根据网络拓扑和网络流量判断是否需要切换终端设备的下行转发路径和/或需要变更终端设备的优先级;若需要切换终端设备的下行转发路径和/或需要变更终端设备的优先级,则根据网络拓扑和网络流量为终端设备配置新的下行转发路径和/或新的优先级;生成模块52,还用于根据新的下行转发路径和/或新的优先级生成新的源MAC地址。
在一种可能的实现方式中,源MAC地址中的最高位字节用于表示源MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在下行报文的下行转发路径上逐个转发交换机的出端口。
本实施例的装置,可以用于执行图11或图13所示方法实施例的相关技术方案,其实现原理和技术效果类似,此处不再赘述。
图19为本申请实施例提供的下行报文转发装置的结构示意图,如图19所示,本实施例的装置可以包括:接收模块61、确定模块62和发送模块63。其中,接收模块61,用于接收核心交换机发送的发送给终端设备的下行报文,下行报文包括源MAC地址,源MAC地址用于指示下行报文的下行转发路径;确定模块62,用于根据源MAC地址确定下行报文对应的出端口;发送模块63,用于通过出端口发送下行报文。
在一种可能的实现方式中,源MAC地址还用于指示终端设备的优先级;发送模块63,具体用于将下行报文放入与优先级对应的转发队列中,并在到达下行报文的发送顺序时通过出端口发送下行报文。
在一种可能的实现方式中,确定模块62,还用于将源MAC地址中用于表示出端口的bit位置零。
在一种可能的实现方式中,确定模块62,具体用于从源MAC地址的最低位字节开始向高位字节查找非零字节,将第一个非零字节的数值所指示的出端口作为出端口。
在一种可能的实现方式中,源MAC地址中的最高位字节用于表示源MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在下行报文的下行转发路径上逐个转发交换机的出端口。
本实施例的装置,可以用于执行图12或图13所示方法实施例的相关技术方案,其实现原理和技术效果类似,此处不再赘述。
图20为本申请实施例提供的设备的结构示意图,如图20所示,该设备包括处理器70、存储器71、通信接口72;设备中处理器70的数量可以是一个或多个,图20中以一个处理器70为例;设备中的处理器70、存储器71和通信接口72可以通过总线或其他方式连接,图20中以通过总线连接为例。
存储器71作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的方法对应的程序指令/模块。处理器70通过运行存储在存储器71中的软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述的方法。
存储器71可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器71可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器71可进一步包括相对于处理器70远程设置的存储器,这些远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
通信接口72可用于接收或发送数据,以及产生与设备的用户设置以及功能控制有关的信号输入输出。
在一种可能的实现方式中,所述设备可以是核心交换机;
在一种可能的实现方式中,所述设备可以是汇聚交换机或接入交换机;
在一种可能的实现方式中,所述设备可以是终端设备,例如可以是用户设备。
一种可能的实现方式中,本申请提供一种计算机可读存储介质,该计算机可读存储介质存储有指令,当其在计算机上运行时,用于执行图3-图13中任一所示方法实施例的技术方案。
一种可能的实现方式中,本申请提供一种包括指令的计算机程序产品,当其在计算机上运行时,用于执行图3-图13中任一所示方法实施例的技术方案。
可以理解的是,上述实施例可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行 等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (18)

  1. 一种下行报文的发送方法,其特征在于,包括:
    为终端设备配置下行报文的下行转发路径;
    根据所述下行转发路径生成源MAC地址,所述源MAC地址用于指示所述下行转发路径;
    向转发交换机发送下行报文,所述下行报文包括所述源MAC地址。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述下行转发路径生成源MAC地址之前,还包括:
    确定所述终端设备的优先级;
    所述根据所述下行转发路径生成源MAC地址,包括:
    根据所述下行转发路径和所述优先级生成所述源MAC地址。
  3. 根据权利要求1或2所述的方法,其特征在于,所述向转发交换机发送下行报文之后,还包括:
    根据所述网络拓扑和所述网络流量判断是否需要切换所述终端设备的下行转发路径和/或需要变更所述终端设备的优先级;
    若需要切换所述终端设备的下行转发路径和/或需要变更所述终端设备的优先级,则根据所述网络拓扑和所述网络流量为所述终端设备配置新的下行转发路径和/或新的优先级;
    根据所述新的下行转发路径和/或所述新的优先级生成新的源MAC地址。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述源MAC地址中的最高位字节用于表示所述源MAC地址的类型,次高位字节用于表示所述终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在所述下行报文的下行转发路径上逐个转发交换机的出端口。
  5. 一种下行报文的转发方法,其特征在于,包括:
    接收核心交换机发送的下行报文,所述下行报文包括源MAC地址,所述源MAC地址用于指示所述下行报文的下行转发路径;
    根据所述源MAC地址确定所述下行报文对应的出端口;
    通过所述出端口发送所述下行报文。
  6. 根据权利要求5所述的方法,其特征在于,所述源MAC地址还用于指示所述终端设备的优先级;
    所述通过所述出端口发送所述下行报文,包括:
    将所述下行报文放入与所述优先级对应的转发队列中,并在到达所述下行报文的发送顺序时通过所述出端口发送所述下行报文。
  7. 根据权利要求5或6所述的方法,其特征在于,所述根据所述源MAC地址确定所述下行报文对应的出端口之后,还包括:
    将所述源MAC地址中用于表示所述出端口的bit位置零。
  8. 根据权利要求5-7中任一项所述的方法,其特征在于,所述根据所述源MAC地址确定所述下行报文对应的出端口,包括:
    从所述源MAC地址的最低位字节开始向高位字节查找非零字节,将第一个非零字节的数值所指示的出端口作为所述出端口。
  9. 根据权利要求5-8中任一项所述的方法,其特征在于,所述源MAC地址中的最高位字节用于表示所述源MAC地址的类型,次高位字节用于表示所述终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在所述下行报文的下行转发路径上逐个转发交换机的出端口。
  10. 一种下行报文的发送装置,其特征在于,包括:
    配置模块,用于为终端设备配置下行报文的下行转发路径;
    生成模块,用于根据所述下行转发路径生成源MAC地址,所述源MAC地址用于指示所述下行转发路径;
    发送模块,用于向转发交换机发送下行报文,所述下行报文包括所述源MAC地址。
  11. 根据权利要求10所述的装置,其特征在于,所述配置模块,还用于确定所述终端设备的优先级;
    所述生成模块,还用于根据所述下行转发路径和所述优先级生成所述源MAC地址。
  12. 根据权利要求10或11所述的装置,其特征在于,所述配置模块,还用于根据所述网络拓扑和所述网络流量判断是否需要切换所述终端设备的下行转发路径和/或需要变更所述终端设备的优先级;若需要切换所述终端设备的下行转发路径和/或需要变更所述终端设备的优先级,则根据所述网络拓扑和所述网络流量为所述终端设备配置新的下行转发路径和/或新的优先级;
    所述生成模块,还用于根据所述新的下行转发路径和/或所述新的优先级生成新的源MAC地址。
  13. 根据权利要求10-12中任一项所述的装置,其特征在于,所述源MAC地址中的最高位字节用于表示所述源MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在所述下行报文的下行转发路径上逐个转发交换机的出端口。
  14. 一种下行报文的转发装置,其特征在于,包括:
    接收模块,用于接收核心交换机发送的下行报文,所述下行报文包括源MAC地址,所述源MAC地址用于指示所述下行报文的下行转发路径;
    确定模块,用于根据所述源MAC地址确定所述下行报文对应的出端口;
    发送模块,用于通过所述出端口发送所述下行报文。
  15. 根据权利要求14所述的装置,其特征在于,所述源MAC地址还用于指示所述终端设备的优先级;
    所述发送模块,具体用于将所述下行报文放入与所述优先级对应的转发队列中,并在到达所述下行报文的发送顺序时通过所述出端口发送所述下行报文。
  16. 根据权利要求14或15所述的装置,其特征在于,所述确定模块,还用于将所述源MAC地址中用于表示所述出端口的bit位置零。
  17. 根据权利要求14-16中任一项所述的装置,其特征在于,所述确定模块,具体用于从所述源MAC地址的最低位字节开始向高位字节查找非零字节,将第一个非零字节的数值所指示的出端口作为所述出端口。
  18. 根据权利要求14-17中任一项所述的装置,其特征在于,所述源MAC地址中的最高位字节用于表示所述源MAC地址的类型,次高位字节用于表示终端设备的优先级,从最低位字节开始向高位字节逐一用于表示在所述下行报文的下行转发路径上逐个转发交换机的出端口。
PCT/CN2019/112793 2018-11-05 2019-10-23 下行报文发送、转发方法和装置 WO2020093871A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19882510.1A EP3734917B1 (en) 2018-11-05 2019-10-23 Downlink message sending method and apparatus and downlink message forwarding method and apparatus
US16/991,775 US11388089B2 (en) 2018-11-05 2020-08-12 Downstream packet sending and forwarding method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811308475.1 2018-11-05
CN201811308475.1A CN111147372B (zh) 2018-11-05 2018-11-05 下行报文发送、转发方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/991,775 Continuation US11388089B2 (en) 2018-11-05 2020-08-12 Downstream packet sending and forwarding method and apparatus

Publications (1)

Publication Number Publication Date
WO2020093871A1 true WO2020093871A1 (zh) 2020-05-14

Family

ID=70516369

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/112793 WO2020093871A1 (zh) 2018-11-05 2019-10-23 下行报文发送、转发方法和装置

Country Status (4)

Country Link
US (1) US11388089B2 (zh)
EP (1) EP3734917B1 (zh)
CN (1) CN111147372B (zh)
WO (1) WO2020093871A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11012442B2 (en) * 2019-04-11 2021-05-18 Schweitzer Engineering Laboratories, Inc. Address resolution protocol response handling
CN111343088B (zh) * 2020-02-21 2021-01-29 清华大学 一种报文传输方法及装置、终端、存储介质
CN113765807B (zh) * 2020-09-29 2022-12-27 北京京东尚科信息技术有限公司 网络流量可视化的方法、装置、系统、及介质
CN112383453B (zh) * 2021-01-15 2021-04-20 北京搜狐新媒体信息技术有限公司 一种数据处理方法及系统
CN114244743B (zh) * 2021-12-10 2022-10-21 北京天融信网络安全技术有限公司 一种资源池的数据包传输方法、装置、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014000286A1 (zh) * 2012-06-29 2014-01-03 华为技术有限公司 网关系统、设备和通信方法
WO2015113290A1 (zh) * 2014-01-29 2015-08-06 华为技术有限公司 下行数据处理方法及装置、系统
US20170126815A1 (en) * 2015-11-03 2017-05-04 Electronics And Telecommunications Research Institute System and method for chaining virtualized network functions
CN106937408A (zh) * 2015-12-31 2017-07-07 上海贝尔股份有限公司 一种LTE网络的会话管理方法、基站及OpenFlow控制器

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6791947B2 (en) * 1996-12-16 2004-09-14 Juniper Networks In-line packet processing
ATE354227T1 (de) * 2000-06-19 2007-03-15 Broadcom Corp Vermittlungsstelle mit einer speicherverwaltungeinheit zur verbesserung der flusssteurung
CN101102264B (zh) * 2006-07-04 2011-07-20 华为技术有限公司 一种以太网转发数据的方法和一种以太网系统
US8264953B2 (en) * 2007-09-06 2012-09-11 Harris Stratex Networks, Inc. Resilient data communications with physical layer link aggregation, extended failure detection and load balancing
CN102255805B (zh) * 2011-07-06 2015-03-25 华为技术有限公司 发送报文的方法、转发报文的方法及装置
CN104158749A (zh) * 2013-05-14 2014-11-19 华为技术有限公司 软件定义网络中报文转发方法、网络设备及软件定义网络
CN104579942B (zh) * 2013-10-17 2019-04-16 中兴通讯股份有限公司 网络报文的转发方法及装置
CN103546380B (zh) * 2013-11-05 2016-08-17 迈普通信技术股份有限公司 一种基于策略路由的报文转发方法和装置
WO2015147780A1 (en) * 2014-03-24 2015-10-01 Hewlett-Packard Development Company, L.P. Client-based port filter table
CN104394083B (zh) * 2014-09-22 2017-12-15 华为技术有限公司 转发表项处理的方法、报文转发的方法及其装置和系统
US10187218B2 (en) * 2015-09-15 2019-01-22 Google Llc Systems and methods for processing packets in a computer network
CN107171977B (zh) * 2016-03-08 2021-08-17 中兴通讯股份有限公司 报文转发方法及装置
CN107181681B (zh) * 2016-03-10 2022-02-25 中兴通讯股份有限公司 Sdn二层转发方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014000286A1 (zh) * 2012-06-29 2014-01-03 华为技术有限公司 网关系统、设备和通信方法
WO2015113290A1 (zh) * 2014-01-29 2015-08-06 华为技术有限公司 下行数据处理方法及装置、系统
US20170126815A1 (en) * 2015-11-03 2017-05-04 Electronics And Telecommunications Research Institute System and method for chaining virtualized network functions
CN106937408A (zh) * 2015-12-31 2017-07-07 上海贝尔股份有限公司 一种LTE网络的会话管理方法、基站及OpenFlow控制器

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP3734917A4 (en) 2021-04-14
CN111147372A (zh) 2020-05-12
CN111147372B (zh) 2021-05-18
EP3734917A1 (en) 2020-11-04
EP3734917B1 (en) 2023-12-06
US20200374220A1 (en) 2020-11-26
US11388089B2 (en) 2022-07-12

Similar Documents

Publication Publication Date Title
US11621869B2 (en) Enabling access to dedicated resources in a virtual network using top of rack switches
WO2020093871A1 (zh) 下行报文发送、转发方法和装置
KR102113749B1 (ko) 소스 라우팅에 근거한 별개의 인피니밴드 서브넷들 간에 트래픽을 라우팅하기 위한 시스템 및 방법
US9270618B2 (en) Source routing with fabric switches in an ethernet fabric network
US9614759B2 (en) Systems and methods for providing anycast MAC addressing in an information handling system
US9118687B2 (en) Methods and apparatus for a scalable network with efficient link utilization
US9504016B2 (en) Optimized multicast routing in a Clos-like network
CN107113241B (zh) 路由确定方法、网络配置方法以及相关装置
EP3588875B1 (en) Web services across virtual routing and forwarding
WO2015039617A1 (zh) 一种报文处理方法、系统及设备
US9948482B2 (en) Apparatus and method for enabling flexible key in a network switch
TWI759571B (zh) 基於流表的資料傳送方法
CN106790146A (zh) 一种云环境下基于sdn技术实现移动组播的系统及其运行方法
JP7298606B2 (ja) 通信システム及び通信方法
WO2017008514A1 (zh) Clos网络中负载均衡的方法及装置
Awobuluyi Periodic control update overheads in OpenFlow-based enterprise networks
US10848414B1 (en) Methods and apparatus for a scalable network with efficient link utilization
WO2023019874A1 (zh) 分布式业务转发方法、装置、系统、存储介质及电子设备
KR102023901B1 (ko) 소프트웨어 정의 네트워크에서 패킷의 경로를 설정하는 방법, 장치 및 컴퓨터 프로그램
WO2012155351A1 (zh) 一种生成隧道转发表项的方法和网络设备
WO2023050818A1 (zh) 数据转发方法、系统、电子设备和存储介质
Shi et al. HiTrans: An FPGA-Based Gateway Design and Implementation in HPC Environments

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019882510

Country of ref document: EP

Effective date: 20200730

NENP Non-entry into the national phase

Ref country code: DE