Skip to content

Commit 0f92a1b

Browse files
committed
Documentation improvements.
1 parent 1f66b51 commit 0f92a1b

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

README.md

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 add
1616

1717
* My host has IP 132.252.150.154 and netmask 255.255.255.240. What are the details of its network?
1818

19-
<pre>
20-
<span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong>subnetcalc 132.252.150.154 255.255.255.240</strong>
19+
<pre><code><span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong><span class="fu">subnetcalc</span> 132.252.150.154 255.255.255.240</strong>
2120
Address = 132.252.150.154
2221
<span style="color: red;">10000100 . 11111100 . 10010110 . 1001</span><span style="color: blue;">1010</span>
2322
Network = 132.252.150.144 / 28
@@ -33,12 +32,11 @@ SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 add
3332
- Class B
3433
GeoIP Country = Germany (DE)
3534
DNS Hostname = lupo.iem.uni-due.de
36-
</pre>
35+
</code></pre>
3736

3837
* Consider host [www.heise.de](https://www.heise.de) uses a 64-bit prefix length. What are the details of its network?
3938

40-
<pre>
41-
<span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong>subnetcalc www.heise.de 64</strong>
39+
<pre><code><span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong><span class="fu">subnetcalc</span> www.heise.de 64</strong>
4240
Address = 2a02:2e0:3fe:1001:7777:772e:2:85
4341
2a02 = <span style="color: red;">00101010 00000010</span>
4442
02e0 = <span style="color: red;">00000010 11100000</span>
@@ -62,12 +60,11 @@ SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 add
6260
+ 6-to-4 Address = 2.224.3.254
6361
GeoIP Country = Germany (DE)
6462
DNS Hostname = www.heise.de
65-
</pre>
63+
</code></pre>
6664

6765
* My new host should use Interface ID 0x100 and Subnet ID 0x1234. Generate a Unique Local IPv6 prefix (40-bit Global ID) for my intranet, according to [RFC&nbsp;4193](https://www.rfc-editor.org/rfc/rfc4193), using high quality random numbers!
6866

69-
<pre>
70-
<span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong>subnetcalc 0:0:0:1234::100 64 -uniquelocalhq</strong>
67+
<pre><code><span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong><span class="fu">subnetcalc</span> 0:0:0:1234::100 64 -uniquelocalhq</strong>
7168
Generating Unique Local IPv6 address (using /dev/random) ...
7269
Address = fd22:6892:1a2d:1234::100
7370
fd22 = <span style="color: red;">11111101 00100010</span>
@@ -94,12 +91,11 @@ SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 add
9491
+ Solicited Node Multicast Address = <span style="color: green">ff02::1:ff</span>00:0100
9592
GeoIP Country = Unknown (??)
9693
DNS Hostname = (Name or service not known)
97-
</pre>
94+
</code></pre>
9895

9996
* Which are DNS reverse lookup name and geo-location country of IP 2401:3800:c001::68?
10097

101-
<pre>
102-
<span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong>subnetcalc 2401:3800:c001::68</strong>
98+
<pre><code><span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong><span class="fu">subnetcalc</span> 2401:3800:c001::68</strong>
10399
Address = 2401:3800:c001::68
104100
2401 = <span style="color: red;">00100100 00000001</span>
105101
3800 = <span style="color: red;">00111000 00000000</span>
@@ -122,12 +118,11 @@ SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 add
122118
+ Solicited Node Multicast Address = ff02::1:ff00:0068
123119
GeoIP Country = <strong>China (CN)</strong>
124120
DNS Hostname = <strong>bg-in-x68.1e100.net</strong>
125-
</pre>
121+
</code></pre>
126122

127123
* Which are the MAC address and Solicited Node Multicast address of 2001:638:501:4ef8:223:aeff:fea4:8ca9/64?
128124

129-
<pre>
130-
<span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong>subnetcalc 2001:638:501:4ef8:223:aeff:fea4:8ca9/64</strong>
125+
<pre><code><span style="color:green;">user@host</span><span style="color:blue;">:~</span><span style="color:gray;">$</span> <strong><span class="fu">subnetcalc</span> 2001:638:501:4ef8:223:aeff:fea4:8ca9/64</strong>
131126
Address = 2001:638:501:4ef8:223:aeff:fea4:8ca9
132127
2001 = <span style="color: red;">00100000 00000001</span>
133128
0638 = <span style="color: red;">00000110 00111000</span>
@@ -151,13 +146,13 @@ SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 add
151146
+ Solicited Node Multicast Address = <strong><span style="color: green">ff02::1:ff</span>a4:8ca9</strong>
152147
GeoIP Country = Germany (DE)
153148
DNS Hostname = (Name or service not known)
154-
</pre>
149+
</code></pre>
155150

156151
* Take a look into the manual page of SubNetCalc for further information and options:
157152

158-
<pre>
153+
```bash
159154
man subnetcalc
160-
</pre>
155+
```
161156

162157

163158
# 📦 Binary Package Installation
@@ -168,36 +163,36 @@ Please use the issue tracker at [https://github.com/dreibh/subnetcalc/issues](ht
168163

169164
For ready-to-install Ubuntu Linux packages of SubNetCalc, see [Launchpad PPA for Thomas Dreibholz](https://launchpad.net/~dreibh/+archive/ubuntu/ppa/+packages?field.name_filter=subnetcalc&field.status_filter=published&field.series_filter=)!
170165

171-
<pre>
166+
```bash
172167
sudo apt-add-repository -sy ppa:dreibh/ppa
173168
sudo apt-get update
174169
sudo apt-get install subnetcalc
175-
</pre>
170+
```
176171

177172
## Fedora Linux
178173

179174
For ready-to-install Fedora Linux packages of SubNetCalc, see [COPR PPA for Thomas Dreibholz](https://copr.fedorainfracloud.org/coprs/dreibh/ppa/package/subnetcalc/)!
180175

181-
<pre>
176+
```bash
182177
sudo dnf copr enable -y dreibh/ppa
183178
sudo dnf install subnetcalc
184-
</pre>
179+
```
185180

186181
## FreeBSD
187182

188183
For ready-to-install FreeBSD packages of SubNetCalc, it is included in the ports collection, see [FreeBSD ports tree index of net/subnetcalc/](https://cgit.freebsd.org/ports/tree/net/subnetcalc/)!
189184

190-
<pre>
185+
```bash
191186
pkg install subnetcalc
192-
</pre>
187+
```
193188

194189
Alternatively, to compile it from the ports sources:
195190

196-
<pre>
191+
```bash
197192
cd /usr/ports/net/subnetcalc
198193
make
199194
make install
200-
</pre>
195+
```
201196

202197

203198
# 💾 Build from Sources
@@ -210,12 +205,12 @@ Please use the issue tracker at [https://github.com/dreibh/subnetcalc/issues](ht
210205

211206
The Git repository of the SubNetCalc sources can be found at [https://github.com/dreibh/subnetcalc](https://github.com/dreibh/subnetcalc):
212207

213-
<pre>
208+
```bash
214209
git clone https://github.com/dreibh/subnetcalc
215210
cd subnetcalc
216211
cmake .
217212
make
218-
</pre>
213+
```
219214

220215
Contributions:
221216

0 commit comments

Comments
 (0)