50
Sun Ethernet Fabric Operating System DHCP Administration Guide Part No.: E21716-02 July 2012

DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

  • Upload
    others

  • View
    36

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Sun Ethernet Fabric Operating System

DHCP Administration Guide

Part No.: E21716-02July 2012

Page 2: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Copyright © 2010, 2012, Oracle and/or its affiliates. All rights reserved.This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected byintellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate,broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering,disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to usin writing.If this is software or related software documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, thefollowing notice is applicable:U.S. GOVERNMENT END USERS. Oracle programs, including any operating system, integrated software, any programs installed on the hardware,and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal AcquisitionRegulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, includingany operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and licenserestrictions applicable to the programs. No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in anyinherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerousapplications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. OracleCorporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks orregistered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks ofAdvanced Micro Devices. UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information on content, products, and services from third parties. OracleCorporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, andservices. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-partycontent, products, or services.

Copyright © 2010, 2012, Oracle et/ou ses affiliés. Tous droits réservés.Ce logiciel et la documentation qui l’accompagne sont protégés par les lois sur la propriété intellectuelle. Ils sont concédés sous licence et soumis à desrestrictions d’utilisation et de divulgation. Sauf disposition de votre contrat de licence ou de la loi, vous ne pouvez pas copier, reproduire, traduire,diffuser, modifier, breveter, transmettre, distribuer, exposer, exécuter, publier ou afficher le logiciel, même partiellement, sous quelque forme et parquelque procédé que ce soit. Par ailleurs, il est interdit de procéder à toute ingénierie inverse du logiciel, de le désassembler ou de le décompiler, excepté àdes fins d’interopérabilité avec des logiciels tiers ou tel que prescrit par la loi.Les informations fournies dans ce document sont susceptibles de modification sans préavis. Par ailleurs, Oracle Corporation ne garantit pas qu’ellessoient exemptes d’erreurs et vous invite, le cas échéant, à lui en faire part par écrit.Si ce logiciel, ou la documentation qui l’accompagne, est concédé sous licence au Gouvernement des Etats-Unis, ou à toute entité qui délivre la licence dece logiciel ou l’utilise pour le compte du Gouvernement des Etats-Unis, la notice suivante s’applique :U.S. GOVERNMENT END USERS. Oracle programs, including any operating system, integrated software, any programs installed on the hardware,and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal AcquisitionRegulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, includingany operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and licenserestrictions applicable to the programs. No other rights are granted to the U.S. Government.Ce logiciel ou matériel a été développé pour un usage général dans le cadre d’applications de gestion des informations. Ce logiciel ou matériel n’est pasconçu ni n’est destiné à être utilisé dans des applications à risque, notamment dans des applications pouvant causer des dommages corporels. Si vousutilisez ce logiciel ou matériel dans le cadre d’applications dangereuses, il est de votre responsabilité de prendre toutes les mesures de secours, desauvegarde, de redondance et autres mesures nécessaires à son utilisation dans des conditions optimales de sécurité. Oracle Corporation et ses affiliésdéclinent toute responsabilité quant aux dommages causés par l’utilisation de ce logiciel ou matériel pour ce type d’applications.Oracle et Java sont des marques déposées d’Oracle Corporation et/ou de ses affiliés.Tout autre nom mentionné peut correspondre à des marquesappartenant à d’autres propriétaires qu’Oracle.Intel et Intel Xeon sont des marques ou des marques déposées d’Intel Corporation. Toutes les marques SPARC sont utilisées sous licence et sont desmarques ou des marques déposées de SPARC International, Inc. AMD, Opteron, le logo AMD et le logo AMD Opteron sont des marques ou des marquesdéposées d’Advanced Micro Devices. UNIX est une marque déposée d’The Open Group.Ce logiciel ou matériel et la documentation qui l’accompagne peuvent fournir des informations ou des liens donnant accès à des contenus, des produits etdes services émanant de tiers. Oracle Corporation et ses affiliés déclinent toute responsabilité ou garantie expresse quant aux contenus, produits ouservices émanant de tiers. En aucun cas, Oracle Corporation et ses affiliés ne sauraient être tenus pour responsables des pertes subies, des coûtsoccasionnés ou des dommages causés par l’accès à des contenus, produits ou services tiers, ou à leur utilisation.

PleaseRecycle

Page 3: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Contents

Using This Documentation 1

Product Notes 1

Related Documentation 2

Acronyms and Abbreviations 2

CLI Command Modes 3

Feedback 3

Support and Accessibility 4

Protocol Description 5

DHCP Server 5

DHCP Client 5

DHCP Relay Agent 6

Configuring DHCP 7

Two-Switch Configuration 8

Multiple-Switch Configuration 8

Configuration Guidelines 8

DHCP Client 9

DHCP Relay Agent 9

DHCP Server 9

Default Configurations 9

Enabling and Disabling the DHCP Server 10

▼ Enable the DHCP Server 10

iii

Page 4: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Disable the DHCP Server 11

▼ Enable ICMP Echo 11

▼ Specify the Amount of Time After Which an IP Address Is MadeAvailable 12

▼ Configure the Next Server 13

▼ Configure the Boot File Name 13

Configuring DHCP Global Options 14

▼ Configure DHCP Global Options 14

▼ Delete DHCP Global Options 15

Configuring Address Pools 15

▼ Configure DHCP Address Pools 15

▼ Configure the End IP for the Address Pool 16

▼ Configure the Lease Time 17

▼ Configure the Utilization Threshold 18

▼ Create an Excluded Address in the Pool 18

Configuring Pool-Specific Options 19

▼ Configure a Domain Name Option 20

▼ Configure the DNS Option 21

▼ Configure the NetBIOS Name Server 22

▼ Configure the NetBIOS Node Type 23

▼ Configure the Default Router 24

▼ Remove a Configured Default Router Subnet Option 25

▼ Configure Options Specific to Address Pools 26

▼ Configure Host-Specific Options 27

Enabling and Disabling Debug Traces for the DHCP Server 28

▼ Enable Debug Traces for the DHCP Server 28

▼ Disable Debug Traces for the DHCP Server 28

Configuring an Interface to Acquire or Use an IP Address 29

▼ Configure an Interface to Acquire a Dynamic IP Address 29

iv Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 5: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Delete a Binding Entry From the Server 33

▼ Configure an Interface to Use a Manual IP Address 33

▼ Enable DHCP Relay 34

▼ Configure a DHCP Server Address 35

Configuring Relay Agent Options 36

▼ Enable the Relay Agent Information 36

▼ Configure Relay Agent Suboptions 37

▼ Enable Traces for the DHCP Relay Agent 38

▼ Acquire an IP Address From a Server Residing Outside the ClientNetwork 39

Contents v

Page 6: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

vi Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 7: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Using This Documentation

SEFOS DHCP is a portable implementation of the dynamic host configurationprotocol specification provided in RFC 2131. The product design supports portabilityon a wide range of routers and gateways, from monolithic to distributed-sharedmemory or message passing architectures. This document describes the basic andadvanced configuration tasks of SEFOS DHCP.

■ “Product Notes” on page 1

■ “Related Documentation” on page 2

■ “Acronyms and Abbreviations” on page 2

■ “CLI Command Modes” on page 3

■ “Feedback” on page 3

■ “Support and Accessibility” on page 4

Product NotesFor late-breaking information and known issues about the following products, referto the product notes at:

Sun Network 10GbE Switch 72p:

http://www.oracle.com/pls/topic/lookup?ctx=SN-10GbE-72p

1

Page 8: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Related Documentation

For detailed information about the commands and options described in thisdocument, refer to the Sun Ethernet Fabric Operating System CLI Base Reference Manual.

Acronyms and Abbreviations

Documentation Links

All Oracle products http://oracle.com/documentation

Sun Blade 6000Ethernet SwitchedNEM 24p 10GbE

http://www.oracle.com/pls/topic/lookup?ctx=SB6K-24p-10GbE

Sun Network 10GbESwitch 72p

http://www.oracle.com/pls/topic/lookup?ctx=SN-10GbE-72p

Sun Blade 6000modular system

http://www.oracle.com/pls/topic/lookup?ctx=sb6000

Oracle IntegratedLights Out Manager(Oracle ILOM) 3.0

http://www.oracle.com/pls/topic/lookup?ctx=ilom30

Acronym or Abbreviation Explanation

CLI Command-line interface

DHCP Dynamic Host Configuration Protocol

DNS Domain name system

ICMP Internet Control Message Protocol

IP Internet Protocol

2 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 9: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

CLI Command ModesThe following table lists the configuration modes used in this document with theiraccess and exit methods.

FeedbackProvide feedback on this documentation at:

http://www.oracle.com/goto/docfeedback

Command Mode Access Method Prompt Exit Method

User EXEC Access SEFOS from Oracle ILOMwith read-only rights (privilegelevel 1).

SEFOS> Use the logout or exitcommand to return to theOracle ILOM prompt.

PrivilegedEXEC

Access SEFOS from Oracle ILOMwith full administrative rights(privilege level 15).

SEFOS# Use the logout or exitcommand to return to theOracle ILOM prompt.

GlobalConfiguration

From User EXEC mode, use theenable command.

SEFOS(config)# Use the end command toreturn to PrivilegedEXEC mode.

InterfaceConfiguration

From Global Configurationmode, use the interfaceinterface-typeinterface-id command.

SEFOS(config-if)# Use the exit commandto return to GlobalConfiguration mode, oruse the end command toreturn to PrivilegedEXEC mode.

DHCPconfiguration

From Global Configurationmode, use the dhcp poolinteger command (whereinteger can be any number,1-2147483647) to create a DHCPserver address pool and enterDHCP pool configuration mode.

SEFOS(dhcp-config)# Use the exit commandto return to GlobalConfiguration mode, oruse the end command toreturn to PrivilegedEXEC mode.

Using This Documentation 3

Page 10: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Support and Accessibility

Description Links

Access electronic supportthrough My Oracle Support

http://support.oracle.com

For hearing impaired:http://www.oracle.com/accessibility/support.html

Learn about Oracle’scommitment to accessibility

http://www.oracle.com/us/corporate/accessibility/index.html

4 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 11: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Protocol Description

DHCP enables dynamic configuration of a host computer. When a DHCP client isturned on, it issues a broadcast message to any DHCP server that is on the network.An exchange takes place during which the DHCP server assigns an IP address to theclient and informs the client of certain key network configuration parameters.

The SEFOS DHCP implementation complies with RFC 2131.

■ “DHCP Server” on page 5

■ “DHCP Client” on page 5

■ “DHCP Relay Agent” on page 6

DHCP ServerThe DHCP server maintains a configured set of IP address pools from which IPaddresses are allocated to DHCP clients in the same subnet, whenever they requestthe server dynamically. Once the IP address is allocated, the server reserves this IPuntil the lease time for that IP expires. If the client does not renew the IP before thelease time expires, the IP will be returned to the free pool and will be offered to newclients.

DHCP ClientThe DHCP client is the host that requests IP address for its interface. The client alsoconfigures the parameters, such as default router, DNS, subnet mask, and so on,offered by the server. See “Configuration Guidelines” on page 8. Note that the SunNetwork 10GbE Switch 72p cannot function as a DHCP client at the time of thisrelease.

5

Page 12: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

DHCP Relay AgentThe DHCP relay agent is used to forward the DHCP packets between client andserver when they are not in the same subnets. The relay receives packets from theclient and inserts certain information, such as the network in which the packet isreceived, and then forwards it to the server. The server identifies the client’s networkfrom this information and allocates the IP accordingly, then sends the reply to therelay. The relay then strips the information inserted and broadcasts the packets intothe client’s network. See “Configuration Guidelines” on page 8.

6 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 13: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Configuring DHCP

This section provides examples of DHCP configurations that have multiple switches.

■ “Two-Switch Configuration” on page 8

■ “Multiple-Switch Configuration” on page 8

■ “Configuration Guidelines” on page 8

■ “Default Configurations” on page 9

■ “Enabling and Disabling the DHCP Server” on page 10

■ “Enable ICMP Echo” on page 11

■ “Specify the Amount of Time After Which an IP Address Is Made Available” onpage 12

■ “Configure the Next Server” on page 13

■ “Configure the Boot File Name” on page 13

■ “Configuring DHCP Global Options” on page 14

■ “Configuring Address Pools” on page 15

■ “Configuring Pool-Specific Options” on page 19

■ “Configure Host-Specific Options” on page 27

■ “Enabling and Disabling Debug Traces for the DHCP Server” on page 28

■ “Configuring an Interface to Acquire or Use an IP Address” on page 29

■ “Enable DHCP Relay” on page 34

■ “Configure a DHCP Server Address” on page 35

■ “Configuring Relay Agent Options” on page 36

■ “Acquire an IP Address From a Server Residing Outside the Client Network” onpage 39

7

Page 14: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Two-Switch ConfigurationThis figure shows the topology for a two-switch configuration. In this example,switch 2 is the DHCP client, except for cases where the Sun Network 10GbE Switch72p is used.

Multiple-Switch ConfigurationThis figure shows the topology for a multiple-switch configuration. In this example,switch 1 is the DHCP server, switch 2 is the DHCP relay, and switch 3 is the DHCPclient, except for cases where the Sun Network 10GbE Switch 72p is used.

Configuration GuidelinesThe guidelines in this section apply to SEFOS DHCP configurations.

Refer to the Sun Ethernet Fabric Operating System CLI Base Reference Manual for thecomplete set of commands and the various options available for configuring DHCP.

8 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 15: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

DHCP ClientThe DHCP server must assign an IP address to the router interface. If it does not, theDHCP renew command fails and displays the following error message:

Interface does not have a DHCP originated address

DHCP Relay AgentThe following requirements must be satisfied for the DHCP relay agent to workproperly:

■ The DHCP server must be disabled before enabling the DHCP relay agent.

■ The relay agent must be enabled in order to become active.

Once the relay agent becomes active, it forwards the packets from the client to aDHCP server. The relay agent also performs any processing related to relay agentinformation options, such as inserting the necessary options while relaying a packetfrom a client to a server, and examining or stripping options when relaying a packetfrom a server to a client.

DHCP ServerThe DHCP server has the following requirement and assumption about pool addressassignment:

■ DHCP relay must be disabled before enabling the DHCP server.

■ The DHCP server assumes that all pool addresses may be assigned to clients.

Default Configurations

Feature Default Setting

DHCP server status Disabled

ICMP echo Disabled

Offer reuse time out 5 seconds

DHCP next server address 0.0.0.0 (none)

Configuring DHCP 9

Page 16: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Enabling and Disabling the DHCP Server■ “Enable the DHCP Server” on page 10

■ “Disable the DHCP Server” on page 11

▼ Enable the DHCP ServerThe DHCP server is disabled by default. Complete the following task to enable theDHCP server.

1. Enable the DHCP server in switch 1.

2. View the DHCP server status.

The output in switch 1 appears as follows:

Boot file name Blank (none)

DHCP server pool lease time 3600 seconds

DHCP server pool utilization threshold 75%

DHCP server debug level None

DHCP relay status Disabled

DHCP relay server address 0.0.0.0 (none)

RAI option Disabled

DHCP relay debug level 0x1

SEFOS# configure terminalSEFOS(config)# service dhcp-serverSEFOS(config)# end

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : DisableDebug level : None

Feature Default Setting

10 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 17: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Disable the DHCP ServerThe DHCP server is disabled by default. To disable it after it has been enabled,complete the following task.

1. Disable the DHCP server.

2. View the DHCP server status.

The output in switch 1 is:

▼ Enable ICMP EchoBefore the server offers a particular IP address to a client, generate an ICMP requestto ensure that the address to be offered is not in use by any host in the network. Inthis example, this is performed in switch 1.

1. Enable an ICMP echo request.

Server Address Reuse Timeout : 5 secsNext Server Address : 0.0.0.0Boot file name :

SEFOS# configure terminalSEFOS(config)# no service dhcp-serverSEFOS(config)# end

SEFOS# show ip dhcp server information

DHCP server status : DisableSend Ping Packets : DisableDebug level : NoneServer Address Reuse Timeout : 5 secsNext Server Address : 0.0.0.0Boot file name :

SEFOS# configure terminalSEFOS(config)# ip dhcp ping packetsSEFOS(config)# end

Configuring DHCP 11

Page 18: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. View the ICMP echo configuration for the DHCP server.

▼ Specify the Amount of Time AfterWhich an IP Address Is MadeAvailableUse the offer-reuse command to specify the maximum timeframe after which anoffered IP address can be returned to the pool of free addresses. This timeframe canbe from 1-120 seconds. In this example, the timeout is set to 10 seconds.

1. Configure the offer-reuse property to time out on switch 1.

2. View the change to the configuration.

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : EnableDebug level : NoneServer Address Reuse Timeout : 5 secsNext Server Address : 0.0.0.0Boot file name :

SEFOS# configure terminalSEFOS(config)# ip dhcp server offer-reuse 10SEFOS(config)# end

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : EnableDebug level : NoneServer Address Reuse Timeout : 10 secsNext Server Address : 0.0.0.0Boot file name :

12 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 19: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure the Next ServerYou can configure the IP address for the next server so the client avoids unnecessarybroadcast packets if the server that offered the IP address is currently unavailable forrenewal. In this example, the next server in the DHCP configuration is assigned an IPaddress of 12.0.0.5.

1. Configure the server’s IP address in switch 1.

2. View the changes to the configuration in switch 1.

▼ Configure the Boot File NameThe boot file is used by the clients to identify the boot image. In this example, theboot file name is Image.exe.

1. Specify the name of the boot file in use on switch 1.

SEFOS# configure terminalSEFOS(config)# ip dhcp next-server 12.0.0.5SEFOS(config)# end

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : EnableDebug level : NoneServer Address Reuse Timeout : 10 secsNext Server Address : 12.0.0.5Boot file name :

SEFOS# configure terminalSEFOS(config)# ip dhcp bootfile Image.exeSEFOS(config)# end

Configuring DHCP 13

Page 20: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. View the changes to the configuration in switch 1.

Configuring DHCP Global Options■ “Configure DHCP Global Options” on page 14

■ “Delete DHCP Global Options” on page 15

▼ Configure DHCP Global OptionsYou can configure DHCP global options as described in this section. Global optionsare available to DHCP clients only when there is no host-specific option and there isno pool-specific option. The value applies to the complete DHCP pool in thespecified switch.

In this example, option 3 is the default router option for switch 1.

1. Configure the DHCP global option for the default router.

2. View the global options configured in switch 1.

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : EnableDebug level : NoneServer Address Reuse Timeout : 10 secsNext Server Address : 12.0.0.5Boot file name : Image.exe

SEFOS# configure terminalSEFOS(config)# ip dhcp option 3 ip 12.0.0.2SEFOS(config)# end

SEFOS# show ip dhcp server pools

Global Options--------------Code : 3, Value : 12.0.0.2

14 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 21: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Delete DHCP Global OptionsIn this example, option 3 is the default router option for switch 1.

1. Remove the DHCP global option in switch 1.

2. Ensure that the global option is removed.

Configuring Address Pools■ “Configure DHCP Address Pools” on page 15

■ “Configure the End IP for the Address Pool” on page 16

■ “Configure the Lease Time” on page 17

■ “Configure the Utilization Threshold” on page 18

■ “Create an Excluded Address in the Pool” on page 18

▼ Configure DHCP Address PoolsAddress pools are used by servers to allocate the IP addresses to the client. You canspecify the IP addresses that are available in the server to configure the clients. In thisexample, the address pool is pool 1, the network is 12.0.0.0, and the mask is255.0.0.0.

1. Configure the address pool.

2. Configure the network and mask.

SEFOS# configure terminalSEFOS(config)# no ip dhcp option 3SEFOS(config)# end

SEFOS# show ip dhcp server pools

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# network 12.0.0.0 255.0.0.0SEFOS(dhcp-config)# end

Configuring DHCP 15

Page 22: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

3. View the DHCP server pools that are available.

The output in switch 1 is:

▼ Configure the End IP for the Address PoolIn this example, the address pool is pool 1, the network is 12.0.0.0, the mask is255.0.0.0, and the end IP is 12.0.0.0.

1. Create the address pool.

2. Configure the network as 12.0.0.0, mask 255.0.0.0, and end IP as12.0.0.100.

3. View the end IP value for the address pools.

The output in switch 1 is:

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 3600 secsUtilization threshold : 75%Start Ip : 12.0.0.1End Ip : 12.255.255.255Subnet Options--------------Code : 1, Value : 255.0.0.0

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# network 12.0.0.0 255.0.0.0 12.0.0.100SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0

16 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 23: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure the Lease TimeYou can specify the amount of time the client can use (or lease) the IP addressassigned by the server. This parameter is specific to each IP address pool. Every IPaddress allocated from a pool will be returned to the pool if the client does not renewthe address before the lease-time expire interval.

In this example, the address pool is pool 1, and the lease time is specified as oneday, two hours, and thirty minutes.

1. Create the address pool.

2. Specify the amount of time the client will use the IP address assigned to it bythe server.

3. View the lease time for address pools.

The output in switch 1 is:

Subnet Mask : 255.0.0.0Lease time : 3600 secsUtilization threshold : 75%Start Ip : 12.0.0.1End Ip : 12.0.0.100

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# lease 1 2 30SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 75%Start Ip : 12.0.0.1End Ip : 12.0.0.100

Configuring DHCP 17

Page 24: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure the Utilization ThresholdThe utilization threshold specifies the upper limit (as a percentage) for the addresspool utilization. The range of possible values is 0-100 percent. If the number of IPaddresses allocated from the pool is near or above the utilization thresholdpercentage, the server will log an event in SYSLOG and send an SNMP trap messageto the SNMP manager.

In this example, the address pool is pool 1, and the utilization threshold is 50%.

1. Create the address pool.

2. Specify the utilization threshold.

3. View the utilization threshold of the address pools.

The output in switch 1 is:

▼ Create an Excluded Address in the PoolYou can use this option to specify a range of IP addresses that cannot be allocated forthe client. The no form of the command deletes the excluded pool.

In this example, the range of excluded address pools is 12.0.0.1 through12.0.0.10. The first available IP in this pool will be 12.0.0.11.

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# utilization threshold 50SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100

18 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 25: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

1. Create the address pool.

2. Specify the excluded address pool.

3. View the excluded address pools.

The output in switch 1 is:

Configuring Pool-Specific Options■ “Configure a Domain Name Option” on page 20

■ “Configure the DNS Option” on page 21

■ “Configure the NetBIOS Name Server” on page 22

■ “Configure the NetBIOS Node Type” on page 23

■ “Configure the Default Router” on page 24

■ “Remove a Configured Default Router Subnet Option” on page 25

■ “Configure Options Specific to Address Pools” on page 26

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# excluded-address 12.0.0.1 12.0.0.10SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Configuring DHCP 19

Page 26: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure a Domain Name OptionYou can use this option to set the domain name in the DHCP server configurationparameters. The no form of the command deletes the domain name from the DHCPserver configuration parameters. This pool-specific configuration parameter isoffered to DHCP clients in the pool only when there is no host-specific option for theclient. If this option is not configured and there is no host option, the global option isused.

In this example, the domain name for the network is "future."

1. Create the address pool.

2. Specify the domain name for the network.

3. Ensure that the domain name option has been configured.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# domain-name futureSEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Subnet Options--------------Code : 1, Value : 255.0.0.0Code : 15, Value : future

20 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 27: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure the DNS OptionThis pool-specific option is offered to the DHCP client as a configuration parameter.This option is offered to DHCP clients in the pool only when there is no host-specificoption for the client. If this option is not configured and there is no host option, theglobal option is used.

In this example, the DNS server address is 12.0.0.6.

1. Create the address pool.

2. Specify the DNS IP address.

3. Ensure that the DNS IP address has been configured.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# dns server 12.0.0.6SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Subnet Options--------------Code : 1, Value : 255.0.0.0Code : 6, Value : 12.0.0.6Code : 15, Value : future

Configuring DHCP 21

Page 28: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure the NetBIOS Name ServerThis pool-specific option is offered to DHCP clients as a configuration parameter.This option is offered to DHCP clients in the pool only when there is no host-specificoption for the client. If this option is not configured and there is no host option, theglobal option is used.

In this example, the NetBIOS name server is configured as 12.0.0.7.

1. Create the address pool.

2. Configure the NetBIOS name server in switch 1.

3. Ensure that the NetBIOS name server has been configured.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# netbios-name-server 12.0.0.7SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Subnet Options--------------Code : 1, Value : 255.0.0.0Code : 6, Value : 12.0.0.6Code : 15, Value : futureCode : 44, Value : 12.0.0.7

22 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 29: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure the NetBIOS Node TypeThis pool-specific option is offered to DHCP clients as a configuration parameter.This option is offered to DHCP clients in the pool only when there is no host-specificoption for the client. If this option is not configured and there is no host option, theglobal option is used.

In this example, the address pool is pool 1, and the NetBIOS node type is b-node.

1. Create the address pool.

2. Configure the NetBIOS node type.

3. Ensure that the NetBIOS node type has been configured.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# netbios-node-typeSEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Subnet Options--------------Code : 1, Value : 255.0.0.0Code : 6, Value : 12.0.0.6Code : 15, Value : futureCode : 46, Value : 1

Configuring DHCP 23

Page 30: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure the Default RouterThis pool-specific option is offered to DHCP clients as a configuration parameter.This option is offered to DHCP clients in the pool only when there is no host-specificoption for the client. If this option is not configured and there is no host option, theglobal option is used.

In this example, the address pool is pool 1, and the default router for the pool is12.0.0.3.

1. Create the address pool.

2. Configure the default router for the pool.

3. Ensure that the default router has been configured.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# default-router 12.0.0.3SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Subnet Options--------------Code : 3, Value : 12.0.0.3Code : 6, Value : 12.0.0.6Code : 15, Value : futureCode : 44, Value : 12.0.0.7Code : 46, Value : 1

24 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 31: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Remove a Configured Default Router SubnetOptionThis pool-specific option is offered to clients as a configuration parameter.

In this example, the address pool is pool 1, and the default router for the pool is12.0.0.3.

1. Create the address pool.

2. Remove the configured code 3 from the subnet option.

3. View the remaining configured options.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# no default-router

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Subnet Options--------------Code : 6, Value : 12.0.0.6Code : 15, Value : futureCode : 44, Value : 12.0.0.7Code : 46, Value : 1

Configuring DHCP 25

Page 32: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure Options Specific to Address PoolsYou can specify options using the option codes specified in RFC 2132. Thispool-specific option is offered to DHCP clients as a configuration parameter. Thisoption is offered to DHCP clients in the pool only when there is no host-specificoption for the client. If this option is not configured and there is no host option, theglobal option is used. See RFC 2132 for the complete list of DHCP options and theircorresponding codes.

In this example, the address pool is pool 1, and the subnet mask option is255.255.0.0.

1. Create the address pool.

2. Configure option 1 (subnet mask option).

3. View the options configured in the switch.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# option 1 ip 255.255.0.0SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 95400 secsUtilization threshold : 50%Start Ip : 12.0.0.1End Ip : 12.0.0.100Exclude Address Start IP : 12.0.0.1Exclude Address End IP : 12.0.0.10

Subnet Options--------------Code : 1, Value : 255.255.0.0Code : 6, Value : 12.0.0.6Code : 15, Value : futureCode : 44, Value : 12.0.0.7Code : 46, Value : 1

26 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 33: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Configure Host-Specific OptionsIn addition to configuring global and subnet options, you can also configurehost-specific options. This configuration is used for specific hosts as a configurationparameter. See RFC 2132 for the complete list of DHCP options and theircorresponding codes.

In this example, the address pool is pool 1, the MAC address is00:11:22:33:44:55, and the subnet mask option is 255.255.0.0. This option isoffered to DHCP clients with a hardware address of 00:11:22:33:44:55 even ifthere is a pool-specific option or global option with this option code.

1. Create the address pool.

2. Configure option 1 (subnet mask) and the MAC address.

3. View the options configured in the switch.

The output in switch 1 is:

SEFOS# configure terminalSEFOS(config)# ip dhcp pool 1

SEFOS(dhcp-config)# host hardware-type 1 client-identifier00:11:22:33:44:55 option 1 ip 255.255.0.0SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server pools

Pool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 3600 secsUtilization threshold : 75%Start Ip : 12.0.0.1End Ip : 12.255.255.255

Host Options--------------Client Identifier Hardware type Code Value00:11:22:33:44:55 1 1 255.255.255.0

Configuring DHCP 27

Page 34: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

Enabling and Disabling Debug Traces forthe DHCP Server■ “Enable Debug Traces for the DHCP Server” on page 28

■ “Disable Debug Traces for the DHCP Server” on page 28

▼ Enable Debug Traces for the DHCP Server1. Enable the debug trace for the DHCP server.

2. View the debug trace level.

The output in switch 1 is:

▼ Disable Debug Traces for the DHCP Server1. Disable the debug trace for the DHCP server.

SEFOS# debug ip dhcp server all

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : DisableDebug level : AllServer Address Reuse Timeout : 5 secsNext Server Address : 0.0.0.0Boot file name :

SEFOS# no debug ip dhcp server all

28 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 35: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. Ensure that debugging has been deactivated.

The output in switch 1 is:

Configuring an Interface to Acquire orUse an IP Address■ “Configure an Interface to Acquire a Dynamic IP Address” on page 29

■ “Delete a Binding Entry From the Server” on page 33

■ “Configure an Interface to Use a Manual IP Address” on page 33

▼ Configure an Interface to Acquire a Dynamic IPAddressIn this example, switch 1 is the DHCP server, and switch 2 is the DHCP client. vlan1of switch 2 must be allocated with a dynamic IP. In addition, the address pool ispool 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.

2. Create the address pool.

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : DisableDebug level : NoneServer Address Reuse Timeout : 5 secsNext Server Address : 0.0.0.0Boot file name :

SEFOS# configure terminalSEFOS(config)# service dhcp-server

SEFOS(config)# ip dhcp pool 1

Configuring DHCP 29

Page 36: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

3. Configure the network and mask.

4. View the configuration.

5. View additional configuration details.

Note that DHCP does not cross the subnet.

6. Instead of using port 1 as shown in the topologies presented in this guide, useport 41 of both switches as follows. The DHCP server must be enabled andthere must be a pool available in the server for the client’s subnet.

a. Connect a cable between port 41 of switch 1 and 2.

b. Activate interface 41.

SEFOS(dhcp-config)# network 12.0.0.0 255.0.0.0SEFOS(dhcp-config)# end

SEFOS# show ip dhcp server poolsPool Id : 1-------------------------------------------Subnet : 12.0.0.0Subnet Mask : 255.0.0.0Lease time : 3600 secsUtilization threshold : 75%Start Ip : 12.0.0.1End Ip : 12.255.255.255

Subnet Options--------------Code : 1, Value : 255.255.0.0

SEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : DisableDebug level : NoneServer Address Reuse Timeout : 5 secsNext Server Address : 0.0.0.0Boot file name : NULL

SEFOS# configure terminalSEFOS(config)# interface ex 0/41SEFOS(config-if)# no shutdownSEFOS(config-if)# exit

30 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 37: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

c. Define a VLAN using port 41.

d. Assign IP 12.0.0.1 to vlan 41.

7. Execute the following commands in switch 2 to acquire a dynamic IP for vlan1(note that DHCP does not cross the subnet).

a. Activate interface 41.

b. Create the same VLAN.

c. Change the IP allocation mode to dynamic.

d. Wait for the protocol operation to complete (approximately 20 seconds).

SEFOS(config)# vlan 41SEFOS(config-vlan)# port ex 0/41SEFOS(config-vlan)# exit

SEFOS(config)# interface vlan 41SEFOS(config-if)# no shutdownSEFOS(config-if)# ip address 12.0.0.1 255.255.255.0SEFOS(config-if)# endSEFOS#

SEFOS# configure terminalSEFOS(config)# interface ex 0/41SEFOS(config-if)# no shutdownSEFOS(config-if)# exit

SEFOS(config)# vlan 41SEFOS(config-vlan)# port ex 0/41SEFOS(config-vlan)# exit

SEFOS(config)# interface vlan 41SEFOS(config-if)# no shutdownSEFOS(config-if)# ip address dhcpSEFOS(config-if)# endSEFOS#

Configuring DHCP 31

Page 38: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

e. View the dynamic IP allocated to the client in switch 2.

The output in the switch 2 is:

f. View the DHCP server binding table to observe the allocated IP addresses inswitch 1.

g. View the DHCP packets statistics in switch 1.

SEFOS# show ip interface

vlan41 is up, line protocol is upInternet Address is 12.0.0.2/8Broadcast Address 12.255.255.255IP address allocation method is dynamicIP address allocation protocol is dhcp

SEFOS# show ip dhcp server binding

Ip Hw Hw Binding ExpireAddress Type Address State Time--------- ------- --------------- --------------------12.0.0.2 Ethernet 00:02:02:03:04:01 Assigned Jan7 11:22:37 2007

SEFOS# show ip dhcp server statistics

Address pools : 1

Message Received------- --------DHCPDISCOVER 1DHCPREQUEST 1DHCPDECLINE 0DHCPRELEASE 0DHCPINFORM 0

Message Sent------- ----DHCPOFFER 1DHCPACK 1DHCPNAK 0

32 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 39: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

▼ Delete a Binding Entry From the ServerYou can acquire an IP address dynamically for vlan1 in switch 2.

1. View the binding table in switch 1.

2. Delete the binding entry for 12.0.0.2.

3. View the binding table in switch 1.

Ensure that entry 12.0.0.2 is deleted and that the table is empty.

▼ Configure an Interface to Use a Manual IPAddressYou can configure a switch to stop running DHCP and to use a manual IP allocationmethod for an interface.

1. Create a VLAN for port 41 to receive an IP address.

2. Assign a manual IP.

SEFOS# show ip dhcp server binding

Ip Hw Hw Binding ExpireAddress Type Address State Time------- ------- ------ -------- ----------12.0.0.2 Ethernet 00:02:02:03:04:01 Assigned Jan 7 12:19:452007

SEFOS# configure terminalSEFOS(config)# no ip dhcp binding 12.0.0.2SEFOS(config)# end

SEFOS# show ip dhcp server bindingSEFOS#

SEFOS# configure terminalSEFOS(config)# vlan 41SEFOS(config-if)# port ex 0/41SEFOS(config-if)# exit

Configuring DHCP 33

Page 40: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

a. Specify the VLAN that should receive the IP.

b. Activate the interface if it is not already active.

c. Remove the IP from DHCP if the port is already under DHCP control.

d. Assign an IP address and the netmask.

e. Display the newly assigned IP.

▼ Enable DHCP RelayDHCP relay is disabled by default. You can enable DHCP relay by performing thefollowing steps.

1. Enable DHCP relay in switch 2.

SEFOS(config-if)# interface vlan 41

SEFOS(config-if)# no shutdown

SEFOS(config-if)# no ip address

SEFOS(config-if)# ip address 12.0.0.1 255.255.255.0SEFOS(config-if)# end

SEFOS# show ip interface vlan 41

vlan41 is up, line protocol is upInternet Address is 10.0.0.1/8Broadcast Address 10.255.255.255

vlan41 is up, line protocol is downInternet Address is 12.0.0.1/24Broadcast Address 12.0.0.255

SEFOS# configure terminalSEFOS(config)# service dhcp-relaySEFOS(config)# end

34 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 41: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. View the DHCP relay status.

The output in the switch is:

▼ Configure a DHCP Server AddressYou can configure a DHCP server address in the DHCP relay agent. A maximum offive servers can be configured. If no servers are configured, the DHCP packets will bebroadcast to the entire network, except to the network from which the packet isreceived.

In this example, the server address is 20.0.0.1.

1. Configure a DHCP server address in switch 2.

SEFOS# show ip dhcp relay information

Dhcp Relay : EnabledDhcp Relay Servers only : Disabled

DHCP server : 0.0.0.0

Dhcp Relay RAI option : DisabledDefault Circuit Id information : router-indexDebug Level : 0x1

No of Packets inserted RAI option : 0No of Packets inserted circuit ID suboption : 0No of Packets inserted remote ID suboption : 0No of Packets inserted subnet mask suboption : 0No of Packets dropped : 0No of Packets which did not inserted RAI option : 0

SEFOS# configure terminalSEFOS(config)# ip dhcp server 20.0.0.1SEFOS(config)# end

Configuring DHCP 35

Page 42: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. Ensure that the server address has been configured in the relay.

The output in the switch is:

Configuring Relay Agent Options■ “Enable the Relay Agent Information” on page 36

■ “Configure Relay Agent Suboptions” on page 37

■ “Enable Traces for the DHCP Relay Agent” on page 38

▼ Enable the Relay Agent Information1. Enable the relay agent information option in switch 2.

SEFOS# show ip dhcp relay information

Dhcp Relay : EnabledDhcp Relay Servers only : Enabled

DHCP server : 20.0.0.1

Dhcp Relay RAI option : DisabledDefault Circuit Id information : router-indexDebug Level : 0x1

No of Packets inserted RAI option : 0No of Packets inserted circuit ID suboption : 0No of Packets inserted remote ID suboption : 0No of Packets inserted subnet mask suboption : 0No of Packets dropped : 0No of Packets which did not inserted RAI option : 0

SEFOS# configure terminalSEFOS(config)# ip dhcp relay information optionSEFOS(config)# end

36 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 43: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. View the relay agent information status.

The output in the switch is:

▼ Configure Relay Agent SuboptionsIn this example, circuit-id is 500, and remote-id is hello.

1. Configure the circuit-id and remote-id relay agent information options inswitch 2.

2. View the relay agent information.

The output in the switch is:

SEFOS# show ip dhcp relay information

Dhcp Relay : EnabledDhcp Relay Servers only : Enabled

DHCP server : 20.0.0.1

Dhcp Relay RAI option : EnabledDefault Circuit Id information : router-indexDebug Level : 0x1

No of Packets inserted RAI option : 0No of Packets inserted circuit ID suboption : 0No of Packets inserted remote ID suboption : 0No of Packets inserted subnet mask suboption : 0No of Packets dropped : 0No of Packets which did not inserted RAI option : 0

SEFOS# configure terminalSEFOS(config)# interface vlan 1SEFOS(config-if)# ip dhcp relay circuit-id 500SEFOS(config-if)# ip dhcp relay remote-id helloSEFOS(config-if)# end

SEFOS# show ip dhcp relay information

Dhcp Relay : EnabledDhcp Relay Servers only : Enabled

Configuring DHCP 37

Page 44: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

■ Alternatively, if you want to view just the information specified for VLAN 1,use the following command:

Note – Configuration of the DHCP relay circuit ID should be greater than the valueof the macro DHRL_MAX_L3_IF_INDEX. The value of the macroDHRL_MAX_L3_IF_INDEX is different for SEFOS packages. For the METROpackage the value of the macro is 1136 and for the enterprise package the value ofmacro is 160.

▼ Enable Traces for the DHCP Relay Agent1. Enable DHCP relay debug traces in switch 2.

DHCP server : 20.0.0.1

Dhcp Relay RAI option : EnabledDefault Circuit Id information : router-indexDebug Level : 0x1

No of Packets inserted RAI option : 0No of Packets inserted circuit ID suboption : 0No of Packets inserted remote ID suboption : 0No of Packets inserted subnet mask suboption : 0No of Packets dropped : 0No of Packets which did not inserted RAI option : 0

Interface vlan1Circuit ID : 500Remote ID : hello

SEFOS# show ip dhcp relay information vlan 1

Interface vlan1Circuit ID : 500Remote ID : hello

SEFOS# debug ip dhcp relay all

38 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 45: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. View the debug trace level.

▼ Acquire an IP Address From a ServerResiding Outside the Client NetworkIn this example, a DHCP relay server is set up using various DHCP server andDHCP relay commands and options from the preceding sections. The exampleconnects port 1 of switch 1 to port 1 of switch 2, and connects port 2 of switch 2 toport 1 of switch 3.

1. Create vlan 2 in switch 1 with port 1 as the member port. Then, add a route tothe 30.0.0.0 network through 20.0.0.2 (switch 2).

SEFOS# show ip dhcp relay information

Dhcp Relay : EnabledDefault Circuit Id information : router-indexDhcp Relay Servers only : Enabled

DHCP server : 20.0.0.1

Dhcp Relay RAI option : EnabledDefault Circuit Id information : router-indexDebug Level : 0xff

No of Packets inserted RAI option : 0No of Packets inserted circuit ID suboption : 0No of Packets inserted remote ID suboption : 0No of Packets inserted subnet mask suboption : 0No of Packets dropped : 0No of Packets which did not inserted RAI option : 0

SEFOS# configure terminalSEFOS(config)# vlan 2SEFOS(config-vlan)# ports extreme-ethernet 0/1SEFOS(config-vlan)# exitSEFOS(config)# interface vlan 2SEFOS(config-if)# shutdownSEFOS(config-if)# ip address 20.0.0.1 255.0.0.0SEFOS(config-if)# no shutdownSEFOS(config-if)# exitSEFOS(config)# interface extreme-ethernet 0/1

Configuring DHCP 39

Page 46: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

2. View the VLAN configurations and route configuration.

3. Create vlan 2 with port 1 as a member port and vlan 3 with port 2 as amember port in switch 2.

SEFOS(config-if)# switchport pvid 2SEFOS(config-if)# exitSEFOS(config)# ip route 30.0.0.0 255.0.0.0 vlan 2SEFOS(config)# end

SEFOS# show ip interface vlan 2

vlan2 is up, line protocol is upInternet Address is 20.0.0.1/8Broadcast Address 20.255.255.255

SEFOS# show vlan id 2

Vlan database-------------Vlan ID : 2Member Ports : Ex0/1Untagged Ports : NoneForbidden Ports : NoneName :Status : Permanent----------------------------------------------------

SEFOS# show ip route

Codes: C - connected, S - static, R - rip, B - bgp, O - ospfC 10.0.0.0/8 is directly connected, vlan1C 20.0.0.0/8 is directly connected, vlan2S 30.0.0.0/8 is directly connected, vlan2

SEFOS# configure terminalSEFOS(config)# vlan 2SEFOS(config-vlan)# ports extreme-ethernet 0/1SEFOS(config-vlan)# exitSEFOS(config)# interface vlan 2SEFOS(config-if)# shutdownSEFOS(config-if)# ip address 20.0.0.2 255.0.0.0SEFOS(config-if)# no shutdownSEFOS(config-if)# exitSEFOS(config)# interface extreme-ethernet 0/1SEFOS(config-if)# switchport pvid 2SEFOS(config-if)# exit

40 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 47: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

SEFOS(config)# vlan 3SEFOS(config-vlan)# ports extreme-ethernet 0/2 untaggedextreme-ethernet 0/2SEFOS(config-vlan)# exitSEFOS(config)# interface vlan 3SEFOS(config-if)# shutdownSEFOS(config-if)# ip address 30.0.0.2 255.0.0.0SEFOS(config-if)# no shutdownSEFOS(config-if)# exitSEFOS(config)# interface extreme-ethernet 0/2SEFOS(config-if)# switchport pvid 3SEFOS(config-if)# no shutdownSEFOS(config-if)# endSEFOS# show vlan id 2

Vlan database-------------Vlan ID : 2Member Ports : Ex0/1Untagged Ports : NoneForbidden Ports : NoneName :Status : Permanent----------------------------------------------------

SEFOS# show vlan id 3

Vlan database-------------Vlan ID : 3Member Ports : Ex0/2Untagged Ports : Ex0/2Forbidden Ports : NoneName :Status : Permanent----------------------------------------------------

SEFOS# show ip interface vlan 2

vlan2 is up, line protocol is upInternet Address is 20.0.0.2/8Broadcast Address 20.255.255.255

SEFOS# show ip interface vlan 3

vlan3 is up, line protocol is upInternet Address is 30.0.0.2/8Broadcast Address 30.255.255.255

Configuring DHCP 41

Page 48: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

4. Enable the DHCP server in switch 1.

Since the client is in vlan 3, an address pool with the 30.0.0.0 network mustbe configured in the server.

5. Enable DHCP relay in switch 2.

This action connects the networks between the client and server.

SEFOS# configure terminalSEFOS(config)# service dhcp-serverSEFOS(config)# ip dhcp pool 1SEFOS(dhcp-config)# network 30.0.0.0SEFOS(dhcp-config)# lease 0 0 30SEFOS(dhcp-config)# endSEFOS# show ip dhcp server information

DHCP server status : EnableSend Ping Packets : DisableDebug level : NoneServer Address Reuse Timeout : 5 secsNext Server Adress : 0.0.0.0Boot file name :

SEFOS# show ip dhcp server pools

Pool Id : 1----------------------------------Subnet : 30.0.0.0Subnet Mask : 255.0.0.0Lease time : 1800 secsUtilization threshold : 75%Start Ip : 30.0.0.1End Ip : 30.255.255.255

SEFOS# configure terminalSEFOS(config)# service dhcp-relaySEFOS(config)# endSEFOS# show ip dhcp relay information

Dhcp Relay : EnabledDhcp Relay Servers only : Disabled

DHCP server : 0.0.0.0

Dhcp Relay RAI option : DisabledDebug Level : 0x1

No of Packets inserted RAI option : 0

42 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012

Page 49: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

6. Configure the DHCP client.

This example uses a SPARC computer running Oracle Solaris 10 OS as the DHCPclient. The dual 10-Gigabit Ethernet XFR SR network interface card (optionX1109A-Z) is installed in the SPARC computer and uses the instance ixgbe. TheDHCP daemon is active in Oracle Solaris 10 by default, so no DHCP configurationis needed.

7. Use the correct cable to connect a port on the NIC to port 70 of switch 2.

See “Multiple-Switch Configuration” on page 8. Issue the following commandsafter connecting the cables. If a different DHCP client is used, follow theappropriate instructions in the administration guide for the client.

8. Execute the DHCP request, and wait 15-20 seconds for the command prompt toreturn.

9. Show that IP 30.0.0.1 is assigned to the DHCP client port.

No of Packets inserted circuit ID suboption : 0No of Packets inserted remote ID suboption : 0No of Packets inserted subnet mask suboption : 0No of Packets dropped : 0No of Packets which did not inserted RAI option : 0

# ifconfig ixgbe1 plumb up# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>mtu 8232 index 1 inet 127.0.0.1 netmask ff000000e1000g0: flags=1000803<UP,BROADCAST,MULTICAST,IPv4> mtu 1500 index2 inet 10.7.58.46 netmask ffffff00 broadcast 10.7.58.255 ether 0:14:4f:20:f4:ccixgbe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu1500 index 12 inet 0.0.0.0 netmask ff000000 ether 0:1b:21:4a:6f:fc

# ifconfig ixgbe1 dhcp

# ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>mtu 8232 index 1 inet 127.0.0.1 netmask ff000000e1000g0: flags=1000803<UP,BROADCAST,MULTICAST,IPv4> mtu 1500 index2

Configuring DHCP 43

Page 50: DHCP Administration Guide · The SEFOS DHCP implementation complies with RFC 2131. “DHCP Server” on page 5 “DHCP Client” on page 5 “DHCP Relay Agent” on page 6 DHCP Server

10. Display the IP binding by issuing the following command in switch 1 (DHCPserver).

inet 10.7.58.46 netmask ffffff00 broadcast 10.7.58.255 ether 0:14:4f:20:f4:ccixgbe1: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4>mtu 1500 index 12

inet 30.0.0.1 netmask ff000000 broadcast 30.255.255.255 ether 0:1b:21:4a:6f:fc

SEFOS# show ip dhcp server binding

Ip Hw Hw Binding ExpireAddress Type Address State Time------- ------- ------ -------- ----------30.0.0.1 Ethernet 00:1b:21:4a:6f:fc Assigned Apr 10 11:39:282010

44 Sun Ethernet Fabric Operating System DHCP Administration Guide • July 2012