TWI501593B - Switch test apparatus and test apparatus thereof - Google Patents

Switch test apparatus and test apparatus thereof Download PDF

Info

Publication number
TWI501593B
TWI501593B TW098100368A TW98100368A TWI501593B TW I501593 B TWI501593 B TW I501593B TW 098100368 A TW098100368 A TW 098100368A TW 98100368 A TW98100368 A TW 98100368A TW I501593 B TWI501593 B TW I501593B
Authority
TW
Taiwan
Prior art keywords
switch
ports
packet
test
transmission port
Prior art date
Application number
TW098100368A
Other languages
Chinese (zh)
Other versions
TW201027944A (en
Inventor
Chung Cheng Chen
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 TW098100368A priority Critical patent/TWI501593B/en
Publication of TW201027944A publication Critical patent/TW201027944A/en
Application granted granted Critical
Publication of TWI501593B publication Critical patent/TWI501593B/en

Links

Description

交換機的測試裝置及測試方法Switch test device and test method

本發明是有關於一種交換機的測試裝置及其測試方法,特別是一種有關於內建在交換機中的的測試裝置及其測試方法。The invention relates to a test device for a switch and a test method thereof, in particular to a test device built in a switch and a test method thereof.

隨著時代的進步,人們對於資訊的需求也日益增大。而在這個資訊爆炸的時代,可以提供即時且豐富資訊的網際網路也成為人們日常生活中不可或缺的一種工具。而在近代的網際網路技術中,都使用了交換機(switch)來取代過去使用的集線器(hub),這種使用交換機的網路技術成功的達成網路橋接功能的硬體實現,有效的提升了網際網路的效能。With the advancement of the times, people's demand for information is also increasing. In this era of information explosion, the Internet, which provides instant and rich information, has become an indispensable tool in people's daily lives. In the modern Internet technology, switches are used to replace the hubs used in the past. This network technology using switches successfully achieves the hardware implementation of the network bridging function and effectively improves The effectiveness of the Internet.

而在交換機的量產測試上面,請參照圖1繪示的習知的交換機測試裝置100的示意圖。習知的交換機110的每一個埠P1~P6皆連接到交換機測試設備120。當在進行測試時,交換機測試設備120對交換機110發送封包,並接收交換機110回覆的封包。如果交換機110回覆的封包筆數不等於交換機測試設備120發送的封包筆數,則表示交換機110會掉包。此種習知的交換機測試裝置100的測試方法雖然很簡單,但是用於生產線來進行量產測試時,為數眾多的交換機測試設備120是一筆龐大的開銷,特別是在測試高口數交換機的情況。For the mass production test of the switch, please refer to the schematic diagram of the conventional switch test apparatus 100 shown in FIG. Each of the conventional switches 110, P1 to P6, is connected to the switch test device 120. When the test is in progress, the switch test device 120 sends a packet to the switch 110 and receives the packet replied by the switch 110. If the number of packets replied by the switch 110 is not equal to the number of packets sent by the switch test device 120, it indicates that the switch 110 will drop the packet. Although the test method of the conventional switch test device 100 is simple, when used in a production line for mass production testing, a large number of switch test devices 120 are a huge overhead, especially in the case of testing high-port switches. .

因應上述問題,一種如圖2所繪示的內建有測試電路的交換機200被提出。但是,這種交換機200為了要可以識別目前所處於的模式為測試模式或是正常模式,必須要增加一個控制信號CTRL來控制其所內建的測試電路210。而這個控制信號CTRL必須藉由交換機200的外殼上安裝一顆按鈕來傳送,不但增加生產的成本,並且,這個外接的按鈕也有可能在正常使用下,因為被使用者誤觸而產生誤動作。In response to the above problems, a switch 200 having a test circuit built therein as shown in FIG. 2 is proposed. However, in order for the switch 200 to be able to recognize that the current mode is the test mode or the normal mode, a control signal CTRL must be added to control the built-in test circuit 210. The control signal CTRL must be transmitted by installing a button on the outer casing of the switch 200, which not only increases the cost of production, but also the external button may be used under normal use because of a user's accidental touch.

綜上所述,本發明提供一種交換機的測試方法,藉由偵測一種特殊的端口連結順序,以及利用錯誤資料封包的傳收確認端口接線方式,和利用偵測無正常封包的存在來確認非正常模式,來自動啟動測試模式。除不需要撥切開關進行測試模式切換外,還能有效防止交換機誤入測試模式,而影響到交換機的正常模式的動作。In summary, the present invention provides a test method for a switch, which detects a special port connection sequence, and uses an error data packet to acknowledge the port connection mode, and detects the presence of an abnormal packet to confirm the non-authentication. Normal mode to automatically start the test mode. In addition to the need to switch the switch to test mode switching, it can effectively prevent the switch from entering the test mode, which affects the normal mode of the switch.

本發明提供另一種交換機的測試方法,在自動偵測並進入測試模式後,利用正確資料封包來測試交換機的多數個埠的傳收動作。The present invention provides another test method for a switch. After automatically detecting and entering the test mode, the correct data packet is used to test the majority of the switch's transmission actions.

本發明提供一種交換機的測試裝置,用以藉由偵測一種特殊的端口連結順序,以及錯誤資料封包的傳收,和無偵測正常封包的存在,來啟動測試模式,並利用正確資料封包來測試交換機的多數個埠的傳收動作。The invention provides a test device for a switch, which is used to detect a special port connection sequence, and the transmission of an error data packet, and the presence of a non-detection normal packet, to start the test mode, and use the correct data packet to Test the majority of the switch's transmission actions.

本發明提供一種交換機的測試方法,其中的交換機具有N個傳收端口群,每個傳收端口群具有多數個埠,N為正整數。此交換機的測試方法的步驟包括,在第一預設連接時間內判斷傳收端口群的其中之一的所有埠的連接狀態,並藉以設定該端口群的待機旗標。此時只有一個端口群的所有埠是處於連接狀態,其它端口群的所有埠都是處於非連接狀態。接著,依據待機旗標來發送錯誤資料封包至被連接的埠的其中之一。然後,判斷該端口群發送錯誤資料封包以外的埠的其中之一是否接收到錯誤資料封包。最後,判斷未連接的各傳收端口群逐一於前一端口群完成連接後,是否在第二預設連接時間內改變其連接狀態,且同一個端口群的所有埠,由只有單一埠是連接狀態轉變成所有埠都是連接狀態的時間應該小於第一預設連接時間,且在上述過程中所有端口群均未收到任一筆正常封包,並藉以啟動測試模式。The invention provides a test method for a switch, wherein the switch has N transmission port groups, each of which has a plurality of ports, and N is a positive integer. The testing method of the switch includes determining, in the first preset connection time, the connection status of all the ports of one of the transmission port groups, and thereby setting the standby flag of the port group. At this time, only all ports of one port group are connected, and all ports of other port groups are in a non-connected state. Then, the error data packet is sent to one of the connected ports according to the standby flag. Then, it is determined whether one of the ports other than the error data packet sent by the port group receives the error data packet. Finally, it is determined whether the unconnected each port group is changed one by one after the previous port group completes the connection, whether the connection state is changed within the second preset connection time, and all the ports of the same port group are connected by only a single port. The state transitions to all the time that the connection state is less than the first preset connection time, and all the port groups have not received any normal packets in the above process, and thereby initiate the test mode.

在本發明的一實施例中,上述在第一預設連接時間內判斷傳收端口群的其中之一的所有埠的連接狀態,並藉以設定該端口群待機旗標的步驟包括:當判斷第i個傳收端口群的埠的其中之一被連接,啟動計數時間計數值,其中的i為小於或等於N的正整數。當時間計數值等於第一預設連接時間時,判斷第i個傳收端口群的所有的埠都被連接時,設定待機旗標。In an embodiment of the present invention, the determining, by the first preset connection time, the connection status of all the ports of the one of the transmission port groups, and the step of setting the port group standby flag comprises: when determining the i One of the ports of the transmission port group is connected, and the counting time count value is started, where i is a positive integer less than or equal to N. When the time count value is equal to the first preset connection time, it is determined that all the ports of the i-th transmission port group are connected, and the standby flag is set.

在本發明的一實施例中,上述之判斷未連接的各傳收端口群逐一改變其連接狀態,並藉以啟動測試模式的步驟更包括:當第j個端口群的前一個端口群完成連接後,在第二預設連接時間內,判斷第j個傳收端口群的埠的其中之一是否被連接。若是,歸零並重新啟動計數時間計數值,其中的j為小於或等於N的正整數,且j不等於i。當時間計數值等於第一預設連接時間時,判斷第j個傳收端口群的所有該些埠是否都被連接。最後,當判斷傳收端口群的所有的埠都被連接時,且在上述過程中所有端口群均未收到任一筆正常封包,啟動測試模式。In an embodiment of the present invention, the step of determining that the unconnected each port group changes one by one, and the step of starting the test mode further comprises: when the previous port group of the jth port group is connected And determining, in the second preset connection time, whether one of the 埠 of the j-th transmission port group is connected. If so, return to zero and restart the count time count value, where j is a positive integer less than or equal to N, and j is not equal to i. When the time count value is equal to the first preset connection time, it is determined whether all of the 埠 of the jth transmission port group are connected. Finally, when it is judged that all the ports of the transmission port group are connected, and all the port groups have not received any normal packets in the above process, the test mode is started.

在本發明的一實施例中,上述之交換機的測試方法,其中各傳收端口群中的埠中的任兩個成對連接。In an embodiment of the invention, the above test method of the switch, wherein any two of the ports in each of the transmission port groups are connected in pairs.

在本發明的一實施例中,上述之交換機的測試方法,其步驟更包括:當測試模式啟動時,設定交換機的組態,使交換機中的埠以串聯方式連接。In an embodiment of the present invention, the testing method of the foregoing switch further includes: when the test mode is started, setting a configuration of the switch, so that the switches in the switch are connected in series.

在本發明的一實施例中,上述之交換機的測試方法,其步驟更包括:由串聯的埠的第一個發送M個正確資料封包,其中M為正整數。接著,在第三預設測試時間後,計數在串聯的埠的最後一個所接收到的正確資料封包的數目。最後,比較發送與接收的正確資料封包數目以判定交換機的測試結果。In an embodiment of the present invention, the testing method of the foregoing switch further includes: transmitting, by the first one of the tandem ports, M correct data packets, where M is a positive integer. Next, after the third predetermined test time, the number of correct data packets received in the last one of the series is counted. Finally, the number of correct data packets sent and received is compared to determine the test results of the switch.

本發明另提供一種交換機的測試方法,其中的交換機具有N個傳收端口群,每個傳收端口群具有多數個埠,且各傳收端口群的埠的任兩個成對連接,其中N為正整數,其步驟包括:組態化交換機,使交換機中的埠以串聯方式連接。接著,由串聯的埠的第一個發送M個正確資料封包,其中M為正整數。然後,在第三預設測試時間後計數在串聯的埠的最後一個所接收到的正確資料封包的數目。最後,比較發送與接收的正確資料封包數目以判定交換機的測試結果。The invention further provides a test method for a switch, wherein the switch has N transmission port groups, each of the transmission port groups has a plurality of ports, and any two ports of each port group are connected in pairs, wherein N As a positive integer, the steps include: Configuring the switch so that the ports in the switch are connected in series. Next, M correct data packets are sent by the first one of the series 埠, where M is a positive integer. Then, after the third predetermined test time, the number of correct data packets received in the last one of the series is counted. Finally, the number of correct data packets sent and received is compared to determine the test results of the switch.

本發明還提供一種交換機的測試裝置,內建在交換機中,其中的交換機具有N個傳收端口群,每個傳收端口群具有多數個埠,N為正整數。此交換機的測試裝置包括控制電路、封包產生器、虛擬區域網路設定電路、正常封包偵測器以及封包計數器。控制電路連接這些傳收端口群的埠,用以藉由這些埠傳收資料封包。封包產生器耦接控制電路及上述這些埠,封包產生器受控於控制電路以產生資料封包傳送至上述這些埠的其中之一。虛擬區域網路設定電路耦接控制電路,用以設定交換機的組態。正常封包偵測器用以偵測交換機的任一埠是否有收到任一筆正常封包。封包計數器耦接控制電路,並用以計數控制電路接收的資料封包的數量。The invention also provides a test device for a switch, which is built in a switch, wherein the switch has N transmission port groups, each of the transmission port groups has a plurality of ports, and N is a positive integer. The test device of the switch includes a control circuit, a packet generator, a virtual area network setting circuit, a normal packet detector, and a packet counter. The control circuit connects the ports of the collection port groups to packetize the data packets. The packet generator is coupled to the control circuit and the ports, and the packet generator is controlled by the control circuit to generate a data packet for transmission to one of the ports. The virtual area network setting circuit is coupled to the control circuit for setting the configuration of the switch. The normal packet detector is used to detect whether any of the switches have received any normal packets. The packet counter is coupled to the control circuit and used to count the number of data packets received by the control circuit.

在本發明的一實施例中,上述之封包計數器包括:正確資料封包計數器及錯誤資料封包計數器。正確資料封包計數器耦接控制電路,用以計數最後一個串接埠所收到的正確資料封包的數量。錯誤資料封包計數器耦接該控制電路,用以計數錯誤資料封包的數量。In an embodiment of the invention, the packet counter includes: a correct data packet counter and an error data packet counter. The correct data packet counter is coupled to the control circuit for counting the number of correct data packets received by the last serial port. The error data packet counter is coupled to the control circuit for counting the number of error data packets.

本發明因採用將交換機的所有的埠規劃為多個傳收端口群,並判斷每個傳收端口群的埠的連接時間。再配合傳收錯誤資料封包,以確認交換機接線方式符合測試模式需求,且利用偵測測試模式過程中完全沒有收到正常封包的方法,以再次確認並非為一般工作模式,之後才啟動測試模式。如此一來,使得交換機可以自動進入測試模式。而在交換機正常操作下,也不易誤入測試模式。The present invention adopts planning for all the ports of the switch as a plurality of transmission port groups, and determines the connection time of each of the transmission port groups. Then cooperate with the error data packet to confirm that the switch wiring mode meets the test mode requirements, and the method of detecting the test mode does not receive the normal packet at all, so as to confirm that it is not in the normal working mode, and then start the test mode. As a result, the switch can automatically enter the test mode. In the normal operation of the switch, it is not easy to enter the test mode.

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

以下將針對本發明的交換機測試裝置及其測試方法提出多個實施例來加以說明,並佐以圖示,以期本領域據通常知識者更能了解,並得具以實施。In the following, a plurality of embodiments will be described with reference to the switch test apparatus and its test method of the present invention, and are illustrated by the following, in order to be understood by those skilled in the art and implemented.

首先請參照圖3,圖3繪示本發明的交換機測試裝置300的一實施例。本實施例中的交換機測試裝置300內建在交換機中(未繪示)。交換機測試裝置300包括控制電路310、封包產生器320、虛擬區域網路設定電路330、封包計數器340以及正常封包偵測器350。控制電路310連接交換機的埠P1~PN,而這些埠P1~PN被分屬於多個不同的傳收端口群,用以藉由這些埠P1~PN傳收資料封包。交換機的埠P1~PN的分群方式則請參照圖4繪示的本發明的一實施例的交換機400的示意圖。其中的交換機400的端口P1~P24以每八個埠為一傳收端口群,分成三個傳收端口群411~413。傳收端口群411包括埠P1~P8,傳收端口群412包括埠P9~P16,傳收端口群413則包括埠P17~P24。Referring first to FIG. 3, FIG. 3 illustrates an embodiment of a switch test apparatus 300 of the present invention. The switch testing device 300 in this embodiment is built in a switch (not shown). The switch test apparatus 300 includes a control circuit 310, a packet generator 320, a virtual area network setting circuit 330, a packet counter 340, and a normal packet detector 350. The control circuit 310 is connected to the 埠P1~PN of the switch, and the 埠P1~PN are divided into a plurality of different transmission port groups for transmitting data packets by the 埠P1~PN. For the grouping method of the switch 埠P1~PN of the switch, please refer to FIG. 4 for a schematic diagram of the switch 400 according to an embodiment of the present invention. The ports P1 to P24 of the switch 400 are divided into three transmission port groups 411 to 413 by using each of the eight ports as a transmission port group. The transmission port group 411 includes 埠P1~P8, the transmission port group 412 includes 埠P9~P16, and the transmission port group 413 includes 埠P17~P24.

請重新參照圖3。封包產生器320耦接控制電路310及埠P1~PN。封包產生器320受控於控制電路310以產生資料封包。在圖3的繪示中,封包產生器320傳送資料封包送至埠P1。而請特別注意的,封包產生器320產生的資料封包並不限制一定要傳送到埠P1,也可以傳送到埠P1~PN的其中之一,只要被傳送到的埠是串聯埠的第一個。Please refer back to Figure 3. The packet generator 320 is coupled to the control circuit 310 and the 埠P1 PN. Packet generator 320 is controlled by control circuitry 310 to generate a data packet. In the illustration of FIG. 3, the packet generator 320 transmits a data packet to the port P1. Please note that the data packet generated by the packet generator 320 is not limited to be transmitted to the 埠P1, but may also be transmitted to one of the 埠P1~PN, as long as the transmitted 埠 is the first one of the series 埠.

另外,虛擬區域網路設定電路330耦接控制電路310,用以設定交換機的組態,使交換機中的埠以串聯方式連接。而封包計數器340同樣耦接控制電路310,用以計數控制電路310接收到的資料封包的數量。在此,封包計數器340包括有正確資料封包計數器341以及錯誤資料封包計數器342均耦接至控制電路310。其中,正確資料封包計數器341用以計數最後一個串聯埠收到正確資料封包的數量,而錯誤資料封包計數器342則是用以計數第一個連接的傳收端口群接收到的錯誤資料封包的數量。正常封包偵測器350用以計錄在測試模式偵測過程中,交換機是否有任一埠接收到任一筆正常封包。In addition, the virtual area network setting circuit 330 is coupled to the control circuit 310 for setting the configuration of the switch so that the ports in the switch are connected in series. The packet counter 340 is also coupled to the control circuit 310 for counting the number of data packets received by the control circuit 310. Here, the packet counter 340 includes a correct data packet counter 341 and an error data packet counter 342 coupled to the control circuit 310. The correct data packet counter 341 is used to count the number of correct data packets received by the last serial port, and the error data packet counter 342 is used to count the number of error data packets received by the first connected port group. . The normal packet detector 350 is used to record whether any switch receives any normal packet during the test mode detection process.

上述所謂的正確資料封包以及錯誤資料封包是依據一種所謂的循環冗餘檢查(Cycle Redundancy Check,CRC)的技術來檢驗出資料封包的正確與否。而利用上述循環冗餘檢查來檢驗出資料封包的正確與否的技術為本領域具通常知識者所熟知,此處不多贅述。The so-called correct data packet and error data packet are based on a so-called Cycle Redundancy Check (CRC) technique to check whether the data packet is correct or not. The techniques for verifying the correctness of data packets using the above-described cyclic redundancy check are well known to those of ordinary skill in the art and will not be described here.

在本實施例的交換機測試裝置的整體動作方面,首先,屬於同一個傳收端口群的埠要被全部連接,在此請同時參照圖4。在圖4的繪示中,交換機400要啟動測試動作時,傳收端口群411的埠P1~P8要在第一預設連接時間內由只有單一埠是連接狀態轉變成P1~P8全部是連接狀態,為了達到上述要求,這個連接傳收端口群411的埠P1~P8的方法可以藉由外部連接器421來完成。其中的外部連接器421在連接對應的埠P1~P8後,可使埠P1~P8中的任兩個埠在極短的預設時間內形成成對的連接,並符合上述之在第一預設時間內由只有單一埠是連接狀態轉變成P1~P8全部是連接狀態。也就是連接傳收端口群411與外部連接器421連接後,埠P1與埠P2相連接、埠P3與埠P4相連接、埠P5與埠P6相連接、而埠P7則與埠P8相連接。連接器421可以是4條端口被固定的網路線或是其它連線裝置。In terms of the overall operation of the switch test apparatus of the present embodiment, first, the ports belonging to the same transmission port group are all connected. Please refer to FIG. 4 at the same time. In the illustration of FIG. 4, when the switch 400 is to initiate a test action, the ports P1 to P8 of the port group 411 are to be connected in a first preset connection time from a single connection state to a P1 to P8 connection. State, in order to achieve the above requirements, the method of connecting 埠P1~P8 of the port group 411 can be completed by the external connector 421. After the external connector 421 is connected to the corresponding 埠P1~P8, any two 埠P1~P8 can form a paired connection within a very short preset time, and meet the above requirements in the first pre- The set time is changed from a single state to a connected state to P1 to P8. That is, after the connection port group 411 is connected to the external connector 421, 埠P1 is connected to 埠P2, 埠P3 is connected to 埠P4, 埠P5 is connected to 埠P6, and 埠P7 is connected to 埠P8. The connector 421 can be a network route in which four ports are fixed or other wiring devices.

然而,為了使得交換機的測試裝置300不會誤入測試模式,因此,交換機的測試裝置300設計了一套啟動測試模式的方法。首先,上述的傳收端口群411、412或413的埠P1~P8、P8~P16及P17~P24等同一傳收端口群的埠必須要分別在第一預設連接時間內完成連接。其中,控制電路310會在預設連接時間內判斷傳收端口群411~413的其中之一的所有埠P1~P24的連接狀態,來藉以設定待機旗標。仔細來說,控制電路310判斷傳收端口群411~413的哪一個埠先被連接,並在判斷出有其中的一個埠被連接後(假設為埠P1),啟動計數時間計數值。接著,在當時間計數值等於第一預設連接時間時,控制電路310判斷傳收端口群411的所有埠P1~P8是否都被連接且都無收到正常封包(正常封包偵測器350未被觸發),若判斷結果為是,則設定待機旗標。相反的,若判斷結果為否,則重新使交換機回復正常模式。這樣的設計機制讓交換機400除非搭配使用外部連接器421,否則不易進入測試模式。這是避免交換機誤入測試模式的第一道關卡。However, in order for the test device 300 of the switch not to enter the test mode, the test device 300 of the switch designs a set of methods for starting the test mode. First, the ports of the same transmission port group, such as 埠P1~P8, P8~P16, and P17~P24, of the above-mentioned transmission port group 411, 412 or 413 must be connected within the first preset connection time. The control circuit 310 determines the connection status of all the 埠P1~P24 of one of the transmission port groups 411~413 in the preset connection time to set the standby flag. In detail, the control circuit 310 determines which one of the transmission port groups 411 to 413 is connected first, and starts counting the count value after determining that one of the ports is connected (assuming 埠P1). Then, when the time count value is equal to the first preset connection time, the control circuit 310 determines whether all the 埠P1~P8 of the transmission port group 411 are connected and none of the normal packets are received (the normal packet detector 350 is not Triggered), if the result of the determination is yes, the standby flag is set. Conversely, if the result of the determination is no, the switch is returned to the normal mode. Such a design mechanism makes it difficult for the switch 400 to enter the test mode unless the external connector 421 is used in combination. This is the first level to avoid the switch entering the test mode.

當在待機旗標被設定以後,控制電路310依據待機旗標使封包產生器320發送一個錯誤資料封包至已完成連接的傳收端口群411的其中一個埠(例如為埠P1)。並在與埠P1形成連接的埠P2接收這個錯誤資料封包。若是可以在埠P2上接收到這個錯誤資料封包,則表示交換機400的傳收端口群411確定是連接成要進行測試的狀態,而並非處於正常使用的狀態(交換機在正常使用時,並不會把其埠相互對接)。When the standby flag is set, the control circuit 310 causes the packet generator 320 to send an error data packet to one of the connected port groups 411 (for example, 埠P1) according to the standby flag. And the 资料P2 forming a connection with 埠P1 receives the erroneous data packet. If the error data packet can be received on the 埠P2, it indicates that the transmission port group 411 of the switch 400 determines that the connection is to be tested, and is not in the normal use state (the switch does not function during normal use). Docking them together.)

錯誤資料封包計數器342就是在紀錄控制電路310接收到錯誤資料封包。錯誤資料封包計數器342初始設定其計數值為“0”,在控制電路310由埠P2接收到一個錯誤資料封包時,則錯誤資料封包計數器342遞增其計數值為“1”。另外請注意,若是交換機400在正常模式下,同一傳收端口群內的端口恰巧同一時間連接,因為交換機400會送出錯誤資料封包再確認是否真正處於測試模式,此時,與交換機400連接的交換機或其它裝置接收到此錯誤資料封包時,會將這個錯誤封包過濾掉,並不會轉傳錯誤封包造成正常模式下的誤動作,這也是為何使用錯誤資料封包作為測試模式確認方式的原因。而交換機400也因為收不到此錯誤資料封包而終止測試模式偵測。上述錯誤封包的機制形成避免交換機400誤入測試模式的第二道關卡。The error data packet counter 342 receives the error data packet at the record control circuit 310. The error data packet counter 342 is initially set to have a count value of "0". When the control circuit 310 receives an error data packet from 埠P2, the error data packet counter 342 increments its count value to "1". In addition, please note that if the switch 400 is in the normal mode, the ports in the same transmission port group happen to be connected at the same time, because the switch 400 will send the error data packet and confirm whether it is actually in the test mode. At this time, the switch connected to the switch 400. Or when other devices receive the error data packet, the error packet will be filtered out, and the error packet will not be forwarded, causing a malfunction in the normal mode, which is why the error data packet is used as the test mode confirmation mode. The switch 400 also terminates the test mode detection because the error data packet is not received. The above described error packet mechanism forms a second level that prevents the switch 400 from entering the test mode.

接著,交換機400的傳收端口群412的所有的埠P9~P16也必需藉由外部連接器422在預設連接時間內被連接起來,而接著傳收端口群413的所有的埠P17~P24也必需藉由外部連接器423在預設連接時間內被連接起來。而這些連接及判斷是否完成連接方法,都與上述的傳收端口群411的所有的埠P1~P8的連接相類似,在此不多繁述。而在確定所有的傳收端口群411~413逐一完成上述的連接後,且都無收到正常封包,交換機測試裝置300則啟動測試模式。這是避免交換機誤入測試模式的第三道關卡。Then, all the 埠P9~P16 of the transmission port group 412 of the switch 400 must also be connected by the external connector 422 within the preset connection time, and then all the 埠P17~P24 of the port group 413 are also transmitted. It is necessary to be connected by the external connector 423 within a preset connection time. These connections and the determination of whether or not the connection method is completed are similar to the connections of all the ports P1 to P8 of the above-mentioned transmission port group 411, and are not described here. After all the transmission port groups 411 to 413 are determined to complete the above connection one by one, and no normal packet is received, the switch testing device 300 starts the test mode. This is the third level to avoid the switch entering the test mode.

值得一提的是,傳收端口群的數目與外部連接器的數目是相同的,也就是當傳收端口群的數目為N時,外部連接器的數目也為N,N為正整數。It is worth mentioning that the number of the port group is the same as the number of external connectors, that is, when the number of the port group is N, the number of external connectors is also N, and N is a positive integer.

在進入測試模式後,虛擬區域網路設定電路330設定交換機400的組態,這個設定組態的動作,是要使交換機400中的傳收端口群411~413中的埠P1~P24以串聯方式連接。由於交換機400先前已利用外部連接器421~423使得埠P1與埠P2相互連接、埠P3與埠P4相互連接、....、埠P21與埠P22相互連接及埠P23與埠P24相互連接,因此,虛擬區域網路設定電路330僅需設定埠P2與埠P3相互內部連接、埠P4與埠P5相互內部連接....埠P20與埠P21相互連接及埠P22與埠P23相互連接,如此一來,交換機400的所有的埠P1~P24就可以形成串聯的連接狀態。After entering the test mode, the virtual local area network setting circuit 330 sets the configuration of the switch 400. The action of this setting configuration is to make the 埠P1~P24 in the transmission port group 411~413 in the switch 400 in series. connection. Since the switch 400 has previously used the external connectors 421-423 to connect the 埠P1 and the 埠P2, the 埠P3 and the 埠P4 are connected to each other, the 埠P21 and the 埠P22 are connected to each other, and the 埠P23 and 埠P24 are connected to each other, Therefore, the virtual area network setting circuit 330 only needs to set 埠P2 and 埠P3 to be internally connected to each other, and 埠P4 and 埠P5 are internally connected to each other. 埠P20 and 埠P21 are connected to each other and 埠P22 and 埠P23 are connected to each other, so In the first place, all of the ports P1 to P24 of the switch 400 can form a connected state in series.

請注意,上述的埠P1~P24串聯連接狀態僅只是一個範例,其中的埠P1~P24的串聯順序也可以為P2 P1 P3 P4....或其他的串聯連接狀態,並不表示埠P1~P24一定要照埠的編號順序來串聯。Please note that the above-mentioned 埠P1~P24 series connection status is only an example. The series connection order of 埠P1~P24 can also be P2 P1 P3 P4.... or other series connection status, not indicating埠P1~P24 must be connected in series according to the number order.

在完成了埠P1~P24的串聯連接狀態後,封包產生器320則會開始發送多個正確資料封包至交換機400的串接的埠的第一個,以圖4繪示的例子,封包產生器320發送正確封包資料至埠P1。而這些正確封包資料則會由埠P1沿著串聯的埠P2~P24傳送到串接的埠的最後一個埠P24。After the serial connection state of 埠P1~P24 is completed, the packet generator 320 starts to send a plurality of correct data packets to the first one of the serial ports of the switch 400, as shown in FIG. 4, the packet generator 320 sends the correct packet data to 埠P1. And these correct packet data will be transmitted by 埠P1 along the tandem 埠P2~P24 to the last 埠P24 of the tandem 埠.

正確資料封包計數器341則會計數控制電路310的埠P24所接收的正確封包資料的數目。一旦正確資料封包計數器341所計數出來埠P24所接收的正確封包資料的數目等於封包產生器320所發送的正確資料封包的數目時,表示交換機400無掉包的現象,也就表示受測的交換機400的測試結果為成功。相反的,若是正確資料封包計數器341所計數出來埠P24所接收的正確封包資料的數目不等於封包產生器320所發送的正確資料封包的數目時,表示受測的交換機400的測試結果為失敗。The correct data packet counter 341 counts the number of correct packet data received by 埠P24 of control circuit 310. Once the correct data packet counter 341 counts out, the number of correct packet data received by the P24 is equal to the number of correct data packets sent by the packet generator 320, indicating that the switch 400 has no packet loss, that is, the tested switch 400 The test results are successful. Conversely, if the correct data packet counter 341 counts out and the number of correct packet data received by the P24 is not equal to the number of correct data packets sent by the packet generator 320, it indicates that the test result of the tested switch 400 is a failure.

以下則針對本發明的交換機的測試方法提出兩個不同的實施例來說明,以進一步說明本發明交換機的測試方法的實施方式。In the following, two different embodiments are proposed for the test method of the switch of the present invention to further illustrate the implementation of the test method of the switch of the present invention.

請先參照圖5A及圖5B,圖5A及圖5B繪示本發明的交換機的測試方法的一實施例的流程圖。首先,判斷傳收端口群的其中之一的所有埠的連接狀態,在第一預設連接時間內由只有單一埠是連接狀態轉變成全部埠是連接狀態且都無收到正常封包,且其它傳收端口群的所有埠附都還是處於非連接狀態,並藉以設定待機旗標(步驟S511)。接著,依據待機旗標來發送錯誤資料封包至該傳收端口群的埠的其中之一(步驟S512)。然後,判斷該傳收端口群發送錯誤資料封包以外的埠的其中之一是否接收到錯誤資料封包(步驟S513)。若是步驟S513的判斷結果為否時,交換機停止測試模式,回復正常模式(步驟S530)。相反的,步驟S513的判斷結果為是時,分別判斷未連接的各傳收端口群逐一發生所有埠在第一預設連接時間內的連接狀態且都無收到正常封包(步驟S514)。當所有的傳收端口群的所有埠在預設時間內完成連接且都無收到正常封包後,交換機啟動測試模式(步驟S515)。Please refer to FIG. 5A and FIG. 5B. FIG. 5A and FIG. 5B are flowcharts showing an embodiment of a test method of the switch of the present invention. First, it is determined that the connection state of all the ports of one of the transmission port groups is changed from a single connection state to a connection state to a total connection state in the first preset connection time, and no normal packet is received, and the other All the attachments of the transmission port group are still in the non-connected state, and the standby flag is set (step S511). Next, the error data packet is sent to one of the ports of the transmission port group according to the standby flag (step S512). Then, it is judged whether one of the ports other than the error data packet transmitted by the transmission port group has received the error data packet (step S513). If the result of the determination in step S513 is NO, the switch stops the test mode and returns to the normal mode (step S530). On the other hand, if the result of the determination in step S513 is YES, it is determined that each of the unconnected transmission port groups has a connection state of all the first connection connection times and none of the normal packets are received (step S514). When all the ports of all the transmission port groups complete the connection within the preset time and none of the normal packets are received, the switch starts the test mode (step S515).

在進入測試模式後,設定交換機的組態,使交換機的埠以串聯方式連接(步驟S516)。接著,由串聯的埠的第一個發送M個正確資料封包,其中的M為正整數(步驟S517)。然後,在第三預設測試時間後,計數在串聯的埠的最後一個埠所接收到的正確資料封包的數目R(步驟S518)。完成步驟S518的計數動作後,比較發送正確資料封包的數目M與接收到的正確資料封包的數目R(步驟S519)。當發送正確資料封包的數目M與接收到的正確資料封包的數目R不相等時,表示交換機測試結果為失敗(步驟S521)。相反的,當發送正確資料封包的數目M與接收到的正確資料封包的數目R相等時,表示交換機測試結果為成功(步驟S520)。After entering the test mode, the configuration of the switch is set such that the switches of the switch are connected in series (step S516). Next, M correct data packets are transmitted from the first one of the series connected ,, where M is a positive integer (step S517). Then, after the third preset test time, the number R of correct data packets received at the last frame of the serial port is counted (step S518). After the counting operation of step S518 is completed, the number M of the correct data packets is transmitted and the number R of received correct data packets is compared (step S519). When the number M of transmitted correct data packets is not equal to the number R of received correct data packets, it indicates that the switch test result is a failure (step S521). Conversely, when the number M of transmitted correct data packets is equal to the number R of received correct data packets, it indicates that the switch test result is successful (step S520).

接著請參照圖6A~圖6E並請同時參照圖4,圖6A~圖6E繪示本發明的交換機400的測試方法的另一實施例的流程圖。Referring to FIG. 6A to FIG. 6E and FIG. 4 simultaneously, FIG. 6A to FIG. 6E are flowcharts showing another embodiment of the testing method of the switch 400 of the present invention.

首先請參照圖6A,首先,歸零並重新啟動計數時間計數值(步驟S612),接著判斷在第二預設時間之內,傳收端口群G1的其中之一的埠是否被連接(步驟S613,614),若判斷結果為否,交換機400回到正常模式(步驟S611)。在此假設最早的連接埠出現在傳收端口群G1。若傳收端口群G1的其中之一的埠有被連接時,歸零並重新啟動計數時間計數值(步驟S615)。接著,判斷時間計數值是否等於第一預設連接時間(步驟S616),一旦時間計數值等於第一預設連接時間,則判斷傳輸端口群G1的所有埠是否都被連接,而其他的傳輸端口群G2、G3的所有埠是否都沒有被連接(步驟S617)。若判斷結果為否,則交換機400回到正常模式(步驟S611)。若判斷結果為是,則繼續判斷是否所有埠都無收到正常封包,即正常封包偵測器未被觸發(步驟S618)。若判斷結果為否,則交換機400回到正常模式(步驟S611)。若判斷結果為是,則設定傳收端口群G1的待機旗標=“1”(步驟S619)。First, referring to FIG. 6A, first, return to zero and restart the counting time count value (step S612), and then determine whether the 埠 of one of the transmission port groups G1 is connected within the second preset time (step S613). , 614), if the result of the determination is no, the switch 400 returns to the normal mode (step S611). It is assumed here that the earliest connection port appears in the transmission port group G1. If the 埠 of one of the transmission port groups G1 is connected, it returns to zero and restarts the count time count value (step S615). Next, it is determined whether the time count value is equal to the first preset connection time (step S616), and once the time count value is equal to the first preset connection time, it is determined whether all ports of the transmission port group G1 are connected, and other transmission ports are connected. Whether or not all of the groups G2 and G3 are not connected (step S617). If the result of the determination is no, the switch 400 returns to the normal mode (step S611). If the result of the determination is yes, it is further determined whether all the frames have not received the normal packet, that is, the normal packet detector is not triggered (step S618). If the result of the determination is no, the switch 400 returns to the normal mode (step S611). If the result of the determination is YES, the standby flag of the transmission port group G1 is set to "1" (step S619).

接著請參照圖6B,當待機旗標被設定為“1”時,判斷錯誤資料封包數目EC是否為0(步驟S621),若否,交換機400恢復為正常模式(步驟S611)。若是,傳送一個錯誤資料封包至埠P1(步驟S622),P1為傳收端口群G1的一個埠。接著,判斷錯誤資料封包數目EC是否為1(步驟S623)。若否,交換機400回到正常模式(步驟S611),若是,則再次判斷是否只有傳收端口群G1是連接狀態而傳收端口群G2及G3都未被連接(步驟S624)。若否,交換機400回到正常模式(步驟S611)。若是,則繼續判斷是否所有埠都無收到正常封包,即正常封包偵測器未被觸發(步驟S625)。若判斷結果為否,則交換機400回到正常模式(步驟S611)。若判斷結果為是,則由結點S1繼續執行圖6C繪示的步驟。在上述中的錯誤資料封包數目EC由“0”變成“1”表示由埠P1所傳送的一個錯誤資料封包在與埠P1所連接的埠收到。Next, referring to FIG. 6B, when the standby flag is set to "1", it is judged whether or not the number of error data packets EC is 0 (step S621), and if not, the switch 400 returns to the normal mode (step S611). If so, an error data packet is transmitted to 埠P1 (step S622), and P1 is a port of the transmission port group G1. Next, it is judged whether or not the number of error data packets EC is 1 (step S623). If not, the switch 400 returns to the normal mode (step S611), and if so, it is determined again whether only the transmission port group G1 is in the connected state and the transmission port groups G2 and G3 are not connected (step S624). If not, the switch 400 returns to the normal mode (step S611). If so, it continues to determine whether all the packets have not received the normal packet, that is, the normal packet detector is not triggered (step S625). If the result of the determination is no, the switch 400 returns to the normal mode (step S611). If the result of the determination is YES, the step illustrated in FIG. 6C is continued by the node S1. The number of error data packets EC in the above is changed from "0" to "1" to indicate that an error data packet transmitted by 埠P1 is received at the 连接 connected to 埠P1.

接著請參照圖6C,首先,歸零並重新啟動計數時間計數值(步驟S631),接著判斷在第二預設時間之內,傳收端口群G2的其中之一的埠是否被連接(步驟S632,S633),若判斷結果為否,交換機400回到正常模式(步驟S611)。相反的,若判斷結果為是,歸零並重新啟動計數時間計數值(步驟S634)。接著,判斷時間計數值是否等於第一預設連接時間(步驟5635),若判斷結果為否,等待並停留在步驟S635,若判斷結果為是,則判斷傳收端口群G1、G2的所有埠都被連接,且傳收端口群G3的所有埠都未被連接(步驟S636),若步驟S636的判斷結果為否時,交換機400回到正常模式(步驟S611)。若判斷結果為是,則繼續判斷是否所有埠都無收到正常封包,即正常封包偵測器未被觸發(步驟S637)。若判斷結果為否,則交換機400回到正常模式(步驟S611)。若判斷結果為是,則由結點S2繼續執行圖6D繪示的步驟。Next, referring to FIG. 6C, first, return to zero and restart the counting time count value (step S631), and then determine whether the 埠 of one of the transmission port groups G2 is connected within the second preset time (step S632). , S633), if the result of the determination is no, the switch 400 returns to the normal mode (step S611). Conversely, if the result of the determination is YES, the zero is returned and the count time count value is restarted (step S634). Next, it is determined whether the time count value is equal to the first preset connection time (step 5635). If the determination result is no, wait and stay at step S635. If the determination result is yes, determine all the ports of the transmission port group G1, G2. All are connected, and all the ports of the transmission port group G3 are not connected (step S636). If the result of the determination in step S636 is NO, the switch 400 returns to the normal mode (step S611). If the result of the determination is yes, it continues to judge whether all the frames have not received the normal packet, that is, the normal packet detector is not triggered (step S637). If the result of the determination is no, the switch 400 returns to the normal mode (step S611). If the result of the determination is YES, the step illustrated in FIG. 6D is continued by the node S2.

接著請參照圖6D,首先,歸零並重新啟動計數時間計數值(步驟S641),接著判斷在第二預設時間之內,傳收端口群G3的其中之一的埠是否被連接(步驟S642,S643),若判斷結果為否,交換機400回到正常模式(步驟S611),若判斷結果為是,則歸零並重新啟動計數時間計數值(步驟S644)。接著,判斷時間計數值是否等於第一預設連接時間(步驟S645),若判斷結果為否,等待並停留在步驟S645,若判斷結果為是,則判斷傳收端口群G1、G2、G3的所有埠都被連接(步驟S646)。若步驟S646的判斷結果為否時,交換機400回到正常模式(步驟S611)。若步驟S646的判斷結果為是,則繼續判斷是否所有埠都無收到正常封包,即正常封包偵測器未被觸發(步驟S647)。若判斷結果為否,則交換機400回到正常模式(步驟S611)。若判斷結果為是,則啟動測試模式(步驟S648)。Next, referring to FIG. 6D, first, return to zero and restart the counting time count value (step S641), and then determine whether the 埠 of one of the transmission port groups G3 is connected within the second preset time (step S642). , S643), if the result of the determination is no, the switch 400 returns to the normal mode (step S611), and if the result of the determination is YES, it returns to zero and restarts the count time count value (step S644). Next, it is determined whether the time count value is equal to the first preset connection time (step S645). If the determination result is no, wait and stay at step S645. If the determination result is yes, determine the transmission port groups G1, G2, G3. All the tricks are connected (step S646). If the decision result in the step S646 is NO, the switch 400 returns to the normal mode (step S611). If the result of the determination in step S646 is YES, it continues to determine whether all the frames have not received the normal packet, that is, the normal packet detector is not triggered (step S647). If the result of the determination is no, the switch 400 returns to the normal mode (step S611). If the result of the determination is YES, the test mode is started (step S648).

步驟S613、S632、S642的目的在於避免傳收端口群G1、G2、G3一直沒有埠被連接而讓交換機一直陷在偵測測試模式中。The purpose of steps S613, S632, and S642 is to prevent the transmission port groups G1, G2, and G3 from being connected until the switch is always stuck in the detection test mode.

在本實施例中,步驟S622及S623傳送及檢查一個錯誤資料封包只針對第一個連接的傳收端口群G1做檢查。實際應用上,也可以改為對傳收端口群G2或G3做檢查,或對全部傳收端口群做檢查。In the present embodiment, steps S622 and S623 transmit and check an error data packet for checking only the first connected transmission port group G1. In practical applications, it is also possible to check the transmission port group G2 or G3 or check all the transmission port groups.

在進入測試模式後,則執行圖6E繪示的流程,以下請參照圖6E。首先,設定交換機400的組態,使埠P2、P4、P6、P8、P10、P12、P14、P16、P18、P20、及P22分別連接埠P3、P5、P7、P9、P11、P13、P15、P17、P19、P21及P23(步驟S651)。在完成上述的交換機400的組態的設定步驟後,配合交換機400的埠P1~P24的外部連接器,使交換機400的埠P1~P24形成串聯連接的狀態。After entering the test mode, the process illustrated in FIG. 6E is performed. Please refer to FIG. 6E below. First, set the configuration of the switch 400 so that 埠P2, P4, P6, P8, P10, P12, P14, P16, P18, P20, and P22 are respectively connected to 埠P3, P5, P7, P9, P11, P13, P15, P17, P19, P21, and P23 (step S651). After the configuration steps of the configuration of the switch 400 described above are completed, the external connectors of the switches P1 to P24 of the switch 400 are brought into a state in which the switches P1 to P24 of the switch 400 are connected in series.

在完成了上述的交換機400的組態設定後,歸零並重新啟動計數時間計數值(步驟S652),並傳送至埠P1 1000筆正確資料封包(步驟S653),接著,判斷時間計數值是否等於第三預設測式時間(步驟S654)。若判斷結果為是,檢查埠P24是否收到1000筆正確資料封包,若判斷結果為否,交換機400測試結果錯誤(步驟S656),若判斷結果為是,表示交換機400測試結果正確(步驟S657)。在完成交換機400的測試後,交換機400恢復正常模式(步驟S611)。After the configuration setting of the switch 400 described above is completed, the zero count is reset and the count time count value is restarted (step S652), and transmitted to the 埠P1 1000 correct data packets (step S653), and then, it is determined whether the time count value is equal to The third preset measurement time (step S654). If the result of the determination is yes, check whether 埠P24 receives 1000 correct data packets. If the result of the determination is no, the test result of the switch 400 is incorrect (step S656). If the result of the determination is yes, the test result of the switch 400 is correct (step S657). . After completing the test of the switch 400, the switch 400 resumes the normal mode (step S611).

綜上所述,本發明利用特殊的交換機的埠的連接方式,並利用同一傳輸端口群的埠在預設連接時間內完成連接,來判定是否進入測試模式。除此之外,為了避免所有的電腦同時開機的情況使得交換機在正常模式下誤入測試模式的狀況,還藉由傳送及接收錯誤資料封包以及測試模式偵測過程中不能出現正常封包的方法來避免誤入測試模式。另外,本發明還因應上述的交換機的埠的連接方式提出一種測試方式,以完成交換機的測試。In summary, the present invention utilizes the connection mode of a special switch, and uses the same transmission port group to complete the connection within a preset connection time to determine whether to enter the test mode. In addition, in order to prevent all the computers from being turned on at the same time, the switch enters the test mode in the normal mode, and also transmits and receives the error data packet and the normal packet cannot be detected during the test mode detection process. Avoid entering the test mode. In addition, the present invention also proposes a test mode in accordance with the above-mentioned connection mode of the switch to complete the test of the switch.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above preferred embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

100、300...交換機測試裝置100, 300. . . Switch test set

110、200、400...交換機110, 200, 400. . . switch

120...交換機測試設備120. . . Switch test equipment

210...測試電路210. . . Test circuit

310...控制電路310. . . Control circuit

320...封包產生器320. . . Packet generator

330...虛擬區域網路設定電路330. . . Virtual area network setting circuit

340...封包計數器340. . . Packet counter

350...正常封包偵測器350. . . Normal packet detector

411~413...傳收端口群411~413. . . Transmit port group

341...正確資料封包計數器341. . . Correct data packet counter

342...錯誤資料封包計數器342. . . Error data packet counter

S511~S530、S611~S657...交換機測試步驟S511~S530, S611~S657. . . Switch test procedure

P1~PN...埠P1~PN. . . port

CTRL...控制信號CTRL. . . control signal

圖1繪示的習知的交換機測試裝置100的示意圖。FIG. 1 is a schematic diagram of a conventional switch test apparatus 100.

圖2所繪示的內建有測試電路的交換機200的示意圖。FIG. 2 is a schematic diagram of a switch 200 with a test circuit built therein.

圖3繪示本發明的交換機測試裝置300的一實施例。FIG. 3 illustrates an embodiment of a switch test apparatus 300 of the present invention.

圖4繪示的本發明的一實施例的交換機400的示意圖。FIG. 4 is a schematic diagram of a switch 400 according to an embodiment of the present invention.

圖5A及圖5B繪示本發明的交換機的測試方法的一實施例的流程圖。5A and 5B are flow diagrams showing an embodiment of a test method of a switch of the present invention.

圖6A~圖6E繪示本發明的交換機400的測試方法的另一實施例的流程圖。6A-6E are flow diagrams showing another embodiment of a test method of the switch 400 of the present invention.

S511~S515、S530...交換機測試步驟S511~S515, S530. . . Switch test procedure

Claims (16)

一種交換機的測試方法,將該交換機的埠分為N個傳收端口群,該些傳收端口群具有多數個埠,其中N為正整數,其步驟包括:在當該些傳收端口群的其中之一的任一埠變成連接狀態時,在一第一預設連接時間內判斷其中之一的該傳收端口群的各該埠的連接狀態,並藉以設定一待機旗標;依據該待機旗標,發送一錯誤資料封包至其中之一的該傳收端口群的該些埠的其中之一;判斷該傳收端口群發送該錯誤資料封包以外的該些埠的其中之一是否接收到該錯誤資料封包;以及分別判斷未連接的各該傳收端口群應該逐一完成連接狀態,且同一端口群的所有該些埠應該在一第一預設連接時間內由只有單一埠是連接狀態轉變成全部埠都是連接狀態,且該交換機的各該埠都未收到正常封包,並藉以啟動一測試模式。 A test method for a switch, the switch is divided into N transfer port groups, and the transfer port groups have a plurality of ports, wherein N is a positive integer, and the steps include: when the transfer port groups are When any one of the ports becomes a connected state, determining a connection state of each of the ports of the one of the transmission port groups in a first preset connection time, and thereby setting a standby flag; a flag, sending an error data packet to one of the ports of the one of the transmission port groups; determining whether the one of the ports other than the error data packet sent by the transmission port group is received The error data packet; and respectively determining that the unconnected each of the transmission port groups should complete the connection state one by one, and all the ports of the same port group should be changed by only a single connection state in a first preset connection time All of them are connected, and each of the switches does not receive a normal packet, and thereby initiates a test mode. 如申請專利範圍第1項所述之交換機的測試方法,其中“在該第一預設連接時間內判斷該傳收端口群的所有該些埠的連接狀態,並藉以設定該待機旗標”的步驟包括:當判斷第i個傳收端口群的該些埠的其中之一被連接,啟動計數一時間計數值,其中i為小於或等於N的正整數;以及當該時間計數值等於該第一預設連接時間時,判斷該第i個傳收端口群的所有該些埠都被連接且都無收到正常 封包時,設定該待機旗標。 The test method of the switch according to claim 1, wherein “determining the connection state of all the ports of the transmission port group within the first preset connection time, and thereby setting the standby flag” The step includes: when determining that one of the 埠 of the i-th transmission port group is connected, starting counting a time count value, where i is a positive integer less than or equal to N; and when the time count value is equal to the When the first preset connection time is determined, it is determined that all the ports of the i-th transmission port group are connected and none of them are received normally. When the packet is wrapped, the standby flag is set. 如申請專利範圍第1項所述之交換機的測試方法,其中“判斷未連接的各傳收端口群應該逐一完成連接狀態,且同一端口群的所有該些埠應該在該第一預設連接時間內由只有單一埠是連接狀態轉變成全部埠是連接狀態,並藉以啟動該測試模式”的步驟更包括:當判斷第j個傳收端口群的該些埠的其中之一被連接時,歸零並重新啟動計數該時間計數值,其中的j為小於或等於N的正整數,且j不等於i;當該時間計數值等於該第一預設連接時間時,進行判斷該第j個傳收端口群的所有該些埠是否都被連接且已完成連接的該些埠都無收到正常封包的一埠連接檢查動作;以及當該埠連接檢查動作判斷該些傳收端口群的所有的該些埠都完成連接時,啟動該測試模式。 The test method of the switch according to claim 1, wherein “determining the unconnected each port group should complete the connection state one by one, and all the ports of the same port group should be at the first preset connection time. The step of converting only the single state to the connection state to all, is the connection state, and thereby starting the test mode includes: when it is judged that one of the nodes of the jth transmission port group is connected, Zero and restart counting the time count value, where j is a positive integer less than or equal to N, and j is not equal to i; when the time count value is equal to the first preset connection time, determining the jth pass Whether all of the ports of the port group are connected and the connected ports have not received a connection check action of the normal packet; and when the connection check action determines all of the collection port groups The test mode is initiated when the connections are completed. 如申請專利範圍第1項所述之交換機的測試方法,其中各該傳收端口群中的該些埠中的任兩個成對連接。 The test method of the switch according to claim 1, wherein any one of the ports in each of the collection port groups is connected in pairs. 如申請專利範圍第4項所述之交換機的測試方法,其步驟更包括:當該測試模式啟動時,組態化該交換機,使該交換機中的該些埠以串聯方式連接。 The test method of the switch according to claim 4, the method further comprising: configuring the switch when the test mode is started, so that the ports in the switch are connected in series. 如申請專利範圍第5項所述之交換機的測試方法,其步驟更包括:由串聯的該些埠的第一個發送M個正確資料封包,其 中M為正整數;以及在一第三預設測試時間後,計數在串聯的該些埠的最後一個埠所接收到的該些正確資料封包的數目;以及比較該些正確資料封包發送的數目及接收到的該些正確資料封包的數目以判定該交換機的測試結果。 The method for testing a switch according to item 5 of the patent application, the method further comprising: transmitting, by the first one of the series, the correct data packets, M is a positive integer; and after a third preset test time, counts the number of correct data packets received by the last one of the arrays in series; and compares the number of correct data packets sent And the number of the correct data packets received to determine the test result of the switch. 一種交換機的測試方法,將該交換機的埠分為N個傳收端口群,該些傳收端口群具有多數個埠,且各該傳收端口群的該些埠的任兩個成對連接,其中N為正整數,其步驟包括:設定該交換機的組態,使該交換機中的該些傳收端口群中的該些埠以串聯方式連接;由串聯的該些埠的第一個發送M個正確資料封包,其中M為正整數;在一第三預設測試時間後,計數在串聯的該些埠的最後一個埠所接收到的該些正確資料封包的數目;以及比較該些正確資料封包發送的數目及接收到的該些正確資料封包的數目以判定該交換機的測試結果。 A test method for a switch, the switch is divided into N transfer port groups, the transfer port groups have a plurality of ports, and any two of the ports of the transfer port group are connected in pairs. Where N is a positive integer, and the steps include: setting a configuration of the switch such that the ports in the plurality of transmission port groups in the switch are connected in series; and transmitting the M by the first one of the ports in series a correct data packet, wherein M is a positive integer; after a third predetermined test time, counting the number of correct data packets received by the last one of the arrays in series; and comparing the correct data The number of packets sent and the number of correct data packets received to determine the test result of the switch. 一種交換機的測試裝置,內建在該交換機中,將該交換機的該些埠分為N個傳收端口群,該些傳收端口群具有多數個埠,N為正整數,包括:一控制電路,連接該些傳收端口群的該些埠,用以藉由該些埠傳收資料封包;一封包產生器,耦接該控制電路及該些埠,該封包產生器受控於該控制電路以產生資料封包傳送至該些埠的其 中之一;一虛擬區域網路設定電路,耦接該控制電路,用以設定該交換機的組態;一封包計數器,耦接該控制電路,用以計數該控制電路接收的資料封包的數量;以及一正常封包偵測器,耦接該控制電路,用以偵測該些埠有無接收到正常封包,其中該封包產生器依據一待機旗標,發送一錯誤資料封包至該些傳收端口群的其中之一的該些埠的其中之一。 A test device for a switch is built in the switch, and the ports of the switch are divided into N transmission port groups, and the transmission port groups have a plurality of ports, and N is a positive integer, including: a control circuit And connecting the 埠 of the plurality of transmission port groups for packet transmission by the ;; a packet generator coupled to the control circuit and the 埠, the packet generator is controlled by the control circuit Transmitting it to the sputum by generating a data packet One of the virtual area network setting circuits coupled to the control circuit for setting the configuration of the switch; a packet counter coupled to the control circuit for counting the number of data packets received by the control circuit; And a normal packet detector coupled to the control circuit for detecting whether the normal packet is received, wherein the packet generator sends an error data packet to the transmission port group according to a standby flag One of them is one of those 埠. 如申請專利範圍第8項所述之交換機的測試裝置,其中該控制電路在一第一預設連接時間內判斷該些傳收端口群的其中之一的所有該些埠的連接狀態,並藉以設定該待機旗標。 The test device of the switch of claim 8, wherein the control circuit determines a connection state of all the ones of the one of the plurality of transmission port groups within a first preset connection time, and thereby Set the standby flag. 如申請專利範圍第9項所述之交換機的測試裝置,其中該控制電路分別判斷未連接的各該傳收端口群在上一個傳收端口群完成聯結後,在一第二預設連接時間內開始連結,並開始連結之後所有該些埠,當在該第一預設連接時間內由只有單一埠是連接狀態轉變成全部埠是連接狀態,且已完成連接的該些埠都無收到正常封包時,啟動一測試模式。 The test device of the switch according to claim 9, wherein the control circuit determines that each of the unconnected transceiver port groups is connected in a second preset connection time after the last transmission port group is connected. Start the link, and start all the clicks after the link. When the first preset connection time is changed from a single connection state to a full connection state, all the connections that have completed the connection are not received normally. When the packet is encapsulated, a test mode is started. 如申請專利範圍第8項所述之交換機的測試裝置,其中該控制電路判斷發送該錯誤資料封包的該傳收端口群的該埠以外的該些埠的其中之一是否接收到該錯誤資料封包。 The test device of the switch of claim 8, wherein the control circuit determines whether one of the ports other than the port of the transmission port group that sent the error data packet receives the error data packet. . 如申請專利範圍第8項所述之交換機的測試裝置,其中更包括:N個外部連接器,用以逐一接上交換機的N個傳收端口群,各該傳收端口群分別藉由各該外部連接器在多個不同時間週期中,使該些埠的任兩個成對連接。 The test device of the switch according to claim 8 , further comprising: N external connectors, which are respectively connected to the N transmission port groups of the switch, and each of the transmission port groups respectively The external connector connects any two of the turns in pairs over a plurality of different time periods. 如申請專利範圍第12項所述之交換機的測試裝置,其中當該測試模式啟動時,該虛擬區域網路設定電路組態化該交換機,配合該些外部連接器使該交換機中的該些傳收端口群中的該些埠以串聯方式連接。 The test apparatus of the switch of claim 12, wherein when the test mode is started, the virtual local area network setting circuit configures the switch, and the external connectors are used to enable the transmission in the switch. The ports in the receiving port group are connected in series. 如申請專利範圍第13項所述之交換機的測試裝置,該封包產生器由串聯的該些埠的第一個發送M個正確資料封包,其中M為正整數。 The test apparatus of the switch according to claim 13 , wherein the packet generator transmits M correct data packets by the first one of the plurality of switches in series, wherein M is a positive integer. 如申請專利範圍第14項所述之交換機的測試裝置,該封包計數器計數該控制電路傳收的該些正確資料封包的數量。 The test device of the switch according to claim 14, wherein the packet counter counts the number of the correct data packets transmitted by the control circuit. 如申請專利範圍第14項所述之交換機的測試裝置,其中該封包計數器包括:一正確資料封包計數器,耦接該控制電路,用以計數形成串聯的該些埠的最後一個埠所收到的該些正確資料封包的數目;以及一錯誤資料封包計數器,耦接該控制電路,用以計數完成連接的該些傳收端口群所接收到的錯誤資料封包的數目。The test device of the switch of claim 14, wherein the packet counter comprises: a correct data packet counter coupled to the control circuit for counting the last 埠 received by the tandem The number of the correct data packets; and an error data packet counter coupled to the control circuit for counting the number of error data packets received by the plurality of transmission port groups that complete the connection.
TW098100368A 2009-01-07 2009-01-07 Switch test apparatus and test apparatus thereof TWI501593B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW098100368A TWI501593B (en) 2009-01-07 2009-01-07 Switch test apparatus and test apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW098100368A TWI501593B (en) 2009-01-07 2009-01-07 Switch test apparatus and test apparatus thereof

Publications (2)

Publication Number Publication Date
TW201027944A TW201027944A (en) 2010-07-16
TWI501593B true TWI501593B (en) 2015-09-21

Family

ID=44853352

Family Applications (1)

Application Number Title Priority Date Filing Date
TW098100368A TWI501593B (en) 2009-01-07 2009-01-07 Switch test apparatus and test apparatus thereof

Country Status (1)

Country Link
TW (1) TWI501593B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612850B (en) * 2017-10-17 2020-06-05 盛科网络(苏州)有限公司 Method and device for measuring maximum rate of packet _ out message forwarded by openflow switch
KR102039901B1 (en) * 2018-05-10 2019-11-04 파워테크 테크놀로지 인코포레이티드 Testing device and testing method
TWI716767B (en) 2018-11-20 2021-01-21 和碩聯合科技股份有限公司 Data updating system, embedded electronic device and data updating method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3854125A (en) * 1971-06-15 1974-12-10 Instrumentation Engineering Automated diagnostic testing system
TWI236252B (en) * 2002-12-27 2005-07-11 Hon Hai Prec Ind Co Ltd Apparatus and method for a network testing system
TWI245518B (en) * 2002-11-15 2005-12-11 Hon Hai Prec Ind Co Ltd Traffic generator switch
TWI267267B (en) * 2005-08-26 2006-11-21 Inventec Corp Method for testing Internet connecting apparatus
TW200715765A (en) * 2005-06-02 2007-04-16 Broadcom Corp Policy based routing using a fast filter processor
TW200812293A (en) * 2006-08-18 2008-03-01 Hon Hai Prec Ind Co Ltd XDSL modem testing system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3854125A (en) * 1971-06-15 1974-12-10 Instrumentation Engineering Automated diagnostic testing system
TWI245518B (en) * 2002-11-15 2005-12-11 Hon Hai Prec Ind Co Ltd Traffic generator switch
TWI236252B (en) * 2002-12-27 2005-07-11 Hon Hai Prec Ind Co Ltd Apparatus and method for a network testing system
TW200715765A (en) * 2005-06-02 2007-04-16 Broadcom Corp Policy based routing using a fast filter processor
TWI267267B (en) * 2005-08-26 2006-11-21 Inventec Corp Method for testing Internet connecting apparatus
TW200812293A (en) * 2006-08-18 2008-03-01 Hon Hai Prec Ind Co Ltd XDSL modem testing system and method

Also Published As

Publication number Publication date
TW201027944A (en) 2010-07-16

Similar Documents

Publication Publication Date Title
US10565043B2 (en) Method and apparatus for disconnecting link between PCIE device and host
CN103021154A (en) Wireless meter reading system based on Ad Hoc
US6744398B1 (en) Distancing and positioning systems and methods
TWI501593B (en) Switch test apparatus and test apparatus thereof
CN103678031A (en) Double 2-vote-2 redundant system and method
CN102664755B (en) Control channel fault determining method and device
CN102694692A (en) Fault detecting method and device of distributed equipment
CN104503947B (en) Multipath server and its signal processing method
CN103838656A (en) Computer system and method for operating computer system
US9398614B2 (en) Data collection system, data collection device, wireless communication device, and communication method for collecting data
CN104156335A (en) Method for multiplexing multiple UART interfaces
CN101667953A (en) Reporting method of rapid looped network physical link state and device therefor
US20150244603A1 (en) Determining method and system
CN110719147B (en) High-reliability dual-computer hot standby data acquisition method based on LoRa
TWI706141B (en) Power failure detection system
CN114422412A (en) Equipment detection method and device and communication equipment
JP5779522B2 (en) Communication device, failure determination method, and program
US8520566B2 (en) Network connection method with auto-negotiation mechanism, network apparatus having auto-negotiation mechanism and network connection method
CN104572537B (en) A kind of fault-tolerant master-slave synchronisation serial communication system based on FPGA
CN201966918U (en) Statistical circuit used for fiber channel link state
US20040243728A1 (en) Ensuring maximum reaction times in complex or distributed safe and/or nonsafe systems
TWI551983B (en) Failure detection and switch method for multi-cpu system
JP6984548B2 (en) Battery monitoring device
CN103605593A (en) Fault diagnosis and recovery method and device for heterogeneous system
CN111338993B (en) Hard disk control system