.TH NETMASK 1 "15 May 1999" "Debian Project" "Debian Linux" .SH NAME netmask \- a netmask generation and conversion program .SH SYNOPSIS .B netmask .RI "[ " options " ] " spec " [ " spec " ... ]" .SH DESCRIPTION This program accepts and produces a variety of common network address and netmask formats. Not only can it convert address and netmask notations, but it will optimize the masks to generate the smallest list of rules. This is very 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. .SH OPTIONS .TP .BR "\-h" ", " "\-\-help" Print a summary of the options .TP .BR "\-v" ", " "\-\-version" Print the version number .TP .BR "\-d" ", " "\-\-debug" Print status/progress information .TP .BR "\-s" ", " "\-\-standard" Output address/netmask pairs .TP .BR "\-c" ", " "\-\-cidr" Output CIDR format address lists .TP .BR "\-i" ", " "\-\-cisco" Output Cisco style address lists .TP .BR "\-r" ", " "\-\-range" Output ip address ranges .TP .BR "\-x" ", " "\-\-hex" Output address/netmask pairs in hex .TP .BR "\-o" ", " "\-\-octal" Output address/netmask pairs in octal .TP .BR "\-b" ", " "\-\-binary" Output address/netmask pairs in binary .TP .BR "\-n" ", " "\-\-nodns" Disable DNS lookups for addresses .SH DEFINITIONS .RI "A " spec " is an address specification, it can look like:" .TP .I address One address. .TP .IR address1 : address2 .RI "All addresses from " address1 " to " address2 . .TP .IR address1 :+ address2 .RI "All addresses from " address1 " to " address1 + address2 . .TP .IR address / mask .RI "A group starting at " address " spanning " mask . .PP .RI "An " address " is an internet network address, it can look like:" .TP .I ftp.gnu.org An internet hostname. .TP .I 209.81.8.252 A standard dotted quad internet address notation. .TP .I 100 A decimal number (100 in this case). .TP .I 0100 An octal number preceded by "0" (64 in this case). .TP .I 0x100 A hexadecimal number preceded by "0x" (256 in this case). .PP .RI "A " mask " is a network mask, it can look like:" .TP .I 255.255.224.0 .RB "A dotted quad netmask (" netmask " will complain if it is not a" valid netmask). .TP .I 0.0.31.255 A Cisco style inverse netmask (with the same checks). .TP .I 8 The number of bits set to one from the left (CIDR notation). .TP .I 010 The number of bits set to one from the left in octal. .TP .I 0x10 The number of bits set to one from the left in hexadecimal. .SH AUTHOR .IR netmask " was written by Robert Stone. Some algorithm design and" optimization was provided by Tom Lear. This manual page was written by Robert Stone. .SH BUGS Let me know if you find any. This man page is a bit more simplistic than I'd like, but I've forgotten most of the groff I once knew. .SH SEE ALSO .BR ipchains (1), .BR ipfwadm (8), .BR netstat (8), .BR route (8), .BR routed (8), .BR gated (8), .BR tcpd (8)