Network OS Administration Guide

Supporting Network OS 6.0.1a

Part Number: 53-1003768-04

Configuring IPv4 and IPv6 addresses with DHCP

By default, DHCP is disabled. You must explicitly enable the service. Use the ip address dhcp command to enable DHCP for IPv4 addresses, and the ipv6 address dhcp command to enable DHCP for IPv6 addresses. The Network OS DHCP clients support the following parameters:

  • External Ethernet port IP addresses and prefix length
  • Default gateway IP address
NOTE
When you connect the DHCP-enabled switch to the network and power on the switch, the switch automatically obtains the Ethernet IP address, prefix length, and default gateway address from the DHCP server. The DHCP client can only connect to a DHCP server on the same subnet as the switch. Do not enable DHCP if the DHCP server is not on the same subnet as the switch.

The following example enables DHCP for IPv4 addresses.

switch(config)# interface management 1/1
switch(config-Management-1/1)# ip address dhcp

The following example enables DHCP for IPv6 addresses.

switch(config)# interface management 1/1
switch(config-Management-1/1)# ipv6 address dhcp

The show running-config interface management command indicates whether DHCP is enabled. The following example shows a switch with DHCP enabled for IPv4 addresses.

switch# show running-config interface management
interface Management 2/0
ip address dhcp
ip route 0.0.0.0/0 10.24.80.1
ip address 10.24.73.170/20
no ipv6 address autoconfig
NOTE
Enabling DHCP removes all configured static IP addresses.
NOTE
Refer to the Network OS Layer 3 Routing Configuration Guide for more information on configuring IP DHCP relay.