Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Configure virtual loopback interfaces

Want to summarize with AI?

Log in

This topic describes how to configure a basic virtual loopback interface on the Cisco 8000 Series Router.


Use this procedure to configure a basic virtual loopback interface to serve as an always-up endpoint for routing protocol sessions or as a target for ping-based reachability verification.

Procedure

1.

Enter global configuration mode using the configure command.

Example:

Router# configure
2.

Enter interface configuration mode and name the new loopback interface.

Example:

Router(config)# interface Loopback 3
3.

Assign an IP address and subnet mask to the virtual loopback interface.

Example:

Router(config-if)# ipv4 address 172.18.189.38/32
4.

Save the configuration changes using the end or commit command.

Example:

Router(config-if)# end

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before exiting(yes/no/cancel)?
[cancel]:
  • Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

  • Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

  • Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

  • Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

5.

(Optional) Display the configuration of the loopback interface.

Example:

Router# show interfaces Loopback 3
6.

Use the show interfaces Loopback command to verify the configuration.

Example:

Router# configure
Router(config)# interface Loopback 3
Router(config-if)# ipv4 address 172.18.189.38/32
Router(config-if)# end
Uncommitted changes found, commit them? [yes]: yes
Router# show interfaces Loopback 3

Loopback3 is up, line protocol is up
 Hardware is Loopback interface(s)
 Internet address is 172.18.189.38/32
 MTU 1514 bytes, BW Unknown
   reliability 0/255, txload Unknown, rxload Unknown
 Encapsulation Loopback, loopback not set
 Last clearing of "show interface" counters never
 5 minute input rate 0 bits/sec, 0 packets/sec
 5 minute output rate 0 bits/sec, 0 packets/sec
   0 packets input, 0 bytes, 0 total input drops
   0 drops for unrecognized upper-level protocol
   Received 0 broadcast packets, 0 multicast packets
   0 packets output, 0 bytes, 0 total output drops
   Output 0 broadcast packets, 0 multicast packets

Guidelines and restrictions for configuring virtual loopback interfaces

Observe the following restrictions when you configure a virtual loopback interface:

  • The IP address of a loopback interface must be unique across all routers on the network.

  • That IP address must not be used by another interface on the router.

  • The IP address must not be used by an interface on any other router on the network.