TWI505675B - Network switch and data updating method - Google Patents

Network switch and data updating method Download PDF

Info

Publication number
TWI505675B
TWI505675B TW102107928A TW102107928A TWI505675B TW I505675 B TWI505675 B TW I505675B TW 102107928 A TW102107928 A TW 102107928A TW 102107928 A TW102107928 A TW 102107928A TW I505675 B TWI505675 B TW I505675B
Authority
TW
Taiwan
Prior art keywords
address
media access
interrupted
access control
network
Prior art date
Application number
TW102107928A
Other languages
Chinese (zh)
Other versions
TW201436509A (en
Inventor
Wen Hsin Yang
Original Assignee
Ic Plus Corp
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 Ic Plus Corp filed Critical Ic Plus Corp
Priority to TW102107928A priority Critical patent/TWI505675B/en
Priority to CN201310127786.9A priority patent/CN104038426A/en
Publication of TW201436509A publication Critical patent/TW201436509A/en
Application granted granted Critical
Publication of TWI505675B publication Critical patent/TWI505675B/en

Links

Description

網路交換器與資料更新方法Network switch and data update method

本發明是有關於一種通訊裝置,且特別是有關於一種網路交換器及資料更新方法。The present invention relates to a communication device, and more particularly to a network switch and a data update method.

一般而言,網路交換器(Network Switch)皆會建立一個媒體存取控制(Media Access Control,MAC)位址檢查表(look-up table),例如存放於網路交換器的記憶體中,用來將接收到的封包的來源(source)之MAC位址學習(learn)進入位址檢查表中,並且利用封包中的目的地決定封包的流向。而MAC位址檢查表每學習/紀錄一筆新的MAC位址時,便會佔用記憶體中之一部份。為了使得記憶體的使用效率提高,習知技術中通常使用的方式為,每經過一設定時間(例如幾分鐘或幾小時),便檢查已學習的位址是否有更新,若在上述的設定時間中未有更新,則判斷此位址不存在而刪除位址及相關之資訊,以釋放記憶體空間,這樣的作法則稱之為一時效處理(aging)。Generally, the Network Switch establishes a Media Access Control (MAC) address lookup table, for example, stored in the memory of the network switch. The MAC address of the source of the received packet is learned into the address check table, and the destination of the packet is determined by the destination in the packet. The MAC address checklist consumes a portion of the memory each time a new MAC address is learned/recorded. In order to improve the use efficiency of the memory, it is generally used in the prior art to check whether the learned address is updated every time a set time (for example, a few minutes or a few hours), if at the above set time If there is no update, it is judged that the address does not exist and the address and related information are deleted to release the memory space. This method is called aging.

但使用上述時效處理更新位址檢查表則仍存有著幾個缺點。例如,當已學習的位址失效,例如具有該MAC位址的主機關 機時,必須等到上述的設定時間時,也就是時效處理機制發生時,位址檢查表中的失效的位址才會被清除。因此,記憶體則無法即時的釋放,而造成使用的效率較為低落。However, there are several disadvantages to using the above aging process to update the address checklist. For example, when the learned address fails, for example, the host with the MAC address is off. When the machine is set, it must wait until the above set time, that is, when the aging mechanism occurs, the invalid address in the address check table will be cleared. Therefore, the memory cannot be released immediately, and the efficiency of use is relatively low.

另外一種情況則是,已學習的位址的主機被移往他處(例如以另一連接埠連接網路交換器,或透過其他網路交換器連接),而在時效處理的設定時間內,或是移往他處的主機之位址被從新學習前,上述的位址則仍然存在於位址學習表中。在這樣的情況下,原先目的地為上述位址的封包仍然會不斷的傳送至對應的連接埠,而無法即時察覺上述的位址已失效。In another case, the host of the learned address is moved to another location (for example, connecting the network switch with another connection or connecting through another network switch), and within the set time of the aging process, The address above is still present in the address learning table before the address of the host that was moved to it is re-learned. In such a case, the packet whose original destination is the above address will still be continuously transmitted to the corresponding port, and it is impossible to immediately detect that the above address has expired.

本發明提供一種網路交換器及資料更新方法,可以更有效的更新位址檢查表中的位址資訊。The invention provides a network switch and a data update method, which can more effectively update the address information in the address check table.

本發明的網路交換器包括多個連接埠、記憶單元以及處理單元。多個連接埠連接多個網路裝置,其中網路裝置分別具有媒體存取控制位址。記憶單元用以儲存位址檢查表,其中位址檢查表用以紀錄網路裝置的媒體存取控制位址及對應連接的連接埠。處理單元連接連接埠以及記憶單元。其中,當連接埠之一的一連接狀態為中斷時,處理單元刪除位址檢查表中所有對應於連接狀態為中斷的連接埠的網路裝置的媒體存取控制位址。The network switch of the present invention includes a plurality of ports, memory units, and processing units. A plurality of ports connect a plurality of network devices, wherein the network devices each have a media access control address. The memory unit is configured to store an address check table, wherein the address check table is used to record the media access control address of the network device and the connection port of the corresponding connection. The processing unit is connected to the port and the memory unit. Wherein, when a connection state of one of the ports is interrupted, the processing unit deletes all media access control addresses of the network devices in the address check table corresponding to the ports whose connection status is interrupted.

在本發明的一實施例中,上述的網路裝置分別為主機或路由裝置。In an embodiment of the invention, the network devices are respectively a host or a routing device.

在本發明的一實施例中,位址檢查表更包括多個時效處理參數,分別對應於網路裝置的媒體存取控制位址,當處理單元於預定時間內未從具有媒體存取控制位址之一的網路裝置接收網路封包時,處理單元增加對應於媒體存取控制位址的時效處理參數的數值。以及,當時效處理參數之一大於一設定值時,處理單元刪除對應於大於設定值的時效處理參數之媒體存取控制位址。In an embodiment of the invention, the address check table further includes a plurality of aging processing parameters respectively corresponding to the media access control address of the network device, and the processing unit does not have the media access control bit within the predetermined time. When the network device of one of the addresses receives the network packet, the processing unit increments the value of the aging processing parameter corresponding to the media access control address. And, when one of the aging processing parameters is greater than a set value, the processing unit deletes the media access control address corresponding to the aging processing parameter greater than the set value.

在本發明的上述實施例中,當連接埠之一的連接狀態為中斷時,該處理單元更刪除該位址檢查表中所有對應於該連接狀態為中斷的該連接埠的該些網路裝置的該些時效處理參數。In the above embodiment of the present invention, when the connection state of one of the ports is interrupted, the processing unit further deletes all the network devices in the address check table corresponding to the connection port whose connection state is interrupted. The aging processing parameters.

本發明的一實施例中,網路交換器更包括一偵測單元,耦接至連接埠以及處理單元,用以偵測連接埠的連接狀態。當連接埠之一的連接狀態為中斷時,偵測單元對應連接狀態為中斷的連接埠傳送通知信號至處理單元。其中,當處理單元接收通知信號時,處理單元根據通知信號刪除位址檢查表中所有對應於連接狀態為中斷的連接埠的網路裝置的媒體存取控制位址。In an embodiment of the invention, the network switch further includes a detecting unit coupled to the port and the processing unit for detecting the connection state of the port. When the connection state of one of the ports is interrupted, the detecting unit transmits a notification signal to the processing unit corresponding to the connection state whose connection state is interrupted. Wherein, when the processing unit receives the notification signal, the processing unit deletes, according to the notification signal, all media access control addresses of the network devices in the address check table corresponding to the connection ports whose connection status is interrupted.

本發明的資料更新方法,適用於網路交換器,所述資料更新方法包括以下步驟。首先,以多個連接埠連接多個網路裝置,其中網路裝置分別具有一媒體存取控制位址。然後,儲存位址檢查表,其中位址檢查表用以紀錄網路裝置的媒體存取控制位址及對應連接的連接埠。當連接埠之一的連接狀態為中斷時,刪除位址檢查表中所有對應於連接狀態為中斷之連結埠的網路裝置的媒體存取控制位址。The data updating method of the present invention is applicable to a network switch, and the data updating method includes the following steps. First, a plurality of network devices are connected by a plurality of ports, wherein the network devices each have a media access control address. Then, the address check table is stored, wherein the address check table is used to record the media access control address of the network device and the connection port of the corresponding connection. When the connection state of one of the ports is interrupted, all the media access control addresses of the network devices corresponding to the link whose connection state is the interrupted state are deleted.

基於上述,本發明提供一種網路交換器及資料更新方法,可根據網路交換器的連接埠之連接狀態,即時更新網路交換器中的位址檢查表,使得網路交換器中的記憶單元之使用效率可以更為提昇。Based on the above, the present invention provides a network switch and a data update method, which can instantly update an address check table in a network switch according to a connection state of a network switch, so that the memory in the network switch The efficiency of the unit can be improved.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the invention will be apparent from the following description.

10‧‧‧網路交換器10‧‧‧Network Switch

111~11n‧‧‧連接埠111~11n‧‧‧Connector

120‧‧‧記憶單元120‧‧‧ memory unit

130‧‧‧處理單元130‧‧‧Processing unit

210~230‧‧‧主機210~230‧‧‧Host

30‧‧‧網路30‧‧‧Network

S301~S303‧‧‧步驟S301~S303‧‧‧Steps

圖1為根據本發明一實施例所繪示網路交換器的裝置方塊圖。FIG. 1 is a block diagram of a network switch according to an embodiment of the invention.

圖2為根據本發明一實施例所繪示網路交換器與網路及網路裝置的關係圖。2 is a diagram showing the relationship between a network switch and a network and a network device according to an embodiment of the invention.

圖3為根據本發明一實施例所繪示資料更新方法的流程步驟圖。FIG. 3 is a flow chart showing a method for updating a data according to an embodiment of the invention.

圖1為根據本發明一實施例所繪示網路交換器的裝置方塊圖。請參照圖1,資料交換器10包括連接埠111~11n、記憶單元120以及處理單元130。連接埠111~11n用以連接多個網路裝置,其中網路裝置分別具有媒體存取控制(Media Access Control,MAC)位址,例如電腦主機或是路由裝置等。值得注意的是,連接埠111~11n並非僅以一對一的方式連接上述多個網路裝置,單 一連接埠(例如連接埠111~11n之一)亦可透過連接另一網路交換器等方式連接多個網路裝置。FIG. 1 is a block diagram of a network switch according to an embodiment of the invention. Referring to FIG. 1, the data exchanger 10 includes ports 111-11n, a memory unit 120, and a processing unit 130. The ports 111~11n are used to connect a plurality of network devices, wherein the network devices respectively have a Media Access Control (MAC) address, such as a computer host or a routing device. It is worth noting that the ports 111~11n are not connected to the above multiple network devices in a one-to-one manner. A connection port (for example, one of the ports 111 to 11n) can also be connected to a plurality of network devices by connecting another network switch or the like.

記憶單元120用以儲存位址檢查表,其中位址檢查表用以紀錄網路裝置的媒體存取控制位址及對應連接的連接埠(例如連接埠111~11n之一)。處理單元130連接連接埠111~11n以及記憶單元120。其中,當連接埠111~11n之一的連接狀態(link status)為中斷(link-off)時,處理單元130刪除位址檢查表中所有對應於連接狀態為中斷的連接埠的網路裝置的媒體存取控制位址。The memory unit 120 is configured to store an address check table, where the address check table is used to record the media access control address of the network device and the connection port of the corresponding connection (for example, one of the ports 111-11n). The processing unit 130 is connected to the ports 111 to 11n and the memory unit 120. When the link status of one of the ports 111~11n is a link-off, the processing unit 130 deletes all the network devices in the address check table corresponding to the connection port whose connection status is interrupted. Media access control address.

而在本發明一實施例中,上述網路交換器10更包括一偵測單元(未繪示),耦接至連接埠111~11n以及處理單元130,用以偵測連接埠111~11n的連接狀態。當連接埠111~11n之一的連接狀態為中斷時,偵測單元對應連接狀態為中斷的連接埠(例如連接埠111~11n之一)傳送通知信號至處理單元130。而當處理單元130接收上述的通知信號時,處理單元130則可根據通知信號刪除存放於記憶單元120的位址檢查表中所有對應於連接狀態為中斷的連接埠(例如連接埠111~11n之一)的網路裝置的媒體存取控制位址。In an embodiment of the invention, the network switch 10 further includes a detecting unit (not shown) coupled to the ports 111-11n and the processing unit 130 for detecting the ports 111~11n. Connection Status. When the connection state of one of the ports 111 to 11n is interrupted, the detecting unit transmits a notification signal to the processing unit 130 corresponding to the connection port (for example, one of the ports 111 to 11n) whose connection state is interrupted. When the processing unit 130 receives the notification signal, the processing unit 130 may delete all the ports corresponding to the connection state interrupted in the address check table stored in the memory unit 120 according to the notification signal (for example, the ports 111 to 11n). a) media access control address of the network device.

而在本發明一實施例中,網路交換器10亦同時具有時效處理(aging)之機制。亦即,於記憶單元120中所儲存的位址檢查表更包括多個時效處理參數,分別對應於網路裝置的媒體存取控制位址。當處理單元130於預定時間內未從具有媒體存取控制 位址之一的網路裝置接收一網路封包時,處理單元130增加對應於媒體存取控制位址的時效處理參數的數值。而當時效處理參數之一大於一設定值,例如一設定時間時,處理單元130刪除對應於大於設定值的時效處理參數之媒體存取控制位址。In an embodiment of the invention, the network switch 10 also has an aging mechanism. That is, the address check table stored in the memory unit 120 further includes a plurality of aging processing parameters respectively corresponding to the media access control addresses of the network device. When the processing unit 130 does not have media access control within a predetermined time When the network device of one of the addresses receives a network packet, the processing unit 130 increments the value of the aging processing parameter corresponding to the media access control address. When one of the aging processing parameters is greater than a set value, such as a set time, the processing unit 130 deletes the media access control address corresponding to the aging processing parameter greater than the set value.

而當連接埠111~11n之一的連接狀態為中斷時,處理單元130更刪除位址檢查表中所有對應於連接狀態為中斷的連接埠的網路裝置的時效處理參數。事實上,位址檢查表中亦對應媒體存取控制位址儲存相關的參數,例如虛擬區域網(Virtual Area Network,VLAN)或是優先等級(Priority)等參數。當刪除媒體存取控制位址以及對應的時效處理參數時,這些參數亦同時被刪除。When the connection state of one of the ports 111 to 11n is interrupted, the processing unit 130 further deletes all the aging processing parameters of the network device corresponding to the connection port whose connection state is interrupted in the address check table. In fact, the address check table also corresponds to media access control address storage related parameters, such as virtual area network (VLAN) or priority (Priority) and other parameters. When the media access control address and the corresponding aging processing parameters are deleted, these parameters are also deleted at the same time.

以下則以一實施例例示本發明之技術內容。下述表1為本發明於一實施例中的位址檢查表的部份內容: Hereinafter, the technical content of the present invention will be exemplified by an embodiment. Table 1 below is part of the address check table in one embodiment of the present invention:

在本實施例中,位址檢查表具有M+1個儲存空間(對應於M+1個列)。為了簡單說明,上述表1中僅列出連接埠、時效處理參數以及媒體存取控制(以下稱MAC)位址。而在本實施例 中,網路交換器10分別利用連接埠111連接MAC位址為a的網路裝置;連接埠112連接MAC位址為b、c的兩個網路裝置;以及連接埠11n連接MAC位址為x、y及z的網路裝置。而上述的MAC位址以及對應的連接埠之資訊則由於連接網路交換器10的時間不同,而分別存放於如表1所示的各個儲存空間中。時效處理參數則隨則時間而增加,例如一秒增加數值1。當時效處理參數之一超過一設定值(例如60)時,處理單元130則將包括超過設定值的時效處理參數之儲存空間清空。In this embodiment, the address check table has M+1 storage spaces (corresponding to M+1 columns). For the sake of simplicity, only the ports, aging parameters, and media access control (hereinafter referred to as MAC) addresses are listed in Table 1 above. In this embodiment The network switch 10 uses the port 111 to connect to the network device with the MAC address a; the port 112 connects the two network devices with the MAC address b and c; and the port 11n connects the MAC address to Network devices for x, y, and z. The MAC address and the corresponding port information are stored in the respective storage spaces as shown in Table 1 because of the different time of connecting to the network switch 10. The aging processing parameter increases with time, for example, the value of 1 is increased by one second. When one of the aging processing parameters exceeds a set value (for example, 60), the processing unit 130 empties the storage space including the aging processing parameters exceeding the set value.

當連接埠113的連線狀態為中斷時(例如由偵測單元偵測得到,並傳送通知信號至處理單元130),處理單元130則將位址檢查表從頭開始掃描M+1個儲存空間,並將所有透過連接埠113連接的資訊(例如時效處理參數以及MAC位址)皆刪除,以釋放記憶單元120的空間。刪除後的上述資訊後的位址檢查表則如下表2所示: When the connection state of the port 113 is interrupted (for example, detected by the detecting unit and the notification signal is transmitted to the processing unit 130), the processing unit 130 scans the M+1 storage space from the beginning of the address check table. All the information (such as the aging processing parameters and the MAC address) connected through the port 113 is deleted to release the space of the memory unit 120. The address check table after the above information is deleted is shown in Table 2 below:

也就是說,位址檢查表中原先儲存位址d、e及f的第7、8以及M-1個儲存空間皆由於上述的刪除動作而清空,而非等到時效處理參數的數值超過設定值才清空對應的儲存空間。由於網路裝置(例如電腦主機)關機或是從對應的連接埠拔除的動作皆會造成連接狀態中斷,因此網路交換器10中的位址檢查表則可藉 著上述的刪除/清空動作更即時的釋放記憶單元120的記憶空間。更由於原先連結主機而後拔除的連接埠可能在與主機斷線後接上了其他的主機,在這樣的情況中,上述的動作亦可降低封包誤傳的可能。以下則將配合圖式及實施例說明上述的情況。In other words, the seventh, eighth, and M-1 storage spaces in the address check table that originally stored the addresses d, e, and f are all cleared due to the above-mentioned deletion action, instead of waiting until the value of the aging processing parameter exceeds the set value. Only the corresponding storage space is emptied. Since the network device (such as a computer host) is turned off or removed from the corresponding port, the connection state is interrupted, so the address check table in the network switch 10 can be borrowed. The above-described delete/clear action releases the memory space of the memory unit 120 more immediately. Moreover, since the connection port that was originally connected to the host and then removed may be connected to another host after being disconnected from the host, in such a case, the above action may also reduce the possibility of packet mistransmission. The above will be described below in conjunction with the drawings and the embodiments.

圖2為根據本發明一實施例所繪示網路交換器與網路及網路裝置的關係圖。請參照圖2,在本實施例中,網路裝置即為主機210~230,而主機210~230則分別透過連接埠111~113連接至網路交換器10,其中網路交換器20則連接於主機220與網路交換器10的連接埠112之間。而在本實施例中,主機230經由使用者的控制,從連接埠113上拔除,轉而與主機220相同透過網路交換器20與網路交換器10的連接埠112連接。而原先與主機230連接的連接埠113上則又因使用者的控制連接了主機240。2 is a diagram showing the relationship between a network switch and a network and a network device according to an embodiment of the invention. Referring to FIG. 2, in the embodiment, the network devices are hosts 210-230, and the hosts 210-230 are respectively connected to the network switch 10 through ports 111-113, wherein the network switch 20 is connected. Between the host 220 and the port 112 of the network switch 10. In the present embodiment, the host 230 is unplugged from the port 113 via the user's control, and is connected to the port switch 112 of the network switch 10 via the network switch 20 in the same manner as the host 220. The port 113 originally connected to the host 230 is connected to the host 240 by the user's control.

若是網路交換器10僅具有上述之時效處理機制,則在時效處理機制的設定時間之前,網路交換器10中的位址檢查表中仍紀錄有著主機230之MAC位址對應於連接埠113的紀錄。因此,時效處理機制的設定時間之前,網路交換器10仍會將所有由網路30接收,目的地為主機230的MAC位址的封包傳送至連接埠113。由於主機240接收到目的地非為主機240之MAC位址的封包則將直接丟棄,上述的封包則會因此成為遺失的封包。直到到達網路交換器10的設定時間時,或是主機230的位址重新被網路交換器10時(例如主機230主動發送一訊息至遠端的網路裝置等),網路交換器10才會啟動時效處理機制,或是根據主機230 主動發送之訊息,清除主機230的MAC位址,或更新主機230的MAC位址及其對應之連接埠(連接埠112)。上述的設定時間可能根據實施狀況而不同,當設定時間為例如一小時等較長的時間時,欲傳送目的地為主機230之封包的來源(source)可能重傳無數次,仍無法將上述之封包傳遞至主機230。而主機230主動發送訊息至網路交換器10的時間則根據使用者於主機230的活動而定,亦無法精確的估計。If the network switch 10 only has the above-mentioned aging processing mechanism, the MAC address of the host 230 is still recorded in the address check table in the network switch 10 before the set time of the aging processing mechanism corresponds to the port 113. Record. Therefore, before the set time of the aging processing mechanism, the network switch 10 will still transmit all packets received by the network 30 and destined for the MAC address of the host 230 to the port 113. Since the host 240 receives the packet whose destination is not the MAC address of the host 240, it will directly discard it, and the above packet will thus become a lost packet. Until the set time of the network switch 10 is reached, or when the address of the host 230 is re-used by the network switch 10 (for example, the host 230 actively sends a message to the remote network device, etc.), the network switch 10 Will the aging mechanism be activated, or according to the host 230 The message sent actively, clears the MAC address of the host 230, or updates the MAC address of the host 230 and its corresponding port (port 112). The set time may be different depending on the implementation status. When the set time is a long time such as one hour, the source of the packet destined for the host 230 may be retransmitted numerous times, and the above is still not possible. The packet is passed to the host 230. The time when the host 230 actively sends a message to the network switch 10 depends on the activity of the user on the host 230, and cannot be accurately estimated.

而當圖2所示實施例中之網路交換器10具有本發明所提出的技術內容時,當使用者從連接埠113把主機230拔除時,網路交換器10便可偵測得到連接埠113的連接狀態為中斷,進而掃描位址檢查表中與連接埠113相連接的MAC位址,亦即主機230的MAC位址,並且刪除其位址與相關資訊。When the network switch 10 in the embodiment shown in FIG. 2 has the technical content proposed by the present invention, when the user removes the host 230 from the port 113, the network switch 10 can detect the connection. The connection status of 113 is an interrupt, and then the MAC address of the address check table connected to the port 113, that is, the MAC address of the host 230, is scanned, and its address and related information are deleted.

而當網路交換器10從網路30接收到目的地為主機230的MAC位址之封包時,由於位址檢查表中並未具有主機230的MAC位址的任何資訊,網路交換器10則會對連接埠111~113以廣播(Broadcast)的方式傳送上述之封包。而當主機230接收此封包時,主機230便會回覆一訊息至網路交換器10,使得網路交換器10可判斷得知目前網路交換器10是以連接埠112連接至主機230。網路交換器10便藉此更新位址檢查表,將主機230的MAC位址及對應連接埠112的內容紀錄於位置檢查表中。如此一來,透過本發明所提出的內容,網路交換器10則可以更即時的更新位址檢查表,使得記憶體空間的運用效率提高,更可降低封包誤傳 的可能。When the network switch 10 receives the packet destined for the MAC address of the host 230 from the network 30, the network switch 10 does not have any information of the MAC address of the host 230 in the address check table. The above packets are transmitted to the ports 111 to 113 in a broadcast manner. When the host 230 receives the packet, the host 230 will reply a message to the network switch 10, so that the network switch 10 can determine that the current network switch 10 is connected to the host 230 by the port 112. The network switch 10 thereby updates the address check table to record the MAC address of the host 230 and the contents of the corresponding port 112 in the location check list. In this way, through the content of the present invention, the network switch 10 can update the address check table more instantaneously, so that the use efficiency of the memory space is improved, and the packet mistransmission can be reduced. Possible.

上述之內容僅為根據本發明一實施例所進行之例示,詳細的實施步驟及流程可能根據實施時之實際狀況而有所更動,本發明並不限定於上述之內容。The above is merely an exemplification according to an embodiment of the present invention, and detailed implementation steps and procedures may be modified according to actual conditions at the time of implementation, and the present invention is not limited to the above.

值得一提的是,本發明中的處理單元(如圖1所示處理單元130)可由實體電路實現,亦可由一般用途之處理器搭配程式碼而實現,本發明並不限定於上述。但由實體電路所實現的處理單元130在對位址檢查表進行更新/刪除之動作之執行速度則優於利用處理器搭配程式碼的實施方式。而於上述實施例所提及的偵測單元,本領域具通常知識者亦可由目前網路交換器中的偵測元件簡單改變完成,因此,相對於習知技術中的網路交換器,本發明所提供的網路交換器並無增加過多的硬體成本。It should be noted that the processing unit (the processing unit 130 shown in FIG. 1) in the present invention may be implemented by a physical circuit, or may be implemented by a general-purpose processor with a code, and the present invention is not limited to the above. However, the processing unit 130 implemented by the physical circuit performs an update/delete operation on the address check table, which is faster than the implementation using the processor collocation code. The detection unit mentioned in the above embodiment can be easily changed by the detection component in the current network switch, and therefore, compared with the network switch in the prior art, The network switch provided by the invention does not add excessive hardware cost.

本發明亦提供一種適用於網路交換器的資料更新方法。圖3為根據本發明一實施例所繪示資料更新方法的流程步驟圖。請參照圖3,首先,在步驟S301時,以多個連接埠連接多個網路裝置,其中網路裝置分別具有一媒體存取控制位址。然後在步驟S302時,儲存位址檢查表,其中位址檢查表用以紀錄網路裝置的媒體存取控制位址及對應連接的連接埠。在步驟S303,也是當連接埠之一的連接狀態為中斷時,刪除位址檢查表中所有對應於連接狀態為中斷之連結埠的網路裝置的媒體存取控制位址。而本方法的詳細實施內容則可參考上述圖1~圖2的說明,在此則不贅述。The invention also provides a data update method suitable for a network switch. FIG. 3 is a flow chart showing a method for updating a data according to an embodiment of the invention. Referring to FIG. 3, first, in step S301, a plurality of network devices are connected by a plurality of ports, wherein the network devices respectively have a media access control address. Then, in step S302, an address check table is stored, wherein the address check table is used to record the media access control address of the network device and the connection port of the corresponding connection. In step S303, when the connection state of one of the ports is interrupted, all the media access control addresses of the network devices corresponding to the connection ports whose connection states are interrupted are deleted in the address check table. For detailed implementation of the method, reference may be made to the description of FIG. 1 to FIG. 2 above, and details are not described herein.

綜上所述,本發明提供一種網路交換器及資料更新方法,可以以不增加過多硬體成本或計算複雜度的情況下,根據網路交換器的連接埠之連接狀態,即時更新網路交換器中的位址檢查表,使得網路交換器中的記憶單元/記憶體之使用效率更為提昇,並且同時降低了封包誤傳的可能。同時,本發明所提出的技術內容亦可與習知技術中的時效處理機制或其他更新機制並用,以達到更完整之效用。In summary, the present invention provides a network switch and a data update method, which can update the network in real time according to the connection state of the network switch without increasing the hardware cost or the computational complexity. The address check table in the switch makes the memory unit/memory in the network switch more efficient, and at the same time reduces the possibility of packet mistransmission. At the same time, the technical content proposed by the present invention can also be combined with the aging processing mechanism or other updating mechanism in the prior art to achieve more complete utility.

10‧‧‧網路交換器10‧‧‧Network Switch

111~11n‧‧‧連接埠111~11n‧‧‧Connector

120‧‧‧處理單元120‧‧‧Processing unit

130‧‧‧記憶單元130‧‧‧ memory unit

Claims (10)

一種網路交換器,包括:多個連接埠,連接多個網路裝置,其中該些網路裝置分別具有一媒體存取控制(Media Access Control,MAC)位址;一記憶單元,用以儲存一位址檢查表,其中該位址檢查表用以紀錄該些網路裝置的媒體存取控制位址及對應連接的該連接埠;一處理單元,連接該些連接埠以及該記憶單元,其中當該些連接埠之一的一連接狀態為中斷時,該處理單元刪除該位址檢查表中所有對應於該連接狀態為中斷的該連接埠的該些網路裝置的媒體存取控制位址,其中該位址檢查表更包括多個時效處理參數,分別對應於該些網路裝置的媒體存取控制位址,當該處理單元於一預定時間內未從具有該些媒體存取控制位址之一的該網路裝置接收一網路封包時,該處理單元增加對應於該媒體存取控制位址的該時效處理參數的數值。 A network switch includes: a plurality of ports connected to a plurality of network devices, wherein the network devices respectively have a Media Access Control (MAC) address; and a memory unit for storing An address check table, wherein the address check table is used to record the media access control address of the network device and the connection port of the corresponding connection; a processing unit is connected to the connection port and the memory unit, wherein When a connection status of one of the ports is interrupted, the processing unit deletes all media access control addresses of the network devices in the address check table corresponding to the connection port whose connection status is interrupted. The address check table further includes a plurality of aging processing parameters respectively corresponding to the media access control addresses of the network devices, and the processing unit does not have the media access control bits within a predetermined time. When the network device of one of the addresses receives a network packet, the processing unit increments the value of the aging processing parameter corresponding to the media access control address. 如申請專利範圍第1項所述的網路交換器,其中:該些網路裝置分別為一主機或一路由裝置。 The network switch according to claim 1, wherein the network devices are respectively a host or a routing device. 如申請專利範圍第1項所述的網路交換器,其中:當該些時效處理參數之一大於一設定值時,該處理單元刪除對應於大於該設定值的該時效處理參數之該媒體存取控制位址。 The network switch of claim 1, wherein: when one of the aging processing parameters is greater than a set value, the processing unit deletes the media storage corresponding to the aging processing parameter greater than the set value. Take the control address. 如申請專利範圍第3項所述的網路交換器,其中: 當該些連接埠之一的該連接狀態為中斷時,該處理單元更刪除該位址檢查表中所有對應於該連接狀態為中斷的該連接埠的該些網路裝置的該些時效處理參數。 The network switch as described in claim 3, wherein: When the connection status of one of the ports is interrupted, the processing unit further deletes all the aging processing parameters of the network devices in the address check table corresponding to the connection port whose connection status is interrupted. . 如申請專利範圍第1項所述的網路交換器,其中所述的網路交換器更包括:一偵測單元,耦接至該些連接埠以及該處理單元,用以偵測該些連接埠的該連接狀態,當該些連接埠之一的該連接狀態為中斷時,該偵測單元對應該連接狀態為中斷的該連接埠傳送一通知信號至該處理單元,其中,當該處理單元接收該通知信號時,該處理單元根據該通知信號刪除該位址檢查表中所有對應於該連接狀態為中斷的該連接埠的該些網路裝置的媒體存取控制位址。 The network switch of claim 1, wherein the network switch further includes: a detecting unit coupled to the ports and the processing unit for detecting the connections In the connection state of the port, when the connection state of one of the ports is interrupted, the detecting unit transmits a notification signal to the processing unit corresponding to the connection port whose connection state is interrupted, wherein the processing unit Upon receiving the notification signal, the processing unit deletes, according to the notification signal, all media access control addresses of the network devices in the address check table corresponding to the connection port whose connection status is interrupted. 一種資料更新方法,適用於一網路交換器,所述資料更新方法包括:以多個連接埠連接多個網路裝置,其中該些網路裝置分別具有一媒體存取控制位址;儲存一位址檢查表,其中該位址檢查表用以紀錄該些網路裝置的媒體存取控制位址及對應連接的該連接埠,該位址檢查表包括多個時效處理參數,分別對應於該些網路裝置的媒體存取控制位址,當於一預定時間內未從具有該些媒體存取控制位址之一的該網路裝置接收一網路封包時,增加對應於該媒體存取控制位址的該時效處理參數的數值;以及 當該些連接埠之一的一連接狀態為中斷時,刪除該位址檢查表中所有對應於該連接狀態為中斷之該連接埠的該些網路裝置的媒體存取控制位址。 A data update method is applicable to a network switch, and the data update method includes: connecting a plurality of network devices by using a plurality of ports, wherein the network devices respectively have a media access control address; storing one An address check table, wherein the address check table is used to record the media access control address of the network device and the connection port of the corresponding connection, the address check table includes a plurality of aging processing parameters, respectively corresponding to the The media access control address of the network device is increased corresponding to the media access when the network packet is not received from the network device having one of the media access control addresses within a predetermined time. The value of the aging processing parameter of the control address; When a connection status of one of the ports is interrupted, all media access control addresses of the network devices in the address check table corresponding to the connection port whose connection status is interrupted are deleted. 如申請專利範圍第6項所述的資料更新方法,其中:該些網路裝置分別為一主機或一路由裝置。 The method for updating data according to claim 6, wherein the network devices are respectively a host or a routing device. 如申請專利範圍第6項所述的資料更新方法,其中更包括:當該些時效處理參數之一大於一設定值時,刪除對應於大於該設定值的該時效處理參數之該媒體存取控制位址。 The method for updating data according to claim 6, wherein the method further comprises: deleting one of the aging processing parameters when the one of the aging processing parameters is greater than a set value, and deleting the media access control corresponding to the aging processing parameter greater than the set value. Address. 如申請專利範圍第8項所述的資料更新方法,其中所述當該些連接埠之一的該連接狀態為中斷時,刪除該位址檢查表中所有對應於該連接狀態為中斷之該連接埠的該些網路裝置的媒體存取控制位址的步驟更包括:刪除對應於該連接狀態為中斷之該連接埠的該些網路裝置的該些時效處理參數。 The method for updating data according to claim 8, wherein when the connection state of one of the ports is interrupted, deleting all the connections in the address check table corresponding to the connection state is interrupted. The step of media access control address of the network devices of the network device further includes: deleting the aging processing parameters corresponding to the network devices of the connection port whose connection status is interrupted. 如申請專利範圍第6項所述的資料更新方法,其中所述儲存該位址檢查表的步驟後,所述資料更新方法更包括:偵測該些連接埠的該連接狀態,當該些連接埠的該連接狀態為中斷時,對應該連接狀態為中斷的該連接埠產生一通知信號;以及根據該通知信號,刪除該位址檢查表中所有對應於該連接狀態為中斷之該連接埠的該些網路裝置的媒體存取控制位址。 The method for updating data according to claim 6, wherein after the step of storing the address check table, the data update method further comprises: detecting the connection status of the ports, when the connections are When the connection state is interrupted, a notification signal is generated for the connection port whose connection state is interrupted; and according to the notification signal, all the connection ports in the address check table corresponding to the connection state being interrupted are deleted. The media access control address of the network devices.
TW102107928A 2013-03-06 2013-03-06 Network switch and data updating method TWI505675B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW102107928A TWI505675B (en) 2013-03-06 2013-03-06 Network switch and data updating method
CN201310127786.9A CN104038426A (en) 2013-03-06 2013-04-12 Network switch and data updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102107928A TWI505675B (en) 2013-03-06 2013-03-06 Network switch and data updating method

Publications (2)

Publication Number Publication Date
TW201436509A TW201436509A (en) 2014-09-16
TWI505675B true TWI505675B (en) 2015-10-21

Family

ID=51469018

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102107928A TWI505675B (en) 2013-03-06 2013-03-06 Network switch and data updating method

Country Status (2)

Country Link
CN (1) CN104038426A (en)
TW (1) TWI505675B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819491B (en) * 2019-03-21 2021-07-06 创新维度科技(北京)有限公司 Handover control method, base station, and storage medium
CN115412431A (en) * 2021-05-10 2022-11-29 瑞昱半导体股份有限公司 Network switch and abnormality detection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW383525B (en) * 1998-10-14 2000-03-01 Macronix Int Co Ltd Adaptive management method for multi-addressing random table
TW431096B (en) * 1997-09-23 2001-04-21 Compaq Computer Corp A network switch including bonded ports for increased bandwidth
TW200939692A (en) * 2008-03-14 2009-09-16 Univ Nat Pingtung Sci & Tech Object network management method capable of self-tracing with high efficiency

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009239767A (en) * 2008-03-28 2009-10-15 Alaxala Networks Corp Ring monitoring apparatus and network system
JP4697268B2 (en) * 2008-07-02 2011-06-08 沖電気工業株式会社 Communication control device and communication control system
CN101340377B (en) * 2008-07-30 2011-04-20 华为技术有限公司 Method, apparatus and system for data transmission in double layer network
CN101510837B (en) * 2009-04-01 2012-10-10 福建星网锐捷网络有限公司 Ethernet bridge equipment, method and equipment for migrating polymerization mouth address
CN101572668B (en) * 2009-05-21 2012-10-10 中兴通讯股份有限公司 Method for deleting MAC addresses and device therefor
CN102694876A (en) * 2012-05-10 2012-09-26 北京星网锐捷网络技术有限公司 Method and device for determining effectiveness of learned MAC (Media Access Control) address and gateway equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW431096B (en) * 1997-09-23 2001-04-21 Compaq Computer Corp A network switch including bonded ports for increased bandwidth
TW383525B (en) * 1998-10-14 2000-03-01 Macronix Int Co Ltd Adaptive management method for multi-addressing random table
TW200939692A (en) * 2008-03-14 2009-09-16 Univ Nat Pingtung Sci & Tech Object network management method capable of self-tracing with high efficiency

Also Published As

Publication number Publication date
TW201436509A (en) 2014-09-16
CN104038426A (en) 2014-09-10

Similar Documents

Publication Publication Date Title
US11057404B2 (en) Method and apparatus for defending against DNS attack, and storage medium
CN108712459B (en) Protocol message cross-layer communication method and device and electronic equipment
US8908564B2 (en) Method for Media Access Control address learning and learning rate suppression
EP3042298B1 (en) Universal pci express port
EP3691205B1 (en) Traffic forwarding method and traffic forwarding apparatus
JP5088162B2 (en) Frame transmission apparatus and loop determination method
US20190116132A1 (en) Mirror packet control method and mirror packet control device
CN103201982A (en) Managing MAC moves with secure port groups
JP4974964B2 (en) Intelligent failover in a load-balanced network environment
US8432788B2 (en) Intelligent failback in a load-balanced networking environment
WO2017157318A1 (en) Link discovery method and apparatus
WO2018032869A1 (en) Method and device for controlling multicast transmission
US20140092725A1 (en) Method and first network node for managing an ethernet network
JP5889218B2 (en) Data transfer apparatus and data transfer method
TWI505675B (en) Network switch and data updating method
CN102546587B (en) Prevent gateway system Session Resources by the method that maliciously exhausts and device
US20150304271A1 (en) Address resolution protocol buffer and buffering method thereof
JP6193155B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND PROGRAM
WO2017071430A1 (en) Message processing method, network card, system, information update method, and server
US9559857B2 (en) Preprocessing unit for network data
JP6593137B2 (en) Packet storage device and packet storage method
CN112653610A (en) Multilayer virtual switch upgrading method and device, electronic equipment and storage medium
CN113286012B (en) ARP (Address resolution protocol) table item maintenance method and device
CN114157602B (en) Method and device for processing message
TWI709309B (en) Network management device and network management method thereof