Wednesday, February 9, 2011

Conversion Table - Decimal, Hexadecimal, Octal, Binary


http://www.ascii.cl/conversion.htm


Dec

Hex

Oct

Bin

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F

000
001
002
003
004
005
006
007
010
011
012
013
014
015
016
017

00000000
00000001
00000010
00000011
00000100
00000101
00000110
00000111
00001000
00001001
00001010
00001011
00001100
00001101
00001110
00001111


Dec

Hex

Oct

Bin

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F

020
021
022
023
024
025
026
027
030
031
032
033
034
035
036
037

00010000
00010001
00010010
00010011
00010100
00010101
00010110
00010111
00011000
00011001
00011010
00011011
00011100
00011101
00011110
00011111


Dec

Hex

Oct

Bin

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F

040
041
042
043
044
045
046
047
050
051
052
053
054
055
056
057

00100000
00100001
00100010
00100011
00100100
00100101
00100110
00100111
00101000
00101001
00101010
00101011
00101100
00101101
00101110
00101111


Dec

Hex

Oct

Bin

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F

060
061
062
063
064
065
066
067
070
071
072
073
074
075
076
077

00110000
00110001
00110010
00110011
00110100
00110101
00110110
00110111
00111000
00111001
00111010
00111011
00111100
00111101
00111110
00111111


Dec

Hex

Oct

Bin

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F

100
101
102
103
104
105
106
107
110
111
112
113
114
115
116
117

01000000
01000001
01000010
01000011
01000100
01000101
01000110
01000111
01001000
01001001
01001010
01001011
01001100
01001101
01001110
01001111


Dec

Hex

Oct

Bin

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95

50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F

120
121
122
123
124
125
126
127
130
131
132
133
134
135
136
137

01010000
01010001
01010010
01010011
01010100
01010101
01010110
01010111
01011000
01011001
01011010
01011011
01011100
01011101
01011110
01011111


Dec

Hex

Oct

Bin

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F

140
141
142
143
144
145
146
147
150
151
152
153
154
155
156
157

01100000
01100001
01100010
01100011
01100100
01100101
01100110
01100111
01101000
01101001
01101010
01101011
01101100
01101101
01101110
01101111


Dec

Hex

Oct

Bin

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F

160
161
162
163
164
165
166
167
170
171
172
173
174
175
176
177

01110000
01110001
01110010
01110011
01110100
01110101
01110110
01110111
01111000
01111001
01111010
01111011
01111100
01111101
01111110
01111111


Dec

Hex

Oct

Bin

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F

200
201
202
203
204
205
206
207
210
211
212
213
214
215
216
217

10000000
10000001
10000010
10000011
10000100
10000101
10000110
10000111
10001000
10001001
10001010
10001011
10001100
10001101
10001110
10001111


Dec

Hex

Oct

Bin

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F

220
221
222
223
224
225
226
227
230
231
232
233
234
235
236
237

10010000
10010001
10010010
10010011
10010100
10010101
10010110
10010111
10011000
10011001
10011010
10011011
10011100
10011101
10011110
10011111


Dec

Hex

Oct

Bin

160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF

240
241
242
243
244
245
246
247
250
251
252
253
254
255
256
257

10100000
10100001
10100010
10100011
10100100
10100101
10100110
10100111
10101000
10101001
10101010
10101011
10101100
10101101
10101110
10101111


Dec

Hex

Oct

Bin

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF

260
261
262
263
264
265
266
267
270
271
272
273
274
275
276
277

10110000
10110001
10110010
10110011
10110100
10110101
10110110
10110111
10111000
10111001
10111010
10111011
10111100
10111101
10111110
10111111


Dec

Hex

Oct

Bin

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF

300
301
302
303
304
305
306
307
310
311
312
313
314
315
316
317

11000000
11000001
11000010
11000011
11000100
11000101
11000110
11000111
11001000
11001001
11001010
11001011
11001100
11001101
11001110
11001111


Dec

Hex

Oct

Bin

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223

D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF

320
321
322
323
324
325
326
327
330
331
332
333
334
335
336
337

11010000
11010001
11010010
11010011
11010100
11010101
11010110
11010111
11011000
11011001
11011010
11011011
11011100
11011101
11011110
11011111


Dec

Hex

Oct

Bin

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF

340
341
342
343
344
345
346
347
350
351
352
353
354
355
356
357

11100000
11100001
11100010
11100011
11100100
11100101
11100110
11100111
11101000
11101001
11101010
11101011
11101100
11101101
11101110
11101111


Dec

Hex

Oct

Bin

240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF

360
361
362
363
364
365
366
367
370
371
372
373
374
375
376
377

11110000
11110001
11110010
11110011
11110100
11110101
11110110
11110111
11111000
11111001
11111010
11111011
11111100
11111101
11111110
11111111

IP address


From Wikipedia, the free encyclopedia
  (Redirected from Static IP)
An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication.[1] An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there."[2]
The designers of the Internet Protocol defined an IP address as a 32-bit number[1] and this system, known as Internet Protocol Version 4 (IPv4), is still in use today. However, due to the enormous growth of the Internet and the predicted depletion of available addresses, a new addressing system (IPv6), using 128 bits for the address, was developed in 1995,[3] standardized as RFC 2460 in 1998,[4] and is being deployed world-wide since the mid-2000s.
IP addresses are binary numbers, but they are usually stored in text files and displayed in human-readable notations, such as 172.16.254.1 (for IPv4), and 2001:db8:0:1234:0:567:8:1 (for IPv6).
The Internet Assigned Numbers Authority (IANA) manages the IP address space allocations globally and delegates five regional Internet registries (RIRs) to allocate IP address blocks to local Internet registries (Internet service providers) and other entities.

Contents

[hide]

IP versions

Two versions of the Internet Protocol (IP) are in use: IP Version 4 and IP Version 6. (See IP version history for details.) Each version defines an IP address differently. Because of its prevalence, the generic term IP address typically still refers to the addresses defined by IPv4.

IP version 4 addresses

Decomposition of an IPv4 address from dot-decimal notation to its binary value.
In IPv4 an address consists of 32 bits which limits the address space to 4294967296 (232) possible unique addresses. IPv4 reserves some addresses for special purposes such as private networks (~18 million addresses) or multicast addresses (~270 million addresses).
IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1. Each part represents a group of 8 bits (octet) of the address. In some cases of technical writing, IPv4 addresses may be presented in various hexadecimal, octal, or binary representations.

IPv4 subnetting

In the early stages of development of the Internet Protocol,[1] network administrators interpreted an IP address in two parts: network number portion and host number portion. The highest order octet (most significant eight bits) in an address was designated as the network number and the remaining bits were called the rest field or host identifier and were used for host numbering within a network.
This early method soon proved inadequate as additional networks developed that were independent of the existing networks already designated by a network number. In 1981, the Internet addressing specification was revised with the introduction of classful network architecture.[2]
Classful network design allowed for a larger number of individual network assignments and fine-grained subnetwork design. The first three bits of the most significant octet of an IP address were defined as the class of the address. Three classes (A, B, and C) were defined for universal unicast addressing. Depending on the class derived, the network identification was based on octet boundary segments of the entire address. Each class used successively additional octets in the network identifier, thus reducing the possible number of hosts in the higher order classes (B and C). The following table gives an overview of this now obsolete system.
Historical classful network architecture
Class Leading
address bits
Range of
first octet
Network ID
format
Host ID
format
Number of networks Number of addresses
A 0 0 - 127 a b.c.d 27 = 128 224 = 16777216
B 10 128 - 191 a.b c.d 214 = 16384 216 = 65536
C 110 192 - 223 a.b.c d 221 = 2097152 28 = 256
Classful network design served its purpose in the startup stage of the Internet, but it lacked scalability in the face of the rapid expansion of the network in the 1990s. The class system of the address space was replaced with Classless Inter-Domain Routing (CIDR) in 1993. CIDR is based on variable-length subnet masking (VLSM) to allow allocation and routing based on arbitrary-length prefixes.
Today, remnants of classful network concepts function only in a limited scope as the default configuration parameters of some network software and hardware components (e.g. netmask), and in the technical jargon used in network administrators' discussions.

IPv4 private addresses

Early network design, when global end-to-end connectivity was envisioned for communications with all Internet hosts, intended that IP addresses be uniquely assigned to a particular computer or device. However, it was found that this was not always necessary as private networks developed and public address space needed to be conserved.
Computers not connected to the Internet, such as factory machines that communicate only with each other via TCP/IP, need not have globally-unique IP addresses. Three ranges of IPv4 addresses for private networks were reserved in RFC 1918. These addresses are not routed on the Internet and thus their use need not be coordinated with an IP address registry.
Today, when needed, such private networks typically connect to the Internet through network address translation (NAT).
IANA-reserved private IPv4 network ranges

Start End No. of addresses
24-bit Block (/8 prefix, 1 × A) 10.0.0.0 10.255.255.255 16777216
20-bit Block (/12 prefix, 16 × B) 172.16.0.0 172.31.255.255 1048576
16-bit Block (/16 prefix, 256 × C) 192.168.0.0 192.168.255.255 65536
Any user may use any of the reserved blocks. Typically, a network administrator will divide a block into subnets; for example, many home routers automatically use a default address range of 192.168.0.0 - 192.168.0.255 (192.168.0.0/24).

IPv4 address exhaustion

IPv4 address exhaustion is the ultimate result of the decreasing supply of unallocated Internet Protocol Version 4 (IPv4) addresses available at the Internet Assigned Numbers Authority (IANA) and the regional Internet registries (RIRs) for assignment to end users and local Internet registries, such as Internet service providers. IPv4 provides for approximately 4.3 billion (232) addresses, divided into 256 /8 primary allocation blocks. IANA's primary address pool was exhausted on February 3, 2011 when the last 5 blocks were allocated to the 5 RIRs.[5][6] The first RIR to run out, APNIC, is expected to run out mid-2011[7].

IP version 6 addresses

Decomposition of an IPv6 address from hexadecimal representation to its binary value.
The rapid exhaustion of IPv4 address space, despite conservation techniques, prompted the Internet Engineering Task Force (IETF) to explore new technologies to expand the Internet's addressing capability. The permanent solution was deemed to be a redesign of the Internet Protocol itself. This next generation of the Internet Protocol, intended to replace IPv4 on the Internet, was eventually named Internet Protocol Version 6 (IPv6) in 1995[3][4] The address size was increased from 32 to 128 bits or 16 octets. This, even with a generous assignment of network blocks, is deemed sufficient for the foreseeable future. Mathematically, the new address space provides the potential for a maximum of 2128, or about 3.403×1038 unique addresses.
The new design is not intended to provide a sufficient quantity of addresses on its own, but rather to allow efficient aggregation of subnet routing prefixes to occur at routing nodes. As a result, routing table sizes are smaller, and the smallest possible individual allocation is a subnet for 264 hosts, which is the square of the size of the entire IPv4 Internet. At these levels, actual address utilization rates will be small on any IPv6 network segment. The new design also provides the opportunity to separate the addressing infrastructure of a network segment — that is the local administration of the segment's available space — from the addressing prefix used to route external traffic for a network. IPv6 has facilities that automatically change the routing prefix of entire networks, should the global connectivity or the routing policy change, without requiring internal redesign or renumbering.
The large number of IPv6 addresses allows large blocks to be assigned for specific purposes and, where appropriate, to be aggregated for efficient routing. With a large address space, there is not the need to have complex address conservation methods as used in Classless Inter-Domain Routing (CIDR).
Many modern desktop and enterprise server operating systems include native support for the IPv6 protocol, but it is not yet widely deployed in other devices, such as home networking routers, voice over IP (VoIP) and multimedia equipment, and network peripherals.

IPv6 private addresses

Just as IPv4 reserves addresses for private or internal networks, blocks of addresses are set aside in IPv6 for private addresses. In IPv6, these are referred to as unique local addresses (ULA). RFC 4193 sets aside the routing prefix fc00::/7 for this block which is divided into two /8 blocks with different implied policies (cf. IPv6) The addresses include a 40-bit pseudorandom number that minimizes the risk of address collisions if sites merge or packets are misrouted.
Early designs (RFC 3513) used a different block for this purpose (fec0::), dubbed site-local addresses. However, the definition of what constituted sites remained unclear and the poorly defined addressing policy created ambiguities for routing. The address range specification was abandoned and must not be used in new systems.
Addresses starting with fe80:, called link-local addresses, are assigned to interfaces for communication on the link only. The addresses are usually automatically generated by the operating system for each network interface. This provides instant automatic network connectivity for any IPv6 host and means that if several hosts connect to a common hub or switch, they have an instant communication path via their link-local IPv6 address. This feature is used extensively, and invisibly to most users, in the lower layers of IPv6 network administration (cf. Neighbor Discovery Protocol).
None of the private address prefixes may be routed in the public Internet.

IP subnetworks

IP networks may be divided into subnetworks in both IPv4 and IPv6. For this purpose, an IP address is logically recognized as consisting of two parts: the network prefix and the host identifier, or interface identifier (IPv6). The subnet mask or the CIDR prefix determines how the IP address is divided into network and host parts.
The term subnet mask is only used within IPv4. Both IP versions however use the Classless Inter-Domain Routing (CIDR) concept and notation. In this, the IP address is followed by a slash and the number (in decimal) of bits used for the network part, also called the routing prefix. For example, an IPv4 address and its subnet mask may be 192.0.2.1 and 255.255.255.0, respectively. The CIDR notation for the same IP address and subnet is 192.0.2.1/24, because the first 24 bits of the IP address indicate the network and subnet.

IP address assignment

Internet Protocol addresses are assigned to a host either anew at the time of booting, or permanently by fixed configuration of its hardware or software. Persistent configuration is also known as using a static IP address. In contrast, in situations when the computer's IP address is assigned newly each time, this is known as using a dynamic IP address.

Methods

Static IP addresses are manually assigned to a computer by an administrator. The exact procedure varies according to platform. This contrasts with dynamic IP addresses, which are assigned either by the computer interface or host software itself, as in Zeroconf, or assigned by a server using Dynamic Host Configuration Protocol (DHCP). Even though IP addresses assigned using DHCP may stay the same for long periods of time, they can generally change. In some cases, a network administrator may implement dynamically assigned static IP addresses. In this case, a DHCP server is used, but it is specifically configured to always assign the same IP address to a particular computer. This allows static IP addresses to be configured centrally, without having to specifically configure each computer on the network in a manual procedure.
In the absence or failure of static or stateful (DHCP) address configurations, an operating system may assign an IP address to a network interface using state-less auto-configuration methods, such as Zeroconf.

Uses of dynamic addressing

Dynamic IP addresses are most frequently assigned on LANs and broadband networks by Dynamic Host Configuration Protocol (DHCP) servers. They are used because it avoids the administrative burden of assigning specific static addresses to each device on a network. It also allows many devices to share limited address space on a network if only some of them will be online at a particular time. In most current desktop operating systems, dynamic IP configuration is enabled by default so that a user does not need to manually enter any settings to connect to a network with a DHCP server. DHCP is not the only technology used to assign dynamic IP addresses. Dialup and some broadband networks use dynamic address features of the Point-to-Point Protocol.

Sticky dynamic IP address

A sticky dynamic IP address is an informal term used by cable and DSL Internet access subscribers to describe a dynamically assigned IP address that seldom changes. The addresses are usually assigned with the DHCP protocol. Since the modems are usually powered-on for extended periods of time, the address leases are usually set to long periods and simply renewed upon expiration. If a modem is turned off and powered up again before the next expiration of the address lease, it will most likely receive the same IP address.

[edit] Address autoconfiguration

RFC 3330 defines an address block, 169.254.0.0/16, for the special use in link-local addressing for IPv4 networks. In IPv6, every interface, whether using static or dynamic address assignments, also receives a local-link address automatically in the fe80::/10 subnet.
These addresses are only valid on the link, such as a local network segment or point-to-point connection, that a host is connected to. These addresses are not routable and like private addresses cannot be the source or destination of packets traversing the Internet.
When the link-local IPv4 address block was reserved, no standards existed for mechanisms of address autoconfiguration. Filling the void, Microsoft created an implementation that is called Automatic Private IP Addressing (APIPA). Due to Microsoft's market power, APIPA has been deployed on millions of machines and has, thus, become a de facto standard in the industry. Many years later, the IETF defined a formal standard for this functionality, RFC 3927, entitled Dynamic Configuration of IPv4 Link-Local Addresses.

Uses of static addressing

Some infrastructure situations have to use static addressing, such as when finding the Domain Name System(DNS) host that will translate domain names to IP addresses. Static addresses are also convenient, but not absolutely necessary, to locate servers inside an enterprise. An address obtained from a DNS server comes with a time to live, or caching time, after which it should be looked up to confirm that it has not changed. Even static IP addresses do change as a result of network administration (RFC 2072)

Public addresses

A public IP address in common parlance is synonymous with a, globally routable unicast IP address.[citation needed]
Both IPv4 and IPv6 define address ranges that are reserved for private networks and link-local addressing. The term public IP address often used exclude these types of addresses.

Modifications to IP addressing

IP blocking and firewalls

Firewalls perform Internet Protocol blocking to protect networks from unauthorized access. They are common on today's Internet. They control access to networks based on the IP address of a client computer. Whether using a blacklist or a whitelist, the IP address that is blocked is the perceived IP address of the client, meaning that if the client is using a proxy server or network address translation, blocking one IP address may block many individual computers.

 IP address translation

Multiple client devices can appear to share IP addresses: either because they are part of a shared hosting web server environment or because an IPv4 network address translator (NAT) or proxy server acts as an intermediary agent on behalf of its customers, in which case the real originating IP addresses might be hidden from the server receiving a request. A common practice is to have a NAT hide a large number of IP addresses in a private network. Only the "outside" interface(s) of the NAT need to have Internet-routable addresses.[8]
Most commonly, the NAT device maps TCP or UDP port numbers on the outside to individual private addresses on the inside. Just as a telephone number may have site-specific extensions, the port numbers are site-specific extensions to an IP address.
In small home networks, NAT functions usually take place in a residential gateway device, typically one marketed as a "router". In this scenario, the computers connected to the router would have 'private' IP addresses and the router would have a 'public' address to communicate with the Internet. This type of router allows several computers to share one public IP address.

[edit] Diagnostic tools

Computer operating systems provide various diagnostic tools to examine their network interface and address configuration. Windows provides the command-line interface tools ipconfig and netsh and users of Unix-like systems can use ifconfig, netstat, route, lanstat, ifstat, or iproute2 utilities to accomplish the task.

 See also

References

  1. ^ a b c RFC 760, DOD Standard Internet Protocol (January 1980)
  2. ^ a b RFC 791, Internet Protocol - DARPA Internet Program Protocol Specification (September 1981)
  3. ^ a b RFC 1883, Internet Protocol, Version 6 (IPv6) Specification, S. Deering, R. Hinden (December 1995)
  4. ^ a b RFC 2460, Internet Protocol, Version 6 (IPv6) Specification, padnda'srockS. Deering, R. Hinden, The Internet Society (December 1998)
  5. ^ Smith, Lucie; Lipner, Ian (3 February 2011). "Free Pool of IPv4 Address Space Depleted". Number Resource Organization. Retrieved 3 February 2011.
  6. ^ ICANN,nanog mailing list. "Five /8s allocated to RIRs - no unallocated IPv4 unicast /8s remain".
  7. ^ "Two /8s allocated to APNIC from IANA". APNIC. 2010-01-01. Retrieved 2011-02-03.
  8. ^ Comer, Douglas (2000). Internetworking with TCP/IP:Principles, Protocols, and Architectures -- 4th ed.. Upper Saddle River, NJ: Prentice Hall. p. 394. ISBN 0-13-018380-6.

 External links

Subnet Cheat Sheet

http://krow.net/dict/subnet.html

Subnet Cheat Sheet


HostsNetmaskAmount of a Class C
/304255.255.255.2521/64
/298255.255.255.2481/32
/2816255.255.255.2401/16
/2732255.255.255.2241/8
/2664255.255.255.1921/4
/24256255.255.255.01
/23512255.255.254.02
/221024255.255.252.04
/212048255.255.248.08
/204096255.255.240.016
/198192255.255.224.032
/1816384255.255.192.064
/1732768255.255.128.0128
/1665536255.255.0.0256


Guide to sub-class C blocks

/25 -- 2 Subnets -- 126 Hosts/Subnet
Network #IP RangeBroadcast
.0.1-.126.127
.128.129-.254.255
/30 -- 64 Subnets -- 2 Hosts/Subnet
Network #IP RangeBroadcast
.0.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
.124.125-.126.127
.128.129-.130.131
.132.133-.134.135
.136.137-.138.139
.140.141-.142.143
.144.145-.146.147
.148.149-.150.151
.152.153-.154.155
.156.157-.158.159
.160.161-.162.163
.164.165-.166.167
.168.169-.170.171
.172.173-.174.175
.176.177-.178.179
.180.181-.182.183
.184.185-.186.187
.188.189-.190.191
.192.193-.194.195
.196.197-.198.199
.200.201-.202.203
.204.205-.206.207
.208.209-.210.211
.212.213-.214.215
.216.217-.218.219
.220.221-.222.223
.224.225-.226.227
.228.229-.230.231
.232.233-.234.235
.236.237-.238.239
.240.241-.242.243
.244.245-.246.247
.248.249-.250.251
.252.253-.254.255
/26 -- 4 Subnets -- 62 Hosts/Subnet
Network #IP RangeBroadcast
.0.1-.62.63
.64.65-.126.127
.128.129-.190.191
.192.193-.254.255
/27 -- 8 Subnets -- 30 Hosts/Subnet
Network #IP RangeBroadcast
.0.1-.30.31
.32.33-.62.63
.64.65-.94.95
.96.97-.126.127
.128.129-.158.159
.160.161-.190.191
.192.193-.222.223
.224.225-.254.255
/28 -- 16 Subnets -- 14 Hosts/Subnet
Network #IP RangeBroadcast
.0.1-.14.15
.16.17-.30.31
.32.33-.46.47
.48.49-.62.63
.64.65-.78.79
.80.81-.94.95
.96.97-.110.111
.112.113-.126.127
.128.129-.142.143
.144.145-.158.159
.160.161-.174.175
.176.177-.190.191
.192.193-.206.207
.208.209-.222.223
.224.225-.238.239
.240.241-.254.255
/29 -- 32 Subnets -- 6 Hosts/Subnet
Network #IP RangeBroadcast
.0.1-.6.7
.8.9-.14.15
.16.17-.22.23
.24.25-.30.31
.32.33-.38.39
.40.41-.46.47
.48.49-.54.55
.56.57-.62.63
.64.65-.70.71
.72.73-.78.79
.80.81-.86.87
.88.89-.94.95
.96.97-.102.103
.104.105-.110.111
.112.113-.118.119
.120.121-.126.127
.128.129-.134.135
.136.137-.142.143
.144.145-.150.151
.152.153-.158.159
.160.161-.166.167
.168.169-.174.175
.176.177-.182.183
.184.185-.190.191
.192.193-.198.199
.200.201-.206.207
.208.209-.214.215
.216.217-.222.223
.224.225-.230.231
.232.233-.238.239
.240.241-.246.247
.248.249-.254.255

IP Subnet Calculator

http://www.subnet-calculator.com/subnet.php?net_class=C

Online Bitwise Calculator

http://www.miniwebtool.com/bitwise-calculator/

Subnetwork


From Wikipedia, the free encyclopedia
Creating a subnet by dividing the host identifier
A subnetwork, or subnet, is a logically visible subdivision of an IP network.[1] The practice of dividing a network into subnetworks is called subnetting.
All computers that belong to a subnet are addressed with a common, identical, most-significant bit-group in their IP address. This results in the logical division of an IP address into two fields, a network or routing prefix and the rest field. The rest field is a specific identifier for the computer or the network interface.
The routing prefix is expressed in CIDR notation. It is written as the first address of a network followed by the bit-length of the prefix, separated by a slash (/) character. For example, 192.168.1.0/24 is the prefix of the Internet Protocol Version 4 network starting at the given address, having 24 bits allocated for the network prefix, and the rest (8 bits) reserved for host addressing. The IPv6 address specification 2001:db8::/32 is a large network for 296 hosts, having a 32-bit routing prefix. In IPv4 the routing prefix is also specified in the form of the subnet mask, which is expressed in quad-dotted decimal representation like an address. For example, 255.255.255.0 is the network mask for the 192.168.1.0/24 prefix.
Traffic between subnetworks is interchanged with special gateway computers called routers; they constitute logical or physical borders between the subnets.
The benefits of subnetting vary with each deployment scenario. In the address allocation architecture of the Internet using Classless Inter-Domain Routing (CIDR) and in large organizations, it is necessary to allocate address space efficiently. It may also enhance routing efficiency, or have advantages in network management when subnetworks are administratively controlled by different entities in a larger organization. Subnets may be arranged logically in a hierarchical architecture, partitioning an organization's network address space into a tree-like routing structure.

Contents

[hide]

[edit] Network addressing and routing

Computers participating in a network such as the Internet each have at least one logical address. Usually this address is unique to each device and can either be configured dynamically from a network server, statically by an administrator, or automatically by stateless address autoconfiguration.
An address fulfills the functions of identifying the host and locating it on the network. The most common network addressing architecture is Internet Protocol version 4 (IPv4), but its successor, IPv6 is in early deployment stages. An IPv4 address consists of 32 bits, for human readability written in a form consisting of four decimal octets separated by full stops (dots), called dot-decimal notation. An IPv6 address consists of 128 bits written in a hexadecimal notation and grouping 16 bits separated by colons.
For the purpose of network management, an IP address is logically divided into two fields, a network prefix and the rest field. All hosts on a subnetwork have the same network prefix. This routing prefix occupies the most-significant bits of the address. The number of bits allocated within a network to the internal routing prefix may vary between subnets, depending on the network architecture. While in IPv6 the prefix must consist of a set of contiguous 1-bits, in IPv4 this is not enforced, albeit no efficiency is gained. The rest field is a unique local identification and is either a host number on the local network or an interface identifier.
This logical addressing structure permits the selective routing of IP packets across multiple networks via special gateway computers, called routers, to a destination host if the network prefixes of origination and destination hosts differ, or sent directly to a target host on the local network if they are the same. Routers constitute logical or physical borders between the subnets, and manage traffic between them. Each subnet is served by a designated default router, but may consist internally of multiple physical Ethernet segments interconnected by network switches or network bridges.
The routing prefix of an address is written in a form identical to that of the address itself. This is called the network mask, or netmask, of the address. For example, a specification of the most-significant 18 bits of an IPv4 address, 11111111.11111111.11000000.00000000, is written as 255.255.192.0. If this mask designates a subnet within a larger network, it is also called the subnet mask. This form of denoting the network mask, however, is only used for IPv4 networks.
The modern standard form of specification of the network prefix, used for both IPv4 and IPv6, counts the number of bits in the prefix and appends that number to the address with a slash (/) separator:
  • 192.168.0.0, netmask 255.255.0.0 is written as 192.168.0.0/16
  • In IPv6, 2001:db8::/32 designates the address 2001:db8:: and its network prefix consisting of the most significant 32 bits.
This notation was introduced with Classless Inter-Domain Routing (CIDR) and is called CIDR notation (RFC 4632). In IPv6 this is the only acceptable form to denote network or routing prefixes.
In classful networking in IPv4, prior to the introduction of CIDR, the network prefix could be directly obtained from the IP address, based on its highest order bit sequence. This determined the class (A, B, C) of the address and therefore the network mask. Since the introduction of CIDR, however, assignment of an IP address to a network interface requires two parameters, the address and its network mask.
In IPv4, on-link determination for an IP address is given simply by the address and netmask configuration, as the address cannot be disassociated from the on-link prefix.[2] For IPv6, however, on-link determination is different in detail and requires the Neighbor Discovery Protocol (NDP).[3][4] IPv6 address assignment to an interface carries no requirement of a matching on-link prefix and vice versa, with the exception of link-local addresses.
While subnetting may improve network performance in an organizational network, it increases routing complexity, since each locally connected subnet must be represented by a separate entry in the routing tables of each connected router. However, by careful design of the network, routes to collections of more distant subnets within the branches of a tree-hierarchy can be aggregated by single routes. Variable-length subnet masking (VLSM) functionality in commercial routers made the introduction of CIDR seamless across the Internet and in enterprise networks.

IPv4 subnetting

The process of subnetting involves the separation of the network and subnet portion of an address from the host identifier. This is performed by a bitwise AND operation between the IP address and the (sub)network prefix. The result yields the network address or prefix, and the remainder is the host identifier.

 Determining the network prefix

An IPv4 network mask consist of 32 bits, a sequence of ones (1) followed by a block of 0s. The last block of zeros (0) designate that part as being the host identifier.
The following example shows the separation of the network prefix and the host identifier from an address (192.168.5.130) and its associated /24 network mask (255.255.255.0). The operation is visualized in a table using binary address formats.

Binary form Dot-decimal notation
IP address 11000000.10101000.00000101.10000010 192.168.5.130
Subnet mask 11111111.11111111.11111111.00000000 255.255.255.0
Network prefix 11000000.10101000.00000101.00000000 192.168.5.0
Host part 00000000.00000000.00000000.10000010 0.0.0.130
The mathematical operation for calculating the network prefix is the binary and. The result of the operation yields the network prefix 192.168.5.0 and the host number 130 of a possible maximum of 256 addresses.

 Subnetting

Subnetting is the process of designating some high-order bits from the host part and grouping them with the network mask to form the subnet mask. This divides a network into smaller subnets. The following diagram modifies the example by moving two bits from the host part to the subnet mask to form a smaller subnet one fourth the previous size:

Binary form Dot-decimal notation
IP address 11000000.10101000.00000101.10000010 192.168.5.130
Subnet mask 11111111.11111111.11111111.11000000 255.255.255.192
Network prefix 11000000.10101000.00000101.10000000 192.168.5.128
Host part 00000000.00000000.00000000.00000010 0.0.0.2

 Special addresses and subnets

Internet Protocol version 4 uses specially designated address formats to facilitate recognition of special address functionality. The first and the last subnets obtained by subnetting have traditionally had a special designation and, early on, special usage implications.[5] In addition, IPv4 uses the all ones host address, i.e. the last address within a network, for broadcast transmission to all hosts on the link.

Subnet zero and the all-ones subnet

The first subnet obtained from subnetting has all bits in the subnet bit group set to zero (0). It is therefore called subnet zero.[6] The last subnet obtained from subnetting has all bits in the subnet bit group set to one (1). It is therefore called the all-ones subnet.[7]
The IETF discouraged the production use of these two subnets at one point due to possible confusion of having a network and subnet with the same address.[8] The practice of avoiding subnet zero and the all-ones subnet was declared obsolete in 1995 by RFC 1878, an informational, but now historical RFC.[9]

Subnet and host counts

The number of subnetworks available, and the number of possible hosts in a network may be readily calculated. In the example (above) two bits were borrowed to create subnetworks, thus creating 4 (22) possible subnets.
Network Network (binary) Broadcast address
192.168.5.0/26 11000000.10101000.00000101.00000000 192.168.5.63
192.168.5.64/26 11000000.10101000.00000101.01000000 192.168.5.127
192.168.5.128/26 11000000.10101000.00000101.10000000 192.168.5.191
192.168.5.192/26 11000000.10101000.00000101.11000000 192.168.5.255
The RFC 950 specification reserves the subnet values consisting of all zeros (see above) and all ones (broadcast), reducing the number of available subnets by two. However, due to the inefficiencies introduced by this convention it was abandoned for use on the public Internet, and is only relevant when dealing with legacy equipment that does not implement CIDR. The only reason not to use the all-zeroes subnet is that it is ambiguous when the prefix length is not available. All CIDR-compliant routing protocols transmit both length and suffix. RFC 1878 provides a subnetting table with examples.
The remaining bits after the subnet are used for addressing hosts within the subnet. In the above example the subnet mask consists of 26 bits, leaving 6 bits for the host identifier. This allows for 64 combinations (26), however the all zeros value and all ones value are reserved for the network ID and broadcast address respectively, leaving 62 addresses.
In general the number of available hosts on a subnet is 2n−2, where n is the number of bits used for the host portion of the address.
RFC 3021 specifies an exception to this rule when dealing with 31-bit subnet masks (i.e. 1-bit host identifiers). In such networks, usually point-to-point links, only two hosts (the end points) may be connected and a specification of network and broadcast addresses is not necessary.
A /24 network may be divided into the following subnets by increasing the subnet mask successively by one bit. This affects the total number of hosts that can be addressed in the /24 network (last column).
CIDR notation Network mask Available
subnets
Available
hosts per subnet
Total
usable hosts
/24 255.255.255.0 1 254 254
/25 255.255.255.128 2 126 252
/26 255.255.255.192 4 62 248
/27 255.255.255.224 8 30 240
/28 255.255.255.240 16 14 224
/29 255.255.255.248 32 6 192
/30 255.255.255.252 64 2 128
/31 255.255.255.254 128 2 * 256
*only applicable for point-to-point links

IPv6 subnetting

The design of the IPv6 address space differs significantly from IPv4. The primary reason for subnetting in IPv4 is to improve efficiency in the utilization of the relatively small address space available, particularly to enterprises. No such limitations exist in IPv6, as the address space available, even to end-users, is large.
An IPv6 subnet always has 64 bits in its host portion. It therefore has a /64 routing prefix (128−64 = the 64 most-significant bits). Although it is technically possible to use smaller subnets,[citation needed] they are impractical for local area networks because stateless address auto configuration of network interfaces (RFC 4862) requires a /64 address. The Internet Engineering Task Force recommends to use /64 subnets even for point-to-point links, which consists of only the two end hosts.
The recommended allocation for an IPv6 customer site is an address space of 80 address bits (prefix /48).[10] This provides 65536 subnets for a site. Despite this recommendation, other common allocations are /56 (72 bits) as well as /64 prefixes for a residential customer network.
IPv6 does not implement special address formats for broadcast traffic or network numbers, and thus all addresses in a subnet are valid host addresses.
Subnetting in IPv6 is based on the concepts of variable-length subnet masking (VLSM) and the Classless Inter-Domain Routing methodology. It is used to route traffic between the global allocation spaces and within customer network between subnets and the larger Internet.

 See also

References

  1. ^ RFC 950, Internet Standard Subnetting Procedure, J. Mogul, J. Postel (August 1985), page 1, 16
  2. ^ RFC 1122, Requirements for Internet Hosts -- Communication Layers, Section 3.3.1, R. Braden, IETF (October 1989)
  3. ^ RFC 4861, Neighbor Discovery for IP version 6 (IPv6), T. Narten et al. (September 2007)
  4. ^ RFC 5942, IPv6 Subnet Model: The Relationship between Links and Subnet Prefixes, H. Singh, W. Beebee, E. Nordmark (July 2010)
  5. ^ "Document ID 13711 - Subnet Zero and the All-Ones Subnet". Cisco Systems, Inc.. 2005-08-10. Retrieved 2010-04-25. "Traditionally, it was strongly recommended that subnet zero and the all-ones subnet not be used for addressing. [...] Today, the use of subnet zero and the all-ones subnet is generally accepted and most vendors support their use."
  6. ^ "Document ID 13711 - Subnet Zero and the All-Ones Subnet". Cisco Systems, Inc.. 2005-08-10. Retrieved 2010-04-23. "the first [...] subnet[...], known as subnet zero"
  7. ^ "Document ID 13711 - Subnet Zero and the All-Ones Subnet". Cisco Systems, Inc.. 2005-08-10. Retrieved 2010-04-23. "[...] the last subnet[...], known as [...] the all-ones subnet"
  8. ^ Jeffrey Mogul; Jon Postel (August 1985). [RFC 950 "Internet Standard Subnetting Procedure"]. Internet Engineering Task Force (IETF). p. 6. Retrieved 2010-04-23. "It is useful to preserve and extend the interpretation of these special addresses in subnetted networks. This means the values of all zeros and all ones in the subnet field should not be assigned to actual (physical) subnets."
  9. ^ Troy Pummill; Bill Manning (December 1995). [RFC 1878 "Variable Length Subnet Table For IPv4"]. "This practice is obsolete! Modern software will be able to utilize all definable networks." Note: RFC 1878 is an Informational RFC, and has been demoted to category Historic.
  10. ^ "IPv6 Addressing Plans". ARIN IPv6 Wiki. Retrieved 2010-04-25. "All customers get one /48 unless they can show that they need more than 65k subnets. [...] If you have lots of consumer customers you may want to assign /56s to private residence sites."

 Further reading

  • RFC 1812 Requirements for IPv4 Routers
  • RFC 917 Utility of subnets of Internet networks
  • RFC 1101 DNS Encodings of Network Names and Other Type
  • Blank, Andrew G. TCP/IP Foundations Technology Fundamentals for IT Success. San Francisco, London: Sybex, Copyright 2004.
  • Lammle, Todd. CCNA Cisco Certified Network Associate Study Guide 5th Edition. San Francisco, London: Sybex, Copyright 2005.
  • Groth, David and Toby Skandier. Network + Study Guide, 4th Edition. San Francisco, London: Wiley Publishing, Inc., Copyright 2005.

 External links