Skip to content

Commit bcb7597

Browse files
authored
Merge pull request #41 from Lissy93/fix/remove-class
Fix/remove class Fixes #38
2 parents 0179b4f + a24651a commit bcb7597

File tree

13 files changed

+159
-159
lines changed

13 files changed

+159
-159
lines changed

src/lib/components/tools/CIDRInput.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
* Quick CIDR presets
3030
*/
3131
const cidrPresets = [
32-
{ cidr: 8, label: '/8 (Class A)', hosts: '16M hosts' },
33-
{ cidr: 16, label: '/16 (Class B)', hosts: '65K hosts' },
34-
{ cidr: 24, label: '/24 (Class C)', hosts: '254 hosts' },
32+
{ cidr: 8, label: '/8', hosts: '16M hosts' },
33+
{ cidr: 16, label: '/16', hosts: '65K hosts' },
34+
{ cidr: 24, label: '/24', hosts: '254 hosts' },
3535
{ cidr: 25, label: '/25', hosts: '126 hosts' },
3636
{ cidr: 26, label: '/26', hosts: '62 hosts' },
3737
{ cidr: 27, label: '/27', hosts: '30 hosts' },

src/lib/components/tools/IPEnumerate.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
description: '10 addresses',
5151
},
5252
{
53-
label: 'Class C /24',
53+
label: 'Medium /24 network',
5454
input: '192.168.0.0/24',
5555
description: '256 addresses',
5656
},

src/lib/components/tools/IPValidator.svelte

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,32 +111,32 @@
111111
details.scope = 'Host';
112112
details.info.push('Used for local loopback communications');
113113
} else if (a === 10) {
114-
details.addressType = 'Private (Class A)';
114+
details.addressType = 'Private';
115115
details.scope = 'Private Network';
116116
details.isPrivate = true;
117-
details.info.push('RFC 1918 private address space');
117+
details.info.push('RFC 1918 private address space (10.0.0.0/8)');
118118
} else if (a === 172 && b >= 16 && b <= 31) {
119-
details.addressType = 'Private (Class B)';
119+
details.addressType = 'Private';
120120
details.scope = 'Private Network';
121121
details.isPrivate = true;
122-
details.info.push('RFC 1918 private address space');
122+
details.info.push('RFC 1918 private address space (172.16.0.0/12)');
123123
} else if (a === 192 && b === 168) {
124-
details.addressType = 'Private (Class C)';
124+
details.addressType = 'Private';
125125
details.scope = 'Private Network';
126126
details.isPrivate = true;
127-
details.info.push('RFC 1918 private address space');
127+
details.info.push('RFC 1918 private address space (192.168.0.0/16)');
128128
} else if (a === 169 && b === 254) {
129129
details.addressType = 'Link-Local (APIPA)';
130130
details.scope = 'Link-Local';
131131
details.isReserved = true;
132132
details.info.push('Automatic Private IP Addressing');
133133
} else if (a >= 224 && a <= 239) {
134-
details.addressType = 'Multicast (Class D)';
134+
details.addressType = 'Multicast';
135135
details.scope = 'Multicast';
136136
details.isReserved = true;
137-
details.info.push('Used for multicast communications');
137+
details.info.push('Used for multicast communications (224.0.0.0/4)');
138138
} else if (a >= 240) {
139-
details.addressType = 'Reserved (Class E)';
139+
details.addressType = 'Reserved';
140140
details.scope = 'Reserved';
141141
details.isReserved = true;
142142
details.info.push('Reserved for future use');

src/lib/components/tools/ReverseZonesCalculator.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
{
2626
label: 'IPv4 /24 Network',
2727
cidr: '192.168.1.0/24',
28-
description: 'Single class C zone delegation',
28+
description: 'Single /24 zone delegation',
2929
},
3030
{
3131
label: 'IPv4 /16 Network',
3232
cidr: '10.0.0.0/16',
33-
description: 'Class B with multiple /24 zones',
33+
description: '/16 network with multiple /24 zones',
3434
},
3535
{
3636
label: 'IPv4 /20 Block',
3737
cidr: '172.16.32.0/20',
38-
description: '16 class C zones needed',
38+
description: '16 /24 zones needed',
3939
},
4040
{
4141
label: 'IPv4 /28 Subnet',
@@ -82,7 +82,7 @@
8282
let delegationType = '';
8383
if (ipv4Zones > 0) {
8484
if (ipv4Zones === 1) {
85-
delegationType = zones[0].delegation.includes('/24') ? 'Class C (/24)' : `Custom (${zones[0].delegation})`;
85+
delegationType = zones[0].delegation.includes('/24') ? '/24 network' : `Custom (${zones[0].delegation})`;
8686
} else {
8787
delegationType = `Multiple zones (${ipv4Zones} x /24)`;
8888
}
@@ -268,11 +268,11 @@ chmod 644 /etc/bind/zones/${zone.zone}`;
268268
<div class="zone-description">
269269
{#if zone.type === 'IPv4'}
270270
{#if zone.delegation === '/24'}
271-
Standard class C reverse zone for 256 addresses
271+
Standard /24 reverse zone for 256 addresses
272272
{:else if zone.delegation === '/16'}
273-
Class B reverse zone covering 65,536 addresses
273+
/16 reverse zone covering 65,536 addresses
274274
{:else if zone.delegation === '/8'}
275-
Class A reverse zone covering 16,777,216 addresses
275+
/8 reverse zone covering 16,777,216 addresses
276276
{:else}
277277
Custom IPv4 reverse zone for {zone.delegation} prefix
278278
{/if}

src/lib/constants/networks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ export const RESERVED_RANGES = {
3131
},
3232
PRIVATE_A: {
3333
range: '10.0.0.0/8',
34-
description: 'Private network (Class A)',
34+
description: 'Private network',
3535
rfc: 'RFC 1918',
3636
},
3737
PRIVATE_B: {
3838
range: '172.16.0.0/12',
39-
description: 'Private network (Class B)',
39+
description: 'Private network',
4040
rfc: 'RFC 1918',
4141
},
4242
PRIVATE_C: {
4343
range: '192.168.0.0/16',
44-
description: 'Private network (Class C)',
44+
description: 'Private network',
4545
rfc: 'RFC 1918',
4646
},
4747
LINK_LOCAL: {

src/lib/content/private-vs-public-ip.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ The key difference is reachability: private IPs are only reachable within their
1717
range: '10.0.0.0/8',
1818
fullRange: '10.0.0.0 to 10.255.255.255',
1919
addresses: '16,777,216 addresses',
20-
class: 'Class A private range',
20+
class: 'RFC 1918 private range',
2121
commonUse: 'Large enterprises, ISP internal networks',
2222
examples: ['10.0.0.1', '10.1.1.1', '10.200.50.100'],
2323
},
2424
{
2525
range: '172.16.0.0/12',
2626
fullRange: '172.16.0.0 to 172.31.255.255',
2727
addresses: '1,048,576 addresses',
28-
class: 'Class B private range',
28+
class: 'RFC 1918 private range',
2929
commonUse: 'Medium businesses, cloud providers',
3030
examples: ['172.16.0.1', '172.20.1.1', '172.31.255.254'],
3131
},
3232
{
3333
range: '192.168.0.0/16',
3434
fullRange: '192.168.0.0 to 192.168.255.255',
3535
addresses: '65,536 addresses',
36-
class: 'Class C private range',
36+
class: 'RFC 1918 private range',
3737
commonUse: 'Home networks, small offices',
3838
examples: ['192.168.1.1', '192.168.0.100', '192.168.100.50'],
3939
},

src/lib/utils/dns-tools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ function calculateIPv4ReverseZones(ip: string, prefix: number, cidr: string): Re
279279
zones.push(`${thirdOctet}.${secondOctet}.${firstOctet}.in-addr.arpa`);
280280
}
281281
} else {
282-
// Very large networks - show class-based zones
283-
zones.push(`${networkOctets[0]}.in-addr.arpa (Class A network)`);
282+
// Very large networks - show /8 zone
283+
zones.push(`${networkOctets[0]}.in-addr.arpa (/8 network)`);
284284
}
285285

286286
return {

src/lib/utils/ip-security.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ function isPrivateIPv4(ip: string): boolean {
3636
// Loopback: 127.0.0.0/8
3737
if (a === 127) return true;
3838

39-
// Private Class A: 10.0.0.0/8
39+
// Private: 10.0.0.0/8
4040
if (a === 10) return true;
4141

42-
// Private Class B: 172.16.0.0/12
42+
// Private: 172.16.0.0/12
4343
if (a === 172 && b >= 16 && b <= 31) return true;
4444

45-
// Private Class C: 192.168.0.0/16
45+
// Private: 192.168.0.0/16
4646
if (a === 192 && b === 168) return true;
4747

4848
// Link-local: 169.254.0.0/16 (AWS metadata, APIPA)

src/lib/utils/ip-validation.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,20 +163,20 @@ export function validateIPv4Detailed(ip: string): DetailedValidationResponse {
163163
details.scope = 'Host';
164164
details.info.push('Loopback address (localhost)');
165165
} else if (a === 10) {
166-
details.addressType = 'Private (Class A)';
166+
details.addressType = 'Private';
167167
details.scope = 'Private Network';
168168
details.isPrivate = true;
169-
details.info.push('RFC 1918 private address space');
169+
details.info.push('RFC 1918 private address space (10.0.0.0/8)');
170170
} else if (a === 172 && b >= 16 && b <= 31) {
171-
details.addressType = 'Private (Class B)';
171+
details.addressType = 'Private';
172172
details.scope = 'Private Network';
173173
details.isPrivate = true;
174-
details.info.push('RFC 1918 private address space');
174+
details.info.push('RFC 1918 private address space (172.16.0.0/12)');
175175
} else if (a === 192 && b === 168) {
176-
details.addressType = 'Private (Class C)';
176+
details.addressType = 'Private';
177177
details.scope = 'Private Network';
178178
details.isPrivate = true;
179-
details.info.push('RFC 1918 private address space');
179+
details.info.push('RFC 1918 private address space (192.168.0.0/16)');
180180
} else if (a === 169 && b === 254) {
181181
details.addressType = 'Link-Local (APIPA)';
182182
details.scope = 'Link-Local';

src/routes/subnetting/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<th use:tooltip={'CIDR notation - number of network bits'}>CIDR</th>
111111
<th use:tooltip={'Decimal representation of the subnet mask'}>Subnet Mask</th>
112112
<th use:tooltip={'Number of usable host addresses per subnet'}>Hosts</th>
113-
<th use:tooltip={'Number of possible subnets in a Class C'}>Subnets</th>
113+
<th use:tooltip={'Number of possible subnets in a /24 network'}>Subnets</th>
114114
</tr>
115115
</thead>
116116
<tbody>

0 commit comments

Comments
 (0)