Can someone clarify about DHCP settings in cable modems, the IP addresses assigned to CM always shown within private IP address range (10.x.x.x), and they also need have public IP addresses to communicate with WAN network. When the modem DHCP settings are mentioned (in any context), does this refers to internal IP addresses or external IPs?
Let's start with some basic terminology first:
A cable modem is a network bridge, as such it is transparent to network traffic. You assign a management ip to the cable modem, so that it can TFTP its configuration file, and can also be used for snmp queries etc... Typically this is a RFC1918 ipv4 address e.g. 10.xxx.xxx.xxx or 192.168.xxx.xxx but this is not a requirement, you could just as easily assign a public ip or an IPV6 address (docsis 3.0 cmtses only). A cable modem typically only has one ethernet port on it. Some cable modems also integrate a Router and/or an MTA (phone adapter) these devices are considered client devices and the statements in the following paragraph apply.
Whatever you connect to the cable modem, e.g. laptop, desktop or router, I call these devices, client device(s). Each client device if doing dhcp would send an dhcp discover to the network, this is received by the CMTS and forwarded to the cable-helper-address. Typically, based on what ip the cable modem got, which is forwarded to the dhcp server also, the client device will receive an ip, typically public, in an appropriate subnet.
Ok back to the original question:
When a cable modem dhcps, it expects the following, ip-address, subnet mask, router, tftp server, config file name. It uses the dhcp response to setup its ip interface and go on to the next step of the process to come online which is config file download. After the modem comes online, its client device(s) then request their dhcp where typically the public ip address are given. When they are talking about dhcp for the cable modem it is refering to the (typically) private ip address assigned to the modem necessary for tftp config download. When they are talking about external ips, they are typically talking about the client devices dhcp process, which is a totally separate thing. Why this is sometimes confusing, is because many cable modems available today also integrate a router (wifi) and/or MTA (phone) into the same device. Though they physically housed in the same device they are considered 2 or more devices when it comes to provisioning dhcp addresses to.
Thank you for very helpful explanation.
There is one point not clear. The cable modem have private ip address assigned to the modem necessary for tftp config download, ok. But a TFTP server always have a public IP address and thus, device with private IP addresses cannot directly connect to public IP address. How this is resolved?
IP Routing, you've ever heard of it?
One of 2 possibilities:
1) DHCP server is local to the CMTS - then it can talk on the provider's network without going out on the net.
2) The CMTS has some kind of tunnel back to a NOC (Network Operations Center) where a centralized DCHP exists.
Under option 2 - the DHCP/TFTP server does not have to be on a public IP. It could be on a private IP as well.