WO2011029361A1 - Procédé, dispositif; et microcircuit de commutation, permettant de réduire le taux d'utilisation d'une unité centrale de commutateur - Google Patents
Procédé, dispositif; et microcircuit de commutation, permettant de réduire le taux d'utilisation d'une unité centrale de commutateur Download PDFInfo
- Publication number
- WO2011029361A1 WO2011029361A1 PCT/CN2010/075843 CN2010075843W WO2011029361A1 WO 2011029361 A1 WO2011029361 A1 WO 2011029361A1 CN 2010075843 W CN2010075843 W CN 2010075843W WO 2011029361 A1 WO2011029361 A1 WO 2011029361A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mac address
- saved
- locally
- switch
- source
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
Definitions
- the present invention relates to the field of data exchange, and more particularly to a method and apparatus for reducing the usage rate of a central processor of a switch and a switch chip.
- the network device has a hardware address that identifies itself, that is, a MAC (Media Access Control) address.
- the MAC address consists of a 6-byte number that uniquely identifies a network device.
- the switch needs to perform MAC address learning when it exchanges packets. That is, it needs to know which port the packet carrying the source MAC address is transmitted from. Then, when the destination MAC address is received as the source MAC address, the message is sent out from this port.
- the forwarding table stores the mapping between the MAC address and the VLAN (Virtual Local Area Network).
- the entry in the table is learned by the switch.
- the learning process is as follows: After the packet carrying the source MAC address reaches the switch, the switch searches the local forwarding table for the entry corresponding to the source MAC address. Learning is required. Switch chips in some switches support chip self-learning, while others do not. For the switch chip that does not support self-learning, the above-mentioned packet is copied and sent to the CPU of the switch. After learning by the software in the CPU, the entry corresponding to the source MAC address is written into the hardware.
- the packet carrying the source MAC address is received, the packet corresponding to the source MAC address exists in the forwarding table, and the packet is not sent to the CPU of the switch.
- the switch receives a very large traffic stream, if the source MAC address carried by the data stream is not found in the forwarding table, the switching chip sends thousands of data packets to the CPU. Learning the MAC address from the protocol stack will result in a high CPU usage rate, which will easily affect the network service and cause a vicious circle.
- the technical problem to be solved by the present invention is to provide a method and apparatus for reducing the usage rate of a central processing unit of a switch and a switching chip, so as to overcome the problem that a large number of repeated messages carrying a MAC address existing in the prior art impact the CPU.
- the present invention provides a method for reducing the central processing unit (CPU) usage of a switch, including:
- the switch When receiving the packet carrying the source medium access control MAC address, if the switch does not find the entry corresponding to the source MAC address in the forwarding table, the switch searches locally whether the source MAC address has been saved. After the source MAC address is saved, the source MAC address is saved and the message is sent to the CPU for MAC address learning; if the source MAC address is saved locally, the message is discarded.
- the above method may also have the following features:
- the switch has a maximum number N of locally saved MAC addresses, where N is a positive integer;
- the step of saving the source MAC address includes: the switch determines whether the number of locally saved MAC addresses has reached N, and if the number of locally saved MAC addresses has reached N, deleting the earliest saved one. The MAC address is saved and the source MAC address is saved. If the number of locally saved MAC addresses does not reach N, the source MAC address is directly saved.
- the above method may further include:
- the switch When receiving the deletion command indicating that the MAC address corresponding entry is to be deleted in the forwarding table, the switch determines whether the MAC address is saved locally according to the MAC address carried in the deletion command; The MAC address is deleted, and the MAC address saved locally is deleted, and the entry corresponding to the MAC address is deleted in the forwarding table; The MAC address is directly deleted from the entry corresponding to the MAC address in the forwarding table.
- the present invention also provides an apparatus for reducing the usage rate of a central processing unit (CPU) of a switch, including: a switching chip and a CPU;
- CPU central processing unit
- the switch chip is configured to: if the entry corresponding to the source MAC address is not found in the forwarding table, if the packet carrying the source medium access control MAC address is received, the local source MAC address is locally saved. Address: if the source MAC address is not saved locally, the source MAC address is saved and the message is sent to the CPU; if the source MAC address is saved locally, the message is discarded;
- the CPU is configured to perform MAC address learning according to the received message.
- the above device may also have the following features:
- the switch chip is pre-configured with a maximum number N of locally saved MAC addresses, where N is a positive integer;
- the switch chip is configured to determine whether the number of locally saved MAC addresses has reached N. If the number of locally saved MAC addresses has reached N, delete the earliest saved MAC address and save The source MAC address; if the number of locally saved MAC addresses does not reach N, the source MAC address is directly saved.
- the above device may also have the following features:
- the switch chip is further configured to: when receiving the delete command indicating that the MAC address corresponding entry is to be deleted in the forwarding table, determine, according to the MAC address carried in the delete command, whether the MAC address is saved locally; If the MAC address is saved locally, the locally saved MAC address is deleted, and the entry corresponding to the MAC address is deleted in the forwarding table; if the MAC address is not saved locally, the forwarding table is directly in the forwarding table. The entry corresponding to the MAC address is deleted.
- the present invention further provides a switch chip, wherein the switch chip is configured to: if the entry corresponding to the source MAC address is not found in the forwarding table, when the packet carrying the source medium access control MAC address is received, Finding whether the source MAC address has been saved locally; if the source MAC address is not saved locally, the source MAC address is saved and the packet is sent to the CPU for MAC address learning; if the source MAC is saved locally The address is discarded.
- the above switch chip can have the following features:
- the switch chip is pre-configured with a maximum number N of locally saved MAC addresses, where N is a positive integer;
- the switch chip is configured to determine whether the number of locally saved MAC addresses has reached N. If the number of locally saved MAC addresses has reached N, delete the earliest saved MAC address and save The source MAC address; if the number of locally saved MAC addresses does not reach N, the source MAC address is directly saved.
- the above switch chip can also have the following features:
- the switch chip is further configured to: when receiving the delete command indicating that the MAC address corresponding entry is to be deleted in the forwarding table, determine, according to the MAC address carried in the delete command, whether the MAC address is saved locally; If the MAC address is saved locally, the locally saved MAC address is deleted, and the entry corresponding to the MAC address is deleted in the forwarding table; if the MAC address is not saved locally, the forwarding table is directly in the forwarding table. The entry corresponding to the MAC address is deleted.
- the above switch chip can also have the following features:
- the switch chip is located in the switch.
- FIG. 1 is a flowchart of a method for reducing a CPU usage of a switch according to an embodiment of the present invention
- Step 101 Receive a packet carrying a source MAC address.
- Step 102 The switch finds the entry corresponding to the source MAC address in the forwarding table.
- Step 104 Save the source MAC address and send the message to the CPU for MAC address learning
- Step 105 Discard the text.
- the maximum number of locally saved MAC addresses can be up to N on the switch.
- the source MAC address is also saved: The switch determines whether the number of locally saved MAC addresses has reached N, and if so, deletes the earliest saved MAC address and saves the source MAC address. ; Otherwise, save the above source MAC address directly.
- N is a positive integer, and its value may be, but is not limited to, equal to 10.
- the methods for deleting MAC address entries include:
- Step 201 Receive a delete command indicating that a MAC address corresponding entry is to be deleted in the forwarding table.
- Step 202 The switch determines, according to the MAC address carried in the delete command, whether the MAC address is saved locally; if yes, execute Step 203, otherwise, step 204 is performed.
- Step 203 Delete the locally saved MAC address, and delete the corresponding entry in the forwarding table
- Step 204 Delete the corresponding entry directly in the forwarding table.
- the above method is not limited to MAC address learning. Any protocol that needs to send packets to work must discard redundant duplicate packets to reduce the CPU usage. Only each protocol needs to be judged. The keywords are different.
- the present invention also provides an apparatus for reducing the CPU usage of a switch, including a switching chip and a CPU;
- the switch chip is set to receive the packet carrying the source MAC address if it is not in the forwarding table. If the entry corresponding to the source MAC address is found, it is locally found whether the source MAC address has been saved; if not found, the source MAC address is saved and the packet is sent to the CPU; , the message is discarded;
- the CPU is set to perform MAC address learning based on the received message.
- the switch chip may also be pre-configured with a maximum number N of locally stored MAC addresses, where N is a positive integer;
- the switch chip is configured to determine whether the number of locally saved MAC addresses has reached N, and if so, delete the earliest saved MAC address and save the source MAC address; otherwise, save the source MAC address.
- the switch chip may be configured to: when receiving the delete command indicating that the MAC address corresponding entry is to be deleted in the forwarding table, determine whether the MAC address is saved locally according to the MAC address carried in the delete command; If yes, the MAC address that is saved locally is deleted, and the entry corresponding to the MAC address is deleted in the forwarding table; otherwise, the entry corresponding to the MAC address is deleted in the forwarding table.
- the above device for reducing the CPU usage of the switch can effectively prevent a large number of repeated messages from hitting the CPU to learn the MAC address at the same time, effectively reducing the CPU usage rate and avoiding the situation that the CPU instantaneous usage rate is too high.
- the present invention further provides a switch chip, wherein the switch chip is configured to: if a packet carrying the source medium access control MAC address is received, if the entry corresponding to the source MAC address is not found in the forwarding table, If the source MAC address has not been saved locally, the source MAC address is saved and the packet is sent to the CPU for MAC address learning; if the source is saved locally The MAC address is discarded.
- the switch chip is pre-configured with a maximum number N of locally stored MAC addresses, where N is a positive integer;
- the switch chip is configured to determine whether the number of locally saved MAC addresses has reached N. If the number of locally saved MAC addresses has reached N, delete the earliest saved MAC address and save the above. Source MAC address; if the number of locally saved MAC addresses does not reach N, the source MAC address is directly saved.
- the switch chip is further configured to: when receiving the delete command indicating that the MAC address corresponding entry is to be deleted in the forwarding table, determine whether the MAC address is saved locally according to the MAC address carried in the delete command; If the MAC address is saved locally, the locally saved MAC address is deleted, and the entry corresponding to the MAC address is deleted in the forwarding table; if the MAC address is not saved locally, the forwarding table is directly The entry corresponding to the MAC address is deleted.
- the switch chip has the same function as the switch chip in the device for reducing the CPU usage of the switch, and will not be described here.
- the switch chip can be located in a device such as a switch.
- the present invention provides a method and apparatus for reducing the usage rate of a central processing unit of a switch, and a switching chip. After the entry corresponding to the source MAC address is not found in the forwarding table, the source MAC address can be locally saved and reported. The text is sent to the CPU for MAC address learning, thereby effectively preventing a large number of repeated messages at the same time from impacting the CPU to learn the MAC address, effectively reducing the CPU usage rate, and avoiding the situation that the CPU instantaneous usage rate is too high.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
La présente invention concerne un procédé, un dispositif, et un microcircuit de commutation, permettant de réduire le taux d'utilisation d'une unité centrale ou "UC" d'un commutateur. Le dispositif comprend le microcircuit et l'UC. Le procédé comprend les étapes suivantes: lors de la réception d'un message portant l'adresse de contrôle d'accès multimédia ou "MAC" (Media Access Control) source, si le commutateur ne trouve pas dans une table d'acheminement l'article correspondant à l'adresse MAC source, il recherche si cette adresse MAC source a déjà été sauvegardée localement; si l'adresse n'a pas été sauvegardée, le commutateur sauvegarde l'adresse MAC source, et transmet le message à l'UC pour apprentissage de l'adresse MAC; si l'adresse a été sauvegardée, le message est supprimé. L'invention permet d'éviter que l'UC soit submergée d'une masse de messages répétés simultanément amenant l'UC à apprendre les adresses MAC, ce qui permet de réduire effectivement le taux d'utilisation de l'UC, et d'éviter la survenue de taux d'utilisation instantanés excessifs de l'UC.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910170372.8A CN101645904A (zh) | 2009-09-09 | 2009-09-09 | 一种降低交换机中央处理器使用率的方法的装置 |
CN200910170372.8 | 2009-09-09 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2011029361A1 true WO2011029361A1 (fr) | 2011-03-17 |
Family
ID=41657624
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2010/075843 WO2011029361A1 (fr) | 2009-09-09 | 2010-08-10 | Procédé, dispositif; et microcircuit de commutation, permettant de réduire le taux d'utilisation d'une unité centrale de commutateur |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101645904A (fr) |
WO (1) | WO2011029361A1 (fr) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150350073A1 (en) * | 2013-01-21 | 2015-12-03 | Zte Corporation | Method And Apparatus For Improving Forwarding Performance Of Chip |
CN113595909A (zh) * | 2021-07-05 | 2021-11-02 | 杭州迪普科技股份有限公司 | 报文处理方法、网络认证设备及网卡芯片 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101645904A (zh) * | 2009-09-09 | 2010-02-10 | 中兴通讯股份有限公司 | 一种降低交换机中央处理器使用率的方法的装置 |
CN102318290B (zh) * | 2011-07-29 | 2014-12-10 | 华为技术有限公司 | 报文转发方法和装置 |
CN106411741B (zh) * | 2013-02-27 | 2019-11-26 | 华为技术有限公司 | 介质访问控制mac地址学习方法、控制器及交换设备 |
CN104683267B (zh) * | 2013-11-26 | 2018-09-28 | 浙江大华系统工程有限公司 | 一种数据转发方法、装置及交换设备 |
CN110830378B (zh) * | 2018-08-07 | 2022-05-17 | 迈普通信技术股份有限公司 | 一种地址表项更新方法及交换设备 |
CN110365811B (zh) * | 2019-07-22 | 2022-03-01 | 杭州迪普科技股份有限公司 | 一种mac地址学习限制方法、装置及设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005067532A2 (fr) * | 2004-01-14 | 2005-07-28 | Riverstone Networks, Inc. | Gestion de l'utilisation de ressources de traitement dans un noeud de reseau |
US20070127382A1 (en) * | 2002-06-04 | 2007-06-07 | Fortinet, Inc. | Routing traffic through a virtual router-based network switch |
US7516487B1 (en) * | 2003-05-21 | 2009-04-07 | Foundry Networks, Inc. | System and method for source IP anti-spoofing security |
CN101645904A (zh) * | 2009-09-09 | 2010-02-10 | 中兴通讯股份有限公司 | 一种降低交换机中央处理器使用率的方法的装置 |
-
2009
- 2009-09-09 CN CN200910170372.8A patent/CN101645904A/zh active Pending
-
2010
- 2010-08-10 WO PCT/CN2010/075843 patent/WO2011029361A1/fr active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070127382A1 (en) * | 2002-06-04 | 2007-06-07 | Fortinet, Inc. | Routing traffic through a virtual router-based network switch |
US7516487B1 (en) * | 2003-05-21 | 2009-04-07 | Foundry Networks, Inc. | System and method for source IP anti-spoofing security |
WO2005067532A2 (fr) * | 2004-01-14 | 2005-07-28 | Riverstone Networks, Inc. | Gestion de l'utilisation de ressources de traitement dans un noeud de reseau |
CN101645904A (zh) * | 2009-09-09 | 2010-02-10 | 中兴通讯股份有限公司 | 一种降低交换机中央处理器使用率的方法的装置 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150350073A1 (en) * | 2013-01-21 | 2015-12-03 | Zte Corporation | Method And Apparatus For Improving Forwarding Performance Of Chip |
US9838312B2 (en) * | 2013-01-21 | 2017-12-05 | Xi'an Zhongxing New Software Co., Ltd | Method and apparatus for improving forwarding performance of chip |
CN113595909A (zh) * | 2021-07-05 | 2021-11-02 | 杭州迪普科技股份有限公司 | 报文处理方法、网络认证设备及网卡芯片 |
Also Published As
Publication number | Publication date |
---|---|
CN101645904A (zh) | 2010-02-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2011029361A1 (fr) | Procédé, dispositif; et microcircuit de commutation, permettant de réduire le taux d'utilisation d'une unité centrale de commutateur | |
US9148374B2 (en) | ARP packet processing method, communication system and device | |
US8576866B2 (en) | Hierarchical rate limiting of control packets | |
US11212216B2 (en) | Border gateway protocol (BGP) security measures along autonomous system (AS) paths | |
US8320249B2 (en) | Method and system for controlling network access on a per-flow basis | |
WO2008080314A1 (fr) | Procédé, moteur de retransmission et dispositif de communication pour la commande d'accès aux messages | |
WO2012106892A1 (fr) | Procédé, appareil et système de traitement de flux de service | |
US8855113B2 (en) | Link state identifier collision handling | |
WO2011020254A1 (fr) | Procédé et dispositif pour prévenir des attaques de réseau | |
WO2013053266A1 (fr) | Procédé, dispositif et système de prise de connaissance de messages | |
WO2008131658A1 (fr) | Procédé et dispositif pour fureter le dhcp | |
WO2012176087A1 (fr) | Prévention d'attaques par déni de service fondées sur une découverte de voisin | |
WO2020063853A1 (fr) | Traitement de message | |
US7826447B1 (en) | Preventing denial-of-service attacks employing broadcast packets | |
WO2005043815A1 (fr) | Procede pour prevenir d'eventuelles attaques de l'ethernet | |
JP6299745B2 (ja) | 通信システム、制御装置、通信方法及びプログラム | |
WO2009135422A1 (fr) | Procédé et appareil permettant de réaliser une diffusion interne qinq | |
WO2022028342A1 (fr) | Procédé de traitement de flux de congestion et dispositif | |
WO2019196914A1 (fr) | Procédé de découverte de trajet de réacheminement, et dispositif associé | |
WO2010048808A1 (fr) | Procédé, système et passerelle permettant de prévenir les attaques réseau | |
WO2022135274A1 (fr) | Procédé de mise en œuvre de puce pour extension de routage, et procédé et appareil de traitement de puce pour paquet de données | |
WO2012100494A1 (fr) | Procédé et appareil destinés à améliorer la sécurité de la recherche pour la découverte du voisinage | |
US20220141118A1 (en) | Methods and system for securing a sdn controller from denial of service attack | |
CN101155034A (zh) | 一种在网络设备上防止用户特定包攻击的方法 | |
WO2024066587A1 (fr) | Procédé de transfert de message, dispositif de communication et support de stockage |
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: 10814963 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 10814963 Country of ref document: EP Kind code of ref document: A1 |