1ipv6gen(1) General Commands Manual ipv6gen(1)
2
3
4
6 ipv6gen - IPv6 prefix generator.
7
9 ipv6gen [ -d ] [ -lmr ] [ -s <num> ] <prefix> <prefix_length>
10
12 ipv6gen is tool which generates list of IPv6 prefixes of given prefix
13 length from certain prefix according to RFC 3531.
14
16 -d debug mode. Displays allocated prefix as bit array.
17
18 -l allocate bits from the left. e.g. for delta 4, the bit array
19 looks like this:
20
21 0000
22 1000
23 0100
24 1100
25 0010
26 1010
27 0110
28 1110
29 0001
30 1001
31 0101
32 1101
33 0011
34 1011
35 0111
36 1111
37
38 -r allocate bits from the right. This is the same as allocation
39 from the left but reversed. e.g. again for delta of value 4:
40
41 0000
42 0001
43 0010
44 0011
45 0100
46 0101
47 0110
48 0111
49 1000
50 1001
51 1010
52 1011
53 1100
54 1101
55 1110
56 1111
57
58 -m allocate bits from the middle. This method tries to allocate
59 bits close to the axis of delta first and then proceeds to
60 sides. For delta of value 4 it is:
61
62 0000
63 0100
64 0010
65 0110
66 1000
67 1100
68 1010
69 1110
70 0001
71 0011
72 0101
73 0111
74 1001
75 1011
76 1101
77 1111
78
79 For delta of value 5, it is:
80
81 00000
82 00100
83 01000
84 01100
85 00010
86 00110
87 01010
88 01110
89 ...
90
91 00001
92 00011
93 00101
94 00111
95 01001
96 01011
97 01101
98 01111
99 10001
100 10011
101 10101
102 10111
103 11001
104 11011
105 11101
106 11111
107
108 -s <num>
109 set step between generated prefixes. It will leave out step-1
110 prefixes between each two generated prefixes. default step value
111 is 1.
112
114 If we need to to split /48 prefix into two prefixes:
115
116 worm[~/IPv6/ipv6gen]> ./ipv6gen.pl 2001:1508:1003::/48 49
117 2001:1508:1003:0000::/49
118 2001:1508:1003:8000::/49
119
120 To allocate bits from the middle from /32 prefix with 4-bits wide
121 delta:
122
123 worm[~/IPv6/ipv6gen]> ./ipv6gen.pl -m 2001:1508::/32 36
124 2001:1508:0000::/36
125 2001:1508:4000::/36
126 2001:1508:2000::/36
127 2001:1508:6000::/36
128 2001:1508:8000::/36
129 2001:1508:C000::/36
130 2001:1508:A000::/36
131 2001:1508:E000::/36
132 2001:1508:1000::/36
133 2001:1508:3000::/36
134 2001:1508:5000::/36
135 2001:1508:7000::/36
136 2001:1508:9000::/36
137 2001:1508:B000::/36
138 2001:1508:D000::/36
139 2001:1508:F000::/36
140
142 Vladimir Kotal <vlada@devnull.cz>
143
145 http://techie.devnull.cz/ipv6/ipv6gen
146
148 ipv6gen should be converted to Perl library/module.
149
150
151
152 ipv6gen(1)