DHCP configuration for more than one CMTS | docsis.org

You are here

DHCP configuration for more than one CMTS

8 posts / 0 new
Last post
deividfiguer
DHCP configuration for more than one CMTS

Hello

Help me to configure the DHCP that assigns an IP of a network based on the CMTS from where the cable modem is making the request

I want to have more than one cmts and that the IP network of the modems are assigned according to the cmts where they are connected.

I am attentive to your help

regards

serykh
More information

What is your СMTS and DHCP?

deividfiguer
DHCP configuration for more than one CMTS

Hi
I have a CMTS C100G Casa System, the plan is to put more CMTS to work

I need DHCP to allow me to intelligently assign an IP to the cable modems that allows it to navigate the ip network managed by the CMTS to which the cable modem is physically connected.

The dhcp is isc-dhcp-server, installed in Ubuntu

regards

kwesibrunee
Given the following

Given the following configuration on CMTS

CMTS1
interface ip-bundle 1
ip-address 10.1.0.1 255.255.255.0
ip-address 192.168.1.1 255.255.255.0 secondary
cable helper-address 172.16.0.1;

CMTS2
interface ip-bundle 1
ip-address 10.2.0.1 255.255.255.0
ip-address 192.168.2.1 255.255.255.0 secondary
cable helper-address 172.16.0.1;

In dhcpd terms you would use a shared-network on the dhcpd server to have the dhcp server treat two separate networks as if they were one network. Meaning if a request comes in on either subnet respond. Then use dhcpd classes to determine whether the device is a CM or CPE and assign it to the appropriate subnet. You would add one shared-network for each CMTS you have.

Here is a barebones config for the previous CMTS configs (assuming your DHCPD server is your TFTP/TOD server also) added as attachment also so you can see formatting correctly

# Sets log facility
log-facility local1;

# Allow leasequery i.e. source-verify dhcp
allow leasequery;

# set server-identifier
server-identifier 172.16.0.1;

ignore client-updates;

# Remember Agent info in leases file
stash-agent-options on;

# One lease per client
one-lease-per-client true;

#Lease Times can be overridden below
default-lease-time 604800;
max-lease-time 604800;
min-lease-time 302400;

# Time offset for TOD (This is CST)
#Fall
#option time-offset -21600;
#Spring
option time-offset -18000;

# Cable Modem Class
class "CM" {
# only match if first 6 chars of option 61 are docsis
match if (substring(option vendor-class-identifier,0,6) = "docsis");
spawn with hardware;
}
# Match anything Else
class "CPE" {
match if ((substring(option vendor-class-identifier,0,6) != "docsis"));
spawn with hardware;
}

# subnet of listening IP on dhcp Server
# just needs to be there to have server listen
subnet 172.16.0.1 netmask 255.255.255.0 {

}

# create groups for common options very useful for assigning config files to modems
group Gold {
filename = "gold.bin";
option bootfile-name = "gold.bin";
}

# subnet for first CMTS IP-BUNDLE ips
shared-network CMTS1 {
# subnet for modems
subnet 10.1.0.0 netmask 255.255.255.0 {
# Required Options
option tftp-server-name "172.16.0.1";
option time-servers 172.16.0.1;
option log-servers 172.16.0.1;
next-server 172.16.0.1;
pool {
# only assign IPs to modems we know of, prevents people from just hooking up a modem and getting service
deny unknown-clients;
allow members of "CM";
deny members of "CPE";
range 10.1.0.2 10.1.0.254;
}
}
#subnet for CPEs, repeat as necessary
subnet 192.168.1.0 netmask 255.255.255.0 {
# required options
name-servers 4.2.2.2, 8.8.8.8;
pool {
allow unknown-clients;
allow members of "CPE";
deny members of "CM";
range 192.167.1.2 192.168.1.254;
}
}
}

# subnet for second CMTS IP-BUNDLE ips
shared-network CMTS2 {
# subnet for modems
subnet 10.2.0.0 netmask 255.255.255.0 {
# Required Options
option tftp-server-name "172.16.0.1";
option time-servers 172.16.0.1;
option log-servers 172.16.0.1;
next-server 172.16.0.1;
pool {
deny unknown-clients;
allow members of "CM";
deny members of "CPE";
range 10.2.0.2 10.2.0.254;
}
}
#subnet for CPEs, repeat as necessary
subnet 192.168.2.0 netmask 255.255.255.0 {
# required options
name-servers 4.2.2.2, 8.8.8.8;
pool {
allow unknown-clients;
allow members of "CPE";
deny members of "CM";
range 192.167.2.2 192.168.2.254;
}
}
}

# this is how you "authorize" modems and assign them configs
host device1 {
hardware ethernet 00:17:10:1b:09:de;
group "Gold";
}

END of CONFIG

There are several other topics you probably need to familiarize yourself with when it comes to DHCPD:

Host Entries -- These are how you "authorize" devices (in dhcpd this is a "known" device)

Groups -- This will save you some config specific settings and make your config look cleaner group common options together and assign them to devices. Typically this would be used to assign modem config files where you could set both filename and option boot-file with one config stanza instead of two.

known-client versus unknown-client -- A known client is a device that has a host entry in the DHCPD.conf file or in the dhcpd.leases file if your using OMAPI. This is used to "authorize" cable modems and assign device specific options (i.e. modem config file name) to individual modems. CPEs can be unknown (i.e. we don't care what device connects just give it an ip)

OMAPI -- Programable interface to add/remove objects to the dhcpd.leases file i.e. hosts/leases a necessity if you don't want to manipulate dhcpd.conf file to add/remove modems (as this requires the dhcpd server to restart to take effect). Changes made with OMAPI are live without server restart. Be forewarned the interface is a little tricky. If you don't use OMAPI each modem must be added as host entry in dhcpd.conf and the config reloaded/service restarted, each time you want to make a change.

be sure to read the MAN pages for dhcpd there is a lot of flexibility in dhcpd and this only scratches the surface.

File attachments: 
deividfiguer
DHCP configuration for more than one CMTS

Hello

Thank you very much for your help

I tried it and it works fine

Can you please help me to know the IP address of the cable modem knowing the address mac through SNMP to the CMTS C100G Casa Systems

I currently have a script that goes through all the dhcp leases and captures the ip and then stores it in a Database,

having two CMTS running with two different ip networks this option is no longer efficient

Can you please help me with a way to know the real time ip address of the cable modems

regards

kwesibrunee
CM Mac Address to CM IP Address

Depends on whether you want a standards based way (2 SNMP Gets) or Casa Specific (1 SNMP Get)

CableLabs Way -- Should work on any Cable Labs Compliant CMTS

query the following oid 1.3.6.1.2.1.10.127.1.3.7.1.2 (docsIfCmtsCmPtr) with an index of a mac address with each octet converted to a decimal i.e.

given the mac 99.22.11.44.55.2D you would query 1.3.6.1.2.1.10.127.1.3.7.1.2.153.34.17.68.85.45 this will give you the Pointer (id) of that modem

with the id you would then query 1.3.6.1.2.1.10.127.1.3.3.1.3 (docsIfCmtsCmStatusIpAddress) which would give you the ipAddress of the modem i.e. given the pointer of 5600 you would query 1.3.6.1.2.1.10.127.1.3.3.1.3.5600

Note that docsIfCmtsCmStatusIpAddress is deprecated, because it is not ipv6 aware, you can also use 1.3.6.1.4.1.4491.2.1.20.1.3.1.5 (docsIf3CmtsCmRegStatusIPv4Addr) and 1.3.6.1.4.1.4491.2.1.20.1.3.1.3 (docsIf3CmtsCmRegStatusIPv6Addr) for more up to date versions, the same pointer should be the index for those entries as well.

Casa Specific Way:
use this oid for ipv4 1.3.6.1.4.1.20858.10.12.1.3.1.3 (casaCmtsCmCpeIpAddress) and this one 1.3.6.1.4.1.20858.10.12.1.3.1.8 (casaCmtsCmCpeIpv6Address) for ipV6. Both of these are also indexed by the mac address with each octet converted to decimal base10 as above.

e.g. given mac of 99.22.11.44.55.2d you would query 1.3.6.1.4.1.20858.10.12.1.3.1.3.153.34.17.68.85.45 to get the ipv4 address.

deividfiguer
DHCP configuration for more than one CMTS

Hi

I am consulting by snmp the mac address of the cable modems in the CMTS and then comparing the IP of each modem with the index, using these oids:

1.3.6.1.2.1.10.127.1.3.3.1.9 status
1.3.6.1.2.1.10.127.1.3.3.1.3 IP
1.3.6.1.2.1.10.127.1.3.3.1.2 mac

When I execute this command:
snmpwalk -v 2c -c snmp_community ip_cmts 1.3.6.1.2.1.10.127.1.3.3.1.2

I have in some lines results like the ones I show below, where it is not a valid mac address, why does this happen and how can I solve it.

iso.3.6.1.2.1.10.127.1.3.3.1.2.17907 = STRING: "0`#tG?"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17921 = STRING: "$v}Ffb"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17940 = STRING: "P9UG5Q"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17946 = STRING: "P9UY`i"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17989 = STRING: "P9Ub92"

This is part of the complete result:

iso.3.6.1.2.1.10.127.1.3.3.1.2.17903 = Hex-STRING: 60 2A D0 89 69 0D
iso.3.6.1.2.1.10.127.1.3.3.1.2.17904 = Hex-STRING: 7C BF B1 5C C2 BC
iso.3.6.1.2.1.10.127.1.3.3.1.2.17905 = Hex-STRING: 60 2A D0 7B 75 2D
iso.3.6.1.2.1.10.127.1.3.3.1.2.17907 = STRING: "0`#tG?"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17908 = Hex-STRING: E8 6D 52 71 FF 58
iso.3.6.1.2.1.10.127.1.3.3.1.2.17909 = Hex-STRING: 14 5B D1 C1 FA AE
iso.3.6.1.2.1.10.127.1.3.3.1.2.17910 = Hex-STRING: C8 FB 26 7C FF EC
iso.3.6.1.2.1.10.127.1.3.3.1.2.17918 = Hex-STRING: E4 83 99 6A 2B 73
iso.3.6.1.2.1.10.127.1.3.3.1.2.17919 = Hex-STRING: 7C B2 1B 22 0E 2F
iso.3.6.1.2.1.10.127.1.3.3.1.2.17921 = STRING: "$v}Ffb"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17923 = Hex-STRING: C8 FB 26 7E 23 63
iso.3.6.1.2.1.10.127.1.3.3.1.2.17925 = Hex-STRING: 18 59 33 47 D9 17
iso.3.6.1.2.1.10.127.1.3.3.1.2.17932 = Hex-STRING: BC C8 10 06 E4 10
iso.3.6.1.2.1.10.127.1.3.3.1.2.17934 = Hex-STRING: 50 39 55 61 82 12
iso.3.6.1.2.1.10.127.1.3.3.1.2.17937 = Hex-STRING: BC C8 10 54 71 C8
iso.3.6.1.2.1.10.127.1.3.3.1.2.17939 = Hex-STRING: 18 59 33 41 09 2A
iso.3.6.1.2.1.10.127.1.3.3.1.2.17940 = STRING: "P9UG5Q"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17942 = Hex-STRING: 60 2A D0 8F 26 E5
iso.3.6.1.2.1.10.127.1.3.3.1.2.17945 = Hex-STRING: 18 59 33 F5 AE 0C
iso.3.6.1.2.1.10.127.1.3.3.1.2.17946 = STRING: "P9UY`i"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17947 = Hex-STRING: 50 39 55 59 97 41
iso.3.6.1.2.1.10.127.1.3.3.1.2.17949 = Hex-STRING: 50 39 55 55 D1 29
iso.3.6.1.2.1.10.127.1.3.3.1.2.17951 = Hex-STRING: C8 FB 26 43 C4 9D
iso.3.6.1.2.1.10.127.1.3.3.1.2.17986 = Hex-STRING: 00 23 BE E8 F3 C8
iso.3.6.1.2.1.10.127.1.3.3.1.2.17989 = STRING: "P9Ub92"
iso.3.6.1.2.1.10.127.1.3.3.1.2.17990 = Hex-STRING: C8 FB 26 41 DA AC
iso.3.6.1.2.1.10.127.1.3.3.1.2.17991 = Hex-STRING: 7C B2 1B 1A EF 96
iso.3.6.1.2.1.10.127.1.3.3.1.2.17993 = Hex-STRING: 7C B2 1B C2 C5 C7

the complete result shows fewer lines than the total number of modems registered in the cmts when I show the command "show cable modem summary total"

Please help me with these questions and how to solve them

Thanks

regards

kwesibrunee
net-snmp will treat an octet

net-snmp will treat an octet string (what is returned when you query the mac address) as an ascii string if the first character is a printable ascii character (hex 20-7e), you can force it to not do that by using the -Ox (capitalization is important) flag in the snmpwalk command -OQ will remove the Hex-STRING: part of the response also

i.e. snmpwalk -v 2c -c snmp_community -OQx ip_cmts 1.3.6.1.2.1.10.127.1.3.3.1.2

Alternatively, if you install the correct MIB onto your machine, in the correct directory (usually /usr/lib/snmp/mibs/) net-snmp will know how to treat the data properly. The oid 1.3.6.1.2.1.10.127.1.3.3.1.2 is from https://www.circitor.fr/Mibs/Html/D/DOCS-IF-MIB.php you also should load mibs imported by DOCS-IF-MIB i.e. SNMPv2-SMI, SNMPv2-TC, SNMPv2-CONF, IF-MIB,INET-ADDRESS-MIB, IANAifType-MIB

Log in or register to post comments