Hello everyone,
I am have some difficulty trying to understand how to find subnet mask, broadcast and network address.
How do I calculate that given an IP address? for example IP: ?
Hello everyone,
I am have some difficulty trying to understand how to find subnet mask, broadcast and network address.
How do I calculate that given an IP address? for example IP: ?
asked how to get the subnet mask, network and broadcast for the example 123.65.47.62/22. 's netmask table is useful; the following is a short worked example and a quick method to reproduce it for any CIDR.
For /22:
255.255.252.0123.65.44.0123.65.47.255123.65.44.1 through 123.65.47.254 (1022 usable hosts)Worked steps (decimal approach):
/22 means 22 bits of 1s -> mask 11111111.11111111.11111100.00000000 -> 255.255.252.0.123&255=123, 65&255=65, 47&252=44, 62&0=0 -> network 123.65.44.0.0.0.3.255. Broadcast = network OR wildcard -> 123.65.47.255.2^(32-22)-2 = 1022 (exceptions noted below).Quick mental tricks and cautions:
/22 leaves 256-252 = 4 so networks step every 4 in the third octet (0,4,8,...,44,...).2^(32-prefix)-2 applies except for /31 (RFC 3021 permits two-host point-to-point) and /32 (single-host route).ip addr, ifconfig, ipconfig) show both CIDR and dotted-decimal masks; this explanation complements 's table by showing how the numbers are derived rather than only looked up.Jump to Post— rch1231 169Hello,
Attached is a table of netmask based on the network selected.
Hello,
Attached is a table of netmask based on the network selected.
thank you very much!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.