Skip to content

xr-compose - Allow specifying the Linux interface name for management interfaces #57

Description

@jillesca

When xr-compose processes a topology with a macvlan management network, it generates XR_MGMT_INTERFACES using an internal network counter (e.g. linux:xr-n120).

Docker names macvlan interfaces inside the container eth0, not xr-n<N>. The generated output is therefore incorrect for macvlan-based management networks and XRd boots up with the management interface mapped to a non-existant container interface.

Current output (8-node SR topology)

XR_MGMT_INTERFACES: linux:xr-n120,xr_name=Mg0/RP0/CPU0/0,chksum,snoop_v4,snoop_v4_default_route

Required value

XR_MGMT_INTERFACES: linux:eth0,xr_name=Mg0/RP0/CPU0/0,chksum,snoop_v4,snoop_v4_default_route

Request

Add a way to specify the Linux interface name for management interfaces, either:

  1. In the .xr.yml — e.g. a linux_name field on the mgmt interface entry:
xr_interfaces:
  - Mg0/RP0/CPU0/0:
      snoop_v4: True
      snoop_v4_default_route: True
      linux_name: eth0
  1. As a CLI flag — e.g. --mgmt-linux-interface eth0, applied globally to all XR_MGMT_INTERFACES entries.

Workaround in use today

I currently post-process the generated file with a script that targets only XR_MGMT_INTERFACES lines and replaces linux:xr-n[0-9]+ with linux:eth0 - https://github.com/CiscoDevNet/XRd-Sandbox/blob/main/scripts/lib/fix-mgmt-interface.sh

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions