Académique Documents
Professionnel Documents
Culture Documents
RSS Feed
About
3com
3ware
alsa
alsactl
alsamixer
amd
android
apache
areca
arm
ati
auditd
awk
badblocks
bash
bind
bios
bonnie
cable
carp
cat5
cdrom
cellphone
centos
chart
cifs
cisco
cloudera
comcast
commands
comodo
compiz-fusion
corsair
cpufreq
cpufrequtils
cpuspeed
cron
crontab
crossover
cu
cups
cvs
database
dbus
dd
dd_rescue
ddclient
debian
decimal
dhclient
dhcp
diagnostic
diskexplorer
Ths is an Internet Protocol (IPv4) Subnet Chart. You can use this to quickly look up how your
might need to subnet your network. At the bottom there is a quick how-to on calculating
subnets.
For more information on subnetting, see RFC 1817 and RFC 1812.
Class address ranges:
Class A = 1.0.0.0 to 126.0.0.0
Class B = 128.0.0.0 to 191.255.0.0
Class C = 192.0.1.0 to 223.255.255.0
Reserved address ranges for private (non-routed) use (see RFC 1918):
10.0.0.0 -> 10.255.255.255
172.16.0.0 -> 172.31.255.255
192.168.0.0 -> 192.168.255.255
Other reserved addresses:
127.0.0.0 is reserved for loopback and IPC on the local host
224.0.0.0 -> 239.255.255.255 is reserved for multicast addresses
Chart notes:
Number of Subnets - "( )" Refers to the number of effective subnets, since the use of
subnet numbers of all 0s or all 1s is highly frowned upon and RFC non-compliant.
Number of Hosts - Refers to the number of effective hosts, excluding the network and
broadcast address.
Class A
Network Bits
Subnet Mask
Number of Subnets
Number of Hosts
/8
255.0.0.0
16777214
/9
255.128.0.0
2 (0)
8388606
/10
255.192.0.0
4 (2)
4194302
/11
255.224.0.0
8 (6)
2097150
/12
255.240.0.0
16 (14)
1048574
/13
255.248.0.0
32 (30)
524286
/14
255.252.0.0
64 (62)
262142
/15
255.254.0.0
128 (126)
131070
/16
255.255.0.0
256 (254)
65534
disks
dns
dos
dovecot
drac
dsniff
dvdauthor
e-mail
echo
editor
emerald
ethernet
expect
ext3
fat32
fedora
fetchmail
fiber
filesystems
firefox
firewall
flac
flexlm
floppy
flowtools
fonts
format
freebsd
ftp
gdm
gnome
greasemonkey
greylisting
growisofs
grub
hacking
hadoop
harddrive
hba
hex
hfsc
html
html5
http
idl
ie
ilo
intel
ios
iperf
ipmi
iptables
ipv6
irix
javascript
kde
kernel
kickstart
kmail
kprinter
krecord
kubuntu
kvm
lame
ldap
linux
logfile
lp
lpq
lpr
/17
255.255.128.0
512 (510)
32766
/18
255.255.192.0
1024 (1022)
16382
/19
255.255.224.0
2048 (2046)
8190
/20
255.255.240.0
4096 (4094)
4094
/21
255.255.248.0
8192 (8190)
2046
/22
255.255.252.0
16384 (16382)
1022
/23
255.255.254.0
32768 (32766)
510
/24
255.255.255.0
65536 (65534)
254
/25
255.255.255.128
131072 (131070)
126
/26
255.255.255.192
262144 (262142)
62
/27
255.255.255.224
524288 (524286)
30
/28
255.255.255.240
1048576 (1048574)
14
/29
255.255.255.248
2097152 (2097150)
/30
255.255.255.252
4194304 (4194302)
Network Bits
Subnet Mask
Number of Subnets
Number of Hosts
/16
255.255.0.0
65534
/17
255.255.128.0
2 (0)
32766
/18
255.255.192.0
4 (2)
16382
/19
255.255.224.0
8 (6)
8190
/20
255.255.240.0
16 (14)
4094
/21
255.255.248.0
32 (30)
2046
/22
255.255.252.0
64 (62)
1022
/23
255.255.254.0
128 (126)
510
/24
255.255.255.0
256 (254)
254
/25
255.255.255.128
512 (510)
126
/26
255.255.255.192
1024 (1022)
62
/27
255.255.255.224
2048 (2046)
30
/28
255.255.255.240
4096 (4094)
14
/29
255.255.255.248
8192 (8190)
/30
255.255.255.252
16384 (16382)
Subnet Mask
Number of Subnets
Number of Hosts
Class B
Class C
Network Bits
maradns
matlab
memory
mencoder
mhdd
mkinitrd
mkisofs
moinmoin
motherboard
mouse
movemail
mplayer
multitail
mutt
myodbc
mysql
mythtv
nagios
nameserver
netflow
nginx
nic
ntfs
ntp
nvidia
odbc
openbsd
openntpd
openoffice
openssh
openssl
opteron
parted
partimage
patch
perl
pf
pfflowd
pfsync
photorec
php
pop3
pop3s
ports
postfix
power
procmail
proftpd
proxy
pulseaudio
putty
pxe
python
qemu
r-studio
raid
recovery
redhat
router
rpc
rsync
samba
schedule
scsi
seagate
seatools
sed
sendmail
sgi
shell
/24
255.255.255.0
254
/25
255.255.255.128
2 (0)
126
/26
255.255.255.192
4 (2)
62
/27
255.255.255.224
8 (6)
30
/28
255.255.255.240
16 (14)
14
/29
255.255.255.248
32 (30)
/30
255.255.255.252
64 (62)
Supernet Mask
Number of Hosts
/14
255.252.0.0
1024
262144
/15
255.254.0.0
512
131072
/16
255.255.0.0
256
65536
/17
255.255.128.0
128
32768
/18
255.255.192.0
64
16384
/19
255.255.224.0
32
8192
/20
255.255.240.0
16
4096
/21
255.255.248.0
2048
/22
255.255.252.0
1024
/23
255.255.254.0
512
siw
smtp
snort
solaris
soundcard
sox
spam
spamd
sql
sqlite
squid
ssh
ssh.com
ssl
su
subnet
subversion
sudo
sun
supermicro
switches
symbols
syslinux
syslog
systemrescuecd
t1
tcpip
tcpwrappers
telnet
terminal
testdisk
tftp
thttpd
thunderbird
timezone
ting
tools
tr
trac
tuning
tunnel
vi
wget
wiki
windows
windowsxp
wireless
wpa_supplicant
x
xauth
xfree86
xfs
xinearama
xmms
youtube
zdump
zic
zlib
have
have
have
have
have
have
have
have
a
a
a
a
a
a
a
a
1
1
1
0
0
1
1
0
in
in
in
in
in
in
in
in
the
the
the
the
the
the
the
the
1's place
2's place
4's place
8's place
16's place
32's place
64's place
128's place
Thus: 0+64+32+0+0+4+2+1=103
Okay, Let's test your skills. Here is a list of binary numbers, try converting them to decimal
and check your answers at the end of this post.
10000000
11000000
11100000
01000000
10000011
10010001
11111111
If you were able to convert these numbers to decimal then congratulations! You're ready to
move on to the next section.
[Understanding a subnet mask]
Now that you understand what binary is, let's have a look at our two subnet masks from the
beginning of my post:
192.168.1.0 / 255.255.255.0
192.168.1.0/24
The concept of a subnet mask is simple. You have a network and you have hosts on the
network (anything with an IP address is a host). The subnet mask determines what
portion of the TCP/IP address represents your network and what portion can be
used for your hosts. Because I am a simple person, I think of it like this; The network
number represents the street I live on, and the host portion is used for the numbers on all
the houses on my street.
A subnet mask of 255.255.255.0 means that the first three octets of the address will be
used for the network, and thus our network number is 192.168.1. This means we can have
254 computers on this network, because the fourth octet is not being used by the network
portion of the address. We know this because of the 0 in the subnet mask (255.255.255.0).
We call each of the number sections an octet because we think of them in binary, and there
are eight possible bits in each section. Eight bits is an octet. 11111111 in binary is 255 in
decimal (did you do the conversions?). So our decimal subnet mask 255.255.255.0
displayed in binary is going to be:
11111111.11111111.11111111.00000000
If you count all the ones, you will find that there are 24 of them. Now look at the subnet
mask examples again.
192.168.1.0/255.255.255.0
192.168.1.0/24
Do you see why both subnet masks are the same? The number 24 is the number of bits
used in the network portion of the address, and is short-hand for writing the address/subnet
mask combination. It becomes important to understand this when you start dividing your
network into multiple sub networks.
[Understanding Subnetting]
Before reading this section, you should have a good understanding of what a subnet mask is
and how binary bits represent the subnet mask.
Simply put, subnetting is dividing your network into multiple sub networks. To go back to
my silly example about houses and streets, subnetting gives you multiple streets in your
neighborhood.
There are two methods for dividing your network into multiple sub networks; One is to
simply change your network numbers keeping the same subnet mask. The other is to
subnet your network into smaller sub networks.
Keeping the same mask:
Your network could be divided into two or more networks by changing the network portion
of the address such as 192.168.1 and 192.168.2 and keeping the same subnet mask.
Example:
192.168.1.0/255.255.255.0
192.168.2.0/255.255.255.0
Doing this would give you two separate networks with 254 hosts per network. This is a
very common method of dealing with multiple networks. However, back in the good old days
you had to pay for every IP address you used, and if you had 25 computers on your
network you probably would not want to pay for 254 addresses! The answer to the problem
is...subnetting.
Subnetting a network:
Subnetting is when you use bits from the host portion of your address as part of
your network number. This let's you subdivide your network at the cost of host
addresses, which is great if you're paying for every host IP address. It will save you money
because you pay for fewer TCP/IP addresses. Confused? Here is where understanding binary
is important.
Lets look at a new subnet mask:
255.255.255.224
As you can see in the fourth octet, some of the host portion of this subnet mask is now
being used for part of the network address. Which means we are now using some of the
binary bits in the fourth octet for our network numbers, and that gives us fewer hosts
than our old mask (which gave us 254), but gives us more networks (which is why we call it
subnetting).
How can we tell how many networks and hosts per network this new subnet mask will give
us? Well... we shall have to use some of our newly acquired binary skills.
The first task is to find out how many bits in the fourth octet are being used? The
decimal number is 224, what is the decimal number 224 as represented in binary?
The decimal number 224 in binary is:
11100000
We
We
We
We
We
We
We
We
have
have
have
have
have
have
have
have
a
a
a
a
a
a
a
a
0
0
0
0
0
1
1
1
in
in
in
in
in
in
in
in
the
the
the
the
the
the
the
the
1's place
2's place
4's place
8's place
16's place
32's place
64's place
128's place
Thus: 128+64+32+0+0+0+0+0=224
So our complete subnet mask in binary is:
1111111.11111111.11111111.11100000
We now know that three bits from the fourth octet are used. How can we tell how many sub
networks we're going to have? This requires some math - sorry. The formula is: 2n-2,
where n is the number of bits being used from the host portion of our subnet mask.
Important Note:We subtract 2 networks (the first and last subnets) from the total unless
we have equipment that supports IP Subnet-Zero in which case we use the formula 2n please see the addendum at the end of this lesson for more details.
The formula for three bits is:
23-2=6
In simpler terms:
(2x2x2)-2=6
So our network is sub divided into 6 networks. Next, we want to know what the network
numbers are, and how many hosts we can have on each of the 6 networks?
What is the first subnet? Let's have a look at the bits in our fourth octet again. The bit that
gives us the answer is the (1) closest to the first zero, and in this case it is the 3rd bit from
the left.
11100000
The 3rd bit will start our first network, and the 3rd bit is in the 32's place (remember
binary). Start adding the value 32 to itself six times to get the six network numbers.
Note: A quicker way to find our starting network number is to subtract our mask from 256.
256-224=32
Here are our network numbers:
32
64
96
128
160
192
A better way to display this is:
192.168.1.32
192.168.1.64
192.168.1.96
192.168.1.128
192.168.1.160
192.168.1.192
The host addresses will fall between the network numbers, so we will have 30 hosts per
network. You're probably wondering why it's not 31? The answer is that the last address of
192.168.1.160
192.168.1.176
192.168.1.192
192.168.1.208
192.168.1.224
The host addresses fall between the network numbers. So we will have 14 host addresses
on each of our 14 sub networks (remember: the last or 15th address is the broadcast
address for that subnet).
If you had a small company with 10 hosts and needed to have a static IP address for all of
your hosts, you would be assigned a network/subnet mask and a valid IP address range.
Here is an example of what that might look like:
Network: 205.112.10.16/.255.255.255.240
Address Range: 205.112.10.17 through 205.112.10.30
Subnet Broadcast Address: 205.112.10.31
Important Addendum: There may be concerns about why the first and last subnets were
not used in any of the examples above. What happened to them? Did they get scared and
run away? The answer is simple - nothing happend to them it's just that some older
routing equipment and software does not support the use of the first and last subnets. This
is documented in the older TCP/IP doc rfc 950. The newer standard outlined in rfc 1812
allows for the use of the first and last subnets- making it the current standard in IPv4
subnetting.
[Answers to Binary Conversions]
10000000
11000000
11100000
01000000
10000011
10010001
11111111
=
=
=
=
=
=
=
128
192
224
64
131
145
255