cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
814
Views
0
Helpful
4
Replies

Dumping DHCP binding table to FTP server

ochocobull
Level 1
Level 1

Good Morning,

I am new to Cisco and I was hoping to enlist the help of someone much smarter then me on a problem I am having. The background is that I work for a smaller WISP and we are wanting to dump the DHCP binding table each hour to a centralized location for security purposes. This location can be an FTP or a TFTP server I don't have a preference. I have setup a debian FTP/File Server with a USB hard drive attached.The hard drive is ext3 and the folder created has all permissions in the world. We have 7 3550, 48 port switches deployed across out network. My goal is to write a small script that will do the following tasks:

  1. FTP the desired switch
  2. log on using the user name and password credentials
  3. FTP the DHCP binding table back to the centralized server by running the following command "sho ip dhcp binding | tee ftp://ftp_server_address"

Now my question is how to I specify a folder location and file name so that I can begin to organize these files as they come in?

Any help would be greatly appreciated and if there is anything that you need from me please let me know.

1 Accepted Solution

Accepted Solutions

You won't be able to add the FTP server directory to the tee destination.  Since you are using a script, wouldn't it be easier to have the script navigate to the folder you want to use and then have the "sho ip dhcp binding | tee ftp://ftp_server_address" output redirected then?  Let me know.

View solution in original post

4 Replies 4

Antonio Knox
Level 7
Level 7

You would have to do that on the FTP server side.  Configurations may differ based on the FTP server software you use.

Please rate if helpful.

Hi Antonio,

And thank you for the quick response. I apologize for being vague. Shouldn't there be a syntex in the switch command that will allow you to specify the folder and file name? Thanks again for the help and if there is anything else you need please let me know.

You won't be able to add the FTP server directory to the tee destination.  Since you are using a script, wouldn't it be easier to have the script navigate to the folder you want to use and then have the "sho ip dhcp binding | tee ftp://ftp_server_address" output redirected then?  Let me know.

Hi Antonio,

I believe I was over thinking this the command on the switch should be "sho ip dhcp binding | tee ftp://ftp_server_address/folder/file"

Thanks for your patience while I figured this out the hard way.

And of course you are right your way would exactly as you describe.