DATA COMMUNICATION &
COMPUTER NETWORK
DCC-22414
UNIT-V
REFERENCE MODELS
Mr. Naresh A. Kamble
POINTS TO BE COVERED
• INTRODUCTION
• LAYERED ARCHITECTURE
• PEER-TO-PEER PROCESSES
• INTERFACES BETWEEN LAYERS
• PROTOCOLS
• ORGANIZATION OF THE LAYERS
• ENCAPSULATION
• OSI REFERENCE MODEL
• TCP/IP PROTOCOL SUITE
INTRODUCTION
• A network is a combination of hardware and software that
sends data from one location to another.
• The hardware consists of the physical equipment that carries
signals from one point of the network to another.
• The software consists of instruction sets that make possible
the services that we expect from a network.
• For making successful working of software with hardware
different layers are needed.
Tasks involved in sending a letter
LAYERED ARCHITECTURE
• The complex task of communication is broken into simpler
sub-tasks.
• Each layer performs a subset of the required communication
functions.
• Each layer relies on the next lower layer to perform more
primitive functions.
• Each layer provide services to the next higher layer, and
changes in one layer should not require changes in other
layers.
PEER-TO-PEER ARCHITECTURE
• In order for data to travel from the source to the destination, each layer of
the OSI model at the source must communicate with its peer layer at the
destination.
• This form of communication is referred to as peer-to-peer.
• During this process, the protocols of each layer exchange information,
called protocol data units (PDUs).
• Each layer of communication on the source computer communicates with
a layer-specific PDU, and with its peer layer on the destination computer
as illustrated in Figure
OSI MODEL
• Established in 1947, the International Standards Organization (ISO) is a
multinational body dedicated to worldwide agreement on international
standards.
• An ISO standard that covers all aspects of network communications is the
Open Systems Interconnection (OSI) model.
• It was first introduced in late 1970s.
• An open system is a set of protocols that allows any two different systems
to communicate regardless of their underlying architecture
Seven layers of the OSI model
The interaction between layers in the OSI model
PRESENTATION TRANSPORT DATA LINK
6 4 2
ALL PEOPLE SEEM TO NEED DATA PROCESSING
APPLICATION NETWORK PHYSICAL
7 3 1
SESSION
5
OSI MODEL
• ORGANIZATION OF LAYERS
• Layers 1,2,3 are known as Network Support Layers.
– Physical Layer
– Data Link Layer
– Network Layer
• Layers 5,6,7 are known as User Support Layers.
– Session Layer
– Presentation Layer
– Application Layer
• At each layer either a header or a trailer is added.
• OSI enables encapsulation. A packet at one level is encapsulated in packet
of another level, and so on.
OSI MODEL
• ENCAPSULATION
• The process of passing information through the layers of the OSI is called
encapsulation or packetization.
• Packetization is the process of creating IP packets.
• The packet creation process begins with Layer 7 (the application layer) of
the OSI , and continues through Layer 1 (the physical layer).
• For example, when you transfer a file from one computer to another, this
file undergoes a transformation from a discrete (complete) file into
smaller pieces of information (packets).
OSI MODEL
• LAYERS IN OSI MODEL
• PHYSICAL LAYER
• It coordinates the functions required to carry a bit stream
over a physical medium.
• It deals with the mechanical and electrical specifications of
the interface and transmission medium.
• It also defines the procedures and functions that physical
devices and interfaces have to perform for transmission to
occur.
OSI MODEL
• The physical layer is responsible for movements of individual
bits from one hop (node) to the next.
OSI MODEL
• The physical layer is also concerned with the following:
• Physical characteristics of interfaces and medium
– characteristics of the interface between the devices and the transmission
medium
• Representation of bits
– sequence of Os or 1s
• Data rate
– the number of bits sent each second
• Synchronization of bits
– the sender and the receiver clocks must be synchronized
– direction of transmission between two devices: simplex, half-duplex, or full-
duplex
OSI MODEL
• The physical layer is also concerned with the following:
• Line configuration
– the connection of devices to the media
• Physical topology
– how devices are connected to make a network
• Transmission mode
– direction of transmission between two devices: simplex, half-duplex, or full-
duplex
OSI MODEL
• DATA LINK LAYER
• The data link layer transforms the physical layer, a raw
transmission facility, to a reliable link.
• It makes the physical layer appear error-free to the upper
layer (network layer)
OSI MODEL
• The data link layer is responsible for moving frames from one
hop (node) to the next.
OSI MODEL
• The responsibilities of the data link layer include the following
• Framing
– The data link layer divides the stream of bits received from the network layer
into manageable data units called frames.
• Physical addressing
– addition a header to the frame to define the sender and/or receiver of the
frame.
• Flow control
– flow control mechanism to avoid overwhelming the receiver
OSI MODEL
• The responsibilities of the data link layer include the following
• Error control
– adds reliability to the physical layer by adding mechanisms to detect and
retransmit damaged or lost frames and to recognize duplicate frames
• Access control
– When two or more devices are connected to the same link, the protocols
determines which device has control over the link at any given time
OSI MODEL
• NETWORK LAYER
• The network layer is responsible for the source-to-destination delivery of a
packet, possibly across multiple networks (links).
• The network layer ensures that each packet gets from its point of origin to
its final destination.
• If two systems are connected to the same link, there is usually no need for
a network layer.
• If the two systems are attached to different networks (links) with
connecting devices between the networks (links), there is need for the
network layer to accomplish source-to-destination delivery
OSI MODEL
• The network layer is responsible for the delivery of individual
packets from the source host to the destination host.
OSI MODEL
• The responsibilities of the network layer include the following
• Logical addressing
– adds a header to the packet coming from the upper layer that, among other
things, includes the logical addresses of the sender and receiver
• Routing
– When independent networks or links are connected to create internetworks
(network of networks) or a large network, the connecting devices (called
routers or switches) route or switch the packets to their final destination.
OSI MODEL
• TRANSPORT LAYER
• The transport layer is responsible for process-to-process delivery of the
entire message.
• A process is an application program running on a host.
• The network layer oversees source-to-destination delivery of individual
packets, it does not recognize any relationship between those packets.
• It treats each one independently, as though each piece belonged to a
separate message.
• The transport layer, ensures that the whole message arrives intact and in
order
• Both error control and flow control are supported.
OSI MODEL
• The transport layer is responsible for the delivery of a
message from one process to another
OSI MODEL
• The responsibilities of the transport layer include the following
• Service-point addressing
– a specific process (running program) on one computer to a specific process (running
program) on the other.
• Segmentation and reassembly
– Divide packet and reassemble by sequence number
• Connection control
– Connectionless & Connection Oriented
• Flow control
– Same as in DLL
• Error control
– Same as DLL
OSI MODEL
Reliable process-to-process delivery of a message
OSI MODEL
• SESSION LAYER
• The services provided by the first three layers (physical, data link, and
network) are not sufficient for some processes.
• The session layer is the network dialog controller.
• It
– establishes
– maintains
– synchronizes
• the interaction among communicating systems.
OSI MODEL
• The session layer is responsible for dialog control and
synchronization.
OSI MODEL
• The responsibilities of the session layer include the following
• Dialog control
• The session layer allows two systems to enter into a dialog. It allows the
communication between two processes to take place in either half duplex
(one way at a time) or full-duplex (two ways at a time) mode.
• Synchronization
• The session layer allows a process to add checkpoints, or synchronization
points, to a stream of data
OSI MODEL
PRESENATATION LAYER
• The presentation layer is concerned with the syntax and
semantics of the information exchanged between two
systems.
OSI MODEL
• The responsibilities of the presentation layer include the following
• TRANSLATION
• The processes (running programs) in two systems are usually exchanging
information in the form of character strings, numbers, and so on.
• The information must be changed to bit streams before being transmitted.
• The information is converted at the sender side from its sender dependent
format into a common format.
OSI MODEL
• The responsibilities of the presentation layer include the following
• ENCRYPTION
• To carry sensitive information, a system must be able to ensure
privacy.
• Encryption means that the sender transforms the original information to
another form and sends the resulting message out over the network.
• Decryption reverses the original process to transform the message back to
its original form.
OSI MODEL
• The responsibilities of the presentation layer include the
following
• COMPRESSION
• Data compression reduces the number of bits contained in
the information.
• Data compression becomes particularly important in the
transmission of multimedia such as text, audio, and video.
OSI MODEL
• APPLICATION LAYER
• The application layer enables the user, whether human or
software, to access the network.
• It provides user interfaces and support for services such as
electronic mail, remote file access and transfer, shared
database management, and other types of distributed
information services.
OSI MODEL
• The application layer is responsible for providing services to
the user.
OSI MODEL
• The responsibilities of the application layer include the
following
• Network Virtual Terminal (NVT)
• File transfer, access, and management
• Mail services
• Directory services
OSI MODEL
TCP/IP PROTOCOL SUITE
• The layers in the Transmission Control Protocol/Internet Protocol suite do not
exactly match those in the OSI model.
• The original TCP/IP protocol suite was defined as having four layers:
– Host-to-Network
– Internet
– Transport
– Application
• However, when TCP/IP is compared to OSI, the TCP/IP protocol suite is made of five
layers:
– Physical
– Data Link
– Network
– Transport
– Application
TCP/IP PROTOCOL SUITE
TCP/IP PROTOCOL SUITE
• PHYSICAL LAYER & DATA LINK LAYER
• At the physical and data link layers, TCPI/IP does not define
any specific protocol.
• It supports all the standard and proprietary protocols.
• A network in a TCP/IP internetwork can be a local-area
network or a wide-area network.
TCP/IP PROTOCOL SUITE
• NETWORK LAYER
• At the network layer, TCP/IP supports the Internetworking
Protocol.
• IP, in turn, uses four supporting protocols:
• ARP :- Address Resolution Protocol
• RARP :- Reverse Address Resolution Protocol
• ICMP :- Internet Control Message Protocol
• IGMP :- Internet Group Message Protocol
TCP/IP PROTOCOL SUITE
• TRANSPORT LAYER
• Traditionally the transport layer was represented in TCP/IP by two
protocols: TCP and UDP.
• IP is a host-to-host protocol, meaning that it can deliver a packet from one
physical device to another.
• UDP and TCP are transport level protocols responsible for delivery of a
message from a process (running program) to another process.
• A new transport layer protocol, SCTP, has been devised to meet the needs
of some newer applications.
TCP/IP PROTOCOL SUITE
• User Datagram Protocol (UDP)
– It is the simpler of the two standard TCPI/IP transport protocols.
– It is a process-to-process protocol that adds only
– port addresses
– checksum error control, and
– length information to the data from the upper layer.
TCP/IP PROTOCOL SUITE
• Transmission Control Protocol (TCP)
– It provides full transport-layer services to applications.
– TCP is a reliable stream transport protocol.
– It means connection-oriented
• Stream Control Transmission Protocol (SCTP)
– It provides support for newer applications such as voice over the
Internet.
– It combines the best features of UDP and TCP
TCP/IP PROTOCOL SUITE
• APPLICATION LAYER
• The application layer in TCPI/IP is equivalent to the combined session,
presentation, and application layers in the OSI model.
• Many protocols are defined at this layer.
• Simple Mail Transfer Protocol (SMTP)
– Used for sending e-mail between two devices
• File Transfer Protocol (FTP)
– Used for transferring files from one computer system to another
• Hypertext Transfer Protocol (HTTP)
– Provides a standard for web browser & allows user to exchange information.
TCP/IP PROTOCOL SUITE
• Domain Name System (DNS)
– Used to translate domain & host names to IP addresses.
• Simple Network Management Protocol (SNMP)
– Used for monitoring & mapping network availability, performance & error rates.
• Terminal Network (TELNET)
– Used for remote login
TCP/IP PROTOCOL SUITE
• NETWORK LAYER (INTERNET LAYER)
• Types of Addresses
• UNICAST ADDRESS : One to One communication
• MULTICAST ADDRESS : One to Many communication
• BROADCAST ADDRESS : Many to Many communication
TCP/IP PROTOCOL SUITE
• NETWORK LAYER (INTERNET LAYER)
• ARP – ADDRESS RESOLUTION PROTOCOL
• A computer has two kind of addresses Logical Address (IP)
and Physical Address (MAC).
• There must be a process of obtaining the physical address of a
computer based on its IP address for transmitting data.
• The process is called as address resolution.
TCP/IP PROTOCOL SUITE
• This is required because at the hardware level, computer identifies each
other based on the physical addresses hard-coded on their NIC.
• The do not know relationship between the IP address and Physical
Network.
• To solve the problem of obtaining the Physical address based on its IP
address, Address Resolution Protocol was developed.
• There are three methods to obtain Physical Address based on IP address.
– Table Lookup
– Closed Form Computation
– Message exchange
TCP/IP PROTOCOL SUITE
• RARP – REVERSE ADDRESS RESOLUTION PROTOCOL
• To obtain the IP address based on Physical address is called as
reverse address resolution and to obtain the same Reverse
Address Resolution Protocol is used.
• RARP is a protocol by which a physical machine in a local area
network can request to learn its IP address from
a gateway server's Address Resolution Protocol (ARP) table or
cache.
TCP/IP PROTOCOL SUITE
• A network administrator creates a table in a local area
network's gateway router that maps the physical machine
addresses to corresponding Internet Protocol addresses.
• When a new machine is set up, its RARP client program
requests from the RARP server on the router to be sent its IP
address.
• Assuming that an entry has been set up in the router table,
the RARP server will return the IP address to the machine
which can store it for future use.
TCP/IP PROTOCOL SUITE
• DYNAMIC HOST CONFIGURATION PROTOCOL (DHCP)
• DHCP was created by the Dynamic Host Configuration
• Working Group of the Internet Engineering Task Force(IETF)
• Runs over UDP
• Utilizing ports:
– 67 – connections to server
– 68 – connections to client
• DHCP is basically used for dynamic configuration
• Uses client–server model
TCP/IP PROTOCOL SUITE
• OBJECTIVES OF DHCP
• DHCP temporarily binds IP address & other configuration
parameters to DHCP client & provides framework for passing
configuration information to hosts
• DHCP was designed to provide computers with temporary address
• DHCP is well adapted to situation where hosts move from one
location to another or are routinely connected and disconnected
• Thus DHCP is mainly used to simplify the installation & maintenance
of networked computers.
DHCP Message Format
TCP/IP PROTOCOL SUITE
• NETWORK ADDRESS TRANSLATION (NAT)
• Mapping between a protocol address (IP) and a hardware
address (MAC) address resolution. (ARP)
• A technology that can provide the mapping between the
private and universal address and the same time supports
VPN is called as NAT.
TCP/IP PROTOCOL SUITE
• ADVANTAGES OF NAT
• It solves IP overlapping.
• It hides internal IP structure from external world.
• It allows to connect with any network without changing IP
address.
• It allows to connect multiple computers with internet through
the single public IP address.
TCP/IP PROTOCOL SUITE
• DISADVANTAGES OF NAT
• It adds additional delay in network.
• Several applications are not compatible with NAT.
• End to end IP traceability will not work with NAT.
• NAT hides actual end device.
TCP/IP PROTOCOL SUITE
• TRANSPORT LAYER
• SERVICES
• Process-to-Process delivery
• Error Control
• Flow Control
TCP/IP PROTOCOL SUITE
• TRANSPORT LAYER PROTOCOLS
• Simple Protocol
• Stop-and-Wait Protocol & Stop-and-Wait ARQ Protocol
• Go-back-N Protocol
• Selective Repeat Protocol
• Bidirectional Protocols (Piggybacking)
TCP/IP PROTOCOL SUITE
• TRANSPORT LAYER PROTOCOLS
• SIMPLE PROTOCOL
• Simplest Protocol is one that has no flow or error control and
it is a unidirectional protocol in which data frames are
traveling in only one direction-from the sender to receiver.
• We assume that the receiver can immediately handle any
frame it receives with a processing time that is small enough
to be negligible.
TCP/IP PROTOCOL SUITE
• SIMPLE PROTOCOL WORKING
• The data link layer at the sender site gets data from its
network layer, makes a frame out of the data, and sends it.
• The data link layer at the receiver site receives a frame from
its physical layer, extracts data from the frame, and delivers
the data to its network layer.
• The sender site cannot send a frame until its network layer
has a data packet to send. The receiver site cannot deliver a
data packet to its network layer until a frame arrives.
TCP/IP PROTOCOL SUITE
• TRANSPORT LAYER PROTOCOLS
• STOP-AND-WAIT PROTOCOL
• If data frames arrive at the receiver site faster than they can be processed,
the frames must be stored until their use. Normally, the receiver does not
have enough storage space, especially if it is receiving data from many
sources.
• This may result in either the discarding of frames or denial of service. To
prevent the receiver from becoming overwhelmed with frames, we
somehow need to tell the sender to slow down. There must be feedback
from the receiver to the sender.
TCP/IP PROTOCOL SUITE
• STOP-AND-WAIT PROTOCOL WORKING
• In Stop-and-Wait Protocol, the sender sends one frame, stops
until it receives confirmation from the receiver (okay to go
ahead), and then sends the next frame.
• We still have unidirectional communication for data frames,
but ACK frames travel from the other direction.
• Hence flow control is added to the Simplest protocol.
TCP/IP PROTOCOL SUITE
• STOP-AND-WAIT ARQ PROTOCOL
• Stop & Wait ARQ is a sliding window protocol for flow control
and it overcomes the limitations of Stop & Wait.
• It is the improved or modified version of Stop & Wait protocol.
• Stop & Wait ARQ assumes that the communication channel is
noisy.
• Stop & Wait ARQ also assumes that errors may occur in the
data while transmission.
TCP/IP PROTOCOL SUITE
• STOP-AND-WAIT ARQ PROTOCOL WORKING
• Working of Stop & Wait ARQ is almost like Stop & Wait
protocol, the only difference is that it includes some
additional components, which are:
• Time out timer
• Sequence numbers for data packets
• Sequence numbers for feedbacks
TCP/IP PROTOCOL SUITE
• GO-BACK-N PROTOCOL
• To improve the efficiency of transmission, multiple frames
must be in transition while waiting for acknowledgment.
• In Go-Back-N Automatic Repeat Request, we can send several
frames before receiving acknowledgments; we keep a copy of
these frames until the acknowledgments arrive.
TCP/IP PROTOCOL SUITE
• SEQUENCE NUMBERS
• Frames from a sending station are numbered sequentially. If
the header of the frame allows m bits for the sequence
number, the sequence numbers range from 0 to 2m- 1.
• For example, if m is 4, the only sequence numbers are 0
through 14 inclusive. However, we can repeat the sequence.
So the sequence numbers are
• 0,1,2, 3,4,5, 6,7,8, 9,10, 11, 12, 13, 14
TCP/IP PROTOCOL SUITE
• TIMERS
• Although there can be a timer for each frame that is sent, in
this protocol we use only one.
• The reason is that the timer for the first outstanding frame
always expires first; we send all outstanding frames when this
timer expires.
TCP/IP PROTOCOL SUITE
• ACKNOWLEDGMENT
• The receiver sends a positive acknowledgment if a frame has arrived safe
and sound and in order.
• If a frame is damaged or is received out of order, the receiver is silent and
will discard all subsequent frames until it receives the one it is expecting.
• The silence of the receiver causes the timer of the unacknowledged frame
at the sender site to expire.
• This, in turn, causes the sender to go back and resend all frames,
beginning with the one with the expired timer.
• The receiver does not have to acknowledge each frame received.
• It can send one cumulative acknowledgment for several frames.
TCP/IP PROTOCOL SUITE
• RESENDING A FRAME
• When the timer expires, the sender resends all outstanding
frames.
• For example, suppose the sender has already sent frame 6,
but the timer for frame 3 expires.
• This means that frame 3 has not been acknowledged; the
sender goes back and sends frames 3, 4, 5, and 6 again.
• That is why the protocol is called Go-Back-N ARQ.
TCP/IP PROTOCOL SUITE
• SELECTIVE REPEAT PROTOCOL
• Selective repeat protocol, also called Selective Repeat ARQ
(Automatic Repeat reQuest), is a data link layer protocol that
uses sliding window method for reliable delivery of data
frames.
• Here, only the erroneous or lost frames are retransmitted,
while the good frames are received and buffered.
TCP/IP PROTOCOL SUITE
• SELECTIVE REPEAT PROTOCOL
• Selective repeat protocol, also called Selective Repeat ARQ
(Automatic Repeat reQuest), is a data link layer protocol that
uses sliding window method for reliable delivery of data
frames.
• Here, only the erroneous or lost frames are retransmitted,
while the good frames are received and buffered.
TCP/IP PROTOCOL SUITE
• SELECTIVE REPEAT PROTOCOL
• It uses two windows of equal size: a sending window that
stores the frames to be sent and a receiving window that
stores the frames receive by the receiver.
• The size is half the maximum sequence number of the frame.
For example, if the sequence number is from 0 – 15, the
window size will be 8.
TCP/IP PROTOCOL SUITE
• SELECTIVE REPEAT PROTOCOL WORKING
• Selective Repeat protocol provides for sending multiple
frames depending upon the availability of frames in the
sending window, even if it does not receive acknowledgement
for any frame in the interim.
• The maximum number of frames that can be sent depends
upon the size of the sending window.
• The receiver records the sequence number of the earliest
incorrect or un-received frame.
TCP/IP PROTOCOL SUITE
• SELECTIVE REPEAT PROTOCOL WORKING
• It then fills the receiving window with the subsequent frames that it
has received.
• It sends the sequence number of the missing frame along with
every acknowledgement frame.
• The sender continues to send frames that are in its sending
window.
• Once, it has sent all the frames in the window, it retransmits the
frame whose sequence number is given by the acknowledgements.
• It then continues sending the other frames.
TCP/IP PROTOCOL SUITE
• BIDIRECTIONAL PROTOCOLS (PIGGYBACKING)
• In two-way communication, whenever a frame is received, the
receiver waits and does not send the control frame
(acknowledgement or ACK) back to the sender immediately.
• The receiver waits until its network layer passes in the next data
packet. The delayed acknowledgement is then attached to this
outgoing data frame.
• This technique of temporarily delaying the acknowledgement so
that it can be hooked with next outgoing data frame is known as
piggybacking.
TCP/IP PROTOCOL SUITE
• BIDIRECTIONAL PROTOCOLS (PIGGYBACKING) WORKING
• Whenever party A wants to send data to party B, it will carry
additional ACK information in the PUSH as well.
• For example, if A has received 5 bytes from B, which sequence
number starts from 12340 (through 12344), A will place "ACK
12345" as well in the current PUSH packet to inform B it has
received the bytes up to sequence number 12344 and expects to
see 12345 next time. (ACK number is the next sequence number of
the data to be PUSHed by the other party.)
TCP/IP PROTOCOL SUITE
• BIDIRECTIONAL PROTOCOLS (PIGGYBACKING) WORKING
• Three rules govern the piggybacking data transfer.
• If station X wants to send both data and an acknowledgment, it keeps
both fields there.
• If station X wants to send the acknowledgment, after a short period of
time to see whether a data frame needs to be sent, then decide whether
send an ACK frame alone or attach a data frame with it.
• If station X wants to send just the data, then the previous
acknowledgment field is sent along with the data.
• Station Y simply ignores this duplicate ACK frame upon receiving.
INTRODUCTION TO (IP)
INTERNET PROTOCOL
IPV4 IPV6
32-bit 128-bit
STATIC DYNAMIC
INTRODUCTION TO (IP)
• IP is an unique address assigned to each host by which it is
identified in a network.
• It is also called as LOGICAL ADDRESS.
• An IP is divided in two parts
IP = Network Identifier + Host Identifier
• NETWORK ID identifies the network on which a host
computer can be found.
• HOST ID identifies a specific device on the network indicated
by the network ID.
145.25.10.100
Network ID Host ID
INTRODUCTION TO (IP)
• IP address can be displayed in three typical formats.
BINARY NOTATION (BASE 2)
10000000 00001011 00000011 00011111
DECIMAL NOTATION (BASE 256)
128.11.3.31
HEXADECIMAL NOTATION (BASE 16)
80 0B 03 1F
INTRODUCTION TO (IP)
• CONVERSION OF IPV4 ADDRESS FROM BINARY NOTATION TO
DOTTED-DECIMAL NOTATION
10000001 00001011 00001011 11101111
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 1
0 0 0 0 1 0 1 1
0 0 0 0 1 0 1 1
1 1 1 0 1 1 1 1
128 + 64 + 32 + 8 + 4 + 2 + 1
128 + 1 = 129 8 + 2 + 1 = 11 8 + 2 + 1 = 11
= 239
129.11.11.239
INTRODUCTION TO (IP)
• CONVERSION OF IPV4 ADDRESS FROM DOTTED-DECIMAL
NOTATION TO BINARY NOTATION
129.11.11.239
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 1
0 0 0 0 1 0 1 1
0 0 0 0 1 0 1 1
1 1 1 0 1 1 1 1
11 - 8 = 3 11 - 8 = 3 239 - 128 = 111 15 – 8 = 7
129 - 128 = 1 7–4=3
3–2=1 3–2=1 111 – 64 = 47
1–1=0 3–2=1
1–1=0 1–1=0 47 – 32 = 15
1–1=0
ADDRESSING MECHANISM IN INTERNET
• Four levels of addresses are used in an internet employing the
TCP/IP protocols
ADDRESSING MECHANISM IN INTERNET
• Each address is related to a specific layer in the TCP/IP
architecture
ADDRESSING MECHANISM IN INTERNET
• 1. PHYSICAL ADDRESSES
– It is also known as the link address.
– It is the address of a node as defined by its LAN or WAN.
– It is included in the frame used by the data link layer.
– It is the lowest-level address.
In above Figure, a node with physical address 10 sends a frame to a node with
physical address 87. The two nodes are connected by a link (bus topology LAN).
The computer with physical address 10 is the sender, and the computer with
physical address 87 is the receiver.
ADDRESSING MECHANISM IN INTERNET
• 2. LOGICAL ADDRESSES
– They are necessary for universal communications that are
independent of underlying physical networks.
– A universal addressing system is needed in which each
host can be identified uniquely.
– It includes 32-bit (IPv4) and 128-bit (IPv6) address.
2 Routers connecting
3 LANs.
Each Device has pair
of addresses (physical
& logical).
Each router has 3
pairs of addresses.
ADDRESSING MECHANISM IN INTERNET
• 3. PORT ADDRESSES
– It is the label assigned to a process called a port address.
– A port address in TCP/IP is 16 bits in length.
– It is assigned to all node during communication.
2 computers
communicating.
Sending Computer is
running 3 process
with port address a,
b, c.
Receiving Computer
is running 2 process
with port address j,
k.
ADDRESSING MECHANISM IN INTERNET
• 4. SPECIFIC ADDRESSES
– Some applications have user-friendly addresses that are
designed for that specific address.
– It includes
• The e-mail address (abc@gmail.com)
• The Universal Resource Locator (URL)
(www.google.com)
IP ADDRESS CLASSES
• There are total 5 classes of IP address
• CLASS A
• CLASS B
• CLASS C
• CLASS D
• CLASS E
• Each class has its own range of IP and has dedicated subnet mask.
• The IP classes can be categorized into CLASSFULL and CLASSLESS
addresses.
IP ADDRESS CLASSES
• CLASSFULL ADDRESSING
• In this addressing scheme an IP address is divided into
Network ID and Host ID.
• It is predefined and structured form of addressing.
• CLASSLESS ADDRESSING
• In this addressing scheme it does not use any IP class.
• In this addressing scheme the whole addressing space is
divided into variable lengths of blocks.
ADDRESSING MECHANISM IN INTERNET
• CLASS A – (0.0.0.0 – 127.255.255.255)
0 Network ID Host ID
8 bits 24 bits
• Network ID = 8 bits and Host ID = 24 bits.
• First bit is 0, so class A has only 7 bits of Network ID.
• So there are 27 = 128 networks in the world for class A.
• Class A ranges from 0 to 127 but since first bit is 0 and last bit
127 (loopback address) is reserved so it has range from 1-
126.
• Subnet mask for class A is 255.0.0.0
ADDRESSING MECHANISM IN INTERNET
• CLASS B – (128.0.0.0 – 191.255.255.255)
10 Network ID Host ID
16 bits 16 bits
• Network ID = 16 bits and Host ID = 16 bits.
• First 2 bits are 10, so class B has only 14 bits of Network ID.
• So there are 214 = 16,384 networks in the world for class B.
• Class B ranges from 128-191.
• Subnet mask for class B is 255.255.0.0
ADDRESSING MECHANISM IN INTERNET
• CLASS C – (192.0.0.0 – 223.255.255.255)
110 Network ID Host ID
24 bits 8 bits
• Network ID = 24 bits and Host ID = 8 bits.
• First 3 bits are 110, so class C has only 21 bits of Network ID.
• So there are 221 = 2,097,152 networks in the world for class C.
• Class C ranges from 192-223.
• Subnet mask for class C is 255.255.255.0
ADDRESSING MECHANISM IN INTERNET
• CLASS D
1110 Multicast Address
• Class D is not divided into Network ID and Host ID.
• Class D is used for Multicast Address.
• Class D ranges from 224-239.
• Subnet mask for class D is 255.255.255.255
ADDRESSING MECHANISM IN INTERNET
• CLASS E
1111 Reserved for future use
• Class E is not divided into Network ID and Host ID.
• Class E is reserved for future use.
• Class E ranges from 240-255.
• Subnet mask for class E is 255.255.255.255
SUBNET AND SUPERNET
• SUBNET
• Dividing a large network into multiple small network is called
as subnetting.
• SUPERNET
• Aggregating multiple Internet addresses of the same class is
called as supernet.
• It is also known as Classless Inter-Domain Routing (CIDR).
SUBNET AND SUPERNET
IP ADD
NET ID HOST ID SUBNET CIDR VALUE
RANGE
CLASS A
8 bits 24 bits 1 – 126 255.0.0.0 /8
CLASS B
16 bits 16 bits 128 – 191 255.255.0.0 /16
CLASS C
16 bits 8 bits 192 – 223 255.255.255.0 /24
SUBNET AND SUPERNET
• Example 1 – IPV4 address 192.168.10.0/24
• IP Class C
• Network ID = 24 bits and Host ID = 8 bits
• CIDR Value = 24
• Subnet Mask = 255.255.255.0
• 1. Find number of networks.
• 2. Find number of IP address on each network.
• 3. Find number of host in each network.
SUBNET AND SUPERNET
• 1. Number of networks.
2n , Where n = total number of bits borrowed from host 20 = 1
• ONE network can be formed.
• 2. Number of IP address in each network.
2n , Where n = total number of host bits 28 = 256
• 256 IP addresses available for ONE network.
• 3. Number of hosts in each network.
2n - 2 , Where n = total number of remaining host bits 28 - 2 = 254
• 254 hosts can be assigned in ONE network.
In every network first IP address is reserved for Network ID and last IP address is
reserved for Broadcast ID
SUBNET AND SUPERNET
NETWORK 1 - 192.168.10.0/24
192.168.10.0 Reserved for Network ID
192.168.10.1
to IP address that can assigned to
host in network
192.168.10.254
192.168.10.255 Reserved for Broadcast ID
SUBNET MASK – 255.255.255.0
SUBNET AND SUPERNET
• Example 2 – IPV4 address 192.168.10.0/25
• IP Class C
• Network ID = 24 bits and Host ID = 8 bits
• CIDR Value = 24
• Subnet Mask = 255.255.255.128
• 1. Find number of networks.
• 2. Find number of IP address on each network.
• 3. Find number of host in each network.
SUBNET AND SUPERNET
• 1. Number of networks.
2n , Where n = total number of bits borrowed from host 21 = 2
• 2 networks can be formed.
• 2. Number of IP address in each network.
2n , Where n = total number of host bits 27 = 128
• 128 IP addresses available for 2 networks.
• 3. Number of hosts in each network.
2n - 2 , Where n = total number of remaining host bits 27 - 2 = 126
• 126 hosts can be assigned in 2 networks.
In every network first IP address is reserved for Network ID and last IP address is
reserved for Broadcast ID
NETWORK 1 - 192.168.10.0/25
192.168.10.0 Reserved for Network ID
192.168.10.1
IP address that can assigned to
to
host in network 1
192.168.10.126
192.168.10.127 Reserved for Broadcast ID
SUBNET MASK – 255.255.255.128
NETWORK 2 - 192.168.10.128/25
192.168.10.128 Reserved for Network ID
192.168.10.129
IP address that can assigned to
to
host in network 2
192.168.10.254
192.168.10.255 Reserved for Broadcast ID
SUBNET MASK – 255.255.255.128
SUBNET AND SUPERNET
• Examples to solve –
• IPV4 address 172.168.10.0/24
• IPV4 address 172.168.10.0/26
• 1. Find number of networks.
• 2. Find number of IP address on each network.
• 3. Find number of host in each network.
IPv4
• IPv4 is of length 32-bit.
• It is represented in dotted decimal format.
• Example : 172.168.3.1
• IPv4 is assigned statically (manually) or dynamically
(automatic)
HEADER FORMAT OF IPV4
Field Name Size Description
Version 4 bits Indicates version of Internet Protocol.
IHL 4 bits Internet Header Length provides the length of the IP header.
Type Of Service It provides certain quality-of-service (QoS) features for IP
8 bits
(TOS) datagram delivery
Total Length
16 bits It specifies the total length of the IP datagram, in bytes.
(TL)
This field contains a 16-bit value that is common to each of the
Identification 16 bits
fragments belonging to a particular message
Three control flags, two of which are used to manage
Flags 3 bits
fragmentation and one that is reserved.
When fragmentation of a message occurs, this field specifies
Fragment Offset 13 bits
the offset, or position, in the message .
Field Name Size Description
Time To Live Indicates the amount of time in seconds the datagram can
8 bits
(TTL) survive before being discarded.
Protocol 8 bits Indicates the type of protocol used.
Header A checksum is computed over the header to provide basic
16 bits
Checksum protection against corruption in transmission.
Source Address 32 bits This is the 32-bit IP address of the originator of the datagram.
Destination This is the 32-bit IP address of the intended recipient of the
32 bits
Address datagram.
One or more of several types of options may be included after
Option Variable
the standard headers in certain IP datagrams.
If one or more options are included, and the number of bits
Padding Variable used for them is not a multiple of 32, enough 0 bits are added
to pad out the header to a multiple of 32 bits (four bytes).
Data Variable This is the data that will be transmitted in the datagram.
IPv6
• IPv6 is of length 128-bit.
• It is represented in hexa decimal format.
• Example : FDEC:BBFF:0:FFFF
• IPv6 is assigned statically (manually) or dynamically
(automatic)
IPv6
• IPV6 ADDRESS
• IPv6 address space contains 2128 address which is
approximately equal to
340,282,366,920,938,463,374,607,431,768,211,456
• IPv6 can be classified into 3 categories
• 1. Unicast IPv6 address
• 2. Multicast IPv6 address
• 3. Anycast IPv6 address
IPv6 HEADER FORMAT
Field Name Size Description
Version 4 bits Indicates version of Internet Protocol.
These 8 bits are divided into two parts. The most significant 6 bits are
used for Type of Service to let the Router Known what services should
Traffic Class 8 bits
be provided to this packet. The least significant 2 bits are used for
Explicit Congestion Notification (ECN).
This label is used to maintain the sequential flow of the packets
Flow Label 20 bits
belonging to a communication.
This field is used to tell the routers how much information a particular
Payload Length 16 bits
packet contains in its payload.
This field is used to indicate either the type of Extension Header, or if
Next Header 8 bits the Extension Header is not present then it indicates the Upper Layer
PDU. The values for the type of Upper Layer PDU are same as IPv4’s.
Hop Limit 8 bits This field is used to stop packet to loop in the network infinitely.
Source Address 128 bits This is the 128-bit IP address of the originator of the datagram.
Destination
128 bits This is the 128-bit IP address of the intended recipient of the datagram.
Address
IPv4 IPv6
Source and Destination Address is of
Source and Destination Address is of 32-
128-bit in length.
bit in length.
It includes binary numbers represented It includes binary numbers represented
in decimals. in hexadecimals.
Header includes checksum. Header does not includes checksum.
Encryption and authentication is not Encryption and authentication is
provided. provided.
Header does not includes options rather
Header include options all optional data is moved to IPv6
extension headers.