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
| 1. | Identify the current network namespace or VRF. Example:
|
|
| 2. | Configure a custom VRF named Example:
|
|
| 3. | Verify that VRF Example:
|
|
| 4. | Verify that VRF Example:
|
|
| 5. | Access VRF Example:
Running ifconfig shows only the default |
|
| 6. | Configure interface Example:
|
|
| 7. | Verify that interface Example:
|
|
| 8. | Verify that the interface is configured in VRF Example:
The interface appears in the |
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.