Configuring a static ethernet address

You can configure IPv4 and IPv6 static Ethernet network interface addresses in environments where the DHCP service is not available.

Before you begin

Before you configure a static address, connect to the device through the serial console.

About this task

To configure static Ethernet network interface addresses, perform the following steps:

Procedure

  1. In privileged EXEC mode, enter global configuration mode.
    device# configure terminal
  2. Access the interface management mode for the management interface.
    device(config)# interface Management 1
    This interface uses the default mgmt-vrf VRF.
  3. Disable DHCP.
    device(config-Management-0)# no ip address dhcp
  4. Configure the IP address for the management interface.
    device(config-Management-0)# ip address 10.24.85.81/20
  5. If you are going to use an IPv6 address, configure the address.
    device(config-Management-0)# ipv6 address 2001:DB8::69bc:832:e61f:13ff:fe67:4b94/32
  6. Verify the configuration.
    device(config-Management-0)# do show running-config interface Management 0
    interface Management 0
     no ip address dhcp
     ip address 10.24.85.81/20
     ipv6 address 2001:DB8::69bc:832:e61f:13ff:fe67:4b94/32
    !

Example

The following example is the configuration of the previous steps.

device# configure terminal
device(config)# interface Management 0
device(config-Management-0)# no ip address dhcp
device(config-Management-0)# ip address 10.24.85.81/20
device(config-Management-0)# ipv6 address 2001:DB8::69bc:832:e61f:13ff:fe67:4b94/32