cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
486
Views
0
Helpful
5
Replies

DHCP Database on 3560G (EMI Image)

rsabapathee
Level 1
Level 1

1. I have set up 2 DHCP Pools on the 3560.

Pool1

network 192.168.2.0 255.255.255.0

Pool2

network 192.168.3.0 255.255.255.0

2. Network 192.168.2.x is set up as VLAN2 and network 192.168.3.x as VLAN3.

3. I would like to set up a DHCP Database for network 2.x only with a text file with all MAC addresses and Binding IP address.

4. I have uploaded the text file to the flash of the 3560.

5. I would like to know the configuration to ensure that the 3560 will read the text file and associate the defined IP address to the MAC address of the client.

Thx

5 Replies 5

allan.thomas
Level 8
Level 8

The following command ensures that the dhcp bindings are written to a specific file on the flash, in this example the file is called dhcp-file.

The destination path does not specifically have to be the flash, it can also be a FTP server. However you need to ensure that the FTP server is accessible at all times with appropriate credentials for writing to the file.

ip dhcp database flash://dhcp-file

or

ip dhcp database ftp://user:password@172.16.1.1/dhcp-file write-delay 120

The command write-delay stipulates that the bindings will be updated every 2 minutes instead of dynamically.

Hope this helps.

Regards

Allan.

thanks

I have 2 dhcp pools configured.

1. Will this single file work for both pools? or should I create two files for each? If so, what config to use?

2. I have already uploaded a text file with MAC address to IP binding. Should I add the .txt extension? ie. dhcp-file.txt

3. This is a test dhcp-config file. I dont quite understand when to use type 1 or type id. Please clarify.

*time* Dec 04 2007 11:00 AM

*version* 2

!IP address Type Hardware address Lease expiration

192.168.3.20 /24 1 0009.4554.21EA Infinite

*end*

Thanks

The file will be updated with all dhcp bindings at an interval predetermined by yourself within the command regardless of howmany dhcp pools you have configured.

Essentially you shouldn't need to create a file, this is created automatically. If you configure the command, you can then look view the file using more on the gateway to verify the format if you wish.

Regards

Allan.

Ah OK. So my concept was wrong. I thought I could create a text file with all the IP to MAC addr bindings which I wanted to be permanent.(rather than entering each one through the CLI).

In fact its the other way round, its actually the server writing the current IP to MAC bindings to the text file.

Is that correct? If so, the the first point is not possible to achieve.

That right, ordinarily the DHCP server will create the bindings and update the file accordingly.

However when the bindings file is read following a reload if you have the file in correct format, so I cannot see why the IP addresses in the bindings cannot be allocated when a request is made by the client. Unfortunately I have not tried it this way, you certainly try it?

Regards

Allan.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: