Open Shortest Part First (OSPF) VNI and LTEP distribution

When enabled, this mode distributes the local VTEP IP address along with all configured VNIs using Open Shortest Part First (OSPF) opaque LSAs.

Use the enable-vxlan-extensions command to enable this mode or no enable-vxlan-extensions to disable this mode. You can display all OSPF-remotely learned VNI/VTEP associations using the command show ip ospf database opaque-global.

This facilitates dynamic, rather than static learning of all (VNI, remote VTEP) associations. Each (local VTEP, VNI) association is sent in a separate LSA update. As in the static configuration mode, traditional flooding, learning and ARP resolution populates the MAC and ARP databases, and ARP proxy is enabled.

It is recommended that you use only one LTEP (local VTEP) per VRF (including the global). If you do configure more than one LTEP, the first one in the interface list is advertised, any other would not be. If more than one local VTEP is configured on the switch, the determination of which local VTEP to pair a VNI with is made as follows.

  1. If a VNI is mapped to a VLAN that has a router interface, and there is a VTEP in the same VRF as that VLAN interface, then the VNI is advertised with that local VTEP's IP address.
  2. After step 1 is complete for all VLAN router interfaces mapped to VNIs, the remaining VNIs mapped to VLANs, are all advertised with the local VTEP IP address created in the global VRF.
  3. If more than one VXLAN tunnel is configured in the same VRF, then only one, usually the first, local VTEP IP is associated with the VNIs.

Example

If there are three VRFs, each with a routed VLAN and a local VTEP in the switch:

GLOBAL
  • Local VTEP 10.10.10.1
  • VLAN 10
VRF1
  • Local VTEP 11.11.11.1
  • VLAN 20
VRF2
  • Local VTEP 12.12.12.1
  • VLAN 30

and there are two switched VLANS 100 and 101.

The VLAN to VNI mapping occurs as follows:
  • VLAN 10 = VNI 10010
  • VLAN 20 = VNI 10020
  • VLAN 30 = VNI 10030
  • VLAN 100 = VNI 10100
  • VLAN 100 = VNI 10101

By first rule above, VNIs 10010, 10020, 10030 are advertised with LVTEPs 10.10.10.1, 11.11.11.1, 12.12.12.1, respectively. By the second rule above, VNIs 10100, 10101 are advertised with LVTEPs 10.10.10.1.