Network failures cause a large number of packet losses and seriously affect network performance. How to deal with network failures efficiently and quickly is the basic requirement and main task of designing routing protocols. Currently, the most effective methods for Internet deployment are open shortest path first (OSPF) and intermediate systemto- intermediate system (IS-IS). Network faults are resolved by dynamic routing protocols, but a large number of packets are still discarded during the dynamic convergence of protocols. Therefore, router manufacturers widely adopt the route protection method with better performance to overcome network faults. However, the existing route protection schemes generally have high implementation complexity or low fault protection rate. Aiming at the above problems, this paper realizes the network programmability based on SRv6. In this paper, a research on intra-domain routing protection scheme based on SRv6 (RPSRv6) is proposed. Firstly, the calculation rules of backup paths are proposed. According to the backup path calculation rule, the backup path is calculated for all pairs of source and destination nodes affected by link failure in the incremental shortest path tree generated. On this basis, the calculation rule of Segment List is proposed, that is, the value and number of SIDs in the Segment List are calculated. In the process of calculating the backup path, each node affected by the fault and other nodes can be accessed at most once, so the time complexity of RPSRv6 has good performance. The experimental results show that compared with existing DC (downstream criterion) rules and U-Turn algorithms, RPSRv6 algorithm has better experimental results in fault protection rate and path stretch, reaching 100% fault protection rate and the optimal path in path stretch. [ABSTRACT FROM AUTHOR]