KR100958076B1 - Method for auto-setting of ip adrress - Google Patents

Method for auto-setting of ip adrress Download PDF

Info

Publication number
KR100958076B1
KR100958076B1 KR1020080043389A KR20080043389A KR100958076B1 KR 100958076 B1 KR100958076 B1 KR 100958076B1 KR 1020080043389 A KR1020080043389 A KR 1020080043389A KR 20080043389 A KR20080043389 A KR 20080043389A KR 100958076 B1 KR100958076 B1 KR 100958076B1
Authority
KR
South Korea
Prior art keywords
tcp
serial
address
converter
counterpart
Prior art date
Application number
KR1020080043389A
Other languages
Korean (ko)
Other versions
KR20090117372A (en
Inventor
이명현
Original Assignee
솔내시스템 주식회사
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 솔내시스템 주식회사 filed Critical 솔내시스템 주식회사
Priority to KR1020080043389A priority Critical patent/KR100958076B1/en
Publication of KR20090117372A publication Critical patent/KR20090117372A/en
Application granted granted Critical
Publication of KR100958076B1 publication Critical patent/KR100958076B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/668Internet protocol [IP] address subnets

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

본 발명은 시리얼-TCP/IP(Transmission Control Protocol/Internet Protocol) 변환기를 이용하여 시리얼(Serial) 통신 기기를 TCP/IP 네트워크에 연결할 때, TCP/IP 관련 사항을 자동으로 설정할 수 있도록 하는 IP 주소 자동 설정 방법에 관한 것이다.According to the present invention, when a serial communication device is connected to a TCP / IP network by using a serial-to-TCP / IP (Transmission Control Protocol / Internet Protocol) converter, an IP address is automatically set so that TCP / IP related matters can be automatically set. It is about setting method.

이를 위해, 본 발명은 두 대의 시리얼-TCP/IP 변환기가 시리얼 케이블로 연결된 상태에서, 사용자로부터 IP 주소를 자동으로 설정하라는 요청을 입력받게 되면, IP 주소 및 포트 번호를 랜덤하게 생성하여 시리얼 통신을 통해 상대측 시리얼-TCP/IP 변환기와 MAC 주소, IP 주소, 포트 번호를 서로 주고받은 후, 자신의 MAC 주소와 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 비교하여 서버와 클라이언트를 결정하고, 자신의 IP 주소와 기지정된 값의 서브넷 마스크, 상대측 시리얼-TCP/IP 변환기로부터 수신한 IP 주소 및 포트 번호에 의거하여 TCP/IP 관련 사항을 설정하도록 이루어지는 것이 바람직하다.To this end, in the present invention, when two serial-to-TCP / IP converters are connected with a serial cable, when a user receives a request to automatically set an IP address, the present invention randomly generates an IP address and a port number to perform serial communication. After exchanging MAC address, IP address and port number with other serial-to-TCP / IP converter, the server and client are determined by comparing their MAC address and MAC address of the other serial-TCP / IP converter. It is preferable to set TCP / IP related items based on the IP address and the subnet mask of the predetermined value, the IP address and the port number received from the opposite serial-TCP / IP converter.

이에 따라, 본 발명은 사용자가 TCP/IP에 대한 제반 지식없이도 시리얼-TCP/IP 변환기를 이용하여 두 대의 시리얼 통신 장치를 TCP/IP 네트워크에 연결하여 TCP/IP 통신을 수행할 수 있게 된다.Accordingly, the present invention enables a user to connect two serial communication devices to a TCP / IP network using a serial-to-TCP / IP converter to perform TCP / IP communication without any knowledge of TCP / IP.

시리얼 통신 장치, IP 주소, 시리얼-TCP/IP 변환기  Serial Communication Device, IP Address, Serial-to-TCP / IP Converter

Description

IP 주소 자동 설정 방법{METHOD FOR AUTO-SETTING OF IP ADRRESS}How to set IP address automatically {METHOD FOR AUTO-SETTING OF IP ADRRESS}

본 발명은 IP 주소 자동 설정 방법에 관한 것으로서, 특히 시리얼-TCP/IP(Transmission Control Protocol/Internet Protocol) 변환기를 이용하여 시리얼(Serial) 통신 기기를 TCP/IP 네트워크에 연결할 때, TCP/IP 관련 사항을 자동으로 설정할 수 있도록 하는 IP 주소 자동 설정 방법에 관한 것이다.The present invention relates to a method for automatically setting an IP address, in particular, when a serial communication device is connected to a TCP / IP network using a serial-to-TCP / IP (Transmission Control Protocol / Internet Protocol) converter, To automatically configure the IP address.

일반적으로 산업용 장비들은 RS232, RS422, RS485 등과 같이 간단한 시리얼(Serial) 통신만을 지원하기 때문에 근거리 통신만을 수행한다.In general, industrial equipment supports only simple serial communication such as RS232, RS422, RS485, and so performs only short range communication.

전술한, RS232, RS422, RS485 등과 같은 시리얼 통신은 UART(Universal Asysnchronous Receiver and Transmitter) 기반으로 신호 레벨만 변환하여 통신하 는 방식이므로 장치를 개발하는 업체에서는 아주 간단하게 시리얼 통신 기능을 구현할 수 있다.Serial communication, such as RS232, RS422, RS485, and the like described above is a method of communicating only by converting a signal level based on a Universal Asysnchronous Receiver and Transmitter (UART), and thus, a device developing company can easily implement a serial communication function.

그러나, 인터넷의 발달과 함께 인터넷 통신에 대한 수요가 늘어감에 따라서 산업용 장비를 개발하는 기존의 업체에서도 TCP/IP(Transmission Control Protocol/Internet Protocol) 통신을 구현해야 하는 필요성이 대두되기 시작했다.However, with the development of the Internet, as the demand for Internet communication increases, the need for implementing Transmission Control Protocol / Internet Protocol (TCP / IP) communication has also emerged from existing companies developing industrial equipment.

인터넷 통신은 TCP/IP를 기반으로 이루어지는 통신 방식이므로, 인터넷 통신을 하기 위해서는 반드시 TCP/IP 통신 프로토콜을 구현해야 한다.Since Internet communication is a communication method based on TCP / IP, in order to perform Internet communication, TCP / IP communication protocol must be implemented.

TCP/IP 통신 기술은 기존의 RS232, RS422, RS485 등의 시리얼 통신 기술과는 달라서 고도의 소프트웨어 기술이 필요하다. 따라서, 산업용 장비를 TCP/IP 통신 기술을 지원하는 장비로 구현하려면 기술적, 비용적, 시간적인 어려움이 있다.TCP / IP communication technology is different from the existing serial communication technologies such as RS232, RS422, and RS485, and thus requires a high level of software technology. Therefore, there is a technical, cost and time difficulty to implement industrial equipment as equipment supporting TCP / IP communication technology.

시리얼-TCP/IP 변환기는 전술한 문제들을 해결해주는 장비로서, 시리얼로 통신하는 장치에 시리얼-TCP/IP 변환기를 연결하면, 시리얼 통신 장치는 TCP/IP 통신을 수행할 수 있게 된다.The serial-to-TCP / IP converter is a device that solves the above problems. When the serial-to-TCP / IP converter is connected to a serial communication device, the serial communication device can perform TCP / IP communication.

다시 말해서, 시리얼-TCP/IP 변환기는 TCP/IP 네트워크에서 들어오는 TCP/IP 데이터를 TCP/IP 처리하여 실제 데이터(raw data)로 변환한 후, 시리얼 포트에 연결되어 있는 시리얼 통신 장치로 실제 데이터를 보내고, 시리얼 통신 장치에서 들어온 실제 데이터를 TCP/IP 처리하여 TCP/IP 데이터로 변환한 후, TCP/IP 네트워크로 전달하기 때문에 시리얼 통신 장치는 TCP/IP 통신을 수행할 수 있게 된다.In other words, the serial-to-TCP / IP converter converts the TCP / IP data from the TCP / IP network into raw data by TCP / IP processing, and then converts the actual data into a serial communication device connected to the serial port. The serial communication device can perform TCP / IP communication because it transmits the TCP / IP data, converts the actual data from the serial communication device into TCP / IP data, and then transfers the data to the TCP / IP network.

이에 따라, 도 1과 같이 시리얼로 통신을 수행하는 두 시리얼 통신 장치에 도 2와 같이 시리얼-TCP/IP 변환기를 각각 연결하고 이를 네트워크에 연결하면, 시 리얼 통신 장치는 TCP/IP 네트워크를 통해 시리얼 터널링(Serial Tunneling)으로 통신을 할 수 있게 된다.Accordingly, when a serial-to-TCP / IP converter is connected to two serial communication devices performing serial communication as shown in FIG. 1 and connected to a network as shown in FIG. 2, the serial communication device is connected to a serial device via a TCP / IP network. It is possible to communicate by tunneling.

그러나, 전술한 바와 같이 시리얼-TCP/IP 변환기를 사용하는 경우, 종래에는 사용자가 TCP/IP 통신과 관련된 IP 주소(Local IP Address), 서브넷 마스크(Subnet Mask), 게이트웨이(Gateway) IP 주소, 상대측 시리얼-TCP/IP 변환기의 IP 주소, 상대측 시리얼-TCP/IP 변환기의 포트 번호 등의 정보를 네트워크 관리자로부터 부여받거나 사용자가 직접 그 값을 알아내어 설정해야 하는 번거로운 문제점이 있다.However, in the case of using a serial-to-TCP / IP converter as described above, in the related art, a user is conventionally referred to as an IP address (Local IP Address), a subnet mask, a gateway IP address, and a partner side associated with TCP / IP communication. There is a troublesome problem of receiving the information such as the IP address of the serial-TCP / IP converter, the port number of the partner serial-TCP / IP converter, etc. from the network administrator, or by manually finding and setting the value.

본 발명은 전술한 문제점을 해결하기 위해 안출된 것으로서, 두 대의 시리얼-TCP/IP 변환기를 이용하여 두 대의 시리얼(Serial) 통신 기기를 동일한 TCP/IP 네트워크로 연결하는 시리얼 터널링 기능을 구현할 때, TCP/IP 관련 사항을 자동으로 설정할 수 있도록 하는 IP 주소 자동 설정 방법을 제공함에 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and when implementing a serial tunneling function for connecting two serial communication devices to the same TCP / IP network using two serial-to-TCP / IP converters, Its purpose is to provide an automatic IP address configuration method that enables automatic configuration of / IP related items.

본 발명의 다른 목적은 시리얼 터널링을 운영하는 중에 네트워크 환경이 변하게 되면 이를 자동으로 감지하여 TCP/IP 관련 사항을 자동으로 복구할 수 있도록 함에 있다.Another object of the present invention is to automatically detect when the network environment changes during the operation of serial tunneling and to automatically recover TCP / IP related matters.

전술한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 IP 주소 자동 설정 방법은, 두 대의 시리얼-TCP/IP 변환기의 시리얼 포트 사이를 시리얼 케이블로 연결한 후, 사용자로부터 IP 주소 설정 요청을 입력받으면, IP 주소, 포트 번호를 생성하고, 상대측 시리얼-TCP/IP 변환기와 MAC 주소, IP 주소, 포트 번호를 주고받아 TCP/IP 관련 사항을 자동으로 설정하는 TCP/IP 관련 사항 설정 과정과; 네트워크 포트에 사용할 TCP/IP 네트워크가 연결되면, 상기 TCP/IP 관련 사항 설정 과정에서 상대측 시리얼-TCP/IP 변환기로부터 수신한 IP 주소가 사용 가능한 IP 주소인지를 점검하는 IP 주소 점검 과정과; 상기 점검결과 상기 IP 주소에 문제가 있는 경우에는 IP 주소, 포트 번호를 재생성한 후, 현재 연결되어 있는 TCP/IP 네트워크를 통해 상대측 시리얼-TCP/IP 변환기와 MAC 주소, IP 주소, 포트 번호를 다시 주고받아 TCP/IP 관련 사항을 자동으로 재설정하는 TCP/IP 관련 사항 재설정 과정을 포함하여 이루어지되, 상기 IP 주소 점검 과정은, 상기 TCP/IP 관련 사항 설정 과정을 마친 후, 네트워크 포트에 사용할 TCP/IP 네트워크가 연결되면, 상기 TCP/IP 네트워크를 통해 상대측 시리얼-TCP/IP 변환기로 주기적으로 ARP 요청 패킷을 송신하는 과정과; 상기 상대측 시리얼-TCP/IP 변환기로부터 상기 ARP 요청 패킷에 대한 ARP 응답 패킷이 수신되는 지를 판단하는 과정과; 상기 판단결과 상대측 시리얼-TCP/IP 변환기로부터 ARP 응답 패킷이 수신되지 않는 경우에는 상기 TCP/IP 관련 사항 재설정 과정으로 진입하는 과정과; 상기 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷이 수신되는 지를 판단하는 과정과; 상기 판단결과 다른 호스트로부터 ARP 응답 패킷이 수신되면, 상기 상대측 시리얼-TCP/IP 변환기로 IP 주소 중복을 알리고, 상기 TCP/IP 관련 사항 재설정 과정으로 진입하는 과정을 포함하여 이루어지는 것이 바람직하다.Automatic IP address setting method according to an embodiment of the present invention for achieving the above object, after connecting a serial cable between the serial port of the two serial-to-TCP / IP converter, input the IP address setting request from the user A TCP / IP-related item setting process of generating an IP address and a port number, exchanging MAC address, IP address, and port number with an external serial-TCP / IP converter and automatically setting TCP / IP-related items; An IP address checking process of checking whether an IP address received from a counterpart serial-TCP / IP converter is an available IP address when a TCP / IP network to be used for a network port is connected; If there is a problem with the IP address, regenerate the IP address and port number, and then reset the serial-to-TCP / IP converter, MAC address, IP address, and port number of the other party through the currently connected TCP / IP network. Including TCP / IP-related reset process for automatically resetting TCP-IP-related matters, the IP address checking process, after completing the TCP / IP-related matters setting process, TCP / IP to be used for a network port If an IP network is connected, periodically transmitting an ARP request packet to a counterpart serial-TCP / IP converter through the TCP / IP network; Determining whether an ARP response packet for the ARP request packet is received from the counterpart serial-TCP / IP converter; When the ARP response packet is not received from the counterpart serial-TCP / IP converter as a result of the determination, entering the TCP / IP related item reset process; Determining whether an ARP response packet is received from a host other than the counterpart serial-TCP / IP converter; When the ARP response packet is received from the other host as a result of the determination, it is preferable to include the step of informing the counterpart serial-TCP / IP converter of the IP address duplication and entering the TCP / IP related matter resetting process.

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

나아가, 상기 TCP/IP 관련 사항 재설정 과정은, 상기 IP 주소 점검 과정의 점검결과 상기 상대측 시리얼-TCP/IP 변환기로부터 ARP 응답 패킷을 수신하지 못하거나, 상기 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷을 수신하게 된 경우, IP 주소 및 포트 번호를 랜덤하게 재생성하는 과정과; TCP/IP 네트워크 통신을 통해 상대측 시리얼-TCP/IP 변환기로부터 상대측 시리얼- TCP/IP 변환기의 MAC 주소, IP 주소, 포트 번호를 수신하는 과정과; 자신의 MAC 주소와 상기 재생성한 IP 주소 및 포트 번호를 TCP/IP 네트워크 통신을 통해 상대측 시리얼-TCP/IP 변환기로 전송하는 과정과; 자신의 MAC 주소와 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 비교하여 서버와 클라이언트를 결정하는 과정과; 상기 재생성하는 과정에서 재생성된 IP 주소와 기지정된 값의 서브넷 마스크, 상대측 시리얼-TCP/IP 변환기로부터 수신한 IP 주소 및 포트 번호에 의거하여 TCP/IP 관련 사항을 재설정하는 과정을 포함하여 이루어지는 것이 바람직하다.In addition, the TCP / IP related matter reset process may not receive an ARP response packet from the counterpart serial-TCP / IP converter as a result of the check of the IP address checking process, or may be configured to host other than the counterpart serial-TCP / IP converter. Randomly regenerating an IP address and a port number when receiving an ARP response packet from the network; Receiving a MAC address, an IP address, and a port number of the opposite serial-TCP / IP converter from the opposite serial-TCP / IP converter through TCP / IP network communication; Transmitting its MAC address and the regenerated IP address and port number to a counterpart serial-TCP / IP converter via TCP / IP network communication; Determining a server and a client by comparing a MAC address of the peer with a MAC address of a counterpart serial-TCP / IP converter; And resetting the TCP / IP related matters based on the regenerated IP address, the subnet mask of the predetermined value, the IP address and the port number received from the counterpart serial-TCP / IP converter. Do.

본 발명의 IP 주소 자동 설정 방법에 따르면, 두 대의 시리얼-TCP/IP 변환기를 시리얼 케이블로 연결한 후, IP 주소를 자동으로 설정하라는 명령을 입력하면, 시리얼-TCP/IP 변환기에서 TCP/IP 관련 사항을 자동으로 설정함으로써, 사용자가 TCP/IP에 대한 제반 지식없이도 시리얼-TCP/IP 변환기를 이용하여 두 대의 시리얼 통신 장치를 TCP/IP 네트워크에 연결하여 TCP/IP 통신을 수행할 수 있게 된다.According to the method of automatically setting the IP address of the present invention, after connecting two serial-to-TCP / IP converters with a serial cable, and inputting a command to automatically set the IP address, the serial-to-TCP / IP converter is related to TCP / IP. By automatically setting the items, the user can connect two serial communication devices to the TCP / IP network and perform TCP / IP communication using the serial-to-TCP / IP converter without any knowledge of TCP / IP.

또한, 시리얼 터널링을 운영하는 중에 네트워크 환경이 변하게 되면 이를 자동으로 감지하여 TCP/IP 관련 사항을 자동으로 복구함으로써, 한번 설치로 간편하게 시리얼 터널링 기능을 이용할 수 있게 된다.In addition, when the network environment changes during the operation of serial tunneling, it automatically detects it and automatically recovers TCP / IP-related matters.

이하에서는 첨부한 도면을 참조하여 본 발명의 바람직한 실시예에 따른 IP 주소 자동 설정 방법에 대해서 상세하게 설명한다.Hereinafter, a method of automatically setting an IP address according to a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

도 3은 본 발명이 적용되는 IP 주소 자동 설정이 가능한 시리얼-TCP/IP 변환기의 구성을 예시적으로 보인 도이다.3 is a diagram illustrating an example of a configuration of a serial-TCP / IP converter capable of automatically setting an IP address to which the present invention is applied.

도 3에서, 입력포트(110)는 사용자로부터 IP 주소를 자동으로 설정하라는 요청 신호를 전달받는다.In FIG. 3, the input port 110 receives a request signal for automatically setting an IP address from a user.

출력포트(120)는 IP 주소 설정이 완료되었다는 것을 사용자에게 전달한다.The output port 120 transmits to the user that the IP address setting is completed.

시리얼 통신부(130)는 시리얼 케이블로 연결되는 상대측 시리얼-TCP/IP 변환 기 또는 시리얼 통신 장치와 시리얼 통신을 수행한다.The serial communication unit 130 performs serial communication with a counterpart serial-TCP / IP converter or a serial communication device connected with a serial cable.

전술한, 시리얼 통신부(130)는 상대측 시리얼-TCP/IP 변환기 또는 시리얼 통신 장치와 시리얼 통신을 수행하기 위한 UART 데이터를 송수신하는 UART 콘트롤러(135)와, UART 콘트롤러(135)로부터 수신한 UART 데이터를 RS232, RS422 또는 RS485 신호 레벨로 변환하여 상대측 시리얼-TCP/IP 변환기 또는 시리얼 통신 장치로 송신하거나, 상대측 시리얼-TCP/IP 변환기 또는 시리얼 통신 장치로부터 수신한 RS232, RS 422, RS485 신호를 시리얼-TCP/IP 변환기 내부에서 사용하는 신호 레벨로 변환하여 UART 콘트롤러(135)로 전송하는 회선 구동부(Line Driver)(133)를 구비한다.As described above, the serial communication unit 130 transmits UART controller 135 for transmitting and receiving UART data for performing serial communication with a counterpart serial-TCP / IP converter or a serial communication device, and the UART data received from the UART controller 135. Converts to RS232, RS422 or RS485 signal level and transmits to the opposite serial-TCP / IP converter or serial communication device, or RS232, RS 422, RS485 signals received from the opposite serial-TCP / IP converter or serial communication device A line driver 133 converts the signal level used inside the / IP converter and transmits the converted signal to the UART controller 135.

한편, TCP/IP 통신부(140)는 TCP/IP 네트워크를 통해 연결되어 있는 상대측 시리얼-TCP/IP 변환기와 TCP/IP 통신을 수행하는 것으로, MAC(145)과 PHY(143)를 구비한다.Meanwhile, the TCP / IP communication unit 140 performs TCP / IP communication with a counterpart serial-TCP / IP converter connected through a TCP / IP network, and includes a MAC 145 and a PHY 143.

메모리부(150)는 본 발명에 따라 TCP/IP 관련 사항을 자동으로 설정할 때 사용되는 프로그램과, IP 주소(Local IP Address), 서브넷 마스크(Subnet Mask), 상대측 시리얼-TCP/IP 변환기의 IP 주소, 상대측 시리얼-TCP/IP 변환기의 포트 번호 등 TCP/IP 관련 사항을 자동으로 설정할 때 필요한 정보를 저장하는 비휘발성 메모리(153)와 제어부(160)가 TCP/IP 관련 사항을 자동으로 설정할 때 사용되는 정보를 임시적으로 보관하는 휘발성 메모리(155)를 구비하여 이루어진다.The memory unit 150 is a program used to automatically set TCP / IP related matters according to the present invention, an IP address (Local IP Address), a subnet mask, and an IP address of a counterpart serial-TCP / IP converter. Is used when the nonvolatile memory 153 and control unit 160 automatically store TCP / IP-related items, such as the port number of the partner's serial-to-TCP / IP converter. And a volatile memory 155 for temporarily storing information.

제어부(160)는 IP 주소 설정 요청에 따라 IP 주소, 포트 번호를 생성한 후, 시리얼 케이블로 연결되어 있는 상대측 시리얼-TCP/IP 변환기와 MAC(Media Access Control) 주소, IP 주소, 포트 번호를 서로 주고받아 TCP/IP 관련 사항을 자동으로 설정하고, 시리얼-TCP/IP 변환기(100)가 TCP/IP 네트워크에 연결되면, 상대측 시리얼-TCP/IP 변환기로 주기적으로 ARP 요청 패킷을 송신하여 상대측 시리얼-TCP/IP 변환기의 IP 주소가 사용 가능한 지를 점검하고, 점검결과 상대측 시리얼-TCP/IP 변환기로부터 ARP(Address Resolution Protocol) 응답 패킷을 수신하지 못하거나, 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷이 수신되는 경우에는 IP 주소, 포트 번호를 재생성한 후, TCP/IP 네트워크를 통해 상대측 시리얼-TCP/IP 변환기와 MAC 주소, IP 주소, 포트 번호를 다시 주고받아 TCP/IP 관련 사항을 재설정한다.The controller 160 generates an IP address and a port number in response to a request for setting an IP address, and then converts the serial-to-TCP / IP converter, which is connected with a serial cable, the MAC (Media Access Control) address, IP address, and port number to each other. Automatically set up TCP / IP-related matters, and when the serial-to-TCP / IP converter 100 is connected to the TCP / IP network, periodically sends an ARP request packet to the counterpart serial-to-TCP / IP converter to Check whether the IP address of the TCP / IP converter is available, and if the result of the check does not receive an ARP (Address Resolution Protocol) response packet from the other serial-TCP / IP converter, or from a host other than the other serial-TCP / IP converter. If ARP response packet is received, IP address and port number are regenerated, and then MAC address, IP address and port number are exchanged back and forth with TCP / IP network. Reset / IP related items.

도 4는 본 발명의 일 실시예에 따른 IP 주소 자동 설정 방법을 설명하기 위한 플로우챠트이다.4 is a flowchart illustrating a method of automatically setting an IP address according to an embodiment of the present invention.

우선, 본 발명에 따른 IP 주소 자동 설정이 가능한 시리얼-TCP/IP 변환기의 구동 방법은 크게 두 대의 시리얼-TCP/IP 변환기의 시리얼 포트 사이를 시리얼 케이블로 연결한 상태에서, 사용자로부터 입력받은 IP 주소 설정 요청에 따라 IP 주소, 포트 번호를 생성하고, 시리얼 케이블을 통해 상대측 시리얼-TCP/IP 변환기와 MAC 주소, IP 주소, 포트 번호를 주고받아 TCP/IP 관련 사항을 자동으로 설정하는 TCP/IP 관련 사항 설정 과정(S100)과, TCP/IP 관련 사항 설정 과정(S100)을 통해 TCP/IP 관련 사항을 설정한 마친 시리얼-TCP/IP 변환기의 네트워크 포트에 사용할 TCP/IP 네트워크가 연결되면, 상대측 시리얼-TCP/IP 변환기로부터 수신한 IP 주소가 사용 가능한 IP 주소인 지를 점검하는 IP 주소 점검 과정(S200)과, IP 주소 점 검 결과 IP 주소가 사용 불가능한 경우에는 IP 주소, 포트 번호를 재생성한 후, 현재 연결되어 있는 TCP/IP 네트워크를 통해 상대측 시리얼-TCP/IP 변환기와 MAC 주소, IP 주소, 포트 번호를 다시 주고받아 TCP/IP 관련 사항을 자동으로 재설정하는 TCP/IP 관련 사항 재설정 과정(S300)으로 이루어진다.First, the method of driving a serial-to-TCP / IP converter capable of automatically setting an IP address according to the present invention is an IP address input from a user while a serial cable is connected between two serial ports of two serial-to-TCP / IP converters. Create IP address and port number according to the setting request, and exchange TCP / IP which automatically sets TCP / IP related information by sending MAC address, IP address and port number to the serial-TCP / IP converter on the other side through serial cable. When the TCP / IP network to be used is connected to the network port of the serial-to-TCP / IP converter that has set up the TCP / IP-related items through the item setting process (S100) and the TCP / IP-related item setting process (S100), IP address check procedure (S200) to check whether the IP address received from the TCP / IP converter is an available IP address, and if the IP address is not available as a result of the IP address check, the IP address and port number. TCP / IP-related information that automatically resets TCP / IP-related matters by exchanging MAC address, IP address and port number with other serial-to-TCP / IP converter through the currently connected TCP / IP network. The reset process is made (S300).

도 5는 도 4의 TCP/IP 관련 사항 설정 과정(S100)을 설명하기 위한 플로우챠트이다.FIG. 5 is a flowchart for describing a TCP / IP related item setting process (S100) of FIG. 4.

우선, TCP/IP 네트워크를 통해 통신하고자 하는 두 대의 시리얼-TCP/IP 변환기의 시리얼 포트 사이를 시리얼 케이블로 연결한다.First, connect a serial cable between the serial ports of two serial-to-TCP / IP converters to communicate over a TCP / IP network.

전술한 바와 같이, 상대측 시리얼-TCP/IP 변환기와 시리얼 케이블로 연결되어 있는 상태에서, 사용자로부터 IP 주소 설정 요청을 입력받으면(S105), 각 시리얼-TCP/IP 변환기는 사설 IP 주소(Private IP Address), 포트 번호를 랜덤하게 생성한다(S110).As described above, when receiving a request for setting an IP address from a user in a state in which a serial cable is connected to a counterpart serial-TCP / IP converter (S105), each serial-TCP / IP converter is assigned a private IP address. ), Randomly generates a port number (S110).

상기한 과정 S110에서 사설 IP 주소 생성에 사용되는 사설 IP 주소는 A 클래스 IP 주소인 10.0.0.1~10.255.255.254를 사용한다.In the process S110, the private IP address used for generating the private IP address uses class A IP addresses 10.0.0.1 to 10.255.255.254.

한편, 본 발명에 사용되는 서브넷 마스크는 사설 IP 주소 대역을 모두 커버할 수 있는 255.0.0.0으로 지정되는 것이 바람직하다.Meanwhile, the subnet mask used in the present invention is preferably designated as 255.0.0.0, which can cover all private IP address bands.

그리고, 본 발명에서 시리얼-TCP/IP 변환기는 상대측 시리얼-TCP/IP 변환기와 로컬 네트워크(Local Network) 안에서만 통신을 하므로, 게이트웨이에 대한 IP 주소는 생성하지 않는다.In the present invention, since the serial-TCP / IP converter communicates only with the counterpart serial-TCP / IP converter in the local network, the IP address for the gateway is not generated.

이후, 각 시리얼-TCP/IP 변환기는 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 상대측 시리얼-TCP/IP 변환기의 MAC 주소, IP 주소, 포트 번호 등을 포함하는 형상 정보 요청(conf-req) 메시지가 수신되는 지를 판단한다(S115).Then, each serial-to-TCP / IP converter requests a configuration information (conf-req) including the MAC address, IP address, port number, etc. of the other serial-TCP / IP converter from the other serial-TCP / IP converter within a predetermined time. It is determined whether a message is received (S115).

상기한 과정 S115의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신되지 않는 경우에는, 시리얼-TCP/IP 변환기 자신의 MAC 주소와 상기한 과정 S110에서 생성한 IP 주소 및 포트 번호 등을 포함하는 형상 정보 요청 메시지를 상대측 시리얼-TCP/IP 변환기로 전송한다(S120).As a result of the determination of step S115, if the configuration information request message is not received from the opposite serial-TCP / IP converter within a preset time, the MAC address of the serial-TCP / IP converter itself and the IP address generated in step S110 described above. And a shape information request message including a port number and the like to the counterpart serial-TCP / IP converter (S120).

상기한 과정 S120을 통해 상대측 시리얼-TCP/IP 변환기로 형상 정보 요청 메시지를 전송한 후에는, 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지를 정상적으로 수신했음을 알리는 ACK 메시지가 수신되는 지를 판단한다(S125).After transmitting the shape information request message to the opposite serial-TCP / IP converter through the process S120, an ACK message indicating that the shape information request message is normally received from the opposite serial-TCP / IP converter is received within a preset time. It is determined (S125).

상기한 과정 S125의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 ACK 메시지를 수신한 경우에는, 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신되는 지를 판단한다(S130).As a result of the determination of step S125, when an ACK message is received from the counterpart serial-TCP / IP converter within a predetermined time, it is determined whether the shape information request message is received from the counterpart serial-TCP / IP converter (S130).

상기한 과정 S130의 판단결과 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신된 경우에는, 상대측 시리얼-TCP/IP 변환기로 형상 정보 요청 메시지를 정상적으로 수신했음을 알리는 ACK 메시지를 전송하고(S135), 상대측 시리얼-TCP/IP 변환기로부터 다시 형상 정보 요청 메시지가 수신되는 지를 판단한다(S140).When the shape information request message is received from the counterpart serial-TCP / IP converter as a result of the determination in step S130, an ACK message indicating that the shape information request message is normally received is transmitted to the counterpart serial-TCP / IP converter (S135). In operation S140, it is determined whether the shape information request message is received from the counterpart serial-TCP / IP converter.

상기한 과정 S140에서 상대측 시리얼-TCP/IP 변환기로부터 다시 형상 정보 요청 메시지가 수신되는 것을 확인하는 이유는, 상기한 과정 S135를 통해 전송한 ACK 메시지를 상대측 시리얼-TCP/IP 변환기가 정상적으로 수신했는 지를 확인하기 위한 것으로, 상대측 시리얼-TCP/IP 변환기가 ACK 메시지를 정상적으로 수신한 경우에는 형상 정보 요청 메시지를 다시 전송하지 않을 것이고, 상대측 시리얼-TCP/IP 변환기가 ACK 메시지를 수신하지 못한 경우에는 형상 정보 요청 메시지를 다시 전송할 것이다. 이에 따라, 상대측 시리얼-TCP/IP 변환기로부터 다시 형상 정보 요청 메시지를 수신한 경우에는, 상대측 시리얼-TCP/IP 변환기로 ACK 메시지를 다시 전송한다.The reason for confirming that the shape information request message is received from the counterpart serial-TCP / IP converter again in step S140 is that the counterpart serial-TCP / IP converter normally receives the ACK message transmitted through step S135. For confirmation, if the opposite serial-TCP / IP converter receives the ACK message normally, the configuration information request message will not be transmitted again. If the opposite serial-TCP / IP converter does not receive the ACK message, the configuration information is not received. The request message will be sent again. Accordingly, when the shape information request message is received again from the counterpart serial-TCP / IP converter, the ACK message is transmitted again to the counterpart serial-TCP / IP converter.

한편, 상대측 시리얼-TCP/IP 변환기로부터 다시 형상 정보 요청 메시지를 수신하지 못한 경우에는, 자신의 MAC 주소와 상대측 시리얼-TCP/IP 변환기로부터 수신한 형상 정보 요청 메시지에 포함되어 있는 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 비교하여 서버와 클라이언트를 결정한다(S145).On the other hand, if the configuration information request message is not received from the partner serial-TCP / IP converter again, the partner serial-TCP / IP included in the MAC address and the configuration information request message received from the partner serial-TCP / IP converter. The server and the client are determined by comparing the MAC addresses of the IP converters (S145).

상기한 과정 S145에서 MAC 주소를 비교한 결과 MAC 주소가 작은 쪽이 서버로 동작하고, MAC 주소가 큰 쪽이 클라이언트로 동작하도록 하는 것이 바람직하다.As a result of comparing the MAC addresses in step S145, it is preferable that the smaller MAC address operates as a server, and the larger MAC address operates as a client.

이후에는, 상기한 과정 S110에서 생성된 IP 주소와 기지정된 값의 서브넷 마스크, 그리고 형상 정보 요청 메시지를 통해 상대측 시리얼-TCP/IP 변환기로부터 수신한 상대측 시리얼-TCP/IP 변환기의 IP 주소와 포트 번호에 의거하여 TCP/IP 관련 사항을 설정한다(S150).Subsequently, the IP address and port number of the partner serial-TCP / IP converter received from the partner serial-TCP / IP converter through the IP address, the subnet mask of the predetermined value, and the shape information request message generated in step S110. On the basis of the above, the TCP / IP related items are set (S150).

한편, 상기한 과정 S115의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신되는 경우에는, 상대측 시리얼-TCP/IP 변환기로 ACK 메시지를 전송한 후(S155), 시리얼-TCP/IP 변환기 자신의 MAC 주소, IP 주소, 포트 번호 등을 포함하는 형상 정보 요청 메시지를 상대측 시리얼-TCP/IP 변환기로 전송한다(S160).On the other hand, if the shape information request message is received from the counterpart serial-TCP / IP converter within a predetermined time as a result of the determination of step S115, after transmitting an ACK message to the counterpart serial-TCP / IP converter (S155), The TCP / IP converter transmits a shape information request message including its MAC address, IP address, port number, etc. to the opposite serial-TCP / IP converter (S160).

상기한 과정 S160을 통해 상대측 시리얼-TCP/IP 변환기로 형상 정보 요청 메시지를 전송한 후에는, 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 ACK 메시지가 수신되는 지를 판단한다(S165).After transmitting the shape information request message to the opposite serial-TCP / IP converter through the process S160, it is determined whether an ACK message is received from the opposite serial-TCP / IP converter within a predetermined time (S165).

상기한 과정 S165의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 ACK 메시지를 수신한 경우에는, 상기한 과정 S145로 진행하여 자신의 MAC 주소와 상대측 시리얼-TCP/IP 변환기로부터 수신한 형상 정보 요청 메시지에 포함되어 있는 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 비교하여 서버와 클라이언트를 결정한다In case the ACK message is received from the opposite serial-TCP / IP converter within a predetermined time as a result of the determination of step S165, the process proceeds to the above-mentioned step S145 and the shape received from the own MAC address and the opposite serial-TCP / IP converter. The server and client are determined by comparing the MAC address of the partner serial-to-TCP / IP converter included in the information request message.

도 6은 도 4의 IP 주소 점검 과정(S200)을 설명하기 위한 플로우챠트이다.FIG. 6 is a flowchart for explaining an IP address checking process S200 of FIG. 4.

우선, 상기한 TCP/IP 관련 사항 설정 과정(S100)을 통해 TCP/IP 관련 사항을 설정한 후, 각 시리얼-TCP/IP 변환기를 실제 TCP/IP 네트워크에 연결하게 되면, 각 시리얼-TCP/IP 변환기는 TCP/IP 네트워크를 통해 상대측 시리얼-TCP/IP 변환기에 주기적으로 ARP 요청 패킷을 전송한다(S205).First, after setting TCP / IP related items through the TCP / IP related item setting process (S100), and connecting each serial-to-TCP / IP converter to an actual TCP / IP network, each serial-TCP / IP The converter periodically transmits the ARP request packet to the opposite serial-TCP / IP converter through the TCP / IP network (S205).

이후에는, 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷이 수신되는 지를 판단한다(S210).Thereafter, it is determined whether an ARP response packet is received from a host other than the counterpart serial-TCP / IP converter (S210).

상기한 과정 S210의 판단결과 다른 호스트로부터 ARP 응답 패킷을 수신한 경우에는, 상대측 시리얼-TCP/IP 변환기로 IP 주소가 중복되었음을 알리고(S215), TCP/IP 관련 사항을 재설정하기 위해 TCP/IP 관련 사항 재설정 과정으로 진입한 다(S220).If the ARP response packet is received from the other host as a result of the determination of step S210, it informs the counterpart serial-to-TCP / IP converter that the IP address is duplicated (S215) and TCP / IP-related to reset the TCP / IP-related matters. Enter the item reset process (S220).

상기한 과정 S215를 통해 상대측 시리얼-TCP/IP 변환기로 IP 주소가 중복되었음을 알릴 때, 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 목적지 MAC 주소로 하고, 상대측 시리얼-TCP/IP 변환기의 IP 주소를 목적지 IP 주소로 하는 UDP 유니케스트를 이용하여 알린다.When notifying the counterpart serial-TCP / IP converter that the IP address is duplicated through the process S215, the MAC address of the counterpart serial-TCP / IP converter is set as the destination MAC address, and the IP address of the counterpart serial-TCP / IP converter is set. Notify using UDP unicast as the destination IP address.

한편, 상기한 과정 S210의 판단결과 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷을 수신하지 않은 경우에는, 상대측 시리얼-TCP/IP 변환기로부터 상기한 과정 S205을 통해 전송한 ARP 요청 패킷에 대한 응답 패킷 ARP 응답 패킷이 수신되는 지를 판단한다(S225).On the other hand, if the ARP response packet is not received from the host other than the other party's serial-TCP / IP converter as a result of the determination of step S210, the ARP request packet transmitted from the other party's serial-TCP / IP converter through step S205. It is determined whether the ARP response packet is received in response to (S225).

상기한 과정 S225의 판단결과 상대측 시리얼-TCP/IP 변환기로부터 ARP 응답 패킷을 수신하지 못한 경우에는, 상기한 과정 S220으로 진행하여 TCP/IP 관련 사항 재설정 과정으로 진입한다.As a result of the determination of step S225, if the ARP response packet is not received from the counterpart serial-TCP / IP converter, the process proceeds to step S220 and enters the TCP / IP related reset procedure.

도 7은 도 4의 TCP/IP 관련 사항 재설정 과정(S300)을 설명하기 위한 플로우챠트이다.FIG. 7 is a flowchart for describing a TCP / IP related item resetting process (S300) of FIG. 4.

상기한 IP 주소 점검 과정(S200)의 점검결과 상대측 시리얼-TCP/IP 변환기로부터 ARP 응답 패킷을 수신하지 못하거나, 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷을 수신하게 된 경우, 또는 상대측 시리얼-TCP/IP 변환기로부터 IP 주소 중복을 통지받으면, 각 시리얼-TCP/IP 변환기는 사설 IP 주소, 포트 번호를 랜덤하게 재생성한다(S305).When the check result of the IP address checking process (S200) does not receive the ARP response packet from the counterpart serial-TCP / IP converter, or receives an ARP response packet from a host other than the counterpart serial-TCP / IP converter, Alternatively, when notified of the overlapping IP address from the counterpart serial-TCP / IP converter, each serial-TCP / IP converter randomly regenerates a private IP address and a port number (S305).

이후, 각 시리얼-TCP/IP 변환기는 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 상대측 시리얼-TCP/IP 변환기의 MAC 주소, IP 주소, 포트 번호 등을 포함하는 형상 정보 요청(conf-req) 메시지가 수신되는 지를 판단한다(S310).Then, each serial-to-TCP / IP converter requests a configuration information (conf-req) including the MAC address, IP address, port number, etc. of the other serial-TCP / IP converter from the other serial-TCP / IP converter within a predetermined time. It is determined whether the message is received (S310).

상기한 과정 S310의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신되지 않는 경우에는, 시리얼-TCP/IP 변환기 자신의 MAC 주소와 상기한 과정 S305에서 생성한 IP 주소 및 포트 번호 등을 포함하는 형상 정보 요청 메시지를 상대측 시리얼-TCP/IP 변환기로 전송한다(S315).As a result of the determination of step S310, if the shape information request message is not received from the opposite serial-TCP / IP converter within a predetermined time, the MAC address of the serial-TCP / IP converter itself and the IP address generated in step S305. And a shape information request message including a port number and the like to the counterpart serial-TCP / IP converter (S315).

상기한 과정 S315를 통해 상대측 시리얼-TCP/IP 변환기로 형상 정보 요청 메시지를 전송한 후에는, 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지를 정상적으로 수신했음을 알리는 ACK 메시지가 수신되는 지를 판단한다(S320).After transmitting the shape information request message to the opposite serial-TCP / IP converter in step S315, an ACK message indicating that the shape information request message has been normally received from the opposite serial-TCP / IP converter is received within a predetermined time. It is determined (S320).

상기한 과정 S320의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 ACK 메시지를 수신한 경우에는, 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신되는 지를 판단한다(S325).As a result of the determination of step S320, if an ACK message is received from the opposite serial-TCP / IP converter within a predetermined time, it is determined whether the shape information request message is received from the opposite serial-TCP / IP converter (S325).

상기한 과정 S325의 판단결과 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신된 경우에는, 상대측 시리얼-TCP/IP 변환기로 형상 정보 요청 메시지를 정상적으로 수신했음을 알리는 ACK 메시지를 전송하고(S330), 상대측 시리얼-TCP/IP 변환기로부터 다시 형상 정보 요청 메시지가 수신되는 지를 판단한다(S335).When the shape information request message is received from the counterpart serial-TCP / IP converter as a result of the determination in step S325, an ACK message indicating that the shape information request message is normally received is transmitted to the counterpart serial-TCP / IP converter (S330). In operation S335, it is determined whether the shape information request message is received from the counterpart serial-TCP / IP converter.

상기한 과정 S335의 판단결과 상대측 시리얼-TCP/IP 변환기로부터 다시 형상 정보 요청 메시지를 수신한 경우에는, 상대측 시리얼-TCP/IP 변환기로 ACK 메시지 를 다시 전송하고, 상대측 시리얼-TCP/IP 변환기로부터 다시 형상 정보 요청 메시지를 수신하지 못한 경우에는, 자신의 MAC 주소와 상대측 시리얼-TCP/IP 변환기로부터 수신한 형상 정보 요청 메시지에 포함되어 있는 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 비교하여 서버와 클라이언트를 결정한다(S340).When the determination result of step S335 indicates that the shape information request message is received again from the counterpart serial-TCP / IP converter, the ACK message is transmitted again to the counterpart serial-TCP / IP converter, and the counterpart is again sent from the counterpart serial-TCP / IP converter. If the configuration information request message is not received, the server and client are compared by comparing their MAC address with the MAC address of the partner serial-TCP / IP converter included in the configuration information request message received from the partner serial-TCP / IP converter. Determine (S340).

상기한 과정 S345에서 MAC 주소를 비교한 결과 MAC 주소가 작은 쪽이 서버로 동작하고, MAC 주소가 큰 쪽이 클라이언트로 동작하도록 하는 것이 바람직하다.As a result of comparing the MAC addresses in step S345, it is preferable that the smaller MAC address operates as a server, and the larger MAC address operates as a client.

이후에는, 상기한 과정 S305에서 생성된 IP 주소와 기지정된 값의 서브넷 마스크, 그리고 형상 정보 요청 메시지를 통해 상대측 시리얼-TCP/IP 변환기로부터 수신한 상대측 시리얼-TCP/IP 변환기의 IP 주소와 포트 번호에 의거하여 TCP/IP 관련 사항을 재설정한다(S345).Subsequently, the IP address and port number of the partner serial-TCP / IP converter received from the partner serial-TCP / IP converter through the IP address generated in step S305, the subnet mask of the predetermined value, and the shape information request message. On the basis of the reset TCP / IP related items (S345).

한편, 상기한 과정 S310의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 형상 정보 요청 메시지가 수신되는 경우에는, 상대측 시리얼-TCP/IP 변환기로 ACK 메시지를 전송한 후(S350), 시리얼-TCP/IP 변환기 자신의 MAC 주소, IP 주소, 포트 번호 등을 포함하는 형상 정보 요청 메시지를 상대측 시리얼-TCP/IP 변환기로 전송한다(S355).On the other hand, if the shape information request message is received from the counterpart serial-TCP / IP converter within a predetermined time as a result of the determination of step S310, after transmitting the ACK message to the counterpart serial-TCP / IP converter (S350), The TCP / IP converter transmits a shape information request message including its MAC address, IP address, port number, etc. to the opposite serial-TCP / IP converter (S355).

상기한 과정 S355를 통해 상대측 시리얼-TCP/IP 변환기로 형상 정보 요청 메시지를 전송한 후에는, 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 ACK 메시지가 수신되는 지를 판단한다(S360).After transmitting the shape information request message to the counterpart serial-TCP / IP converter through the process S355, it is determined whether an ACK message is received from the counterpart serial-TCP / IP converter within a predetermined time (S360).

상기한 과정 S360의 판단결과 기설정된 시간 내에 상대측 시리얼-TCP/IP 변환기로부터 ACK 메시지를 수신한 경우에는, 상기한 과정 S340으로 진행하여 자신의 MAC 주소와 상대측 시리얼-TCP/IP 변환기로부터 수신한 형상 정보 요청 메시지에 포함되어 있는 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 비교하여 서버와 클라이언트를 결정한다.As a result of the determination of step S360, if an ACK message is received from the opposite serial-TCP / IP converter within a predetermined time, the process proceeds to the above-mentioned step S340 and the shape received from the own MAC address and the opposite serial-TCP / IP converter. The server and client are determined by comparing the MAC address of the other serial-to-TCP / IP converter included in the information request message.

본 발명의 IP 주소 자동 설정 방법은 전술한 실시예에 국한되지 않고 본 발명의 기술 사상이 허용하는 범위 내에서 다양하게 변형하여 실시할 수 있다.The automatic method for automatically setting an IP address of the present invention is not limited to the above-described embodiment, and may be variously modified and implemented within the range allowed by the technical idea of the present invention.

도 1은 두 대의 시리얼 통신 장치가 시리얼 통신에 의해 직접 연결되는 상태를 나타내는 도면.1 is a view showing a state in which two serial communication devices are directly connected by serial communication.

도 2는 두 대의 시리얼 통신 장치가 시리얼-TCP/IP 변환기를 사용하여 TCP/IP 네트워크를 통해 연결되는 상태를 나타내는 도면.2 is a diagram illustrating a state in which two serial communication devices are connected through a TCP / IP network using a serial-to-TCP / IP converter.

도 3은 본 발명이 적용되는 IP 주소 자동 설정이 가능한 시리얼-TCP/IP 변환기의 구성을 예시적으로 보인 도면.3 is a view showing an exemplary configuration of a serial-to-TCP / IP converter capable of automatically setting an IP address to which the present invention is applied.

도 4는 본 발명의 일 실시예에 따른 IP 주소 자동 설정 방법을 설명하기 위한 플로우챠트.4 is a flowchart illustrating a method of automatically setting an IP address according to an embodiment of the present invention.

도 5는 도 4의 TCP/IP 관련 사항 설정 과정을 설명하기 위한 플로우챠트.FIG. 5 is a flowchart illustrating a TCP / IP related item setting process of FIG. 4.

도 6은 도 4의 IP 주소 점검 과정을 설명하기 위한 플로우챠트.FIG. 6 is a flowchart for explaining an IP address checking procedure of FIG. 4.

도 7은 도 4의 TCP/IP 관련 사항 재설정 과정을 설명하기 위한 플로우챠트.FIG. 7 is a flowchart for explaining a TCP / IP related item reset process of FIG. 4. FIG.

*** 도면의 주요 부분에 대한 부호의 설명 ****** Explanation of symbols for the main parts of the drawing ***

100. 시리얼-TCP/IP 변환기, 110. 입력포트, 120. 출력포트,100. Serial to TCP / IP converter, 110. Input port, 120. Output port,

130. 시리얼 통신부, 133. 회선 구동부, 135. UART 콘트롤러,130. Serial communication unit, 133. Line driver, 135. UART controller,

140. TCP/IP 통신부, 143. PHY, 145.MAC,140.TCP / IP communication unit, 143.PHY, 145.MAC,

150. 메모리부, 153. 비휘발성 메모리, 155. 휘발성 메모리,150. memory section, 153. non-volatile memory, 155. volatile memory,

160. 제어부160. Control unit

Claims (7)

삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 두 대의 시리얼-TCP/IP(Transmission Control Protocol/Internet Protocol) 변환기의 시리얼 포트 사이를 시리얼 케이블로 연결한 후, 사용자로부터 IP 주소 설정 요청을 입력받으면, IP 주소, 포트 번호를 생성하고, 상대측 시리얼-TCP/IP 변환기와 MAC 주소, IP 주소, 포트 번호를 주고받아 TCP/IP 관련 사항을 자동으로 설정하는 TCP/IP 관련 사항 설정 과정과;After connecting serial cable between two serial-to-TCP / IP (Transmission Control Protocol / Internet Protocol) converters and receiving an IP address setting request from the user, create an IP address and port number. A TCP / IP related setting process of automatically setting up TCP / IP related items by exchanging MAC addresses, IP addresses, and port numbers with the TCP / IP converter; 네트워크 포트에 사용할 TCP/IP 네트워크가 연결되면, 상기 TCP/IP 관련 사항 설정 과정에서 상대측 시리얼-TCP/IP 변환기로부터 수신한 IP 주소가 사용 가능한 IP 주소인지를 점검하는 IP 주소 점검 과정과;An IP address checking process of checking whether an IP address received from a counterpart serial-TCP / IP converter is an available IP address when a TCP / IP network to be used for a network port is connected; 상기 점검결과 상기 IP 주소에 문제가 있는 경우에는 IP 주소, 포트 번호를 재생성한 후, 현재 연결되어 있는 TCP/IP 네트워크를 통해 상대측 시리얼-TCP/IP 변환기와 MAC(Media Access Control) 주소, IP 주소, 포트 번호를 다시 주고받아 TCP/IP 관련 사항을 자동으로 재설정하는 TCP/IP 관련 사항 재설정 과정을 포함하여 이루어지되,If there is a problem with the IP address, the IP address and the port number are regenerated, and the serial-to-TCP / IP converter and MAC (Media Access Control) address and IP address of the other party are connected through the TCP / IP network. Including TCP / IP-related reset process that automatically resets TCP / IP-related information by sending and receiving port numbers again, 상기 IP 주소 점검 과정은, 상기 TCP/IP 관련 사항 설정 과정을 마친 후, 네트워크 포트에 사용할 TCP/IP 네트워크가 연결되면, 상기 TCP/IP 네트워크를 통해 상대측 시리얼-TCP/IP 변환기로 주기적으로 ARP(Address Resolution Protocol) 요청 패킷을 송신하는 과정과;The IP address checking process, after completing the TCP / IP related matters setting process, when a TCP / IP network to be used for a network port is connected, periodically ARP (ARP) through the TCP / IP network to a counterpart serial-TCP / IP converter. Address resolution protocol) request packet; 상기 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷이 수신되는 지를 판단하는 과정과;Determining whether an ARP response packet is received from a host other than the counterpart serial-TCP / IP converter; 상기 판단결과 다른 호스트로부터 ARP 응답 패킷이 수신되면, 상기 상대측 시리얼-TCP/IP 변환기로 IP 주소 중복을 알리고, 상기 TCP/IP 관련 사항 재설정 과정으로 진입하는 과정과;When the ARP response packet is received from the other host as a result of the determination, informing the counterpart serial-TCP / IP converter of the IP address duplication and entering the TCP / IP related matter reset process; 상기 상대측 시리얼-TCP/IP 변환기로부터 상기 ARP 요청 패킷에 대한 ARP 응답 패킷이 수신되는 지를 판단하는 과정과;Determining whether an ARP response packet for the ARP request packet is received from the counterpart serial-TCP / IP converter; 상기 판단결과 상대측 시리얼-TCP/IP 변환기로부터 ARP 응답 패킷이 수신되지 않는 경우에는 상기 TCP/IP 관련 사항 재설정 과정으로 진입하는 과정을 포함하여 이루어지는 것을 특징으로 하는 IP 주소 자동 설정 방법.And when the ARP response packet is not received from the counterpart serial-TCP / IP converter as a result of the determination, entering the TCP / IP related item reset process. 제 6항에 있어서, 상기 TCP/IP 관련 사항 재설정 과정은,The method of claim 6, wherein the resetting of the TCP / IP related matters comprises: 상기 IP 주소 점검 과정의 점검결과 상기 상대측 시리얼-TCP/IP 변환기로부터 ARP 응답 패킷을 수신하지 못하거나, 상기 상대측 시리얼-TCP/IP 변환기 이외의 다른 호스트로부터 ARP 응답 패킷을 수신하게 된 경우, IP 주소 및 포트 번호를 랜덤하게 재생성하는 과정과;If the IP address check procedure does not receive the ARP response packet from the counterpart serial-TCP / IP converter or receives an ARP response packet from a host other than the counterpart serial-TCP / IP converter, Randomly regenerating port numbers; TCP/IP 네트워크 통신을 통해 상대측 시리얼-TCP/IP 변환기로부터 상대측 시리얼-TCP/IP 변환기의 MAC 주소, IP 주소, 포트 번호를 수신하는 과정과;Receiving a MAC address, an IP address, and a port number of the opposite serial-TCP / IP converter from the opposite serial-TCP / IP converter through TCP / IP network communication; 자신의 MAC 주소와 상기 재생성한 IP 주소 및 포트 번호를 TCP/IP 네트워크 통신을 통해 상대측 시리얼-TCP/IP 변환기로 전송하는 과정과;Transmitting its MAC address and the regenerated IP address and port number to a counterpart serial-TCP / IP converter via TCP / IP network communication; 자신의 MAC 주소와 상대측 시리얼-TCP/IP 변환기의 MAC 주소를 비교하여 서버와 클라이언트를 결정하는 과정과;Determining a server and a client by comparing a MAC address of the peer with a MAC address of a counterpart serial-TCP / IP converter; 상기 재생성하는 과정에서 재생성된 IP 주소와 기지정된 값의 서브넷 마스크, 상대측 시리얼-TCP/IP 변환기로부터 수신한 IP 주소 및 포트 번호에 의거하여 TCP/IP 관련 사항을 재설정하는 과정을 포함하여 이루어지는 것을 특징으로 하는 IP 주소 자동 설정 방법.And resetting the TCP / IP related matters based on the regenerated IP address, the subnet mask of the predetermined value, the IP address and the port number received from the counterpart serial-TCP / IP converter. To automatically set the IP address.
KR1020080043389A 2008-05-09 2008-05-09 Method for auto-setting of ip adrress KR100958076B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080043389A KR100958076B1 (en) 2008-05-09 2008-05-09 Method for auto-setting of ip adrress

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080043389A KR100958076B1 (en) 2008-05-09 2008-05-09 Method for auto-setting of ip adrress

Publications (2)

Publication Number Publication Date
KR20090117372A KR20090117372A (en) 2009-11-12
KR100958076B1 true KR100958076B1 (en) 2010-05-13

Family

ID=41601861

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080043389A KR100958076B1 (en) 2008-05-09 2008-05-09 Method for auto-setting of ip adrress

Country Status (1)

Country Link
KR (1) KR100958076B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010084769A (en) * 2000-02-29 2001-09-06 윤영찬 Ethernet TCP/IP Modem
JP2005079672A (en) 2003-08-28 2005-03-24 Toshiba Corp Ip address converter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010084769A (en) * 2000-02-29 2001-09-06 윤영찬 Ethernet TCP/IP Modem
JP2005079672A (en) 2003-08-28 2005-03-24 Toshiba Corp Ip address converter

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Data Comm for Business, Inc.사 홈페이지(www.dcbnet.com)에 게시된 EtherPoll 제품의 사용자 설명서
신명정보통신 홈페이지(www.smic21.com)에 게시된 NetEye 1000 SA 제품의 사용자 설명서

Also Published As

Publication number Publication date
KR20090117372A (en) 2009-11-12

Similar Documents

Publication Publication Date Title
KR100906504B1 (en) Wireless communication system, wireless lan access point and settings confirmation/change method used therefor
JP5423736B2 (en) Gateway device
US7599393B1 (en) Architecture for emulating an ethernet network interface card
CN112165438A (en) Vehicle communication method and communication system
KR100953676B1 (en) Architecture for emulating an ethernet network interface card
US20100332631A1 (en) Communication apparatus, address setting method, and address setting program
US20080180524A1 (en) Remote monitoring control method of network camera
US9131431B2 (en) Wireless access point device, network system and network auto-establishing method of the same
WO2006013811A1 (en) Information processing system, information processing apparatus, server apparatus, information processing method and program
KR100958076B1 (en) Method for auto-setting of ip adrress
CN112078634A (en) Uncoupling hook control method and device, electronic equipment and storage medium
JP2007243301A (en) Connection apparatus for communication equipment
KR101586761B1 (en) Method for managing network components in a network, and a network component
JP2005354233A5 (en)
JP2001320754A (en) Mobile communication system with automatic registration function of radio base station installed position, and automatic registration method for radio base station installed position
JP4821715B2 (en) Equipment management communication system
JP4029898B2 (en) Network equipment
JP5089476B2 (en) Communication start system
JP5126258B2 (en) ACCESS CONTROL SYSTEM, ACCESS CONTROL DEVICE, ACCESS CONTROL METHOD USED FOR THEM, AND PROGRAM THEREOF
CN115086446B (en) Data transmission method, system, device, equipment and computer readable storage medium
JP2006121253A (en) Node detecting method and node detector
CN112087410B (en) Multi-protocol confirming method based on controller area network
JP4125146B2 (en) Data processing apparatus and data processing method
KR20240016709A (en) Device management method and apparatus using smart repeater
KR20200124903A (en) Method for Communicating Between Master Module and Slavemodule of PLC Network

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130226

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20140417

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20150430

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20160504

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20170411

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20190304

Year of fee payment: 10