# A New Bit Repair Fast Reroute Mechanism for Smart Sensors IoT Network Infrastructure
## 4 Evaluation
### Simulation in Deterministic Simulator
Algorithm Behavior and Simulation Outputs  
At the beginning of the simulation, once all OSPF processes have been finished (\(<\)50 ms), routers will compile their B-REP tables. Therefore, each router reads own OSPF LSDB, sorts the routers according to router's OSPF-ID, and assigns them unique B-REP R-ID. Next, all B-REP enabled routers precalculate alternative paths for its protected interfaces and protected flow according to OSPF LSDB. These pre-calculated backup paths are stored in B-REP BP table. At time 56 sims, the source host starts generating packets of the protected flow sent with the destination address of the host H3. The B-REP algorithm is designed to protect only specific customers' flows, i.e., flows that are identified by their source and destination addresses. Addresses as identifiers of protected flows must be preconfigured on the routers. Packets are delivered from the source to H3 along the shortest route as is selected by OSPF. At the time 60 sims, the described error occurs as is mentioned above. Disabling all interfaces of the R6 router will cause all its neighbors to detect its unavailability and thus, the network change. The speed of detection depends on the mechanism that routers use to check neighbors. Rapid failure detection can be guaranteed, for example, by a standardized BFD mechanism. Next, all affected routers (R1, R2, R3, R5, R7, R9, R10, and R11) through OSPF update messages will begin flooding their new OSPF link-state advertisement (LSA) updates and begin the network convergence process. However, this process can take an unpredictable amount of time. Therefore, when the router R1 detects that the output interface with its primary next-hop router is no longer available, it begins to use B-REP. The R1 becomes the B-REP source router S. Subsequently, R1 start encapsulating unicast packets of the protected flows with a BIER header, into which it inserts the Bit-String routing value of the alternative path. The bit-string contains information about the pre-computed alternative path that will be used to route packets around the detected failure. This alternative path goes via R5 \(\rightarrow\) R10 \(\rightarrow\) R15 \(\rightarrow\) R16 and is represented with the BS value of 000000010100010010 (Figure 14, Table 5). Afterward, the packet with a new BIER header is subsequently routed to the next-hop router R5. Take note that, if the packet has a B-REP header, packet is not routed directly through the routing engine, but it is processed and routed through the B-REP process. The explanation of Figure 14 is as follows: 192.168.1.2-OSPF router ID, 10.0.0.14-OSPF router ID of next next-hop router for the B-REP routing, 000000010100010010-bit-string that is inserted to the packet with BIER header. The R5 receives the packet and starts to analyze its bit-string value. Accordingly, the R5 router detects its next-hop router, which is the R10 router with the B-REP ID = 9 (Table 5) and  
Figure 14: Inserting Bit-String (Source router). \begin{table}
\begin{tabular}{|c c c c|} \hline
**Bit-String** & **Name** & **OSPF R-ID** & **B-REP ID** \\ \hline
000000000000000010 & R16 (Destination router) & 192.168.3.1 & 2 \\
0000000000000100 & R1 (Source router) & 192.168.1.2 & 4 \\
00000000000001000 & R15 & 10.0.0.173 & 5 \\
0000000010000000 & R10 & 10.0.0.137 & 9 \\
0000000100000000 & R5 & 10.0.0.109 & 11 \\ \hline \end{tabular}
\end{table} 
Table 5: B-REP table. OSPF R-ID = 10.0.0.137. Subsequently, R5 modifies the BS value of the packet by setting its bit to zero. Then R5 immediately selects an outgoing interface that leads to the R10 neighbor and forwards the packet towards R10 (Figure 15). Routers R10 and R15 repeat the same process as the R5 router forwards a packet to their next-hops (which is R15, respectively R16). The behavior is changed on the R16 router as it is the destination router D. R16 receives the packet, analyses the Bit-string value, and recognizes that only one bit in the bit-string is set to 1. This indicates that R16 is a decapsulation router.