1226169 玫、發明說明: 【發明所屬之技術領域】 本發明係關於診斷乙太網路交換電路之技術領域,尤 才曰一種診斷乙太網路交換電路之測試系統及裝置。2 5 【先前技術】 兩、近年來由於網路迅速發展,乙太網路交換電路裝置的 需求越來越大,而目前一般的乙太網路交換裝置中,並不 具有診斷乙太網路交換裝置的功能,尤其在生產製造時, 10 一般的乙太網路交換裝置不能用於測試其他乙太網路交換 電路,而必需使用專用之測試設備,藉由測試設備向待測 之乙太網路交換裝置發出封包,並等待是否收到正確之封 包回應來判斷待測之乙太網路交換裝置的正確性。於此種 測試方式中,所收送之封包均為標準封包,測試設備益法 15判^狀乙太網路交換裝置之種類,因此,對於測試設 :製k者而g,無法規範測試者之使用,亦無法對於測試 没備製造者本身所製造之乙太網路交換裝置的特殊功能提 供專門之測試。 20 【發明内容】 本發明之目的係在提供一種診斷乙太網路交換電路之 測4系統及裝置,俾以解決習知技術之各項缺失。 依據本發明之一特色,所提供之診斷乙太網路交換電 路之測試系統包括··-第一乙太網路交換裝置,和一待測 1226169 晉乙太網路讀裝置’其巾,該第-乙太網路交換裝 讀於一正常模式和一診斷模式’當操作於該正常模 二淮该第—乙太網路交換裝置係依據乙太網路之規範收送 /封包,當中’每—標準封包具有—C職位,該CRC攔 ,,係由封包中之㈣位元組運算*得’ *當操作於該診 果式,該第-乙太網路交換裝置係收送—測試封包該 測試封包之⑽攔位之值係由封包中之w個位元組運算而 ^ ’其中’該待測試之第二乙太網路交換裝置,連接於該 〜乙太網路交換裝置,其可正確接收⑽攔位值由封包中 10之L個位疋組運算而得之一般封包、以及CRC搁位值由封包 1個位元組運算而得之測試封包,並回應該等封包。 依據本發明之另-特色,所提供之診斷乙太網路交換 電路之測試裝置包括··一媒體存取控制單元,其可操作於 -正常&式和__診斷模式’其中’當操作於該正常模式, 15其係依據乙太網路之規範收送標準封包,當中,每一'標準 封包,有一 CRC欄位,該CRC攔位之值係由封包中以個:元 組運算而得,而當操作於該診斷模式,其係收送一測試封 包,該測試封包之CRC攔位之值係由封包中之w個位元組 運算而得,以及,至少一收發單元,連接於該媒體存取控 20制單元,以進行封包之實體收送;以及至少一連接埠,將 該至少一收發單元耦合至一待測試之乙太網路交換裝置, 俾可將測試封包傳送至該待測試之乙太網路交換裝置。 【實施方式】 1226169 為能讓f審查委員能更瞭解本發明之技術内容,特 舉一較佳具體實施例說明如下。 圖1所示為本發明之診斷乙太網路交換裝置之測試裝 置的架構®,其包括有—媒體存取控制(Media Access 5 C〇ntr〇1,MAC)單元101、多個實體收發單元(Phyceiver) =2及多個連接埠1G3,其中,該媒體存取控制單㈣^係負 責乙太網路之封包的收發㈣,料實體收發單元1〇2係連 接於該媒體存取控制單元101,以進行封包之實體收送,每 -連接槔103係連接至-收發單元1〇2,以供透過乙太網路 10連接線將收發單元102耦合至一待測試之乙太網路交換裝 置(圖未示),俾可將封包傳送至該待測試之乙太網路交 換裝置。 前述診斷乙太網路交換裝置之測試裝置的媒體存取 控制單元101可操作於一正常模式和一診斷模式,其中,當 15操作於正常模式時,此測試裝置本身即為一乙太網路交換 電路,其係依據乙太網路之規範收送標準封包,如圖2所示 為一乙太網路之標準封包的格式,其係由(PRE)、目地位 址(DA) γ來源位址(SA)、攔位長度(T/L)、資料櫊位(如41226169 Description of the invention: [Technical field to which the invention belongs] The present invention relates to the technical field of diagnosing Ethernet switching circuits, and more particularly to a test system and device for diagnosing Ethernet switching circuits. 2 5 [Previous Technology] 2. Due to the rapid development of the network in recent years, the demand for Ethernet switching circuit devices is increasing, and the current general Ethernet switching devices do not have diagnostic Ethernet. The function of the switching device, especially during production, 10 general Ethernet switching devices cannot be used to test other Ethernet switching circuits, and special testing equipment must be used. The testing equipment is used to test the Ethernet to be tested. The network switching device sends a packet and waits to see if the correct packet response is received to determine the correctness of the Ethernet switching device under test. In this test method, the packets received are standard packets. The test equipment benefits from 15 types of Ethernet switching devices. Therefore, for the test equipment: the manufacturer of k and g, it is impossible to regulate the tester. It also cannot provide special tests for testing the special functions of the Ethernet switching device manufactured by the manufacturer. [Summary of the Invention] The purpose of the present invention is to provide a test system and a device for diagnosing an Ethernet switching circuit, so as to solve various shortcomings of the conventional technology. According to a feature of the present invention, the provided test system for diagnosing an Ethernet switching circuit includes a first Ethernet switching device, and a test 1226169 Jin Ethernet reading device. The first-Ethernet switching device reads in a normal mode and a diagnostic mode 'When operating in the normal mode, the second-Ethernet switching device sends / packets according to the specifications of Ethernet, among them' Each-standard packet has -C position, the CRC block, is calculated by the * byte in the packet * * When operating in the diagnosis mode, the -Ethernet switching device is sent-tested The value of the block of the test packet is calculated by w bytes in the packet and ^ 'where' the second Ethernet switching device to be tested is connected to the ~ Ethernet switching device, It can correctly receive the normal packet obtained by calculating the bit value of 10 L bits in the packet, and the test packet obtained by calculating the CRC place value by 1 byte of the packet, and respond to these packets. According to another feature of the present invention, the provided test device for diagnosing an Ethernet switching circuit includes a media access control unit that is operable in a -normal & type and __diagnostic mode, where 'when' is operated In this normal mode, 15 is used to send standard packets according to the specifications of Ethernet. Among them, each 'standard packet has a CRC field. The value of the CRC block is calculated by the packet with a tuple: Yes, and when operating in the diagnostic mode, it sends a test packet, and the CRC block value of the test packet is calculated by w bytes in the packet, and at least one transceiver unit is connected to The media access control 20-unit for physical transmission of the packet; and at least one port for coupling the at least one transceiver unit to an Ethernet switching device to be tested, so that the test packet can be transmitted to the Ethernet switching device to be tested. [Embodiment] 1226169 In order to enable the reviewing committee to better understand the technical content of the present invention, a preferred embodiment is described below. Figure 1 shows the architecture of a test device for diagnosing an Ethernet switching device according to the present invention. It includes a Media Access Control Unit (MAC) Unit 101, multiple physical transceiver units (Phyceiver) = 2 and multiple ports 1G3. Among them, the media access control unit ^ is responsible for sending and receiving packets of the Ethernet network. The physical transceiver unit 102 is connected to the media access control unit. 101 for physical transmission of packets, each-connection 槔 103 is connected to-transceiver unit 102 for coupling the transceiver unit 102 to an Ethernet switch to be tested through an Ethernet 10 connection cable Device (not shown), and can send packets to the Ethernet switching device to be tested. The media access control unit 101 of the aforementioned test device for diagnosing the Ethernet switching device can be operated in a normal mode and a diagnostic mode, wherein when 15 is operated in the normal mode, the test device itself is an Ethernet network. Switching circuit, which sends standard packets according to the specifications of Ethernet. Figure 2 shows the format of a standard packet of Ethernet. It consists of (PRE) and destination address (DA). Address (SA), stop length (T / L), data bit (eg 4
Gram)和訊框檢查碼(CRC)等攔位所接續而成,其中,cRC 攔位係用以更正封包之錯誤,而依據乙太網路之規範,crc 攔位值係由封包之攔位起至⑽攔位為止共L個位 一、、、所運^r而彳于(L為正整數),以使得封包被收到時,既 使封包因傳送而造成錯誤,仍可在接收端依據CRC欄位值而 將錯誤更正。 1226169 而當前述診斷乙太網路交換裝置之測試裝置的媒體 存取控制單元101操作於診斷模式時,則進行收送測試封 包,該測試封包之格式係如圖3所示,其所具有之搁位與標 準封包相同,然而,為一乙太網路之標準封包的,測試封 5 ,之CRC攔位值係由封包中之DA攔位起算](個位元組運算而 付,當中,K為正整數,κ妾L,於本較佳實施例,K=L—卜 以岫述診斷乙太網路交換裝置之測試裝置對於乙太 網路交換電路進行診斷時,如圖4所示之系統架構圖,其 中待’則之乙太網路交換裝置42之構造與測試裝置41相 10當,亦具有一媒體存取控制單元401、多個實體收發單元4〇2 及多個連接埠403,該等連接埠4〇3係透過網路線而分別連 接於測試裝置41之對應連接埠103,而使該待測之乙太網路 交換電路42能接收來自測試裝置41所發出之測試封包,而 該乙太網路交換電路42之媒體存取控制單元4〇ι係設計成 15可正確接收CRC攔位值由封包中之l個位元組運算而得之一 般封包、以及CRC攔位值由封包中之卜丨個位元組運算而得 之測.式封包。因此,在測試時,當乙太網路交換電路a收 到封包時,仍視此CRC攔位值由封包中之卜丨個位元組運算 而得之測試封包為正確接收之封包,並回應該封包,而在 2〇非,試時,則依規範收到CRC攔位值由封包中之[個位元組 運算而得之一般封包。 由以上之說明可知,本發明藉由變動封包之CRC欄位 值,以在測試時,可使得乙太網路交換裝置本身可作為一 測試裝置,並可發出專用之測試封包,僅有對應之乙太網 1226169 路交換裂置才能回應此專用測試封包,其餘之乙太網路交 換電路將視此封包為GRG錯狀封包,然而在—般模式下, 路交換裝置之運作衫會受_響,而可達成規範 二喊之使用及對特定乙太網路交換襄置提供測試之目 述實施例僅係為了方便說明而舉例而已,本發明所 主張之權利範ϋ自應以巾請專利範圍 於上述實施例。 《為皁,而非僅限 10 15 【圖式簡單說明】 =係本發明之診斷乙太網路交換裝置之測試袭置的架構 圖2係顯示乙太網路標準封包格式。 圖3係顯示依據本發明之乙太網路測試封包柊弋 圖4係本發明之診斷乙太網路交換裝 圖。 ㈣置之測試系統的架構 【圖號說明】 (101 )( 401 )媒體存取控制單元 20 ( 1〇2 ) ( 402)收發單元 (103 ) ( 403 )連接埠 (41)測試裝置 (42 )待測乙太網路交換農置 9Gram) and frame check code (CRC) are successively formed. Among them, the cRC block is used to correct the error of the packet, and according to the specification of the Ethernet, the crc block value starts from the block of the packet. A total of L digits up to ⑽ block are transported by ^ r (L is a positive integer), so that when a packet is received, even if the packet causes an error due to transmission, it can still be based on the receiving end. The CRC field value will correct the error. 1226169 When the media access control unit 101 of the aforementioned test device for diagnosing the Ethernet switching device operates in the diagnostic mode, it sends and receives a test packet. The format of the test packet is shown in Figure 3, which has The shelf is the same as the standard packet. However, for a standard packet of Ethernet, the test packet is 5 and the CRC block value is calculated from the DA block in the packet. K is a positive integer, κ 妾 L. In the preferred embodiment, K = L—the test device for diagnosing the Ethernet switching device described below is used to diagnose the Ethernet switching circuit, as shown in FIG. 4 The system architecture diagram, in which the structure of the Ethernet switching device 42 is equivalent to that of the testing device 41, and also has a media access control unit 401, multiple physical transceiver units 402, and multiple ports. 403. These ports 403 are respectively connected to corresponding ports 103 of the testing device 41 through a network cable, so that the Ethernet switching circuit 42 to be tested can receive a test packet sent from the testing device 41. And the Ethernet switching circuit 42 The body access control unit 40 is designed so that it can correctly receive the CRC block value, which is a general packet calculated from 1 byte in the packet, and the CRC block value is from the byte in the packet. The test results are obtained by calculation. Therefore, when testing, when the Ethernet switching circuit a receives the packet, it still regards the CRC block value as a test obtained by calculating the bytes in the packet. The packet is a correctly received packet, and the packet is echoed. When the test is not performed, a normal packet obtained by calculating the CRC block value according to the [bytes] in the packet is explained. It can be known that the present invention changes the CRC field value of the packet so that the Ethernet switching device itself can be used as a test device during the test, and a dedicated test packet can be sent, only the corresponding Ethernet 1226169 In order to respond to this special test packet, the circuit switch is split, and the rest of the Ethernet switching circuit will regard this packet as a GRG error packet. However, in the normal mode, the operation shirt of the circuit switch device will be affected and can be achieved. Regulate the use of second shouts and specific Ethernet The description of the test examples provided by the exchange is only for the convenience of explanation, and the scope of the rights claimed in the present invention should be covered by the patents described in the above examples. "For soap, not only 10 15" Brief description of the diagram] = It is the structure of the test setup for diagnosing the Ethernet switching device of the present invention. Figure 2 is a diagram showing the standard Ethernet packet format. Figure 3 is a diagram showing the Ethernet test packet according to the present invention.弋 Figure 4 is a diagram of the diagnostic Ethernet switching device of the present invention. Structure of the test system installed [Illustration of drawing number] (101) (401) Media access control unit 20 (102) (402) Transceiving unit (103) (403) Port (41) Test device (42) Ethernet network farm to be tested 9