LECTURE 3 IP ADDRESSING
LECTURE 3 IP ADDRESSING
An Internet Protocol address (IP address) is a numerical label assigned to each device in a computer network that uses
the Internet Protocol for communication. An IP address is an address used in order to uniquely identify a device on an
IP network. An IP address serves two principal functions: host or network interface identification and location
addressing.
The address is made up of 32 binary bits, which can be divisible into a network portion and host portion with the help
of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to decimal
and separated by a period (dot). An IP address is said to be expressed in dotted decimal format. The value in each octet
ranges from 0 to 255 decimal, or 00000000 - 11111111 binary.
Two versions of the Internet Protocol (IP) are in use:
• IP Version 4 and
• IP Version 6.
Each version defines an IP address differently. Because of its prevalence, the generic term IP address typically still
refers to the addresses defined by IPv4.
Address—The unique number ID assigned to one host or interface in a network.
A Subnet—A portion of a network sharing a particular subnet address.
A Subnet mask—Is a 32-bit combination used to describe which portion of an address refers to the subnet and which
part refers to the host.
CLASSIFICATION
Network Masks
A network mask helps you know which portion of the address identifies the network and which portion of the address
identifies the node. Class A, B, and C networks have default masks, also known as natural masks, as shown here:
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
The following are the classes of IP addresses.
• Class A—The first octet denotes the network address, and the last three octets are the host portion. Any IP address
whose first octet is between 1 and 126 is a Class A address. Note that 0 is reserved as a part of the default address, and
127 is reserved for internal loopback testing.
• Class B—The first two octets denote the network address, and the last two octets are the host portion. Any address
whose first octet is in the range 128 to 191 is a Class B address.
• Class C—The first three octets denote the network address, and the last octet is the host portion. The first octet
range of 192 to 223 is a Class C address.
• Class D—Used for multicast. Multicast IP addresses have their first octets in the range 224 to 239.
• Class E—Reserved for future use and includes the range of addresses with a first octet from 240 to 255.
Subnetting
Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you
do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic.
If you break a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of
interconnecting subnetworks.
In order to subnet a network, extend the natural mask using some of the bits from the host ID portion of the address to
create a subnetwork ID.
Example
Given a Class C network of 204.17.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this
manner:
204.17.5.0 - 11001100.00010001.00000101.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
--------------------------|sub|----
Troubleshooting
TCP/IP network problems are often caused by incorrect configuration of the three main entries in a computer's TCP/IP
properties. By understanding how errors in TCP/IP configuration affect network operations, you can solve many
common TCP/IP problems.
Incorrect Subnet Mask: If a network uses a subnet mask other than the default mask for its address class, and a
client is still configured with the default subnet mask for the address class, communication will fail to some nearby
networks but not to distant ones.
A symptom of this is when a computer can communicate with hosts that are on its local network and can talk to all
remote networks except those that are nearby and have the same class A, B, or C address. To fix this problem, enter
the correct subnet mask in the TCP/IP configuration for that host.
Incorrect IP Address: If you put computers with IP addresses that should be on separate subnets on a local network
with each other, they will not be able to communicate. They will try to send packets to each other through a router that
will not be able to forward them correctly.
A symptom of this problem is a computer that can talk to hosts on remote networks, but cannot communicate with
some or all computers on their local network.
To correct this problem, make sure all computers on the same physical network have IP addresses on the same IP
subnet.
Incorrect Default Gateway: A computer configured with an incorrect default gateway will be able to communicate
with hosts on its own network segment, but will fail to communicate with hosts on some or all remote networks.
If a single physical network has more than one router, and the wrong router is configured as a default gateway, a host
will be able to communicate with some remote networks, but not others.
This problem is common if an organization has a router to an internal TCP/IP network and another router connected to
the Internet.
Exercise
1. The network address of 172.16.0.0/19 provides how many subnets and hosts?
2. You have a network that needs 29 subnets while maximizing the number of host addresses available on each
subnet. How many bits must you borrow from the host field to provide the correct subnet mask?
3.What is the maximum number of IP addresses that can be assigned to hosts on a local subnet that uses the
255.255.255.224 subnet mask?
4.You need to subnet a network that has 5 subnets, each with at least 16 hosts. Which classful subnet mask would you
use?
5. Your router has the following IP address on Ethernet0: 172.16.2.1/23. Calculate the number of hosts it can
accommodate per subnet and how many subnets it can support. Calculate the subnet mask.
6. You have an interface on a router with the IP address of 192.168.192.10/29. Including the router interface, how
many hosts can have IP addresses on the LAN attached to the router interface?
7. To test the IP stack on your local host, which IP address would you ping?
IP address assignment
Internet Protocol addresses are assigned to a host either anew at the time of booting, or permanently by fixed
configuration of its hardware or software. Persistent configuration is also known as using a static IP address. In
contrast, in situations when the computer's IP address is assigned newly each time, this is known as using a dynamic
IP address.
Methods
Static IP addresses are manually assigned to a computer by an administrator. The exact procedure varies according to
platform.
This contrasts with dynamic IP addresses, which are assigned either by the computer interface or host software itself.
Even though IP addresses assigned using DHCP may stay the same for long periods of time, they can generally
change.
In the absence or failure of static or stateful (DHCP) address configurations, an operating system may assign an IP
address to a network interface using state-less auto-configuration methods, such as Zeroconf.
There are four forms of IP addressing, each with its own unique properties.
• Unicast: The most common concept of an IP address is in unicast addressing, available in both IPv4 and IPv6. It
normally refers to a single sender or a single receiver, and can be used for both sending and receiving. A unicast
address is associated with a single device or host, but it is not a one-to-one correspondence.
• Broadcast: In IPv4 it is possible to send data to all possible destinations ("all-hosts broadcast"), which permits
the sender to send the data only once, and all receivers receive a copy of it. In the IPv4 protocol, the address
255.255.255.255 is used for local broadcast.
• Multicast: A multicast address is associated with a group of interested receivers. In IPv4, addresses 224.0.0.0
through 239.255.255.255 are designated as multicast addresses.
• Anycast: Like broadcast and multicast, anycast is a one-to-many routing topology. However, the data stream is
not transmitted to all receivers, just the one which the router decides is logically closest in the network. Anycast
address is an inherent feature of only IPv6. In IPv4, anycast addressing implementations typically operate using
the shortest-path metric of BGP routing and do not take into account congestion or other attributes of the path.
Anycast methods are useful for global load balancing and are commonly used in distributed DNS systems.
IP Binding
IP Binding specifies from which IP addresses the System Management accepts requests from and provides control
over which nets and subnets requests are processed.
Administrators can configure the System Management to only bind to addresses specified in the IP Binding page. A
maximum of five subnet IP addresses and Netmasks can be defined. An IP address on the server is bound if it matches
one of the entered IP Binding addresses after the mask is applied.