You are on page 1of 21

Network Layer

Lecture 6
OBJECTIVES

▪ Understand the position of the network layer in the Internet


model.
▪ Understand the rationale for the existence of the network layer.
▪ Understand the concept of host-to-host delivery.
▪ Understand the duties of the network layer: packetizing,
addressing, and routing.
▪ Understand the network layer protocol, IP, used in the Internet.
▪ Know which upper-layer protocol can use the services of IP.
Position of IP in Internet model
TCP/IP Model
Description
▪ The network later in the Internet Model (TCP/IP) is
responsible for carrying a packet from one computer to
another.
▪ It is responsible foe computer-to-computer or host-to-host
delivery
▪ For Example: When a computer in Mwanza send a packet to
another computer in Mtwara, the two network layer
protocol in the two computers cooperate to supervise the
delivery of the packet
▪ Packet travelling from the source to destination needs two
addressed →Source Address and Destination Addresses
▪ These addresses (source and destination) must be unique to
avoid any ambiguity
Duties of the network layer
Addressing
• At network layer we need to uniquely identify each device on the internet
to allow global communication between devices.
• This is analogy to mobile system where each mobile subscriber has a unique
mobile number.
• If we consider country code and provider code as the part of identifying
scheme, a subscriber with +255784077770 is uniquely identified as the
Airtel customer in Tanzania
• The address used in the network layer must uniquely and universally define
the connection of a host (computer) or a router to the internet.
• The address must be unique in the sense that each address define one and
only one connection to the Internet
Internet Address –IP Address
▪ Addresses used in the internet are called IP addresses.
▪ An IP address is made of 4 bytes (32 bits)
▪ Each byte can have values between 0 and 255
▪ Bytes are separated by a dot (.)
IP Addresses in Decimal Notation

→ Example of IP address
Address Space
A protocol such as IP that defines addresses has an address space.
An address space is the total number of addresses available to the
protocol. If a protocol uses N bits to define an address, the address
space is 2N because each bit can have two different values (0 and
1); N bits can have 2N values.

The Internet uses 32-bit addresses, which means that the address
space is 232 or 4,294,967,296 (more than 4 billion). This means
that theoretically, if there were no restrictions, more than 4 billion
devices could be connected to the Internet.
IP Address Classes
Class A addresses are numerically the lowest they have only 1
byte to identify class type and netid and leave 3 byte available
for hostid numbers
Class a can accommodate for more hosts than class B and C
Class Ranges of Internet Addresses
Network and Host Addresses
Address Hierarchy
▪ To make network-layer addressing more functional, the Internet
has an addressing hierarchy . This similar to snail-mail
addressing and telephone numbering
▪ In snail-addressing, a person’s address consists of a country,
state, city, street and street number
▪ For Example: 123 Masaki, Kinondoni, DSM, TZ contains these
five levels of Hierarchy
▪ Every household in Masaki has four of the same identifiers;
only the street number (123) changes.
▪ The Internet has two or three levels of Hierarchy in addressing
Two Level Address Hierarchy

When using two levels of address hierarchy, the


common part is referred to as the netid or prefix and
the variable part is referred to as the hostid, or suffix.
A Network with Two Levels of Hierarchy
Two levels of hierarchy
A packet traveling from the source to
the destination needs at least four
addresses: source and destination
port numbers and source and
destination IP addresses.
DNS example
Masking

You might also like