DHCP Database on 3560G (EMI Image)

Unanswered Question
Dec 4th, 2007
User Badges:

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





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.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
allan.thomas Tue, 12/04/2007 - 17:53
User Badges:
  • Blue, 1500 points or more

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


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

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

Hope this helps.



rsabapathee Tue, 12/04/2007 - 23:41
User Badges:


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 /24 1 0009.4554.21EA Infinite



allan.thomas Wed, 12/05/2007 - 02:54
User Badges:
  • Blue, 1500 points or more

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.



rsabapathee Wed, 12/05/2007 - 10:18
User Badges:

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.

allan.thomas Wed, 12/05/2007 - 13:37
User Badges:
  • Blue, 1500 points or more

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?




This Discussion