Summary of the invention
The objective of the invention is to overcome that testing efficiency that prior art exists lowly, artificial participates in too much, testing reliability is low, the shortcoming of stable signal transmission difference, in the hope of propose a kind of efficient in producing maintenance process, convenient, low-cost, accurately, the network switching equipment Multi-netmouth switching device shifter and the method for testing of the class of test exchange in large quantity network interface function.
For achieving the above object, the present invention has constructed a kind of network switching equipment Multi-netmouth switching device shifter, comprise Board Under Test, it is characterized in that, also comprise network interface testing equipment, hub (Hub), commutation circuit, interface board, control circuit, computer, test exchange and control circuit;
Described commutation circuit comprises the two relays of putting of straight-through cable, electric capacity, resistance, driver and hilted broadsword, described straight-through cable connects described resistance and electric capacity, the final two signal output parts 1 of putting relay of described hilted broadsword that insert, described straight-through cable and described hilted broadsword be two to be put the relay signal input and links to each other, and it is unsettled that described hilted broadsword pair is put relay signal output 2;
Described network interface testing equipment possesses a network interface, is connected to first network interface of described interface board by the 10/100/1000Base-T straight-through cable, and this is connected to bidirectional data path;
Described computer possesses a network interface and a RS232 serial ports, network interface links to each other with first network interface of described Hub by the 10/100/1000Base-T straight-through cable, this is connected to bidirectional data path, and its RS232 mouth links to each other with described control circuit by twisted-pair feeder, and this is connected to bidirectional data path;
The 2nd~N of described Hub network interface links to each other with described commutation circuit by the 10/100/1000Base-T straight-through cable, and this is connected to bidirectional data path;
Described commutation circuit possesses a 2N-2 network interface contact part and links to each other with described Hub, another part is connected to described interface board by the 10/100/1000Base-T cross cable, control circuit is exported one group of control IO to described commutation circuit simultaneously, and this group IO is an one way signal;
Link to each other by the 10/100/1000Base-T straight-through cable between described Board Under Test and the described interface board.
The network interface testing equipment IP address corresponding with two network interfaces of computer output belongs to the same network segment, has identical subnet mask.The communications protocol of determining is used in communication between control circuit and the computer, so the switching control program that moves on the control circuit can be the program of any kind, as long as support the RS232 communication, and gets final product in accordance with the communications protocol of determining.
By device of the present invention, the network interface that can finish Multi-netmouth power board in the production process of functional test of exchange class Multi-netmouth veneer a plurality of network interfaces automatically fast switches instrument and method of testing.Compare this equipment of use and method of testing with method of testing with existing measuring technology, the functional test that externally provides two computers can automatically finish a plurality of network interfaces of exchange class Multi-netmouth veneer fast cooperates the various performance tests that meet national test specification that certain software and instrument also can be fast automatic.Not only can between a plurality of network interfaces, automatically switch, need not the manual switching network interface.Test speed is fast, efficient is high.And to network interface quantity without limits, can support the multi-path network port test.Under the situation that cooperates instrument, can also support the every performance test of network interface.
Embodiment
Below in conjunction with embodiment the method for the invention is described further.
Network switching equipment Multi-netmouth switching device shifter of the present invention can be regarded as by two parts and form (tested power board network interface maximum number is N):
First: Board Under Test 107, i.e. Multi-netmouth power board.
Second portion: test environment.This environment is made up of control circuit 105, commutation circuit 103, two outside network interfaces (computer 106 or network interface testing equipment 101) and external control system (test exchange and control circuit 108), N mouth Hub102.In actual the answering, the N-1 of a Hub102 network interface is connected with N-1 network interface of Board Under Test 107 by Ethernet 10/100/1000Base-T cross cable respectively, and first network interface of Hub102 and first network interface of Board Under Test 107 insert two outside network interfaces respectively by the Ethernet10/100/1000Base-T straight-through cable.External control system is controlled special-purpose control switching circuit 105 and commutation circuit 103 automaticallyes switch, and carries out various required network interface functional tests by two outside network interfaces after switching is finished.
Fig. 1 is the test composition frame chart of this method.If Multi-netmouth switching board to be measured is up to N network interface, each several part is described as follows:
Network interface testing equipment 101 is computer or other network interface testing equipment of band network interface.An outside network interface of class network port device test in return, the outside network interface that provides with computer 106 constitutes two required external sources of exchange class network port device test, collaborative finishing tested the transmission packet or received packet, moves the network interface test program of the various regulations that cooperate with computer 106 thereon.
Hub102 is the Hub that has N network interface, if Board Under Test is 100,000,000 power boards, then this Hub is 100,000,000 exchange Hub, if Board Under Test is the gigabit power board, then this Hub is gigabit exchange Hub.This Hub guarantees that the network packet from computer 106 can send to commutation circuit 103 N-1 any one that import in the network interface of 103 from Hub102 to the commutation circuit, be about to be connected to simultaneously on N-1 the network interface of commutation circuit 103, at physics for commutation circuit 103 provides input from the netting twine of computer 106.
Commutation circuit 103 is responsible for connecting network interface to be measured.Its function is transferred to interface board 104 for will only allowing within a certain period of time from N-1 the network interface of Hub102 to lead up to, and its response determines to connect that road from the control of one group of IO signal of control circuit 105 by control circuit 105.
Interface board 104 provides N-1 individual 100,000,000 or gigabit network interface socket, is responsible for N-1 bar Ethernet 10/100/1000Base-T cross cable is connected on the corresponding network interface socket, inserts for Board Under Test 107 provides netting twine.
The function of control circuit 105 instructs control circuit 105 to switch for receiving the control signal from computer 106.Carry out communication by the RS232 serial ports between itself and the computer 106.
Computer 106 operations have network interface test program and the test switching control program that matches with network interface testing equipment 101, and it links to each other by the RS232 serial ports with control circuit 105.Be responsible for the processing and the demonstration of test result simultaneously.
Board Under Test 107 is the Multi-netmouth power board.
Fig. 2 is the test flow chart of this method, and the step of the network interface of Multi-netmouth power board being tested with the method for the invention is as follows:
1, test beginning test environment powers up (201);
2, the initialization of test environment and Board Under Test (202);
3, commutation circuit 103 is connected the network path (203) of the first via through control circuit 105;
4, test environment moves conventional network interface test program (national relevant regulations formulate test event) the test first via through the net of control circuit 105 path (204) that falls;
5, the test environment record/(205) show test results;
6, judge whether that according to Board Under Test 107 network interface numbers all network interfaces all finish test, determine next step operation (206) in view of the above;
7, test environment control control circuit 105 disconnects the all-network connection.Connect the connection of next road network path to be measured then.(207);
8, all network interfaces are finished test back arrangement test result, and (208) show test results;
9, EOT, test macro is electricity (209) down;
10, as will begin the test of another piece Multi-netmouth power board the time, repeating step 1~9.
As the core of device of the present invention, the specific implementation of commutation circuit 103 mainly contains two kinds of 100,000,000 commutation circuits and gigabit commutation circuits, below this is elaborated.The realization of 100,000,000 commutation circuits mainly comprises 10/100Base-T straight-through cable 301,22uF electric capacity 302,50 Europe resistance 303, input control IO304, driver 305, the two relays 306 of putting of hilted broadsword as shown in Figure 3.
The changing method of N-1 networking mouth signal is: to the 10/100/Base-T straight-through cable 301 of each bar input, all carry out following processing: 10/100Base-T straight-through cable 301 is input as 8 lines and is respectively T1-T8, therefrom take out T3 and T6, T3 connects 50 Europe resistance 303,22uF electric capacity 302, finally inserts the two signal output parts 1 of putting relay 306 of hilted broadsword.T6 and hilted broadsword be two to be put relay 306 signal input parts and links to each other, and it is unsettled that hilted broadsword pair is put relay 306 signal output parts 2.As shown in Figure 3.The two relay 306 connection signal outputs 1 of putting of hilted broadsword under the normal condition, only when control level when being high, the two relays 306 connection vacant states of putting of hilted broadsword, should connect normal by the corresponding netting twine of group this moment, network communication is normal, otherwise one group of differential signal of this networking line is destroyed, is in off-state.
Only allow a 10/100/Base-T straight-through cable 301 to be in conducting state so at one time, data among the Hub can be determined network interface by on this cable input interface plate certain, thereby finish the purpose of between the network interface of the N-1 on the interface board, switching.
The realization of gigabit commutation circuit mainly comprises 1000Base-T straight-through cable 401,10uF electric capacity 402,50 Europe resistance 403, input control IO404, driver 405, the two relays 406 of putting of hilted broadsword as shown in Figure 4.
The changing method of N-1 networking mouth signal is: to the 1000Base-T straight-through cable 401 of each bar input, all carry out following processing: 1000Base-T straight-through cable 401 is input as 8 lines and is respectively T1-T8, therefrom takes out T3, T6, T7, T8.T3 all is connected 50 Europe resistance 403,10uF electric capacity 402 with T7, finally inserts two relay 406 signal output parts 1 of putting of hilted broadsword.T6 and T8 and hilted broadsword be two to be put relay 406 signal input parts and links to each other, and it is unsettled that hilted broadsword pair is put relay 406 signal output parts 2.As shown in Figure 3.The two relays 406 of putting of hilted broadsword are connected outputs 1 under the normal condition, and only when control level when being high, the two relays 406 of putting of hilted broadsword are connected vacant states, and should connect normally by the corresponding netting twine of group this moment, and network communication is normal.Otherwise one group of differential signal of this networking line is destroyed, is in off-state.
Only allow a 10/100/Base-T straight-through cable 401 to be in conducting state so at one time, data among the Hub102 can be determined network interface by on this cable input interface plate certain, thereby finish the purpose of between the network interface of the N-1 on the interface board 104, switching.
As another important circuit of the present invention, the principle of control circuit 105 and realization are as described in Figure 5, the main C51 of employing chip mating interface circuit constitutes, test with the network exchange veneer of maximum 32 network interfaces is controlled to be example, RS232 serial ports 501 from computer 106 is a duplex channel, and function is for providing communication channel for CS51 single-chip microcomputer and last level controlling system.Because the communication data amount is little, and RS232 serial ports 501 and 106 distances of computer are shorter, adopt the communication of RS232 mode.CS51 single-chip microcomputer 502 adopts P87LPC767, and it is the CMOS type microcontroller of 8051 classifications, and the individual I/O pin in 15 (maximum 18) is arranged, and supports two-way clock/counter, two-way analog comparator, 4 tunnel 8 A/D samplings; Inside has two DPTR, supports the I2C bus; Have the 128Byte ram in slice, EPROM able to programme in the 4K Byte sheet; Can farthest reduce needs to external devices; Function is for resolving 7 I/O controls of RS232 data output; Rest-set flip-flop 503 is used to latch control output; 5-32 decoder 504 transfers 5 inputs to 32 outputs, and guaranteeing at most only has one the tunnel to be output as high level any time, thereby guarantees a road network mouth is only arranged by gating simultaneously; Two inputs and door 505, inverter 506, two inputs or 507,32 control output of door I/O508 export commutation circuit 103 to, and after drive circuit drove, the control two keys relay switched network interface in commutation circuit 103; 7 I/O called after P1~P7 of CS51 output (from left to right being respectively P1-P7 among the figure five below CS51), P1~P5 are that network interface control 5-32 decoder is imported, and the P6 conduct is exported complete zero when resetting pin is for high level fast, switch to the first via, and low level does not have operation.P7 is that high-level strobe latchs.
The output flow process is: 1:P0: low level; 2:P1~P5: controlling value, P6: low level; 3:P7: high level.Clear operation is: 1:P0: low level; 2:P6: high level; 3: postpone 1 millisecond; 4:P6: low level.