Home arrow Articles arrow Getting to Know arrow Getting to Know Dynamic Host Configuration Protocol (DHCP) II
 
     
Getting to Know Dynamic Host Configuration Protocol (DHCP) II PDF Print E-mail
User Rating: / 1
PoorBest 
Getting to Know - Networks
Written by Mohammed Alani   
Tuesday, 09 January 2007

Part 2 ? Implementation

In this part we will talk about implementing DHCP in two different platforms; Cisco routers and Windows 2003 servers.

1. Implementing DHCP in Cisco Routers:

The DHCP service is enabled by default on Cisco routers that support it. To disable it use the global configuration command (no service dhcp) and to re-enable it use the global configuration command (service dhcp). Getting DHCP to work in a Cisco router is simple. First, you define the pool from which the dynamic IP addresses will be assigned. And second you define the other parameters that you need like gateway, DNS server, NetBIOS, print server, and other addresses that you might need.

The global configuration command (ip dhcp excluded-address) is used to exclude some addresses from the pool so that they will not be assigned automatically. This reminds us of the tips of keeping the servers with static IP addresses and out of the DHCP pool.

Router(config)#ip dhcp pool POOLNAME

Router(dhcp-config)#network NET-ID SUBNETMASK

Router(dhcp-config)#default-router GATEWAY-IP-ADDRESS

Router(dhcp-config)#dns-server DNS-SERVER-ADDRESS

Router(dhcp-config)#domain-name DOMAIN-NAME

Router(dhcp-config)#netbios-name-server NETBIOS-SERVER-ADDRESS

Router(dhcp-config)#exit

Router(config)#ip dhcp excluded-address START-IP-ADDRESS END-IP-ADDRESS

where,

POOLNAME is the name of the pool (ex:AccountingLan)

NET-ID and SUBNETMASK are the network address of the DHCP pool and the subnet mask to be used (ex:192.168.0.0 255.255.255.0)

GATEWAY-IP-ADDRESS is the IP address of the default-gateway (ex:192.168.0.254)

DNS-SERVER-ADDRESS is the DNS server address and you can give more than one (ex:192.168.0.3)

DOMAIN-NAME is the domain name if you are working in a domain environment (ex: cisco.com)

NETBIOS-SERVER-ADDRESS is the IP address of the NetBIOS server (ex:192.168.0.5)

START-IP-ADDRESS and END-IP-ADDRESS are the first and last IP addresses of the range to be excluded from the pool. We usually reserve this range for servers. And you can also use a single IP address if you like to exclude only one and not a range.

One more thing we need to know about implementing DHCP in Cisco routers. Sometimes we decide to have only one DHCP server around for the network. And we know, by default, routers DO NOT forward broadcasts. So if the case is that we have a router in the way between the DHCP client and DHCP server, the router will not forward the request from the client to the server as it is a broadcast. In this case, we need to enable the forwarding of DHCP broadcasts in that router. This is done in the one of the two following ways:

Router(config-if)#ip helper-address DHCP-SERVER-ADDRESS

And this is implemented on the interface that is receiving the broadcast from the DHCP client.

Or,

Router(config-if)#ip directed-broadcast

This is implemented on the interface nearest to the DHCP server.

Router(config-if)#ip helper-address BCAST-ADRS-OF-DHCP-SRVR-NET

2. Implementing DHCP in Microsoft Windows Server 2003:

First you will have to check if the DHCP server component is installed or not. Go to Start menu and choose the ?Administrative Tools?. If ?DHCP? is there then you are on the safe side. If not, go to the Control Panel and choose ?Add/Remove Programs? and from within choose ?Add/Remove Windows Components? on the left panel and then double click on the ?Network Service? and tick the ?DHCP? box and go through with the installation steps (You will need the Windows Server 2003 CD).

Click on the ?DHCP? in the ?Administrative Tools? list from the Start menu. Now you will have the DHCP management console similar to the one below:

You will have you server name and IP address which in the example above is ?ciscoserver? and the domain name is ?mec.com? and the IP address is 10.0.0.1.

Now we will go into three phases of setup to get things going:

 I. Creating a scope:

A scope is the range of IP addresses to be given to DHCP clients. You can create more than one scope and each have different IP addresses and different other parameters.

Now right click on the server name and from the list choose ?New scope??

Now lets start with the scope settings. First you give the scope a name and description. When choosing a name, make the name as most descriptive as possible so you could identify the scope from the name. (Ex: CiscoLab)

After giving the name and description, you have to choose the range of the DHCP scope that will be used for IP address assignment to DHCP clients. Remember to make the range not very much bigger than the number of clients that you have and leave some address-space for the static addresses of servers and printers.

 

Now you can ?Add Exclusions?. In this stage, you can choose specific addresses or ranges of addresses to be excluded from the automatic assignment to DHCP clients. These excluded addresses can be the addresses of servers and printers too.

After setting the exclusions, you can set the lease time. This is the period of time in which the same addresses will be stuck to the same computers. You can choose it according to the type of network you are using. If you are setting a dial-up network, lease time should be small. But if you are setting an office network, you can have long lease time.

Now you should set the scope options. The scope options are the additional parameters that you can give to the DHCP clients like Default-Gateway, DNS server address, and NetBIOS server address ...etc.

You have two ways to do this; you can set these options specifically for the scope which is a good thing if you are setting multiple scopes, or you can set the options for the whole server such that all scopes will have the same options. And take into notice that the scope options override the server options, i.e., if you have for example three scopes of which two you want to use the same options for, you can set the server options and then set the scope options for the different scope only.

Either way, in the ?New Scope Wizard? now choose ?No? and configure the options later because configuring the options form the wizard will not give you the complete list of options.

You can choose to Activate the scope immediately or not. And because you have not set the options yet, you should choose ?No? too.

Now lets set either the scope options by right clicking the scope name and choosing ?Scope Options?? the server options by right clicking the server name and choosing the ?Server Options??.

We will have a long list of options like the on below. And usually only few of them are necessary to setup.

The options that we need to set usually are:

003 Router (Which is the Default-Gateway Address)

006 DNS Servers (We can have more than one)

015 DNS Domain Name

069 SMTP Servers

070 POP3 Servers 

 II. Activate the scope:

Right click on the scope name and choose ?Activate?

 III. Authorize the server:

Right click on the server name and choose ?Authorize?

Now we are good to go. And to check on the scope activities we can click on the scope name and then choose ?Address Pool? to see check the correct setting of the address pool. And to see the clients that started leasing the addresses choose ?Address Leases?.

Comments

Write Comment
Name:
Title:
Comment:

Thank you for writing a comment

Next >
 
Polls
Do you think that the CCNA exam needs to be upgraded ?
  
Bookmark Us
 
 

Newsletter Subscription

Get weekly updates of articles in CERTIFICATIONist.com




RSS Feeds
Stay in touch with whats new on CERTIFICATIONist.com

 Subscribe with FeedBurner


Add to Technorati Favorites
View blog reactions