Communication apparatus, communication system, communication control method, and program
Patent Information
- Application Number
- JP2023103363
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-23
- Publication Date
- 2025-01-09
AI Technical Summary
【0012】 本開示によれば、メッシュネットワークにおいてパケットのループが発生することを回避することができる。
Smart Images

Figure 2025002952000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a communication device, a communication system, a communication method, and a program. [Background technology]
[0002] Wireless networks configured in a mesh type by multiple wireless communication devices are widely used. In such wireless networks, depending on the configuration or operating conditions of the network, a state may occur in which a packet transmitted from a certain node returns to the node via one or multiple nodes (hereinafter, such a state is referred to as a "loop"). For this reason, techniques for detecting loops have been proposed. For example, Japanese Patent Application Laid-Open No. 2016-139919 (Patent Document 1) discloses a loop detection method that utilizes a specific bit included in a received frame. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2016-139919 A Summary of the Invention [Problem to be solved by the invention]
[0004] In recent years, mesh networks are increasingly being constructed using communication devices such as wireless LAN (Local Area Network) access points or repeaters. For example, by introducing a mesh network into a home, the communication area within the home can be expanded. This type of network is sometimes called "mesh Wi-Fi," but in this specification, we will use the name "mesh network."
[0005] When constructing a mesh network, it is common to connect communication devices wirelessly in order to allow for greater freedom in the placement of the communication devices. However, communication devices capable of constructing mesh networks not only by wireless connection but also by wired connection have also been proposed. Therefore, when constructing a mesh network, both wireless and wired connections may be used.
[0006] Normally, mesh networks are constructed so that communication devices form a tree structure, which makes it possible to avoid loops. However, for example, if a user connects two nodes on a mesh network with a wire, packet loops may occur. As such, packet loops may occur in mesh networks, and technology is needed to avoid loops.
[0007] An object of the present disclosure is to provide a technique for preventing packet loops from occurring in a mesh network. [Means for solving the problem]
[0008] The communication device disclosed herein is a communication device capable of forming a mesh network by wireless or wired connection, and is equipped with a plurality of interfaces, each corresponding to a wireless or wired connection, and a route control unit that, when a mesh network is formed, receives a route management packet including sender identification information for identifying a sender and controls the transmission route of the packet in the mesh network, and when a communication interface for communication with the sender has not been learned, learns the interface among the plurality of interfaces that first receives the route management packet as the above-mentioned communication interface.
[0009] The communication system disclosed herein includes a plurality of communication devices each having an interface for wireless or wired connection and capable of forming a mesh network via wireless or wired connection, and each of the communication devices transmits a route management packet including sender identification information for identifying the sender to the mesh network, and learns the interface that first receives the route management packet when the communication interface for communication with the sender has not yet been learned as the above-mentioned communication interface.
[0010] The communication control method disclosed herein is a communication control method by a communication device having an interface for wireless or wired connection and capable of forming a mesh network by wireless or wired connection, and includes the steps of receiving a route management packet including sender identification information for identifying a sender when a mesh network is formed, and managing a transmission route of a packet in the mesh network based on the received route management packet, wherein the managing step includes a step of learning, as the above-mentioned communication interface, the interface that first received the route management packet when the communication interface for communication with the sender has not been learned.
[0011] The program disclosed herein is a program that causes a computer of a communication device having an interface for wireless or wired connection and capable of forming a mesh network through wireless or wired connection to execute a communication control method, the communication control method including the steps of receiving a route management packet including sender identification information for identifying a sender when a mesh network is formed, and managing a transmission route of a packet in the mesh network based on the received route management packet, the managing step including a step of learning, as a communication interface, the interface that first received the route management packet when the communication interface for communication with the sender has not been learned. Effect of the Invention
[0012] According to the present disclosure, it is possible to prevent packet loops from occurring in a mesh network. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is a schematic diagram illustrating an example of the configuration of a mesh network. [Diagram 2] FIG. 2 is a schematic diagram showing a state in which two communication devices in the network shown in FIG. 1 are connected by wire. [Diagram 3] FIG. 3 is a schematic diagram for explaining the spanning tree method. [Figure 4] FIG. 4 is a schematic diagram for explaining loop avoidance by the spanning tree method in the network shown in FIG. [Diagram 5] FIG. 5 is a schematic diagram illustrating the transfer of data packets using the learning bridge method. [Figure 6] FIG. 6 is a flowchart illustrating a data relay process that combines the learning bridge method and the spanning tree method. [Figure 7] FIG. 7 is a block diagram illustrating a schematic configuration of a communication device according to an embodiment of the present disclosure. [Figure 8] FIG. 8 is a block diagram showing an example of the configuration of the management control unit. [Figure 9] FIG. 9 is a diagram for explaining route management by Client Notification when a link-up is performed by a communication device according to the present embodiment. [Figure 10] FIG. 10 is a flowchart illustrating the flow of a route control process when a new communication device is added to the mesh network. [Figure 11] FIG. 11 is a diagram for explaining route management when a terminal device is connected to the communication device according to the present embodiment. [Figure 12] FIG. 12 is a flowchart illustrating a process for transmitting a Client Notification when a new terminal device is connected to the network. [Figure 13]FIG. 13 is a flowchart illustrating a process for receiving a Client Notification when a communication device or a terminal device is connected to a mesh network. [Figure 14] FIG. 14 is a flowchart showing the details of the Client Notification receiving process. [Figure 15] FIG. 15 is a table showing parameter values of RSTP (Rapid Spanning Tree Protocol) Timer and Transmit Hold Count defined in IEEE802.1d 2004. [Figure 16] FIG. 16 is a diagram for explaining route management by Client Notification in a state in which a terminal device is connected to a mesh network. [Figure 17] FIG. 17 is a flowchart illustrating the flow of a packet transmission process that follows a learned route. [Figure 18] FIG. 18 is a schematic diagram illustrating the control of the destination of packets according to the second embodiment. [Figure 19] FIG. 19 is a flowchart illustrating the flow of a packet relay process according to the second embodiment. [Figure 20] FIG. 20 is a schematic diagram illustrating loop avoidance control according to the third embodiment. [Figure 21] FIG. 21 is a flowchart illustrating packet loop avoidance according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] [Description of the embodiments of the present disclosure] First, the embodiments of the present disclosure will be listed and described.
[0015] (1) A communication device according to one embodiment of the present disclosure is a communication device capable of forming a mesh network by wireless or wired connection, and includes a plurality of interfaces, each corresponding to a wireless or wired connection, and a route control unit that, when the mesh network is formed, receives a route management packet including sender identification information for identifying a sender and controls the transmission route of the packet in the mesh network, and when a communication interface for communication with the sender has not been learned, learns the interface among the plurality of interfaces that first receives the route management packet as the above-mentioned communication interface.
[0016] According to the above configuration, the communication device can configure a mesh network by wired or wireless connection with other communication devices. When the communication device is connected to another communication device by wire despite being wirelessly connected to the other communication device (for example, a case of erroneous connection is assumed), packet looping may occur on the mesh network. When packet looping occurs on the mesh network, the route management packet may arrive at the communication device via a different route. The communication device may receive the route management packet via an interface other than the interface that first received the route management packet. Therefore, the route control unit learns the interface that first received the route management packet among multiple interfaces as the communication interface for communication with the sender in a state where the communication interface for communication with the sender has not been learned. Since the management control unit does not adopt the route management packet received later via a different interface, it can uniquely determine the route of packets transmitted from the same sender. Therefore, according to the above configuration, packet looping can be avoided in the mesh network.
[0017] (2) In the communication device described in (1), the route control unit registers the learned communication interface in a table in correspondence with sender identification information, and allows the data packet to be relayed when the combination of the sender identification information contained in the received data packet and the interface through which the data packet was received matches the contents registered in the table.
[0018] According to the above configuration, when the combination of the sender identification information and the receiving interface of the data packet matches the contents registered in the table, the route control unit allows the data packet to be relayed. Since the route of packets sent from the same sender is uniquely determined by the table, it is possible to prevent packet loops from occurring in the mesh network.
[0019] (3) In the communication device described in (1) or (2), if the sender identification information contained in the received data packet can be determined to have been sent by the communication device itself, the route control unit discards the received data packet.
[0020] When a communication device receives a packet whose sender is itself, this means that the packet has been looped. By discarding this packet, the communication device can prevent the packet from repeatedly looping.
[0021] (4) In a communication device according to any one of (1) to (3) above, the route control unit is configured to avoid packet loops in the mesh network in accordance with a spanning tree protocol, and is configured to retain the learning result of the communication interface for a predetermined retention time after learning the communication interface, the predetermined retention time being shorter than the time for enabling a new communication interface determined in accordance with the spanning tree protocol.
[0022] According to the above configuration, packet loops can be avoided even by the spanning tree protocol. However, a certain amount of waiting time is required to enable a new interface by the spanning tree protocol, and relaying cannot be performed during that waiting time. Since the retention period is shorter than this waiting time, the period for updating the route can be shortened. As a result, even if a loop occurs in the packet transmission route on the mesh network, the loop can be eliminated in a short time, and the waiting time until packets can be relayed can be shortened.
[0023] (5) A communication system disclosed herein includes a plurality of communication devices each having an interface for wireless or wired connection and capable of forming a mesh network through wireless or wired connection, and each of the communication devices transmits a route management packet including sender identification information for identifying a sender to the mesh network, and learns the interface through which the communication interface for communication with the sender is first received as the above-mentioned communication interface.
[0024] According to the above configuration, it is possible to prevent packet loops from occurring in a mesh network made up of a plurality of communication devices.
[0025] (6) The communication control method disclosed herein is a communication control method by a communication device having an interface for wireless or wired connection and capable of forming a mesh network through wireless or wired connection, and includes the steps of: when a mesh network is formed, receiving a route management packet including sender identification information for identifying a sender; and managing a transmission route of a packet in the mesh network based on the received route management packet, wherein the managing step includes a step of learning, as the above-mentioned communication interface, an interface that first receives a route management packet when a communication interface for communication with the sender has not yet been learned.
[0026] According to the above configuration, it is possible to prevent packet loops from occurring in a mesh network made up of a plurality of communication devices.
[0027] (7) A program disclosed herein is a program for causing a computer of a communication device having an interface for wireless or wired connection and capable of forming a mesh network through wireless or wired connection to execute a communication control method, the communication control method including the steps of: receiving a route management packet including sender identification information for identifying a sender when a mesh network is formed; and managing a transmission route of a packet in the mesh network based on the received route management packet, the managing step including a step of learning, as the above-mentioned communication interface, an interface that first receives a route management packet when a communication interface for communication with the sender has not yet been learned.
[0028] According to the above configuration, it is possible to prevent packet loops from occurring in a mesh network made up of a plurality of communication devices.
[0029] [Details of the embodiment of the present disclosure] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference characters and their description will not be repeated.
[0030] FIG. 1 is a schematic diagram illustrating an example of the configuration of a mesh network. As shown in FIG. 1, communication devices 10A to 10D are arranged in a house 1. The communication devices 10A to 10D are communication devices according to an embodiment of the present disclosure. Although not particularly limited, the communication devices 10A to 10D have a switching function for distributing data packets based on a Media Access Control (MAC) address included in the data packets. For example, the communication devices 10A to 10D may be communication devices called "wireless LAN routers" or the like that function as access points or repeaters of a wireless LAN.
[0031] In Fig. 1, the dashed lines connecting the communication devices represent wireless connections between the communication devices. As shown in Fig. 1, communication devices 10A, 10B, 10C, and 10D form a mesh network by wireless connections. Terminal devices 11 to 14 are connected to this mesh network. The mesh network shown in Fig. 1 corresponds to the communication system of the present disclosure.
[0032] The communication device 10A is communicatively connected to the Internet 500 and functions as a mesh master. Each of the communication devices 10B to 10D functions as a mesh slave. By using the mesh slave for communication, the area in the home where the wireless LAN can be used at a high link speed (communication speed between the communication device and the terminal device) can be expanded. Furthermore, when a terminal device (for example, the terminal device 14) moves within the home, the terminal device can switch the destination of the wireless connection from the original mesh slave (for example, the communication device 10D) to a mesh slave (for example, the communication device 10C) located near the destination. This allows the link speed to be maintained high even when the terminal device moves.
[0033] Each of the communication devices 10A to 10D can configure a mesh network not only by wireless connection but also by wired connection. Therefore, for example, when constructing a mesh network, a user may connect one communication device to another communication device by a communication cable.
[0034] Fig. 2 is a schematic diagram showing a state in which two communication devices in the network shown in Fig. 1 are connected by a wire. As shown in Fig. 2, communication device 10C and communication device 10D are connected by a communication cable 5 (typically a LAN cable). However, communication device 10C is already wirelessly connected to communication device 10B. Therefore, the wired connection by communication cable 5 is an incorrect connection.
[0035] As shown in FIG. 1, the topology of the mesh network is a tree type. That is, the parent communication device 10A corresponds to the root node, and each of the child communication devices 10B to 10D corresponds to a lower level node branching off from the root node. The tree type topology prevents packet loops. However, as shown in FIG. 2, a packet loop (indicated by solid and dashed arrows) may occur when the communication device 10C and the communication device 10D are connected by wire. If a packet loop occurs, for example, the communication of the terminal device may be hindered due to phenomena such as consumption of bandwidth or an increase in the load of the communication device.
[0036] In order to prevent packet loops in the L2 network, each of the communication devices 10A to 10D can execute the Spanning Tree Protocol (STP) defined by IEEE802.1D.
[0037] Fig. 3 is a schematic diagram for explaining the spanning tree method. As shown in Fig. 3, a network is constructed by links between relay devices 21, 22, 23, 24, and 25. It is assumed that the connection between relay device 22 and relay device 23 is a misconnection.
[0038] In the spanning tree method, each of the relay devices 21 to 25 periodically transmits packets called Bridge Protocol Data Units (BPDUs) by multicast to the links connecting itself to other communication devices. When multiple BPDUs exist on the same link, each of the relay devices 21 to 25 keeps the higher-level BPDU according to criteria determined from the path cost, source bridge ID, source port ID, etc. In Fig. 3, the higher-level BPDU is indicated by an arrow with a circle overlaid on it.
[0039] Fig. 4 is a schematic diagram for explaining loop avoidance by the spanning tree method in the network shown in Fig. 3. When each of the relay devices 21 to 25 detects a loop in the exchange of BPDUs, it judges the port that gives the smallest path cost to the root bridge, and determines the port that forwards the packet (forwarding port) and the port that does not forward the packet (blocking port).
[0040] For example, relay device 24 receives BPDUs from both relay device 22 and relay device 23. Relay device 24 selects the port corresponding to relay device 22 as the designated port of STP, and selects the port corresponding to the interface with relay device 23 as the non-designated port of STP. The non-designated port becomes a blocking port that receives BPDUs from relay device 23 but does not send or receive data. By determining the forwarding port and blocking port in this way, data packet loops are avoided.
[0041] As described above, data packets are relayed in an L2 network according to a method (hereinafter referred to as a "learning bridge method") in which the destination of the data is determined based on the MAC address contained in the packet and the learning table held by the switch. The learning bridge method will be described with reference to FIG. 5.
[0042] Fig. 5 is a schematic diagram for explaining the transfer of data packets by the learning bridge method. In Fig. 5, "AAAA" to "EEEE", "xxxx", and "yyyy" shown in relay devices 21 to 25 and terminal devices 2A and 2B represent the MAC addresses of each device. The MAC address corresponds to identification information for identifying each device. Therefore, in the embodiment of the present disclosure, the MAC address is also called an "ID".
[0043] Assume that packets 21A and 21B are sent from relay device 21 (for example, in the case of multicast). Packets 21A and 21B are packets containing the same content, and contain "AAAA", which is the MAC address of relay device 21, as the source address. Note that, to distinguish between packets 21A and 21B, in FIG. 5, the arrows indicating packets 21A and 21B are marked with numbers in parentheses, "(1)" and "(2)", respectively.
[0044] When the relay device 22 receives the packet 21A at the port P1, the relay device 22 registers the correspondence between the source address and the receiving port included in the packet 21A in the learning table 151. Therefore, in the learning table 151 of the relay device 22 shown in FIG. 5, "AAAA" which is the MAC address (i.e., ID) of the relay device 21 and P1 which is the receiving port of the packet 21A are registered in correspondence with each other. Note that "I / F", which is an item in the learning table 151 shown in FIG. 5, means an interface, and specifically refers to a port. In the learning table 151, the name of an interface named "Port1" is registered, but "Port1" is a name that refers to the port P1 of the relay device 22.
[0045] Next, relay device 22 receives packet 21B at port P2. Relay device 22 learns the association between the source MAC address of this packet and the receiving port, and updates learning table 151. The source address included in packet 21B is the MAC address "AAAA" of relay device 21, and the receiving port is port P2. Therefore, in learning table 151, the interface corresponding to MAC address (ID) "AAAA" is updated.
[0046] After that, every time a packet having the source MAC address "AAAA" arrives at port P1 or port P2, relay device 22 updates its own learning table 151. On the other hand, when relay device 22 relays a packet, it determines the port corresponding to the destination MAC address included in the packet based on learning table 151, and transfers the packet to that port.
[0047] Therefore, every time a packet with source MAC address "AAAA" arrives at port P1 or port P2, relay device 22 updates its own learning table 151, so the packet forwarding path is frequently switched. Furthermore, each relay device can relay packets to all interfaces. Therefore, in order to prevent packet loops, the learning table method and spanning tree are combined.
[0048] Fig. 6 is a flowchart for explaining data relay processing that combines the learning bridge method and the spanning tree. The processing shown in Fig. 6 can be executed in each of relay devices 21 to 25. Therefore, the flowchart in Fig. 6 will be explained as processing of relay device 21, which represents relay devices 21 to 25.
[0049] First, relay device 21 receives a packet (step S1). Relay device 21 determines the type of the packet based on information included in the packet (step S2). If the type of the received packet is a data packet to be relayed, the processes of steps S3 to S5 are executed.
[0050] In step S3, the relay device 21 checks the source MAC address (SA) of the received packet. Furthermore, the relay device 21 learns the source and registers the source MAC address in the learning table 151 together with the port through which the packet was received.
[0051] In step S4, the relay device 21 checks the destination of the packet. Specifically, the relay device 21 refers to the learning table 151 to inquire about the destination. Based on the combination of the MAC address and the port registered in the learning table 151, the relay device 21 checks the port associated with the destination MAC address (DA) included in the received packet.
[0052] In step S5, the relay device 21 refers to the interface (I / F) management table 152. In the interface management table 152, a status regarding data transmission and reception (whether transmission and reception is possible or impossible) is registered for each port. The relay device 21 confirms that the port determined in step S4 is a port capable of transmission and reception, and transmits the packet from that port.
[0053] If the port registered in the learning table 151 is the same as the receiving port of the received packet, the relay device 21 does not transmit the received packet from that port. Also, if the received packet is a multicast packet or an unlearned packet, the relay device 21 transmits the packet from all ports other than the port that received the packet.
[0054] On the other hand, if the type of the received packet is BPDU in step S2, the processes of steps S6 to S8 are executed If the relay device 21 does not use the spanning tree protocol, the BPDU is relayed in step S2.
[0055] In step S6, the relay device 21 executes a series of processes related to the spanning tree protocol. For example, the relay device 21 selects a root bridge and determines an interface (designated port (DP)) for data transmission and reception.
[0056] In step S7, the relay device 21 determines whether a change in the spanning tree is detected. If no change in the spanning tree is detected, the process ends. That is, there is no change in the transmission path of the data packet. On the other hand, if a change in the spanning tree is detected, in step S8, the relay device 21 changes the state of the interface (port) to forward or block in response to the change.
[0057] As explained above, with the learning bridge method, the learning state changes each time a packet is received, depending on the SA and receiving port contained in the packet. For this reason, if not combined with spanning tree, packet loops can occur. On the other hand, with the spanning tree method, the forwarding and blocking interfaces are determined during the exchange of BPDUs. However, a certain amount of time (the default value is 30 seconds) is required from link-up until packet forwarding begins. For this reason, if the packet route changes frequently, there is a possibility that packets cannot be relayed for a certain period of time each time.
[0058] According to the embodiment of the present disclosure, even if the connection between the devices constituting the mesh network is incorrect, it is possible to avoid packet loops. In addition, according to the embodiment of the present disclosure, it is possible to reduce the waiting time until the packet can be relayed. The embodiment of the present disclosure will be described in detail below.
[0059] <Embodiment 1> According to the first embodiment, when a communication device that relays data packets, such as a wireless LAN access point or relay device, is added to the mesh network, or when a new terminal device is connected to the mesh network, a packet including the MAC address of the communication device or terminal device is sent. In the embodiment of the present disclosure, this packet is called "Client Notification." In the embodiment of the present disclosure, "Client Notification" corresponds to a route management packet that includes sender identification information for identifying the sender. The above "sender identification information" is specifically the source MAC address.
[0060] Fig. 7 is a block diagram showing a schematic configuration of a communication device according to an embodiment of the present disclosure. The configuration shown in Fig. 7 is applicable to each of the communication devices 10A to 10E (see Fig. 1) that configure the mesh network. In the description applicable to any of the communication devices 10A to 10E, the communication devices 10A to 10E are collectively referred to as "communication device 10" (the same applies in the following description).
[0061] 7, the communication device 10 includes a LAN interface unit 100, a route control unit 110, a WAN interface (WAN I / F) unit 140, and a memory 150. The memory 150 stores a learning table 151, an interface (I / F) management table 152, a route management table 153, and a program 154.
[0062] The LAN interface unit 100 has a plurality of interfaces, each of which supports wireless or wired connections. That is, the LAN interface unit 100 includes n wired LAN interfaces 101-10n and m wireless LAN interfaces 111-11m. n and m are integers equal to or greater than 1. Note that n and m may be the same number or different numbers.
[0063] The route control unit 110 includes a relay processing unit 120 and a management control unit 130. The relay processing unit 120 is responsible for relaying packets between the LAN interface unit 100 and the WAN interface unit 140, and relaying data packets between wired LAN interfaces, between wireless LAN interfaces, and between wired LAN interfaces and wireless LAN interfaces. The relay processing unit 120 can be realized by an L2 switch.
[0064] Relay processing unit 120 receives a packet from LAN interface unit 100, learns the correspondence between the source MAC address contained in the packet and the interface through which the packet was received, and registers the learning result in learning table 151. When there is a packet to be transmitted, relay processing unit 120 refers to the destination MAC address contained in the packet and learning table 151 to determine the destination of the packet.
[0065] The relay processing unit 120 further learns a packet forwarding path determined by the spanning tree, and registers the learning result in the interface management table 152. Meanwhile, the relay processing unit 120 refers to the interface management table 152 to check whether the interface through which the packet should be transmitted is an interface for transmitting and receiving data (designated port (DP)).
[0066] When the communication device 10 is connected to the mesh network, or when a new terminal device is connected to the communication device 10, the management control unit 130 issues a Client Notification, which is a path management packet. On the other hand, when the management control unit 130 receives a Client Notification, the management control unit 130 processes the Client Notification. In addition, the management control unit 130 exchanges BPDUs for processing the spanning tree protocol.
[0067] In the first embodiment, the route control unit 110 (relay processing unit 120) learns the interface that first receives a Client Notification, which is a route management packet, from among a plurality of interfaces (101 to 10n, 111 to 11m), as the communication interface for communication with the sender. The route control unit 110 (relay processing unit 120) registers the learned content in the route management table 153. Furthermore, the route control unit 110 (relay processing unit 120) refers to the route management table 153 to determine whether the received packet should be transmitted.
[0068] Fig. 8 is a block diagram showing an example of the configuration of the management control unit 130. As shown in Fig. 8, the management control unit 130 includes a CPU 131, a spanning tree protocol unit 132, a Client Notification processing unit 133, and an interface (I / F) management unit 134.
[0069] The CPU 131 relays data between the relay processing unit 120 and the WAN interface unit 140. Furthermore, the CPU 131 exchanges BPDUs and Client Notifications with the relay processing unit 120.
[0070] Furthermore, when the CPU 131 receives a BPDU from the relay processing unit 120, it transfers the BPDU to the spanning tree protocol unit 132. The spanning tree protocol unit 132 executes a process for determining a spanning tree according to the received BPDU. Based on the result of this process, the spanning tree protocol unit 132 instructs the interface management unit 134 to perform network status management. Meanwhile, the spanning tree protocol unit 132 periodically creates a BPDU and transmits the BPDU to the CPU 131. The CPU 131 transfers the BPDU from the spanning tree protocol unit 132 to the relay processing unit 120.
[0071] When the CPU 131 receives a Client Notification from the relay processing unit 120, the CPU 131 transfers the Client Notification to the Client Notification processing unit 133. The Client Notification processing unit 133 periodically issues a Client Notification and transmits the Client Notification to the CPU 131. The CPU 131 transfers the received Client Notification to the relay processing unit 120. The processing of the Client Notification processing unit 133 will be described later.
[0072] Furthermore, the CPU 131 checks the state of the LAN interface unit 100 via the interface management unit 134. Alternatively, the CPU 131 instructs the interface management unit 134 to change the state of the LAN interface unit 100.
[0073] The interface management unit 134 determines the destination of the packet by referring to the interface management table 152. Furthermore, the interface management unit 134 updates the contents of the interface management table 152 in response to an instruction from the CPU 131.
[0074] The configuration shown in FIG. 8 may be realized by hardware alone, or may be realized by a combination of a program and hardware (a computer (e.g., a processor, FPGA, etc.)) that executes the program. When the configuration shown in FIG. 8 is realized by a combination of hardware and software, the configuration of the management control unit 130 shown in FIG. 8 is realized by the hardware executing the program 154 shown in FIG. 7. Therefore, the program 154 shown in FIG. 7 corresponds to a program for causing a computer to execute the communication control method according to the embodiment of the present disclosure. Furthermore, the memory 150 corresponds to a computer-readable recording medium having the program 154 recorded therein.
[0075] The program 154 may be stored in the memory 150, for example, when the communication device 10 is shipped from a factory. Alternatively, the program 154 may be provided to the communication device 10 through an electric communication line (not shown). The communication device 10 may update the program 154 by receiving differences in the program 154, etc., through the electric communication line.
[0076] In the following, the process when a communication device that relays data packets is added to the mesh network will be described, followed by the process when a new terminal device is connected to the mesh network. These processes are mainly executed by the route control unit 110 shown in FIG.
[0077] (a) When a communication device is added to a mesh network Fig. 9 is a diagram for explaining route management by Client Notification when a communication device according to this embodiment links up. Referring to Fig. 9, when a communication device links up, the communication device sends out a Client Notification including its own ID to each port. In one embodiment, the ID is its own MAC address (i.e., the source MAC address). As shown in Fig. 9, the IDs of communication devices 10A and 10C are represented as "AAAA" and "CCCC", respectively.
[0078] When the communication device 10A links up, the communication device 10A transmits a Client Notification including the ID "AAAA" by multicast. Therefore, the communication device 10A transmits a Client Notification to each of the interfaces with the communication device 10B and the communication device 10D. Similarly, when the communication device 10C links up, the communication device 10C transmits a Client Notification including the ID "CCCC" by multicast. Therefore, the communication device 10C transmits a Client Notification to each of the interfaces with the communication device 10B, the communication device 10D, and the communication device 10E.
[0079] In order to distinguish between multiple Client Notifications with the same ID, a number in parentheses is added after the ID in Fig. 9 and the figures described below. For example, multiple Client Notifications with the ID "CCCC" are written as "CCCC(1)", "CCCC(2)", and "CCCC(3)".
[0080] When each communication device receives a Client Notification, it learns the association between the interface that received the Client Notification and the ID included in the Client Notification, and registers the learning result in the path management table. For example, the communication device 10B receives a Client Notification having an ID "AAAA" at port P1B. Therefore, the communication device 10B registers the ID "AAAA" in association with the interface "Port1" (port P1B) in its own path management table 153B. Similarly, when the communication device 10B receives a Client Notification having an ID "CCCC" at port P2B, it registers the ID "CCCC" in association with the interface "Port2" (port P2B) in its own path management table 153B.
[0081] Furthermore, in the embodiment of the present disclosure, each communication device learns the interface through which the first Client Notification is received as the communication interface for communication with the sender having that ID. Therefore, when the communication device receives a Client Notification with the same ID multiple times, the communication device discards packets with the same ID that arrive after the second time (i.e., arrives later).
[0082] For example, communication device 10C receives Client Notifications with ID "AAAA" from both communication device 10B and communication device 10D. Here, it is assumed that the Client Notification from communication device 10B arrives at communication device 10C first. Communication device 10C learns the interface through which the Client Notification was received as the communication interface for communication with the sender (communication device 10A). The Client Notification (with ID "AAAA") sent from communication device 10D arrives at communication device 10C later, and is therefore discarded by communication device 10C.
[0083] Even after starting up, each communication device periodically issues and transmits a Client Notification packet. This period is set shorter than the time (aging time) that each communication device holds the learned MAC address. Since the default aging time for MAC addresses is 300 seconds (5 minutes), the period for issuing a Client Notification packet can be set to, for example, 1 minute or 2 minutes.
[0084] 10 is a flowchart explaining the flow of the process of route control when a new communication device is added to the mesh network. First, the management control unit 130 of the communication device 10 checks the state of the LAN interface unit 100 (step S11). Specifically, the interface management unit 134 judges whether a change in the state of the LAN interface unit 100 is detected (step S12). If there is no wired or wireless connection of the new communication device, there is no change in the state of the LAN interface unit 100. Therefore, the entire process ends.
[0085] On the other hand, when a change in the state of the LAN interface unit 100 occurs due to a wired or wireless connection of a new communication device, the interface management unit 134 refers to the interface management table 152 to confirm the destination (step S13). The "destination" refers to all interfaces that are in a transmittable state. The Client Notification processing unit 133 generates a Client Notification and transmits the Client Notification to all interfaces that are in a transmittable state (step S14).
[0086] (b) When a new terminal device is connected to the mesh network Fig. 11 is a diagram for explaining route management when a terminal device is connected to a communication device according to the present embodiment. As shown in Fig. 11, a new terminal device, a terminal device 2A, is connected to a communication device 10D by wire or wirelessly. As a result, the terminal device 2A is connected to the mesh network.
[0087] The communication device 10D generates a Client Notification including the ID ("xxxx") of the terminal device 2A, and transmits the Client Notification by multicast. Therefore, a Client Notification including the ID "xxxx" is sent from each interface of the communication device 10D to the communication device 10A and the communication device 10C. In FIG. 11, these Client Notifications are represented as "xxxx(1)" and "xxxx(2)".
[0088] Because the communication device 10C and the communication device 10D are erroneously connected, the Client Notification "xxxx(1)" returns to the communication device 10D via the communication device 10A, the communication device 10B, and the communication device 10C. Since the Client Notification issued by the communication device 10D itself has returned, the communication device 10D discards this Client Notification.
[0089] Client Notification "xxxx(2)" travels from communication device 10D through communication device 10C to reach port P2B ("Port2") of communication device 10B. However, because Client Notification "xxxx(1)" arrived at communication device 10B first, port P1B ("Port1") is registered in path management table 153B of communication device 10B as the interface corresponding to packets with ID "xxxx." Therefore, communication device 10B does not adopt Client Notification "xxxx(2)." This packet is discarded.
[0090] Furthermore, the Client Notification "xxxx(2)" is transferred from the communication device 10C to the communication device 10E and received at the port P1E ("Port1") of the communication device 10E. The communication device 10E registers the ID "xxxx" and the receiving interface "Port1" (port P1E) of the packet in the path management table 153E. Therefore, only one path for relaying the packet from the communication device 10D to the communication device 10E is determined, and packet looping is prevented.
[0091] When the new terminal device is the terminal device 2B, the same process as above is executed. The terminal device 2B is connected to the port P2B by wire or wirelessly. The communication device 10E generates a Client Notification (indicated as "yyyy(1)" in FIG. 11) including the ID ("yyyy") of the terminal device 2B, and transmits the Client Notification.
[0092] When the communication device 10C receives a Client Notification from the communication device 10E at port P3C ("Port3"), it copies this Client Notification and sends it out to port P1C and port P2C, respectively. In Fig. 11, in order to distinguish the copied Client Notifications, they are written as "yyyy(2)" and "yyyy(3)". Furthermore, the communication device 10C registers the ID "yyyy" in association with the receiving interface "Port3" (port P3C) in its own route management table 153C.
[0093] Client Notification "yyyy(2)" arrives at port P2B ("Port2") of communication device 10B. Communication device 10B receives this packet and registers the ID "yyyy" and the receiving interface "Port2" (port P2B) in association with each other in its own path management table 153B. Client Notification "yyyy(2)" is sent from port P1B of communication device 10B to communication device 10A and arrives at port P2A ("Port2") of communication device 10A. Communication device 10A receives this packet and registers the ID "yyyy" and the receiving interface "Port2" in association with each other in its own path management table 153A.
[0094] The communications device 10D receives Client Notification "yyyy(3)" at port P1D. As a result, the communications device 10D receives this packet, and registers the ID "yyyy" in association with the receiving interface (port P3D) in its own route management table (not shown). Similarly, the communications device 10D receives Client Notification "yyyy(2)" at port P2D. However, this Client Notification is a packet that arrived at the communications device 10D after Client Notification "yyyy(3)". Therefore, the communications device 10D discards Client Notification "yyyy(2)".
[0095] On the other hand, the Client Notification with ID "yyyy(3)" arrives from the communication device 10C to the port P1D of the communication device 10D. Although not shown, the path management table of the communication device 10D has the port P1D registered as the interface corresponding to the packet with ID "yyyy", so the communication device 10A receives this packet and sends it out from its own port P2D. As a result, when the terminal device 2B transmits and receives a packet via the mesh network, one relay path for the packet on the mesh network is determined. Therefore, packet looping is prevented.
[0096] Fig. 12 is a flow chart for explaining the transmission process of Client Notification when a new terminal device is connected to the network. As shown in Fig. 12, the communication device 10 receives a packet (step S21). The route control unit 110 of the communication device 10 determines the type of the packet based on the information included in the packet (step S22).
[0097] If the type of the received packet is a data packet to be relayed, the processes of steps S23 to S27 are executed. In step S23, the communication device 10 checks the source of the received packet. Specifically, the relay processing unit 120 checks the source MAC address included in the received packet. Furthermore, the relay processing unit 120 learns the source. Specifically, the relay processing unit 120 registers the source MAC address in the learning table 151 together with the interface through which the packet was received.
[0098] Next, in step S24, relay processing unit 120 refers to learning table 151 to check the registration status of the destination MAC address contained in the packet in learning table 151 (whether the destination MAC address is registered in learning table 151).
[0099] If the terminal device is a new device, in step S25, the management control unit 130 (interface management unit 134) refers to the interface management table 152 to inquire about the destination, and determines all interfaces in a transmittable state as the destination. In step S26, the relay processing unit 120 transmits the Client Notification and the data packet to be relayed to the destination determined by the management control unit 130 (step S26).
[0100] On the other hand, if the MAC address of the terminal device is already registered in the learning table 151, the relay processing unit 120 uses the learning bridge function to identify the interface corresponding to the destination and transfers the data packet to be relayed to that interface, thereby transmitting the relay packet (step S27).
[0101] (c) Receiving a Client Notification when a communication device that relays data packets is added to the mesh network or when a new terminal device is connected to the mesh network. 13 is a flowchart for explaining a reception process of a Client Notification when a communication device or a terminal device is connected to a mesh network. As shown in FIG. 13, first, the communication device 10 receives a packet (step S31). The communication device 10 determines the type of the packet based on information included in the packet (step S32).
[0102] If the type of the received packet is a data packet to be relayed, the processes of steps S33 to S35 are executed. The processes of steps S33 to S35 are basically the same as the processes of steps S23, S25, and S26, and therefore detailed description will not be repeated. Note that, in step S35, if the interface corresponding to the destination of the packet is the same as the source interface registered in the route management table 153, the communication device 10 does not transmit the packet. Also, if the packet to be relayed is a multicast packet or an unlearned packet, the communication device 10 transmits the packet to all interfaces other than the receiving interface.
[0103] If the type of the packet determined in step S32 is a Client Notification, then in step S36, the route control unit 110 executes a Client Notification reception process. This process is mainly executed by the Client Notification processing unit 133 and the relay processing unit 120.
[0104] Fig. 14 is a flowchart showing details of the Client Notification reception process. The processes of steps S41 to S43 shown in Fig. 14 correspond to the process of managing the transmission route of the packet in the mesh network. First, when the route control unit 110 receives a Client Notification, it executes a process based on the Client Notification (step S41).
[0105] In step S42, the route control unit 110 judges whether the time elapsed since the interface corresponding to the ID was learned is longer than a preset holding time (h). If the learning time (t) is shorter than the holding time (h), the process ends. In this case, the currently received Client Notification is discarded. On the other hand, if the learning time (t) is longer than the holding time (h), in step S43, the route control unit 110 checks the destination registered in the route management table 153 and updates the contents of the route management table 153 based on the newly arrived Client Notification. That is, the process of step S42 is a process in which even if the route control unit 110 receives a Client Notification of the same ID multiple times during a preset period, the second or subsequent Client Notifications received are discarded. Also, when the holding time (h) has elapsed, the state of the communication device 10 returns to a state in which the communication interface for communication with the sender has not been learned. The processing in step S43 is a processing to newly learn the Client Notification received after the retention time (h) has elapsed as the Client Notification received for the first time in a state where the communication interface for communication with the sender has not been learned, as the communication interface for communication with the sender.
[0106] As can be seen from the processing of steps S42 and S43, the route control unit 110 holds the association between the learned ID and the interface for a preset holding time. As described above, the route control unit 110 is configured to avoid packet loops in the mesh network according to the spanning tree protocol. Therefore, the holding time (h) is set in consideration of the processing according to the spanning tree protocol.
[0107] Figure 15 is a table showing parameter values of RSTP (Rapid Spanning Tree Protocol) Timer and Transmit Hold Count defined in IEEE802.1d 2004. The conditions for the constraints between the setting values are as follows:
[0108] 2×(Bridge_Forward_Delay-1.0 seconds)≧Bridge_Max_Age Bridge_Max_Age ≥2×(Bridge_Hello_Time+1.0 seconds) Among the parameters shown in Fig. 15, "Bridge Hello Time" indicates the BPDU transmission interval. "Bridge Max Age" indicates the maximum valid time of BPDU. "Bridge Forwarding Delay" indicates the time required for an interface (port) to make a state transition. "Transmit Hold Count" indicates the maximum value of BPDUs transmitted per second.
[0109] Meanwhile, the time for the new interface to become effective is calculated as follows: 2×Bridge_Forward_Delay (i.e. 8.0~60.0 sec) Therefore, in this embodiment, the preset holding time (h) is made shorter than the time for making a new communication interface valid, which is determined according to the spanning tree protocol. Specifically, since the time for making a new communication interface valid is 8 seconds at the shortest, if the route switching according to the Client Notification can be executed within 8 seconds, it can be said that the route switching according to the Client Notification is more effective than STP. From this viewpoint, the holding time (h) can be determined. For example, the holding time (h) can be set to an appropriate time between 1 and 5 seconds (2 seconds as an example). As a result, even if a loop occurs in the transmission route of the packet on the mesh network, the loop can be resolved in a short time. Therefore, the waiting time until the packet can be relayed can be shortened.
[0110] 16 is a diagram for explaining the management of routes by Client Notification when a terminal device is connected to a mesh network. The communication device transmits packets only to interfaces specified by the route management table. In other words, the communication device does not transmit packets to non-learned interfaces.
[0111] For example, in the communications device 10A, a packet destined for the terminal device 2A (denoted as "To:xxxx" in FIG. 16) is sent from port P1A ("Port1"), which is a learned interface. This packet is sent to the terminal device 2A via the communications device 10D. On the other hand, port P2A ("Port2") in the communications device 10A corresponds to an unlearned interface because it is not registered in the path management table 153A as an interface for packets with ID "xxxx". Therefore, the communications device 10A does not send packets with ID "xxxx" from port P2A.
[0112] Similarly, the communication device 10A transmits a packet destined for the terminal device 2B (denoted as "To:yyyy" in FIG. 16) from port P2A ("Port2") in accordance with the path management table 153A. The path management table 153A does not register an association between ID "yyyy" and port P1A ("Port1"). Therefore, the communication device 10A does not transmit a packet with ID "yyyy" from port P1A.
[0113] When the communication device 10B receives a packet destined for the terminal device 2B from the communication device 10A, it refers to the path management table 153B and transmits the packet from port P2B ("Port 2"). When the communication device 10C receives a packet destined for the terminal device 2B from the communication device 10B, it refers to the path management table 153C and transmits the packet from port P3C ("Port 3"). When the communication device 10E receives a packet destined for the terminal device 2B from the communication device 10C, it refers to the path management table 153E and transmits the packet from port P2E ("Port 2"). Therefore, the terminal device 2B can receive the packet destined for the terminal device 2B.
[0114] FIG. 17 is a flowchart for explaining the flow of a packet transmission process that follows a learned route. As shown in FIG. 17, the communication device 10 receives a packet (step S51). The communication device 10 (relay processing unit 120) learns the source of the packet and registers the MAC address indicating the source in the learning table 151 together with the interface that received the packet (step S52). Next, the communication device 10 (relay processing unit 120) consults the learning table 151 to determine the interface for transmitting the packet (step S53). That is, the communication device 10 determines the destination of the packet by the learning bridge function (step S53). The learning bridge function allows the communication device 10 to transmit packets only to a determined interface.
[0115] Next, the communication device 10 (management control unit 130) checks the state of the interface determined in step S53 by referring to the interface management table 152. Since this interface is in a state in which it is possible to send and receive packets, the communication device 10 transmits a packet from that interface (step S54).
[0116] As described above, according to the first embodiment, the communication device periodically issues a Client Notification to check the relay route of a packet. Furthermore, when the communication device receives multiple Client Notifications within a predetermined period, the communication device determines the route of the packet according to the first received Client Notification. Since the communication device does not adopt route management packets received through different interfaces, the communication device can uniquely determine the route of packets transmitted from the same sender. For example, even if a user mistakenly connects two communication devices that constitute a mesh network with a wire, it is possible to avoid packet loops occurring in the mesh network.
[0117] For example, when it is difficult for a user to perform the initial settings of a communication device only through a wireless connection, it is assumed that the user first connects to another communication device through a wired connection and sets it up. In the first embodiment, packet loops can be avoided even in such a case. Note that, according to the first embodiment, even if two communication devices are mistakenly connected to each other through a wired connection, the communication device periodically transmits a Client Notification and performs the learning process based on the above-mentioned Client Notification, so that packet loops can be avoided.
[0118] In addition, after a user connects communication devices with a communication cable and completes the settings, the user may disconnect the cable from the communication device and move the device to its original installation location. In this case, the wireless communication state of the communication device is changed by placing the communication device in its original installation location. Therefore, the route on the mesh network may be changed. Even in such a case, the communication device periodically transmits a Client Notification and performs the learning process based on the above-mentioned Client Notification, so that a new route that can avoid packet loops can be determined. This eliminates the need for the user to reconfigure the communication device, thereby reducing the burden on the user regarding network settings.
[0119] <Embodiment 2> In the second embodiment, in addition to the packet route control (route control by Client Notification) according to the first embodiment, destination control is performed by a Reverse Path Forwarding (RPF) check. Specifically, the communication device determines whether or not a combination of the source (SA) of a received packet and the interface that received the packet corresponds to a combination registered in a route management table. If the combination of the SA of the received packet and the receiving interface matches a combination registered in the route table, the communication device relays the packet. Note that the configuration of the communication device according to the second embodiment is the same as that of the communication device according to the first embodiment, and therefore the following description will not be repeated.
[0120] Fig. 18 is a schematic diagram illustrating the control of the destination of a packet according to the second embodiment. As shown in Fig. 18, each of the communication devices 10A to 10E determines whether to relay a packet based on the ID included in the received packet and the learning contents registered in the route management table. Hereinafter, as an example of the control of the destination of a packet according to the second embodiment, the relay of a packet from the terminal device 2B and the transmission of a packet from the communication device 10A will be described.
[0121] (a) Relaying a packet from terminal device 2B A packet from terminal device 2B (denoted as "From:yyyy" in FIG. 18) reaches communication device 10C via communication device 10E. Communication device 10C receives the packet from terminal device 2B at port P3C ("Port3"). A combination of ID "yyyy" and port P3C ("Port3") is registered in path management table 153C of communication device 10C. Therefore, communication device 10C copies this packet to its own ports P1C and P2C.
[0122] The packet transmitted from port P1C reaches port P2B ("Port 2") of the communication device 10B. A combination of ID "yyyy" and port P2B ("Port 2") is registered in the path management table 153B of the communication device 10B. Therefore, the communication device 10B transmits this packet from port P1B.
[0123] The communication device 10A receives a packet from the communication device 10B at port P2A. A combination of ID "yyyy" and port P2A ("Port2") is registered in the path management table 153A of the communication device 10A. Therefore, the communication device 10A receives a packet with ID "yyyy" via port P2A and transmits this packet from port P1A.
[0124] The communication device 10D receives the packet from the communication device 10A at port P2D. The combination of ID "yyyy" and port P2D ("Port2") is not registered in the path management table 153D of the communication device 10D. Therefore, the communication device 10D discards the packet from the communication device 10A.
[0125] On the other hand, the communication device 10D receives a packet from the communication device 10C at port P2D. A combination of ID "yyyy" and port P1D ("Port1") is registered in the path management table 153D of the communication device 10D. Therefore, the communication device 10D determines that this packet is a receivable packet. When the communication device 10D transmits this packet to the communication device 10A, the communication device 10 receives the packet at port P1A ("Port1"). However, a combination of ID "yyyy" and port P1A ("Port1") is not registered in the path management table 153A of the communication device 10A. Therefore, the communication device 10A discards the packet from the communication device 10D.
[0126] (b) Transmission of a packet from the communication device 10A Suppose that the communication device 10A transmits a packet including its own ID ("AAAA") from each interface (ports P1A, P2A) of the communication device 10A. The communication device 10B receives the packet from the communication device 10A at port P1B. The combination of the ID "AAAA" and port P1B ("Port1") is registered in the path management table 153B of the communication device 10B. Therefore, the communication device 10B determines that this packet is a receivable packet. The packet is sent from port P2B of the communication device 10B and sent to the communication device 10C.
[0127] Similarly, the communication device 10D receives a packet from the communication device 10A at port P2D. The combination of ID "AAAA" and port P2D ("Port2") is registered in the path management table 153D of the communication device 10D. Therefore, the communication device 10D determines that this packet is a receivable packet. The packet is sent from port P1D of the communication device 10D to the communication device 10C.
[0128] The communication device 10C receives the packet sent from the communication device 10B at port P1C, and receives the packet sent from the communication device 10D at port P2C. In the path management table 153C of the communication device 10C, the ID "AAAA" is registered in association with the port P1C ("Port1"). Therefore, the communication device 10C determines that the packet sent from the communication device 10B is a packet that can be received. This packet is sent to the communication device 10E. On the other hand, the communication device 10C determines that the packet sent from the communication device 10D is a packet that cannot be received, and discards the packet.
[0129] Fig. 19 is a flowchart illustrating the flow of a packet relay process according to the embodiment 2. In Fig. 19, the same processes as those in the destination control process according to the embodiment 1 (see Fig. 13) are denoted by the same reference numerals, and detailed description thereof will not be repeated.
[0130] 19, the communication device 10 receives a packet (step S31). The communication device 10 determines the type of the received packet (step S32).
[0131] If the type of the received packet is a data packet to be relayed, the process proceeds to step S32A. On the other hand, if the type of the received packet is a Client Notification, the process proceeds to step S36, where a Client Notification receiving process is executed.
[0132] In step S32A, the communication device 10 (route control unit 110) checks the ID (MAC address indicating the sender) included in the received packet. Furthermore, the communication device 10 (route control unit 110) refers to the route management table 153 and determines whether the combination of the ID included in the received data packet and the interface that received the data packet matches the contents registered in the route management table 153.
[0133] If the combination of the ID included in the received data packet and the interface through which the data packet was received matches the contents registered in the route management table 153, the communication device 10 (route control unit 110) determines that the packet is a receivable packet and permits relay of the packet. In this case, the process proceeds to step S33. On the other hand, if the combination of the ID included in the received data packet and the interface through which the data packet was received does not match the contents registered in the route management table 153, the process proceeds to step S32B, where the route control unit 110 checks the destination of the packet and ends the process. In this case, the received packet is discarded.
[0134] In step S33, the communication device 10 (route control unit 110) checks the source MAC address included in the received packet. Furthermore, the relay processing unit 120 registers the source MAC address in the learning table 151 together with the interface through which the packet was received. This allows the communication device 10 to learn the source.
[0135] In step S34, the communication device 10 (route control unit 110) checks the registration status of the terminal device. Specifically, the route control unit 110 checks the destination MAC address included in the packet. Furthermore, the route control unit 110 refers to the learning table 151 to inquire about the destination. Next, the relay processing unit 120 refers to the learning table 151 to inquire about the destination.
[0136] In step S35, the communication device 10 (route control unit 110) refers to the interface management table 152 to inquire about the destination, and determines all interfaces in a transmittable state as the destination. The destination confirmed in step S34 is registered in the interface management table 152 as being in a transmittable state. Therefore, the communication device 10 (route control unit 110) transmits the data packet to be relayed (step S35).
[0137] As described above, the communication device according to the second embodiment determines whether or not to relay a packet according to the receiving route of the packet. If a packet is received through an interface different from the interface registered in the route management table, the packet is discarded. This makes it possible to prevent the packet from being relayed through a route different from the route determined by the route management table. This makes it possible to increase the certainty of avoiding packet loops.
[0138] <Embodiment 3> Fig. 20 is a schematic diagram illustrating loop avoidance control according to the third embodiment. As shown in Fig. 20, for example, a communication device 10A transmits a packet 50 to a communication device 10B. The packet 50 includes a MAC address (DA) indicating a destination, a MAC address (SA) indicating a source, and data (DATA). The packet 50 is transferred from the communication device 10B to the communication device 10C.
[0139] As described above, if communication device 10C and communication device 10D are mistakenly connected by wire, there is a possibility that packet 50 will return from communication device 10C to communication device 10A via communication device 10D. If the SA of a received packet indicates its own MAC address, communication device 10A discards the packet. This makes it possible to avoid packet loops.
[0140] The configuration of the communication device according to the third embodiment is the same as that of the communication device according to the first embodiment, and therefore detailed description thereof will not be repeated. The loop avoidance control according to the third embodiment may be executed independently, or may be combined with either the packet relay process according to the first embodiment or the packet relay process according to the second embodiment.
[0141] Fig. 21 is a flowchart for explaining loop avoidance of packets according to the third embodiment. Referring to Fig. 21, the communication device 10 receives a packet (step S61). The communication device 10 (route control unit 110) determines whether the source MAC address (SA) of the packet matches the MAC address of the communication device 10 itself (step S62). At this time, the communication device 10 (route control unit 110) may refer to the interface management table 152 to inquire about the source.
[0142] If the source MAC address included in the received data packet represents the communication device 10 itself, the process proceeds to step S70, and the route control unit 110 discards the packet. On the other hand, if the source MAC address included in the received data packet does not match the MAC address of the communication device 10 itself, the route control unit 110 checks the source. Furthermore, the route control unit 110 refers to the route management table 153 and checks whether the combination of the MAC address (i.e., ID) representing the source of the packet and the interface that received the packet is registered in the route management table 153. If the combination of the ID and the receiving interface is registered in the route management table 153, the route control unit 110 determines that the packet can be received, and proceeds to step S64. On the other hand, if the combination of the source of the packet and the interface is not registered in the route management table 153, the process proceeds to step S70, and the management control unit 130 discards the received packet.
[0143] In step S64, route control unit 110 checks the source of the received relay packet, and registers the MAC address indicating the source together with the interface through which the packet was received in learning table 151. Next, in step S65, route control unit 110 consults learning table 151 to determine the destination of the packet. In this case, relay processing unit 120 determines the destination of the packet using a learning bridge function.
[0144] Next, in step S66, the route control unit 110 refers to the interface management table 152 to inquire about the destination, and transmits the data packet. If the interface corresponding to the destination of the packet is the same as the source interface registered in the interface management table 152, the communication device 10 does not transmit the relay packet. If the data packet is a multicast packet or an unlearned packet, the communication device 10 transmits the packet to all interfaces other than the receiving interface.
[0145] As described above, according to the third embodiment, when a communication device receives a packet whose sender is itself, the communication device discards the packet, thereby making it possible to prevent the packet from repeatedly looping.
[0146] The embodiments disclosed herein are illustrative in all respects and should not be considered as limiting. The scope of the present invention is defined by the claims rather than the above-described embodiments, and it is intended to include the equivalent meaning of the claims and all modifications within the scope of the claims. [Explanation of symbols]
[0147] 1. Housing 2A, 2B, 11~14 Terminal equipment 5. Communication Cable 10, 10A~10E Communication equipment 21~25 Relay device 21A, 21B, 50 packets 100 LAN interface section 101~10n Wired LAN Interface 111~11m Wireless LAN interface 110 Route control unit 120 Relay Processing Unit 130 Management and Control Unit 131 CPU 132 Spanning Tree Protocol 133 Client Notification Processing Unit 134 Interface Management Department 140 WAN Interface Section 150 Memory 151 Study Table 152 Interface Management Table 153, 153A~153E Interface Management Table 154 Programs 500 Internet P1, P2, P1A~P1E, P2A~P2E, P3C ports S1~S8, S11~S14, S21~S27, S31~S36, S41~S43, S51~S54, S61~S66, S70 Steps
Claims
1. A communication device capable of forming a mesh network by wireless or wired connection, a plurality of interfaces, each corresponding to said wireless connection or said wired connection; a route control unit that receives a route management packet including sender identification information for identifying a sender when the mesh network is configured, and controls a transmission route of the packet in the mesh network; A communication device, wherein the route control unit learns, when a communication interface for communication with the sender has not yet been learned, the interface among the multiple interfaces that first received the route management packet as the communication interface.
2. 2. The communication device according to claim 1, wherein the route control unit registers the learned communication interface in a table in correspondence with the sender identification information, and allows the relaying of the data packet when a combination of the sender identification information contained in a received data packet and the interface through which the data packet was received matches the contents registered in the table.
3. 2. The communication device according to claim 1, wherein said route control unit, when it can be determined that said sender identification information included in a received data packet is sent by said communication device itself, discards said received data packet.
4. The route control unit includes: configured to avoid packet looping in the mesh network according to a spanning tree protocol; and a learning result of the communication interface is held for a preset holding time after the communication interface is learned, The communication device according to claim 1 , wherein the preset holding time is shorter than a time for enabling a new communication interface, the time being determined according to the spanning tree protocol.
5. a plurality of communication devices each having an interface for wireless connection or wired connection and capable of configuring a mesh network through the wireless connection or the wired connection; A communication system in which each of the communication devices transmits a route management packet to the mesh network, the route management packet including sender identification information for identifying a sender, and learns the interface that first receives the route management packet when a communication interface for communication with the sender has not yet been learned, as the communication interface.
6. A communication control method for a communication device having an interface for wireless connection or wired connection and capable of configuring a mesh network by the wireless connection or the wired connection, comprising: receiving a route management packet including sender identification information for identifying a sender when the mesh network is configured; managing a transmission route of a packet in the mesh network based on the received route management packet; A communication control method, wherein the managing step includes a step of learning, as the communication interface, an interface that first receives the route management packet in a state where a communication interface for communication with the sender has not yet been learned.
7. A program for causing a computer of a communication device having an interface for wireless connection or wired connection and capable of forming a mesh network by the wireless connection or the wired connection to execute a communication control method, The communication control method includes: receiving a route management packet including sender identification information for identifying a sender when the mesh network is configured; managing a transmission route of a packet in the mesh network based on the received route management packet; The managing step includes a step of learning, as the communication interface, an interface that first receives the route management packet when a communication interface for communication with the sender has not yet been learned.
Citation Information
Patent Citations
Radio communication equipment, radio communication method, and radio communication program
JP2016139919A