# Enhanced Bit Repair IP Fast Reroute Mechanism for Rapid Network Recovery
## 4 The Proposal of the Enhanced B-REP Mechanism
Per-prefix protection calculates one alternative backup path for each network prefix. Therefore, each prefix will have one best-metric backup path calculated. The problem with this method is the high overhead on the CPU and memory. The process of EB-REP tables initialization is performed for the first time as the EB-REP mechanism is initialized and then each time after each routing convergence ends or EB-REP configuration is done. After EB-REP tables' initialization, the EB-REP process stays in the monitoring mode. In the case of a network error, either failure of a protected interface (interface state changed to down/down on ISO OSI layer 1 (L1) or (L2) or neighbor unavailability (using BFD protocol detection), EB-REP proceeds as follows, as in the example shown in Figure 9. Suppose we have eight routers and a packet flow routed over the network between a source (with an IP address of 192.168.0.1) toward a destination (identified by an IP address of 192.168.1.1). The shortest primary path used to route packets is through R1 \(\rightarrow\) R3 \(\rightarrow\) R5 \(\rightarrow\) R7. The router that detects the first failure becomes the source router S. The S router starts the routing protocol convergence process and uses the EB-REP FRR protection mechanism until it obtains new updated routing information. The EB-REP mechanism uses the encapsulation of the original IP packet with an additional BIER header (EB-REP header). The EB-REP header contains the correct alternative route specification stored in the Bit-String header field. To obtain the BS value, router S searches in the EB-REP BT for the affected destination IP address and the identity of the failed protected interface. Router S reads a given Bit-String value of the backup path, encapsulates the packet, and sends it out through an active interface to the precalculated next-hop EB-REP node (router N). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Output Interface** & **Prefix** & **Path Bit-String Value** \\ \hline E1 & 192.168.1.0/24 &... 0110 1000 (LSB) \\ E2 & 192.168.2.0/24 &... 1001 0100 (LSB) \\ E3 & 192.168.3.0/24 &... 0000 1010 (LSB) \\ E4 & 192.168.0.0/24 &... 0000 1001 (LSB) \\  &... &... \\ \hline \hline \end{tabular}
\end{table} 
Table 5: EB-REP Backup Table on R3. The \(N\) router is neither a source nor a destination; it is a router along the way. The N router receives a packet with the BIER header and checks whether the BS value has more than one bit set. Router N then adjusts its bit in the BS (meaning that the packet has been processed) and forwards the EB-REP packet towards the next-hop according to the BS value. In our situation, it is the R3 router that has detected the unavailability of its E1 interface and faces the problem of how to route packets towards the destination 192.168.1.1. R3 becomes the router S. R3 searches its local EB-REP BT to find the correct BS value of the alternative path for 192.168.1.1 and encapsulates the packet using the BIER header with the path BS value of \"... 0110 1000\" (Figure 9). Finally, R3 routes the EB-REP BIER packet to the EB-REP next-hop, here R4. R4, as the N router, processes the packet, sets R4's bit in the BS value to zero, and routes the packet according to the BS value to another directly connected next-hop router, R6. The second improvement of the EB-REP mechanism is the protection against multiple network failures. The router R6, like another router N, will normally repeat what R4 did: sets its associated bit in the BitString to zero and checks BS for another next-hop, which is R7, and forwards the EB-REP packet. However, if another failure occurs on the backup path, the EB-REP will react differently. Once the router control plane detects and reports the connectivity failure, the new reroute process must start. The N router becomes a new S router (to differentiate it, let us call it S2). The EB-REP mechanism on the S2 router first reads the destination IP address inside of the packet IP header.