Configuring DHCP+TFTP for DOCSIS

Recently, it was necessary to configure the issuance of IP addresses to several old DOCSIS modems and the host located after the modem.
At hand was the Arris Cadant C3 and Thomson TCM-420 modems.

First of all, let’s start a DHCP server that will issue IP addresses to modems, for example, as I described in this article – Installing and configuring isc-dhcp-server.
And also we will launch a TFTP server on which there will be files for modems, for example, as I described in the article – Installing and Configuring a TFTP Server

On Arris Cadant C3, I configured DHCP relay:

interface Cable 1/0
ip dhcp relay
ip dhcp relay information option
no ip dhcp relay validate renew
ip dhcp relay non-broadcast
cable helper-address 192.168.5.1
cable helper-address 192.168.5.2 cable-modem
cable helper-address 192.168.5.1 host
no cable dhcp-giaddr

I specified different DHCP for clients and for modems, because I used Accel-ppp to issue clients, but he doesn’t know how to work with files.
Having started isc-dhcp-server, I specified in the /etc/dhcp/dhcpd.conf configuration file:

log-facility local6;
shared-network cable {
 
subnet 172.17.0.0 netmask 255.255.0.0 {
option routers 172.17.0.1;
option domain-name-servers 8.8.4.4, 8.8.8.8;
option log-servers 192.168.5.2;
option subnet-mask 255.255.0.0;
default-lease-time 86400;
max-lease-time 86400;
option tftp-server-name "192.168.5.2";
option time-servers 192.168.5.2;
next-server 192.168.5.2;
 
host modem_80c6aba7479a {hardware ethernet 80:c6:ab:a7:47:9a; fixed-address 172.17.128.101; filename "80c6aba7479a.dcs";}
host modem_80c6aba7da0c {hardware ethernet 80:c6:ab:a7:da:0c; fixed-address 172.17.128.102; filename "80c6aba7da0c.dcs";}
}
}

After editing the configuration, restart isc-dhcp-server:

sudo service isc-dhcp-server restart

I created the *.dcs files using the docsis utility (https://files.ixnfo.com/Firmware/Arris/docsis.zip) and executing the command:

./docsis -e /docsis/profile_mod.txt /docsis/key /srv/tftp/80c6aba7479a.dcs

Content /docsis/key:

12345

The contents of /docsis/profile_mod.txt for Thomson TCM-420 (in which you need to specify the MAC modem, IP modem, IP host):

Main {
/* modem MAC 80:c6:ab:a7:47:00  172.17.128.254*/
/* connected hosts: 1 */
 
NetworkAccess 1;
 
ClassOfService {
        ClassID 1;
        MaxRateDown 9999999;
        MaxRateUp 2999999;
        PriorityUp 7;
}
 
SnmpMibObject .1.3.6.1.2.1.69.1.2.1.5.1 Integer 3; /* NmAccessControl - readWrite(3) */
SnmpMibObject .1.3.6.1.2.1.69.1.2.1.7.1 Integer 4; /* NmAccessStatus - CandGo(4) */
 
SnmpMibObject .1.3.6.1.2.1.69.1.6.3.0 Integer 1; /* docsDevFilterIpDefault discard(1), accept (2) */
 
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.3.1 Integer  2; /* IpControl discard(1), accept(2), policy(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.4.1 Integer  0; /* IpIfIndex both interfaces(0) Ethernet(1) CATV(2)     */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.5.1 Integer  3; /* IpDirection inbound(1), outbound(2), both(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.6.1 Integer  1; /* IpBroadcast true(1), falce(2) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.11.1 Integer 256; /* IpProtocol any(256) udp(17) icmp(1) tcp(6) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.12.1 Integer 67; /* IpSourcePortLow */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.13.1 Integer 68; /* IpSourcePortHigh */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.2.1 Integer  4; /* IpStatus CandGO (4) */
 
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.3.2 Integer  2; /* IpControl discard(1), accept(2), policy(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.4.2 Integer  0; /* IpIfIndex both interfaces(0) Ethernet(1) CATV(2)     */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.5.2 Integer  3; /* IpDirection inbound(1), outbound(2), both(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.6.2 Integer  2; /* IpBroadcast true(1), falce(2) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.11.2 Integer 256; /* IpProtocol any(256) udp(17) icmp(1) tcp(6) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.12.2 Integer 67; /* IpSourcePortLow */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.13.2 Integer 68; /* IpSourcePortHigh */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.2.2 Integer  4; /* IpStatus CandGO (4) */
 
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.3.3 Integer  1; /* IpControl discard(1), accept(2), policy(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.4.3 Integer  0; /* IpIfIndex both interfaces(0) Ethernet(1) CATV(2)     */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.5.3 Integer  3; /* IpDirection inbound(1), outbound(2), both(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.6.3 Integer  2; /* IpBroadcast true(1), falce(2) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.7.3 IPAddress  0.0.0.0; /* IpSaddr */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.8.3 IPAddress 0.0.0.0; /* IpSmask */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.9.3 IPAddress 192.168.100.1; /* IpDaddr */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.10.3 IPAddress 255.255.255.255; /* IpDmask */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.11.3 Integer 256; /* IpProtocol any(256) udp(17) icmp(1) tcp(6) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.12.3 Integer 80; /* IpSourcePortLow */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.13.3 Integer 80; /* IpSourcePortHigh */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.2.3 Integer  4; /* IpStatus CandGO (4) */
 
/* processing host 1 address  172.17.1.254 */
 
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.3.6 Integer  2; /* IpControl discard(1), accept(2), policy(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.4.6 Integer  0; /* IpIfIndex both interfaces(0) Ethernet(1) CATV(2)     */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.5.6 Integer  3; /* IpDirection inbound(1), outbound(2), both(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.6.6 Integer  2; /* IpBroadcast true(1), falce(2) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.7.6 IPAddress 172.17.1.254; /* IpSaddr */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.8.6 IPAddress 255.255.255.255; /* IpSmask */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.9.6 IPAddress 0.0.0.0; /* IpDaddr */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.10.6 IPAddress 0.0.0.0; /* IpDmask */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.11.6 Integer 256; /* IpProtocol any(256) udp(17) icmp(1) tcp(6) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.2.6 Integer  4; /* IpStatus CandGO (4) */
 
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.3.7 Integer  2; /* IpControl discard(1), accept(2), policy(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.4.7 Integer  0; /* IpIfIndex both interfaces(0) Ethernet(1) CATV(2)     */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.5.7 Integer  3; /* IpDirection inbound(1), outbound(2), both(3)  */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.6.7 Integer  2; /* IpBroadcast true(1), falce(2) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.7.7 IPAddress  0.0.0.0; /* IpSaddr */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.8.7 IPAddress 0.0.0.0; /* IpSmask */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.9.7 IPAddress 172.17.1.254; /* IpDaddr */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.10.7 IPAddress 255.255.255.255; /* IpDmask */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.11.7 Integer 256; /* IpProtocol any(256) udp(17) icmp(1) tcp(6) */
SnmpMibObject .1.3.6.1.2.1.69.1.6.4.1.2.7 Integer  4; /* IpStatus CandGO (4) */
 
MaxCPE 1;
}

After receiving the IP from the isc-dhcp-server, each modem will download its file from the TFTP server, then the client will start receiving the IP from the DHCP specified in the Arris Cadant C3 configuration, the number of successfully registered modems can be seen on the Arris Cadant C3 by entering the command:

show cable modem summary

In /var/log/syslog, you can see the isc-dhcp-server and tftp logs, for example:

Sep 27 23:10:55 dhcpd: DHCPDISCOVER from 00:18:c0:24:66:5e via 172.17.0.3
Sep 27 23:10:55 dhcpd: DHCPOFFER on 172.17.128.65 to 00:18:c0:24:66:5e via 172.17.0.3
Sep 27 23:10:57 dhcpd: DHCPREQUEST for 172.17.128.65 (10.0.0.18) from 00:18:c0:24:66:5e via 172.17.0.3
Sep 27 23:10:57 dhcpd: DHCPACK on 172.17.128.65 to 00:18:c0:24:66:5e via 172.17.0.3
Sep 27 23:10:58 atftpd[1239]: Serving 0018c024665e.dcs to 172.17.128.65:4946

See also my articles:
Script backup configuration DOCSIS ARRIS Cadant C3 CMTS
Configuring Arris Cadant C3
OID and MIB list for Arris Cadant C3

Leave a comment

Leave a Reply