Assigning a Loopback Interface to a VRF

Because a loopback interface is always available as long as the device is available, it allows routing protocol sessions to stay up even if the outbound interface is down. Assigning a loopback interface to a VRF is similar to assigning any interface. A loopback interface that is not assigned to a nondefault VRF belongs to the default VRF.
  1. Enter global configuration mode.
    device# configure terminal
    
  2. In global configuration mode, enter interface subtype configuration mode and assign a loopback interface.
    device(config)# interface loopback 1
    
  3. Use the vrf forwarding command to assign the interface to the VRF "customer-1" in this example.
    device(config-lbif-1)# vrf forwarding customer-1
  4. Assign an IPv4 address and mask to the loopback interface.
    device(config-lbif-1)# ip address 10.0.0.1/24