Lesson 5a - IP Addressing
Lesson 5a - IP Addressing
IP Addressing
Lesson Objectives
• Understand IP addressing
What is an IP Address?
• 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).
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
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.
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, 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.
• 172.16.20.1 to 172.16.20.126