cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
880
Views
10
Helpful
4
Replies

What is difference between "ip dhcp client" and "ip address dhcp"?

Vigneshtl
Level 1
Level 1

If I enable "ip address dhcp", the interface will get an IP from the DHCP server. "ip dhcp client" does the same thing, so why do we have two different commands?

3 Accepted Solutions

Accepted Solutions

marce1000
VIP
VIP

 

 - FYI : https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/12-4/dhcp-12-4-book/config-dhcp-client.html#GUID-6EFF5107-A276-4A34-91F4-A16CB4FBEBC3

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

View solution in original post

The link provided by @marce1000 provides helpful information. Sometimes all we need is ip address dhcp and our device will send a dhcp request and receive an IP address from the server. But sometimes we want to specify some things about our dhcp request (perhaps we want to specify a client id if the server has a specific IP for our device, or perhaps we want to specify some dhcp options, or perhaps we want to specify something about length of the lease) and for those things you use ip dhcp client.

HTH

Rick

View solution in original post

The configurable dynamic host configuration protocol client functionality allows a DHCP client to use a
user-specified client identifier, class identifier, or suggested lease time when requesting an address from a
DHCP server.
Configuration parameters and other control information are carried in tagged data items that are stored in the
options field of the DHCP message. The DHCP client provides flexibility by allowing the following options
to be configured for a DHCP client:
• Option 12—This option specifies the name of the client. The name may or may not be qualified with
the local domain.
• Option 51—This option is used in a client request (DHCPDISCOVER or DHCPREQUEST) to allow
the client to request a lease time for the IP address.
• Option 55—This option allows the DHCP client to request certain options from the DHCP server. The
ip dhcp client request command allows the system administrator to turn off some of the requested
options, thus removing them from the request list.
• Option 60—This option allowsthe user to configure the vendor classidentifierstring to use in the DHCP
interaction.
• Option 61—This option is used by DHCP clients to specify their unique identifier. DHCP servers use
this value to index their database of address bindings. This value is expected to be unique for all clients
in an administrative domain.
• Option 120—This option is used to specify a 32-bit (binary) IPv4 address to be used by the Session
Initiation Protocol (SIP) client to locate a SIP server.
• Option 121—This option is used to configure classless static routes by specifying classless network
destinations; that is, each routing table entry includes a subnet mask. Upto ten classless static routes are
supported using option 121 on the DHCP client.
If a request includes both static routes and classless static routes, the client uses only
the classless static routes. If the DHCPserver returns both a classless static route option
and a router option, the DHCP client ignores the router option.
Note
• Option 125—This option is used by DHCPclients and servers to exchange vendor-specific information.


if any of above you want to send/receive then use ip dhcp client 
if any of above you dont want to send/receive then use ip add dhcp 

View solution in original post

4 Replies 4

marce1000
VIP
VIP

 

 - FYI : https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/12-4/dhcp-12-4-book/config-dhcp-client.html#GUID-6EFF5107-A276-4A34-91F4-A16CB4FBEBC3

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

The link provided by @marce1000 provides helpful information. Sometimes all we need is ip address dhcp and our device will send a dhcp request and receive an IP address from the server. But sometimes we want to specify some things about our dhcp request (perhaps we want to specify a client id if the server has a specific IP for our device, or perhaps we want to specify some dhcp options, or perhaps we want to specify something about length of the lease) and for those things you use ip dhcp client.

HTH

Rick

The configurable dynamic host configuration protocol client functionality allows a DHCP client to use a
user-specified client identifier, class identifier, or suggested lease time when requesting an address from a
DHCP server.
Configuration parameters and other control information are carried in tagged data items that are stored in the
options field of the DHCP message. The DHCP client provides flexibility by allowing the following options
to be configured for a DHCP client:
• Option 12—This option specifies the name of the client. The name may or may not be qualified with
the local domain.
• Option 51—This option is used in a client request (DHCPDISCOVER or DHCPREQUEST) to allow
the client to request a lease time for the IP address.
• Option 55—This option allows the DHCP client to request certain options from the DHCP server. The
ip dhcp client request command allows the system administrator to turn off some of the requested
options, thus removing them from the request list.
• Option 60—This option allowsthe user to configure the vendor classidentifierstring to use in the DHCP
interaction.
• Option 61—This option is used by DHCP clients to specify their unique identifier. DHCP servers use
this value to index their database of address bindings. This value is expected to be unique for all clients
in an administrative domain.
• Option 120—This option is used to specify a 32-bit (binary) IPv4 address to be used by the Session
Initiation Protocol (SIP) client to locate a SIP server.
• Option 121—This option is used to configure classless static routes by specifying classless network
destinations; that is, each routing table entry includes a subnet mask. Upto ten classless static routes are
supported using option 121 on the DHCP client.
If a request includes both static routes and classless static routes, the client uses only
the classless static routes. If the DHCPserver returns both a classless static route option
and a router option, the DHCP client ignores the router option.
Note
• Option 125—This option is used by DHCPclients and servers to exchange vendor-specific information.


if any of above you want to send/receive then use ip dhcp client 
if any of above you dont want to send/receive then use ip add dhcp 

I am glad that our suggestions have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick
Review Cisco Networking for a $25 gift card