Relaying apparatus, relaying method, and program
The relay device addresses compatibility issues by dynamically converting IP addresses and executing protocols based on preset settings, facilitating secure and user-friendly IP communication between wired and wireless-connected devices.
Patent Information
- Application Number
- JP2023222930
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-10
AI Technical Summary
Existing wireless access point devices limit communication to a single IP address for frames with a specific MAC address, restricting compatibility with devices connected via both wired and wireless connections, necessitating complex port forwarding settings for broader compatibility.
A relay device that determines port number information in frames, converting destination IP addresses when necessary and executing higher-layer protocols based on preset settings, allowing seamless communication between devices connected via both wired and wireless networks without complex user configurations.
Enables easy and secure IP communication by ensuring compatibility between MAC and IP addresses, simplifying setup by eliminating the need for intricate port forwarding operations, and enhancing user convenience.
Smart Images

Figure 2025104815000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a relay device, a relay method, and a program.
Background Art
[0002] When a packet in the direction from the LAN (Local Area Network) side to the Internet side is received from a terminal device, the source IP address and port number of the packet are converted, the converted port number is stored as history information, and the stored port number is used when determining whether to transfer the packet to the LAN side when a packet in the direction from the Internet side to the LAN side is received. A NAT (Network Address Translation) device has been proposed (see, for example, Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] By the way, although the NAT technology described in Patent Document 1 is already a known technology, among wireless access point devices, from the perspective of maintaining security, for frames that are transmitted to a wireless communication device of a communication partner and have the MAC address of the wireless communication device as the destination MAC address, there are some that allow only one type of IP address as the destination IP address. In the case of such a wireless access point device, when, for example, a combination of the MAC address set in the wireless relay device and the IP address of one device wired-connected to the wireless relay device is allowed as its communication partner, the transmission of frames including the combination of the above-mentioned MAC address set in the wireless relay device and the IP address assigned to the wireless relay device is not allowed, and the communication partner is limited to only the device.
[0005] The present invention has been made in view of the above reasons, and an object thereof is to provide a relay device, a relay method, and a program that can easily make IP communication in which the combination of the MAC address and the IP address included in a frame is limited to one type compatible between the own device and a device wired-connected to the own device.
Means for Solving the Problems
[0006] In order to achieve the above object, the relay device according to the present invention is a relay device that is wired-connected to a device and wirelessly communicates with a wireless communication device, a first frame acquisition unit that acquires a first frame having the relay device IP address assigned to the relay device as the destination IP address; a port number determination unit that determines whether port number information included in the acquired first frame and identifying the processing content of the upper protocol in the transport layer matches preset setting port number information; when it is determined that the port number information does not match the setting port number information, a first address conversion unit that converts the destination IP address of the first frame into the device IP address assigned to the device; A first frame transmission unit that transmits the first frame with the destination IP address converted to the device; When it is determined that the port number information matches the set port number information, a processing unit that executes processing of a higher-layer protocol identified by the set port number information.
[0007] From another perspective, the relay method according to the present invention is A relay method of performing wired connection with a device and wireless communication with a wireless communication device, A step in which a relay device acquires a first frame having a relay device IP address assigned to the relay device as a destination IP address; A step in which the relay device determines whether port number information included in the acquired first frame and identifying processing contents of a higher-layer protocol in the transport layer matches preset set port number information; When the relay device determines that the port number information does not match the set port number information, a step of converting the destination IP address of the first frame to a device IP address assigned to the device; A step in which the relay device transmits the first frame with the destination IP address converted to the device; When the relay device determines that the port number information matches the set port number information, a step of executing processing of a higher-layer protocol identified by the set port number information.
[0008] From another perspective, the program according to the present invention is A program for a relay device that performs wired connection with a device and wireless communication with a wireless communication device, The computer of the relay device is A first frame acquisition means for acquiring a first frame having a relay device IP address assigned to the relay device as a destination IP address, Port number determination means for determining whether or not port number information included in the obtained first frame and identifying the processing content of the upper-layer protocol in the transport layer matches preset set port number information; When it is determined that the port number information does not match the set port number information, first address conversion means for converting the destination IP address of the first frame to the device IP address assigned to the device; First frame transmission means for transmitting the first frame with the converted destination IP address to the device; When it is determined that the port number information matches the set port number information, processing means for executing the processing of the upper-layer protocol identified by the set port number information; Function as.
Effect of the Invention
[0009] According to the present invention, the port number determination unit determines whether or not the aforementioned port number information is the set port number information, and when the first address conversion unit determines that the port number information does not match the set port number information, the destination IP address of the first frame is converted to the device IP address. Further, when the processing unit determines that the port number information matches the set port number information, the processing of the upper-layer protocol identified by the set port number information is executed. Thereby, while making the combination of the MAC address and the IP address included in the first frame to be acquired as one type of the MAC address of the relay device and the relay device IP address, the relay device can transmit the acquired first frame to the device wired-connected to the relay device according to the port number information included in the first frame to be acquired, or execute the processing corresponding to the acquisition of the first frame. Therefore, it is possible to easily make both the IP communication in which the combination of the MAC address and the IP address included in the first frame is limited to one type and the device wired-connected to the relay device compatible with each other.
Brief Description of the Drawings
[0010]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Embodiments for Carrying Out the Invention
[0011] Hereinafter, a relay device according to an embodiment of the present invention will be described with reference to the drawings. The relay device according to this embodiment is wired-connected to a device and wirelessly communicates with a wireless communication device. This relay device includes: a first frame acquisition unit that acquires a first frame having a relay device IP address assigned to the relay device as a destination IP address; a port number determination unit that determines whether port number information included in the acquired first frame and identifying the processing content of the upper-layer protocol at the transport layer matches preset setting port number information; a first address conversion unit that, when it is determined that the port number information does not match the setting port number information, converts the destination IP address of the first frame into a device IP address assigned to the device; a first frame transmission unit that transmits the first frame with the converted destination IP address to the device; and a processing unit that, when it is determined that the port number information matches the setting port number information, executes the processing of the upper-layer protocol identified by the setting port number information. Further, this relay device includes: a second frame acquisition unit that acquires a second frame having the device IP address as a source IP address and the IP address of the wireless communication device as a destination IP address; a second address conversion unit that converts the source IP address of the second frame into the relay device IP address; and a second frame transmission unit that transmits the second frame with the converted source IP address to the wireless communication device.
[0012] As shown in FIG. 1, the relay device 1 according to this embodiment is wired-connected to a device such as the device 4 on the wired LAN (Local Area Network) NW3, wirelessly connects to the access point 3 on the wireless LAN NW1, and communicates with the terminal device 2 on the wireless LAN NW1 and the wired LAN NW2. The terminal device 2 and the DHCP (Dynamic Host Configuration Protocol) server 5 on the wired LAN NW2 different from the wired LAN NW3 communicate with the relay device 1 on the wireless LAN NW1 via the access point 3. Note that the DHCP server 5 is described separately in this embodiment, but may be included in the access point 3. Note that the relay device 1 is wired-connected to only one device 4.
[0013] The terminal device 2 is, for example, a personal computer. When the user performs a frame generation operation for generating a frame addressed to the device 4 or the relay device 1 on the input unit of the terminal device 2, in response to this, the terminal device 2 generates a first frame whose destination IP address is set to the IP address of the relay device 1, and transmits the generated first frame to the relay device 1 via the access point 3. Further, when the terminal device 2 acquires a third frame, which will be described later, transmitted from the relay device 1 via the access point 3, the terminal device 2 performs processing according to the acquired third frame. For example, based on the information indicating the state of the relay device 1 included in the third frame, a management image for managing the state of the relay device 1 is formed and displayed on the display unit.
[0014] When the access point 3 acquires the first frame transmitted from the terminal device 2, the access point 3 transmits the acquired first frame to the relay device 1. Here, from the viewpoint of maintaining security, the access point 3 communicates only with frames in which the destination IP address is combined with a unique MAC address. Specifically, for a frame whose destination MAC address is the MAC address of the relay device 1, which is the communication partner, the access point 3 allows only one address as the combination of the destination IP addresses.
[0015] The device 4 is, for example, an industrial machine, an automated guided vehicle, etc. When it is wired-connected to the relay device 1, it broadcasts a DISCOVER frame to the relay device 1, requesting the relay device 1 to assign an IP address to itself. Then, when the device 4 acquires an OFFER frame transmitted from the relay device 1 by the DHCP function (described later) provided in the relay device 1, it holds the IP address information contained in the acquired OFFER frame as device IP address information indicating the IP address assigned to the device 4 (hereinafter referred to as the "device IP address"). Thereafter, the device 4 transmits a REQUEST frame to the relay device 1, requesting to register the IP address information contained in the OFFER frame as device IP address information indicating the device IP address. Also, the device 4 transmits a REQUEST frame to the relay device 1 when the update time of the device IP address arrives. By the DHCP function of the relay device 1, the IP address of the default gateway of the device 4 is set to the wired LAN side relay device IP address of the relay device 1.
[0016] The DHCP server 5 manages the candidates for IP addresses to be assigned to the terminal device 2 and the access point 3 on the wired LAN NW2, and the relay device 1 wirelessly connected to the access point 3. When the DHCP server 5 is notified that the relay device 1 is wirelessly connected to the access point 3 and acquires a DISCOVER frame from the relay device 1 via the access point 3, it selects a candidate for the IP address to be assigned to the relay device 1 from among the managed IP address candidates. Then, the DHCP server 5 transmits an OFFER frame containing address information indicating the selected IP address to the relay device 1 via the access point 3. Thereafter, when the DHCP server 5 acquires a REQUEST frame transmitted from the relay device 1 via the access point 3, requesting to register the selected IP address as the IP address of the relay device 1, it manages the IP address information contained in the transmitted OFFER frame as the IP address information of the relay device 1. Note that, similar to the access point 3, the DHCP server 5 also notifies only one IP address as a candidate for one MAC address from the perspective of maintaining security.
[0017] As shown in FIG. 2, the relay device 1 includes a CPU (Central Processing Unit) 101, a main memory unit 102, an auxiliary storage unit 103, a wireless module 106, a wired communication interface (hereinafter referred to as “wired communication I / F”) 107, and a bus 109 that connects these to each other. The main memory unit 102 is composed of a volatile memory such as a RAM (Random Access Memory) and is used as a working area for the CPU 101. The auxiliary storage unit 103 is composed of, for example, a non-volatile memory such as a ROM (Read Only Memory), or an SSD (Solid State Drive), an HDD (Hard Disk Drive), etc., and stores programs for controlling the relay device 1 and the like.
[0018] The wireless module 106 communicates using a communication method that conforms to a wireless LAN standard compliant with, for example, IEEE802.11. The wireless module 106 includes an antenna (not shown), a reception circuit (not shown), a signal processing unit (not shown), and a transmission circuit (not shown). The reception circuit receives a wireless signal via the antenna, demodulates the received wireless signal to generate a baseband signal, and outputs it to the signal processing unit. The transmission circuit generates a wireless signal corresponding to the frame to be transmitted by modulating a carrier signal using the baseband signal input from the signal processing unit, and transmits the generated wireless signal via the antenna. The signal processing unit is realized by, for example, a DSP (Digital Signal Processor), and generates a frame corresponding to the wireless signal received by the reception circuit based on the baseband signal input from the reception circuit, and sends it to the bus 109.
[0019] The wired communication I / F 107 communicates using a communication method that conforms to, for example, the Ethernet standard compliant with IEEE802.3. The wired communication I / F 107 has an MDI-X (Medium Dependent Interface Crossover) port, a receiving circuit (not shown), a signal processing unit (not shown), and a transmitting circuit (not shown). The receiving circuit receives a signal via the MDI-X port, demodulates the received signal to generate a baseband signal, and outputs the baseband signal to the signal processing unit. The transmitting circuit generates a signal corresponding to the frame to be transmitted by modulating a carrier signal using the baseband signal input from the signal processing unit, and transmits the generated signal via the MDI-X port. The signal processing unit is realized by, for example, a DSP, generates a frame corresponding to the signal received by the receiving circuit based on the baseband signal input from the receiving circuit, and sends the frame to the bus 109.
[0020] The CPU 101 functions as a first frame acquisition unit 111, a port number determination unit 112, a first address conversion unit 113, a processing unit 114, a first frame transmission unit 115, a second frame acquisition unit 116, a second address conversion unit 117, a second frame transmission unit 118, an address acquisition unit 119, and a DHCP function unit 120 as shown in FIG. 3 by reading and executing the program stored in the auxiliary storage unit 103 into the main storage unit 102. Further, as shown in FIG. 3, the auxiliary storage unit 103 shown in FIG. 2 has a set port number storage unit 131 that stores set port number information indicating a preset port number, and an address storage unit 132. Here, the port number is a number that identifies the processing content in a higher-layer protocol such as an application layer protocol in a transport layer protocol such as TCP (Transmission Control Protocol) or UDP (User Datagram Protocol).
[0021] The address storage unit 132 stores device MAC address information indicating the MAC (Media Access Control) address unique to the device 4 connected to the relay device 1 (itself) (hereinafter referred to as the "device MAC address"), and device IP address information indicating the device IP address of the device 4. Further, the address storage unit 132 stores relay device MAC address information indicating the MAC address unique to the relay device 1 (hereinafter referred to as the "relay device MAC address"). Furthermore, the address storage unit 132 stores wireless LAN side relay device IP address information indicating the IP address assigned to the wireless LAN NW1 side of the relay device 1 issued by the DHCP server 5 (hereinafter referred to as the "wireless LAN side relay device IP address"), and wired LAN side relay device IP address information indicating the IP address assigned to the wired LAN NW3 side of the relay device 1 reserved in advance (hereinafter referred to as the "wired LAN side relay device IP address").
[0022] Furthermore, as shown in FIG. 3, the main memory unit 102 shown in FIG. 2 has a first frame buffer 121 that temporarily stores a first frame in which the destination IP address is set to the device IP address of the device 4, and a second frame buffer 122 that temporarily stores a second frame in which the destination IP address is set to the IP address of the terminal device 2, for example.
[0023] When the first frame acquisition unit 111 acquires a first frame in which the destination IP address is set to the wireless LAN side relay device IP address, it notifies the acquired first frame to the port number determination unit 112.
[0024] The port number determination unit 112 refers to the port number information stored in the set port number storage unit 131 and determines whether the port number information included in the acquired first frame matches the preset set port number information. When the port number determination unit 112 determines that the port number information included in the acquired first frame matches the set port number information, it notifies the processing unit 114 of the first frame. On the other hand, when the port number determination unit 112 determines that the port number information included in the acquired first frame does not match the set port number information, it notifies the first address conversion unit 113 of the first frame.
[0025] When the first address conversion unit 113 is notified of the first frame from the port number determination unit 112, it refers to the device IP address information stored in the address storage unit 132 and converts the destination IP address included in the notified first frame into a device IP address. Then, the first address conversion unit 113 stores the first frame with the destination IP address converted to the IP address of device 4 in the first frame buffer 121. The first frame transmission unit 115 transmits the first frame stored in the first frame buffer 121 to device 4 based on the destination IP address of the first frame.
[0026] When the processing unit 114 is notified of the first frame from the port number determination unit 112, it executes the processing of the upper - layer protocol identified by the port number information included in the notified first frame. By executing the processing based on the port number information, for example, specifically, information indicating the state of relay device 1 is embedded in the third frame with the source IP address set to the wireless LAN - side relay device IP address, and this is stored in the second frame buffer 122. Here, examples of the information indicating the state of relay device 1 include information indicating the link state between relay device 1 and device 4, and access point 3.
[0027] When the second frame acquisition unit 116 acquires a second frame transmitted from device 4 in which the destination IP address is set to the wired LAN side relay device IP address and the source IP address is set to the device IP address, the acquired second frame is notified to the second address conversion unit 117. As will be described later, the second frame acquisition unit 116 also serves as a default gateway when the destination of the frame from device 4 is a node on a network different from wired LAN NW3 (in this embodiment, for example, terminal device 2 on wired LAN NW2).
[0028] When the second address conversion unit 117 is notified of the second frame from the second frame acquisition unit 116, it converts the source IP address included in the second frame to the wireless LAN side relay device IP address. At this time, the source MAC address is also converted to the MAC address of the relay device. Then, the second address conversion unit 117 stores the second frame with the converted source IP address in the second frame buffer 122. The second frame transmission unit 118 transmits the second frame or the third frame stored in the second frame buffer 122 to the access point 3 based on the destination IP address of the second frame and the third frame.
[0029] The DHCP function unit 120 manages candidates for IP addresses to be assigned to device 4 that is wired-connected to the relay device 1. When the DHCP function unit 120 acquires a DISCOVER frame requesting IP address assignment from device 4 when device 4 is wired-connected to the relay device 1, it transmits an OFFER frame including address information indicating the IP address selected from the managed IP address candidates to device 4. Thereafter, when the DHCP function unit 120 acquires a REQUEST frame transmitted from device 4 requesting to register the selected IP address as the device IP address, it notifies the address acquisition unit 119 of the IP address information included in the transmitted OFFER frame as the device IP address information.
[0030] The address acquisition unit 119 receives communication from the device 4 including a DHCP request, and causes the address storage unit 132 to store the MAC address information of the device 4 as device MAC address information. Further, when the relay device 1 wirelessly connects to the access point 3, the address acquisition unit 119 broadcasts a DISCOVER frame. Then, when the address acquisition unit 119 acquires an OFFER frame transmitted from the DHCP server 5 via the access point 3, it causes the address storage unit 132 to store the IP address information included in the acquired OFFER frame as wireless LAN side IP address information. After that, the address acquisition unit 119 transmits a REQUEST frame requesting to register the IP address indicated by the IP address information stored in the address storage unit 132 as the wireless LAN side IP address to the DHCP server 5 via the access point 3.
[0031] Next, the processing of the system including the relay device 1 according to the present embodiment will be described with reference to FIGS. 4 and 5. Here, it is assumed that the relay device 1 already stores in the address storage unit 132 wireless LAN side IP address information indicating a wireless LAN side IP address issued from the DHCP server 5. First, as shown in FIG. 4, when the device 4 is wired to the relay device 1, the above-described DISCOVER frame is transmitted from the device 4 to the relay device 1 (step S1). On the other hand, the relay device 1 selects an IP address from among candidates for the IP address managed by the own device. Then, an OFFER frame including address information indicating the selected IP address is transmitted from the relay device 1 to the device 4 (step S2). On the other hand, when the device 4 acquires the OFFER frame, it extracts the IP address information included in the acquired OFFER frame and holds the extracted IP address information as device IP address information (step S3). Next, a REQUEST frame is transmitted from the device 4 to the relay device 1 (step S4). The relay device 1 stores the MAC address information of the device 4 and the device IP address information, which is the IP address information included in the OFFER frame transmitted to the device 4, in the address storage unit 132 (step S5).
[0032] Subsequently, when the user performs the above-described frame generation operation on the input unit of the terminal device 2, the terminal device 2 generates a first frame whose destination IP address is set to the wireless LAN side IP address of the relay device 1 (step S6). Then, after the generated first frame is transmitted from the terminal device 2 to the access point 3 (step S7), it is transferred to the relay device 1 (step S8). On the other hand, when the relay device 1 acquires the first frame, it determines whether the port number information included in the acquired first frame matches the port number information stored in the set port number storage unit 131. And assume that the relay device 1 determines that the port number information included in the acquired first frame does not match the set port number information (step S9). In this case, the relay device 1 converts the destination IP address of the first frame to the device IP address of the device 4 and stores it in the first frame buffer 121 (step S10). Next, the first frame stored in the first frame buffer 121 is transmitted from the relay device 1 to the device 4 (step S11).
[0033] Also, when a user of the terminal device 2 makes an input to inquire about the state of the relay device 1 from the input unit of the terminal device 2, predetermined port number information equal to the setting port number information of the relay device 1 is embedded in the first frame generated by the terminal device 2. After this first frame is transmitted from the terminal device 2 to the access point 3 (step S7_2), it is transferred to the relay device 1 (step S8_2). Subsequently, as shown in FIG. 5, the relay device 1 determines that the port number information included in the acquired first frame matches the setting port number information (step S12). In this case, the relay device 1 generates a third frame in which the source IP address is set to the wireless LAN side relay device IP address by executing the processing of the upper protocol identified by the setting port number information included in the first frame. Then, the relay device 1 stores the generated third frame in the second frame buffer 122 (step S13). Thereafter, the third frame stored in the second frame buffer 122 is transmitted from the relay device 1 to the access point 3 (step S14). On the other hand, when the access point 3 acquires the third frame, it transfers this to the terminal device 2 (step S15). On the other hand, when the terminal device 2 acquires the third frame, it forms a management image for managing the state of the relay device 1 based on the information indicating the state of the relay device 1 included in the acquired third frame and displays it on the display unit (step S16).
[0034] Also, when the device 4 responds to the first frame received in step S13, or when a frame generation event occurs, such as when an abnormality occurs in the device 4, for example, the device 4 generates a second frame (step S17). Subsequently, the generated second frame is transmitted from the device 4 to the relay device 1 (step S18). On the other hand, when the relay device 1 acquires the second frame, it converts the source IP address to the wireless LAN side relay device IP address of the relay device 1 and then stores it in the second frame buffer 122 (step S19). (At this time, the source MAC address is also converted to the MAC address of the relay device 1.) Thereafter, the second frame stored in the second frame buffer 122 is transmitted from the relay device 1 to the access point 3 (step S20). On the other hand, when the access point 3 acquires the third frame, it transfers it to the terminal device 2 (step S21).
[0035] Next, the relay process executed by the relay device 1 according to this embodiment will be described with reference to FIG. 6. This relay process starts after the power is turned on for the relay device 1 and the DHCP server 5 assigns a wireless LAN side relay device IP address to the relay device 1 and the device 4 is connected to the relay device 1 and a device IP address is assigned to the device 4. Note that the address storage unit 132 of the relay device 1 already stores the wired LAN side relay device IP address information of the relay device 1 and the MAC address information of the device 4, and it is assumed that the device 4 already holds the wired LAN side relay device IP address information of the relay device 1. First, the first frame acquisition unit 111 determines whether it has acquired the first frame transmitted from the access point 3 (step S101). Here, if the first frame acquisition unit 111 determines that it has not acquired the first frame (step S101: No), the process of step S107 described later is executed. On the other hand, if the first frame acquisition unit 111 determines that it has acquired the first frame (step S101: Yes), it notifies the acquired frame to the port number determination unit 112.
[0036] Next, the port number determination unit 112 refers to the port number information stored in the set port number storage unit 131 and determines whether the port number information included in the acquired first frame matches the preset set port number information (step S102). Here, if the port number determination unit 112 determines that the port number information included in the acquired first frame does not match the set port number information (step S102: No), it notifies the first address conversion unit 113 of the first frame. Then, the first address conversion unit 113 refers to the device IP address information stored in the address storage unit 132 and converts the destination IP address included in the notified first frame into a device IP address. Then, the first address conversion unit 113 stores the first frame with the converted destination IP address in the first frame buffer 121 (step S103). Subsequently, the first frame transmission unit 115 transmits the first frame stored in the first frame buffer 121 to device 4 based on the destination IP address of the first frame (step S104), and then the process of step S107 described later is executed.
[0037] Also, if the port number determination unit 112 determines in step S102 described above that the port number information included in the acquired first frame matches the set port number information (step S102: Yes), it notifies the processing unit 114 of the first frame. Then, the processing unit 114 executes the processing of the upper-layer protocol identified by the set port number information included in the notified first frame, and then generates a third frame with the source IP address set to the wireless LAN-side relay device IP address and stores it in the second frame buffer 122 (step S105). Thereafter, the second frame transmission unit 118 transmits the third frame stored in the second frame buffer 122 to access point 3 based on the destination IP address of the third frame (step S106).
[0038] Next, the second frame acquisition unit 116 determines whether or not it has acquired the second frame transmitted from the device 4 (step S107). Here, if the second frame acquisition unit 116 determines that it has not acquired the second frame (step S107: No), the process of step S101 is executed again. On the other hand, if the second frame acquisition unit 116 determines that it has acquired the second frame (step S107: Yes), it notifies the acquired second frame to the second address conversion unit 117. Here, the destination IP address of the second frame is the IP address of a node (for example, the communication terminal 2) passing through the wireless LAN NW1, and the second frame is described on the premise that it has reached the default gateway. The second address conversion unit 117 refers to the wireless LAN side relay device IP address information stored in the address storage unit 132, and converts the source IP address included in the notified second frame into the wireless LAN side relay device IP address. (At this time, the source MAC address is also converted into the MAC address of the relay device 1.) Then, the second address conversion unit 117 stores the second frame with the converted source IP address in the second frame buffer 122 (step S108). Subsequently, the second frame transmission unit 118 transmits the second frame stored in the second frame buffer 122 to the access point 3 based on the destination IP address of the second frame (step S109). After that, the process of step S101 is executed again.
[0039] As described above, in the relay device 1 according to the present embodiment, the port number determination unit 112 determines whether the port number information matches the set port number information. When it is determined that the port number information does not match the set port number information, the first address conversion unit 113 converts the destination IP address of the first frame into the device IP address. When it is determined that the port number information matches the set port number information, the processing unit 114 executes the processing of a given upper-layer protocol based on the set port number information. As a result, while making the combination of the MAC address and the IP address included in the acquired first frame one type of the MAC address of the relay device 1 and the wireless LAN side relay device IP address, the relay device 1 can transmit the acquired first frame to the device 4 wired-connected to the relay device 1 according to the port number information included in the acquired first frame, or execute processing corresponding to the acquisition of the first frame. Therefore, it is possible to easily make both IP communication in which the combination of the MAC address and the IP address included in the first frame is limited to only one type compatible between the relay device 1 and the device 4 wired-connected to the relay device 1.
[0040] By the way, as a specific example of this embodiment, there is an access point capable of realizing high security, such as an access point having a Proxy ARP function, which has a restrictive function of allowing communication only between one IP address and one destination MAC address for security measures of the connected device 4 and not accepting frames of WDS (Wireless Distribution System) communication. Also, as described above in the description of this embodiment, there is also a DHCP server 5 having a function of issuing only one IP address for one destination MAC address. In an environment where such an access point 3 and DHCP server 5 are used, when the device 4 communicates with a relay device connected via a wired LAN, on the wireless LAN side, communication can be made only with either the device 4 or the relay device. On the other hand, if a relay device having a NAPT (Network Address Port Translation) function is used, by performing port forwarding settings on the relay device, it is possible to enable communication between both the device 4 and the relay device from the wireless LAN side. However, when performing port forwarding settings on the relay device, it is necessary to grasp in advance the IP address system of the device 4 on the wired LAN and perform a setting operation for associating the IP address of the device 4 with the port number, which may increase the burden of the setting operation for the user. In contrast, in the relay device 1 according to the present embodiment, the user can easily achieve IP communication compatibility between the device 4 and the relay device 1 via the wireless LAN NW1 without performing the above-described complicated setting operation, thus enhancing the convenience for the user.
[0041] As described above, the embodiments of the present invention have been explained, but the present invention is not limited to the configurations of the embodiments. For example, although an example has been described in which the DHCP function unit 120 of the relay device 1 allocates an IP address to the device 4, the present invention is not limited to this. For example, when a user performs an operation of specifying the IP address of the device 4 on the input unit of the terminal device 2, IP address information indicating the IP address assigned to the device 4 specified by the user may be transmitted from the terminal device 2 to the relay device 1. In this case, when the relay device 1 acquires the IP address information transmitted from the terminal device 2, the acquired IP address information may be stored in the address storage unit 132 as device IP address information. Further, the relay device 1 may have a function of automatically detecting the IP address assigned to the device 4.
[0042] Note that the various functions of the relay device 1 according to the present invention can be realized using a computer system, not a dedicated system. For example, a program for executing the above operation is stored in a non-transitory recording medium (such as a CD-ROM) readable by a computer system and distributed to a computer connected to a network, and the above-described relay device 1 may be configured by installing the program in the computer system. Also, the method of providing the program to the computer is arbitrary. For example, the program may be uploaded to a server on a communication line and distributed to the computer via the communication line.
[0043] As described above, the embodiments and modified examples of the present invention have been explained, but the present invention is not limited to these. The present invention includes those in which the embodiments and modified examples are appropriately combined, and those in which appropriate changes are made thereto.
Industrial Applicability
[0044] The present invention is suitable as a relay device having a bridge function for connecting a wired LAN to a wireless LAN.
Explanation of Signs
[0045] 1: Relay device, 2: Terminal device, 3: Access point, 4: Device, 5: DHCP server, 101: CPU, 102: Main memory unit, 103: Auxiliary memory unit, 106: Wireless module, 107: Wired communication I / F, 109: Bus, 111: First frame acquisition unit, 112: Port number determination unit, 113: First address conversion unit, 114: Processing unit, 115: First frame transmission unit, 116: Second frame acquisition unit, 117: Second address conversion unit, 118: Second frame transmission unit, 119: Address acquisition unit, 120: DHCP function unit, 121: First frame buffer, 122: Second frame buffer, 131: Set port number storage unit, 132: Address storage unit, NW1: Wireless LAN, NW2, NW3: Wired LAN
Claims
1. A relay device that is wired-connected to a device and wirelessly communicates with a wireless communication device, a first frame acquisition unit that acquires a first frame having the relay device IP address assigned to the relay device as the destination IP address; a port number determination unit that determines whether port number information included in the acquired first frame and identifying the processing content of the upper-layer protocol in the transport layer matches preset setting port number information; a first address conversion unit that, when it is determined that the port number information does not match the setting port number information, converts the destination IP address of the first frame to the device IP address assigned to the device; a first frame transmission unit that transmits the first frame with the converted destination IP address to the device; a processing unit that, when it is determined that the port number information matches the setting port number information, executes processing of the upper-layer protocol identified by the setting port number information, A relay device.
2. a second frame acquisition unit that acquires a second frame having the device IP address as the source IP address; a second address conversion unit that converts the source IP address of the second frame to the relay device IP address; a second frame transmission unit that transmits the second frame converted by the second address conversion unit to the wireless communication device, The relay device according to claim 1.
3. The processing unit generates a third frame having the relay device IP address as the source IP address by executing processing of the upper-layer protocol, When the third frame is generated, the second frame transmission unit transmits the third frame to the wireless communication device. The relay device according to claim 2.
4. The wireless communication device communicates only with frames in which the destination IP address is combined with a unique MAC address. The relay device according to claim 1.
5. A relay method in which a device is wired-connected to a device and wirelessly communicates with a wireless communication device, a step in which the relay device acquires a first frame having the relay device IP address assigned to the relay device as the destination IP address; a step in which the relay device determines whether port number information included in the acquired first frame and identifying the processing content of the upper-layer protocol in the transport layer matches preset setting port number information; When it is determined that the port number information does not match the set port number information, the step of converting the destination IP address of the first frame to the device IP address assigned to the device; The step of the relay device transmitting the first frame with the converted destination IP address to the device; When it is determined that the port number information matches the set port number information, the step of executing the processing of the upper protocol identified by the set port number information, including: Relay method.
6. A program for a relay device that is wired-connected to a device and wirelessly communicates with a wireless communication device, The computer of the relay device, A first frame acquisition means for acquiring a first frame having the relay device IP address assigned to the relay device as the destination IP address; A port number determination means for determining whether or not port number information included in the acquired first frame and identifying the processing content of the upper protocol at the transport layer matches preset set port number information; A first address conversion means for converting the destination IP address of the first frame to the device IP address assigned to the device when it is determined that the port number information does not match the set port number information; A first frame transmission means for transmitting the first frame with the converted destination IP address to the device; A processing means for executing the processing of the upper protocol identified by the set port number information when it is determined that the port number information matches the set port number information; A program for functioning as.
Citation Information
Patent Citations
Communication method, communication system, and terminal device
JP2011071745A