搜档网
当前位置:搜档网 › dhcpclient

dhcpclient

dhcpclient
dhcpclient

DHCP Client

DHCP Client

Table of Contents

1. Overview (1)

1.1. DHCP Client feature (2)

2. Configuring DHCP Client (4)

2.1. Configuration using GUI (4)

2.2. Event Log messages (6)

2.3 Configuration using CLI (8)

3. Sample configuration (9)

3.1. Setup (9)

3.2. Configuring DHCP Server (9)

3.3. Configuring the CES – DHCP Client (17)

3.4. Testing the Connection (19)

4. Appendix. Sniffer Traces (25)

4.1. DHCP Discover (25)

4.2. DHCP Offer (26)

4.3. DHCP Request (27)

4.4. DHCP ACK (28)

4.5. Clients ARP (28)

1. Overview

The Public Interface DHCP Client is an enhancement to the Contivity Secure IP Services Gateway operational software. This makes the members of the Contivity family more attractive in cost sensitive applications such as deployment in small branch offices/home offices.

DSL and cable modem are the preferred choice for connection to the internet in these situations. In this scenario the ISP treats the Contivity as if it was a PC, downloading the network address parameters to the Contivity via the Dynamic Host Configuration Protocol.

DHCP Client

DHCP Client

switched from DHCP to static. In either case, the DHCP Release will be sent on a best effort basis, without waiting to confirm its receipt.

DHCP will be used solely for the purpose of acquiring the minimal set of network address parameters necessary to make the Ethernet interface ready for normal traffic flow. Other network parameters not related to the DHCP lease, if specified by the DHCP server, will be ignored.

If any of the minimal parameters is missing the Ethernet interface will remain in a “down” state as if an IP address has not been programmed. At a minimum, the DHCP server must provide the IP address, subnet mask and default gateway.

The DHCP client will continuously attempt to acquire a lease until the interface can be brought up. The “Bad” lease offers will be remembered and discarded as they come in. Verification that an offered IP address is not in use is done with ARP as per the recommendation in RFC 2131.

DHCP Client

2. Configuring DHCP Client

2.1. Configuration using GUI

To configure the public interface as a DHCP Client, navigate System?LAN. Select the IP Protocol (selected by default). Click Apply next to the IP:

DHCP Client

The LAN Interfaces?Add IP Address screen appears. Select the DHCP option for the Obtaining IP Address. Enter a Cost for this interface (10 by default). Enter the Host Name or the IP address of the DHCP server. The Host Name parameter is optional, if it’s not specified the client will send the DHCP broadcast to locate the server if the address/name is specified the client will contact the specified DHCP server to obtain the address. The appropriate interface filter can be applied to the interface by selecting the filter form the drop down list next to Interface Filter. Once the appropriate information has been entered, click OK:

The Confirmation screen appears with the warning “Changing IP Address Type from ‘Static’ to

‘DHCP’ will remove static IP Address from the interface”. Click OK to change the interface type to DHCP or Cancel not to:

DHCP Client

The Contivity DHCP Client on the interface starts to acquire the IP address from the DHCP server. Click Refresh to refresh the status of the acquisition. Click Cancel to cancel the acquisition.

2.2. Event Log messages

The coast for the interface has been changed to the 10:

08/26/2003 13:18:04 0 Interface [11] DHCP Cost 10

08/26/2003 13:18:04 0 tHttpd [33] Interface[257].DHCPCost changed from

'10' to '10' by user 'admin' @ '192.168.50.6'

The DHCP server 192.168.100.1 has been specified:

08/26/2003 13:18:04 0 Interface [11] DHCP Clid 192.168.100.1

08/26/2003 13:18:04 0 tHttpd [33] Interface[257].DHCPClid changed from

'' to '192.168.100.1' by user 'admin' @ '192.168.50.6'

The DHCP Client has been enabled on public interface:

08/26/2003 13:18:04 0 Interface [11] DHCP Enable

08/26/2003 13:18:04 0 tDhcpPub [11] DHCP_PUB_OP_ENABLE devloc 257

No replies have been received from the DHCP server:

08/26/2003 13:19:05 0 tDhcpPub [13] Dhcp: No replies to DHCPDISCOVER xid eeee4eab received, waiting 5 minutes before retry

DHCP Client

DHCP Client has been disabled on the public interface:

08/26/2003 13:26:05 0 tDhcpPub [11] DHCP_PUB_OP_DISABLE devloc 257

08/26/2003 13:26:07 0 tHttpd [33] Interface[257].IpAddrType changed from '0.0.0.0' to 'Static' by user 'admin' @ '192.168.50.6'

The DHCP has been deleted on the interface:

08/26/2003 15:39:58 0 tDhcpPub [35] IpRoutingTable[0.0.0.0,

255.255.255.255, 192.168.60.10] destroyed by user '' @ ''

08/26/2003 15:39:58 0 tDhcpPub [35]

IspDnsServers.ServerRecord[192.168.60.11].DnsServer[0] destroyed by user '' @ ''

08/26/2003 15:39:58 0 tDhcpPub [35]

IspDnsServers.ServerRecord[192.168.60.11] destroyed by user '' @ ''

08/26/2003 15:39:58 0 tDhcpPub [11] DnsAPI:Destroyed record for Key: 192.168.60.11 AppId: 1

08/26/2003 15:39:58 0 tDhcpPub [11] DhcpPublicReleaseAddress: Deleting IspDnsServerRecord for 192.168.60.11

The IP address has been acquired:

08/26/2003 15:42:25 0 tDhcpPub [11] Dhcp: address bound to

192.168.60.11-255.255.255.0 -- renewal in 21600 seconds.

08/26/2003 15:42:25 0 tDhcpPub [35] IpIntf[192.168.60.11] created by

user '' @ ''

The DNS record has been inserted:

08/26/2003 15:42:25 0 tDhcpPub [35]

IspDnsServers.ServerRecord[192.168.60.11].DnsServer[0] created by user

'' @ ''

08/26/2003 15:42:25 0 tDhcpPub [11] BindLease: Setting DNS Servers for DevLoc 257, IP Address 192.168.60.11

The requisition process has been started:

08/26/2003 15:45:36 0 tDhcpPub [11] DHCP_PUB_OP_REACQUIRE devloc 257

The Route entry has been deleted:

08/26/2003 15:45:36 0 tDhcpPub [35] IpRoutingTable[0.0.0.0,

255.255.255.255, 192.168.60.10] destroyed by user '' @ ''

The address has been released:

08/26/2003 15:45:36 0 tDhcpPub [11] DhcpPublicReleaseAddress: Deleting IspDnsServerRecord for 192.168.60.11

DHCP Client

2.3 Configuration using CLI

To configure Contivity using CLI you need to either telnet to Contivity or connect to it through the serial interface -> option “L” on the menu.

Enter the privileged mode:

CES>enable

Password:

Enter configuration mode:

CES#configure terminal

Enter configuration commands, one per line. End with Ctrl/z.

CES(config)#

To enter the interface configuration mode:

CES(config)#interface fastEthernet 1/1

CES(config-if)#

To enable the DHCP Client on the interface:

CES(config-if)#ip address type dhcp

To cancel the IP address acquisition:

CES(config-if)#ip address dhcp cancel

To specify the cost for the interface to be, for example, 11:

CES(config-if)#ip address dhcp cost 11

To reacquire the IP address for the interface:

CES(config-if)#ip address dhcp reacquire

CES(config-if)#exit

CES(config)#exit

CES#

DHCP Client

(192.168.60.10):

DHCP Client

Set the filter for the private interface to “permit all”. Click Edit next to IP address for the private interface on the LAN Interfaces screen. Select the “permit all” filter from the drop-down list next to Interface Filter and click OK:

The filter will be applied to the interface:

DHCP Client

Enable the Contivity Interface Filter on the Services?Firewall/NAT screen:

The confirmation screen appears; click OK to reboot the Contivity:

Complete the system shutdown procedure to reboot the Contivity.

DHCP Client

Once rebooted, navigate Servers?DHCP. Check the box under the Debug Message Log Enabled. Check the box under the DHCP Server Enabled for the private interface to enable the DHCP server service on the interface. Click OK:

DHCP Client

The screen refreshes. Click Add under the Pool tab on the DHCP screen to define the pool of addresses to be used by the client. The Add Pool screen appears. Enter the base IP address for the pool (192.168.60.0), mask to be associated with the pool (255.255.255.0) and the optional description (DHCP Poll), click OK:

The configured address pool is listed under the Pool tab. Click Configure to specify the addresses to be available for the assignment:

DHCP Client

The Pool screen appears. To configure the pool of address to be available for the assignment click Add under the Inclusion Range tab:

The Pool Inclusion screen appears. Enter the staring IP address (192.168.60.11) and the ending IP address (192.168.60.15). Click OK:

DHCP Client

The configured range is listed under the Inclusion Range tab. Click OK at the bottom of the screen:

DHCP Client

Click Restart Service on the DHCP Server screen to apply all the changes:

The status message “The DHCP Server is now restarting” appears; click Refresh to refresh the status:

DHCP Client

The status changes to “The DHCP Server is enabled and running”, click Close to return to the DHCP screen:

At this point the configuration of the DHCP server is complete. For more information on DHCP server configuration consult the Configuration Guide – DHCP Server.

3.3. Configuring the CES – DHCP Client

Configure the IP address for the management (192.168.50.1) and the private interface (192.168.50.10). Click Apply next to the Select Protocol IP:

DHCP Client

The LAN Interfaces? Add IP Address screen appears. Select the DHCP option and enter the IP address of the DHCP server (192.168.60.1), leave the rest of the fields to their default. Click OK:

The confirmation screen appears. Click OK to apply the DHCP mode:

DHCP Client

3.4. Testing the Connection

Once the OK has been clicked on the CES’s LAN Interfaces? Confirm DHCP screen, the LAN Interfaces screen reappears with the status for the DHCP address acquisition. Click Refresh to refresh the status:

The CES public interface has received the IP address (192.168.60.11/24) from the DHCP server:

Once the address has been obtained it could be deleted or a new address could be reacquired by clicking the appropriate button on the right of address configuration.

DHCP Client

Check the log on CES (parts of the log are omitted):

08/26/2003 14:47:11 0 tDhcpPub [11] Dhcp: address bound to

192.168.60.11-255.255.255.0 -- renewal in 21600 seconds.

08/26/2003 14:47:11 0 tDhcpPub [35] IpIntf[192.168.60.11] created by

user '' @ ''

08/26/2003 14:47:11 0 Ethernet [00] IpAddrChange: adding dev fei1 ip 192.168.60.11 subnet 255.255.255.0 result 0 OK

08/26/2003 14:47:11 0 Ethernet [00] IpAddrChange: New IPV dev fei1 ip 192.168.60.11 subnet 255.255.255.0 result OK

08/26/2003 14:47:11 0 tDhcpPub [33] IpIntf[192.168.60.11].Subnet changed from '0.0.0.0' to '255.255.255.0' by user '' @ ''

08/26/2003 14:47:11 0 tDhcpPub [35] IpRoutingTable[0.0.0.0,

255.255.255.255, 192.168.60.10] created by user '' @ ''

08/26/2003 14:47:11 0 tDhcpPub [33] IpRoutingTable[0.0.0.0,

255.255.255.255, 192.168.60.10].Cost changed from '10' to '10' by user

'' @ ''

08/26/2003 14:47:11 0 tDhcpPub [33] IpRoutingTable[0.0.0.0,

255.255.255.255, 192.168.60.10].IsDHCPGW changed from 'FALSE' to 'True' by user '' @ ''

08/26/2003

08/26/2003 14:47:11 0 tDhcpPub [11] DNSAPI:No records present for IspDnsServers

08/26/2003 14:47:11 0 tDhcpPub [35]

IspDnsServers.ServerRecord[192.168.60.11].DnsServer[0] created by user

'' @ ''

08/26/2003 14:47:11 0 tDhcpPub [11] BindLease: Setting DNS Servers for DevLoc 257, IP Address 192.168.60.11

Check the log on DHCP Server:

08/26/2003 14:47:51 0 tDhcpServer [11] DHCPDISCOVER from

00:e0:7b:04:fb:01 via 192.168.60.1

08/26/2003 14:47:51 0 tDhcpServer [11] DHCPOFFER of 192.168.60.11 to 00:e0:7b:04:fb:01 via 192.168.60.1

08/26/2003 14:47:56 0 tDhcpServer [11] DHCPREQUEST for 192.168.60.11 from 00:e0:7b:04:fb:01 via 192.168.60.1

08/26/2003 14:47:56 0 tDhcpServer [11] DHCPACK of 192.168.60.11 to

00:e0:7b:04:fb:01 via 192.168.60.1

相关主题