Relay device and program
The relay device manages ARP request packets through extended aging processes to reduce the processing load on IoT devices by minimizing frequent transmissions, addressing the high load issue.
Patent Information
- Application Number
- JP2022085860
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2026-02-16
- Estimated Expiration
- 2042-05-26
AI Technical Summary
IoT devices with lower processing capabilities face high processing loads due to frequent receipt of ARP request packets, which increases their load.
A relay device is configured to delete data including IP and MAC addresses with an extended aging process, postponing the timing for data deletion, and managing this process through a control unit and information storage unit.
This reduces the load on IoT devices by minimizing frequent ARP request packet transmission, thereby decreasing the processing load on these devices.
Smart Images

Figure 0007814244000001 
Figure 0007814244000002 
Figure 0007814244000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a relay device , and programs Regarding. [Background technology]
[0002] In Ethernet (registered trademark), a relay device relays packets. Examples of the relay device include a Layer 3 Switch (hereinafter referred to as L3SW), a router, and a gateway device.
[0003] In recent years, the Internet of Things (IoT) has become widespread. With the spread of the IoT, relay devices also relay packets sent and received by devices other than communication devices (hereinafter referred to as IoT devices). Relay devices also monitor and control IoT devices. More specifically, relay devices monitor IoT devices using applications. For example, the application is an EMS (Energy Management System) application for a self-sufficient power system that includes solar power generation equipment, storage battery equipment, and the like. Relay devices use the EMS application to monitor and control solar power generation equipment, storage battery equipment, and the like. There is also a HEMS (Home Energy Management System) application. In this way, by using applications, relay devices have functions other than the relay function.
[0004] Here, for example, IoT devices are temperature sensors, illuminance sensors, etc. IoT devices have lower processing capabilities than general communication devices.
[0005] The processing load of an IoT device may be high. For example, when an IoT device receives a packet transmitted by broadcast, the processing load increases. ARP (Address Resolution Protocol) is known as a protocol for transmitting packets by broadcast. A technology related to ARP has been proposed (see Patent Document 1). Patent Document 1 also describes a time control of ARP table entries called aging. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Patent No. 5258442 Summary of the Invention [Problem to be solved by the invention]
[0007] In ARP, an ARP request packet is sent by broadcast. For example, by sending an ARP request packet, the MAC (Media Access Control) address of an IoT device can be obtained. As mentioned above, IoT devices do not have high processing power, so if an IoT device receives ARP request packets frequently, the load on the IoT device will be high.
[0008] The purpose of this disclosure is to reduce the load on IoT devices. [Means for solving the problem]
[0009] According to one aspect of the present disclosure, there is provided a relay device, the relay device being configured to delete data including an IP address corresponding to the IoT device and a MAC address corresponding to the IoT device. Run A control unit that performs an aging process for deleting the data at each aging period. execution Extend the Information indicating whetherand an information storage unit that stores management information indicating a correspondence between the data and the The execution of the deletion of said data may be postponed. The management information Climb If recorded ,before The timing for performing the aging process on the data is extended. [Effects of the Invention]
[0010] According to the present disclosure, the load on IoT devices can be reduced. [Brief explanation of the drawings]
[0011] [Figure 1] 1 is a diagram illustrating an IoT system according to a first embodiment. [Figure 2] 2 is a diagram illustrating hardware included in a relay device according to the first embodiment. FIG. [Figure 3] 2 is a block diagram showing the functions of the relay device according to the first embodiment. FIG. [Figure 4] FIG. 3 is a diagram illustrating an example of a setting table according to the first embodiment. [Figure 5] FIG. 2 is a diagram showing an example (part 1) of a management table according to the first embodiment. [Figure 6] FIG. 10 is a diagram showing an example (part 2) of the management table according to the first embodiment. [Figure 7] 10 is a flowchart showing an example (part 1) of a data transmission process according to the first embodiment. [Figure 8] 10 is a flowchart showing an example (part 2) of the data transmission process according to the first embodiment. [Figure 9] 10 is a flowchart showing an example of an aging process according to the first embodiment. [Figure 10] FIG. 10 is a diagram illustrating an example of an individual setting table according to the second embodiment. [Figure 11] 10 is a flowchart showing an example (part 1) of a data transmission process according to the second embodiment. [Figure 12] 10 is a flowchart showing an example (part 2) of the data transmission process according to the second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0012] Hereinafter, embodiments will be described with reference to the drawings. The following embodiments are merely examples, and various modifications are possible within the scope of the present disclosure.
[0013] Embodiment 1 1 is a diagram illustrating an IoT system according to the first embodiment. The IoT system includes a relay device 100, IoT devices 200_1 to 200_n (n is a positive integer), and a terminal 300. Here, the IoT devices 200_1 to 200_n are collectively referred to as IoT devices 200.
[0014] The relay device 100 is connected to a WAN (Wide Area Network) 10. The relay device 100 may also be connected to the Internet. The relay device 100 may also be connected to a cloud server. The relay device 100 communicates with IoT devices 200 via a LAN (Local Area Network) 20.
[0015] The relay device 100 may be a broadband router, a home gateway, or the like. The relay device 100 monitors the status of the IoT device 200. The relay device 100 also transmits data received from the IoT device 200 to the WAN 10. For example, a cloud server uses the data to perform analysis.
[0016] The IoT device 200 does not have high processing power. For example, the IoT device 200 is a temperature sensor, an illuminance sensor, or the like. Here, the IoT device 200 may be expressed as follows: The IoT device 200 is a device with lower processing power than communication devices such as a PC (Personal Computer) or a smartphone. The terminal 300 is a terminal used by a user. The terminal 300 communicates with the relay device 100 via the LAN 20. The user can use the terminal 300 to remotely operate the relay device 100. The user can also use the terminal 300 to set parameters in the relay device 100.
[0017] Next, the hardware of the relay device 100 will be described. 2 is a diagram showing hardware included in the relay device of embodiment 1. The relay device 100 includes a processor 101, a volatile storage device 102, and a non-volatile storage device 103.
[0018] The processor 101 controls the entire relay device 100. For example, the processor 101 is a central processing unit (CPU) or a field programmable gate array (FPGA). The processor 101 may be a multiprocessor. The relay device 100 may also include a processing circuit.
[0019] The volatile storage device 102 is a main storage device of the relay device 100. For example, the volatile storage device 102 is a random access memory (RAM). The nonvolatile storage device 103 is an auxiliary storage device of the relay device 100. For example, the nonvolatile storage device 103 is a hard disk drive (HDD) or a solid state drive (SSD).
[0020] Next, the functions of the relay device 100 will be described. 3 is a block diagram showing the functions of the relay device of embodiment 1. The relay device has a parameter storage unit 110, an information storage unit 120, a setting unit 130, a processing unit 140, a LAN interface 150, a WAN interface 160, and a control unit 170. The relay device 100 also includes an application 30. The application 30 is an application for performing various processes on the IoT device 200.
[0021] The parameter storage unit 110 and the information storage unit 120 may be realized as storage areas secured in the volatile storage device 102 or the nonvolatile storage device 103 . The setting unit 130, the processing unit 140, the LAN interface 150, the WAN interface 160, and the control unit 170 may be partly or entirely realized by a processing circuit. Also, the setting unit 130, the processing unit 140, the LAN interface 150, the WAN interface 160, and the control unit 170 may be partly or entirely realized as program modules executed by the processor 101.
[0022] The parameter storage unit 110 stores a setting table. The setting table is shown below.
[0023] 4 is a diagram showing an example of a setting table in the first embodiment. The setting table 111 is stored in the parameter storage unit 110. The setting table 111 has registered therein information on the aging type, the maximum number of extensions, the aging time, and the aging cycle.
[0024] The aging type indicates normal or extended. First, the aging time will be explained. The aging time is the storage time for data. When the aging time has elapsed, the entry, which will be described later, is deleted. The maximum number of extensions is the number of times the aging time can be extended. In other words, the maximum number of extensions is the number of times the timing for deleting data can be extended. The aging cycle is the cycle in which the aging process is performed.
[0025] The setting unit 130 transmits information relating to the aging type, the maximum number of extensions, the aging time, and the aging cycle to the control unit 170. The control unit 170 performs processing using the information relating to the aging type, the maximum number of extensions, the aging time, and the aging cycle. Furthermore, the information regarding the maximum number of extensions, the aging time, and the aging cycle may be changed as appropriate.
[0026] The information storage unit 120 stores a management table, which will be explained later.
[0027] The setting unit 130 is a UI (User Interface) of the relay device 100. For example, the UI is a CLI (Command Line Interface) or an HTML (Hyper Text Markup Language) based UI. The setting unit 130 sets parameters in the application 30. The setting unit 130 also transmits information to the processing unit 140 and the control unit 170. In Fig. 3, the setting of parameters and the transmission of information are indicated by dashed lines.
[0028] The processing unit 140 performs a predetermined process on the packet received by the relay device 100 .
[0029] The LAN interface 150 is an interface that connects to the LAN 20. The LAN interface 150 transmits and receives packets. For example, the LAN interface 150 transmits an ARP request packet to the IoT device 200. Also, for example, the LAN interface 150 receives an ARP response packet from the IoT device 200.
[0030] The WAN interface 160 is an interface that connects to the WAN 10. The WAN interface 160 transmits and receives packets.
[0031] The control unit 170 performs processing based on protocols such as IP (Internet Protocol), TCP (Transmission Control Protocol), UDP (User Datagram Protocol), ARP, etc. The functions of the control unit 170 will be described in detail later.
[0032] Next, the management table will be described. 5 is a diagram showing an example (part 1) of a management table according to the first embodiment. The management table 121 is stored in the information storage unit 120. The management table 121 is also referred to as management information. The management table 121 has a plurality of entries. The entries will be described in detail below.
[0033] An entry has the following fields: entry ID (identifier), IP address, MAC address, entry type, entry update time, aging type, and extension count. The entry ID field contains the identifier of the entry. In the IP address field, an IP address is registered. The MAC address is registered in the MAC address field.
[0034] The entry type field is registered with one of "static", "dynamic", or "invalid". "Static" means that the entry record will not be deleted by aging processing. "Dynamic" means that the entry record is subject to aging processing. "Invalid" means that the entry record is in an unused state. Furthermore, as will be described later, an entry record registered as "invalid" may be reused. The aging process targets entries for which "dynamic" is registered, and excludes entries for which "static" and "invalid" are registered.
[0035] The entry update time field contains the time when the IP address was used. Alternatively, the entry update time field may contain the time since the relay device 100 was started.
[0036] The aging type field is registered with information based on the aging type transmitted by the setting unit 130. That is, "normal" or "extended" is registered in the aging type field. Here, "extended" is also referred to as extension information. The extension information indicates that data deletion is extended in the aging process.
[0037] The extension count field is registered with information based on the maximum extension count transmitted by the setting unit 130. For example, the maximum extension count is registered in the extension count field. Also, for example, the extension count field is registered with a value smaller than the maximum extension count.
[0038] The state in which information is registered in the management table 121 is specifically shown. 6 is a diagram showing an example (part 2) of the management table according to the first embodiment. For example, "static," "dynamic," and "invalid" are registered in the entry type field. Also, for example, "normal" or "extended" is registered in the aging type field. For example, the management table 121 indicates the correspondence between an IP address corresponding to a certain IoT device, a MAC address corresponding to the IoT device, and extension information (i.e., "extension"). In other words, the management table 121 indicates the correspondence between an IP address assigned to the IoT device, a MAC address assigned to the IoT device, and extension information.
[0039] Next, a process performed by the relay device 100 when relaying a packet will be described. When the control unit 170 receives a packet via the LAN interface 150, it transmits the packet to the processing unit 140. The processing unit 140 performs a predetermined process on the packet. After the process, the control unit 170 transmits the packet to the WAN 10 via the WAN interface 160.
[0040] Furthermore, when the control unit 170 receives a packet via the WAN interface 160, it transmits the packet to the processing unit 140. The processing unit 140 performs a predetermined process on the packet. After the process, the control unit 170 transmits the packet to the LAN 20 via the LAN interface 150.
[0041] Next, the data transmission process will be described. FIG. 7 is a flowchart illustrating an example (part 1) of the data transmission process according to the first embodiment. (Step S11) The control unit 170 acquires the IP address of the destination from the processor 101 that executes the application 30. The destination is the IoT device 200. That is, the IP address is the IP address assigned to the IoT device 200.
[0042] (Step S12) The control unit 170 refers to the management table 121 and determines whether or not there is a MAC address corresponding to the IP address. If the MAC address exists, the process proceeds to step S13. If the MAC address does not exist, the process proceeds to step S21.
[0043] (Step S13) The control unit 170 determines whether the entry type of the record of the IP address is "invalid." If the entry type is "invalid," the process proceeds to step S14. If the entry type is "static" or "dynamic," the process proceeds to step S17.
[0044] (Step S14) The control unit 170 changes the entry type of the record of the IP address from "invalid" to "dynamic."
[0045] (Step S15) The control unit 170 executes a MAC address acquisition process. Specifically, the control unit 170 broadcasts an ARP request packet to the IoT device 200. The control unit 170 receives an ARP response packet including the MAC address. The control unit 170 registers the received MAC address in the MAC address field of the record for that IP address. That is, the control unit 170 changes "00:00:00:00:00:00" registered in the MAC address field of the record for that IP address to the received MAC address.
[0046] (Step S16) The control unit 170 executes a registration process for the record of the IP address. Specifically, the control unit 170 registers the current time in the entry update time field. The control unit 170 registers "normal" or "extended" in the aging type field. If "extended" is registered in the aging type field, the control unit 170 registers the number of extensions in the extension count field based on the maximum number of extensions. In this way, since the entry ID and IP address are already registered in the record of the IP address, the control unit 170 can execute the registration process in a shorter time than in step S23 described later. In other words, the control unit 170 can execute the process with a smaller processing load than when executing step S23. Then, the process proceeds to step S18.
[0047] (Step S17) The control unit 170 registers the current time in the entry update time of the record of the IP address. (Step S18) Control unit 170 generates a packet. The IP address is registered as the destination IP address in the IP header of the packet. The MAC address is registered as the destination MAC address in the Ethernet header of the packet. (Step S19) The control unit 170 transmits the packet to the IoT device 200 with the IP address.
[0048] FIG. 8 is a flowchart illustrating an example (part 2) of the data transmission process according to the first embodiment. (Step S21) The control unit 170 broadcasts an ARP request packet to the IoT device 200. To be precise, the control unit 170 broadcasts the ARP request packet to the IoT devices 200_1 to 200_n. (Step S22) The control unit 170 receives the ARP response packet including the MAC address.
[0049] (Step S23) The control unit 170 registers the record of the IP address in the management table 121. In detail, the control unit 170 registers a new identifier in the entry ID field. The control unit 170 registers the IP address in the IP address field. The control unit 170 registers the MAC address in the MAC address field. The control unit 170 registers "dynamic" in the entry type field. The control unit 170 registers the current time in the entry update time field. The control unit 170 registers "normal" or "extended" in the aging type field. If "extended" is registered in the aging type field, the control unit 170 registers the number of extensions in the number of extensions field.
[0050] (Step S24) Control unit 170 generates a packet. The IP address is registered as the destination IP address in the IP header of the packet. The MAC address is registered as the destination MAC address in the Ethernet header of the packet. (Step S25) The control unit 170 transmits the packet to the IoT device 200 with the IP address.
[0051] Next, the aging process will be explained. First, a brief explanation of the aging process will be given. In the aging process, it is determined whether or not to delete data (i.e., an entry) including an IP address and a MAC address. If it is determined that the data should be deleted, the data is deleted. Note that in the following explanation, if it is determined that the data should be deleted, the data is not deleted immediately. The data is deleted after a predetermined period of time has elapsed.
[0052] 9 is a flowchart showing an example of the aging process according to the first embodiment. The control unit 170 executes the process of FIG. 9 based on the aging cycle received from the setting unit 130. The aging cycle is the aging cycle in the setting table 111. 9 is executed in order from the first record in the management table 121.
[0053] (Step S31) The control unit 170 selects one record. (Step S32) The control unit 170 determines whether the entry type of the selected record is "dynamic." If it is "dynamic," the process proceeds to step S33. If it is "static" or "invalid," the process proceeds to step S38.
[0054] (Step S33) The control unit 170 determines whether the entry update time of the selected record is Based on this, it is determined whether the aging time has been exceeded. The aging time is the aging time sent by the setting unit 130. In other words, the aging time is the aging time in the setting table 111.
[0055] Step S33 will be described in detail. The control unit 170 calculates the difference based on the current time and the entry update time. If the difference is greater than the aging time, the control unit 170 determines that the aging time has been exceeded. If the aging time has been exceeded, the process proceeds to step S34. If the aging time has not been exceeded, the process proceeds to step S38.
[0056] (Step S34) The control unit 170 determines whether the aging type of the selected record is "extended." If it is "extended," the process proceeds to step S35. If it is "normal," the process proceeds to step S37. (Step S35) The control unit 170 determines whether the extension count of the selected record is equal to or greater than 1. If the extension count is equal to or greater than 1, the process proceeds to step S36. If the extension count is 0, the process proceeds to step S37.
[0057] (Step S36) The control unit 170 subtracts 1 from the extension count. Then, the process proceeds to step S38.
[0058] (Step S37) The control unit 170 registers "Invalid" as the entry type of the selected record. In other words, the control unit 170 changes "Dynamic" to "Invalid." The control unit 170 also registers "00:00:00:00:00:00" as the MAC address of the selected record. Note that the control unit 170 deletes the record in which "invalid" is registered when a predetermined period of time has elapsed since "invalid" was registered as the entry type.
[0059] (Step S38) The control unit 170 determines whether or not all records have been selected. If all records have been selected, the process ends. If there are any unselected records, the process proceeds to step S31.
[0060] In this way, the control unit 170 controls the aging process so as not to delete data including an IP address and a MAC address corresponding to "extension" when "extension" is registered in the management table 121. Furthermore, when the number of extensions is 1 or more, the control unit 170 controls the aging process so as not to delete data including an IP address and a MAC address corresponding to "extension".
[0061] Furthermore, if the extension count is 0, the control unit 170 sets data including an IP address and a MAC address corresponding to "extension" as a deletion target in the aging process. That is, the control unit 170 sets the entry type of the record of the IP address corresponding to "extension" to "invalid" (step S37). If the IP address is used within the predetermined period (step S11), the control unit 170 excludes the data from the deletion targets (step S14). That is, the control unit 170 changes the entry type to "dynamic."
[0062] "Extend" is registered as the aging type in the management table 121. When "Extend" is registered, the time until a record containing "Extend" is deleted becomes longer. Therefore, the relay device 100 does not transmit ARP request packets frequently. Therefore, the IoT device does not receive ARP request packets frequently. Because the IoT device does not receive ARP request packets frequently, the number of times processing is performed in response to received ARP request packets decreases. In other words, the load on the IoT device is reduced. According to the first embodiment, the relay device 100 can reduce the load on the IoT device.
[0063] Embodiment 2 Next, a description will be given of embodiment 2. In embodiment 2, differences from embodiment 1 will be mainly described. Furthermore, in embodiment 2, description of matters common to embodiment 1 will be omitted. In the first embodiment, a case has been described in which the aging type and the number of extensions are set based on the setting table 111. In the second embodiment, a case will be described in which a predetermined aging type and number of extensions are set for each IP address.
[0064] First, the individual setting table will be described. 10 is a diagram showing an example of an individual setting table according to the second embodiment. The individual setting table 112 is stored in the parameter storage unit 110. The individual setting table 112 is also referred to as individual setting information. The individual setting table 112 indicates information for setting the aging type and the number of extensions for each IP address.
[0065] The setting unit 130 transmits the information registered in the individual setting table 112 to the control unit 170. The control unit 170 registers the information in the management table 121 based on the received information. For example, the control unit 170 registers "aging type #1" as the aging type in the record for IP address #1. The control unit 170 also registers "extension count #1" as the extension count in the record for IP address #1. The aging type and extension count for IP addresses not registered in the individual setting table 112 are set based on the setting table 111.
[0066] Next, the data transmission process will be described with reference to a flowchart. Fig. 11 is a flowchart showing an example (part 1) of the data transmission process according to the second embodiment. The process in Fig. 11 differs from the process in Fig. 7 in that step S16a is executed. Therefore, step S16a will be described in Fig. 11. Description of the processes other than step S16a will be omitted.
[0067] (Step S16a) The control unit 170 executes a registration process for the record of the IP address. Specifically, the control unit 170 registers the current time in the entry update time field. If the IP address is registered in the individual setting table 112, the control unit 170 registers the aging type corresponding to the IP address in the aging type field based on the individual setting table 112. If the IP address is registered in the individual setting table 112 and the aging type of the record for the IP address is "extension," the control unit 170 registers the extension count corresponding to the IP address in the extension count field of the record based on the individual setting table 112. Then, the process proceeds to step S18.
[0068] Fig. 12 is a flowchart showing an example (part 2) of the data transmission process according to the second embodiment. The process in Fig. 12 differs from the process in Fig. 8 in that steps S22a and S23a are executed. Therefore, steps S22a and S23a will be described in Fig. 12. Description of the process other than steps S22a and S23a will be omitted.
[0069] (Step S22a) Control unit 170 determines whether or not the IP address is registered in individual setting table 112. If the IP address is registered, the process proceeds to step S23a. If the IP address is not registered, the process proceeds to step S23.
[0070] (Step S23a) The control unit 170 registers the record of the IP address in the management table 121. Specifically, the control unit 170 registers a new identifier in the entry ID field. The control unit 170 registers the IP address in the IP address field. The control unit 170 registers the MAC address in the MAC address field. The control unit 170 registers "dynamic" in the entry type field. The control unit 170 registers the current time in the entry update time field. The control unit 170 registers the aging type in the aging type field based on the individual setting table 112. The control unit 170 registers the extension count in the extension count field based on the individual setting table 112.
[0071] According to the second embodiment, the relay device 100 can set the aging type and the number of extension times for each IP address.
[0072] The features of the above-described embodiments can be combined with each other as appropriate. [Explanation of symbols]
[0073] 10 WAN, 20 LAN, 30 application, 100 relay device, 101 processor, 102 volatile storage device, 103 non-volatile storage device, 110 parameter storage unit, 111 setting table, 112 individual setting table, 120 information storage unit, 121 management table, 130 setting unit, 140 processing unit, 150 LAN interface, 160 WAN interface, 170 control unit, 200, 200_1 to 200_n IoT devices, 300 terminal.
Claims
1. A relay device that communicates with an IoT device, a control unit that performs an aging process for deleting data including an IP address corresponding to the IoT device and a MAC address corresponding to the IoT device at each aging period; and an information storage unit that stores management information indicating a correspondence between information indicating whether or not to extend the deletion of the data and the data; the control unit extends the timing of performing the aging process on the data when the management information has registered that the execution of deletion of the data is to be extended. Relay device.
2. the management information includes an integer number of extensions, When the management information is registered with the extension of the execution of the data deletion, the control unit extends the timing by performing the aging process after the aging cycle has elapsed the number of extensions. The relay device according to claim 1 .
3. When performing the aging process, the control unit sets the data as a deletion target, and if the IP address is used within a predetermined period, removes the data from the deletion target. The relay device according to claim 2 .
4. a parameter storage unit that stores individual setting information including the number of extensions corresponding to the IP address; The number of extensions included in the management information is set based on the individual setting information. The relay device according to claim 2 or 3.
5. A program that causes a processor to function as the control unit of the relay device according to claim 1 .
Citation Information
Patent Citations
Manufacture for directional coupling unit
JP1977058442A
Call control terminating device
JP2006211545A
Communication device, address learning method, and address learning program
JP2014216793A
Neighbor discovery to support sleepy nodes
JP2016530768A