The color network-slice command configures a mapping between a network slice instance and a color.
The undo color network-slice command cancels the mapping between a network slice instance and a color.
By default, the mapping between network slice instances and colors is not configured.
Usage Scenario
The device generates the mapping between the color and the forwarding plane color and the mapping between the forwarding plane color and the network slice based on the mapping between the color and the network slice.
The Color extended community attribute is added to VPN routes based on an import or export policy. The device generates the mapping between routes and the color of the forwarding plane based on the mapping between the color and the color of the forwarding plane, adds the color of the forwarding plane to the prefix, and delivers the prefix to the forwarding module. The forwarding plane obtains network slices based on the color of the forwarding plane. When receiving a private network data packet, the forwarding plane adds a Hop-by-Hop extension header to the packet based on the private network prefix, searches for the locator route based on the VPN SID, obtains the outbound interface of the route, and searches for the sub-interface corresponding to the network slice on the outbound interface, then, the packets are forwarded through the sub-interface.