Background technology
SFP (miniature pluggable module, Small Form-factor Pluggable) is the hot swappable module that meets a kind of gigabit Ethernet of IEEE802.3ab regulation, and different according to the interface of the agreement of its support and employing, SFP is broadly divided into following classification:
1) 1000BASE-SX SFP adopts the SerDes interface;
2) 1000BASE-SX SFP adopts the SGMII interface;
3) 10/100/1000BASE-T SFP adopts the SGMII interface;
4) 100BASE-FX SFP adopts the SGMII interface;
5) 1000BASE-T SFP adopts the SerDes interface.
Two layers/three-layer network the managed switches of current use is generally carried one or more front end SFP interfaces, uses optical fiber to connect switch and other network equipments to support the user.Simultaneously, the support that provides according to the PHY chip, switch is a certain in the multiple SFP classification supported of its PHY chip in advance with its SFP interface fixed configurations, thereby the SFP interface steady job that makes switch is under a kind of protocol mode, the user uses the optic module of supporting this agreement then, connects other network equipments to switch by the SFP interface.Catalyst 3560 switches with cisco are example: it supports 2 front end SFP interfaces, and the mode of operation of SFP interface is fixed to 1000BASE-SX, and the user can use the 1000BASE-SX optic module to connect other network equipments to switch SFP interface.
But existing switch still has following defective to the support of SFP:
1) fixes the mode of operation of SFP, wasted multiple other mode of operation that the PHY chip is supported.PHY chip BCM 54684 with Broadcom company is an example, and it supports the 1000BASE-SX SFP of SGMII interface, 100BASE-FX SFP, in the SFP of existing switch technical scheme, if fixedly the mode of operation of SFP is a 1000BASE-SX, then must waste 100BASE-FX, vice versa.
2) fixed the mode of operation of SFP, made the user can only use specific SFP optic module, singly used switch to bring inconvenience, also wasted user's SFP optic module resource to the user.Suppose that switch SFP interface is fixed as 100BASE-FX, and the user has 1000BASE-SX optic module and 100BASE-FX optic module, then the user can only use the 100BASE-FX optic module, wasted the 1000BASE-SX module, if the user has only the 1000BASE-SX module not have the 100BASE-FX module, then the user also need buy the 100BASE-FX optic module.
The utility model content
The technical problems to be solved in the utility model is, fixes and the defective of the optic module wasting of resources at the mode of operation of the above-mentioned SFP of prior art, and a kind of switch is provided.
The technical scheme that its technical problem that solves the utility model adopts is: construct a kind of switch, comprise the physical chip of supporting multiple SFP mode of operation, also comprise:
The SFP interface that is used for external SFP optic module;
Whether detect described SFP interface is in the state that connected and is in and further detects the state detection unit whether described SFP interface is circumscribed with the SFP optic module when not connecting state detecting described SFP interface;
When detecting described SFP interface and be circumscribed with the SFP optic module, the SFP mode of operation that disposes described SFP interface be in the multiple SFP mode of operation with the dispensing unit of a kind of SFP mode of operation of described SFP optic module coupling;
Described state detection unit is connected with described dispensing unit, described SFP interface communication, and described dispensing unit is connected with described SFP interface communication.
In switch described in the utility model, described dispensing unit specifically comprises:
Be used for when detecting described SFP interface and be circumscribed with the SFP optic module, the SFP mode of operation that disposes described SFP interface is first dispensing unit of a kind of SFP mode of operation in the multiple SFP mode of operation.
In switch described in the utility model, described dispensing unit also comprises:
Timing unit;
Be used for when described timing unit reaches set first Preset Time, detecting SFP mode of operation that described first dispensing unit disposes whether with described SFP optic module coupling; And reconfigure signal to described first dispensing unit detecting to send when SFP mode of operation that described first dispensing unit disposes and described SFP optic module do not mate, so that described first dispensing unit is the matching detection unit that is different from a kind of SFP mode of operation of the previous SFP mode of operation that disposes of described first dispensing unit in the multiple SFP mode of operation receiving the described SFP mode of operation that reconfigures described SFP interface when reconfiguring signal.
In switch described in the utility model, described dispensing unit also comprises:
The transmit status detection signal is given the control unit of described state detection unit when being used for the SFP mode of operation that disposed at described first dispensing unit and described SFP optic module coupling and described timing unit and reaching set second Preset Time of described timing unit.
In switch described in the utility model, described multiple SFP mode of operation comprises 1000BASE-SX, 10/100/1000BASE-T, 100BASE-FX, 1000BASE-T.
In switch described in the utility model, described SFP optic module be following any:
1000BASE-SX adopts the optic module of SerDes interface;
1000BASE-SX adopts the optic module of SGMII interface;
10/100/1000BASE-T adopts the optic module of SGMII interface;
100BASE-FX adopts the optic module of SGMII interface;
1000BASE-T SFP adopts the optic module of SerDes interface.
The beneficial effects of the utility model are, the SFP interface of switch detects the SFP optic module that inserts port automatically, and the SFP mode of operation of mating switch SFP interface automatically according to the result who detects, thereby the SFP mode of operation of the optic module that match user is inserted, make user no matter insert the SFP optic module of which kind of classification, the SFP interface of switch can normally use.Realized that the SFP optic module that is used by the user determines the SFP mode of operation of the SFP interface of switch.Employing the utility model need not the mode of operation of manual configuration switch SFP interface, needs only the SFP optic module of the PHY chip support insertion of switch, just can realize mating automatically the mode of operation of SFP interface, connects fast.And when the user changed the SFP optic module, the SFP interface of switch still can automatically detect and mate the SFP mode of operation.Switch SFP interface of the present utility model can be supported polytype SFP module simultaneously, is user-friendly to, and can improves the utilance of user's SFP optic module resource, saves the cost that the user uses the SFP interface.
Embodiment
Fig. 1 is the structural representation according to the switch 100 of the utility model one embodiment, and switch 100 comprises physical layer (PHY) chip 101, SFP interface 102, state detection unit 103, the dispensing unit 104 of supporting multiple SFP mode of operation.Also show the SFP optic module 105 that is connected with the SFP interface 102 of switch among Fig. 1.State detection unit 103 communicates to connect with described dispensing unit 104, described SFP interface 102, and described dispensing unit 104 communicates to connect with described SFP interface 102.
SFP interface 102 is used for being connected with external SFP optic module 105;
State detection unit 103 is used to detect described SFP interface 102 and whether is in the state that connected and is in and further detects described SFP interface when not connecting state and whether be circumscribed with the SFP optic module detecting described SFP interface 102;
Dispensing unit 104 is used for when detecting described SFP interface 102 and be circumscribed with SFP optic module 105, the SFP mode of operation that disposes described SFP interface 102 be in the multiple SFP mode of operation with a kind of SFP mode of operation of described SFP optic module 105 couplings.
Multiple SFP mode of operation comprises following classification: 1) 1000BASE-SX, adopt the SerDes interface; 2) 1000BASE-SX adopts the SGMII interface; 3) 10/100/1000BASE-T adopts the SGMII interface; 4) 100BASE-FX adopts the SGMII interface; 5) 1000BASE-T adopts the SerDes interface.
SFP optic module 105 can be following any: 1000BASE-SX adopts the optic module of SerDes interface; 1000BASE-SX adopts the optic module of SGMII interface; 10/100/1000BASE-T adopts the optic module of SGMII interface; 100BASE-FX adopts the optic module of SGMII interface; 1000BASE-T SFP adopts the optic module of SerDes interface.
Fig. 2 shows the detailed structure schematic diagram of dispensing unit 104.Dispensing unit 104 comprises first dispensing unit 1041, timing unit 1042, the matching detection unit 1043 that communicates with one another and connect.Timing unit 1042 is connected with first dispensing unit 1041 with matching detection unit 1043, and matching detection unit 1043 is connected with first dispensing unit 1041.
First dispensing unit 1041, be used for when detecting described SFP interface and be circumscribed with the SFP optic module, the SFP mode of operation that disposes described SFP interface is a kind of SFP mode of operation in the multiple SFP mode of operation, and receive that the matching detection unit sends reconfigure signal the time reconfigure described SFP interface the SFP mode of operation be a kind of SFP mode of operation that is different from the previous SFP mode of operation that disposes of described first dispensing unit in the multiple SFP mode of operation;
Timing unit 1042 is used to be provided with Preset Time, for example is that first dispensing unit 1041 is provided with first Preset Time;
Matching detection unit 1043, be used for when described timing unit reaches set first Preset Time, detecting SFP mode of operation that described first dispensing unit disposed whether with described SFP optic module coupling, and transmission reconfigures signal to described first dispensing unit when detecting SFP mode of operation that described first dispensing unit disposed and do not match with described SFP optic module.First Preset Time here can be provided with according to needs, and for example physical layer (PHY) chip that uses according to reality decides.
In the utility model one embodiment, dispensing unit 104 also comprises control unit 1044, the transmit status detection signal was given state detection unit 103 when as shown in Figure 3, control unit 1044 was used for the SFP mode of operation that disposed at first dispensing unit 1041 and described SFP optic module 105 couplings and described timing unit 1042 and reaches set second Preset Time of described timing unit 1042.Second Preset Time here can be provided with according to needs, and for example physical layer (PHY) chip that uses according to reality decides.
Detection and the matching process 400 how switch of the present utility model is carried out the SFP mode of operation is described in detail below, as shown in Figure 4.
Whether step 401 detects switch SFP interface and connects, if connect, enters step 412;
Step 402, if the SFP interface is in the state of not connecting, whether have SFP optic module insert, as not having, enter step 412 if detecting the SFP interface again;
Step 403 if the SFP interface has optic module to insert and the SFP interface is in the state of not connecting, then is provided with the SFP interface and supports other SFP mode of operation of category-A (supposition switch PHY chip can be supported the SFP mode of operation of A, B, C three kinds);
Step 404 is waited for preset time t 1, and the SFP optic module to judge that can other SFP mode of operation of category-A match user be inserted judges whether that coupling promptly detects the SFP interface and whether connects;
Step 405, through preset time t 1, if connect, then the match is successful in explanation, enters step 412; If do not connect, then enter step 406, the SFP interface is set supports other SFP mode of operation of category-B;
Step 407 is waited for preset time t 1, and the optic module to judge that can other SFP mode of operation of category-B match user be inserted judges whether that coupling promptly detects the SFP interface and whether connects;
Step 408, through preset time t 1, if the SFP interface connects, then the match is successful in explanation, enters step 412; If do not connect, then enter step 409, the SFP mode of operation that the SFP interface is supported the C classification is set;
Step 410, system wait preset time t 1, the optic module that can match user inserts with the SFP mode of operation of judging the C classification;
Step 411, through preset time t 1, if the SFP interface connects, then the match is successful in explanation, enters step 412; If do not connect, enter step 403, re-execute matching process;
Step 412 after the system wait preset time t 2, jumps to 401;
Wherein, time parameter t1 and t2 need debug to determine according to concrete PHY chip, to reach optimal effectiveness.
As can be seen from Figure 4, switch adopts the mode of poll, and whether inquiry at regular intervals has optic module to insert, if having then set gradually the mode of operation of SFP interface, the optic module that inserts up to match user is till connecting.Realized that automatic detection user inserts the SFP module type and switch SFP interface carried out the function of corresponding configuration.Be that example is set forth only among Fig. 4, but the utility model is not limited to this with 3 kinds of SFP mode of operations.No matter switch is supported how many kinds of SFP mode of operation, all can use this programme to realize the automatic coupling of SFP mode of operation.And when the user changed the SFP optic module, the SFP interface of switch still can automatically detect and mate the SFP mode of operation.
This programme can be determined the mode of operation of switch SFP interface by the SFP optic module that the user uses.The SFP interface of switch can detect the mode of operation of the user's optic module that inserts port automatically, and adjust the mode of operation of switch SFP interface automatically according to the result who detects, thereby the mode of operation of the optic module that match user is inserted, the SFP interface that makes switch no matter user inserts the SFP optic module (in the class scope that switch PHY chip is supported) of which kind of classification, can normally use.The summary of benefits of the technical solution of the utility model is as follows:
1) insert different SFP optic modules according to the user, switch SFP interface can switch between various types of SFP mode of operations such as 1000BASE-SX, 100BASE-FX, 10/100/1000BASE-T adaptively, with the optic module of coupling insertion;
2) user need not manually manage, dispose or adjust switch SFP interface, and the utility model can fully automatic working;
3) the utility model, generally can connect in the short time (for example 1 second) as long as switch PHY chip is supported the SFP of the type to various types of SFP modules of user's insertion;
4) switch SFP interface of the present utility model is supported polytype SFP module simultaneously, can be user-friendly to, and improves the utilance of user SFP module resource, saves the cost that the user uses the SFP interface.