-
Notifications
You must be signed in to change notification settings - Fork 14
/
ipgen.1
93 lines (93 loc) · 2.41 KB
/
ipgen.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
'\" t
.\" Copyright (C) Roy Hills, NTA Monitor Ltd.
.\"
.\" Copying and distribution of this file, with or without modification,
.\" are permitted in any medium without royalty provided the copyright
.\" notice and this notice are preserved.
.\"
.TH IPGEN 1 "May 29, 2012"
.\" Please adjust this date whenever revising the man page.
.SH NAME
ipgen \- Output a list of host address from IP network specifications
.SH SYNOPSIS
.B ipgen
.RI [ options ] " " [ IP-Network ...]
.SH DESCRIPTION
.B ipgen
generates a list of IP host addresses from one or more IP network
specifications.
.PP
The IP networks can be specified in the following ways:
.IP "a)" 3
CIDR notation IPnetwork/bits (e.g. 192.168.1.0/24)
.IP "b)"
Network and mask notation IPnetwork:NetMask (e.g. 192.168.1.0:255.255.255.0)
.IP "c)"
Range notation IPstart-IPend (e.g. 192.168.1.3-192.168.1.27)
.IP "d)"
Single IP Host Address (e.g. 192.168.1.1)
.PP
The CIDR and Network:mask notations generate IP host addresses excluding the
network and broadcast addresses. So 10.0.0.0/29 would generate six IP addresses
from 10.0.0.1 to 10.0.0.6 inclusive. But see the description of the --network
(-n) and --broadcast (-b) options below.
.PP
The generated IP host addresses are written to standard output, with one IP
address per line.
.PP
The IP networks may be specified either on the command line, or read from the
file specified with the --file (-f) option.
.SH OPTIONS
.TP
.B --help or -h
Display this usage message and exit.
.TP
.B --file=<f> or -f <f>
Read IP networks from the specified file instead of
from the command line. One IP network specification per
line. Use "-" for standard input.
.TP
.B --version or -V
Display program version and exit.
.TP
.B --network or -n
Include the IP network address.
.TP
.B --broadcast or -b
Include the IP broadcast address.
.SH EXAMPLES
The example below shows
.B ipgen
generating a list of host addresses for the CIDR network 10.0.0.0/29. The
network and broadcast addresses are not included by default.
.PP
.nf
$ ipgen 10.0.0.0/29
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
10.0.0.5
10.0.0.6
.fi
.PP
This next example shows two both a CIDR and a network and mask specification.
The -n and -b options cause the network and broadcast addresses to be included.
.PP
.nf
$ ipgen -n -b 10.0.0.0/29 10.1.0.0:255.255.255.252
10.0.0.0
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
10.0.0.5
10.0.0.6
10.0.0.7
10.1.0.0
10.1.0.1
10.1.0.2
10.1.0.3
.fi
.SH AUTHOR
Roy Hills <[email protected]>