Configure a custom VRF in IOS XR and verify that it is automatically synchronized to the Linux kernel as a network namespace, enabling Linux applications to operate within isolated VRF contexts.
Use this procedure to configure IOS XR VRFs so that corresponding Linux network namespaces are created automatically. This capability isolates Linux applications or processes into specific VRFs, such as an out-of-band management VRF, and allows those applications to open sockets and send or receive traffic only on interfaces in that VRF.
VRFs configured in IOS XR are automatically synchronized to the Linux kernel as network namespaces (netns). Each globally configured VRF creates a Linux network namespace with the prefix vrf added to the VRF name. The default VRF in IOS XR is named default and appears in Linux as vrf-default.
Procedure
The VRF blue is created as a Linux network namespace vrf-blue, the IOS XR interface is visible in that namespace, and Linux processes can be isolated to this VRF context.