-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathnetmask.1
113 lines (112 loc) · 2.88 KB
/
netmask.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.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)