docsis_server Project Home Page

Executive Summary
docsis_server is a combination DHCP server, TFTP server, Time of Day server, and a SYSLOG server.
In combination with a Data Over Cable Service Interface Specification (DOCSIS) Cable Modem Termination System (CMTS) the docsis_server is designed to boot up cable modems as well as customer PC equipment.

Detailed Explanation
The ISC dhcpd server is a very good dhcp server, *BUT* I needed to interface the DHCP server with a database and I also needed to support the special DHCP LEASE QUERY that the uBR Cisco 7246 VXR uses to verify users. We also required the ability to statically assign IP addresses to a MAC address. In other words we did not want the DHCP server to reassign IP addresses. Static IP addresses are an important marketing feature of our cable modem product.

Feature List
  • Entire Server
    • Designed to run with Redhat Linux 9.0 or Mandrake 10.1
    • Designed to run with Mysql version 3.x or version 4.x

  • DHCPd server
    • DOCSIS modems have their own database table with MAC, IP and config file.
    • Customer IPs are assigned based upon IP ranges.
    • Customer IP ranges can be static or dynamic. A customer with a static IP will keep that IP until he changes his ethernet MAC. A customer with a dynamic IP will get a different IP each time his lease runs out.
    • Cable modem MAC is also logged with each customer dhcp request. If you know which cable modem a customer has you also know which IP addresses he has.
    • The usual path for an incoming DHCP request is to query the incoming MAC against the DOCSIS table and if that does not have any result then query the customer MAC table.
    • The DHCP server also has mechanisms to speed up the recovery after the CMTS resets. The DHCP server caches all DOCSIS modem info in memory. If the load on the server goes above 0.75 or it receives more than 15 requests in 1 second it will start serving DOCSIS modem IPs from the in memory cache. It also suspends logging when the server load is high.
    • The Cisco CMTS keeps track of all the customer PC dhcp leases it forwards to the DHCP server. If the CMTS is reset it loses this information. At this point the DHCP server has given the Customer a lease of an IP address for a certain amount of time. The Customer PC will not attempt to renew the lease until it is almost out of time. When the CMTS sees traffic from an IP it does not know about it sends a special message called a DHCPLEASEQUERY to the DHCP server. This Lease query allows it to find out about DHCP leases that it has forgotten about.
    • TODO: add support for VoIP devices. ie. packet cable.
    • TODO: Version 2.1 will include a web interface to allow customers to manage their IP addresses.
    • TODO: Version 3.0 will include a web interface to manage the DB tables.

  • TFTP server
    • Version 2.0 now gives you the choice between dynamic and static config files.
    • Dynamic config files are generated from precompiled config fragments. When a config request is made the fragments are quickly appended to each other with an MD5 checksum and then sent to the modem.
    • Dynamic config files also enforce a measure of security. The file generated is based on the IP of the requesting modem as opposed to the file name requested. If a customers computer was to request a dynamic config file the tftp server will indicate the file does not exist.
    • When it receives a request for a static config file this TFTP server reads the file into memory as TFTP packets. This greatly speeds up the next request for the file.
    • If a file has not been accessed for a while or the file in question has been updated, the file will be purged from memory.
    • I would not recommend using this server to transfer extremely large files unless you have lots of RAM (hey its cheap buy more). We use it for Cisco IOS images of 10-15 MB without any problems.

  • TIME server
    • When I started developing this server the UDP time server included with Redhat 7.2 was broken so I added my own. It is a very simple protocol so the code is quite simple.

  • SYSLOG server
    • I needed a SYSLOG server to log to a Mysql database.
    • Each days events are stored in a new table.

How to Install Documentation

Download version 2.0.4 of docsis_server

Developed by is a nice DOCSIS discussion forum is a project to make DOCSIS modem config files