Subnetting - CAU | Dept. of Computer Information Science

cursefarmΔίκτυα και Επικοινωνίες

24 Οκτ 2013 (πριν από 4 χρόνια και 16 μέρες)

132 εμφανίσεις

Subnetting

Dr. Ian N. Toppin

Assistant Professor

Computer Networking

Clayton State University

Morrow, GA 30260

An IP Address


An IP address is a unique identifier, or
address for a computer or host connection
on a network.


IPs are 32 bit binary numbers represented in 4
parts of 8. Each part is separated by a decimal
point (.) and is referred to as an
octet.
This is
known as a dotted decimal notation


Example: 140.179.220.200


In Binary: 10001100.10110011.11011100.11001000

Parts of An IP


Every IP consist of two parts


One part identifying the network


One part identifying the node


The Class of the address and the subnet
mask determines which part belongs to the
network address and which part belongs to
the node address

Address Classes


Class A


Addresses begin with 0xxx, or 1 to 126 decimal


Class A addresses would have the following format:


NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn


There is one octet which defines the network
address, and three which defines the node
address


Used for networks with more than 65,536 hosts
(up to 16777214 hosts)


Addresses beginning with: 01111111, or
127 decimal, are reserved for internal, or
local machine use. For example if you ping
using 127.0.0.1, it should point to yourself.

Class B


Addresses begin with 10xx, or 128 to 191


Format


NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn


There are two octets which define the network address and
two which define the node address


Used for networks that have between 256 and 65,534
hosts

Class C Addressing


Addresses begin with 110x, or 192 to 223


Format


NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn



There are three octets which define the network address
and one which define the node address


Used with networks that have fewer than 254 hosts

Class D Addresses


Special category of IPs, which are used for
multicasting purposes


Begin with 1110, or 224 to 239 decimal



Class E Addresses


Special category of IPs, which are often
reserved for future use. They are usually not
be used for host addresses


Begin with 1111, or 240 to 254

Private subnets


There are three network addresses reserved
for private networks


10.0.0.0


172.16.0.0


192.168.0.0

The Sub
-
net Mask


A 32
-
bit number used to describe which portion of
an address refers to the subnet and which portion
refers to the host.


Every computer on a network must have the same
subnet mask. The following are examples of different
subnet masks:


Class A 255.0.0.0 or 11111111.00000000.00000000.00000000


Class B 255.255.0.0 or
11111111.11111111.00000000.00000000


Class C 255.255.255.0 or
11111111.11111111.11111111.00000000

Broadcasting


Used to send packets to all networks or
subnets.


Two types of broadcasting:


All
-
nets broadcasting
-

packet are addressed:


255.255.255.255


Subnets broadcasting


Host portion of the
address is set to 255. For example If the IP
address is: 192.100.23.2, a class C with a mask
of 255.255.255.0, the broadcast address would
be 192.23.123.255

Subnetting


Breaking a large network into smaller
networks (subnets)

FIGURE 6
-
3

IP network with addresses and subnet masks. Notice the multihorned computer (computer with two network
cards connected to two subnets)

Patrick Regan

Networking with Windows® 2000 and
2003, 2e

Copyright ©2004 by Pearson Education, Inc.

Upper Saddle River, New Jersey 07458

All rights reserved.

Example

204.15.5.0

11001100.00001111.00000101.00000000 IP Address

255.255.255.0

11111111.11111111.11111111.00000000 Subnet mask




================================

255.255.255.22411111111.11111111.11111111.11100000 Subnetted

0r

This means there are 3 (2
3



2) new hosts available. Technically this
would create eight IPs, but two are reserved for broadcast and
network purposes, which leaves 6.


The subnet broadcast address would be:

204.15.5.255.

11001100.00001111.00000101.11111111

Classless Interdomain Routing
(CIDR)


Routers that support CIDR do not make
assumptions about the first 3 bits of the
address, but rely on the prefix length
information.


Prefix length is described as
x (/x)

where
x

represents the network bits.


For example:
255.255.255.224 or
11111111.11111111.11111111.11100000


would be


255.255.255.224/27 because there are 27
network bits assigned (27 ones)

Creating Network Addresses


Assume you were asked to create four new
networks (subnets) from the following


The leased network address is class C:


204.15.5.0



Network Address


255.255.255.0


Subnet mask


11111111.11111111.11111111.00000000


What addresses would the new subnet have?



In order to get four new subnets you must borrow the appropriate
number of bits that will give enough subnet IPs and allow an IP for
network ID and one for broadcast.


Performing the AND (combination to get network addresses)


2
3



2=6


3 bits have been borrowed to create the subnets. Therefore, there are 8
possible combinations as follows:


000


0 (This is reserved and not used)


001


32


010


64


011


96


100


128


101


160


110


192


111


224 (This is reserved and not used)


The old network address was:


204.15.5.0


The Four new network addresses would be


204.15.5.0 (subnet ID)


204.15.5.32


204.15.5.64


204.15.5.96


204.15.5.128


204.15.5.160 (kept for future use since only 4 needed)


204.15.5.192 (kept for future use since only 4 needed)


204.15.5.224 (broadcast address)