Network & RF Math: CIDR, dBm, Shannon-Hartley Explained

Every network engineer eventually hits the same wall: a subnet calculator gives you an answer, but not the reasoning a design review will demand. A cable loss tool tells you the dB figure, but not why a 5 dB miscalculation on a microwave backhaul link can mean the difference between five-nines uptime and a link that drops every time it rains. This guide exists to close that gap — the underlying binary arithmetic, propagation physics, and information theory that sit beneath the tools you use every day.
1. Layer 3 Addressing: IPv4, Octets, and CIDR Subnetting Mathematics
An IPv4 address is not, at the protocol level, a string separated by periods — it's a 32-bit binary number. Dotted-decimal notation exists purely for human readability. The address is split into four 8-bit fields called octets, each capable of representing values from 0 to 255 (2⁸ = 256 possible values per octet). Understanding this binary substrate is the difference between memorizing subnet tables and being able to derive any subnetting scenario on a whiteboard during an incident call.
1.1 Binary Octets and Dotted-Decimal Notation
Take the address 192.168.10.4. In binary, this is:
Every troubleshooting task involving hexadecimal representations (used in IPv6, MAC addresses, and packet capture analysis), binary-to-decimal conversion, or even reverse DNS pointer construction ultimately traces back to this octet math. If you regularly convert between binary, hex, and dotted-decimal representations — or need to validate malformed address strings from a log file — the IPv4 Formats tool handles the conversion instantly across all common representations, including integer and hex formats used in firewall rule exports.
1.2 CIDR Notation and Subnet Mask Derivation
Classless Inter-Domain Routing (CIDR) replaced the rigid Class A/B/C system in 1993 (RFC 1518/1519) by allowing the network prefix length to be defined explicitly rather than inferred from the leading bits. A CIDR notation like /26 tells you that the first 26 bits of the 32-bit address are the network portion, leaving 6 bits for host addressing.
The math is straightforward but unforgiving under pressure:
- Total addresses = 2^(host bits) = 2⁶ = 64
- Usable hosts = 2^(host bits) − 2 = 62 (subtracting network and broadcast addresses)
- Subnet mask = 255.255.255.192 (since 11000000 in binary = 128 + 64 = 192)
| CIDR | Subnet Mask | Host Bits | Usable Hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 8 | 254 |
| /27 | 255.255.255.224 | 5 | 30 |
| /30 | 255.255.255.252 | 2 | 2 |
This becomes operationally critical during VLSM (Variable Length Subnet Masking) design, where a /30 is deliberately chosen for point-to-point router links to avoid wasting address space, while a /24 might serve a general-purpose VLAN. When you're carving a /22 allocation into multiple department subnets and need to verify network/broadcast boundaries without manual bit-shifting, CIDR Subnetting calculates the full breakdown — network address, broadcast address, usable range, and wildcard mask — in one pass.
2. Layer 2 Addressing: MAC Addresses and OUIs
While IPv4 addressing is hierarchical and administratively assigned, the MAC address operates at Layer 2 and is (in theory) globally unique and burned into the NIC hardware. A MAC address is a 48-bit value, typically written as six hexadecimal octets (e.g., 00:1A:2B:3C:4D:5E). The first 24 bits — the first three octets — constitute the Organizationally Unique Identifier (OUI), assigned by the IEEE Registration Authority to identify the manufacturer. The remaining 24 bits are the Network Interface Controller (NIC) specific portion, assigned by the vendor.
This structure matters in real diagnostics: identifying rogue devices on a network by OUI lookup, validating that a MAC address conforms to unicast vs. multicast conventions (the least significant bit of the first octet distinguishes them — a value of 1 indicates a multicast/broadcast frame), or converting between the colon-separated, hyphen-separated, and Cisco dot-notation formats that different vendor CLIs expect. If you're normalizing MAC entries pulled from a switch's CAM table or a pcap export across these formats, MAC Address Formats handles the notation conversion and separator normalization automatically.
3. Packet Transmission Time vs. Propagation Delay
One of the most commonly conflated pair of concepts in networking is transmission time and propagation delay. They are governed by entirely different physical constraints, and confusing them leads to badly wrong latency budgets on WAN links.
Transmission time (Tt) is how long it takes to push all the bits of a packet onto the wire:
where L is the packet length in bits and R is the link's data rate in bits per second. A 1500-byte (12,000-bit) Ethernet frame on a 1 Gbps link takes 12,000 / 1,000,000,000 = 12 microseconds to transmit.
Propagation delay (Tp), by contrast, is a function of physical distance and the signal velocity in the medium:
where d is distance and s is the propagation speed (roughly 2×10⁸ m/s in copper or fiber, about two-thirds the speed of light in a vacuum due to the medium's refractive index). On a short LAN segment, transmission time dominates total delay. On a transcontinental fiber link, propagation delay dominates by orders of magnitude — this is why adding bandwidth doesn't fix latency-sensitive applications like VoIP or financial trading systems; the bottleneck is physics, not throughput. Total end-to-end delay for a single packet hop is simply Tt + Tp. For working through these figures across different link speeds and frame sizes without redoing the arithmetic each time, Transmission Time calculates both components and the combined serialization delay.
4. RF and Optical Physics: Power, Gain, and Attenuation
4.1 dBm, Watts, and the Logarithmic Power Scale
RF and fiber-optic power levels span many orders of magnitude — from kilowatts at a transmitter to femtowatts at a sensitive receiver — which is precisely why the industry standardized on the decibel, a logarithmic unit. dBm expresses power relative to 1 milliwatt:
So 0 dBm = 1 mW, 30 dBm = 1 W, and −30 dBm = 1 microwatt. The reason engineers work in dB rather than raw watts is that cascaded gains and losses across a signal chain (amplifier gain, cable loss, connector loss, antenna gain) become simple addition and subtraction instead of multiplication and division — a link budget with a +15 dB amplifier and a −3 dB cable run is just +12 dB net, no exponents required. For converting measured dBm readings back to absolute power, or summing a chain of gain/loss stages into a final link budget figure, dB Gain & Power handles both the logarithmic conversion and cascaded budget math.
4.2 Frequency, Wavelength, and the Wave Equation
Every RF and optical system obeys the fundamental wave equation relating the speed of light, frequency, and wavelength:
where c is the speed of light (approximately 3×10⁸ m/s in a vacuum), f is frequency in Hz, and λ (lambda) is wavelength in meters. In fiber or a dielectric medium, the effective speed is c divided by the refractive index (n) of the material, which is why the same wavelength behaves differently — with a shorter effective wavelength — inside a fiber core than in free space.
This relationship is not academic trivia; it governs antenna sizing (a quarter-wave monopole antenna for 2.4 GHz Wi-Fi needs to be physically shorter than one for 900 MHz, precisely because higher frequency means shorter wavelength), and it explains why higher-frequency mmWave 5G signals attenuate faster and penetrate obstacles worse than sub-6 GHz signals. For converting between frequency bands and their corresponding physical wavelengths when sizing antennas or planning spectrum allocations, Frequency & Wavelength performs the conversion across RF and optical bands.
4.3 Cable Loss and Attenuation Coefficients
Signal attenuation in coaxial cable, waveguide, or fiber accumulates as a function of distance, expressed as an attenuation coefficient in dB per unit length (e.g., dB/100m or dB/km). Total attenuation is:
where α is the attenuation coefficient specific to the cable type and operating frequency, and L is the cable length. Attenuation coefficients are frequency-dependent and generally worsen at higher frequencies — LMR-400 coax, for instance, exhibits noticeably higher loss per 100 feet at 2.4 GHz than at 450 MHz, which is why long cable runs to a rooftop antenna at higher frequencies often require in-line amplification or moving the radio closer to the antenna entirely. Single-mode fiber, by contrast, exhibits attenuation on the order of 0.2–0.35 dB/km, orders of magnitude lower than copper, which is precisely why fiber dominates long-haul and even many short structured cabling runs today. When budgeting for total link loss across a known cable type, length, and frequency, Cable Loss & Attenuation applies the correct coefficient tables automatically.
5. Fiber Latency and the Real Speed of Light in Glass
A persistent misconception is that fiber transmits data "at the speed of light" in the vacuum sense. In reality, light in a standard single-mode fiber core (refractive index n ≈ 1.4682) travels at:
That's roughly 68% of the vacuum speed of light — a hard physical floor on latency that no amount of engineering can beat, short of changing the medium. This is why one-way latency across a transatlantic fiber route of roughly 6,000 km has an unavoidable propagation floor around 29–30 milliseconds, regardless of how much bandwidth is provisioned or how well the routers are configured. High-frequency trading firms have spent enormous capital shaving single-digit milliseconds off routes for exactly this reason — the theoretical floor set by n is the wall everyone eventually hits. For calculating minimum achievable latency across a given fiber distance, or working backward from a latency requirement to a maximum permissible route distance, Fiber Latency & Speed applies the refractive-index-adjusted propagation speed directly.
6. Channel Capacity: The Shannon-Hartley Theorem
Perhaps the single most important equation in all of telecommunications engineering is the Shannon-Hartley theorem, which sets the absolute theoretical ceiling on error-free data rate for a communication channel given its bandwidth and noise environment:
where C is channel capacity in bits per second, B is bandwidth in Hz, and S/N is the linear (not dB) signal-to-noise ratio. This single equation explains why a Wi-Fi client near the edge of coverage negotiates a far lower data rate than one standing next to the access point — it's not merely "weaker signal," it's a direct, mathematically-governed reduction in achievable spectral efficiency as the SNR term collapses.
Working through a concrete example: a channel with 20 MHz of bandwidth and an SNR of 20 dB (which converts to a linear ratio of 10^(20/10) = 100) yields:
This is the theoretical ceiling — real-world modulation and coding schemes (QAM tables, forward error correction overhead) always fall short of it, but it defines the upper bound every RF planner designs against. This is also the theoretical bridge between bandwidth and throughput, and why "bandwidth" and "actual achievable throughput" are never the same number in practice — provisioned bandwidth is the B term, while actual delivered throughput is constrained by C and further reduced by protocol overhead. For working through channel capacity and bandwidth/throughput relationships directly, Bandwidth & Capacity applies the Shannon-Hartley bound against your bandwidth and SNR inputs.
The S/N term itself connects directly to the practical, measurable reliability of a digital link: Signal-to-Noise Ratio and Bit Error Rate (BER) are two sides of the same coin. As SNR degrades, the probability that a receiver misinterprets a transmitted symbol rises, and for a given modulation scheme (BPSK, QPSK, 16-QAM, 256-QAM, etc.) there is a well-characterized curve mapping SNR to expected BER. This is why higher-order modulation schemes that pack more bits per symbol — enabling higher throughput — simultaneously demand a cleaner, higher-SNR channel to hold an acceptable error rate; it's a direct engineering trade-off between spectral efficiency and robustness. For translating between measured SNR and expected bit error rate under common modulation assumptions, SNR & Bit Error Rate maps the relationship for standard modulation schemes.
Closing Thoughts
None of these formulas are exotic — Shannon-Hartley dates to 1948, the wave equation predates modern telecom entirely, and subnet math is taught in every CCNA course. What separates a technician who plugs numbers into a calculator from an engineer who can defend a design under scrutiny is fluency with why the numbers behave the way they do: why propagation delay ignores bandwidth, why higher frequency means shorter range at equal power, why a logarithmic scale exists at all. Keep the physics in view, and the calculators become what they're meant to be — a way to move faster through math you already understand, not a black box you're trusting blindly.