## 4 Proposed LOADng Enhancement for IoT Networks
### Internet Lost Error Code for LOADng-IoT  
Due to unexpected situations, the Internet nodes can sometimes lose Internet connection. To avoid these nodes receiving Internet messages when they have no connection, this paper proposes a new error code with the function of advising the neighbor nodes that the Internet connection has been lost. The error code, described as \"Internet connection lost\" (or _INTERNET_CONN_LOST_), is defined by code 253. The used code number is included in the range of experimental use codes according to the most recent LOADng [10] specifications and can be altered in the future.  
During network functioning, when an IN receives an Internet message from another node, it should forward the message to the Internet address destination. If the node detects that the connection has been lost or that it is not possible to realize the forwarding, it should generate an RERR message. The generated RRER message, which has the same structure as the normal RERR presented in Table 1, receives the errorcode 253, the originator as its own node address, and the destination as the originator of the not forwarded Internet message. Notice that, in this case, the field unreachableAddress can be ignored when this error type has not used it. Then, the message is transmitted in unicast to the previous hop of the received Internet message.  
A node that receives an RRER with code 253 should perform its processing according to the flowchart presented in Figure 5. Thus, the receiver node should initially decrement the hop-limit field. Then, the node should check its Routing Set and, if an entry is found, change the R_Internet_conn to FALSE. If the RERR receiver uses the IRC, it should also verify whether an entry for the RERR originator exists on its IRC set. If an entry is found, the node should remove it. Notice that the route updated to R_Internet_conn false is not removed from the table and is not included in the IRC set. This procedure avoids the node trying to start a new Internet route discovery from using information about the node with the connection lost. In sequence, the node verifies if itself is the message destination. If true, the RERR process is completed and the message is not forwarded. Otherwise, the node should ascertain whether the message is valid for forwarding, update the message fields, and send the message to its destination.  
An RERR message with code 253 can also be generated by an intermediate node in the path to the destination of an Internet message. An intermediate node that receives an Internet message and detects that the message destination does not have an active Internet connection should start a new Internet route discovery process to find a new Internet path. If the path is not successfully created, the RERR message is generated to the Internet message originator.  
The use of the proposed error code allows the network to reduce the number of Internet messages sent to a node without an Internet connection. Thus, the nodes are able to find alternative Internet routes when they receive an RERR message with code 253. As a benefit, the number of packets lost can be reduced, which contributes to improving the network efficiency and reliability.