-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
123 lines (112 loc) · 5.12 KB
/
index.html
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Subnet Analysis</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700;900&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Poppins', sans-serif;
}
.numbers{
font-family: 'JetBrains Mono', monospace;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand">Subnet Analysis</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ">
<li class="nav-item active ">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item ">
<a class="nav-link" href="IP%20Converter.html">IP Converter</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Other.html">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-lg-6">
<h1>Subnet Analysis</h1>
<p>Enter IP address & Subnet Mask <br>
ex: IP address = 8.1.4.5 | Subnet Mask = 255.240.0.0 </p>
<div>
<div class="form-group">
<label for="ipAddress">IP Address:</label>
<input type="text" class="numbers form-control" id="ipAddress" maxlength="15"
placeholder="Enter IP Address">
</div>
<div class="form-group">
<label for="subnetMask">Subnet Mask:</label>
<input type="text" class="numbers form-control" id="subnetMask" maxlength="15"
placeholder="Enter Subnet Mask">
</div>
<button class="btn btn-primary" id="calculate">Analise</button>
</div>
<div class="m-3">
<div class="row">
<div>
<h6 style="color: red"><strong>Subnet Mask in Binary: </strong></h6>
<h6 style="color: blue"><strong>IP in Binary: </strong></h6>
</div>
<div>
<h6 style="color: red" class="numbers subnetMaskBinary">00000000.00000000.00000000.00000000</h6>
<h6 style="color: blue" class="numbers" id="ipInBinary">00000000.00000000.00000000.00000000</h6>
</div>
</div>
</div>
</div>
<div>
<div class="col-sm-12 col-lg-12">
<h3>Analysis</h3>
<div>
<p><strong>Address range:</strong> <span style="color: blue" class="numbers" id="addressRange"></span></p>
</div>
<div>
<p><strong>Class:</strong> <span style="color: blue" class="numbers" id="ipClass"></span></p>
</div>
<div>
<p><strong>Network Bits:</strong> <span style="color: blue" class="numbers" id="NetworkBits"></span></p>
</div>
<div>
<p><strong>Prefix Bits:</strong> <span style="color: blue" class="numbers" id="prefixBits"></span></p>
</div>
<div>
<p><strong>Subnet Bits:</strong> <span style="color: blue" class="numbers" id="subnetBits"></span> | (prefix bits - network bits)</p>
</div>
<div>
<p><strong>Host Bits:</strong> <span style="color: blue" class="numbers" id="hostBits"></span> | (32 - prefix bits)</p>
</div>
<div>
<p><strong>No. of possible subnets in this network :</strong> <span style="color: blue" class="numbers" id="possibleSubnetsNo"></span> |
2^Subnet Bits</p>
</div>
<div>
<p><strong>No. of hosts per subnet :</strong> <span style="color: blue" class="numbers" id="possibleHostsNo"></span> | (2^Host bits) - 2
</p>
</div>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="script.js"></script>
</body>
</html>