Computer Networks/Ipconfig/DHCP Options

From Wikiversity
Jump to navigation Jump to search

ipconfig /renew renews the lease on dynamic (DHCP-assigned) IP addresses. ipconfig /release releases dynamic addresses. These activities will show you how to use ipconfig /renew and ipconfig /release.

Preparation[edit | edit source]

To prepare for this activity:

  1. Start Windows.
  2. Log in if necessary.

Activity 1 - Display DHCP Configuration Information[edit | edit source]

To display DHCP configuration information:

  1. Open a command prompt.
  2. Use ipconfig /all to display all IP configuration information.
  3. Observe whether you have any network adapters that are DHCP Enabled. If so, identify your DHCP Server, when it shows Lease Obtained, and when it shows Lease Expires.
    Note: If none of your network adapters are DHCP enabled, you will not be able to complete the following activities.

Activity 2 - Renew DHCP-Assigned Address Lease[edit | edit source]

To renew the lease on DHCP-assigned IP address(es):

  1. Type ipconfig /renew and press Enter.
  2. Use ipconfig /all to display all IP configuration information.
  3. Observe the updated DHCP lease information. Dynamic IP addresses attempt to renew themselves automatically beginning at one-half of lease time. It is generally not necessary to renew DHCP-assigned addresses manually, but this approach may be used to test a DHCP server configuration from one or more clients.

Activity 3 - Release DHCP-Assigned Address[edit | edit source]

Note: You will not be able to access the Internet or other devices on your network from this point forward until you complete Activity 4.
To release the DCHP-assigned IP address:

  1. Type ipconfig /release and press Enter.
    Note that it now shows no IP address for the adapter(s). Dynamic IP addresses are released automatically when the system shuts down. It is generally not necessary to release DHCP-assigned addresses manually.
  2. Wait ten seconds and then use ipconfig /all to display all IP configuration information.
  3. Observe the updated IP address information. It may show no IP address (0.0.0.0), or it may show an Automatic Private IP Address (APIPA) address, one that begins with 169.254.n.n. Systems will typically assign an APIPA address if they cannot obtain an address from a DHCP server after a few seconds. APIPA addresses can work on the local network to connect with other devices that have an APIPA address, but do not have a default gateway and are unable to access the Internet.

Activity 4 - Obtain a DHCP-Assigned Address[edit | edit source]

To obtain a DHCP-assigned address:

  1. Type ipconfig /renew and press Enter to obtain a DHCP-assigned IP address.
  2. Use ipconfig /all to display all IP configuration information.
  3. Observe the updated DHCP lease information. The system should now have a valid IP address on the network, and the address will very likely be the same address as the one displayed in Activity 1.
  4. Close the command prompt to complete this activity.

Readings[edit | edit source]

References[edit | edit source]