CPC H04L 45/02 (2013.01) [H04L 45/20 (2013.01); H04L 45/74 (2013.01); H04L 2212/00 (2013.01)] | 20 Claims |
1. A method, comprising:
receiving, by a first network device, an advertisement that includes a prefix for a second network device,
wherein the advertisement is destined for a third network device;
determining, by the first network device and based on a network topology, whether a next hop is one hop away or multiple hops away;
selectively:
modifying, by the first network device, the advertisement to include a first segment identifier, based on the next hop being one hop away and to generate a first modified advertisement; or
modifying, by the first network device, the advertisement to include a second segment identifier, based on the next hop being multiple hops away and to generate a second modified advertisement; and
forwarding, by the first network device, the first modified advertisement or the second modified advertisement toward the third network device;
receiving, by the first network device, a packet transmitted by the third network device and destined for the second network device;
when the packet is associated with the first segment identifier:
updating, by the first network device, a destination address of the packet to include the second segment identifier, and
forwarding, by the first network device, the packet toward the second network device; and
when the packet is associated with the second segment identifier:
updating, by the first network device, a destination address of the packet to include the first segment identifier, and
encapsulating, by the first network device, the packet; and
forwarding, by the first network device, the encapsulated packet toward the second network device.
|