@@ -27,105 +27,106 @@ My host has IP 132.252.150.254 and netmask 255.255.255.240. What are the details
2727
2828```
2929user@host:~$ subnetcalc 132.252.150.254 255.255.255.240
30- Address = 132.252.150.254
31- 10000100 . 11111100 . 10010110 . 11111110
32- Network = 132.252.150.240 / 28
33- Netmask = 255.255.255.240
34- Broadcast = 132.252.150.255
35- Wildcard Mask = 0.0.0.15
36- Hosts Bits = 4
37- Max. Hosts = 14 (2^4 - 2)
38- Host Range = { 132.252.150.241 - 132.252.150.254 }
39- Properties =
30+ Address = 132.252.150.254
31+ 10000100 . 11111100 . 10010110 . 11111110
32+ Network = 132.252.150.240 / 28
33+ Netmask = 255.255.255.240
34+ Broadcast = 132.252.150.255
35+ Wildcard Mask = 0.0.0.15
36+ Hex. Address = 84FC96FE
37+ Hosts Bits = 4
38+ Max. Hosts = 14 (2^4 - 2)
39+ Host Range = { 132.252.150.241 - 132.252.150.254 }
40+ Properties =
4041 - 132.252.150.254 is a HOST address in 132.252.150.240/28
4142 - Class B
42- GeoIP Country = Germany (DE)
43- DNS Hostname = dummy.iem.uni-duisburg-essen.de
44- ```
45-
46- Consider host www.six.heise.de uses a 64-bit prefix length. What are the details of its network?
47-
48- ```
49- user@host:~$ subnetcalc www.six.heise.de 64
50- Address = 2a02:2e0:3fe:100::6
51- 2a02 = 00101010 00000010
52- 02e0 = 00000010 11100000
53- 03fe = 00000011 11111110
54- 0100 = 00000001 00000000
55- 0000 = 00000000 00000000
56- 0000 = 00000000 00000000
57- 0000 = 00000000 00000000
58- 0006 = 00000000 00000110
59- Network = 2a02:2e0:3fe:100:: / 64
60- Netmask = ffff:ffff:ffff:ffff::
61- Wildcard Mask = ::ffff:ffff:ffff:ffff
62- Hosts Bits = 64
63- Max. Hosts = 18446744073709551616 (2^64 - 1)
64- Host Range = { 2a02:2e0:3fe:100::1 - 2a02:2e0:3fe:100:ffff:ffff:ffff:ffff }
65- Properties =
66- - 2a02:2e0:3fe:100::6 is a HOST address in 2a02:2e0:3fe:100::/64
43+ DNS Hostname = dummy.iem.uni-due.de
44+ ```
45+
46+ Consider host www.heise.de uses a 64-bit prefix length. What are the details of its network?
47+
48+ ```
49+ user@host:~$ subnetcalc www.heise.de 64
50+ Address = 2a02:2e0:3fe:1001:7777:772e:2:85
51+ 2a02 = 00101010 00000010
52+ 02e0 = 00000010 11100000
53+ 03fe = 00000011 11111110
54+ 1001 = 00010000 00000001
55+ 7777 = 01110111 01110111
56+ 772e = 01110111 00101110
57+ 0002 = 00000000 00000010
58+ 0085 = 00000000 10000101
59+ Network = 2a02:2e0:3fe:1001:: / 64
60+ Netmask = ffff:ffff:ffff:ffff::
61+ Wildcard Mask = ::ffff:ffff:ffff:ffff
62+ Hosts Bits = 64
63+ Max. Hosts = 18446744073709551615 (2^64 - 1)
64+ Host Range = { 2a02:2e0:3fe:1001::1 - 2a02:2e0:3fe:1001:ffff:ffff:ffff:ffff }
65+ Properties =
66+ - 2a02:2e0:3fe:1001:7777:772e:2:85 is a HOST address in 2a02:2e0:3fe:1001::/64
6767 - Global Unicast Properties:
68- + Interface ID = 0000:0000:0000:0006
69- + Sol. Node MC = ff02::1:ff00:0006
70- GeoIP Country = Germany (DE)
71- DNS Hostname = www.six .heise.de
68+ + Interface ID = 7777:772e:0002:0085
69+ + Solicited Node Multicast Address = ff02::1:ff02:0085
70+ + 6-to-4 Address = 2.224.3.254
71+ DNS Hostname = www.heise.de
7272```
7373
7474My new host should use Interface ID 0x100 and Subnet ID 0x1234. Generate a Unique Local IPv6 prefix (40-bit Global ID) for my intranet, using high-quality random numbers!
7575
7676```
7777user@host:~$ subnetcalc 0:0:0:1234::1 56 -uniquelocalhq
78- Address = fded:30d0:1072:1234::1
79- fded = 11111101 11101101
80- 30d0 = 00110000 11010000
81- 1072 = 00010000 01110010
82- 1234 = 00010010 00110100
83- 0000 = 00000000 00000000
84- 0000 = 00000000 00000000
85- 0000 = 00000000 00000000
86- 0001 = 00000000 00000001
87- Network = fded:30d0:1072:1200:: / 56
88- Netmask = ffff:ffff:ffff:ff00::
89- Wildcard Mask = ::ff:ffff:ffff:ffff:ffff
90- Hosts Bits = 72
91- Max. Hosts = 4722366482869645213696 (2^72 - 1)
92- Host Range = { fded:30d0:1072:1200::1 - fded:30d0:1072:12ff:ffff:ffff:ffff:ffff }
93- Properties =
94- - fded:30d0:1072:1234::1 is a HOST address in fded:30d0:1072:1200::/56
78+ Generating Unique Local IPv6 address (using /dev/random) ...
79+ Address = fd97:1303:1402:1234::1
80+ fd97 = 11111101 10010111
81+ 1303 = 00010011 00000011
82+ 1402 = 00010100 00000010
83+ 1234 = 00010010 00110100
84+ 0000 = 00000000 00000000
85+ 0000 = 00000000 00000000
86+ 0000 = 00000000 00000000
87+ 0001 = 00000000 00000001
88+ Network = fd97:1303:1402:1200:: / 56
89+ Netmask = ffff:ffff:ffff:ff00::
90+ Wildcard Mask = ::ff:ffff:ffff:ffff:ffff
91+ Hosts Bits = 72
92+ Max. Hosts = 4722366482869645213695 (2^72 - 1)
93+ Host Range = { fd97:1303:1402:1200::1 - fd97:1303:1402:12ff:ffff:ffff:ffff:ffff }
94+ Properties =
95+ - fd97:1303:1402:1234::1 is a HOST address in fd97:1303:1402:1200::/56
9596 - Unique Local Unicast Properties:
96- + Locally chose
97- + Global ID = ed30d01072
98- + Subnet ID = 1234
99- + Interface ID = 0000:0000:0000:0001
100- + Sol. Node MC = ff02::1:ff00:0001
101- GeoIP Country = Unknown (??)
102- DNS Hostname = (Name or service not known)
103- ```
104-
105- Which are DNS reverse lookup name and geo location country of IP 2401:3800:c001::68?
106-
107- ```
108- user@host:~$ subnetcalc 2401:3800:c001::68
109- Address = 2401:3800:c001::68
110- 2401 = 00100100 00000001
111- 3800 = 00111000 00000000
112- c001 = 11000000 00000001
113- 0000 = 00000000 00000000
114- 0000 = 00000000 00000000
115- 0000 = 00000000 00000000
116- 0000 = 00000000 00000000
117- 0068 = 00000000 01101000
118- Network = 2401:3800:c001::68 / 128
119- Netmask = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
120- Wildcard Mask = ::
121- Hosts Bits = 0
122- Max. Hosts = 0 (2^0 - 1)
123- Host Range = { 2401:3800:c001::69 - 2401:3800:c001::68 }
124- Properties =
125- - 2401:3800:c001::68 is a NETWORK address
97+ + Locally chosen
98+ + Global ID = 9713031402
99+ + Subnet ID = 1234
100+ + Interface ID = 0000:0000:0000:0001
101+ + Solicited Node Multicast Address = ff02::1:ff00:0001
102+ DNS Hostname = (Name or service not known)
103+ ```
104+
105+ Which are DNS reverse lookup name and geo location country of IP 2402:f000:1:400::2?
106+
107+ ```
108+ user@host:~$ subnetcalc 2402:f000:1:400::2
109+ Address = 2402:f000:1:400::2
110+ 2402 = 00100100 00000010
111+ f000 = 11110000 00000000
112+ 0001 = 00000000 00000001
113+ 0400 = 00000100 00000000
114+ 0000 = 00000000 00000000
115+ 0000 = 00000000 00000000
116+ 0000 = 00000000 00000000
117+ 0002 = 00000000 00000010
118+ Network = 2402:f000:1:400::2 / 128
119+ Netmask = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
120+ Wildcard Mask = ::
121+ Hosts Bits = 0
122+ Max. Hosts = 1 (2^0 - 0)
123+ Host Range = { 2402:f000:1:400::2 - 2402:f000:1:400::2 }
124+ Properties =
125+ - 2402:f000:1:400::2 is a HOST address in 2402:f000:1:400::2/128
126126 - Global Unicast Properties:
127- + Interface ID = 0000:0000:0000:0068
128- + Sol. Node MC = ff02::1:ff00:0068
127+ + Interface ID = 0000:0000:0000:0002
128+ + Solicited Node Multicast Address = ff02::1:ff00:0002
129+ + 6-to-4 Address = 240.0.0.1
129130GeoIP Country = China (CN)
130131DNS Hostname = bg-in-x68.1e100.net
131132```
0 commit comments