JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun Ethernet Fabric Operating System

DHCP Administration Guide

search filter icon
search icon

Document Information

Using This Documentation

Product Notes

Related Documentation

Acronyms and Abbreviations

CLI Command Modes

Feedback

Support and Accessibility

Protocol Description

DHCP Server

DHCP Client

DHCP Relay Agent

Configuring DHCP

Two-Switch Configuration

Multiple-Switch Configuration

Configuration Guidelines

Default Configurations

Enabling and Disabling the DHCP Server

Enable the DHCP Server

Disable the DHCP Server

Enable ICMP Echo

Specify the Amount of Time After Which an IP Address Is Made Available

Configure the Next Server

Configure the Boot File Name

Configuring DHCP Global Options

Configure DHCP Global Options

Delete DHCP Global Options

Configuring Address Pools

Configure DHCP Address Pools

Configure the End IP for the Address Pool

Configure the Lease Time

Configure the Utilization Threshold

Create an Excluded Address in the Pool

Configuring Pool-Specific Options

Configure a Domain Name Option

Configure the DNS Option

Configure the NetBIOS Name Server

Configure the NetBIOS Node Type

Configure the Default Router

Remove a Configured Default Router Subnet Option

Configure Options Specific to Address Pools

Configure Host-Specific Options

Enabling and Disabling Debug Traces for the DHCP Server

Enable Debug Traces for the DHCP Server

Disable Debug Traces for the DHCP Server

Configuring an Interface to Acquire or Use an IP Address

Configure an Interface to Acquire a Dynamic IP Address

Delete a Binding Entry From the Server

Configure an Interface to Use a Manual IP Address

Enable DHCP Relay

Configure a DHCP Server Address

Configuring Relay Agent Options

Enable the Relay Agent Information

Configure Relay Agent Suboptions

Enable Traces for the DHCP Relay Agent

Acquire an IP Address From a Server Residing Outside the Client Network

Configure an Interface to Acquire a Dynamic IP Address

In this example, switch 1 is the DHCP server, and switch 2 is the DHCP client. vlan1 of switch 2 must be allocated with a dynamic IP. In addition, the address pool is pool 1, the network address is 12.0.0.0, and the mask option is 255.255.0.0.

  1. Enable the DHCP server in switch 1.
    SEFOS# configure terminal
    SEFOS(config)# service dhcp-server
  2. Create the address pool.
    SEFOS(config)# ip dhcp pool 1
  3. Configure the network and mask.
    SEFOS(dhcp-config)# network 12.0.0.0 255.0.0.0
    SEFOS(dhcp-config)# end
  4. View the configuration.
    SEFOS# show ip dhcp server pools
    Pool Id                             : 1
    -------------------------------------------
    Subnet                               : 12.0.0.0
    Subnet Mask                          : 255.0.0.0
    Lease time                          : 3600 secs
    Utilization threshold               : 75%
    Start Ip                            : 12.0.0.1
    End Ip                              : 12.255.255.255
     
    Subnet Options
    --------------
    Code        :    1, Value      : 255.255.0.0
  5. View additional configuration details.

    Note that DHCP does not cross the subnet.

    SEFOS# show ip dhcp server information
     
    DHCP server status                  : Enable
    Send Ping Packets                   : Disable
    Debug level                         : None
    Server Address Reuse Timeout        : 5 secs
    Next Server Address                 : 0.0.0.0
    Boot file name                      : NULL
  6. Instead of using port 1 as shown in the topologies presented in this guide, use port 41 of both switches as follows. The DHCP server must be enabled and there must be a pool available in the server for the client's subnet.
    1. Connect a cable between port 41 of switch 1 and 2.
    2. Activate interface 41.
      SEFOS# configure terminal
      SEFOS(config)# interface ex 0/41
      SEFOS(config-if)# no shutdown
      SEFOS(config-if)# exit
    3. Define a VLAN using port 41.
      SEFOS(config)# vlan 41
      SEFOS(config-vlan)# port ex 0/41
      SEFOS(config-vlan)# exit
    4. Assign IP 12.0.0.1 to vlan 41.
      SEFOS(config)# interface vlan 41
      SEFOS(config-if)# no shutdown
      SEFOS(config-if)# ip address 12.0.0.1 255.255.255.0
      SEFOS(config-if)# end
      SEFOS# 
  7. Execute the following commands in switch 2 to acquire a dynamic IP for vlan1 (note that DHCP does not cross the subnet).
    1. Activate interface 41.
      SEFOS# configure terminal
      SEFOS(config)# interface ex 0/41
      SEFOS(config-if)# no shutdown
      SEFOS(config-if)# exit
    2. Create the same VLAN.
      SEFOS(config)# vlan 41
      SEFOS(config-vlan)# port ex 0/41
      SEFOS(config-vlan)# exit
    3. Change the IP allocation mode to dynamic.
      SEFOS(config)# interface vlan 41
      SEFOS(config-if)# no shutdown
      SEFOS(config-if)# ip address dhcp
      SEFOS(config-if)# end
      SEFOS#
    4. Wait for the protocol operation to complete (approximately 20 seconds).
    5. View the dynamic IP allocated to the client in switch 2.
      SEFOS# show ip interface

      The output in the switch 2 is:

      vlan41 is up, line protocol is up
      Internet Address is 12.0.0.2/8
      Broadcast Address  12.255.255.255
      IP address allocation method is dynamic
      IP address allocation protocol is dhcp
    6. View the DHCP server binding table to observe the allocated IP addresses in switch 1.
      SEFOS# show ip dhcp server binding
       
      Ip          Hw                Hw               Binding       Expire
      Address     Type            Address            State         Time
      ---------   -------    ---------------        ----------    ----------
      12.0.0.2    Ethernet    00:02:02:03:04:01      Assigned       Jan 7  11:22:37 2007
    7. View the DHCP packets statistics in switch 1.
      SEFOS# show ip dhcp server statistics
       
      Address pools : 1
       
      Message             Received
      -------             --------
      DHCPDISCOVER         1
      DHCPREQUEST          1
      DHCPDECLINE          0
      DHCPRELEASE          0
      DHCPINFORM           0
       
      Message              Sent
      -------              ----
      DHCPOFFER            1
      DHCPACK              1
      DHCPNAK              0