fig1 shows the configuration of the total of the system of the present invention . fig1 shows an example where there is no frame and no overhead signal in sdh / sonet and the signal made by directly converting the data ( refer to fig2 ) of the continuous packets ( packets described in claim 1 ) into light is inputted and outputted to and from the optical line signal port of each physical interface card . as shown in fig1 , each of the physical interface cards ( 201 w , 201 p ) of the current system and the spare system is connected to the physical interface card of the device on the opposite station side through the optical line respectively , and performs sending and receiving of the packet data with the device on the opposite station side . referring to fig1 , an optical line reception signal ( s 101 ) is converted into an electric signal as continuous packet data ( s 2012 ) in an optical module 2011 of the physical interface card ( 201 ). from that continuous packet data signal s 2012 ( signal format is shown in fig2 ), a clock is regenerated in a block 2014 , and as for the packet data signal s 2012 , the crc ( cyclic redundancy check ) for every 2 byte at the head showing the packet length is entirely performed for each byte on the stream , and by this , the head of the packet data signal s 2012 can be found . in the head of the packet , information ( 2 byte ) showing the payload length is written , and on the basis of this payload length , the head of the next packet is found , and the crc check is performed again . thus , the heads of the packet are found by turns from a packet to a packet and the crc check is performed , and as a result , a synchronous drawing state is made , and after that , the module ( 2014 ) outputs payload information ( s 2015 ) therein ( fig3 ). on the contrary , in the optical line signal transmitting direction , the module ( 2014 ) adds information ( 2 byte ) showing the payload length , crc information thereof , and a trailer ( fig2 ) to a packet data signal s 302 as user data from a switch block ( 401 ) or packet data s 2029 ( format is shown in fig3 ) as a switch request signal , and outputs them to the optical module 2011 . the optical module 2011 converts the electric signal of the continuous packet data signal s 2013 ( format is shown in fig2 ) into an optical signal . the controlling packet data corresponding to k1 - k2 control information ( refer to fig4 ) of the overhead of the sdh / sonet signal that is a switch request is processed in the physical interface card ( 201 ), and data other than that is inputted and outputted to and from the next block ( switch block : 401 ) and processed . here , the process of the physical panels ( 201 w , 201 p ) of the switching signal ( k1 - k2 control information ) for controlling the line protection will be described by using fig1 and fig1 . the controlling packet data corresponding to the k1 - k2 control information that is a switch request is exchanged between the devices by the format frame in fig2 similarly to other user data , and it is exchanged by the format in fig3 to and from a cpu module ( 2021 ) and the switch block ( 401 ). the controlling packet data and the packet as user data can easily be discriminated by writing some information in the control field of the format in fig3 . in the signal receiving direction , the filter block ( fig1 , 2017 ) finds a byte ( control ) next to the head byte ( address ) of a signal s 2015 ( pdu part in fig2 ), and judges whether it is controlling packet data or a packet as user data by the value of the control field therein , and in the case where it is controlling packet data , the signal s 2015 is written in the fifo ( 2019 ) as a signal s 2030 , and in the case where it is not controlling packet data , the signal s 2015 is sent out to the switch block 401 through a tri - state buffer 2034 as user data s 2032 as it is . in the signal sending out direction , a user data signal s 302 coming from the switch block 401 and a controlling packet data signal s 2029 ( pdu part in fig2 ) coming from the cpu module 2021 are selected and multiplexed in a selector 2018 , and are sent out to the module 2014 as a signal s 2016 , and the module 2014 adds the information such as a payload length , a crc , or a trailer to the signal s 2016 , and sends out the signal s 2013 with a signal format in fig2 to the optical module 2011 . by doing this , it is possible to attain an effect similar to the effect based on the switching of each line panel of the current system and the spare system where the extraction of k1 - k2 control information from the overhead in the frame of sdh / sonet or the insertion of k1 - k2 control information into the overhead is performed by the conventional method . next , the line switching from the current system to the spare system in a doubled optical transmission line will be described by referring to fig4 to 10 and fig1 . fig6 to 10 show a state where a trouble ( signal degrade with low priority ) is produced in an optical line signal doubled to 1 + 1 ( signal corresponding to 155 m or 622 m ), and by using a two - way protection switching method ( bidirectional switching in both the sending and receiving directions of the optical line signal ), the state transition is performed in each panel and the switching is performed from the current system to the spare system . every exchange of the basic protocol ( exchange of switching k1 - k2 control information ) between the own station and the opposite station is performed through a line of the spare system , and it is similar to the previously standardized exchange of the k1 - k2 control information using an sdh / sonet frame ( reference : tr - nwt - 000253 published by bellcore ). then , first , fig6 shows a regular state where the k1 - k2 control information is 0000 , 0000 - 0000 , 0101 ( refer to fig4 as for the detailed contents of the bit ) and there is no trouble . furthermore , the present information is exchanged so that the line switching is performed bidirectionally if performed , and in the case where a switch request is issued , the switching from the current system to the spare system is performed in both the transmission line and the reception line . in fig6 no switch request ( sw req ) that is a request for performing the switching is outputted from any station . next , as shown in fig7 a signal error ( signal degrade ) occurs in the current system optical line signal s 102 w , and the opposite station side device { circle around ( 2 )} detects it . at that moment , the physical interface card 2201 w of the opposite station side device { circle around ( 2 )} detects the present error by performing a crc check ( refer to fig2 ) of the head payload length ( 2 byte ) for each packet data . the signal error occurs because of an los ( loss of signal ), or an lof ( loss of frame ) or the like , but these are not directly detected . the current system physical interface card 2201 w notifies the spare system line panel 2201 p of the fact that a signal error ( here , signal degrade with low priority ) has occurred in the current system optical line signal s 102 w . as for the notifying method , in fig1 , the cpu module ( 2021 w ) on the current system physical interface card writes that effect into the dual port ram ( 2022 p ) on the spare system physical interface card , and applies an interrupt onto the cpu module 2021 p , and consequently , the notification can be performed . then , the spare system physical interface card 2201 p transfers the k1 - k2 control information ( 1010 , 0000 - 0000 , 0101 ) to the mating station through the spare system optical line signal s 101 p in order to notify the mating station ( own station side device { circle around ( 1 )}) of the fact that an error ( signal degrade with low priority ) has occurred in the current system optical line signal . in fig8 the spare system physical interface card 201 p of the own station side device { circle around ( 1 )} receives the k1 - k2 control information ( 1010 , 0000 - 0000 , 0101 ), and after that , it returns the k1 - k2 control information ( 0010 , 0001 - 0000 , 0101 ( reverse request of channel 1 )) to the spare system physical interface card 2201 p of the opposite station side device { circle around ( 2 )} in order to notify the opposite station side device { circle around ( 2 )} of the fact that the present signal has been received . in fig9 the spare system physical interface card 2201 p of the opposite station side device { circle around ( 2 )} notifies the current system panel 2201 w of the fact that the present signal has been received , and in the meantime , it returns the k1 - k2 control information ( 1010 , 0001 - 0001 , 0101 ) to the spare system physical interface card 201 p of the own station side device { circle around ( 1 )}. similarly , the spare system physical interface card of the own station side device { circle around ( 1 )} returns the k1 - k2 control information ( 0010 , 0001 - 0000 , 0101 ). at that moment , the respective current system panels ( 201 w , 2201 w ) receiving the notice close the tri - state buffers ( 2034 w , similar buffer in the opposite station side device { circle around ( 2 )}) of the signal lines s 301 , s 2301 leading to the sw modules . in fig1 , in the respective stations , in order to finish the switching from the current system to the spare system of the line , the spare system panels ( 201 p , 2201 p ) open the tri - state buffers ( 2034 p , similar buffer in the opposite station side device { circle around ( 2 )}) of the signal lines ( s 301 , s 2301 ) leading to the sw modules that have been closed until now , and output a signal , and consequently , the switching is finished . fig1 , 12 show the configurations of a first embodiment of the present invention , and the detailed action of each of those configurations will be shown below . the present configuration shows the contents of a physical interface card ( indicating 201 w in fig1 ) for inputting and outputting a signal made by directly converting continuous packet data ( refer to fig2 ) into light . in the part surrounded by a dotted line , the optical module 2011 converts the optical line reception signal ( s 101 ) into the continuous packet data ( s 2012 ) as an electric signal . the module ( 2014 ) regenerates the clock , and finds the head of the packet by entirely performing the crc check for every 2 byte for each byte on the stream , and finds the head of the next packet by the information ( 2 byte ) showing the payload length of the packet head , and performs the crc check again , and consequently , a synchronous drawing state is made . thus , the heads are found by turns from a packet to a packet , and the crc check is performed , and when the synchronous drawing state is made , the payload information s 2015 ( fig3 ) therein is outputted from the present block ( 2014 ). the filter block 2017 finds the byte ( control ) next to the headbyte ( address ) in the above signal s 2015 , and filters that to find whether it is controlling packet data ( corresponding to the k1 - k2 control information that is a switch request ) or a packet as user data by the control field in the payload , and in the case where it is a controlling packet , it is written in the fifo ( 2019 ), and in the case where it is not a controlling packet , it is passed to the switch block 401 as the packet data s 301 through the tri - state buffer 2034 as user data as it is . in the tri - state buffer 2034 , the opening and closing is controlled on the basis of the control signal s 2031 by the cpu . the tri - state buffer 2034 is open normally when the physical interface card 201 is of the current system , and when the card is of the spare system , it is closed to have a high impedance output . furthermore , the controlling packet data written in the fifo ( 2019 ) is read out at any time by the cpu module ( 2021 ). on the other hand , the selector block 2018 selects and multiplexes the signal s 2033 ( the same as s 302 ) coming from the switch block 401 and the controlling packet signal s 2029 outputted from the cpu module ( 2021 ) and coming through the fifo ( 2020 ), and sends out them to the block ( 2014 ) as the signal s 2016 ( refer to fig3 as for the packet format ). at this moment , the value of the control of the second byte of the signal s 2015 is switched depending on whether the signal s 2033 is selected or the signal s 2029 is selected . as mentioned above , the block ( 2014 ) adds the information such as a payload length , a crc , or a trailer so that the signal has the signal format in fig2 and sends out the signal to the optical module 2011 . the dual port ram ( 2022 ) is an pam for communicating with the spare system panel , and the data as the s 2023 coming from the cpu module on the spare system physical interface card is written in the dual port ram ( 2022 ), and the fact that writing - in has been performed to the cpu module is shown by the interrupt signal s 2025 , and that data is read out as the s 2026 . on the contrary , in order to tell the information to the mating panel , the cpu module ( 2021 ) writes the data as the s 2024 in the dual port ram on the spare system physical interface card , and similarly , an interrupt signal is produced to tell the fact that writing - in is performed to the cpu on the spare system physical interface . thus , the exchange of data is performed between the physical interface cards of the current system and the spare system ( details are shown in fig1 ). as described until now , in the first embodiment , the line protection is performed by such a system where packets shown in fig2 are continued and they are directly inputted into the device with a circuit configuration shown in fig1 as an optical line signal , and on the other hand , in the second embodiment , a similar effect can be obtained even in the case where the optical input and output signal has a conventional frame configuration ( refer to fig1 ) of sdh / sonet . the basic action of the total of the device such as the exchange of the k1 - k2 control information ( protocol ) for performing the optical line switching between the devices of the own station and the opposite station , or the exchange of the information using the dual port ram between the current system physical interface card and the spare system physical interface card is the same as that of the first embodiment . here , the processing of the k1 - k2 control information to be the trigger for the optical line switching in the physical interface card will be described . in the optical module 2011 on the physical interface card , the optical line reception signal ( s 101 ) with the frame format ( refer to fig1 ) of sdh / sonet is converted into an electric signal . the electric signal s 2012 is inputted into the module 2014 to regenerate a clock , and the synchronous drawing and the termination of the overhead information are performed by the frame signal , and the information of the k1 - k2 control information is separated and is written in the fifo ( 2019 ) as s 2030 . on the other hand , the user data as a payload signal in which the overhead signal such as the frame signal is removed is outputted to the switch block ( 401 ) as s 2015 . on the contrary , in the optical signal transmitting direction , the payload signal s 302 as user data from the switch block ( 401 ) is written in the module 2014 as s 2032 , and there , the frame information and pointer value of sdh / sonet , other overhead signals , and k1 - k2 control information are inserted , and the signal is outputted to the optical module 2011 as a signal with a frame of sdh / sonet shown in fig1 , and finally , it is outputted from the present physical interface card as the optical line signal s 102 . here , the k1 - k2 control information is outputted as s 2027 by the cpu module 2021 , and is written in the fifo ( 2020 ) in advance , and it can be transferred to the opposite station as the information ( fig1 ) in the above frame of sdh / sonet by being read out of the present fifo ( 2020 ) as the signal s 2029 by the timing of outputting the k1 - k2 control information as the overhead . the reading - out of the k1 - k2 control information from the fifo ( 2019 ) by the cpu module 2021 , the writing - in to the fifo ( 2020 ), the communication with the spare system physical interface card using the dual port ram ( 2022 ), and the state transition because of the exchange of the k1 - k2 control information between the devices of the own station and the opposite station or the like are similar to those of the first embodiment , and therefore , here , there is no special need to give a description , but a similar effect can be obtained , that is , the line switching can be performed at a high speed and with a simple configuration of the device . as described above , the present invention is a device for performing line protection in the switching based on a trouble ( because of a signal los ( loss of signal ), an lof ( loss of frame ), an error or the like ) of the physical port ( sdh / sonet line ) that is a physical layer , or a switching command from the mating station side in a system shown in fig1 wherein there is such an effect that the line switching can be performed at a high speed and with a simple configuration of the device by performing the exchange of the k1 - k2 control information as a switching signal only between physical interface cards of the current system and the spare system , even in the case ( refer to fig2 ) where there is no sdh / sonet frame and packet data is directly exchanged as an optical signal , though the line switching has previously been performed in such a way , where the k1 - k2 control information that is a switching signals is extracted from the overhead signal of the sdh / sonet frame in each of the physical interface cards of the current system and the spare system , and those signals are outputted to the management and control card for intensively managing the devices , and the processing is performed in that management and control card .