METHOD FOR SIGNALING THE USE OF AN ILLEGAL IP ADDRESS
Patent Information
- Application Number
- DE602022006548
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-01-07
- Filing Date
- 2022-01-04
- Publication Date
- 2024-10-09
- Estimated Expiration
- 2042-01-04
AI Technical Summary
Devices using illicit IP addresses, which are expired or unknown to the router, cannot be easily informed of their invalid IP address, leading to communication failures and unnecessary WAN traffic congestion.
A method where the router receives packets with invalid source IP addresses, generates error messages marked with a predefined mark, and returns them to the device using an additional routing table, allowing the device to react and request IP address reassignment, while preventing further congestion by incrementing a packet counter and enforcing quarantine periods if the issue persists.
Effectively signals and corrects the use of illicit IP addresses, reducing network congestion by forcing devices to reassign their IP addresses and preventing further data transmission with invalid addresses, thus maintaining network efficiency.
Description
TECHNICAL FIELD
[0001] The present invention relates to the field of message routing between communication networks and more specifically to the routing of messages emitted by a device which uses an illicit, i.e. invalid, IP address in a communication network. STATE OF PRIOR ART
[0002] A local area network (LAN) can communicate with a wide area network (WAN) using a router, which interconnects the two networks, and by using the same protocol, such as the Internet Protocol (IP). An IP address must be assigned to each device on the LAN so that it can communicate with the WAN. IP address assignment can be performed using various procedures, such as RFC 4862 (Request For Comments) or RFC 8415, in which the router or a DHCP (Dynamic Host Configuration Protocol) server assigns all or part of an IP address to a device on the LAN that has requested an IP address.
[0003] However, sometimes an IP address used by a device is illegitimate, i.e., invalid, because it is not recognized by the router. The IP address is then considered illegitimate. For example, an IP address is sometimes assigned to a device with a lease, meaning a time limit after which the device must request a renewal of the IP address. When the device does not make such a renewal request, the IP address expires and is no longer recognized by the router. As another example, the router may send a notification to change an IP address or IP address prefix assigned to a device. However, if the notification is not acted upon by the device, the device continues to use an old, now illegitimate, IP address. In some cases, a device's IP address is assigned manually and may turn out to be incorrect.
[0004] A device using an illegal IP address cannot be easily informed of its invalidity because it is not possible to use that illegal IP address to communicate with the device. Furthermore, the use of an illegal IP address by a device can generate unnecessary and cumbersome traffic on the wide area network.
[0005] The document "Solving The Ingress Filtering Issue in an IPv6 Multihomed Home Network", Etienne Gallet de Santerre et al., Networks (ICN), April 11, 2010, describes a default routing selection mechanism based on the source address of a packet, resolving ingress filtering problems implemented to prevent address spoofing attacks.
[0006] It is therefore desirable to address these drawbacks of the current state of the art. In particular, it is desirable to provide a solution that allows a device to be notified when it is using an illegal IP address. Furthermore, it is desirable to offer a solution that allows a device to correct an illegal IP address. Finally, it is desirable to offer a solution that prevents the local and wide area networks from being overloaded with data transmitted by a device using an illegal IP address. DESCRIPTION OF THE INVENTION
[0007] One object of the present invention is to provide a method for signaling the use of an invalid IP address in a local communication network, the local communication network being connected to another communication network via a router, an invalid IP address being an expired IP address or one unknown to the router. The method comprises the steps, performed by the router, of: receiving a packet from at least one device belonging to said local communication network, said received packet containing an invalid source IP address; generating an error message packet and marking said error message packet with a predefined mark; and resending the marked error message packet to said at least one device using an auxiliary routing table redirecting each packet to the local communication network and a routing rule applying said auxiliary routing table to each packet marked with said predefined mark.
[0008] Thus, it is possible to report the use of an illegal IP address to the device using that IP address by sending it an error message. The device using the illegal IP address can then respond to this error message by requesting a reassignment or a change to its IP address. Furthermore, sending an error message to the illegal IP address is prevented, thereby avoiding congestion on the other network.
[0009] According to a particular embodiment, the process further comprises marking the received package with said predefined mark and rejecting the received package.
[0010] According to a particular embodiment, the method further comprises: recording in a table, called the table of invalid IP addresses, an identifier of the device using said invalid source IP address, in association with a received packet counter initialized to an initial value, and in association with a date of receipt of said received packet, called the date of first receipt, if said identifier is absent from the table of invalid IP addresses; and updating the table of invalid IP addresses if the identifier of said device is present in the table of invalid IP addresses.
[0011] According to a particular embodiment, a first period being defined with a first predefined duration, said first period being counted from the date of first receipt, a second period being defined with a second predefined duration, said second predefined duration being shorter than the first predefined duration and ending at the same time as the first period, updating the table of invalid IP addresses includes incrementing the received packet counter for each packet received during the second period if a disconnection date of said device is not entered in the table of invalid IP addresses.
[0012] According to a particular embodiment, a first period being defined with a first predefined duration, said first period being counted from a disconnection date of said device, a second period being defined with a second predefined duration, said second predefined duration being shorter than the first predefined duration and ending at the same time as the first period, updating the table of invalid IP addresses includes incrementing the received packet counter for each packet received during the second period, if said disconnection date of said device is entered in the table of invalid IP addresses.
[0013] According to a particular embodiment, the process further includes the step of removing the identifier from the table of invalid IP addresses in the case where the first period has elapsed and the counter of received packets is equal to said initial value.
[0014] According to a particular embodiment, the method further includes the step of forcing the device to reset its network interface by disconnecting it from said local communication network, recording the disconnection date in said table of invalid IP addresses and resetting said received packet counter to the initial value, in the event that the first period has elapsed and the received packet counter is different from said initial value.
[0015] Thus, it is possible to identify whether a device using an illegal IP address will itself remedy the use of said illegal IP address or persist in using said illegal IP address. Furthermore, it is possible to force a device that persists in using an illegal IP address to request a reassignment or to change its IP address during a network interface reset.
[0016] According to a particular embodiment, the method further comprises: preventing, for a configured quarantine period, any communication with said device when the first period has elapsed, if a disconnection date of a network interface of said device is entered in said table, and if the received packet counter is different from the initial value.
[0017] According to a particular embodiment, the configured quarantine duration increases with each new quarantine, a quarantine being a period during which all communication with the device is prevented.
[0018] According to a particular embodiment, the quarantine duration is equal to n*Dt where n is a number of quarantines and Dt is an initial quarantine duration.
[0019] According to a particular embodiment, the quarantine period is equal to 2 ( n -1)< * Dt where n is a number of quarantines and Dt is an initial quarantine duration.
[0020] According to a particular embodiment, the first communication network and the other communication network use the IPv6 communication protocol.
[0021] Thus, when a device persists in using an illicit IP address, even after having been forced to reset its network interface, it is possible to avoid congestion of the local communication network due to packets emitted by said device and error messages sent.
[0022] The invention also relates to a router connecting a local communication network to another communication network. The router comprises: means for receiving a packet from at least one device belonging to said local communication network, said received packet including an invalid source IP address, an invalid IP address being an expired IP address or one unknown to the router; means for generating an error message packet and for marking said error message packet with a predefined mark; and means for resending the marked error message packet to said at least one device using an auxiliary routing table redirecting each packet to the local communication network and a routing rule applying said auxiliary routing table to each packet marked with said predefined mark.
[0023] In a particular embodiment, the router further includes means for recording in a table, called the invalid IP address table, an identifier of the device using said invalid source IP address, in association with a received packet counter initialized to an initial value, and in association with a date of receipt of said received packet, called the first receipt date, if said identifier is not present in the invalid IP address table. The router further includes means for updating the invalid IP address table if the identifier of said device is present in the invalid IP address table.
[0024] According to a particular embodiment, said means for updating the table of invalid IP addresses include means for incrementing the received packet counter for each packet received during a second period if a disconnection date of said device is not entered in the table of invalid IP addresses, a first period being defined with a first predefined duration, the first period being counted from the date of first receipt, the second period being defined with a second predefined duration, the second predefined duration being shorter than the first predefined duration and ending at the same time as the first period.
[0025] According to a particular embodiment, said means for updating the table of invalid IP addresses include means for incrementing the received packet counter for each packet received during a second period, if said disconnection date of said device is entered in the table of invalid IP addresses, a first period being defined with a first predefined duration, the first period being counted from a disconnection date of said device, the second period being defined with a second predefined duration, the second predefined duration being shorter than the first predefined duration and ending at the same time as the first period.
[0026] According to a particular embodiment, the router further includes means for removing the identifier from the table of invalid IP addresses in the event that the first period has elapsed and the counter of received packets is equal to said initial value.
[0027] According to a particular embodiment, the router further includes means for forcing the device to reset its network interface by disconnecting it from said local communication network, recording the disconnection date in said table of invalid IP addresses and resetting said received packet counter to the initial value, in the event that the first period has elapsed and the received packet counter is different from said initial value.
[0028] The invention also relates to a computer program, which can be stored on a medium and / or downloaded from a communication network, in order to be read by a processor. This computer program includes instructions for implementing the method mentioned above in any of its embodiments, when said program is executed by the processor.
[0029] The invention also relates to an information storage medium storing such a computer program. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The features of the invention mentioned above, as well as others, will become clearer upon reading the following description of at least one exemplary embodiment, said description being made in relation to the accompanying drawings, among which: [ Fig. 1 ] schematically illustrates a local communication network connected to a wide area communication network via a router, according to one embodiment; [ Fig. 2 ] schematically illustrates a method for signaling the use of an illicit IP address in the local communication network, according to one embodiment; [ Fig. 3 ] schematically illustrates a method for identifying a device that persists in using an illicit IP address on the local communication network, according to one embodiment; [ Fig. 4 ] schematically illustrates a counter incrementation decision process carried out in the process of identifying a device that persists in using an illicit IP address in the local communication network, according to one embodiment; [ Fig. 5 ] schematically illustrates a method for correcting the use of an illicit IP address in the local communication network, according to one embodiment; [ Fig. 6 ] schematically illustrates a quarantine procedure carried out in the process of correcting the use of an illicit IP address in the local communication network, according to one embodiment; [ Fig. 7 ] schematically illustrates a hardware architecture of the router implementing the signaling process of the use of an illicit IP address in the local communication network, according to one embodiment. DETAILED DESCRIPTION OF IMPLEMENTATION METHODS
[0031] There Fig. 1 schematically illustrates a local communication network, called local network 120, connected to a wide communication network, called wide network 130, via a router 110, according to a particular embodiment.
[0032] Router 110 includes a firewall 112 and a routing module 113. Router 110 also includes a first interface 111 allowing the router 110 to be connected to the local network 120 and a second interface 114 allowing the router 110 to be connected to the wide area network 130.
[0033] Routing module 113 is responsible for routing or directing a packet received by router 110 based on the packet's destination IP address. Routing module 113 includes a primary routing table and may also include one or more secondary routing tables. Each routing table contains one or more routes that specify which interface (111, 114, etc.) a packet should be directed to, based on its destination IP address. Routing module 113 also includes at least one routing rule that defines which routing table to use to route a packet received by router 110, based on predefined criteria.
[0034] According to a particular embodiment, the routing module 113 includes a main routing table with two routes. A first route directs each packet whose destination IP address is recognized as belonging to the local network 120, to the first interface 111 from where it is sent to the local network 120, and a second route directs by default each packet whose destination IP address does not belong to the local network 120 to the second interface 114 from where it is sent to the wide area network 130.
[0035] Routing module 113 also includes an auxiliary routing table containing a single route described below in relation to the Fig. 2 and which directs each packet to the first interface 111 from where it is sent to the local network 120.
[0036] Routing module 113 also includes a first routing rule that applies the main routing table to each received packet, except for packets covered by a second routing rule described below in relation to the Fig. 2 .
[0037] Router 110 also includes a firewall 112. Firewall 112 implements filtering rules that allow it to select certain packets received from or sent to the local network 120 based on criteria such as the destination IP address or the source IP address of the packet. The destination IP address of a packet is the IP address that the packet must reach, while the source IP address of a packet corresponds to the IP address of a terminal that sent the packet. A terminal could be, for example, a terminal accessible via the wide area network 130 or a device 121 belonging to the local network 120. The filtering rules also allow actions to be performed on a selected packet. One possible action is to accept a packet, which includes routing the packet to its destination IP address.A second action is to reject a packet, which involves not routing the packet and also sending an error message to the source IP address, that is, to the device 121 that sent the packet. A third action is to silently drop or reject a packet, which involves deleting the packet without routing it and not sending an error message. A fourth action is to record a trace of a packet, for example, in a log.
[0038] The local area network (LAN) has at least one device connected to the router via its first interface. Each device can communicate within the LAN by exchanging data with the first interface at the data link layer of the OSI (Open Systems Interconnection) model. For example, a device might communicate with the first interface using Ethernet, a network switch, or Wi-Fi. When the LAN has different segments using different technologies, the first interface acts as a bridge, interconnecting these segments.
[0039] In one example, the 130 WAN is a Wide Area Network (WAN) such as Intermet. In another example, the 120 WAN is a subnet of a larger network, called the 130 WAN.
[0040] The local network 120 and the wide area network 130 can communicate with each other by exchanging data, in the form of packets, at the network layer of the OSI model using a common protocol such as the IP (Internet Protocol). The IPv6 protocol (version 6 of the Internet Protocol) is used to advantage. Therefore, an IP address must be assigned to each device 121 on the local network 120 so that said device 121 can communicate with the wide area network 130.
[0041] The IP address of a device 121 can be assigned in different ways. For example, according to a first procedure specific to the IPv6 protocol called RFC 4862 (RFC stands for "Request For Comments"), the IP address of a device 121 is assigned, after requesting it, by router 110, which proposes an IP address prefix. The device 121 then chooses an IP address suffix that is not already in use on the local network 120 to construct its IP address. According to a second procedure specific to the IPv6 protocol called RFC 8415, the device 121 requests a DHCP (Dynamic Host Configuration Protocol) server. The DHCP server then proposes an IP address to the device 121, and when the IP address is accepted by the device 121, the DHCP server assigns that IP address with a lease of a defined duration.To retain the IP address beyond its lifetime, the 121 device must periodically renew its lease. Alternatively, a 121 device's IP address is sometimes assigned manually.
[0042] When a 121b device uses an invalid IP address—that is, an IP address that is invalid because it has expired or is unknown to the 110 router—the 110 router does not recognize that IP address and therefore cannot be used to communicate with the 121b device. This can occur when a manually assigned IP address is incorrect or when the assigned IP address has expired. For example, this happens if the 121b device does not renew its lease as per RFC 8415. As another example, as per RFC 4862, the 110 router can send a message to the 121b device to change its IP address prefix by assigning a zero-to-live prefix. However, sometimes the 121b device ignores this message and continues to use the expired or invalid IP address.
[0043] There Fig. 2 This schematically illustrates a method for signaling the use of an illicit IP address on local network 120, according to one embodiment. The signaling method is implemented by router 110.
[0044] In step 200, router 110 receives a packet from a device 121b on local network 120, this device 121b using an illegal IP address. In other words, router 110 receives a packet containing an illegal source IP address. This IP address of device 121b is not within any of router 110's address spaces and is therefore identified as illegal by router 110. Furthermore, router 110 can identify a physical address, known as the MAC (Media Access Control) address, of device 121b.
[0045] Optionally, as part of the IPv6 protocol, router 110 performs, in a subsequent step 202, a packet marking by associating the packet with a predefined mark. To do this, the firewall 112 of router 110 implements a filtering rule that applies to each packet received from a device 121b using an illegitimate IP address. This filtering rule instructs the router to mark the packet with the predefined mark.
[0046] For example, within the framework of the IPv6 protocol, such a rule implemented by a Linux operating system can be written as: "ip6tables -A FORWARD -i br0 -j MARK --set-xmark 0x10000 / 0xffffffff".
[0047] This rule defines the following elements: A FORWARD indicates to add a rule to the routing chain, i br0 specifies the router interface 111 on which the packet is received, j MARK indicates the action to apply, in this case marking with the predefined mark 0x10000, and
[0048] 0xffffffff indicates that the predefined mark is applied fully, without being altered.
[0049] In step 204, router 110 generates a packet containing an error message marked with a predefined mark, i.e., the mark predefined in step 202. For example, in IPv6, router 110 discards the packet received in step 200, meaning it deletes the received packet and, in response to the marking performed in step 202, sends an error message packet marked with the predefined mark to the device 121b using an illegitimate IP address. In other words, the error message packet is generated with the same mark as the discarded packet.
[0050] To achieve this, the following rule can be applied: “ip6tables -A FORWARD -p ipv6 -i br0 -j REJECT --reject-with icmp6-policy-fail”.
[0051] This rule defines the following elements: A FORWARD indicates to add a rule to the routing chain p ipv6 indicates that the rule applies to ipv6 protocol packets, i br0 specifies the router interface 111 and indicates that the rule applies to packets that are received on said interface 111, j REJECT --reject-with icmp6-policy-fail indicates the action to apply in this case the rejection of the packet and the sending of an error message packet according to the icmp6-policy-fail error code, said error code defining a type of generated packet.
[0052] Furthermore, since the error message packet is generated by the router 110's operating system kernel, it may be necessary to enable an operating system kernel function to generate the marked error message packet. In the case of the Linux operating system, the `fwmark_reflect` function can be used. This function marks a response packet with the same mark used to mark the packet it is responding to, i.e., the rejected packet.
[0053] In step 206, router 110 directs the marked reply message to device 121b using an illicit IP address. Router 110's routing module 113 implements the side routing table, which contains a single route that directs each packet by default to router 110's first interface 111. Routing module 113 further implements the second routing rule, which takes precedence over the primary routing rule defined earlier in relation to the Fig. 1 This applies the aforementioned secondary routing table to each packet marked with the predefined mark, so that the primary routing table does not apply to a packet marked with said predefined mark. Thus, each packet marked with the predefined mark and not rejected (and therefore not deleted) by firewall 112 (including marked error message packets) is sent to the local network 120, destined for device 121b, identified by its MAC address. Device 121b is thereby informed that it is using an illegal IP address. Furthermore, the secondary routing table associated with the second routing rule prevents an error message packet destined for an illegal IP address—that is, an IP address not belonging to the local network 120—from being sent to the wide area network 130, as it would otherwise be sent to the wide area network 130 with the primary routing table.Note that when the error message packet is received by the first interface 111 of router 110, interface 111 can identify the MAC address of device 121b using a table that associates a MAC address with an IP address, the IP address being either valid or invalid. Alternatively, interface 111 can identify the MAC address of device 121b using a MAC address resolution procedure.
[0054] There Fig. 3 This schematically illustrates, according to one embodiment, a method for identifying a device 121 that persists in using an illegal IP address. The method for identifying a device 121 that persists in using an illegal IP address aims to count packets originating from a device 121b using an illegal IP address over a predefined period in order to determine whether said device 121b persists in using an illegal IP address over time without being able to remedy the use of said illegal IP address itself. In a step 300 identical to step 200, router 110 receives, at a time t, a packet from a device 121b, said device 121b using an illegal IP address. This IP address of device 121b is identified as illegal by router 110. Router 110 identifies an identifier of device 121b, such as its MAC address.In addition, router 110 uses a filtering rule that selects each packet from a 121b device using an illicit IP address and records a packet trace including the illicit IP address used by said 121b device and a packet receipt date.
[0055] In step 302, router 110 searches a table, called the table of illicit IP addresses, for the identifier (e.g., the MAC address) of the device 121b in question. If this identifier (e.g., the MAC address) of device 121b is present in the table of illicit IP addresses, a step 306 is performed. Otherwise, a step 304 is performed.
[0056] At step 304, router 110 records in the table of illicit IP addresses an identifier, e.g., a MAC address, of device 121b using an illicit IP address that sent the packet received at step 300. Router 110 also retrieves information from the recorded trace of said packet to record, in association with said identifier (e.g., said MAC address), optionally the illicit IP address used by device 121b, a date of receipt of said packet, called the date of first receipt, as well as a first packet counter C1 and a second packet counter C2. The first counter C1 is initialized to an initial value V1 and incremented by an increment value k to count the receipt of the first packet, and the second packet counter C2 is initialized to a second initial value V2.For example, the first counter C1 and the second counter C2 are initialized to 0 (V1=V2=0) and the first counter C1 is further incremented by 1 (k=1). A step 308 is then performed.
[0057] At step 306, router 110 updates the table of illicit IP addresses, which includes the identifier (e.g., the MAC address) of the device 121b in question. To do this, router 110 retrieves information from the recorded packet trace and determines whether to increment counter C1 and / or counter C2 based on the packet's reception date, according to an increment decision process described in the Fig. 4 The first counter, C1, is incremented if the packet is received during a first period of predefined duration Δt1, and the second counter, C2, is incremented if the packet is received during a second period of predefined duration Δt2, which is shorter than the first predefined duration Δt1 and ends at the same time as the first period. The first predefined duration Δt1 and the second predefined duration Δt2 are sufficiently long and far apart to allow identification of whether a 121b device is still using an illicit IP address. For example, the first predefined duration Δt1 is 120 seconds and the second predefined duration Δt2 is 60 seconds. Step 308 is then performed.
[0058] In step 308, router 110 determines whether the first period of predefined initial duration Δt1 has elapsed. As soon as this first period has elapsed, step 310 is performed. If the first period of initial duration Δt1 has not elapsed, step 309 is performed.
[0059] In step 309, router 110 waits to receive any further packets from device 121b. If a new packet containing the illicit IP address is received from device 121b, step 300 is repeated. Otherwise, step 308 is repeated. In step 310, router 110 determines whether the device 121b is still using an illicit IP address. If the first counter C1 and the second counter C2 are different from the initial first value V1 and the initial second value V2, respectively, then device 121b is considered to be still using an illicit IP address, and step 312 is performed. Otherwise, specifically if the second counter C2 is equal to the initial second value V2, then device 121b is not still using an illicit IP address.Router 110 considers that device 121b has itself remedied the use of an illicit IP address, for example by changing its IP address, and a step 314 is performed.
[0060] At step 312, router 110 applies a correction action according to a correction procedure described in the Fig. 5 to allow device 121b to remedy the use of an illegal IP address. For example, one possible corrective action is to disconnect device 121b to force it to reset its network interface and reconnect to local network 120. In this case, the disconnection date of device 121b is recorded in association with the identifier (e.g., the MAC address) of said device 121b, and the first and second counters C1 and C2 are reset.
[0061] At step 314, the identifier (e.g., the MAC address) of device 121b is removed from the table of illicit IP addresses, along with each piece of information recorded in association with said identifier (e.g., said MAC address).
[0062] Counter C1 is an optional counter. In an alternative embodiment, only counter C2 is used.
[0063] There Fig. 4 This schematically illustrates, according to one embodiment, the decision-making process for incrementing the second counter C2 and optionally the first counter C1 based on the date of receipt of the packet from the device in question (121b). This incrementation decision-making process corresponds to step 306 of the Fig. 3 .
[0064] In the first step, 3061, router 110 identifies whether a disconnection date is recorded in association with the identifier (e.g., the MAC address) of the relevant device 121b. The disconnection date corresponds to a date on which device 121b was forcibly disconnected from the local network 120. If no disconnection date is recorded, step 3062 is performed. Otherwise, step 3063 is performed. In steps 3062 and 3063, router 110 identifies a start date, t0, from which the first and second periods are calculated.
[0065] In step 3062, the start date t0 taken into account is the date of first receipt, in other words the date on which the first packet of said device 121b was received, as described in step 304 of the Fig. 3 The first period is therefore a first time interval of predefined duration Δt1, starting on the date of first receipt. The second period is a second time interval between a time t0 + Δt1 - Δt2 and a time t0 + Δt1, the starting date t0 being the date of first receipt. Then, step 3064 is performed.
[0066] In step 3063, the starting date t0 is the disconnection date of device 121b. The first period is a third time interval of predefined duration Δt1, beginning on the disconnection date. The second period is a fourth time interval between t0 + Δt1 - Δt2 and t0 + Δt1, with the starting date t0 being the disconnection date. Then step 3064 is performed.
[0067] In the optional step 3064, router 110 determines whether the packet's reception date t falls within the first period. To do this, router 110 identifies whether the packet's reception date t occurs within a first period Δt1 counted from the start date t0 identified in step 3062 or step 3063. If so, step 3065 is performed.
[0068] At the optional step 3065, the first counter C1 is incremented by the increment value k, for example k=1.
[0069] In step 3066, router 110 determines whether the packet's reception time falls within the second period. The second period spans a second predefined duration Δt2, shorter than the first duration Δt1, and begins at a time equal to t0 + Δt1 - Δt2, such that the first and second periods end simultaneously. In other words, router 110 determines whether the packet's reception time t is between a time t0 + Δt1 - Δt2 and a time t0 + Δt1.
[0070] If so, step 3067 is performed.
[0071] At step 3067, the second counter C2 is incremented by the increment value k. Fig. 5 This schematically illustrates, according to one embodiment, a process for correcting the use of an unlawful IP address. The process for correcting an unlawful IP address is implemented when a 121b device is considered to be persistently using an unlawful IP address. The purpose of this process is to select and perform corrective action to address the use of said unlawful IP address. This correction process corresponds to step 312 of the Fig. 3 .
[0072] At step 3120, router 110 identifies whether a disconnection date is recorded in association with the identifier (e.g., the MAC address) of the relevant device 121b. If so, step 3123 is performed. Otherwise, if no disconnection date is recorded, step 3121 is performed.
[0073] In step 3121, router 110 disconnects device 121b from local network 120 to force device 121b to reset its network interface. Router 110 identifies a physical interface of itself to which the MAC address of device 121b is associated and then disconnects that physical interface. Once disconnected, device 121b is forced to reset its network interface in order to reconnect to local network 120. When resetting its network interface, device 121b must send a new IP address request, which is then assigned to it by router 110 or by a DHCP server from among available and valid IP addresses.
[0074] For example, if the first interface 111 of router 110 is a network bridge, router 110 identifies the physical interface to which device 121b is connected in a table that associates, for a device 121, its MAC address with a physical interface to which device 121 is connected. Router 110 then performs a physical port reset corresponding to that physical interface of device 121b.
[0075] Alternatively, router 110 queries a network device, such as a network switch or Wi-Fi access point, by sending the MAC address of device 121b to determine if device 121b is connected to that network device. If so, router 110 sends a disconnection command to device 121b. In one particular embodiment, router 110 sends a disconnection command for device 121b to each network device, and when a network device identifies a physical interface or connection to device 121b, it executes the disconnection command. Router 110 communicates with the network device using a device driver installed on router 110.
[0076] In the case where the network device is a network switch, said network switch, upon receiving the MAC address of device 121b, looks up said MAC address in a table similar to that of a network bridge, associating each MAC address of a device 121 with the physical interface of said device 121. The network switch then performs a reset of the physical port to which device 121b is connected in order to disconnect the device 121b using an illicit IP address.
[0077] In the case where the network device is a Wi-Fi access point, said Wi-Fi access point searches for the 121b device in a list of MAC addresses of 121 devices associated with it and, if the MAC address of said 121b device using an illicit IP address is identified, the Wi-Fi access point disconnects said MAC address.
[0078] In a subsequent step 3122, router 110 further records, in association with the identifier (e.g., the MAC address) of device 121b, the disconnection date, that is, the date on which device 121b was forcibly disconnected from local network 120. In addition, router 110 resets the first packet counter C1 to V1 and the second packet counter C2 to V2.
[0079] At step 3123, router 110 orders the quarantine of device 120; in other words, router 110 prevents all communication with the local network 120 for a quarantine period, according to a quarantine procedure described below in relation to the Fig. 6 Step 3124 is then performed.
[0080] In step 3124, the identifier (e.g., the MAC address) of the 121b device is removed from the table of illicit IP addresses, along with all information recorded in association with that identifier. Step 3124 is identical to step 314 of the Fig. 3 .
[0081] There Fig. 6 schematically illustrates a quarantine procedure according to one embodiment. This quarantine procedure corresponds to step 3123 of the Fig. 5 and is implemented in the process of signaling the use of an illicit IP address. In step 601, router 110 looks up the identifier (e.g., the MAC address) of device 121b to be quarantined in a table, called the quarantine table. If the identifier (e.g., the MAC address) of device 121b is present in the quarantine table, step 606 is performed. Otherwise, step 602 is performed.
[0082] At step 602, router 110 records, in the quarantine table, a device identifier, e.g. a MAC address of device 121b to be quarantined.
[0083] In step 603, router 110 also records, in association with said identifier (e.g., said MAC address), a number n of quarantines initialized to one. In one embodiment, router 110 also records a quarantine date, corresponding to a time at which router 110 orders the quarantine of device 121b. Optionally, the illicit IP address is also recorded.
[0084] At step 604, router 110 calculates a quarantine exit date. The quarantine exit date is calculated by adding a predefined initial quarantine duration, e.g., 60 seconds, to the quarantine start date.
[0085] In step 605, router 110 prevents all communication between device 121b and local network 120. To do this, router 110 identifies a physical interface to which device 121b is connected and / or a network device to which device 121b is connected. For example, router 110 looks up the MAC address of device 121b in a network bridge table that associates each MAC address of a device 121 with the physical interface of that device 121, or it queries a network device that looks up the MAC address among the devices 121 connected to that device and identifies the corresponding physical interface or port. Router 110 then instructs the network device to which device 121b is connected not to accept packets from device 121b.For example, a network switch can ignore packets from a MAC address and not forward them until the quarantine exit date. A Wi-Fi access point can define a list of MAC addresses prohibited from associating with that Wi-Fi access point and unassociate the 121b device so that said 121b device can no longer associate with the Wi-Fi access point until the quarantine exit date. In the case of a network device that does not allow packet ignoring or prohibiting association with a 121b device, the firewall 112 of router 110 inserts a filtering rule to drop a packet from the MAC address of said 121b device before the filtering rule used to reject a packet from a 121 device using an illegitimate IP address. Thus, a packet from the quarantined device 121b is silently discarded without generating an error message, which avoids cluttering the local network 120.
[0086] At step 606, since the identifier (e.g., the MAC address) of device 121b is already present in the quarantine table, the number n of quarantines is incremented. Furthermore, the quarantine date is updated to correspond to a time when router 110 orders device 121b to be quarantined again.
[0087] In step 607, a new quarantine exit date is calculated by adding to the quarantine start date a quarantine duration that depends on the number n of quarantines recorded.
[0088] For example, the quarantine period can double each time device 121b is placed in quarantine. The quarantine period is thus equal to 2 ( n -1)< * Dt where n is the number of quarantines and Dt is the initial predefined quarantine duration. According to the example, if the initial predefined quarantine duration is 60 seconds, when device 121b is quarantined for the second time, the number n of quarantines is 2 and the calculated quarantine duration is 120 seconds. When device 121b is quarantined for the third time, the number n of quarantines is 3 and the calculated quarantine duration is 240 seconds.
[0089] According to another example, the duration of the quarantine is proportional to the number n of quarantines and is thus equal to n*Dt where n is the number of quarantines and Dt is the predefined initial duration of quarantine, e.g. equal to 60s.
[0090] In step 608, router 110 blocks all communication between device 121b and local network 120, similar to step 605, until the new quarantine exit date calculated in step 607. After the quarantine exit date, router 110 again allows communication between device 121b and local network 120. A network switch then again accepts packets from the MAC address of said device. A Wi-Fi access point can remove said MAC address from its list of blocked MAC addresses. Alternatively, router 110 removes the filtering rule inserted at the time of quarantine, which dropped a packet from the MAC address of said device 121b.
[0091] Optionally, in steps 605 and 608, an error notification is sent to a local network administrator 120, for example by email or via a management console, so that said local network administrator 120 can intervene when device 121b is restarted using an illicit IP address, in order to allow communication between device 121b and local network 120 again after the quarantine exit date.
[0092] There Fig. 7schematically illustrates the hardware architecture of the router 110 according to one embodiment. The router 110 then comprises, connected by a communication bus 710; a processor or CPU (Central Processing Unit) 701; a RAM (Random Access Memory) 702; a ROM (Read Only Memory) 703; a storage unit 704, such as a HDD (Hard Disk Drive), or a storage media reader, such as an SD (Secure Digital) card reader; and a COM interface 705 allowing communication with network devices.
[0093] The CPU 701 processor is capable of executing instructions loaded into RAM 702 from ROM 703, external memory (such as an SD card), storage media, or a communication network. When the router 110 is powered on, the CPU 701 processor is able to read instructions from RAM 702 and execute them. These instructions form a computer program causing the CPU 701 processor to implement all or part of the steps described here in relation to the router 110. All or part of said steps can thus be implemented in software form by executing a set of instructions by a programmable machine, such as a DSP (Digital Signal Processor) or a microcontroller, or be implemented in hardware form by a dedicated machine or component, such as an FPGA (Field-Programmable Gate Array) or an ASIC (Application-Specific Integrated Circuit).
Claims
1. Method for indicating a use of an illicit IP address in a local communication network (120), the local communication network (120) being connected to another communication network (130) by means of a router (110), an illicit IP address being an IP address that has expired or is unknown to the router, the method comprising the steps, performed by the router (110), of: - receiving (200) a packet from at least one device (121b) belonging to said local communication network (120), said received packet comprising an illicit source IP address; - generating (204) an error message packet and marking said error message packet with a predefined mark; and - returning (206) the marked error message packet to said at least one device (121b) using a related routing table redirecting each packet to the local communication network and a routing rule applying said related routing table to each packet marked with said predefined mark.
2. Method according to claim 1, the method further comprising marking (202) the packet received with said predefined mark and rejecting the packet received.
3. Method according to one of claims 1 or 2, the method further comprising: - recording (304) in a table, referred to as an illicit IP address table, an identifier of the device (121b) using said illicit source IP address, in association with a received-packet counter initialised to an initial value, and in association with a time of reception of said received packet, referred to as a first reception time, if said identifier is absent from the table of illicit IP addresses; - updating (306) the table of illicit IP addresses if the identifier of said device (121b) is present in the table of illicit IP addresses.
4. Method according to claim 3, wherein a first period being defined with a first predefined duration, said first period being counted as from the time of first reception (3062), wherein a second period being defined with a second predefined duration, said second predefined duration being shorter than the first predefined duration and terminating at the same time as the first period, and wherein updating the table of illicit IP addresses comprises incrementing (3067) the received-packet counter for each packet received during the second period if a time of disconnection of said device (121b) is not given (3061) in the table of illicit IP addresses.
5. Method according to claim 3, wherein a first period being defined with a first predefined duration, said first period being counted as from a time of disconnection (3063) of said device (121b), wherein a second period being defined with a second predefined duration, said second predefined duration being shorter than the first predefined duration and terminating at the same time as the first period, and wherein updating the table of illicit IP addresses comprises incrementing (3067) the received-packet counter for each packet received during the second period, if said time of disconnection of said device (121b) is given (3061) in the table of illicit IP addresses.
6. Method according to claim 4 or 5, further comprising the step of deleting (314) the identifier from the table of illicit IP addresses in the case where the first period has elapsed and the received-packet counter is equal to said initial value.
7. Method according to one of claims 4 or 5, further comprising the step of forcing (3121) the device (121b) to reinitialise its network interface by disconnecting it from said local communication network, recording the time of disconnection in said table of illicit IP addresses and reinitialising said received-packet counter to the initial value, in the case where the first period has elapsed and the received-packet counter is different from said initial value.
8. Method according to one of claims 5 or 7, further comprising: preventing (3123), during a configured quarantine duration, any communication with said device (121b) when the first period has elapsed, if a time of disconnection of a network interface of said device is given (3120) in said table, and if the received-packet counter is different from the initial value.
9. Method according to the preceding claim, wherein the configured quarantine duration increases at each new quarantine, a quarantine being a period during which any communication with the device (121b) is prevented.
10. Method according to claim 9, wherein the quarantine duration is equal to n*Dt where n is a number of quarantines and Dt is an initial quarantine duration.
11. Method according to claim 9, wherein the quarantine duration is equal to 2(n-1) * Dt where n is a number of quarantines and Dt is an initial quarantine duration.
12. Method according to one of claims 1 to 11, wherein the first communication network (120) and the other communication network (130) use the IPv6 communication protocol.
13. A router connecting a local communication network (120) to another communication network (130), the router comprising: - means for receiving (200) a packet from at least one device (121b) belonging to said local communication network (120), said received packet comprising an illicit source IP address, an illicit IP address being an IP address that has expired or is unknown to the router, - means for generating an error message packet and for marking said error message packet with a predefined mark, and - means for returning (206) the marked error message packet to said at least one device using a related routing table redirecting each packet to the local communication network (120) and a routing rule applying said related routing table to each packet marked with said predefined mark.
14. A router according to claim 13, further comprising: - means for recording (304) in a table, referred to as an illicit IP address table, an identifier of the device (121b) using said illicit source IP address; in association with a received-packet counter initialised to an initial value, and in association with a time of reception of said received packet, referred to as the time of first reception, if said identifier is absent from the table of illicit IP addresses, - means for updating (306) the table of illicit IP addresses, if the identifier of said device (121b) is present in the table of illicit IP addresses.
15. A router according to claim 14, wherein said means for updating (306) the table of illicit IP addresses comprise means for incrementing (3067) the received-packet counter for each packet received during a second period if a time of disconnection of said device (121b) is not given (3061) in the table of illicit IP addresses, a first period being defined with a first predefined duration, the first period being counted as from the time of first reception (3062), the second period being defined with a second predefined duration, the second predefined duration being shorter than the first predefined duration and terminating at the same time as the first period.
16. A router according to claim 14, wherein said means for updating (306) the table of illicit IP addresses comprise means for incrementing (3067) the received-packet counter for each packet received during a second period, if said time of disconnection of said device (121b) is given (3061) in the table of illicit IP addresses, a first period being defined with a first predefined duration, the first period being counted as from a time of disconnection (3063) of said device (121b), the second period being defined with a second predefined duration, the second predefined duration being shorter than the first predefined duration and terminating at the same time as the first period.
17. A router according to claim 15 or 16, further comprising means for deleting (314) the identifier from the table of illicit IP addresses in the case where the first period has elapsed and the received-packet counter is equal to said initial value.
18. A router according to claim 15 or 16, further comprising means for forcing (3121) the device (121b) to reinitialise its network interface by disconnecting it from said local communication network (120), recording the time of disconnection in said table of illicit IP addresses and reinitialising said received-packet counter to the initial value, in the case where the first period has elapsed and the received-packet counter is different from said initial value.
19. A computer program, comprising instructions for implementing, by a processor, the method according to any one of claims 1 to 11, when said program is executed by said processor.
20. An information storage medium, storing a computer program comprising instructions for implementing, by a processor, the method according to any one of claims 1 to 11, when said program is executed by said processor.
