[c-nsp] csr1000v -ports not in order
James Bensley
jwbensley at gmail.com
Fri Jun 1 17:11:16 EDT 2018
On 1 June 2018 21:35:22 BST, "Matúš Staudt" <matus.staudt at digmia.com> wrote:
>Hi Adam,
>
>the ID seems to be the MAC address.
>
>In our experience, at first boot the VM brings up the interfaces in the
>order they are in the XML file.
>
>After that it remembers the MAC-IFName binding - which can create
>"gaps" in your interface name order if you delete a port, then add
>another (as it will get a new random MAC from the hypervisor).
>
>Our IF definition looks like this:
>
><interface type='bridge'>
> <mac address='52:54:00:4f:a1:ed'/>
> <source bridge='br02'/>
> <model type='virtio'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
>function='0x0'/>
></interface>
>
>Even when I shuffle them around, the IFs in the VM are correct after a
>reboot.
>
>Hope this helps.
>Matus
This is what we do to. Generate the XML from a Jinja2 template, put the MAC address in there and then the interfaces seem to "stick". The example above is for a Linux bridge. This works for us (as in sticky) as well as SR-IOV.
Cheers,
James.
More information about the cisco-nsp
mailing list