# A New Bit Repair Fast Reroute Mechanism for Smart Sensors IoT Network Infrastructure
## 3 The Proposal of the B-REP FRR Mechanism
The BIER header includes the bit-string (Figure 8) field (BS field), which contains the exact definition of the pre-calculated path along which the packet will be routed (Figure 6). In case of several failures on the existing B-REP repair path, we assume the following behavior. The router that detects the failure adds a new/modified bit-string value that specifies the new alternative path. This means that packets are not again re-encapsulated, but only their LS field is modified. However, this property is still under further investigation. Figure 7: Detection of a failure and the reaction of the B-REP mechanism. Using the example of topology and link metrics from the Figure 7, the alternative path from the source to the destination is constructed via Router 2, Router 4 to Router 3 (Figure 9). The source router S (Router 1) will start encapsulating the original packets of a protected flow with a new BIER header immediately after the failure is detected. The router inserts the bit-string value \"... 01110\" into the BS field (Figure 9, mark 1) that specifies the alternative route via Routers 2, 4, and 3. That BS value indicates the alternative path for other routers. An example of B-REP encapsulated packet is illustrated. When a specific router, namely Router 2, receives a packet with a BIER header, it checks the bit-string value, finds the associated bit with its B-REP R-ID, and sets it to 0. The new BS value on R2 in our case is \"... 01100\". This operation ensures that the router that received the B-REP FRR packet does not receive it again. Without this operation, the router could receive the same packet again resulting in a micro-loop. After this operation, the router will need to specify the next-hop router on the way to the destination. The router checks the bit-string, and if it finds that it has a directly connected neighbor according to the bit-string value, it then forwards the packet to the given router. For our example, Router 2 has directly connected Router 4 with the bit-string position 01000. Therefore, Router 2 sends the packet to Router 4 (Figure 9, mark 2). Router 4 repeats the process and sends the packet to Router 3 (Figure 9, mark 3). The bit-string field with a value that contains only one bit set to 1 indicates to a router that it is the destination router D. Router D then sets the last bit to 0 and removes the BIER header, i.e., router decapsulated the original packet. During the decapsulation process, the modified packet is restored to its original state. Router D then routes the packet according to its unicast routing table. In the presented example, such a packet is received by the router 3. Router 3 receives a packet with the last bit set in the bit-string field (mark 4, 00100, Figure 9). Router 3, therefore, knows that it becomes the destination router D (the last one). It removes the BIER header and routes the packet to its destination based on the content of its unicast routing table as usual. Figure 8: B-REP encapsulation of the IP packet. Figure 9: Example of a modified bit-string.