IPv6 and PC Provisioning in a DOCSIS Network. With IPv6 on the way in a number of MSO (Multi-System Operator) networks, I have received numerous questions lately about how home devices such as routers and PCs attached to DOCSIS cable modems will get their IP addresses. Will cable operators suddenly start issuing IPv6 IP addresses to their customers? Will you as a subscriber need to upgrade your equipment to support IPv6? Or does the cable modem act as a Network Address Translation (NAT) device and hand-out IP address to each device attached to it? These are some very good questions and the answers are addressed in the DOCSIS specification as I will outline.
A term I need to introduce that is common in DOCSIS speak is Customer Premise Equipment or CPE. CPE means any internet protocol device that is connected to the LAN port of the cable modem. So from here on, I will use CPE instead of router, PC, etc., but you should understand that the CPE is a device you own that is being issued an IP address from the cable operator's DOCSIS network. Also, I will be talking about IPv4 and IPv6. If you are not familiar with these, please refer to my post "DOCSIS 3.0 Tutorial – DOCSIS Does IPv6"
First it is important to recall that DOCSIS cable modems are given an IP address during the cable modem provisioning process by a DHCP server. (You can learn more about this by reviewing this post: DOCSIS and Cable Modems – How it works :: Cable Modem Registration) DOCSIS uses the same DHCP server to provision CPE equipment as it does to provision cable modems. But how does the DHCP server tell the difference between a cable modem and a CPE device? When the cable modem sends its DHCP discover request to the CMTS this message arrives on an RF coax cable attached to the CMTS. The connector that the coax cable is connected to is associated with an interface card. Each CMTS can have multiple interface cards each having one or more downstream channels and multiple upstream channels. The CMTS keeps track of the cards by assigning them X/Y addresses, where X is the downstream channel number and Y is the upstream channel number. As an example, if a cable modem is connected to downstream channel #2 and upstream channel #4 by a coax cable, then the CMTS would identify that modem as being connected to cable interface 2/4 (note that each interface card only has a limited number of valid logical connections). As in previous examples, I have shown the running-configuration file, which is the instruction set for how the CMTS operates. The CMTS operator must configure each interface card so that it assigns a range of IP addresses for the cable modems and a secondary range of IP addresses for CPEs. Here is an example of what this configuration would look like for our example interface, 2/4:
int cable 2/4 ip address 10.0.1.1 255.255.255.0
! This is the PRIMARY address on the CMTS (note it is a 24 bit subnet mask).
ip address 220.127.116.11 255.255.255.0 secondary
! This will be the primary scope for the CPEs.
Now when the cable modem's DHCP messages arrive at int cable 2/4, the CMTS will forward those requests to the DHCP server using a relay agent, also called a giaddr in CMTS speak. The CMTS will remember the MAC address of the cable modem for any future DHCP messages which would be form CPE devices and assign them to the secondary IP range. When the DHCP server receives the incoming DHCP request from the relay agent, it will see that the range is in the 10.0.1.1 scope from the CMTS. The DHCP server will follow the rules setup for this scope. If the cable operator is using IPv6, then the DHCP server will issue an IPv6 IP address to the cable modem. The use of a relay agent by the CMTS is explained in the DOCSIS CM-SP-MULPIv3.0 specification in section 18.104.22.168:
“DOCSIS assumes the use of DHCP for provisioning of CPE devices. To that end the CMTS supports a DHCP relay agent which allows the operator to associate a CPE IP Address request with the subscriber Cable Modem MAC Address. This feature is also used as the basis of a mechanism that prevents spoofing of IP Addresses. DOCSIS 3.0 gives operator the option to provision CPE devices with an IPv4 or an IPv6 or both types of IP Addresses simultaneously.”
Once the cable modem completes its provisioning with the DOCSIS network, other CPE equipment can begin their provisioning on the IP network. At this time the CPE equipment will send a DHCP discover message to the cable modem which will forward that message to the CMTS. The DOCSIS CM-SP-MULPIv3.0 specification explains how this is done in section 22.214.171.124:
“The CM maintains a forwarding database (bridging table) including entries for the CM’s own MAC address and CPE MAC addresses. The CM MUST acquire CPE Ethernet MAC addresses, either from the provisioning process or from learning, until the CM acquires its maximum number of CPE MAC addresses (the lesser of the Max CPE from the config file (Annex C.1.1.7, Max CPE) or a device-dependent value). Once the CM acquires its maximum number of CPE MAC addresses, then newly discovered CPE MAC addresses MUST NOT replace previously acquired addresses. The CM MUST support acquisition of at least 64 CPE MAC addresses.”
When the DHCP server receives the CPE DHCP request forwarded by the CMTS (using the same relay agent as in the cable modem case), the DHCP server will see that the CMTS has now appended the secondary IP scope from the running-config (ip address 126.96.36.199 255.255.255.0 secondary). The DHCP server will have a different set of rules for CPE devices than it does for cable modems. It would be highly unlikely that cable operators would expect their subscribers (you and I) to have equipment that supports IPv6. Therefore, the DHCP server will be configured to send out the older IPv4 IP address to CPE devices so that the existing CPE equipment in our homes and offices do not have problems obtaining an IP address. Of course over time this may change as home users upgrade equipment, but not likely in the near future.
To summarize, there is typically only one DHCP server (not including the back-up server) which provides IP addresses to cable modems, set-top boxes, and any device connected to the cable modem. Keep in mind that if you have a router connected to the cable modem that has a NAT, your router will have its own DHCP server and therefore will be providing IP address to your devices locally. However the router itself will have received an IP address from the cable operator's DHCP server. You are unlikely to receive IPv6 addresses anytime in the near future because because cable operators will assume your home equipment will not support it even if your cable modem does obtain an IPv6 IP address. The rules for this are handled in the DHCP server.
For more reading on DHCP servers, be sure and check out the DHCP handbook. The authors are actively involved in the development of DHCP standards and the ISC DHCP reference implementation, so it’s difficult to find a more authoritative source.