Why Does A Cable Modem Take So Long To Boot? - Page 1
Forum section: electronics / general

author: German_EE
author_rank: Super Contributor
timestamp: September 18, 2019, 05:46:53 pm
content: I'm old enough to remember the days of 56K modems, in fact I can still remember the startup tones and how long they took to get online. Thirty seconds or so to dial, do the handshake, a bit of DHCP for your IP address and you're done.Fast forward to 2019 and my cable modem takes over four minutes from a cold start until I can access the browser home page. Various lights flash and it looks very impressive but what the hell is it doing for four and a half minutes?Note that this isn't a comms problem. We get the 150Mb that we pay for (Internet speed measuring sites have confirmed this) and once I'm actually online pages load fast and downloads are quick.I just wish I didn't have to wait nearly five minutes when we get home before we can get online.

author: Mr. Scram
author_rank: Super Contributor
timestamp: September 18, 2019, 05:54:29 pm
content: Why do you turn your cable modem off in the first place?

author: soldar
author_rank: Super Contributor
timestamp: September 18, 2019, 06:34:21 pm
content: Quote from: German_EE on September 18, 2019, 05:46:53 pmYou know, I remember them well and I could swear I can hear those same tones very faintly when my computer is connecting to the WIFI.I do not know why exactly your connection needs so long to establish the connection but I can imagine there is much more involved when connecting via cable. Maybe other customers need to be moved around. I would just leave the thing connected permanently.

author: Gyro
author_rank: Super Contributor
timestamp: September 18, 2019, 07:44:10 pm
content: Quote from: German_EE on September 18, 2019, 05:46:53 pmPah, sheer luxury! My first dial-up modem for my work home terminal was 1200 baud. Mind you, that was direct to a VAX cluster - no internet in those days, we had DECnet.EDIT:

author: Ice-Tea
author_rank: Super Contributor
timestamp: September 18, 2019, 08:10:39 pm
content: Booting a complete Linux OS mostly.

author: sokoloff
author_rank: Super Contributor
timestamp: September 18, 2019, 09:00:46 pm
content: Mine gets firmware from the cable company. I don’t know if that is every time, or if there’s a check and validate every time, but it’s long.That said, it happens a couple times a year, so I’ve never cared.

author: tszaboo
author_rank: Super Contributor
timestamp: September 18, 2019, 09:14:27 pm
content: "Uncompressing Linux... done, booting the kernel"And depending on the technology, the speed negotiation of the cable. The ISP expects you to have the modem on 24/7

author: soldar
author_rank: Super Contributor
timestamp: September 18, 2019, 09:24:07 pm
content: Quote from: Gyro on September 18, 2019, 07:44:10 pmWhen I started working, in the 70s, companies would aspire to get Telex service and, indeed, those were the golden years of Telex.In the 80s I got several computer like the Commodore PET but they did not have any modem.I started around 1987 with aTandy 200which incorporated a 300 baud modem with which I could connect to Compuserve and send messages through the Telex system.That Tandy 200 was a neat little machine. It ran MS-DOS, Word and Multiplan (precursor of Excel) directly from ROM and had no hard disk, only floppy.In the early 90s I saw modem speeds go up fast. First it was 1200, then 2400 and soon all the way up to the 56K limit.We were selling 1200 / 2400 baud modems to big companies like airlines. They were very expensive and included installation in the price. Companies were using concentrators so that several machines could share one transatlantic modem.When 1200/2400 became home consumer products, in the 90s, every Saturday, from Washington DC, I would call my friend in Madrid and we would exchange messages at a speed where you could see the characters as they appeared on the screen. This saved a long call. I believe for work I was still using Compuserve to access the Telex network.After the 56K limit was reached came ADSL and I was still working in that field. A few years ago, as fiber was replacing DSL I retired.

author: Gyro
author_rank: Super Contributor
timestamp: September 18, 2019, 09:58:53 pm
content: Quote from: soldar on September 18, 2019, 09:24:07 pmHey, my first job was designing part of an office based Telex management system! - a central 3U rack based routing system and message store, connected to a bunch of 'terminals' with ascii keyboards (it even handled the baudot letter and figure shifts!) and single line scrolling Sperry panaplex displays.

author: Monkeh
author_rank: Super Contributor
timestamp: September 18, 2019, 11:43:49 pm
content: Quote from: Ice-Tea on September 18, 2019, 08:10:39 pm'complete'...Even on an embedded device there's no reason that needs to take more than 30 seconds.

author: james_s
author_rank: Super Contributor
timestamp: September 19, 2019, 04:15:35 am
content: Well quite a lot of them do. Chalk it up to cost I suppose, or lazy development, at a former job we made DVRs which also contained a cable modem, they were broadcom based devices that ran Linux. Most of them would take 5+ minutes to boot, they did all sorts of stuff along the way, boot time was never something we really cared about because they had to be on 24/7 to be useful anyway.

author: rrinker
author_rank: Super Contributor
timestamp: September 19, 2019, 04:38:12 pm
content: My first modem was 300 baud, and it wasn't even auto-dial/auto answer, i had to pick up the phone and call the number, then flip the switch on the modem. And it took forver to dial - in those days it was like an extra $1/mo on the phone bill to have touch tone, and my Mom was too cheap for that, so we had rotary dialing only. A benefit was, if you were good at it, you could dial numbers just by flipping the switch hook.On my cable modem, you can access the device fairly quickly in the boot process, so I can log in and see it negotiate the rest of the connection. Most of the time seems spent connecting each subsequent upstream and downstream channel, one by one. Rarely happens though, mine is on 24/7. Not sure why you would turn it off.

author: MarkL
author_rank: Unknown
timestamp: September 19, 2019, 10:52:11 pm
content: Once the OS is booted, the RF can take a while to come up. The modem might have to search a large frequency space for a DOCSIS downstream carrier, and once found, perform a process called "ranging" where the modem starts transmitting at low power during specific ranging opportunity slots, while incrementally increasing power until the headend can hear it. Once the headend hears it, exact timing and power levels are set in another set of exchanges, the modem is authenticated, and then finally configured with and IP address and other provisioning information.The modem could also be told to go to a different freqeuncy and then ranging could start all over.It's also slow on purpose with random timers triggering the various states so that the system doesn't collapse if the headend reboots and thousands of modems are in contention to get back on line.There's a nice summary of the RF startup process in the "DOCSIS 3.0 MAC and Upper Layer Protocols Interface Specification", section 5.2.5.1:https://specification-search.cablelabs.com/CM-SP-MULPIv3.0Plus all the gory details if you want to read the whole document.

author: tszaboo
author_rank: Super Contributor
timestamp: September 19, 2019, 10:58:55 pm
content: Quote from: Monkeh on September 18, 2019, 11:43:49 pmI have a dev board, with windows embedded, that boots up in 2 seconds to desktop. And it plays video for example and has everything you want from an embedded computer.You need to see both side of the picture to know how much bloatware is linux really is nowadays.

author: Monkeh
author_rank: Super Contributor
timestamp: September 19, 2019, 11:05:31 pm
content: Quote from: NANDBlog on September 19, 2019, 10:58:55 pmErr, and that runs on a ~400MHz MIPS with NOR flash connected via slow SPI?

author: Whales
author_rank: Super Contributor
timestamp: September 19, 2019, 11:11:02 pm
content: I have some experience here. I used to delve a lot into consumer routers via the UARTs and see what I could do with them, including takeovers and repurposing. It's fun trying to sneak external binaries into embedded mips linux environments and run them.I swear I have never left any silly cat jpegs hiding in flash filesystems in locations where a hardware "reset" does not wipe them.Things I recall seeing a lot of:Boot scripts/environments built inside of older boot/scripts environments built on older ones (possibly from other vendors). All hacked together, lots of errors getting spat out for every (normal) boot.Hardcoded "delay x" in a lot of scripts to get things to workLinear bootup order with lots of slow activitiesBasically: consumer routers are the epitome of "we don't care as long as it slightly works" and "regular reboots & dropouts are acceptable". The ultimate IDGAF of design. There's no motivation to differentiate your product beyond (sometimes) some box specs and addon features. The development cycle is "whack more shit on" and "fix it till it boots".EDIT: Also as MarkL said, DOCSIS can be slow to sync even once your system is brought up. During this, however, DHCP and the router's web interfaceshouldbe working. Hopefully. Depending on the init scripts

author: Ice-Tea
author_rank: Super Contributor
timestamp: September 20, 2019, 09:43:40 am
content: Quote from: Whales on September 19, 2019, 11:11:02 pmMore likely: taken from a demo SW from the core chipset vendor (like BCM). They deliver fully functional SW for evaluation, some vendors just slap a sticker on it and be done, others will merge it with their stuff.

author: mariush
author_rank: Super Contributor
timestamp: September 20, 2019, 10:36:56 am
content: I had cable internet from UPC (which has cable internet all over Europe)The modem used to take around 30 seconds to be fully operational but my internet connection was very stable, only had maintenance (scheduled reboots of modems around 2-3 AM in a weekend) once every few weeks or some random outage for a few minutes.It does take longer for the modem to start and initialize and get up to speed if you had it turned off for days.Basically modem starts, connects to ISP, downloads configuration through TFPT or some other means, optionally downloads firmware upgrades, then uses multiple channels for downlink and uplink , then initializes the voice over ip (for digital phone) part and other stuff related to digital tv.It remembers and reuses the channels previously determined to be optimal... unless you hard reset it or was off for a long time. If so, the modem starts and gets working within a minute or so, but for a while it will keep scanning channels and selecting the best ones so speed gradually improves and maybe latency goes down.

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 20, 2019, 11:30:49 am
content: Quote from: NANDBlog on September 19, 2019, 10:58:55 pmSo? My laptop (HP Elitebook 840 G4) takes about two seconds to de-hibernate also, from complete power off to full userspace working.I have a 3G/4G/LTE "modem" running Linux, ZTE MF-823, that boots from power off to full operation in less than a second, and connects within a few seconds. No video or GUI at all, though. It does run a full Linux userspace, including an SSH server, so I consider it pretty much equivalent to a cable modem, software-wise. Any boot delay over a second is bad integration; but as mentioned, making the DOCSIS connection may take quite some time in some conditions, because of DOCSIS itself.Just because most devices using Linux are integrated by what I can only assume are monkeys in a hurry to be somewhere else, does not mean the bloat is unavoidable.Kinda applies to Windows, too, although I don't know how much of the unneeded stuff (GUI etc.) you can omit for embedded Windows installations.For Windows, automatically installed bloatware, including "drivers" that contain all sorts of unneeded crap, is a much bigger problem -- again, poor integrators to blame.(Integrators, or whatever you call themonkeyspeople that put it all together and sell to other people, then run off, never to be heard again.)In fact, it is rather fun to create ones own Linux userspace, starting at theinitprocess. Just make sure your kernel has all drivers your board needs built in, and you can create an initrd out of your own userspace, doing whatever you want; then, you can write your owninitin Bash or Python or any other language (you have an interpreter for installed on the initrd). It'll boot crazy fast. If you use a modular kernel, you'll need some variant ofudevto manage the userspace side, but then the image will work with different hardware configurations on that architecture.I suppose if more people played with that, and understood how easy it is after you get some experience with it, we might get much better embedded Linux installations.(Theinitprocess is a bit special in that it should reap children that have exited, and by default ignore any signals that might be sent to it, and never exits; it also always has process ID 1. So, usually one uses aninitbinary that starts your other processes. It just makes things much more robust. In current typical Linux installations, the initial ramdisk contains scripts to mount the other filesystems (root filesystem is usually mounted by the kernel itself, based on information passed to it by the boot loader), load kernel drivers for detected hardware, and then pivot filesystem root to the actual mounted root filesystem, and continue booting from there. If one starts from modifying an existing Linux installation, that is like throwing oneself into the deep end of the pool, instead of playing in the kiddie pool to get a feel for it first.)

author: German_EE
author_rank: Super Contributor
timestamp: September 20, 2019, 03:40:10 pm
content: Thank you for all of the detailed replies, at least I now have some idea of what is happening behind the flashing green lights.One thing I forgot to mention is the reason for the cold boot, the cable boxes and the TV on 'standby' between them consume over 40W and there is some real heat being generated by the four different power bricks** that are plugged in to the power strip. So, SWMBO has ordered that the TV and cable internet shelf gets turned off at night and when we're out during the day.What I find interesting is that the cable TV box (which certainly does run linux) boots in under a minute, at least four times the speed of the router/cable modem, so someone cares about speed** Cable splitter and amplifier, Router/modem, cable TV box and the TV itself

author: Berni
author_rank: Super Contributor
timestamp: September 20, 2019, 04:09:55 pm
content: It all depends how much effort the programers have put in to optimise the boot process.Indeed you can boot Linux or Windows CE in a few seconds if you really strip it down to the esentials and use good optimised drivers and loaders and such. Most don't bother and just use the linux build they got from the CPU vendor. Its the reason why so many devices these days take forever to boot.I can understand unpluging TVs or settop boxes with shitty standby implementations, but networking equipment like modens are not designed to be turned on and off daily. So because of that nobody cares if it takes 5 seconds or 5 minutes to boot since the boot process happens only every few months or years under normal usage. Don't expect the manufaturer to care about your weird usage of it. Leave it on or if you really must turn it off then get a timer switch to do it for you automaticaly.And yes cable modems do have quite a bit to do before they get online. Some older ones have LEDs that indicate the progress trough the startup procedure, aiding in debuging a broken connection by seeing at what step it hangs up. Those might have LEDs that go like: Boot, Downstream, Upstream, Net, Link. Usualy the LEDs turning on one by one in that order. Also sometimes this process is extended by having the modem fetch some sort of configuration from the ISP servers after the link is established, sometimes even updating the firmware remotely.

author: Mr. Scram
author_rank: Super Contributor
timestamp: September 21, 2019, 07:23:48 pm
content: Quote from: German_EE on September 20, 2019, 03:40:10 pmI don't think 40W is allowed nowadays so it may pay to upgrade your equipment. Was it half a watt maximum for consumer devices on standby?

author: FreddieChopin
author_rank: Regular Contributor
timestamp: September 21, 2019, 07:44:49 pm
content: Original GameBoy booted in couple of seconds and yet it had complicated games like Pokemon Red.

author: Kilrah
author_rank: Unknown
timestamp: September 21, 2019, 09:32:52 pm
content: A gameboy had no OS. Can't even remotely compare.Yep it's just lack of optimization/caring. You can get a RPI to boot in less than 3 seconds if you tweak it for one specific task, but the default image takes 20 because it loads anything a generic user could need.When you look at filesystems and scripts on consumer devices you often find they use the same system on multiple very different products and the OS just loads anything that is useful to any one of them, no optimization to disable what isn't applicable on a particular device. Also you'll often find files that are not even used, but are remains from a product that's 10 years old, because again "just make it work ASAP to make marketing happy, anything else is a waste of time". Oh, and often the vendors don't even employ people with the required knowledge to do actually do a good job more than a hack to get things to work.This has led to major fails at times, I've been following a pretty popular product where the manufacturer was being hammered for security issues and implemented a bunch of encryption and signature for the various binaries as a response, but at one point the pressure to release fast was enough that they released an update that wasn't santized post dev and included both the encrypted and clear version of all of them...This is an interesting talk, it's about security in IP cameras but it's the same approach that leads to the security fails and the lack of optimization...

author: TomS_
author_rank: Frequent Contributor
timestamp: October 13, 2019, 09:20:32 am
content: While it very well runs Linux under the hood, I would suggest that Linux comes up very quickly. Many of these broadband devices run a "busybox" style Linux. Its incredibly minimalistic, heavily integrated, no-frills etc because they would typically run on very minimal amounts of CPU power, RAM and internal storage. You simply dont build such mass produced consumer devices with gigabytes of RAM or multi GHz processors capable of booting a full scale Linux distribution.I would guess that easily within a minute of power on you can access the web interface of the router itself, as they do tend to boot very quickly. But access to the Internet is then reliant on the modem getting itself online, and I think MarkL gave a really good explanation of what is going on there.

author: Berni
author_rank: Super Contributor
timestamp: October 13, 2019, 09:39:21 am
content: I don't know about your modems but a lot of the DOCSIS cable modems i had would deinitialize the Ethernet port after about 5-15 seconds into the boot process. This is seen because the router thinks the cable got unplugged (LEDs go out on router and modem, logs show link down etc..) and it comes back a few seconds later. So im pretty sure i couldn't be in the web interface if the ethernet port itself goes down during the process.My Philips TV is also a good example of it. It takes >30 seconds from cold boot to displaying a image over HDMI, during that process going trough two static boot screens (Likley one being uboot/linux screen and the other being the TV application). Manufacturers simply don't bother.

author: Chig
author_rank: Contributor
timestamp: October 21, 2019, 01:56:35 pm
content: I have direct knowledge here - i design HFC/DOCSIS networks.As MarkL Said:Quote from: MarkL on September 19, 2019, 10:52:11 pmThe most likely *actual* cause of this delay is that the firmware loaded on the modem doesn't have a scan list that is matching with atleast one of the frequencies used by downstream signals from the CMTS. In this instance, the modem has no choice but to blind scan for downstream channels after it's checked it's ~30 default scan channels. Depending on how smart the modem is, there's a good chance it'll have to find one of the 16 - 96 channels used by your ISP, exactly. And that's assuming a single ISP cable network - some networks have multiple carriers, and in that instance if your modem finds NOT your ISP first, it'll go through, try to sync, then fail, and start again when it gets booted off (i've done this myself, with 3 x CMTS's on a single cable segment).The ISP has a couple of options to speed up boot (typically to about 30 seconds once a valid config has been loaded on to the modem once). Firstly - they modify downstream channel list in the CMTS (if they're able to) to one of the defaults in the scan list (typically ~30 channels listed) in the default firmware. Alternatively, they can pre-load a firmware with one of their channels included in the list (normally the firmware is created by the manufacturer of the modem, not the ISP - though larger ISPs could have their own dev's generate the firmware for them).It only takes the modem to lock on to one of the downstream frequencies, and unless the ISP has configured otherwise, the full frequency list is included within the transmission - after that the modem knows every downstream frequency and upstream frequency, and begins the rest of the process. Bonding typically takes about 5-10 seconds at most, and then you're up to full speed.Once the modem goes through this process, it *should* save that info for its next boot, and only in the case of a factory reset will it have to go through the blind scan again. It'll only save that info once it gets accepted into the CMTS.By ensuring we have one of our channels in the scan list, we managed to drop our first start-up time from anywhere between 5-15 minutes, down to about 30 seconds (not including the config download and subsequent reboot after the config was downloaded (which only happens in case of config changes)).

author: TomS_
author_rank: Frequent Contributor
timestamp: October 23, 2019, 04:13:34 pm
content: Quote from: Berni on October 13, 2019, 09:39:21 amIve seen the exact same thing on other routers and devices in general, so its not just cable modems/routers.But there is a reasonable explanation for behaviour like this. When the system is reset, everything assumes a default state/configuration. It is reasonable to assume that an ethernet chipset may come up in some kind of workable state without first being configured by the OS. Once the OS loads the driver for that ethernet chipset, it will then reconfigure it with whatever settings it actually wants, or anything defined by the configuration within the OS. That process may cause the chipset to effectively "reboot", thus dropping the link before coming back a moment later.

author: Whales
author_rank: Super Contributor
timestamp: October 23, 2019, 09:01:22 pm
content: Quote from: TomS_ on October 23, 2019, 04:13:34 pmYeah, a lot of SOHO routers/modems' use a bootloader with some form of limited networking support for recovery and uploading new firmware. This requires bringing up the ethernet switch/ports within the first seconds of power-on. Then the ports (hopefully) get disabled again a few seconds later and the main linux payloads get booted.Some of these implementations cause problems when re-purposing routers for other work (eg with OpenWRT) because they provide a small window during boot where various physical ethernet ports on the back of the unit are bridged/switched in unwanted ways. Some units even leak between ports labelled WAN and LANsee the OpenWRT wiki for more.

author: TomS_
author_rank: Frequent Contributor
timestamp: October 24, 2019, 08:56:04 am
content: Quote from: Whales on October 23, 2019, 09:01:22 pmOh yeah, Ive seen that, and been victim to it. In a previous job I was a network engineer at a wireless broadband provider (in Australia). The router we supplied to customers had some bug where certain traffic would be bridged from LAN to WAN. But not just leaking traffic out of a customers network, it would then leak into another customers, and they would see IP address conflict messages popping up in Windows, or other customers PCs would show up with browseable shares, printers etc. Absolute nightmare.I did some investigation in to it, packet captures etc, the only thing I could find was that there was a certain bit pattern in all of the MAC addresses of ethernet frames that had leaked through. I reported that to the manufacturer and they came out with some kind of fix that resolved the issue. I still dont understand why or how, because they wouldnt tell me what the actual issue was. I wasnt a fan of their gear anyway, and that just further cemented my dislike for them.Our parent company also supplied the same router to DSL broadband customers, but we never saw issues there because the DSL network had better customer isolation such that one customer couldnt talk directly to another via their WAN port.