NETMASK(1)
π NETMASK(1) β the netmask glow-up page π
okay bestie, so this is netmask, and it lives in the Debian Linux corner of the manual-verse. it's a netmask generation and conversion program, and honestly? it's giving underrated icon energy. π
β¨ SYNOPSIS β¨
netmask [ options ] spec [ spec ... ]
πΈ DESCRIPTION πΈ
so like. this program accepts and produces a variety of common network address and netmask formats. that's the whole vibe. not only can it convert address and netmask notations, but it will also optimize the masks to generate the smallest list of rules. lowkey genius behavior. π
and bestie, this is so handy if you've ever configured a firewall or router and some nasty network administrator before you decided that base 10 numbers were good places to start and end groups of machines. we've all been there. we've all cried about it. π not me refreshing ipchains rules at 2am. never.
π OPTIONS π
every single one of these is a baddie. collect them all. β¨
-h,--helpβ print a summary of the options. the "help me bestie" button. π«Ά-v,--versionβ print the version number. a little "who am i" moment.-d,--debugβ print status/progress information. it's narrating its own life fr fr.-s,--standardβ output address/netmask pairs. the classic. the default-coded queen.-c,--cidrβ output CIDR format address lists. slash notation girlies rise up. π₯-i,--ciscoβ output Cisco style address lists. certified network-girl moment.-r,--rangeβ output ip address ranges. from here to there, periodt.-x,--hexβ output address/netmask pairs in hex.0xcore. π-o,--octalβ output address/netmask pairs in octal. leading-zero behavior, we love her.-b,--binaryβ output address/netmask pairs in binary. ones and zeros, main character energy. π-n,--nodnsβ disable DNS lookups for addresses. no calling out to the internet, we're staying in our lane. π
π DEFINITIONS π
a spec is an address specification, and it can look like:
addressβ one address. just one. a single. solo. π¦address1:address2β all addresses from address1 to address2. the whole glow-up arc. β¨address1:+address2β all addresses from address1 to address1+address2. yes, it's math. no, i don't make the rules. πaddress/maskβ a group starting at address spanning mask. the iconic slash.
an address is an internet network address, and it can look like:
ftp.gnu.orgβ an internet hostname. name-drop energy. π209.81.8.252β a standard dotted quad internet address notation. the four-number classic.100β a decimal number (100in this case). base 10 bestie.0100β an octal number preceded by0(64in this case). sneaky little leading zero. π0x100β a hexadecimal number preceded by0x(256in this case). hex girl summer.
a mask is a network mask, and it can look like:
255.255.224.0β a dotted quad netmask. and heads up: netmask will complain if it is not a valid netmask. π it will read you.0.0.31.255β a Cisco style inverse netmask (with the same checks). same energy, upside down. π8β the number of bits set to one from the left (CIDR notation). short and powerful.010β the number of bits set to one from the left in octal.0x10β the number of bits set to one from the left in hexadecimal.
π«Ά AUTHOR π«Ά
netmask was written by Robert Stone. some algorithm design and optimization was provided by Tom Lear. and this manual page was written by Robert Stone too. multi-talented fr fr. π
π BUGS π
let me know if you find any. and the author says this man page is a bit more simplistic than he'd like, but he's forgotten most of the groff he once knew. honestly? relatable. groff is not passing the vibe check. π
π SEE ALSO π
ipchains(1)ipfwadm(8)netstat(8)route(8)routed(8)gated(8)tcpd(8)
okay that's the whole page bestie, no cap. this one came from the Debian Project and it's dated 15 May 1999 β vintage, iconic, still slaying. periodt. π β¨πΈ
π¦ where this page comes from
- fedora 43: netmask 2.5.0-2.fc43 Β· GPL-2.0-or-later
- fedora 44: netmask 2.5.0-3.fc44 Β· GPL-2.0-or-later
- nixos 26.05: netmask 2.5.0
- nixpkgs unstable: netmask 2.5.0
- ubuntu questing: netmask 2.5.0-1
- ubuntu resolute: netmask 2.5.0-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: netmask 2.5.0-1build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms