CN113472698A - Switching equipment and message forwarding method thereof - Google Patents
Switching equipment and message forwarding method thereof Download PDFInfo
- Publication number
- CN113472698A CN113472698A CN202110676489.4A CN202110676489A CN113472698A CN 113472698 A CN113472698 A CN 113472698A CN 202110676489 A CN202110676489 A CN 202110676489A CN 113472698 A CN113472698 A CN 113472698A
- Authority
- CN
- China
- Prior art keywords
- cluster
- mac address
- ports
- port
- detection
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 17
- 238000001514 detection method Methods 0.000 claims abstract description 73
- 230000004044 response Effects 0.000 claims abstract description 27
- 230000005540 biological transmission Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/30—Peripheral units, e.g. input or output ports
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/30—Peripheral units, e.g. input or output ports
- H04L49/3009—Header conversion, routing tables or routing tags
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Small-Scale Networks (AREA)
Abstract
The application provides a switching device and a message forwarding method thereof. The method comprises the following steps: sending a first cluster detection message in a first detection period through a plurality of ports connected with a network load balancing cluster; determining that any port of the plurality of ports does not receive a first cluster detection response message in a first detection period; deleting any port from a plurality of ports bound by the cluster MAC address table entry; copying a received first Ethernet unicast message for each other port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received first Ethernet unicast message is a cluster MAC address; and sending a first Ethernet unicast message through each other port of the plurality of ports.
Description
Technical Field
The present application relates to communications technologies, and in particular, to a switching device and a method for forwarding a packet thereof.
Background
A Network Load Balancing (NLB) cluster may access each server of the cluster by a logical Internet name and a virtual cluster IP address while retaining the respective name of each server of the cluster.
The NLB cluster shown in fig. 1 is composed of three servers S1-S3, a network administrator manually configures a multi-port unicast MAC address table entry on a switching device connected to the NLB cluster, binds a plurality of ports connected to S1-S3 with the cluster MAC address, and in a unicast mode of the NLB cluster, the switching device copies and forwards a packet whose destination address is the cluster MAC address through the plurality of ports.
However, when a server in the NLB cluster fails, the switching device still copies and sends one or more copies of the message to each server and sends the message from the port connected to each cluster server because the switching device cannot sense the failure interrupt, and at this time, the message forwarded by the switching device through the port connected to the failed server is invalid. Because the internal bandwidth of the switching device is the bandwidth of the switching network board of the device, which is used for interacting the service flow between the device ports, and the bandwidth resource of the switching network board is also limited, the invalid message sent to the fault server occupies the internal bandwidth of the switching device.
Disclosure of Invention
The present application aims to provide a switching device and a method for forwarding a packet thereof, which avoid sending an invalid ethernet unicast packet to a network load balancing cluster.
In order to achieve the above object, the present application provides a method for forwarding a packet by a switching device, where the method includes: sending a first cluster detection message in a first detection period through a plurality of ports connected with a network load balancing cluster; determining that any port of the plurality of ports does not receive a first cluster detection response message in a first detection period; deleting any port from a plurality of ports bound by the cluster MAC address table entry; copying a received first Ethernet unicast message for each other port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received first Ethernet unicast message is a cluster MAC address; and sending a first Ethernet unicast message through each other port of the plurality of ports.
In order to achieve the above object, the present application further provides a device for forwarding a packet by a switching device, where the switching device includes: the receiving module is used for receiving a plurality of first cluster detection response messages and receiving first Ethernet unicast messages; the table item updating module is used for determining that any one port of the plurality of ports does not receive the first cluster detection response message in the first detection period; deleting any port from a plurality of ports bound by the cluster MAC address table entry; the sending module sends a first cluster detection message in a first detection period through a plurality of ports connected with the network load balancing cluster; copying a received first Ethernet unicast message for each other port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received first Ethernet unicast message is a cluster MAC address; and sending a first Ethernet unicast message through each other port of the plurality of ports.
The method and the device have the advantages that the switching equipment detects the fault link of the connected NLB cluster in time, the Ethernet unicast message sent to the NLB cluster is prevented from being sent to the fault link, and internal bandwidth resources of the switching equipment are saved.
Drawings
FIG. 1 is a schematic diagram of a network load balancing cluster;
fig. 2 is a schematic flow chart of forwarding a packet by a switching device according to the present application;
fig. 3 is a schematic structural diagram of the switching device provided in the present application.
Detailed Description
A detailed description will be given of a number of examples shown in a number of figures. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present application. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the examples.
The term "including" as that term is used is meant to include, but is not limited to; the term "comprising" means including but not limited to; the terms "above," "within," and "below" include the instant numbers; the terms "greater than" and "less than" mean that the number is not included. The term "based on" means based on at least a portion thereof.
Fig. 2 shows a flow for forwarding a packet by a switching device according to the present application, which includes the following steps:
step 102, determining that any port of the plurality of ports does not receive a first cluster detection response message in a first detection period;
step 105, a first ethernet unicast packet is sent through each of the other ports of the plurality of ports.
The method and the device have the advantages that the switching equipment detects the fault link of the connected NLB cluster in time, the Ethernet unicast message sent to the NLB cluster is prevented from being sent to the fault link, and internal bandwidth resources of the switching equipment are saved.
The scheme of the present application can be applied to the switching device in fig. 1. The switching device is connected with three servers S1, S2 and S3 of the NLB cluster through 3 ports respectively. In the application, the switching device sets a timer, so that the 3 ports respectively send cluster detection messages after each detection period is reached, and the internal state of each server in the NLB cluster is detected.
The packet format of the cluster detection packet is shown in table 1 below:
source MAC | Destination MAC | Tag field | Time stamp | Outlet direction port |
TABLE 1
In the ethernet message header of the cluster detection message: the source MAC field carries the bridge backup MAC address of the switching equipment which sends the cluster detection message; the destination MAC address field carries the cluster MAC address.
In the data part of the cluster detection packet: detecting a message identifier; the timestamp field is a transmission timestamp; the port field is the port identification of the transmitting end.
The switch device receives the cluster detection response message from the port connecting the server S1 and the server S2 during the detection period. The switching device determines that there is no cluster detection response message of the server S3 in the current detection period, and deletes the port connected to the server S3 among the three ports bound by the cluster MAC address table entry in the MAC table.
When receiving the ethernet unicast message of which the destination MAC address is the cluster MAC address, the switching device searches the matched cluster MAC address table entry in the MAC table, copies one ethernet unicast message for each of 2 ports bound to the cluster MAC address table entry, and then sends the ethernet unicast message through 2 ports connecting the server S1 and the server S2. Therefore, the message does not need to be copied to another port, and the message does not need to be sent by the server S3, so that the internal bandwidth of the switching equipment is saved.
When the next probing period arrives, the switching device continues to send cluster detection messages to 3 ports of three servers S1, S2, and S3 connected to the NLB cluster. The switching equipment receives the cluster detection response messages from 3 ports respectively in the detection period. The switching device adds the connection server S3 in the cluster MAC address table entry.
When receiving the ethernet unicast message with the destination MAC address being the cluster MAC address, the switching device searches the matched cluster MAC address table entry in the MAC table, copies one ethernet unicast message for each of the 3 ports bound to the cluster MAC address table entry, and then sends the ethernet unicast message to the three servers S1, S2, and S3 of the NLB cluster through the 3 ports.
Fig. 3 is a schematic structural diagram of the switching device provided in the present application. The device 300 comprises a plurality of network interfaces, a processing unit that can be implemented by a CPU, a memory, and a switching unit that can be implemented by a switching chip. The exchange unit comprises a receiving module, an item updating module and a sending module.
A receiving module, configured to receive multiple first cluster detection response packets and receive a first ethernet unicast packet; the table entry updating module is used for determining that any one port of the plurality of ports does not receive the first cluster detection response message in the first detection period; deleting any port from a plurality of ports bound by the cluster MAC address table entry; the sending module is used for sending a first cluster detection message in a first detection period through a plurality of ports connected with the network load balancing cluster; copying a received first Ethernet unicast message for each other port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received first Ethernet unicast message is a cluster MAC address; and sending a first Ethernet unicast message through each other port of the plurality of ports.
The receiving module is further configured to receive a plurality of second cluster response messages and receive a second ethernet unicast message; the table item updating module is further configured to determine that each of the other ports and any port of the multiple ports receive the second cluster detection response message within a predetermined time; adding any port in a plurality of ports bound by a cluster MAC address table entry; the sending module is used for sending a second cluster detection message in a second detection period through each other port of the plurality of ports connected with the network load balancing cluster; copying a received second Ethernet unicast message for each port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received second Ethernet unicast message is a cluster MAC address; and sending a second Ethernet unicast message through each of the plurality of ports.
The first cluster detection message and the second cluster detection message; the source MAC address is a local bridge MAC address; the destination MAC address is a cluster MAC address; the mark field is a detection message mark; the timestamp field is a transmission timestamp; the port field is the port identification of the transmitting end.
A first cluster detection response message and a second cluster detection response message; the source MAC address is a cluster MAC address; the destination MAC address is a local bridge MAC address; the mark field is a detection response message mark; the timestamp field is a transmission timestamp.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (8)
1. A method for forwarding a packet by a switching device, the method comprising:
sending a first cluster detection message in a first detection period through a plurality of ports connected with a network load balancing cluster;
determining that any one of the plurality of ports does not receive a first cluster detection response message in the first detection period;
deleting the any port from the plurality of ports bound by the cluster MAC address table entry;
copying a received first Ethernet unicast message for each other port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received first Ethernet unicast message is the cluster MAC address;
and sending a copy of the first Ethernet unicast message through each other port of the plurality of ports.
2. The method of claim 1, further comprising:
sending the second cluster detection message in a second detection period through the plurality of ports connected with the network load balancing cluster;
determining that each of the other ports and the any port of the plurality of ports receive a second cluster detection response message within a predetermined time;
adding the any port in the plurality of ports bound by the cluster MAC address table entry;
copying a received second Ethernet unicast message for each port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received second Ethernet unicast message is the cluster MAC address;
and sending one copy of the second Ethernet unicast message through each port of the plurality of ports.
3. The method of claim 2, wherein the first cluster detection packet and the second cluster detection packet are included in the same packet; the source MAC address is a local bridge MAC address; the destination MAC address is the cluster MAC address; the mark field is a detection message mark; the timestamp field is a transmission timestamp; the port field is the port identification of the transmitting end.
4. The method of claim 2, wherein the first cluster detection response packet and the second cluster detection response packet are received from the first node; the source MAC address is the cluster MAC address; the destination MAC address is the local bridge MAC address; the mark field is a detection response message mark; the timestamp field is a transmission timestamp.
5. An apparatus for forwarding a packet by a switching device, the switching device comprising:
the receiving module is used for receiving a plurality of first cluster detection response messages and receiving first Ethernet unicast messages;
the table item updating module is used for determining that any one port of the plurality of ports does not receive a first cluster detection response message in the first detection period; deleting the any port from the plurality of ports bound by the cluster MAC address table entry;
the sending module sends a first cluster detection message in a first detection period through a plurality of ports connected with the network load balancing cluster; copying a received first Ethernet unicast message for each other port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received first Ethernet unicast message is the cluster MAC address; and sending a copy of the first Ethernet unicast message through each other port of the plurality of ports.
6. The switching device of claim 5,
the receiving module receives a plurality of second cluster response messages and second Ethernet unicast messages;
the table entry updating module is configured to determine that each of the other ports and the any port of the plurality of ports receive a second cluster detection response packet within a predetermined time; adding the any port in the plurality of ports bound by the cluster MAC address table entry;
the sending module is configured to send the second cluster detection packet in a second detection period through each of the other ports connected to the plurality of ports of the network load balancing cluster; copying a received second Ethernet unicast message for each port of the plurality of ports bound by the cluster MAC address table entry; the destination MAC address of the received second Ethernet unicast message is the cluster MAC address; and sending one copy of the second Ethernet unicast message through each port of the plurality of ports.
7. The switching device of claim 6, wherein the first cluster detection packet and the second cluster detection packet are included in the first cluster detection packet and the second cluster detection packet; the source MAC address is a local bridge MAC address; the destination MAC address is the cluster MAC address; the mark field is a detection message mark; the timestamp field is a transmission timestamp; the port field is the port identification of the transmitting end.
8. The switching device according to claim 6, wherein the first cluster detection response packet and the second cluster detection response packet; the source MAC address is the cluster MAC address; the destination MAC address is the local bridge MAC address; the mark field is a detection response message mark; the timestamp field is a transmission timestamp.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110676489.4A CN113472698A (en) | 2021-06-18 | 2021-06-18 | Switching equipment and message forwarding method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110676489.4A CN113472698A (en) | 2021-06-18 | 2021-06-18 | Switching equipment and message forwarding method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113472698A true CN113472698A (en) | 2021-10-01 |
Family
ID=77870478
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110676489.4A Withdrawn CN113472698A (en) | 2021-06-18 | 2021-06-18 | Switching equipment and message forwarding method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113472698A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114866456A (en) * | 2022-04-22 | 2022-08-05 | 新华三工业互联网有限公司 | Message sending method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008022271A (en) * | 2006-07-12 | 2008-01-31 | Yamaha Corp | Network apparatus |
CN101127681A (en) * | 2007-09-05 | 2008-02-20 | 杭州华三通信技术有限公司 | Method and device for binding server MAC address with uplink port |
CN101909010A (en) * | 2010-08-06 | 2010-12-08 | 福建星网锐捷网络有限公司 | Port configuration method and device as well as switcher equipment |
CN102437960A (en) * | 2011-12-21 | 2012-05-02 | 福建星网锐捷网络有限公司 | Detection processing method and system of cluster mode, and network equipment |
CN102761476A (en) * | 2012-03-30 | 2012-10-31 | 杭州华三通信技术有限公司 | Load balancing method and device |
US20140119187A1 (en) * | 2012-11-01 | 2014-05-01 | Huawei Technologies Co., Ltd. | Processing method, device and system for controlling packet broadcast |
CN109639552A (en) * | 2018-12-24 | 2019-04-16 | 新华三技术有限公司 | A kind of three-layer forwarding method and device |
CN112737945A (en) * | 2020-12-30 | 2021-04-30 | 杭州迪普信息技术有限公司 | Server connection control method and device |
-
2021
- 2021-06-18 CN CN202110676489.4A patent/CN113472698A/en not_active Withdrawn
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008022271A (en) * | 2006-07-12 | 2008-01-31 | Yamaha Corp | Network apparatus |
CN101127681A (en) * | 2007-09-05 | 2008-02-20 | 杭州华三通信技术有限公司 | Method and device for binding server MAC address with uplink port |
CN101909010A (en) * | 2010-08-06 | 2010-12-08 | 福建星网锐捷网络有限公司 | Port configuration method and device as well as switcher equipment |
CN102437960A (en) * | 2011-12-21 | 2012-05-02 | 福建星网锐捷网络有限公司 | Detection processing method and system of cluster mode, and network equipment |
CN102761476A (en) * | 2012-03-30 | 2012-10-31 | 杭州华三通信技术有限公司 | Load balancing method and device |
US20140119187A1 (en) * | 2012-11-01 | 2014-05-01 | Huawei Technologies Co., Ltd. | Processing method, device and system for controlling packet broadcast |
CN109639552A (en) * | 2018-12-24 | 2019-04-16 | 新华三技术有限公司 | A kind of three-layer forwarding method and device |
CN112737945A (en) * | 2020-12-30 | 2021-04-30 | 杭州迪普信息技术有限公司 | Server connection control method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114866456A (en) * | 2022-04-22 | 2022-08-05 | 新华三工业互联网有限公司 | Message sending method and device |
CN114866456B (en) * | 2022-04-22 | 2024-07-23 | 新华三工业互联网有限公司 | Message sending method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20060050643A1 (en) | Router for multicast redundant routing and system for multicast redundancy | |
US7724649B2 (en) | Method and device for making uplink standby | |
CN110830371B (en) | Message redirection method and device, electronic equipment and readable storage medium | |
US10404773B2 (en) | Distributed cluster processing system and packet processing method thereof | |
US20060002391A1 (en) | Multicast packet relay device adapted for virtual router | |
US20020016874A1 (en) | Circuit multiplexing method and information relaying apparatus | |
US7447222B2 (en) | Automated path tracing through switching mesh | |
CN103401781B (en) | It is applied to cut-in method and the equipment of multilink transparent interconnection network | |
US8098575B2 (en) | Packet relay method and device | |
CN109088819A (en) | A kind of message forwarding method, interchanger and computer readable storage medium | |
CN110011941B (en) | Message forwarding method and device | |
US7477612B2 (en) | Topology discovery process and mechanism for a network of managed devices | |
US10476774B2 (en) | Selective transmission of bidirectional forwarding detection (BFD) messages for verifying multicast connectivity | |
JP4724763B2 (en) | Packet processing apparatus and interface unit | |
US8929200B2 (en) | Communication device, communication system, and communication method | |
WO2012127644A1 (en) | Communication node apparatus system, apparatus, and method | |
CN113472698A (en) | Switching equipment and message forwarding method thereof | |
WO2012113075A1 (en) | Efficient multicasting in a distributed system architecture | |
Cisco | Novell IPX Commands | |
Cisco | Novell IPX Commands | |
CN1685665B (en) | Method for routing data packets, and devices for implementing the method | |
CN112866143A (en) | Device and chip for realizing 802.1CB protocol | |
CN114598639B (en) | Message processing method and device | |
CN114760245B (en) | Stacked member equipment and method for forwarding broadcast message thereof | |
JP2002271371A (en) | Network server and its controlling 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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20211001 |