0% found this document useful (0 votes)
19 views

Lesson 5a - IP Addressing

The document discusses IP addressing and networking concepts. It covers topics like what an IP address is, why IP addresses are needed, static versus dynamic IP configuration, IP address classes, and converting between binary and decimal IP address formats.

Uploaded by

sheilayvonne45
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Lesson 5a - IP Addressing

The document discusses IP addressing and networking concepts. It covers topics like what an IP address is, why IP addresses are needed, static versus dynamic IP configuration, IP address classes, and converting between binary and decimal IP address formats.

Uploaded by

sheilayvonne45
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

LESSON 5a

IP Addressing
Lesson Objectives
• Understand IP addressing
What is an IP Address?

• Answer: An IP Address is a "computers" return


address. This return address is needed so the
information you request will make it back to
your computer.

• Your IP (Internet Protocol) Address is a unique


set of four numbers (0-255) that is always in
the form of 255.255.255.255.
Why do you need an IP address?
• Each computer hooked up to the internet has to
have these numbers so that the requested
information has a place to be delivered.
• There is a lot of information that you are sending
out with your requests. There has to be enough
information for the server to know where to
return your requests and there is also enough
information for someone to find out exactly
where your machine is located geographically.
Static vs Automatic IP configuration
• Some computers have a FIXED (static) number - in
other words - every time you turn on the
computer you have the same numbers.

• Other computers allow the network server to


assign their network configuration from a DHCP
(Dynamic Host Configuration Protocol) Server
automatically.

• DHCP draws from a list of addresses and assigns


them as needed. This also reduces the likelihood
of configuration errors for the users - assuring
that no two IP numbers are the same.
Static vs Automatic IP configuration
• DHCP is preferred for all client
devices/workstations such as desktops,
laptops, thin clients etc.
• This ensures that users can actively gain an IP
address, in any location, especially where
laptop owners roam around.

• Static ip is preferred for all resource devices


such as servers, networked printers, routers,
switches, etc). Besides making resource
devices static, set up a reservation for them
on your DHCP server.
DHCP
DHCP Architecture
• A DHCP client is any device that can
connect to a network, and can
communicate with a DHCP server. This
includes phones and computers but also
network printers and servers.
• A DHCP server is the device that assigns IP
addresses.DHCP relay agents requests
between DHCP clients and servers.
DIAGRAM
Static vs Automatic IP configuration
• Design and manage your scopes well to
ensure that static devices have their own IP
range, and the client end points have their
own IP range appropriate to the size of the
organization and its projected growth.
• IP addresses are assigned by your Internet
Service Providers (ISP) under authority of the
Internet Assigned Numbers Authority (IANA)
who in turn gets the numbering scheme from
InterNic.
IPv4 Address Syntax
• If network administrators expressed IPv4
addresses using binary notation, each address
would appear as a 32-digit string of 1s and 0s.
• Because such strings are cumbersome to
express and remember, administrators use
dotted decimal notation, in which periods (or
dots) separate four decimal numbers (from 0
to 255).
IPv4 Address Syntax
For example, the IPv4 address
11000000101010000000001100011000 is expressed as
192.168.3.24 in dotted decimal notation. To convert an IPv4
address from binary notation to dotted decimal notation, you:
•Segment it into 8-bit blocks: 11000000 10101000 00000011
00011000
•Convert each block to decimal: 192 168 3 24
•Separate the blocks with periods: 192.168.3.24
Each decimal number, known as an octet, represents 8 bits (1 byte) of the
32-bit address.

The IPv4 address in dotted decimal notation


Internet Address Classes
• Of five address classes, class A, B, and C
addresses were reserved for IPv4 unicast
addresses.
• Class D addresses were reserved for IPv4
multicast addresses, and class E addresses
were reserved for experimental uses.
Class A
• Class A address prefixes are assigned to
networks with very large numbers of hosts.
• The prefix length of Class A address prefixes is
only 8 bits, allowing the remaining 24 bits to
identify up to 16,777,214 (2^24-2) host IDs.
• However, the short prefix length limits the
number of networks that can receive class A
address prefixes to 126.
Class A
• The high-order bit in class A address prefixes is always set to
0.
• Addresses in which the first eight bits are set to 00000000
cannot be assigned because they constitute a reserved
address prefix.

• Addresses in which the first eight bits are set to 01111111


(127 in decimal) cannot be assigned because they are
reserved for loopback addresses. Note: 127.0.0.1 is a
loopback address used to verify that the NIC is working
properly.

• These two conventions decrease the number of class A


address prefixes from 128 to 126.
class A
• For any IPv4 subnet prefix, the host IDs in
which all the host bits are set to 0 or to 1 are
reserved and cannot be assigned to network
node interfaces.

• This convention reduces the number of host


IDs in each class A address prefix from
16,777,216 i.e. (2^24) (224) to 16,777,214.
(2^24-2)
Class B
• Class B address prefixes are assigned to medium to large-sized
networks.

• The first 16 bits specify a particular network, and the last 16 bits
specify a particular host.

• However, the two high-order bits in a class B address are always set
to 10, which makes the address prefix for all class B networks and
addresses 128.0.0.0/2 (or 128.0.0.0, 192.0.0.0).

• With 14 bits to express class B address prefixes and 16 bits to


express host IDs, class B addresses can be assigned to 16,384 ( 2 ^
14)networks with up to 65,534 (2 ^ 16 - two)hosts per network.
Class C
• Class C addresses are assigned to small networks.

• In addresses for these networks, the first 24 bits specify a


particular network, and the last 8 bits specify particular hosts.

• However, the three high-order bits in a class C address are


always set to 110, which makes the address prefix for all class
C networks and addresses 192.0.0.0/3 (or 192.0.0.0,
224.0.0.0).

• With 21 bits to express class C address prefixes and 8 bits to


express host IDs, class C addresses can be assigned to
2,097,152 networks with up to 254 (2^8 – 2) hosts per
network.
Class D
• Class D addresses are reserved for IPv4
multicast addresses.

• The four high-order bits in a class D address


are always set to 1110, which makes the
address prefix for all class D addresses
224.0.0.0/4 (or 224.0.0.0, 240.0.0.0).
Class E
• Class E addresses are reserved for
experimental use.

• The high-order bits in a class E address are set


to 1111, which makes the address prefix for all
class E addresses 240.0.0.0/4 (or 240.0.0.0,
240.0.0.0).
Further information
The table below summarizes the Internet address classes
A, B, and C that can be used for IPv4 unicast addresses.

Class Value for Address Prefix Host ID Address Host IDs


w Portion Portion Prefixes per
Address
Prefix

A 1-126 W x.y.z 126 16,277,214

B 128-191 w.x y.z 16,384 65,534

C 192-223 w.x.y z 2,097,152 254


Internet Address Class Summary
Class First byte Leading bit Private address space Default subnet
values pattern is masks

A 1-126 0 10.0.0.0 to 255.0.0.0


10.255.255.255
B 128-191 10 172.16.0.0 to 255.255.0.0
172.31.255.255
C 192-223 110 192.168.0.0 to 255.255.255.0
192.168.255.255

D 224-239 1110 Reserved for multcast

E 240-255 1111 Reserved for


experimental, used for
research
Convert IP address from binary format to decimal
notation and vice versa. Let's review this first.

20=1
21=2
22=4
23=8
24=16
25=32
26=64
27=128
• The following pattern for solving binary numbers to decimal
numbers and decimal numbers to binary numbers should be
used. Always remember to read from right to left instead of
left to right. Also notice that each place doubles in value from
right to left.

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1
• The above should be memorized. Later this will be important to remember
when figuring out the number of subnets and hosts per subnets.
Therefore, this skill must be practiced and reinforced as often as possible.
Here are a few sample problems.
• Example 1 (binary to decimal)
11001011 = 203 or

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
1 1 0 0 1 0 1 1
Example 2 (binary to decimal)
01011110 = 94 or

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
0 1 0 1 1 1 1 0
By writing out the chart and placing the 1's and 0's under
the proper place in the chart, all that is left is to add up
the place values that have 1's under them and the total
will be the decimal number value.
• To convert decimal numbers to binary numbers, place 1's in
the place values until all the place values with 1's add up to
the total. If any numbered place adds a value that is larger
than the decimal number, 0's should be placed in those place
values.
• Example 3 (decimal to binary)
138 = 10001010 or

27 26 25 24 2 3 22 21 20
128 64 32 16 8 4 2 1
1 0 0 0 1 0 1 0
• Another method for converting decimal numbers to binary numbers is the
remainder method. Divide the decimal number by 2 and place write down
a 1 if there is a remainder or a 0 if there is no remainder. Be sure to write
the 1's and 0's down in reverse order from right to left.
• Example 4 (decimal to binary)
218 = 11011010

218 ÷ 2 = 109 remainder 0


109 ÷ 2 = 54 remainder 1
54 ÷ 2 = 27 remainder 0
27 ÷ 2 = 13 remainder 1
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
• The work can be checked by placing the 1's and 0's back into
the chart and adding up the place values that have 1's.
• Checking the answer (218)

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
1 1 0 1 1 0 1 0
Guidelines for using IP addressing
• You must not use 127 for the first octet of the Network
ID. This value is reserved for the diagnostic purposes.
• Use public registered addresses only where essential to
do so e.g. on the main server(s).
• Use addresses from the private address range reserved
by IANA (Internet Assigned Number Authority) for
private IP addressing.
• You must not use all 1s (binary) for the host ID in a
class-based network. If all bits are set to 1, the address
is interpreted as a broadcast address.
• You must not use all 0s for the host ID in a class-based
network. If all bits are set to 0, some TCP/IP
implementations intercept this as a broadcast address.
• You must not duplicate host Ids within a network
segment.
Determining the IP Addressing
Scheme
• The IP addressing scheme which you use can
be based on:
• Public IP addresses: Here, the IP addressing
scheme consists of only public IP addresses.
• Private IP addresses: Here, the IP addressing
scheme consists of private IP addresses and a
small number of public IP addresses needed
to enable Internet connectivity.
• If you are only using a public IP addressing scheme in
your network design, then you need to perform the
following activities:
• Purchase a range of public IP addresses from an ISP
that is approved by the Internet Corporation for
Assigned Names and Numbers (ICANN).
• The IP address range should have sufficient IP
addresses for all interfaces in your network
infrastructure design. Devices that connect to the
private network need an IP address, and so too does
VPN connections.
• You need to be certain that network address
translation (NAT) is not required.
• You need to implement firewalls and router packet
filters to secure the resources within your private
network from Internet users.
• If you are implementing a private IP
addressing scheme, then the network design
would consist of the following:
• Private IP addresses would be assigned to all
devices in the private internal network.
• Public IP addresses would be assigned to all
devices connecting to the public network.
• The selection of the IP address range needed
for the organization should be based on the
following factors:
• Maximum number of IP devices on each
subnet
• Maximum number of network subnets
needed in the network design.
• If you are using a private IP addressing scheme in
your network design, consider the following
important points:
1. For those IP devices that connect the company
network to public networks such as the Internet,
you need to obtain a range of public IP
addresses from the ISP for these devices.
2. You should only assign public IP addresses to
those devices that communicate directly with
the Internet. This is mainly due to you paying for
each IP address obtained. Devices which directly
connect to the Internet are your network
address translation (NAT) servers, Web servers,
VPN remote access servers, routers, firewall
devices, and Internet application servers.
3. The private IP address range which you choose should
have sufficient addresses to support the number of
network subnets in your design, and the number of
devices or hosts on each particular network subnet.

4. You must cater for a network address translation (NAT)


implementation. NAT translates IP addresses and
associated TCP/UDP port numbers on the private network
to public IP addresses which can be routed on the
Internet. Networks that do not require an implementation
of a firewall solution or a proxy server solution can use
NAT to provide basic Internet connectivity. Through NAT,
host computers are able to share a single publicly
registered IP address to access the Internet.
Calculating Network, Hosts, and
Broadcast Addresses
• You are given 172.16.20.0 /25 network
Required
• Calculating the Network Address
• The network address is the lowest address in
the address block.
• If you are given a subnet address 172.16.20.0 /25 and you need to know
the network address for the subnet, you will have to use a Boolean
algebra operation called AND.

• AND is the same as multiplication. AND means that a binary


• 0 AND 1 = 0
• 0 AND 0 = 0
• 1 AND 1 = 1.
• To AND the subnet address 172.16.20.0, we break the IP address
172.16.20.0 and the default subnet mask 255. 255. 255. 0 into binary and
AND them together. We then take the result of the ANDing
i.e
10101100.00010000.00010100.00000000
11111111.11111111.11111111.00000000
10101100.00010000.00010100.00000000

172.16.20.0 is the network address


Calculating the Lowest Host Address
This is always 1 greater than the network address.
Therefore, using binary counting, you increment the 1s bit,
making the last host bit a 1. The Figure below shows the
lowest host address for the network 172.16.20.0 /25.

All host bits except the least significant address are all 0s:
0+0+0+0+0+0+0+1=1. With the lowest bit of the host
address set to a 1, the address is 172.16.20.1. So, the
lowest host address is 172.16.20.1
Calculating the Broadcast Address
Although it can seem a little out of sequence, it is often
easier to calculate the broadcast address before calculating
the highest host address. The broadcast address of a
network is the highest address in the address block. It
requires all the host bits to be set. Therefore, all seven host
bits used in this example network are 1s

All host bits are 1s: 64+32+16+8+4+2+1=127. From the


calculation, the value of the last octet is 127. This gives you a
broadcast address of 172.16.20.127 for the network
172.16.20.0 /25.
Calculating the Highest Host Address
After determining the broadcast address, you can easily
determine the highest host address.
It is 1 less than the broadcast address. With a broadcast
address of 172.16.20.127, the highest host address
would be 172.16.20.126. To determine the highest host
address, make the lowest host bit a 0 and all other host
bits a 1.

All host bits, except the lowest address, are all 1s:
64+32+16+8+4+2+0=126. This makes the highest host
address in this example 172.16.20.126.
Determining the Host Address Range
• Finally, you need to determine the host range for the
network.
• The host range of the network includes all the addresses
from the lowest host address to the highest host address
inclusive.

• Therefore in this network, the address range is

• 172.16.20.1 to 172.16.20.126

• These IPv4 unicast addresses can be assigned to the hosts


in the logical network 172.16.20.0/25.

• A host that is assigned any other address will be in a


different logical network.

You might also like