NETMASK(1)

πŸ“¦
version 2.5.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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. 0x core. πŸ’œ
  • -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 (100 in this case). base 10 bestie.
  • 0100 β€” an octal number preceded by 0 (64 in this case). sneaky little leading zero. πŸŽ€
  • 0x100 β€” a hexadecimal number preceded by 0x (256 in 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 πŸ’œ


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. πŸ’…βœ¨πŸŒΈ