Assigning a loopback interface to a VRF

Do the following to assign a loopback interface to a nondefault VRF.

About this task

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.

Procedure

  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enter the interface loopback command to specify a loopback interface and enter interface loopback configuration mode.
    device(config)# interface loopback 1
    device(config-Loopback-1)#
    
  3. Use the vrf forwarding command to assign the interface to the VRF "customer-1" in this example.
    device(config-Loopback-1)# vrf forwarding customer-1
  4. Assign an IPv4 address and mask to the loopback interface.
    device(config-Loopback-1)# ip address 10.0.0.1/32