CN108696460B - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN108696460B
CN108696460B CN201810531281.1A CN201810531281A CN108696460B CN 108696460 B CN108696460 B CN 108696460B CN 201810531281 A CN201810531281 A CN 201810531281A CN 108696460 B CN108696460 B CN 108696460B
Authority
CN
China
Prior art keywords
physical port
data message
attribute information
switch
master
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810531281.1A
Other languages
Chinese (zh)
Other versions
CN108696460A (en
Inventor
李大鲲
王宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810531281.1A priority Critical patent/CN108696460B/en
Publication of CN108696460A publication Critical patent/CN108696460A/en
Application granted granted Critical
Publication of CN108696460B publication Critical patent/CN108696460B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • 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/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a message forwarding method and a message forwarding device, which are applied to a switch, and the method comprises the following steps: receiving a preset protocol message sent by an AC in an IRF; the preset protocol message comprises the main/standby attribute information of the AC; if the master/slave attribute information indicates that the AC is the slave AC, selecting a physical port from physical ports except the physical port connected with the AC in the aggregation group at the switch side when receiving a first data message sent to the wireless client by the wired client; sending the first data message to the AC connected with the selected physical port; if the master/slave attribute information indicates that the AC is the master AC, selecting a physical port from physical ports connected with the AC in an aggregation group at the switch side when receiving a second data message sent to the wireless client by the wired client; the second data message is sent to the AC. By applying the embodiment of the application, the impact of the data message on the stacked link can be reduced, and the reliability of the stacked link is improved.

Description

Message forwarding method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
An IRF (Intelligent Resilient Framework) is a device formed by connecting a plurality of ACs (Access controllers) together through stacked links, and virtualizing the devices after performing necessary configuration. In the IRF, a plurality of physical ports on a switch are aggregated into an aggregation group, that is, the aggregation group includes a plurality of physical ports. The physical port is a port through which the switch sends a data message to the AC in the IRF.
The IRF-based data message processing, particularly the processing process of the data message sent from the wired side to the wireless side, comprises the following steps: the wired client sends a data message to the wireless client; the switch carries out load sharing after receiving the data message, selects one physical port from a plurality of physical ports of the aggregation group, and sends the data message to the AC in the IRF through the selected physical port; and the AC in the IRF processes the data message and forwards the data message to the wireless client.
If the IRF includes two ACs, the two ACs include a main AC and a standby AC. When processing a data message sent from a wired side to a wireless side, the switch performs load sharing and selects one physical port from a plurality of physical ports of an aggregation group. The selected physical port may be connected to either a backup AC or a primary AC. If the selected physical port is connected with the standby AC, the standby AC needs to forward the data message to the main AC for processing through the stacking link. When the number of data messages sent from the wired side to the wireless side is large, the stacked link is impacted greatly, and the reliability of the stacked link is reduced.
Disclosure of Invention
An object of the embodiments of the present application is to provide a message forwarding method and apparatus, so as to reduce impact of a data message on a stacked link and improve reliability of the stacked link when the data message sent from a wired side to a wireless side is processed based on an IRF. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a packet forwarding method, which is applied to a switch, and the method includes:
receiving a preset protocol message sent by an AC in an IRF; the preset protocol message comprises the main/standby attribute information of the AC;
acquiring the master/standby attribute information from the preset protocol message;
if the master/slave attribute information indicates that the AC is the slave AC, selecting a physical port from physical ports except the physical port connected with the AC in the aggregation group of the switch side when receiving a first data message sent by a wired client to a wireless client; sending the first data message to the AC connected with the selected physical port, so that the AC connected with the selected physical port sends the first data message to the wireless client;
if the master/slave attribute information indicates that the AC is the master AC, selecting a physical port from physical ports connected with the AC in an aggregation group at the switch side when receiving a second data message sent by a wired client to a wireless client; sending the second data message to the AC to cause the AC to send the second data message to the wireless client.
In a second aspect, an embodiment of the present application provides a packet forwarding method, which is applied to an AC in an IRF, where the method includes:
determining the main/standby attribute information of the AC;
carrying the master/slave attribute information in a preset protocol message and sending the master/slave attribute information to a switch, so that the switch selects one physical port from physical ports except the physical port connected with the AC in an aggregation group at the switch side when receiving a first data message sent to a wireless client by a wired client under the condition that the master/slave attribute information indicates that the AC is the master AC, and sends the first data message to the AC connected with the selected physical port; and under the condition that the master/slave attribute information indicates that the AC is the master AC, when a second data message sent to a wireless client by a wired client is received, selecting one physical port from physical ports connected with the AC in an aggregation group at the switch side, and sending the second data message to the AC.
In a third aspect, an embodiment of the present application provides a packet forwarding apparatus, which is applied to a switch, and the apparatus includes:
the receiving module is used for receiving a preset protocol message sent by the AC in the IRF; the preset protocol message comprises the main/standby attribute information of the AC;
an obtaining module, configured to obtain the master/standby attribute information from the preset protocol packet;
a processing module, configured to select a physical port from physical ports other than a physical port connected to the AC in an aggregation group on the switch side when receiving a first data packet sent by a wired client to a wireless client if the active/standby attribute information indicates that the AC is a standby AC; sending the first data message to the AC connected with the selected physical port, so that the AC connected with the selected physical port sends the first data message to the wireless client;
the processing module is further configured to select one physical port from physical ports connected to the AC in the aggregation group on the switch side when receiving a second data packet sent by the wired client to the wireless client if the active/standby attribute information indicates that the AC is the primary AC; sending the second data message to the AC to cause the AC to send the second data message to the wireless client.
In a fourth aspect, an embodiment of the present application provides a packet forwarding apparatus, which is applied to an AC in an IRF, where the apparatus includes:
a determining module, configured to determine master/slave attribute information of the AC;
a sending module, configured to carry the primary and secondary attribute information in a preset protocol packet and send the packet to a switch, so that the switch selects a physical port from physical ports of an aggregation group on the switch side except a physical port connected to an AC when receiving a first data packet sent from a wired client to a wireless client when the primary and secondary attribute information indicates that the AC is a secondary AC, and sends the first data packet to the AC connected to the selected physical port; and under the condition that the master/slave attribute information indicates that the AC is the master AC, when a second data message sent to a wireless client by a wired client is received, selecting one physical port from physical ports connected with the AC in an aggregation group at the switch side, and sending the second data message to the AC.
In a fifth aspect, embodiments provide a switch comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the message forwarding method steps provided by the first aspect.
In a sixth aspect, embodiments of the present application provide an AC comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the message forwarding method steps provided in the second aspect.
In a seventh aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implementing any of the message forwarding method steps provided by the first aspect.
In an eighth aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implementing any of the message forwarding method steps provided in the second aspect.
In the embodiment of the application, the AC in the IRF sends a preset protocol message carrying the master/slave attribute information to the switch. And the switch selects a physical port from the aggregation group at the switch side according to the master/slave attribute information. Specifically, if the master/slave attribute information indicates that the AC is the slave AC, when the switch receives a first data packet sent to the wireless client by the wired client, one physical port is selected from physical ports other than the physical port connected to the AC in the aggregation group of the switch side, and the first data packet is sent to the AC connected to the selected physical port. If the master/slave attribute information indicates that the AC is the master AC, when a second data message sent to the wireless client by the wired client is received, selecting a physical port from physical ports connected with the AC in the aggregation group at the switch side, and sending the second data message to the AC.
Therefore, in the embodiment of the application, the switch directly sends the data message to the main AC of the IRF for processing, and when the data message sent from the wired side to the wireless side is processed based on the IRF, the impact of the data message on the stacked link is reduced, and the reliability of the stacked link is improved. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an IRF networking provided in an embodiment of the present application;
fig. 2 is a first flowchart of a message forwarding method according to an embodiment of the present application;
fig. 3 is a second flowchart of a message forwarding method according to an embodiment of the present application;
fig. 4 is a first schematic structural diagram of a packet forwarding apparatus according to an embodiment of the present application;
fig. 5 is a second schematic structural diagram of a message forwarding apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a switch provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an AC according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the IRF, a main AC is responsible for operation, management and maintenance of the IRF, and a standby AC is responsible for data backup.
The IRF networking shown in fig. 1 includes AC1, AC2, and switch 3. The AC1 is a main AC, the AC2 is a standby AC, and the physical port 4, the physical port 5, the physical port 6, and the physical port 7 perform port aggregation to obtain an aggregation group, that is, the physical port 4, the physical port 5, the physical port 6, and the physical port 7 are member ports of the aggregation group.
AC1 establishes physical links with switch 3 using physical port 4 and physical port 5, respectively. AC2 establishes physical links with switch 3 using physical port 6 and physical port 7, respectively. The above port aggregation is equivalent to link aggregation.
The client 10 is wired to the switch 3. The client 11 is wirelessly connected with the switch 3 through the AP 8. The IRF-based processing flow of the data packet sent by the client 10 to the wireless client 11 includes:
the client 10 sends a data message X1 to the switch 3. The destination address of data message X1 is client 11.
The switch 3 performs load balancing processing to select one physical port from the physical ports 4, 5, 6, and 7.
If the selected physical port is the port connected to the AC1, for example, physical port 5 is selected, the switch 3 sends the data packet X1 to the AC1 through the physical port 5. The AC1 processes the data message X1.
If the selected physical port is the port connected to the AC2, for example, physical port 7 is selected, the switch 3 sends the data packet X1 to the AC2 through the physical port 7. The AC2 sends the data message X1 to the AC1 over the stack link 9. The AC1 processes the data message X1.
Therefore, when the data messages sent from the wired side to the wireless side are processed based on the IRF, if the number of the data messages is large, a large impact is generated on the stacked link, and the reliability of the stacked link is reduced.
In order to reduce the impact of data messages on stacked links and improve the reliability of the stacked links when data messages sent from a wired side to a wireless side are processed based on an IRF, the embodiment of the present application provides a message forwarding method. In the method, if the master/slave attribute information indicates that the AC is the slave AC, when the switch receives a first data message sent to the wireless client by the wired client, one physical port is selected from physical ports except the physical port connected with the AC in the aggregation group of the switch side, and the first data message is sent to the AC connected with the selected physical port. If the master/slave attribute information indicates that the AC is the master AC, when a second data message sent to the wireless client by the wired client is received, selecting a physical port from physical ports connected with the AC in the aggregation group at the switch side, and sending the second data message to the AC.
Therefore, in the embodiment of the application, the switch directly sends the data message to the main AC for processing, and does not send the data message to the standby AC. When the data message sent from the wired side to the wireless side is processed based on the IRF, the impact of the data message on the stacked link is reduced, and the reliability of the stacked link is improved.
The present application will be described in detail with reference to specific examples.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first flow of a message forwarding method provided in an embodiment of the present application, where the method is applied to a switch and includes the following steps.
Step 201: and receiving a preset protocol message sent by the AC in the IRF. The preset protocol message includes the master/slave attribute information of the AC.
The master/slave attribute information is information indicating that the AC is a master AC, or information indicating that the AC is a slave AC.
In the embodiment of the application, after an IRF is constructed by two ACs and main ACs are selected by race, or when the AC in the IRF is subjected to main/standby switching, the AC in the IRF may acquire main/standby attribute information of the device and send a preset protocol message carrying the main/standby attribute information to the switch.
In an embodiment, the predetermined Protocol packet may be one of an LLDP (Link Layer Discovery Protocol) packet, a CDP (Cisco Discovery Protocol) packet, and an NDP (neighbor Discovery Protocol) packet.
Step 202: and acquiring the master/standby attribute information from the preset protocol message.
After receiving the preset protocol message, the switch analyzes the preset protocol message, and then obtains the master/slave attribute information from the preset protocol message.
In one embodiment, the master/standby attribute information may be carried in an extension field of a preset protocol packet. For example, if the extension field of the preset protocol packet indicates that the packet is sent by the standby AC, the switch may determine that the standby attribute information is: information indicating that the AC is a standby AC.
Step 203: if the master/slave attribute information indicates that the AC is the slave AC, when a first data message sent to the wireless client by the wired client is received, selecting a physical port from physical ports except the physical port connected with the AC in the aggregation group of the switch side, and sending the first data message to the AC connected with the selected physical port.
The aggregation group on the exchange side includes a physical port connected with the main AC and a physical port connected with the standby AC.
And after the AC connected with the selected physical port receives the first data message, the first data message is sent to the wireless client. The AC is a standby AC, the physical port selected from the physical ports except the physical port connected with the AC in the aggregation group at the exchange side is a main AC. That is, the switch directly sends the data message to the main AC for processing, which reduces the impact of the data message on the stacking link and improves the reliability of the stacking link when the IRF is used to process the data message sent from the wired side to the wireless side.
In order to facilitate the switch to select a physical port from the aggregation group on the switch side, in an embodiment of the application, after the switch acquires the primary and secondary attribute information, if the primary and secondary attribute information is determined to indicate that the AC is the secondary AC, that is, the primary and secondary attribute information is determined to indicate that the AC is the secondary AC, the switch sets a physical port connected with the AC in the aggregation group on the switch side to be in a non-selected state. The non-selected state is used for indicating that the physical port does not participate in the forwarding of the data message.
When receiving a first data message sent by a wired client to a wireless client, the switch selects one physical port from the physical ports except the physical port in the non-selected state in the aggregation group at the switch side. The switch sends the first data message to the AC connected to the selected physical port.
In one embodiment, the switch sets the state of the physical port setting based on an operation key (key value). The operation key is a value used by the IRF to characterize the port aggregation capability of the member when performing port aggregation. The operation key is generated according to the combined calculation of the rate of the member port, the duplex mode and the like. In the same aggregation group, all physical ports in the selected state have the same operation Key.
In this case, the step of setting, by the switch, the physical port connected to the AC in the aggregation group to the unselected state may include:
the switch sets the priority of the physical port connected with the AC in the aggregation group to be a first priority. The first priority is lower than the second priority, which is the priority of the primary AC. And the switch determines a first operation key of the physical port connected with the AC in the aggregation group according to the first priority and by combining information such as the speed and the duplex mode of the physical port connected with the AC in the aggregation group. The first operation key is determined in conjunction with the first priority, which makes the first operation key different from the second operation key determined in conjunction with the second priority. And then the switch sets the physical port connected with the AC in the aggregation group to be in a non-selected state according to the first operation key.
Step 204: if the master/slave attribute information indicates that the AC is the master AC, when a second data message sent to the wireless client by the wired client is received, selecting a physical port from physical ports connected with the AC in the aggregation group at the switch side, and sending the second data message to the AC.
And after receiving the second data message, the AC sends the second data message to the wireless client. The AC is a main AC, a selected physical port is connected with the AC in the aggregation group at the slave switch side, and the connected AC is the main AC. That is, the switch directly sends the data message to the main AC for processing, which reduces the impact of the data message on the stacking link and improves the reliability of the stacking link when the IRF is used to process the data message sent from the wired side to the wireless side.
In order to facilitate the switch to select a physical port from the aggregation group on the switch side, in an embodiment of the application, after the switch acquires the primary and secondary attribute information, if the primary and secondary attribute information is determined to indicate that the AC is the primary AC, that is, the primary and secondary attribute information is determined to indicate that the AC is the primary AC, the switch sets a physical port connected with the AC in the aggregation group on the switch side to a selected state. And the selected state is used for indicating the physical port to participate in the forwarding of the data message.
And when receiving a second data message sent by the wired client to the wireless client, the switch selects one physical port from the state physical ports in the aggregation group on the exchange side. The switch sends the first data message to the AC connected to the selected physical port.
In one embodiment, the switch sets the state of the physical port setting based on an operation key (key value). In this case, the step of setting, by the switch, the physical port connected with the AC in the aggregation group to the selected state may include:
the switch sets the priority of the physical port connected to the AC in the aggregation group to the second priority. The second priority is higher than the second priority, and the first priority is the priority of the standby AC. And the switch determines a second operation key of the physical port connected with the AC in the aggregation group according to the second priority by combining the information such as the speed, the duplex mode and the like of the physical port connected with the AC in the aggregation group. The second operation key is determined in conjunction with the second priority, which makes the second operation key different from the first operation key determined in conjunction with the first priority. And the switch sets the physical port connected with the AC in the aggregation group to be in a selected state according to the second operation key.
In this embodiment of the present application, the first operation keys of the physical ports connected to the standby AC may be completely the same, or may not be completely the same. The second operation keys for each physical port connecting the main AC are all the same. The first operation key and the second operation key are different.
In one embodiment, to facilitate setting the state of a physical port, a range of priorities may be set in the switch. The switch sets a default priority for each physical port. And when the switch determines that the acquired main/standby attribute information indicates that the AC is the standby AC, the priority of a physical port connected with the AC in the aggregation group is reduced. And when the switch determines that the acquired main/standby attribute information indicates that the AC is the main AC, setting the priority of the physical port connected with the AC in the aggregation group as a default priority.
For example, the switch may set priorities in a range of 1 to 7, and the default priority for each physical port is 4. The switch acquires the master/standby attribute information from a preset protocol message sent by the AC. If the master/slave attribute information indicates that the AC is the slave AC, the switch reduces the priority of the physical port connected with the AC in the aggregation group to 2. If the master/slave attribute information indicates that the AC is the master AC, the switch sets the priority of the physical port connected with the AC in the aggregation group to 4.
The following describes a packet forwarding method provided in this embodiment with reference to the IRF networking shown in fig. 1. The preset protocol message is an LLDP message. The priority range of the physical ports in the switch 3 is set to be 1-7, and the default priority is 4. The physical ports 4, 5, 6, and 7 are physical ports in an aggregation group on the switch 3 side, and the priority of each physical port is 4.
Step 1, after IRFs are constructed by AC1 and AC2, AC1 is selected as a main AC.
And step 2, the AC1 sends an LLDP message 1 to the switch 3, and the AC2 sends an LLDP message 2 to the switch 3.
The LLDP message 1 carries the active/standby attribute information 1 indicating that the AC1 is the primary AC, and the LLDP message 2 carries the active/standby attribute information 2 indicating that the AC2 is the secondary AC.
Step 3, the switch 3 acquires the master/standby attribute information 1 from the LLDP packet 1, and further sets the priority of the physical port 4 and the physical port 5 to 4, that is, keeps the priority of the physical port 4 and the priority of the physical port 5 to 4.
The switch 3 acquires the active/standby attribute information 2 from the LLDP packet 2, and then reduces the priorities of the physical port 6 and the physical port 7, for example, reduces the priorities of the physical port 6 and the physical port 7 to 2.
Step 4, the switch 3 determines an operation key1 according to the priority of the physical port 4 and the physical port 5, the speed of the physical port 4 and the physical port 5, the duplex mode of the physical port 4 and the physical port 5, and other information.
The switch 3 determines the operation key2 according to the priority of the physical port 6 and the physical port 7, the rate of the physical port 6 and the physical port 7, and the duplex mode of the physical port 6 and the physical port 7.
In step 5, the switch 3 sets the physical port 4 and the physical port 5 to the selected state according to the operation key 1.
The switch 5 sets the physical port 6 and the physical port 7 to the unselected state according to the operation key 2.
Step 6, when the switch 3 receives the data packet 1 sent by the client 10 to the client 11, the switch 3 selects one physical port from the physical port 4 and the physical port 5, for example, the physical port 5 is selected, and then the data packet 1 is sent from the physical port 5 to the AC1 for processing.
Step 7, when the IRF sends the active/standby switch, for example, the AC1 is switched to the standby AC, and the AC2 is switched to the main AC, the AC1 sends an LLDP message 3 to the switch 3, and the AC2 sends an LLDP message 4 to the switch. The LLDP message 3 carries the active/standby attribute information 3 indicating that the AC1 is the standby AC, and the LLDP message 4 carries the active/standby attribute information 4 indicating that the AC2 is the main AC.
Step 8, the switch 3 acquires the master/slave attribute information 3 from the LLDP packet 3, and then reduces the priorities of the physical port 4 and the physical port 5, for example, reduces the priorities of the physical port 4 and the physical port 5 to 2.
The switch 3 acquires the master/standby attribute information 4 from the LLDP packet 4, and then increases the priorities of the physical ports 6 and 7 to default priorities, that is, sets the priorities of the physical ports 6 and 7 to 4.
Step 9, the switch 3 determines an operation key4 according to the priority of the physical port 4 and the physical port 5, the speed of the physical port 4 and the physical port 5, and the duplex mode of the physical port 4 and the physical port 5.
The switch 3 determines the operation key5 according to the priority of the physical port 6 and the physical port 7, the rate of the physical port 6 and the physical port 7, and the duplex mode of the physical port 6 and the physical port 7.
In step 10, the switch 3 sets the physical port 4 and the physical port 5 to the unselected state according to the operation key 4.
The switch 3 sets the physical port 6 and the physical port 7 to the selected states according to the operation key 5.
Step 11, when the switch 3 receives the data packet 2 sent by the client 10 to the client 11, the switch 3 selects one physical port from the physical port 6 and the physical port 7, for example, the physical port 7 is selected, and then the data packet 2 is sent from the physical port 7 to the AC2 for processing.
Based on the same inventive concept, according to the message forwarding method, the embodiment of the application also provides a message forwarding method. Referring to fig. 3, fig. 3 is a second flowchart illustrating a packet forwarding method according to an embodiment of the present application, where the method is applied to any AC in an IRF, and includes the following steps.
Step 301: and determining the main/standby attribute information of the AC.
The master/slave attribute information is information indicating that the AC is a master AC, or information indicating that the AC is a slave AC.
In the embodiment of the application, after an IRF is constructed by two ACs and main ACs are selected by race, or when the AC in the IRF is subjected to main/standby switching, the AC in the IRF may acquire main/standby attribute information of the device and send a preset protocol message carrying the main/standby attribute information to the switch.
In one embodiment, the predetermined protocol packet may be one of an LLDP packet, a CDP packet, and an NDP packet.
Step 302: and carrying the master/slave attribute information in a preset protocol message and sending the message to the switch.
In this way, when the switch receives a first data packet sent to the wireless client by the wired client under the condition that the master/slave attribute information indicates that the AC is the master AC, the switch selects one physical port from the physical ports of the aggregation group at the switch side except the physical port connected to the AC, and sends the first data packet to the AC connected to the selected physical port.
And under the condition that the main/standby attribute information indicates that the AC is the main AC, when a second data message sent to the wireless client by the wired client is received, the switch selects one physical port from the physical ports connected with the AC in the aggregation group at the switch side and sends the second data message to the AC.
By applying the embodiment, the switch directly sends the data message to the main AC in the IRF for processing, and does not send the data message to the standby AC in the IRF. When the data message sent from the wired side to the wireless side is processed based on the IRF, the impact of the data message on the stacked link is reduced, and the reliability of the stacked link is improved.
Based on the same inventive concept, according to the message forwarding method, the embodiment of the application also provides a message forwarding device. Referring to fig. 4, fig. 4 is a schematic structural diagram of a first packet forwarding apparatus according to an embodiment of the present application, where the apparatus is applied to a switch, and includes:
a receiving module 401, configured to receive a preset protocol packet sent by an AC in an IRF; the preset protocol message comprises the main/standby attribute information of the AC;
an obtaining module 402, configured to obtain the master/slave attribute information from a preset protocol packet;
a processing module 403, configured to select a physical port from physical ports other than a physical port connected to the AC in the aggregation group on the switch side when receiving a first data packet sent by the wired client to the wireless client if the master/slave attribute information indicates that the AC is the master AC; sending the first data message to the AC connected with the selected physical port, so that the AC connected with the selected physical port sends the first data message to the wireless client;
the processing module 403 is further configured to, if the master/slave attribute information indicates that the AC is the master AC, select one physical port from physical ports connected to the AC in the aggregation group at the switch side when receiving a second data packet sent by the wired client to the wireless client; the second data message is sent to the AC such that the AC sends the second data message to the wireless client.
Optionally, the processing module 403 may be specifically configured to:
if the master/slave attribute information indicates that the AC is the slave AC, setting a physical port connected with the AC in an aggregation group of the switch side to be in a non-selected state; the non-selected state is used for indicating that the physical port does not participate in the forwarding of the data message;
when a first data message sent to the wireless client by the wired client is received, one physical port is selected from physical ports except the physical port in the selected state in the aggregation group at the exchange side. .
Optionally, the processing module 403 may be specifically configured to:
if the master/slave attribute information indicates that the AC is the master AC, setting a physical port connected with the AC in an aggregation group of the switch side to be in a selected state; the selected state is used for indicating the physical port to participate in the forwarding of the data message;
and when a second data message sent to the wireless client by the wired client is received, selecting one physical port from the state physical ports in the aggregation group at the exchange side.
Optionally, the preset protocol message is one of an LLDP message, a CDP message, and an NDP message.
By applying the embodiment, the switch directly sends the data message to the main AC in the IRF for processing, and does not send the data message to the standby AC in the IRF. When the data message sent from the wired side to the wireless side is processed based on the IRF, the impact of the data message on the stacked link is reduced, and the reliability of the stacked link is improved.
Based on the same inventive concept, according to the message forwarding method, the embodiment of the application also provides a message forwarding device. Referring to fig. 5, fig. 5 is a second schematic structural diagram of a packet forwarding device according to an embodiment of the present application, where the device is applied to any AC in an IRF, and includes:
a determining module 501, configured to determine primary/standby attribute information of an AC;
a sending module 502, configured to carry the master/slave attribute information in a preset protocol packet and send the packet to a switch, so that the switch selects a physical port from physical ports except a physical port connected to an AC in an aggregation group of a switch side when receiving a first data packet sent by a wired client to a wireless client when the master/slave attribute information indicates that the AC is a slave AC, and sends the first data packet to the AC connected to the selected physical port; and under the condition that the main/standby attribute information indicates that the AC is the main AC, when a second data message sent to the wireless client by the wired client is received, selecting one physical port from physical ports connected with the AC in the aggregation group at the switch side, and sending the second data message to the AC.
Optionally, the determining module 501 may be specifically configured to determine the active-standby attribute information of the AC when the AC undergoes active-standby switching.
Optionally, the preset protocol message is one of an LLDP message, a CDP message, and an NDP message.
By applying the embodiment, the switch directly sends the data message to the main AC in the IRF for processing, and does not send the data message to the standby AC in the IRF. When the data message sent from the wired side to the wireless side is processed based on the IRF, the impact of the data message on the stacked link is reduced, and the reliability of the stacked link is improved.
Based on the same inventive concept, according to the above message forwarding method, an embodiment of the present application further provides a switch, as shown in fig. 6, including a processor 601 and a machine-readable storage medium 602, where the machine-readable storage medium 602 stores machine-executable instructions that can be executed by the processor 601. The processor 601 is caused by machine executable instructions to implement the steps of:
receiving a preset protocol message sent by an AC in an IRF; the preset protocol message comprises the main/standby attribute information of the AC;
acquiring master/standby attribute information from a preset protocol message;
if the master/slave attribute information indicates that the AC is the slave AC, selecting a physical port from physical ports except the physical port connected with the AC in the aggregation group at the switch side when receiving a first data message sent to the wireless client by the wired client; sending the first data message to the AC connected with the selected physical port, so that the AC connected with the selected physical port sends the first data message to the wireless client;
if the master/slave attribute information indicates that the AC is the master AC, selecting a physical port from physical ports connected with the AC in an aggregation group at the switch side when receiving a second data message sent to the wireless client by the wired client; the second data message is sent to the AC such that the AC sends the second data message to the wireless client.
By applying the embodiment, the switch directly sends the data message to the main AC in the IRF for processing, and does not send the data message to the standby AC in the IRF. When the data message sent from the wired side to the wireless side is processed based on the IRF, the impact of the data message on the stacked link is reduced, and the reliability of the stacked link is improved.
Based on the same inventive concept, according to the above message forwarding method, an AC is further provided in this embodiment, as shown in fig. 7, and includes a processor 701 and a machine-readable storage medium 702, where the machine-readable storage medium 702 stores machine-executable instructions that can be executed by the processor 701. The processor 701 is caused by machine executable instructions to implement the steps of:
determining main and standby attribute information of the AC;
carrying the main/standby attribute information in a preset protocol message and sending the message to a switch, so that the switch selects a physical port from physical ports except for a physical port connected with an AC in an aggregation group at the switch side when receiving a first data message sent to a wireless client by a wired client under the condition that the main/standby attribute information indicates that the AC is the standby AC, and sends the first data message to the AC connected with the selected physical port; and under the condition that the main/standby attribute information indicates that the AC is the main AC, when a second data message sent to the wireless client by the wired client is received, selecting one physical port from physical ports connected with the AC in the aggregation group at the switch side, and sending the second data message to the AC.
By applying the embodiment, the switch directly sends the data message to the main AC in the IRF for processing, and does not send the data message to the standby AC in the IRF. When the data message sent from the wired side to the wireless side is processed based on the IRF, the impact of the data message on the stacked link is reduced, and the reliability of the stacked link is improved.
The machine-readable storage medium may include a RAM (Random Access Memory) and may also include a NVM (Non-Volatile Memory), such as at least one disk Memory. Additionally, the machine-readable storage medium may be at least one memory device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also DSPs (Digital Signal Processing), ASICs (Application Specific Integrated circuits), FPGAs (Field Programmable Gate arrays) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Based on the same inventive concept, according to the message forwarding method, an embodiment of the present application further provides a machine-readable storage medium, which stores machine-executable instructions, and when the machine-readable storage medium is called and executed by a processor, the machine-executable instructions cause the processor to implement the message forwarding method steps shown in fig. 2.
Based on the same inventive concept, according to the message forwarding method, an embodiment of the present application further provides a machine-readable storage medium, which stores machine-executable instructions, and when the machine-readable storage medium is called and executed by a processor, the machine-executable instructions cause the processor to implement the message forwarding method steps shown in fig. 3.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the message forwarding apparatus, the switch, the AC, and the machine-readable storage medium, since they are substantially similar to the embodiments of the message forwarding method, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the message forwarding method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (18)

1. A message forwarding method is applied to a switch, and the method comprises the following steps:
receiving a preset protocol message sent by an Access Controller (AC) in an Intelligent Resilient Framework (IRF); the preset protocol message comprises the main/standby attribute information of the AC;
acquiring the master/standby attribute information from the preset protocol message;
if the master/slave attribute information indicates that the AC is the slave AC, selecting a physical port from physical ports except the physical port connected with the AC in the aggregation group of the switch side when receiving a first data message sent by a wired client to a wireless client; sending the first data message to the AC connected with the selected physical port, so that the AC connected with the selected physical port sends the first data message to the wireless client;
if the master/slave attribute information indicates that the AC is the master AC, selecting a physical port from physical ports connected with the AC in an aggregation group at the switch side when receiving a second data message sent by a wired client to a wireless client; sending the second data message to the AC to cause the AC to send the second data message to the wireless client.
2. The method of claim 1, further comprising:
if the active/standby attribute information indicates that the AC is a standby AC, setting a physical port connected with the AC in an aggregation group at the switch side to be in a non-selected state; the non-selected state is used for indicating that the physical port does not participate in the forwarding of the data message;
when receiving a first data message sent by a wired client to a wireless client, selecting one physical port from physical ports except the physical port connected with the AC in an aggregation group at the switch side, wherein the step comprises the following steps:
and when receiving a first data message sent to the wireless client by the wired client, selecting one physical port from physical ports except the physical port in the non-selected state in the aggregation group at the exchange side.
3. The method of claim 1, further comprising:
if the master/slave attribute information indicates that the AC is a master AC, setting a physical port connected with the AC in an aggregation group at the switch side to be in a selected state; the selected state is used for indicating the physical port to participate in the forwarding of the data message;
when receiving a second data message sent by the wired client to the wireless client, selecting one physical port from the physical ports connected with the AC in the aggregation group at the switch side, wherein the step comprises the following steps:
and when a second data message sent to the wireless client by the wired client is received, selecting one physical port from the state physical ports in the aggregation group at the exchange side.
4. The method according to any one of claims 1-3, wherein the predetermined protocol packet is one of a Link Layer Discovery Protocol (LLDP) packet, a Cisco Discovery Protocol (CDP) packet, and a Neighbor Discovery Protocol (NDP) packet.
5. A message forwarding method is applied to an Access Controller (AC) in an Intelligent Resilient Framework (IRF), and the method comprises the following steps:
determining the main/standby attribute information of the AC;
carrying the master/slave attribute information in a preset protocol message and sending the master/slave attribute information to a switch, so that the switch selects one physical port from physical ports except the physical port connected with the AC in an aggregation group at the switch side when receiving a first data message sent to a wireless client by a wired client under the condition that the master/slave attribute information indicates that the AC is the master AC, and sends the first data message to the AC connected with the selected physical port; and under the condition that the master/slave attribute information indicates that the AC is the master AC, when a second data message sent to a wireless client by a wired client is received, selecting one physical port from physical ports connected with the AC in an aggregation group at the switch side, and sending the second data message to the AC.
6. The method of claim 5, wherein the step of determining the master/slave attribute information of the AC comprises:
and when the AC is subjected to main/standby switching, determining main/standby attribute information of the AC.
7. The method according to claim 5 or 6, wherein the predetermined protocol message is one of a link layer discovery protocol LLDP message, a Cisco discovery protocol CDP message, and a neighbor discovery protocol NDP message.
8. A message forwarding apparatus, applied to a switch, the apparatus comprising:
the receiving module is used for receiving a preset protocol message sent by an Access Controller (AC) in the Intelligent Resilient Framework (IRF); the preset protocol message comprises the main/standby attribute information of the AC;
an obtaining module, configured to obtain the master/standby attribute information from the preset protocol packet;
a processing module, configured to select a physical port from physical ports other than a physical port connected to the AC in an aggregation group on the switch side when receiving a first data packet sent by a wired client to a wireless client if the active/standby attribute information indicates that the AC is a standby AC; sending the first data message to the AC connected with the selected physical port, so that the AC connected with the selected physical port sends the first data message to the wireless client;
the processing module is further configured to select one physical port from physical ports connected to the AC in the aggregation group on the switch side when receiving a second data packet sent by the wired client to the wireless client if the active/standby attribute information indicates that the AC is the primary AC; sending the second data message to the AC to cause the AC to send the second data message to the wireless client.
9. The apparatus of claim 8, wherein the processing module is specifically configured to:
if the active/standby attribute information indicates that the AC is a standby AC, setting a physical port connected with the AC in an aggregation group at the switch side to be in a non-selected state; the non-selected state is used for indicating that the physical port does not participate in the forwarding of the data message;
and when receiving a first data message sent to the wireless client by the wired client, selecting one physical port from physical ports except the physical port in the non-selected state in the aggregation group at the exchange side.
10. The apparatus of claim 8, wherein the processing module is specifically configured to:
if the master/slave attribute information indicates that the AC is a master AC, setting a physical port connected with the AC in an aggregation group at the switch side to be in a selected state; the selected state is used for indicating the physical port to participate in the forwarding of the data message;
and when a second data message sent to the wireless client by the wired client is received, selecting one physical port from the state physical ports in the aggregation group at the exchange side.
11. The apparatus according to any one of claims 8-10, wherein the predetermined protocol packet is one of a link layer discovery protocol LLDP packet, a cisco discovery protocol CDP packet, and a neighbor discovery protocol NDP packet.
12. A message forwarding device applied to an Access Controller (AC) in an Intelligent Resilient Framework (IRF), the device comprising:
a determining module, configured to determine master/slave attribute information of the AC;
a sending module, configured to carry the primary and secondary attribute information in a preset protocol packet and send the packet to a switch, so that the switch selects a physical port from physical ports of an aggregation group on the switch side except a physical port connected to an AC when receiving a first data packet sent from a wired client to a wireless client when the primary and secondary attribute information indicates that the AC is a secondary AC, and sends the first data packet to the AC connected to the selected physical port; and under the condition that the master/slave attribute information indicates that the AC is the master AC, when a second data message sent to a wireless client by a wired client is received, selecting one physical port from physical ports connected with the AC in an aggregation group at the switch side, and sending the second data message to the AC.
13. The apparatus according to claim 12, wherein the determining module is specifically configured to determine the active/standby attribute information of the AC when the AC undergoes active/standby switching.
14. The apparatus according to claim 12 or 13, wherein the predetermined protocol packet is one of a link layer discovery protocol LLDP packet, a cisco discovery protocol CDP packet, and a neighbor discovery protocol NDP packet.
15. A switch comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 4.
16. An AC comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: -carrying out the method steps of any one of claims 5 to 7.
17. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 4.
18. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: -carrying out the method steps of any one of claims 5 to 7.
CN201810531281.1A 2018-05-29 2018-05-29 Message forwarding method and device Active CN108696460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810531281.1A CN108696460B (en) 2018-05-29 2018-05-29 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810531281.1A CN108696460B (en) 2018-05-29 2018-05-29 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN108696460A CN108696460A (en) 2018-10-23
CN108696460B true CN108696460B (en) 2020-10-27

Family

ID=63848309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810531281.1A Active CN108696460B (en) 2018-05-29 2018-05-29 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN108696460B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462639B (en) * 2018-10-26 2021-09-07 新华三技术有限公司合肥分公司 Port expansion equipment management method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581058B (en) * 2012-07-31 2017-02-15 杭州华三通信技术有限公司 Message forwarding method and device in data central network
CN103795623B (en) * 2012-10-26 2017-03-15 杭州华三通信技术有限公司 A kind of method and apparatus for realizing flow intercommunication between virtual unit
CN104734952B (en) * 2015-03-09 2018-07-24 新华三技术有限公司 A kind of data message forwarding method and device
CN106059822B (en) * 2016-06-29 2019-07-09 新华三技术有限公司 A kind of delivery method and device of configuration information

Also Published As

Publication number Publication date
CN108696460A (en) 2018-10-23

Similar Documents

Publication Publication Date Title
EP2652905B1 (en) Increased communication opportunities with low-contact nodes in a computer network
US9641382B2 (en) Fast network formation after network power restoration
EP2974149B1 (en) Automatic selection of coordinating functionality in a hybrid communication network
US9769027B2 (en) Topology discovery in a stacked switches system
CN106332182B (en) Wireless access method and device
CN102457420A (en) Network device and method for establishing path data
US9264314B2 (en) Method, system, and switch for making bridge in MSTP join region
JP2021136688A (en) Device and method for handling stream routing path in time-sensitive networking network
CN112752321B (en) Method, device, equipment and storage medium for switching routes of Mesh network
EP3713160A1 (en) Packet transmission method and apparatus
CN109861925B (en) Data transmission method, related device and network
US20230084470A1 (en) Method and apparatus for controlling network traffic path
US9609590B2 (en) Eco-friendly power over ethernet
CN106900174A (en) The data transmission method of WLAN mesh network, apparatus and system
CN102035741B (en) The retransmission method of unicast message and equipment in a kind of ring topology network
US9722914B2 (en) Heterogeneous network system, network apparatus, and rendezvous path selection method thereof
US20170150379A1 (en) Interference mitigation in dense mesh networks
CN108696460B (en) Message forwarding method and device
WO2016177190A1 (en) Method and device for auto-negotiating lacp reference system and reference port
JP6506190B2 (en) Wireless communication system, control method and control station apparatus
US20200169487A1 (en) Method, device and system for monitoring node survival state
CN102255797B (en) Method and equipment for quickly determining OSPF (Open Shortest Path First) interface role
TW200525947A (en) Load balancing system and method for dynamic network
EP2958270B1 (en) Direct-link quality monitoring method, communications device, and system
CN103702370A (en) ZigBee mesh topology route method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant