Adding a loopback interface

NOTE:

This task is not supported by Switch 2530 (J9772A–J9783A) products.

Adding a loopback interface

To add a loopback interface on the switch:

Prerequisites

Before you use the CLI to add a loopback interface, you must be at the global configuration level.

Procedure
  1. Use the interface loopback <number> command to create the loopback interface. The number argument is a value from 1 to 7.
  2. Use the ip address <ip address> command to configure an IP address for the loopback interface.
  3. You can configure up to 32 IP addresses on a loopback interface. You do not need to specify a network mask. A loopback interface uses the default subnet mask 255.255.255.255.

Examples

Figure 49: A loopback interface configured with one IP address

switch(config)# interface loopback 1
switch(config)# ip address 10.1.1.1
Figure 50: Loopback interfaces configured with multiple IP addresses. This example shows the addition of two loopback interfaces, each with two IP addresses configured.

switch(config)# interface loopback 0
switch(lo0)# ip address 172.16.101.8
switch(lo0)# ip address 172.16.101.9
switch(lo0)# exit
switch(config)# interface loopback 1
switch(lol)# ip address 172.16.102.1
switch(lol)# ip address 172.16.102.2