0 IP addressing
0 IP addressing
BY:Gebretinsae G.
P_002
Network Div | 02 April 2012 | P001
IP Concept
P_003
Network Div | 02 April 2012 | P001
IP Addressing
P_004
Network Div | 02 April 2012 | P001
IP Terminology
Bit One digit; either a 1 or a 0.
Byte 8 bits.
• IPv4- has 4 byte & IPv6- has 16 byte.
Octet is 8 bits.
Network address The designation used in routing to
send packets to a remote network, for example, 10.0.0.0,
172.16.0.0, and 192.168.10.0.
Broadcast address Used by applications and hosts to
send information to all nodes on a network.
• Examples include 255.255.255.255, which is all
networks, all nodes; 172.16.255.255, which is all subnets
and hosts on network 17.16.0.0; and 10.255.255.255,
which broadcasts to all subnets and hosts on network
10.0.0.0. Network Div | 02 April 2012 | P001
P_005
Understanding the Powers of 2
Powers of 2 are important to understand and memorize for use with
IP subnetting.
• To review powers of 2, remember that when you see a number
with another number to its upper right, this means you should
multiply the number by itself as many times as the upper number
specifies.
• For example, 2 power 3 is 2x2x2, which equals 8.
• Here is the list of powers of 2 that you should memorize:
P_006
Network Div | 02 April 2012 | P001
Binary-to-Decimal Conversion Review
Prior to learning about IP addressing, you must have a
fundamental understanding of binary-to-decimal conversions.
• Here is how it works:
• Binary numbers use 8 bits to define a decimal number.
• These bits are weighted from right to left in an increment that doubles in
value.
• Here is an example of 8 bits and the value assigned to each bit:11111111
128 64 32 16 8 4 2 1 =255
• Here is an example of binary-to-decimal conversion:00100110
128 64 32 16 8 4 2 1 Decimal value
0 0 1 0 0 1 1 0 Byte in binary
• Add the value of the bits that are turned on:
32
4
2
=38 P_007
Network Div | 02 April 2012 | P001
Binary-to-Decimal Conversion Review…
Any time you find a bit turned on (a one), you add the
values of each bit position.
• Let’s practice on a few more:
01010101=85
64
16
4
1
=85
• 11001100 = 204
128
64
8
4
=204
P_008
Network Div | 02 April 2012 | P001
Binary-to-Decimal Conversion Review…
You will need to memorize the binary-to-decimal conversions in
the following list.
You will use this information when you practice subnetting And
to summarize multiple IP address into single IP address.
00000000=0
10000000=128
11000000=192
11100000=224
11110000=240
11111000=248
11111100=252
11111110=254
11111111=255
P_009
Network Div | 02 April 2012 | P001
IP address breakdown
P_0010
Network Div | 02 April 2012 | P001
Network and Node Addressing
The network address uniquely identifies each network.
• Every machine on the same network shares that network
address as part of its IP address.
• In the IP address 172.16.30.56, for example, 172.16 is the
network address.
The node address is assigned to, and uniquely identifies, each
machine on a network.
• This part of the address must be unique because it identifies a
particular machine—an individual—as opposed to a network,
which is a group.
• This number can also be referred to as a host address.
• In the sample IP address 172.16.30.56, .30.56 is the node
address.
P_0011
Network Div | 02 April 2012 | P001
The Hierarchical IP Addressing Scheme
An IP address consists of 32 bits of information.
• These bits are divided into four sections, referred to as octets
or bytes, each containing 1 byte (8 bits).
• You can depict an IP address using one of two methods:
Dotted-decimal, as in 172.16.30.56
Binary, as in 10101100.00010000.00011110.00111000
• All these examples represent the same IP address.
• The 32-bit IP address is a structured or hierarchical address,
as opposed to a flat or nonhierarchical, address.
• The advantage of this scheme is that it can handle a large
number of addresses, namely 4.3 billion (a 32-bit address
space with two possible values for each position—either 0 or
1—gives you 2 power 32, or approximately 4.3 billion).
P_0012
Network Div | 02 April 2012 | P001
The Hierarchical IP Addressing Classes
The designers of the Internet decided to create classes of
networks based on network size.
• For the small number of networks possessing a very large
number of nodes, they created the rank Class A network.
• At the other extreme is the Class C network, which is
reserved for the numerous networks with a small number
of nodes.
• The class distinction for networks between very large and
very small is predictably called the Class B network.
• Subdividing an IP address into a network and node address
is determined by the class designation of one’s network.
• The following table summarizes the three classes of
networks, which will be described in much more detail
throughout this chapter. P_0013
Network Div | 02 April 2012 | P001
Summary of the three classes of networks
P_0014
Network Div | 02 April 2012 | P001
Network Address Range: Class A
The designers of the IP address scheme said that the first bit
of the first byte in a Class A network address must always
be off, or 0.
• This means a Class A address must be between 0 & 127.
• Here is how those numbers are defined:0xxxxxxx:
• If we turn the other 7 bits all off and then turn them all
on, we will find your Class A range of network
addresses.
00000000=0
01111111=127
P_0017
Network Div | 02 April 2012 | P001
Class A Valid Host IDs
Here is an example of how to figure out the valid host IDs in a
Class A network address:
10.0.0.0 All host bits off is the network address.
10.255.255.255 All host bits on is the broadcast address.
The valid hosts are the number in between the network address and
the broadcast address: 10.0.0.1 through 10.255.255.254.
10.0.0.1 10.0.0.2 … ….. 10.0.0.253 10.0.0.254
.
10.1.0.1 10.1.0.2 … ….. 10.1.0.253 10.1.0.254
------------- ----------- .. ---
10.255.255.1 10.255.255.1 -- ---- 10.255.255.253 10.255.255.254
-- ---
All you need to remember when trying to find valid host addresses
is that the host bits cannot all be turned off or on at the same time.
P_0018
Network Div | 02 April 2012 | P001
Network Address Range: Class B
In a Class B network, the RFCs state that the first bit
of the first byte must always be turned on, but the
second bit must always be turned off.
• If you turn the other six bits all off and then all on,
you will find the range for a Class B network:
10000000=128
10111111=191
P_0022
Network Div | 02 April 2012 | P001
Class C Addresses
The first three bytes of a Class C network address are dedicated to the
network portion of the address, with only one byte remaining for the
node address.
The format is :- Network.Network.Network.Host
• Using the example IP address 192.168.100.102, the network
address is 192.168.100, and the node address is 102.
• In a Class C network address, the first three bit positions are
always the binary 110.
• The calculation is such: 3 bytes, or 24 bits, minus 3 reserved
positions, leaves 21 positions. Hence, there are 2 power 21, or
2,097,152, possible Class C networks.
• Each unique Class C network has one byte to use for node
addresses.
• This leads to 2 power 8 or 256, minus the two reserved patterns of
all 0s and all 1s, for a total of 254 node addresses for each Class C
network. Network Div | 02 April 2012 | P001
P_0023
Class C Valid Host IDs
Here is an example of how to find a valid host ID in a Class C network:
192.168.100.0 All host bits turned off is the network ID.
192.168.100.255 All host bits turned on is the broadcast address.
• The valid hosts would be the numbers in between the network
address and the broadcast address:
• 192.168.100.1 through 192.168.100.254.
P_0024
Network Div | 02 April 2012 | P001
Network Address Ranges: Classes D and E
The first four bits of the first octet in Class D IP
addresses are set to 1110, giving a range of:
P_0026
Network Div | 02 April 2012 | P001
Network Addresses: Special Purpose
Some IP addresses are reserved for special purposes, and network
administrators shouldn’t assign these addresses to nodes or hosts.
P_0027
Network Div | 02 April 2012 | P001
Public and Private IP address
Public IP address is an IP address that can be accessed over the
Internet.
• Public IP address is the globally unique IP address assigned to a
computing device.
• Your public IP address can be found at What is my IP Address
page if you have internet connection.
• A web server, email server and any server device directly
accessible from the Internet are candidate for a public IP address.
Private IP address on the other hand is used to assign computers
within your private space without letting them directly expose to the
Internet.
• For example, if you have multiple computers within your home
you may want to use private IP addresses to address each
computer within your home.
• A private IP address is the address space allocated by InterNIC to
allow organizations to create their Network
ownDivprivate network.
| 02 April 2012 | P001
P_0028
Getting Public IP from PC
Type this address http://whatismyipaddress.com on any host
that have internet connection
P_0029
Network Div | 02 April 2012 | P001
Private IP address Ranges
Internet Assigned Numbers Authority (IANA) is the
organization responsible for registering IP address ranges to
organizations and Internet Service Providers (ISPs).
To allow organizations to freely assign private IP addresses, the
Network Information Center (InterNIC) has reserved certain
address blocks for private use.
The following IP blocks are reserved for private IP addresses.
P_0030
Network Div | 02 April 2012 | P001
Public IP address Ranges
All addresses are managed by ICANN and allocated to
organizations by IANA, so you cannot arbitrarily add the IP
addresses to your computers and connect them to the Internet as
they may be in use elsewhere on the Internet.
Public IP addresses used to communicate with the Internet.
Classes Public IP ranges
ET Public IP List:
Class A 1.0.0.0 - 9.255.255.255
11.x.x.x - 126.255.255.255
• 213.55.64.0/18
Class B 128.0.0.0 - 169.253.255.255
16382
169.255.0.0 - 172.15.255.255
• 197.156.64.0/18
172.32.0.0 - 191.0.1.255
16382
Class C 192.0.3.0 - 192.88.98.255
• 196.188.0.0/14
192.88.100.0 - 192.167.255.255
262,142
192.169.0.0 - 198.17.255.255
P_0031
198.20.0.0 - 223.255.255.255 Network Div | 02 April 2012 | P001
IPv4 assignment in Home Network
P_0032
Network Div | 02 April 2012 | P001
Subnetting Concept
Subnetting is the process of dividing one network
address and create sub networks from it.
• which allows you to take one larger network and
break it into many smaller networks.
• There are many reasons to perform subnetting.
• Some of the benefits of subnetting include the
following:
o Reduced network traffic
o Optimized network performance
o Simplified management
o Facilitated spanning of large geographical
distances P_0033
Network Div | 02 April 2012 | P001
Subnetting Process
To create subnetworks, you take bits from the host portion of the IP
address and reserve them to define the subnet address.
• This means fewer bits for hosts, so the more subnets, the fewer
bits available for defining hosts.
• However, before you implement subnetting, you need to
determine your current requirements and plan for future
conditions.
Follow these steps:
1. Determine the number of required network IDs.
2. Determine the number of required host IDs per subnet.
3. Based on the above requirement, create the following:
A. One subnet mask for your entire network
B. A unique subnet ID for each physical segment
C. A range of host IDs for each subnet P_0034
Network Div | 02 April 2012 | P001
Subnet Masks
A Subnet Mask is a 32-bit value that allows the recipient of IP
packets to distinguish the network ID portion of the IP address from
the host ID portion of the IP address.
The network administrator creates a 32-bit subnet mask composed
of 1s and 0s. The 1s in the subnet mask represent the positions that
refer to the network or subnet addresses.
For a Class A network, you cannot change the first byte in a subnet
mask; it must read 255.0.0.0 at a minimum.
A Class B address must start with 255.255.0.0, and a Class C must
start with 255.255.255.0.
P_0035
Network Div | 02 April 2012 | P001
Subnetting Class C Addresses
There are many different ways to subnet a network.
• Binary method
• An alternate method.
In a Class C address, only 8 bits is available for defining the hosts.
Remember that subnet bits start at the left and go to the right,
without skipping bits. This means that subnet masks can be
10000000=128
11000000=192
11100000=224
11110000=240
11111000=248
11111100=252
11111110=254
RFCs state that you cannot have only one bit for subnetting, So,
the first subnet mask you can legally use is 192, and the last one is
252, since you need at least two bits for defining hosts. P_0036
Network Div | 02 April 2012 | P001
Subnetting Class C Using Binary Method
We will take the first subnet mask available with a Class C address,
which borrows two bits from subnetting.
For this example, we are using 255.255.255.192.
• 192=11000000 Two bits for subnetting, 6 bits for defining the
hosts in each subnet.
• What are the subnets? Since the subnet bits can’t be both off or
on at the same time, the only two valid subnets are
01000000=64 (all host bits off) or
10000000=128 (all host bits off)
• The valid hosts would be defined as the numbers between the
subnets, minus the all host bits off and all host bits on.
• To find the hosts, first find your subnet by turning all the host
bits off, then turn all the host bits on to find your broadcast
address for the subnet. P_0037
Network Div | 02 April 2012 | P001
Subnetting Class C Using Binary Method…
P_0038
Network Div | 02 April 2012 | P001
Subnetting Class C Using Alternate Method
However, the example I presented only used two subnet bits.
• What if you had to subnet using 9, 10, or even 20 subnet bits?
• Let’s learn an alternate method of subnetting that makes it
easier to subnet larger numbers.
• When you have a subnet mask and need to determine the
amount of subnets, valid hosts, and broadcast addresses that
the mask provides,
• All you need to do is answer five simple questions:
P_0044
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
P_0046
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
Practice Example 3: 255.255.255.240
Let’s practice on another one:
192.168.10.0=Network number
255.255.255.240=Subnet mask
1. 240 is 11110000 in binary. 2 p 4–2=14 subnets.
2. Four host bits, or 2 p 4–2=14 hosts.
3. 256–240=16. 16+16=32. 32+16=48. 48+16=64. 64+16=80.
80+16=96. 96+16=112. 112+16=128. 128+16=144.
144+16=160.160+16=176. 176+16=192. 192+16=208.
208+16=224.224+16=240, which is our subnet mask and
therefore invalid.
• So, our valid subnets are 16, 32, 48, 64, 80, 96, 112, 128,
144, 160, 176, 192,208, and 224.
P_0047
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
4. What are the valid hosts?
5. What is the broadcast address for each subnet?
• To answer questions 4 and 5, view the following table,
which shows the subnets, valid hosts, and broadcast
addresses for each subnet.
• First, find the broadcast address of each subnet, then fill
in the host addresses.
P_0048
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
Practice Example 4: 255.255.255.248
Let’s keep practicing:
192.168.10.0=Network address
255.255.255.248=Subnet mask
1. 248 in binary=11111000. 2 p 5–2=30 subnets.
2. 2 p 3–2=6 hosts.
3. 256–248=8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104,
112, 120,128, 136, 144, 152, 160, 168, 176, 184, 192, 200,
208, 216, 224,232, and 240.
4. First find the broadcast addresses in step 5, then come back
and perform step 4 by filling in the host addresses.
5. Find the broadcast address of each subnet, which is always
the number right before the next subnet.
P_0049
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
P_0050
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
P_0051
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
The following table shows you the subnet, valid host, and
broadcast address of the first three and last three subnets in the
255.255.255.252 Class C subnet.
P_0052
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class C Addresses
P_0054
Network Div | 02 April 2012 | P001
Subnetting in Your Head: Class C Addresses
255.255.128.0 255.255.255.0
255.255.192.0 255.255.255.128
255.255.224.0 255.255.255.192
255.255.240.0 255.255.255.224
255.255.248.0 255.255.255.240
255.255.252.0 255.255.255.248
255.255.254.0 255.255.255.252
P_0057
Network Div | 02 April 2012 | P001
Subnetting Class B Addresses…
P_0058
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class B Addresses
P_0059
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class B Addresses
P_0061
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class B Addresses
1. 2 p 7–2=126.
2. 2 p 9–2=510.
3. 256–254=2, 4, 6, 8, etc., up to 252.
4. First find the broadcast addresses in step 5, then
come back and perform step 4 by filling in the
host addresses.
5. Find the broadcast address of each subnet, which
is always the number right before the next subnet.
P_0062
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class B Addresses
P_0063
Network Div | 02 April 2012 | P001
Subnetting Practice Examples: Class B Addresses
P_0065
Network Div | 02 April 2012 | P001
CIDR Notation
P_0066
Network Div | 02 April 2012 | P001
CIDR Notation...
P_0067
Network Div | 02 April 2012 | P001
IP Address Summarization Concept
P_0068
Network Div | 02 April 2012 | P001
Network Summarization Example
Networks to be summarized:
172.16.3.0/24
172.16.4.0/24
172.16.5.0/24
172.16.6.0/24
172.16.7.0/24
172.16.8.0/24
172.16.9.0/24
P_0069
Network Div | 02 April 2012 | P001
Step 1. Find the interesting octet
P_0070
Network Div | 02 April 2012 | P001
Step 2. Convert the interesting octet values to binary
P_0071
Network Div | 02 April 2012 | P001
Step 3. Identify the common bits and convert to decimal
00000011
00000100
00000101
00000110
00000111
00001000
00001001
The common bits in the third octet are shown in blue above.
Now we simply need to add trailing zeros to the end and convert it to
decimal.
This gives us the summary network address.
172.16.00000000.0 = 172.16.0.0 = Summary Address
P_0072
Network Div | 02 April 2012 | P001
Step 4. Count the number of leading common bits to find the mask
P_0073
Network Div | 02 April 2012 | P001
THANK YOU!