cmdref.net - Command Reference

This site is command references for system engineers.

User Tools

Site Tools


Top     OS ( Linux )     Middleware     Protocol     Hardware     Programming ( Shell Script )     SiteMap

Sidebar

Top     SiteMap








Reference











.

network:ip.html



Network#basic

IP address

Web Sites

Definition of term

Term Explanation
static IP address
dynamic IP address
public IP address
Private IP address

Private addresses

Class Start End Subnetmask No. of addresses Example
A 10.0.0.0 10.255.255.255 255.0.0.0 16,777,216 10.0.0.0/24
10.0.1.0/24
10.1.0.0/24
10.2.0.0/24
B 172.16.0.0 172.31.255.255 255.240.0.0 1,048,576 172.16.0.0/24
172.16.1.0/24
172.17.0.0/24
C 192.168.0.0 192.168.255.255 255.255.0.065,536 192.168.0.0/24
192.168.1.0/24


IPv4 CIDR

  • the number of available host addresses is usually reduced by two, namely the largest address, which is reserved as the broadcast address, and the smallest address, which identifies the network itself.
CIDR Mask Hosts the number of available host
/32 255.255.255.255 1 -
/31 255.255.255.254 2 0
/30 255.255.255.252 4 2
/29 255.255.255.248 8 6
/28 255.255.255.240 16 14
/27 255.255.255.224 32 30
/26 255.255.255.192 64 62
/25 255.255.255.128 128 126
/24 255.255.255.0 256 254
/23 255.255.254.0 512 510
/22 255.255.252.0 1,024 1,022
/21 255.255.248.0 2,048 2,046
/20 255.255.240.0 4,096 4,094
/19 255.255.224.0 8,192 8,190
/16 255.255.0.0 131,072 131,070
/8 255.0.0.0 16,777,216 16,777,214
/24 /25 /26 /27 /28 /29 /30
255.255.255.0 255.255.255.128 255.255.255.192 255.255.255.224 255.255.255.240 255.255.255.248 255.255.255.252
host numbers 254 126 62 30 14 6 2
10.1.0.0 10.1.0.0 10.1.0.0 10.1.0.0
10.1.0.32
10.1.0.64 10.1.0.64
10.1.0.96
10.1.0.128 10.1.0.128 10.1.0.128
10.1.0.160
10.1.0.192 10.1.0.192
10.1.0.224
10.1.1.0 10.1.1.0 10.1.1.0 10.1.1.0
10.1.1.32
10.1.1.64 10.1.1.64
10.1.1.96
10.1.1.128 10.1.1.128 10.1.1.128
10.1.1.160
10.1.1.192 10.1.1.192
10.1.1.224
10.1.2.0
/30 /29 /28 /27
192.168.0.X 2 6 14 30
0 the network itself the network itself the network itself the network itself
1 host1 host1 host1 host1
2 host2 host2 host2 host2
3 broadcast address host3 host3 host3
4 the network itself host4 host4 host4
5 host1 host5 host5 host5
6 host2 host6 host6 host6
7 broadcast address the network itself host7 host7
8 the network itself the network itself host8 host8
9 host1 host1 host9 host9
10 host2 host2 host10 host10
11 broadcast address host3 host11 host11
12 the network itself host4 host12 host12
13 host1 host5 host13 host13
14 host2 host6 host14 host14
15 broadcast address broadcast address broadcast address host15
16 the network itself the network itself the network itself host16
17 host1 host1 host1 host17
18 host2 host2 host2 host18
19 broadcast address host3 host3 host19
20 the network itself host4 host4 host20
21 host1 host5 host5 host21
22 host2 host6 host6 host22
23 broadcast address broadcast address host7 host23
24 the network itself the network itself host8 host24
25 host1 host1 host9 host25
26 host2 host2 host10 host26
27 broadcast address host3 host11 host27
28 the network itself host4 host12 host28
29 host1 host5 host13 host29
30 host2 host6 host14 host30
31 broadcast address broadcast address broadcast address broadcast address
abbr abbr abbr abbr abbr
240 the network itself the network itself the network itself
241 host1 host1 host1
242 host2 host2 host2
243 broadcast address host3 host3
244 the network itself host4 host4
245 host1 host5 host5
246 host2 host6 host6
247 broadcast address broadcast address host7
248 the network itself the network itself host8
249 host1 host1 host9
250 host2 host2 host10
251 broadcast address host3 host11
252 the network itself host4 host12
253 host1 host5 host13
254 host2 host6 host14
255 broadcast address broadcast address broadcast address

Cheat Sheet

n=network, H=host

CIDR HostsNote
n.n.n.H/29 8 n.n.n.0 - 7, n.n.n.8 - 15, n.n.n.16 - 23, n.n.n.24 - 31, n.n.n.32 - 39, n.n.n.40 - 47, ….
n.n.n.H/28 16 n.n.n.0 - 15, n.n.n.16 - 31, n.n.n.32 - 47, n.n.n.48 - 63, n.n.n.64 - 79, n.n.n.80 - 95, ….
n.n.n.H/27 32 n.n.n.0 - 31, n.n.n.32 - 63, n.n.n.64 - 95, n.n.n.96 - 127, n.n.n.128 - 159, n.n.n.160 - 191, ….
n.n.n.H/26 64 n.n.n.0 - 63, n.n.n.64 - 127, n.n.n.128 - 191, n.n.n.192 - 255
n.n.n.H/25 128 n.n.n.0 - 127, n.n.n.128 - 255
n.n.n.H/24 256 n.n.n.0 - 255, n.n.n.1 - 255, n.n.n.2 - 255
n.n.H.H/23 512 n.n.0.0 - n.n.1.255, n.n.2.0 - n.n.3.255, n.n.4.0 - n.n.5.255,….

Example

/29(255.255.255.248)
Example Hosts the network itself Host Start - End broadcast address
10.0.255.0/29 8 10.0.255.0 10.0.255.1 - 10.0.255.6 10.0.255.7
10.0.255.8/29 8 10.0.255.8 10.0.255.9 - 10.0.255.14 10.0.255.15
10.0.255.16/29 8 10.0.255.16 10.0.255.17 - 10.0.255.22 10.0.255.23
10.0.255.24/29 8 10.0.255.24 10.0.255.25 - 10.0.255.30 10.0.255.31
/26(255.255.255.192)
Example Hosts the network itself Host Start - End broadcast address
192.168.0.0/26 64 192.168.0.0 192.168.0.1 - 192.168.0.62 192.168.0.63
192.168.0.64/26 64 192.168.0.64 192.168.0.65 - 192.168.0.126 192.168.0.127
192.168.0.128/26 64 192.168.0.128 192.168.0.129 - 192.168.0.190 192.168.0.191
192.168.0.192/26 64 192.168.0.192 192.168.0.193 - 192.168.0.254 192.168.0.255
/25(255.255.255.128)
Example Hosts the network itself Host Start - End broadcast address
192.168.0.0/25 128 192.168.0.0 192.168.0.1 - 192.168.1.126 192.168.0.127
192.168.0.128/25 128 192.168.0.128 192.168.0.129 - 192.168.0.254 192.168.0.255
/24(255.255.255.0)
Example Hosts the network itself Host Start - End broadcast address
192.168.0.0/24 256 192.168.0.0 192.168.0.1 - 192.168.0.254 192.168.0.255
/23(255.255.254.0)
Example Hosts the network itself Host Start - End broadcast address
192.168.0.0/23 512 192.168.0.0 192.168.0.1 - 192.168.1.254 192.168.1.255
192.168.2.0/23 512 192.168.2.0 192.168.2.1 - 192.168.3.254 192.168.3.255
192.168.10.0/23 512 192.168.10.0 192.168.10.1 - 192.168.11.254 192.168.1.255
/22(255.255.252.0)
Example Hosts the network itself Host Start - End broadcast address
192.168.0.0/22 1,024 192.168.0.0 192.168.0.1 - 192.168.3.254 192.168.3.255
192.168.4.0/22 1,024 192.168.4.0 192.168.4.1 - 192.168.7.254 192.168.7.255
192.168.200.0/22 1,024 192.168.200.0 192.168.200.1 - 192.168.203.254 192.168.203.255
/21(255.255.248.0)
Example Hosts the network itself Host Start - End broadcast address
192.168.0.0/21 2,048 192.168.0.0 192.168.0.1 - 192.168.7.254 192.168.7.255
192.168.8.0/21 2,048 192.168.0.0 192.168.8.1 - 192.168.15.254 192.168.15.255
192.168.200.0/21 2,048 192.168.200.0 192.168.200.1 - 192.168.207.254 192.168.207.255
/20(255.255.240.0)
Example Hosts the network itself Host Start - End broadcast address
192.168.0.0/20 4,096 192.168.0.0 192.168.0.1 - 192.168.15.254 192.168.15.255


IP Design

Example
Location Segment Hosts Start-End Example
Location1 10.1.0.0/16 131,072 network itself : 10.1.0.0
Host : 10.1.0.1 - 10.1.255.254
broadcast : 10.1.255.255
10.1.0.0/24 (Hosts 256)
10.1.1.0/24 (Hosts 256)
10.1.255.0/24 (Hosts 256)
Location2 10.2.0.0/16 131,072 network itself : 10.2.0.0
Host : 10.2.0.1 - 10.2.255.254
broadcast : 10.2.255.255
10.2.0.0/24 (Hosts 256)
10.2.1.0/24 (Hosts 256)
10.2.255.0/24 (Hosts 256)
Location3 10.3.0.0/16 131,072 network itself : 10.3.0.0
Host : 10.3.0.1 - 10.3.255.254
broadcast : 10.3.255.255
10.3.0.0/24 (Hosts 256)
10.3.1.0/24 (Hosts 256)
10.3.255.0/24 (Hosts 256)
Location Segment Hosts Start-End Example
Location1 192.168.0.0/21 2,048 network itself : 192.168.0.0
Host : 192.168.0.1 - 192.168.7.254
broadcast : 192.168.7.255
192.168.0.0/24 (Hosts 256)
192.168.7.0/24 (Hosts 256)
Location2 192.168.8.0/21 2,048 network itself : 192.168.8.0
Host : 192.168.8.1 - 192.168.15.254
broadcast : 192.168.15.255
192.168.8.0/24 (Hosts 256)
192.168.15.0/24 (Hosts 256)
Location3 192.168.16.0/21 2,048 network itself : 192.168.16.0
Host : 192.168.16.1 - 192.168.23.254
broadcast : 192.168.23.255
192.168.20.0/24 (Hosts 256)
192.168.23.0/24 (Hosts 256)
Location Segment Hosts Start-End Example
Location1 192.168.0.0/24 256 network itself : 192.168.0.0
Host : 192.168.0.1 - 192.168.0.254
broadcast : 192.168.0.255
192.168.0.0/24 (Hosts 256)
Location2 192.168.1.0/24 256 network itself : 192.168.1.0
Host : 192.168.1.1 - 192.168.1.254
broadcast : 192.168.1.255
192.168.1.0/25 (Hosts 128 : 192.168.1.0-128)
192.168.1.128/25 (Hosts 128 : 192.168.1.128-255)
Location3 192.168.2.0/24 256 network itself : 192.168.2.0
Host : 192.168.2.1 - 192.168.2.254
broadcast : 192.168.2.255
192.168.3.0/26 (Hosts 64 : 192.168.2.0-63)
192.168.3.64/26 (Hosts 64 : 192.168.2.64-127)
192.168.3.128/26 (Hosts 64 : 192.168.2.128-191)
192.168.3.192/26 (Hosts 64 : 192.168.2.192-255)



network/ip.html.txt · Last modified: 2017/08/20 by admin