When users access the Internet, if packets are forwarded based on IP, core devices between the users and the Internet are forced to learn a large number of Internet routes. This puts huge strain on the core devices and negatively impacts their performance. A solution is to configure public BGP route recursion to SRv6 BE on the user access device. This enables packets to be forwarded over SRv6 BE when users access the Internet, preventing problems induced by insufficient performance, heavy load, and service processing on core devices.
To implement public BGP IPv4 route recursion to SRv6 BE, perform the following operations. The network shown in Figure 1 is used as an example.
Deploy an IGP and SRv6 on DeviceB, DeviceC, and DeviceD to set up an SRv6 BE path.
Establish a BGP IPv6 peer relationship between DeviceB and DeviceD for them to learn the SRv6 SID carried in the peer IPv4 route.
Configure BGP service route recursion to SRv6 BE on DeviceB.
The following uses the network shown in Figure 1 as an example to describe how DeviceE-to-DeviceA route advertisement and DeviceA-to-DeviceE data forwarding are implemented to achieve public BGP IPv4 route recursion to SRv6 BE.
In the route advertisement phase:
In the data forwarding phase:
DeviceA sends a common IPv4 packet to DeviceB.
After receiving the IPv4 packet, DeviceB searches the routing table of the public network instance for a prefix entry that matches the destination IPv4 address of the packet. After finding associated End.DT4 SID and next hop information, DeviceB encapsulates the packet into an IPv6 packet using the End.DT4 SID 2001:DB8:A2:1::B100 as the destination address.
DeviceB finds the route 2001:DB8:A2:1::/64 based on the longest match rule and forwards the packet to DeviceC over the shortest path.
Likewise, DeviceC finds the route 2001:DB8:A2:1::/64 based on the longest match rule and forwards the packet to DeviceD over the shortest path.
DeviceD searches the local SID table for an End.DT4 SID that matches 2001:DB8:A2:1::B100. According to the instruction specified by the SID, DeviceD removes the IPv6 packet header and searches the IPv4 routing table of the public network instance based on the End.DT4 SID for packet forwarding. At this time, the packet is restored to a common IPv4 packet.
In the scenario shown in Figure 2, DeviceD can be configured to allocate SIDs according to the next hops of the IPv4 unicast routes received from public IPv4 peers. Thus, after receiving the IPv4 routes advertised by DeviceE and DeviceF, DeviceD allocates End.DX4 SIDs according to the next hops of the routes. During traffic forwarding, DeviceD searches the local SID table for an End.DX4 SID that matches 2001:DB8:A2:1::B100. According to the instruction specified by the SID, DeviceD removes the IPv6 packet header and then forwards the decapsulated IPv4 packet through the Layer 3 interface bound to the SID.
To implement public BGP IPv6 route recursion to SRv6 BE, perform the following operations. The network shown in Figure 3 is used as an example.
Deploy an IGP and SRv6 on DeviceB, DeviceC, and DeviceD to set up an SRv6 BE path.
Establish a BGP IPv6 peer relationship between DeviceB and DeviceD for them to learn the SRv6 SID carried in the peer IPv6 route.
Configure BGP route recursion to SRv6 BE on DeviceB.
The following uses the network shown in Figure 3 as an example to describe how DeviceE-to-DeviceA route advertisement and DeviceA-to-DeviceE data forwarding are implemented to achieve public BGP IPv6 route recursion to SRv6 BE.
In the route advertisement phase:
In the data forwarding phase:
DeviceA sends a common IPv6 packet to DeviceB.
After receiving the IPv6 packet, DeviceB searches the routing table of the public network instance for a prefix entry that matches the destination IPv6 address of the packet. After finding associated End.DT6 SID and next hop information, DeviceB encapsulates the packet into an IPv6 packet using the End.DT6 SID 2001:DB8:A2:1::D100 as the destination address.
DeviceB finds the route 2001:DB8:A2:1::/64 based on the longest match rule and forwards the packet to DeviceC over the shortest path.
Likewise, DeviceC finds the route 2001:DB8:A2:1::/64 based on the longest match rule and forwards the packet to DeviceD over the shortest path.
DeviceD searches the local SID table for an End.DT6 SID that matches 2001:DB8:A2:1::D100. According to the instruction specified by the SID, DeviceD removes the IPv6 packet header and searches the IPv6 routing table of the public network instance based on the End.DT6 SID for packet forwarding. At this time, the packet is restored to a common IPv6 packet.