Wednesday, January 20, 2016

Class A B C Address Guide


Class A Address Guide
CIDR
Bits Borrow
Subnet Mask
# of Subnets
 # of Hosts
Usable # of Hosts
/8
0
255.0.0.0
1
16,777,216
16,777,214
/9
1
255.128.0.0
2
8,388,608
8,388,606
/10
2
255.192.0.0
4
4,194,304
4,194,302
/11
3
255.224.0.0
8
2,097,152
2,097,150
/12
4
255.240.0.0
16
1,048,576
1,048,574
/13
5
255.248.0.0
32
524,288
524,2846
/14
6
255.252.0.0
64
262,144
262,142
/15
7
255.254.0.0
128
131,072
131,070
/16
8
255.255.0.0
256
65,536
65,534
/17
9
255.255.128.0
512
32,768
32,766
/18
10
255.255.192.0
1,024
16,384
16,382
/19
11
255.255.224.0
2,048
8,192
8,190
/20
12
255.255.240.0
4,096
4,096
4,094
/21
13
255.255.248.0
8,192
2,048
2,046
/22
14
255.255.252.0
16,384
1,024
1,022
/23
15
255.255.254.0
32,768
512
510
/24
16
255.255.255.0
65,536
256
254
/25
17
255.255.255.128
131,072
128
126
/26
18
255.255.255.192
262,144
64
62
/27
19
255.255.255.224
524,288
32
30
/28
20
255.255.255.240
1,048,576
16
14
/29
21
255.255.255.248
2,097,152
8
6
/30
22                      22
255.255.255.252
4,194,304
4
2

Class B Address Guide
CIDR
Bits Borrow
Subnet Mask
# of Subnets
 # of Hosts
Usable # of Hosts
/16
0
255.255.0.0
1
65,536
65,534
/17
1
255.255.128.0
2
32,768
32,766
/18
2
255.255.192.0
4
16,384
16,382
/19
3
255.255.224.0
8
8,192
8,190
/20
4
255.255.240.0
16
4,096
4,094
/21
5
255.255.248.0
32
2,048
2,046
/22
6
255.255.252.0
64
1,024
1,022
/23
7
255.255.254.0
128
512
510
/24
8
255.255.255.0
256
256
254
/25
9
255.255.255.128
512
128
126
/26
10
255.255.255.192
1,024
64
62
/27
11
255.255.255.224
2,048
32
30
/28
12
255.255.255.240
4,096
16
14
/29
13
255.255.255.248
8,192
8
6
/30
14
255.255.255.252
16,384
4
2


Class C Address Guide
CIDR
Bits Borrow
Subnet Mask
# of Subnets
# of Hosts
Usable # of Hosts
/24
0
255.255.255.0
1
256
254
/25
1
255.255.255.128
2
128
126
/26
2
255.255.255.192
4
64
62
/27
3
255.255.255.224
8
32
30
/28
4
255.255.255.240
16
16
14
/29
5
255.255.255.248
32
8
6
/30
6
255.255.255.252
64
4
2


      Figure  IPv 4  Special Use IP Addresses


Subnetting 
2^7 |2^6|2^5|2^4|2^3|2^2|2^1|2
128 |64 |32|16|8|4|2|1|
 
 
Network= 2^N where N=Network bits
Hosts = 2^H - 2 Where H is the host bits
 
Classfull Networks
A 0-191.0.0.0 255.0.0.0
B 192-223.0.0.0 255.255.0.0
C 224-
D
E

Subnetting is taking a large network and dividing it into smaller network


Network: all host bits set to Zero
Broadcast: All host bits set to one
150.50.0.0
150.50.255.255

If you have a class c network 192.168.3.0/24 and you need 4 networks 
class bits = 8 bits 2^8=256 so each group will be 256/4 = 64
Network = 2^N =4
N=2 so you need 2 bits
255.255.255.11000000
Host bits
2^6 -2 = 64-2 =62 Hosts
Networks
0-63
64-127
128-191
192-255



Subnetting

2^7 |2^6|2^5|2^4|2^3|2^2|2^1|2
128 |64  |32|16|8|4|2|1|



Network= 2^N  where N=Network bits
Hosts = 2^H  - 2 Where H is the host bits


Classfull Networks

A       0-191.0.0.0  255.0.0.0
B   192-223.0.0.0  255.255.0.0
C  224-
D
E

subnetting is taking a large network and dividing it into smaller network
Network: all host bits set to Zero
Broadcast: All host bits set to one
150.50.0.0
150.50.255.255

If you have a class c network  192.168.3.0/24  and you need 4 networks
class bits = 8 bits 2^8=256 so each group will be 256/4 = 64

Network = 2^N =4
N=2 so you need 2 bits
255.255.255.11000000

Host bits
2^6 -2 = 64-2 =62 Hosts

Networks
0-63
64-127
128-191
192-255




/25 -- 2 Subnets -- 126 Hosts/Subnet
Network # IP Range Broadcast
0 .1-.126 0.127
0.128 .129-.254 0.255


/26 -- 4 Subnets -- 62 Hosts/Subnet
Network # IP Range Broadcast
0 .1-.62 0.63
0.64 .65-.126 0.127
0.128 .129-.190 0.191
0.192 .193-.254 0.255



/27 -- 8 Subnets -- 30 Hosts/Subnet
Network # IP Range Broadcast
0 .1-.30 0.31
0.32 .33-.62 0.63
0.64 .65-.94 0.95
0.96 .97-.126 0.127
0.128 .129-.158 0.159
0.16 .161-.190 0.191
0.192 .193-.222 0.223
0.224 .225-.254 0.255


/28 -- 16 Subnets -- 14 Hosts/Subnet
Network # IP Range Broadcast
0 .1-.14 0.15
0.16 .17-.30 0.31
0.32 .33-.46 0.47
0.48 .49-.62 0.63
0.64 .65-.78 0.79
0.8 .81-.94 0.95
0.96 .97-.110 0.111
0.112 .113-.126 0.127
0.128 .129-.142 0.143
0.144 .145-.158 0.159
0.16 .161-.174 0.175
0.176 .177-.190 0.191
0.192 .193-.206 0.207
0.208 .209-.222 0.223
0.224 .225-.238 0.239
0.24 .241-.254 0.255


/29 -- 32 Subnets -- 6 Hosts/Subnet
Network # IP Range Broadcast
0 .1-.6 0.7
0.8 .9-.14 0.15
0.16 .17-.22 0.23
0.24 .25-.30 0.31
0.32 .33-.38 0.39
0.4 .41-.46 0.47
0.48 .49-.54 0.55
0.56 .57-.62 0.63
0.64 .65-.70 0.71
0.72 .73-.78 0.79
0.8 .81-.86 0.87
0.88 .89-.94 0.95
0.96 .97-.102 0.103
0.104 .105-.110 0.111
0.112 .113-.118 0.119
0.12 .121-.126 0.127
0.128 .129-.134 0.135
0.136 .137-.142 0.143
0.144 .145-.150 0.151
0.152 .153-.158 0.159
0.16 .161-.166 0.167
0.168 .169-.174 0.175
0.176 .177-.182 0.183
0.184 .185-.190 0.191
0.192 .193-.198 0.199
0.2 .201-.206 0.207
0.208 .209-.214 0.215
0.216 .217-.222 0.223
0.224 .225-.230 0.231
0.232 .233-.238 0.239
0.24 .241-.246 0.247
0.248 .249-.254 0.255


/30 -- 64 Subnets -- 2 Hosts/Subnet
Network # IP Range Broadcast
0 .1-.2 0.3
0.4 .5-.6 0.7
0.8 .9-.10 0.11
0.12 .13-.14 0.15
0.16 .17-.18 0.19
0.2 .21-.22 0.23
0.24 .25-.26 0.27
0.28 .29-.30 0.31
0.32 .33-.34 0.35
0.36 .37-.38 0.39
0.4 .41-.42 0.43
0.44 .45-.46 0.47
0.48 .49-.50 0.51
0.52 .53-.54 0.55
0.56 .57-.58 0.59
0.6 .61-.62 0.63
0.64 .65-.66 0.67
0.68 .69-.70 0.71
0.72 .73-.74 0.75
0.76 .77-.78 0.79
0.8 .81-.82 0.83
0.84 .85-.86 0.87
0.88 .89-.90 0.91
0.92 .93-.94 0.95
0.96 .97-.98 0.99
0.1 .101-.102 0.103
0.104 .105-.106 0.107
0.108 .109-.110 0.111
0.112 .113-.114 0.115
0.116 .117-.118 0.119
0.12 .121-.122 0.123
0.124 .125-.126 0.127
0.128 .129-.130 0.131
0.132 .133-.134 0.135
0.136 .137-.138 0.139
0.14 .141-.142 0.143
0.144 .145-.146 0.147
0.148 .149-.150 0.151
0.152 .153-.154 0.155
0.156 .157-.158 0.159
0.16 .161-.162 0.163
0.164 .165-.166 0.167
0.168 .169-.170 0.171
0.172 .173-.174 0.175
0.176 .177-.178 0.179
0.18 .181-.182 0.183
0.184 .185-.186 0.187
0.188 .189-.190 0.191
0.192 .193-.194 0.195
0.196 .197-.198 0.199
0.2 .201-.202 0.203
0.204 .205-.206 0.207
0.208 .209-.210 0.211
0.212 .213-.214 0.215
0.216 .217-.218 0.219
0.22 .221-.222 0.223
0.224 .225-.226 0.227
0.228 .229-.230 0.231
0.232 .233-.234 0.235
0.236 .237-.238 0.239
0.24 .241-.242 0.243
0.244 .245-.246 0.247
0.248 .249-.250 0.251
0.252 .253-.254 0.255


###############################################################################
Netmask Netmask (binary) CIDR Notes
_____________________________________________________________________________
255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr)
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 useable
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 useable
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 useable
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 useable
255.255.255.0 11111111.11111111.11111111.00000000 /24 "Class C" 254 useable
255.255.254.0 11111111.11111111.11111110.00000000 /23 2 Class C's
255.255.252.0 11111111.11111111.11111100.00000000 /22 4 Class C's
255.255.248.0 11111111.11111111.11111000.00000000 /21 8 Class C's
255.255.240.0 11111111.11111111.11110000.00000000 /20 16 Class C's
255.255.224.0 11111111.11111111.11100000.00000000 /19 32 Class C's
255.255.192.0 11111111.11111111.11000000.00000000 /18 64 Class C's
255.255.128.0 11111111.11111111.10000000.00000000 /17 128 Class C's
255.255.0.0 11111111.11111111.00000000.00000000 /16 "Class B"
255.254.0.0 11111111.11111110.00000000.00000000 /15 2 Class B's
255.252.0.0 11111111.11111100.00000000.00000000 /14 4 Class B's
255.248.0.0 11111111.11111000.00000000.00000000 /13 8 Class B's
255.240.0.0 11111111.11110000.00000000.00000000 /12 16 Class B's
255.224.0.0 11111111.11100000.00000000.00000000 /11 32 Class B's
255.192.0.0 11111111.11000000.00000000.00000000 /10 64 Class B's
255.128.0.0 11111111.10000000.00000000.00000000 /9 128 Class B's
255.0.0.0 11111111.00000000.00000000.00000000 /8 "Class A"
254.0.0.0 11111110.00000000.00000000.00000000 /7
252.0.0.0 11111100.00000000.00000000.00000000 /6
248.0.0.0 11111000.00000000.00000000.00000000 /5
240.0.0.0 11110000.00000000.00000000.00000000 /4
224.0.0.0 11100000.00000000.00000000.00000000 /3
192.0.0.0 11000000.00000000.00000000.00000000 /2
128.0.0.0 10000000.00000000.00000000.00000000 /1
0.0.0.0 00000000.00000000.00000000.00000000 /0 IP space
For wildcard netmasks (aka reverse netmasks), subtract each octet of a standard netmask from 255.
Example 1: 255.255.255.0 becomes 0.0.0.255
Example 2: 255.255.252.0 becomes 0.0.3.255

###############################################################################
Net Host Total
Net Addr Addr Addr Number
Class Range NetMask Bits Bits of hosts
----------------------------------------------------------
A     0-127 255.0.0.0 8 24 16777216     (i.e. 114.0.0.0)
B     128-191 255.255.0.0 16 16 65536 (i.e. 150.0.0.0)
C     192-254 255.255.255.0 24 8 256   (i.e. 199.0.0.0)
D     224-239 (multicast)
E     240-255 (reserved)
F     208-215 255.255.255.240 28 4 16
G     216/8 ARIN - North America
G     217/8 RIPE NCC - Europe
G     218-219/8 APNIC
H     220-221 255.255.255.248 29 3 8 (reserved)
K     222-223 255.255.255.254 31 1 2 (reserved)

(ref: RFC1375 & http://www.iana.org/assignments/ipv4-address-space )
( http://www.iana.org/numbers.htm )

The current list of special use prefixes:
0.0.0.0/8
127.0.0.0/8
192.0.2.0/24
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
169.254.0.0/16

all D/E space
(ref: RFC1918 http://www.rfc-editor.org/rfc/rfc1918.txt )
( or ftp://ftp.isi.edu/in-notes/rfc1918.txt )
(rfc search: http://www.rfc-editor.org/rfcsearch.html )
( http://www.ietf.org/ietf/1id-abstracts.txt )
( http://www.ietf.org/shadow.html )
Martians: (updates at: www.iana.org/assignments/ipv4-address-space )
no ip source-route
access-list 100 deny ip host 0.0.0.0 any
deny ip 0.0.0.0 0.255.255.255 any log ! antispoof
deny ip 0.0.0.0 0.255.255.255 0.0.0.0 255.255.255.255 ! antispoof
deny ip any 255.255.255.128 0.0.0.127 ! antispoof
deny ip host 0.0.0.0 any log ! antispoof
deny ip host [router intf] [router intf] ! antispoof
deny ip xxx.xxx.xxx.0 0.0.0.255 any log ! lan area
deny ip 0/8 0.255.255.255 any log ! IANA - Reserved
deny ip 1/8 0.255.255.255 any log ! IANA - Reserved
deny ip 2/8 0.255.255.255 any log ! IANA - Reserved
deny ip 5/8 0.255.255.255 any log ! IANA - Reserved
deny ip 7/8 0.255.255.255 any log ! IANA - Reserved
deny ip 10.0.0.0 0.255.255.255 any log ! IANA - Private Use
deny ip 23/8 0.255.255.255 any log ! IANA - Reserved
deny ip 27/8 0.255.255.255 any log ! IANA - Reserved
deny ip 31/8 0.255.255.255 any log ! IANA - Reserved
deny ip 36-37/8 0.255.255.255 any log ! IANA - Reserved
deny ip 39/8 0.255.255.255 any log ! IANA - Reserved
deny ip 41-42/8 0.255.255.255 any log ! IANA - Reserved
deny ip 50/8 0.255.255.255 any log ! IANA - Reserved
deny ip 58-60/8 0.255.255.255 any log ! IANA - Reserved
deny ip 69-79/8 0.255.255.255 any log ! IANA - Reserved
deny ip 82-95/8 0.255.255.255 any log ! IANA - Reserved
deny ip 96-126/8 0.255.255.255 any log ! IANA - Reserved
deny ip 127/8 0.255.255.255 any log ! IANA - Reserved
deny ip 169.254.0.0 0.0.255.255 any log ! link-local network
deny ip 172.16.0.0 0.15.255.255 any log ! reserved
deny ip 192.168.0.0 0.0.255.255 any log ! reserved
deny ip 192.0.2.0 0.0.0.255 any log ! test network
deny ip 197/8 0.255.255.255 any log ! IANA - Reserved
deny ip 220/8 0.255.255.255 any log ! IANA - Reserved
deny ip 222-223/8 0.255.255.255 any log ! IANA - Reserved
deny ip 224.0.0.0 31.255.255.255 any log ! multicast
deny ip 224.0.0.0 15.255.255.255 any log ! unless MBGP-learned routes
deny ip 224-239/8 0.255.255.255 any log ! IANA - Multicast
deny ip 240-255/8 0.255.255.255 any log ! IANA - Reserved
filtered source addresses

0/8 ! broadcast
10/8 ! RFC 1918 private
127/8 ! loopback
169.254.0/16 ! link local
172.16.0.0/12 ! RFC 1918 private
192.0.2.0/24 ! TEST-NET
192.168.0/16 ! RFC 1918 private
224.0.0.0/4 ! class D multicast
240.0.0.0/5 ! class E reserved
248.0.0.0/5 ! reserved
255.255.255.255/32 ! broadcast

ARIN administrated blocks: (http://www.arin.net/regserv/IPStats.html)
24.0.0.0/8 (portions of)
63.0.0.0/8
64.0.0.0/8
65.0.0.0/8
66.0.0.0/8
196.0.0.0/8
198.0.0.0/8
199.0.0.0/8
200.0.0.0/8
204.0.0.0/8
205.0.0.0/8
206.0.0.0/8
207.0.0.0/8
208.0.0.0/8
209.0.0.0/8
216.0.0.0/8
########################################################################
well known ports: (rfc1700.txt)
www.iana.org/assignments/port-numbers
protocol numbers:
www.iana.org/assignments/protocol-numbers
www.iana.org/numbers.htm
Protocol Protocol Number
-------- ---------------
ICMP 1
IGRP 9
EIGRP 88
OSPF 89
IPv6 41
GRE 47
IPX in IP 111
L2TP 115