set l3-interface loopback address


The set l3-interface loopback address command creates a loopback interface and configures its IP address.


Command Syntax

set l3-interface loopback <loopback-name> address <ip-address> prefix-length <int>


Parameters

Parameter

Description

loopback <loopback-name>

Specifies a loopback interface. The value is a string.

address <ip-address>

Specifies the IP address of a loopback interface.

  • Ipv4 default value: 127.0.0.1
  • Ipv6 default value: ::1
prefix-length <int>

The IPv4 network prefix length is fixed to 32.

The IPv6 network prefix length is fixed to 128.


Usage Guidelines

A loopback interface is always Up.

The IP address of a loopback interface is usually specified as the source address of packets.

After a loopback interface is created, you can use command set l3-interface loopback vrf to bind the loopback interface to a VRF. Users can configure multiple loopback interfaces per VRF. A loopback interface is in the default VRF by default.

You can also use command set l3-interface loopback disable to disable a loopback interface. When a loopback interface is created, it is enabled by default.

Note that lo is a built-in loopback interface in default VRF, it cannot be bound to any other user-defined VRF, or be disabled.


Example

  • Create a loopback interface lo-gre in the default VRF.
admin@Xorplus# set l3-interface loopback lo-gre address 1.1.1.1 prefix-length 32
admin@Xorplus# commit

Copyright © 2024 Pica8 Inc. All Rights Reserved.