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

DCCN Lab Lecture 3

dccn

Uploaded by

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

DCCN Lab Lecture 3

dccn

Uploaded by

Ketema Deba
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

ARSI UNIVERSITY

COLLEGE OF NATURAL AND


COMPUTATIONAL SCIENCE

DEPARTMENT OF INFORMATION
TECHNOLOGY

DATA COMMUNICATION AND COMPUTER


NETWORKS LAB LECTURE THREE

STUDY OF IPv4 ADDRESS


01/27/2025 Prepared by Abdi M. Msc 1
Objective
In this lab we will learn about:
• Introduction to IP addressing
• Classification of IP Addresses
• Subnetting
• Network configuration
• NIC addressing
• Gather information, including the
connection, host name, MAC(Layer2)
address, and TCP/IP Network(Layer 3)
• Compare the network information to that
of other PC’s on Prepared
01/27/2025 theby Abdi
network.
M. Msc 2
Introduction to IP addressing
• Each Network Interface Card (NIC or Network
card) present in a PC is assigned one Network
address called as IP address or Network address.
• This IP address is assigned by the administrator
of the network.
• No two PCs can have the same IP address.
• There is a burned-in address on the NIC called as
Physical Address or MAC address or Hardware
address.
• The MAC address of a network card indicates the
vendor of that card and a unique serial number.

01/27/2025 Prepared by Abdi M. Msc 3


IPv4 Network Addresses

• An IP address is an address used in order to uniquely


identify a device on an IP network. 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). For this reason, an IP address is said to
be expressed in dotted decimal format (for example,
172.16.81.100).
• The value in each octet ranges from 0 to 255
decimal, or 00000000 - 11111111 binary.
01/27/2025 Prepared by Abdi M. Msc 4
IPv4 Address Structure
Binary Notation
• Binary notation
refers to the fact
that computers
communicate in
1s and 0s
• Converting
binary to decimal
requires an
understanding of
the
mathematical
basis of a
numbering
system positional
notation
01/27/2025 Prepared by Abdi M. Msc 5
IPv4 Address Structure
Binary Number System

01/27/2025 Prepared by Abdi M. Msc 6


Subnet-Mask
• A subnet mask is used to delineate the network portion from
the host portion.
• It is 32 bits long with all its network portion bits set to 1 and all
its host portion bits set to 0.
• It can be represented in dotted binary, dotted decimal or slash
(prefix length) notation.
• The subnet-mask of class B network, can be represented as
follows:
Dotted binary:
11111111.11111111.00000000.00000000
Dotted decimal: 255.255.0.0
Slash (prefix length): /16
• The bit-wise ANDing of the IP address and the subnet mask
gives the network address
• The “default” subnet masks for classful IP addresses fall on
“natural octet boundaries”, like /8, /16, or /24.
• For classless IP addressing, the subnet masks do not have to
01/27/2025 Prepared by Abdi M. Msc 7
end on “natural octet boundaries”, like /12, /20 or /27.
Rules for IP addressing
1. Format of IP address IPv4 is made up of
four parts, in the pattern as w.x.y.z. Each
part has 8 binary bits and the values in
decimal can range from 0 to 255.
2. IP address classes
• IP addresses are divided into different
classes. These classes determine the
maximum number of hosts per network ID.
Only three classes are actually used for
network connectivity. The following table
lists all of the address class.
01/27/2025 Prepared by Abdi M. Msc 8
IP Address Classes
• The 5 IP classes are split up based on the value in
the 1st octet:
• IP addresses are divided into 5 classes, each of which
is designated with the alphabetic letters A to E.

01/27/2025 Prepared by Abdi M. Msc


9
3. Grouping of IP addresses into different
classes.
a) Class A, B, C, D, E
b) Class A: first bit in w is 0 and others can be
anything
i. 0.0.0.0 to 127.255.255.255
First bits are used for network part and the
remaining for host part.
c) Class B: First bit in w is 1 and second bit is
0.
i. 128.0.0.0 to 191.255.255.255
ii. First 16 bits for network part and remaining
host part
d) Class C: first bit in w is 1, second bit in w is
01/27/2025 Prepared by Abdi M. Msc 10
1 and third bit is 0
e) Class D: first, second, third bits in w are 1 and
fourth bit is 0; used for multicast.
i. 224.0.0.0 to 239.255.255.255
ii. Class D addresses are used for multicasting.
f) Class E: Class E addresses are reserved for testing
(research)& some mysterious future use or
experimental purposes.
4. Default Subnet mask it is used to identify the
network part from the host part. Put binary one for the
parts that represent network part and zero for the part
that represent host part.
a) Class A: 255.0.0.0
b) Class B: 255.255.0.0
c) Class C: 255.255.255.0
d) We can’t have mix of 1s and 0s in subnet mask.
Only consecutive 1s is followed by consecutive 0s
01/27/2025 Prepared by Abdi M. Msc 11
5. Invalid IP address.
a) If the network part is all 0s, the address belongs
to class A. But this is an invalid ip address because
for an ip address all the network or host part
should not be all 1s or all 0s.
i. 0.0.0.0 is not valid. Routers use it internally.
b) If the network part is all 1s, this address belongs
to class E. But due to presence of all 1s, it is not
valid. This represent broadcast to all networks.
i. 255.255.255.255 is not valid.
c) If the host part is all 0s, this represents network
address. This is not a valid ip address.
d) If the host part is all 1s, this represents
broadcast address. This is not a valid ip address
01/27/2025 Prepared by Abdi M. Msc 12
e) We can’t use the ip address represented
within private address range as part of
public ip address.
i. Class A: 10.0.0.0 to 10.255.255.255
ii. Class B: 172.16.0.0 to 172.31.255.255
iii. Class C: 192.168.0.0 to 192.168.255.255
f) 127.0.0.0 network address is used for
loop-back testing. This will help you to
check the network card of your own PC
[local host].
g) The validity of the IP address is also
based on the subnet mask used provided.
01/27/2025 Prepared by Abdi M. Msc 13
Are You the Host or the
Network?
• The 32 bits of the IP address are divided
into Network & Host portions, with the
octets assigned as a part of one or the
other. Network & Host Representation
By IP Address Class
Class Octet1 Octet2 Octet3 Octet4

Class A Network Host Host Host

Class B Network Network Host Host

Class C Network Network Network Host

01/27/2025 Prepared by Abdi M. Msc


1
IPv4 Subnet Mask
Network Portion and Host Portion of an IPv4
Address

 To define the network and host portions of


an address, a devices use a separate 32-bit
pattern called a subnet mask
 The subnet mask does not actually contain the
network or host portion
01/27/2025
of an IPv4 address, it just
Prepared by Abdi M. Msc 15
says where to look for these portions in a given
IPv4 Subnet Mask
Network Portion and Host Portion of an IPv4
Address

01/27/2025 Prepared by Abdi M. Msc 16


Types of IPv4 Address

Legacy Classful
Addressing

01/27/2025 Prepared by Abdi M. Msc 17


Assigning a Static IPv4 Address to a
LAN Interface Host
Properties
Configuring a Static IPv4
Address

01/27/2025 Prepared by Abdi M. Msc 18


Assigning a Dynamic IPv4 Address to a
Host

Verification
DHCP - preferred method of “leasing” IPv4 addresses
to hosts on large networks, reduces the burden on
network support staff and virtually eliminates entry
errors
01/27/2025 Prepared by Abdi M. Msc 19
Subnetting

Subnetting - process of segmenting a network into


multiple smaller network spaces called subnetworks
or Subnets.
Reasons for Subnetting
Large networks need to be segmented into smaller
sub-networks, creating smaller groups of devices
and services in order to:
• Control traffic by containing broadcast traffic within
subnetwork
• Reduce overall network traffic and improve network
performance

Communication Between Subnets


• A router is necessary for devices on different
networks and subnets to communicate.
• Each router interface must have an IPv4 host
address that belongs
01/27/2025 toby Abdi
Prepared the network or subnet that
M. Msc 20
Subnetting an IPv4 Network
•Number of created subnets=2^s where s is the
number of borrowed bits
• Borrowing Bits to Create Subnets
• Borrowing 1 bit 21 = 2 subnets

Borrowing 1 Bit from the host portion creates 2 subnets with the same
subnet mask

Subnet 0 Subnet 1
Network 192.168.1.0-127/25 Network 192.168.1.128-255/25
01/27/2025 Prepared by Abdi M. Msc 21
Mask: 255.255.255.128 Mask: 255.255.255.128
Subnets in Use
Subnet 0
Network 192.168.1.0-127/25

Subnet 1
Network 192.168.1.128-255/25

01/27/2025 Prepared by Abdi M. Msc 22


Subnetting Formulas
 Calculate Number of Subnets

 Calculate Number of Hosts

01/27/2025 Prepared by Abdi M. Msc 23


Creating 4 Subnets
 Borrowing 2 bits to create 4 subnets.
22 = 4 subnets

01/27/2025 Prepared by Abdi M. Msc 24


Creating 8 Subnets
 Borrowing 3 bits to Create 8 Subnets.
23 = 8 subnets

01/27/2025 Prepared by Abdi M. Msc 25


Creating 8
Subnets(continued)

01/27/2025 Prepared by Abdi M. Msc 26


Network configuration
Step 1. Connect to the Internet.
• Establish and verify connectivity to the Internet.
This step ensures the computer has an IP
address.
Step 2. Gather TCP/IP configuration information.
a. Use the Start menu to open the command
prompt
(Start>Programs>Accessories>Command Prompt
or Start>Programs>Command Prompt).
b. Type ipconfig and press Enter key. The spelling
of the ipconfig is critical, but the case is not.

01/27/2025 Prepared by Abdi M. Msc 27


01/27/2025 Prepared by Abdi M. Msc 28
c. The screen shows the IP address, subnet mask and the
default gateway. The IP address and the default gateway
should be in the same network or subnet; otherwise this
host wouldn’t be able to communicate outside the
network.
Step 4. Compare this computer’s TCP/IP configuration to
that of others on the LAN. If this computer is on a LAN,
compare the information of several machines (Hosts).
Step 5. Check additional TCP/IP configuration
information.
a. To see more information, type ipconfig/all and press
Enter key. The figure shows the detailed IP configuration
of this computer on the screen.

01/27/2025 Prepared by Abdi M. Msc 29


01/27/2025 Prepared by Abdi M. Msc 30
b. You should see the following information:
the host name (computer name), the
Physical address of this machine, IP address,
subnet Mask, Default Gateway and DNS
Servers.
c. In the LAN, compare your result with a few
nearby computers. What similarities do you
see in the physical (MAC) address?
d. Write down the computer’s host name
e. Write down the host names of a couple of
other computer:_
Step
01/27/2025
6. Close the Prepared
screen when finished.
by Abdi M. Msc 31
Part 1. Using PING TRACERT from a
Workstation

Sept 1. Establish and verify


connectivity to the Internet. This step
ensures that the computer has an IP
address.
Step 2. Open the Command prompt
(MS-DOS). Ping the IP address of
another computer.
a. In the window, type ping, a space,
and the IP address of a computer
recorded in the previous lab.
01/27/2025 Prepared by Abdi M. Msc 32
01/27/2025 Prepared by Abdi M. Msc 33
• Ping uses the Internet Control Message Protocol (ICMP)
echo-request and echo-reply feature to test physical
connectivity. Because ping reports on four attempts, it gives
an indication the reliability of the connection. Look over the
result and verify that the ping was successful. Was the ping
successful? If not, report to the instructor.
b . Ask the IP address of the nearby computers and ping. Note
the result.
c. Ping the IP address of Default gateway and DNS servers.
Was the result successful?
d. Ping the computer’s loopback IP address. Type the following
command:
ping 127.0.0.1
e. The address 127.0.0.1 is reserved for loopback testing. If
the ping is successful, then TCP/IP is properly installed and
functioning on this computer.
f. Was the ping successful for e.
g. Ping the hostname of the computer that you recorded in lab
1.1.
01/27/2025 Prepared by Abdi M. Msc 34
Step 3. Trace the route to the Umm-alqura
university website: type tracert
www.uqu.edu.sa and press Enter key.
The result shows the complete route to the
site and the number of hops in path.
Trace a local host name or IP address in
your local area network (LAN).
Record the output and interpret.
Step 4. Close the window. Also see
“pathping ip or host” command. Which only
shows path from source to destination.
01/27/2025 Prepared by Abdi M. Msc 35
End of Lab Lecture Three

Any questions so far?

01/27/2025 Prepared by Abdi M. Msc 36

You might also like