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

DCC_Unit 4_Notes_Final

The document outlines the OSI model and TCP/IP layers, detailing the functions of each layer and the protocols associated with them. It emphasizes the importance of layered architecture in simplifying network design and communication. Additionally, it covers concepts such as data encapsulation, addressing, and the roles of various layers in data transmission.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

DCC_Unit 4_Notes_Final

The document outlines the OSI model and TCP/IP layers, detailing the functions of each layer and the protocols associated with them. It emphasizes the importance of layered architecture in simplifying network design and communication. Additionally, it covers concepts such as data encapsulation, addressing, and the roles of various layers in data transmission.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

DCN(314318) MRS. S.S.

KADAM

UNIT-4
Network Communication Models [18 Marks]
_____________________________________________________
Contents:
4.1 THE OSI MODEL: Layered Architecture, Encapsulation
4.2 Layers in OSI Model(Functions of each layer)-Physical Layer,Data-Link Layer,Network
Layer,Transport Layer,Session Layer,Presentation Layer,Application Layer
4.3 TCP/IP Layers and their functions: Host To Network Layer,Internet Layer,Transport
Layer,Application Layer
4.4 Protocols: Host To Network Layer-SLIP,PPP, Internet Layer-IP,ARP,RARP,ICMP, Transport
Layer-TCP and UDP, Application Layer-FTP,HTTP,SMTP,TELNET,BOOTP,DHCP
4.5 Addressing: Physical Address, Logical Address, Port Address
4.6 IP Address-Concept, Notation, Address Space
4.7 IPv4 Addressing: Classful and Classless Addressing ,subnet mask,supernetting,subnetting
4.8 IPV6 Addressing scheme and basic structure

Course Outcome:
Configure different TCP/IP services

References:
a. www.nptelvideos.in/2012/11/data-communication.html
b.http://www.myreadingroom.co.in/notes-and-studymaterial/68-den/750-analog-to-analog-conversion-
techniques.html
c. http://www.tutorial reports.com/wireless/wlanwifi/wifi_architecture.php
d. http://standards.ieee.org/about/get/802/802.11.html
e. www.tutorialspoint.com/data_communication_computer_network/
f. http://www.studytonight.com/computer-networks/overview-of-computer-networks

1
DCN(314318) MRS. S.S. KADAM

5.1 OSI Reference Model

Introduction– Layered Architecture


Communication Architecture
 Strategy for connecting host computers and other communicating equipment.
 Defines necessary elements for data communication between devices.
 A communication architecture, therefore, defines a standard for the communicating
hosts.
 A programmer formats data in a manner defined by the communication architecture
and passes it on to the communication software.
 Separating communication functions adds flexibility, for example, we do not need to
modify the entire host software to include more communication devices.
Why Layered Architecture?
 Layer architecture simplifies the network design.
 It is easy to debug network applications in a layered architecture network.
 The network management is easier due to the layered architecture.
 Network layers follow a set of rules, called protocol.
 The protocol defines the format of the data being exchanged, and the control and timing
for the handshake between layers.

Following Example shows need to have layered Architecture


• Assume Maria and Ann are neighbors with a lot of common ideas.
• However, Maria speaks only Spanish, and Ann speaks only English.
• Since both have learned the sign language in their childhood, they enjoy meeting in
a cafe a couple of days per week and exchange their ideas using signs.
• Occasionally, they also use a bilingual dictionary.
• Communication is face to face and Happens in one layer as shown in Figure.

• Now assume that Ann has to move to another town because of her job.
2
DCN(314318) MRS. S.S. KADAM

• Although both are sad, Maria opens a packet that contains two small machines.
• The first machine can scan and transform a letter in English to a secret code or
vice versa.
• The other machine can scan and translate a letter in Spanish to the same secret
code or vice versa.
• Ann takes the first machine; Maria keeps the second one.

• The two friends can still communicate using the secret code, as shown in Figure.
• ISO –OSI Open Systems Interconnection Model

• International standard organization (ISO) established a committee in 1977 to


develop an architecture for computer communication.
• Open Systems Interconnection (OSI) reference model is the result of this effort.
• In 1984, the Open Systems Interconnection (OSI) reference model was approved as
an international standard for communications architecture.
• Term “open” denotes the ability to connect any two systems which conform to the
reference model and associated standards.
• The OSI model is now considered the primary Architectural model for inter -
computer communications.
• The OSI model describes how information or data makes its way from application
programmes (such as spreadsheets) through a network medium (such as wire) to
another application programme located on another network.
• The OSI reference model divides the problem of moving information between
computers over a network medium into SEVEN smaller and more manageable
problems is known as layering.
3
DCN(314318) MRS. S.S. KADAM

• The OSI model is a theoretical blueprint that helps us understand how data gets
from one user’s computer to another.
• It is also a model that helps develop standards so that all of our hardware and
software talks nicely to each other.
• It aids standardization of networking technologies.
• It provides an organized structure for hardware and software developers to follow,
to insure their products are compatible with current and future technologies.

 ISO is the organization; OSI is the model.

Fig: 7 Layers of ISO-OSI Reference Model


OSI: A Layered Network Model
• The process of breaking up the functions or tasks of networking into layers reduces
complexity.
• The lower 4 layers (transport, network, data link and physical - Layers 4, 3, 2, and
1) are concerned with the flow of data from end to end through the network.
• The upper three layers of the OSI model (application, presentation and session-
Layers 7, 6 and 5) are orientated more toward services to the applications.
• The layers involved when a message is sent from device A to device B.
• As the message travels from A to B, it may pass through many intermediate nodes.
• These intermediate nodes involve only the first three layers of the OSI model.
• Each layer performs unique and specific task and it offers services to the layer
above it.
• For example, Layer 3 uses the services provided by layer 2 and provides
services for layer 4.

4
DCN(314318) MRS. S.S. KADAM

 Between machines, layer x on one machine communicates with layer x on another


machine.
 This communication is governed by an agreed-upon series of rules and conventions
called protocols

Important Concepts
• Protocol
It is a set of rules of formatting and interaction, used to permit machine to communicate across
a network.
• Interface: an interface defines the operations and services offered by lower layer to the upper
layer. This is an interface between each pair of adjacent layers as shown in the figure.
• Service:
A service is a statement of the set of capabilities of layer N that is provided to the layer N + 1.

Peer-to-Peer processes
• The processes on each machine that communicate at a given layer are called peer-
to-peer processes.
• At the physical layer, communication is direct: Device A sends a stream of bits to
device B (through intermediate nodes).
• At higher layers each layer in the sending machines adds its own information to the
message it receives from the layer just above it and passes the whole package to the
layer just below it.

5
DCN(314318) MRS. S.S. KADAM

Interfaces between Layers


• An interface defines the operations and services offered by lower layer to the upper
layer. This is an interface between each pair of adjacent layers.
• The passing of the data and network information down through the layers of the
sending device and receiving device is made possible by an interface between each
pair of adjacent layers.

Data Encapsulation
• The outgoing information will travel down through the layers to the lowest layer.
• While moving down on the source machine, it acquires all the control information
which is required to reach the destination machine.
• The control information is in the form of Headers and Trailer which surrounds the
data received from the layer above.
• This process of adding headers and trailers to the data is called as data
encapsulation.
• The information added by each layer is in the form of headers or trailers.
• At layer 1 the entire package is converted to a form that can be transferred to the
receiving machine.
• At the receiving machine, the message is unwrapped layer by layer, with each
process receiving and removing the data meant for it.
• For example, layer 2 removes the data meant for it, then passes the rest to layer 3.

6
DCN(314318) MRS. S.S. KADAM

• Layer 3 then removes the data meant for it and passes the rest to layer 4, and so on.
• The headers and trailers contain control information. The headers and trailers form
the envelope which carries the message to the desired destination.

Figure: Data Encapsulation


• D7 means the data unit at layer 7, D6 means the data unit at layer 6, and so on.
• The process starts at layer 7 (the application layer), then moves from layer to layer
in descending, sequential order.
• At each layer, a header, or possibly a trailer, can be added to the data unit.
• Commonly, the trailer is added only at layer 2.
• When the formatted data unit passes through the physical layer (layer 1), it is
changed into an electromagnetic signal and transported along a physical link.
Example of Data Encapsulation

The figure shows the example of five layer stack for data encapsulation.

7
DCN(314318) MRS. S.S. KADAM

 The fifth layer of sending machine wants to send a message M to the fifth layer of
destination machine.
 The message M is produced by layer 5 of machine 1 and given to layer 4 for transmission.
Layer 4 adds header H4 in front of the message and pass it to layer 3.
 Layer 3 breaks up the incoming message into small units as M1 and M2 and pass these
packets to layer 2.
 Layer 2 adds the header as well as footer to each packet obtained from layer 3 and pass
it to layer 1 for physical transmission.

Data Encapsulation in OSI Reference Model

Layers of the OSI Reference Model


1. Physical Layer
• It co-ordinates the functions required to transmit bit stream over physical medium.
• Provides physical interface for transmission of information.
• Defines rules by which bits are passed from one system to another on a physical
communication medium.
• Covers all - mechanical, electrical, functional and procedural - aspects for physical
communication.

8
DCN(314318) MRS. S.S. KADAM

The physical layer is responsible for the movement of individual bits from one hop
(node) to the next.

9
DCN(314318) MRS. S.S. KADAM

Functions of Physical Layer

• Physical characteristics of interfaces and medium.


• It also defines the type of transmission medium.
• How many pins the network connector has and what each pin is used for.
• Representation of bits. What electrical signals should be used to represent a 1 and a 0.
• Data rate: How many nanoseconds a bit lasts and bits per second.
• Synchronization of bits.
• Sender and Receiver must be synchronized
• Physical topology
• Mesh, Ring, Star, etc.
• Transmission mode. Whether transmission may proceed simultaneously in both
directions.
• Simplex, Half duplex, Duplex
2. Data Link Layer
• Data link layer attempts to provide reliable communication over the physical layer interface.
• Breaks the outgoing data into frames and re-assemble the received frames.
• Create and detect frame boundaries.
• Handle errors by implementing an acknowledgement and retransmission scheme.
• Implement flow control.

The data link layer is responsible for moving frames from one hop (node) to the next.

Functions of Data Link Layer


• Framing-
• Divides the stream of bits into manageable data units called frames.
• Physical addressing-
• Adds a header to the frame to define the sender and/or receiver of the frame.
• Flow control-
• Imposes a flow control mechanism to avoid overwhelming the receiver.
Synchronization between fast sender and slow receiver.
• Error control-
• Adds mechanisms to detect and retransmit damaged or lost frames (CRC).

10
DCN(314318) MRS. S.S. KADAM

• Access control-
• Determine which device has control over the link at any given time.
• Link establishment and termination:
• Establishes and terminates the logical link between two nodes.
• Frame sequencing:
• Transmits/receives frames sequentially.
• Frame acknowledgment:
• Provides/expects frame acknowledgments.
DLL is divided into two Sub-Layers
• LLC Sub Layer
• MAC Sub Layer

Logical Link Control Sub Layer


• It is upper portion of the Data Link layer.
• Performs Flow control and management of connection errors.
• LLC supports three types of connections:
1. Unacknowledged connectionless service:
• does not perform reliability checks or maintain a connection, very fast, most
commonly used
2. Connection oriented service:
• once the connection is established, blocks of data can be transferred between
nodes until one of the node terminates the connection.
3. Acknowledged connectionless service:
• provides a mechanism through which individual frames can be
acknowledged.
Media Access Control Sub Layer
• This sub layer contains methods to regulate the timing of data signals and
eliminate collisions.

11
DCN(314318) MRS. S.S. KADAM

• The MAC sub layer determines where one frame of data ends and the next one starts
- frame synchronization.
• There are four means of frame synchronization:
• Time based,
• Character counting,
• Byte stuffing and
• Bit stuffing.
3. Network Layer
• It is responsible for source to destination delivery of individual packets across
multiple networks.
• Defines the most optimum path the packet should take from the source to the
destination
• Defines logical addressing so that any endpoint can be identified.
• Handles congestion in the network.
• Facilitates interconnection between heterogeneous networks (Internetworking).
• The network layer also defines how to fragment a packet into smaller packets to
accommodate different media.

The network layer is responsible for the delivery of individual packets from the
source host to the destination host.

Functions of Network Layer


1. Logical addressing
2. Routing.
3. Congestion control
4. Accounting and billing
5. Address transformation
6. Source host to destination host error free delivery of packet.

12
DCN(314318) MRS. S.S. KADAM

4. Transport Layer
• Purpose of this layer is to provide a reliable mechanism for the exchange of data
between two processes in different computers.
• Ensures that the data units are delivered error free.
• Ensures that data units are delivered in sequence.
• Ensures that there is no loss or duplication of data units.
• Provides connectionless or connection oriented service.

The transport layer is responsible for the delivery of a message from one process to another.

Functions of Transport Layer


1. Service point addressing
2. Segmentation and reassembly
3. Connection control
4. Flow control: Flow control is performed end to end
5. Error control

5. Session Layer
• Session layer provides mechanism for controlling the dialogue between the two
end systems.
• It defines how to start, control and end conversations (called sessions) between
applications.
• This layer requests for a logical connection to be established on an end-user’s
request.
• Any necessary log-on or password validation is also handled by this layer.
Functions of Session Layer
• Dialog control
• Synchronization, session and sub session
13
DCN(314318) MRS. S.S. KADAM

• Session closure

6. Presentation Layer
• Presentation layer defines the format in which the data is to be exchanged between
the two communicating entities.
• Also handles data compression and data encryption (cryptography).
Functions of Presentation layer:
• Translation: presentation layer is responsible for converting various formats into
required format of the recipient.
• Encryption: Data encryption and decryption is done by presentation layer for
security.
• Compression and Decompression: data to be transform compressed while
sending and decompress while receiving for reducing time of transmission.

7. Application Layer
• Application layer interacts with application programs and is the highest level of OSI
model.
• Application layer contains management functions to support distributed
applications.
• Examples of application layer are applications such as
• File Transfer,
• Electronic Mail,
• Remote Login Etc.
Functions of Application layer:
1. Network virtual terminal
2. File transfer access and management
3. Mail services and directory services

14
DCN(314318) MRS. S.S. KADAM

Protocols in Each Layer


Application Layer HTTP, FTP, SMTP ,POP, DNS, Telnet, BOOTP
Transport Layer TCP,UDP
Network Layer IP,ARP,RARP,ICMP
Data Link Layer SLIP ,PPP

Devices

Repeater Physical Layer


Hub Physical Layer
Switch Data link Layer
Bridge Data Link Layer
Router Network Layer
Gateway All seven Layers

5.2 TCP/IP Reference Model :

Layered Architecture:
 The TCP/IP protocol suite was developed prior to the OSI model.
 Therefore, the layers in the TCP/IP 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, and application.

Fig: TCP/ IP Model

 When TCP/IP is compared to OSI,


 The host-to-network layer is equivalent to the combination of the physical and
data link layers.
15
DCN(314318) MRS. S.S. KADAM
 The internet layer is equivalent to the network layer, and the application layer
doing the job of the session, presentation, and application layers.

Network Access Layer

 Also called as Host-to-Network Layer.


 Performs all functions of physical Layer and Data Link Layer.
 Exchange of data between end system and network.
 Address of host and destination
 Prioritization of transmission.
 This deals with hardware level, connections as in other network model.
 TCP/IP Protocol Suite includes Host-to-Network Layer protocols such as-
 Serial Line Internet Protocol (SLIP) And Point to Point Protocol (PPP).

TCP/IP Internet Layer


 An Internet is an interconnection of two or more networks.
 Internet layer handles tasks similar to network access layer, but between networks
rather than between nodes on a network.
 Uses IP for addressing and routing across networks.
 Implemented in workstations and routers.
 This layer is concerned with the format of datagrams as defined in the internet
protocol(IP).
 The protocols in this layer include Address Resolution Protocol (ARP),
 Reverse Address Resolution Protocol (RARP) and
 Internet Control Message Protocol (ICMP).

TCP/IP Transport Layer


 This layer is concerned with the transmission of the data.
 The two main protocols that operate at this layer are Transmission Control Protocol
(TCP) and User Datagram Protocol (UDP).
 TCP is reliable transmission protocol and it guarantees that the proper data transfer
will take place.
 UDP is not designed to be reliable or guarantee data delivery.
 Also called host-to-host layer.

Functions of Transport Layer
1. Service point addressing: - Delivery is from specific process on computer to
specific process on another computer. For this transport layer uses port addresses.
2. Segmentation and reassemble: -Each segment of a message contains a sequence
number which is used to reassemble the message correctly.
3. Connection control:-Logical connection is created between source and destination
for the duration of complete message transfer.
4. Flow control:-Flow control is performed end to end.
16
DCN(314318) MRS. S.S. KADAM
5. Error control:-Error control is performed process to process. It ensures that entire
message arrives at receivers transport layer without error (damage or loss or
duplication). Error correction is done by retransmission.

TCP/IP Application Layer


 The application layer is concerned with providing network services to applications.
 There are many application network processes and protocols that work at this layer,
including
 Hyper Text Transfer Protocol (HTTP), Simple Mail Transport Protocol (SMTP) and
File Transfer Protocol (FTP).

TCP / IP Protocol Suite:


Host-to-Network-SLIP and PPP,
Internet Layer-ARP, RARP and IP:Introduction, IPv4, IPv6 ( Header Format), Difference between
IPv4 & IPv6.
Transport Layer- TCP and UDP ( Frame Format, port addresses),
Application Layer- FTP, SMTP, DNS.

Fig: TCP/ IP Protocol Suite

Host to Network Layer:


• Home users prefer direct communication of Internet
• Serial Communication is used.
• Communication between Client & ISP takes place using 2 Protocols.
1) Serial Line Internet Protocol(SLIP)- This Protocol used to connect a workstation to
the internet over a dial up line using modem.
--Connection Oriented Protocol
--Simple & widely used
--A Flag byte attached at the front & back of each packet sent.

--Does not have any error detection or correction facility.


--SLIP supports only IP.
-- It is necessary that both sides must know other’s IP address,in advance. It not
17
DCN(314318) MRS. S.S. KADAM
possibly assign dynamic IP address.
--Does not provide any authentication.
--It is not an approved internet standard
2) Point to Point Protocol(PPP)- Users are connected to the internet through a
telephone line or TV cable.
--Used for controlling & Managing the data transfer
--Services
a)Define fame format
b)Define how to link between 2 devices is to be established & How the data exchange
should take place.
c)Decides encapsulation of n/w layer data into data link frame.
d)Defines 2 device authentication.
--PPP was an improvement over SLIP

Internet Layer Protocols


 The Four Network Layer protocols are:
 ARP
 RARP
 IP
 ICMP

ARP-Address Resolution Protocol

 ARP takes the IP address of a host as input & gives its corresponding physical
address as the output.
 The Internet is based on IP addresses
 Data link protocols (Ethernet, FDDI, ATM) may have different (MAC)
addresses
 The ARP and RARP protocols perform the translation between IP addresses and
MAC layer addresses.

 ARP sends the IP broadcast message to all the computer on the network.
 The computer whose IP address matches the broadcast IP address sends a reply and
along with, its physical address to the broadcasting computer.
 All other computers ignore the broadcast message.

18
DCN(314318) MRS. S.S. KADAM
Address Translation with ARP
Example:
ARP request: Argon broadcasts an ARP request to all stations on the network: “What is
the hardware address of Router137?”

ARP Reply: Router137 responds with an ARP Reply which contains the hardware address

19
DCN(314318) MRS. S.S. KADAM

ARP Packet Format

Ethernet II header

Destination Source Type


address address 0x8060

ARP Request or ARP Reply Padding CRC

28

Hardware type (2 bytes) Protocol type (2 bytes)


Hardware address Protocol address
length (1 byte) length (1 byte) Operation code (2 bytes)

Source hardware address*

Source protocol address*

Target hardware address*

Target protocol address*

* Note: The length of the address fields is determined by the corresponding address length fields

2. Internet Protocol (IP)


 IP is internet Protocol.
 It is unreliable protocol because it does not provide any error control and flow
control.
 Packets in IP are called “Datagram”.

 Datagram is variable length packet with two parts –header and data

20
DCN(314318) MRS. S.S. KADAM

IP Header Format

Fields Of IP Header:
 Version (4 bits): current version is 4.
 Header length (4 bits): length of IP header, in multiples of 4 bytes
 DS/ECN field (1 byte): This field was previously called as Type-of-Service (TOS)
field.
 Differentiated Service (DS) (6 bits): Used to specify service level (currentlynot
supported in the Internet)
 Explicit Congestion Notification (ECN) (2 bits):New feedback mechanismused
by TCP.
 Identification (16 bits): Unique identification of a datagram from a host.
Incremented whenever a datagram is transmitted.

 Flags (3 bits):
 First bit always
set to 0
21
DCN(314318) MRS. S.S. KADAM

 DF bit (Do not


fragment)
 MF bit (More
fragments)
 Time To Live (TTL) (1 byte): Specifies longest paths before datagram is dropped.

Role of TTL field: Ensure that packet is eventually dropped when a routing
loop occurs.
Used as follows:
 Sender sets the value (e.g., 64)
 Each router decrements the value by 1
 When the value reaches 0, the datagram is dropped

 Protocol (1 byte): Specifies the higher-layer protocol.


 Header checksum (2 bytes):
A simple 16-bit long checksum which is computed for the header of the
datagram. The receiving host will discard the packet if it fails the checksum
calculation.
 Options: Security restrictions

 Record Route: each router that processes the packet adds its IP
address tothe header.
 Timestamp: each router that processes the packet adds its IP address
andtime to the header.
 Source Routing: specifies a list of routers that must be traversed.
 Padding: Padding bytes are added to ensure that header ends on a 4-byte boundary.
 Source and Destination Address: 32 bit IP address.
22
DCN(314318) MRS. S.S. KADAM

Functions of the IP
1. Addressing:
 In order to perform the job of delivering datagrams, IP must know where to
deliver them to. For this reason, IP includes a mechanism for host addressing.
2. Data Encapsulation and Formatting/ Packaging:
 IP accepts data from the transport layer protocols UDP and TCP.
3. It then encapsulates this data into an IP datagram using a special formatprior to
transmission.
4. Fragmentation and Reassembly:

 IP fragment IP datagrams into pieces.


 The receiving device uses the reassembly function to recreate the whole IP
datagram again.
5. Routing / Indirect Delivery:
 When an IP datagram must be sent to a destination on the same local
network, this is done using direct delivery.
 However, if the final destination is on a distant network not directly attached
to the source datagram must be delivered indirectly.
IPV6
 IP version 6 (IPv6) is an advanced version of IPv4.
 It takes all good features of IPv4 and adds new ones.
 Larger address space: IPv6 uses 128 bit(16 Bytes) Address.
 Better header format: This simplifies and speeds up the routing process.
 New options. IPv6 has new options to allow for additional functionalities.
 Allowance for extension: IPv6 is designed to allow the extension of the protocol if
required by new technologies or applications.
IPv6 major goals:
1. Support billions of hosts.
2. Reduce the size of the routing tables.
3. Simplify the protocol.
4. Provide better security (authentication and privacy).
5. More attention to the type of service
6. Aid multicasting by allowing scopes to be specified.
7. Make it possible for a host to roam without changing its address.
8. Allow the protocol to evolve in the future.
9. Permit the old and new protocols to coexist for years.
23
DCN(314318) MRS. S.S. KADAM

IPv6 Header Format

Header Fields:
 Version (4-bit): Defines the version number of the IP. For IPv6, the value is 6.
 Priority(4-bit): Defines the priority of the packet with respect to traffic congestion.
 Flow label (3-byte /24-bit): It is designed to provide special handling flow of data.
 Payload length(2-byte): Defines the length of the IP datagram excluding the base
header.
 Hop limit (8-bit): Serves the same purpose as the TTL field in IPv4.
 Next header (8-bit):
 Defines the header that follows the base header in the datagram.
 The next header is either one of the optional extension headers used by IP or
the header of an encapsulated packet such as UDP or TCP.
 Note that this field in version 4 is called the protocol.
 Source address.:
 The source address field is a 16-byte (128-bit)
 Internet address that identifies the original source of the datagram.
 Destination address.
 The destination address field is a 16-byte (128-bit)
 Internet address that usually identifies the final destination of the
datagram.
 However, if source routing is used, this field contains the address of the next
router.
IPv4 IPv6
1. Source and destination addresses are 1. Source and destination addresses are 128
32 bits (4 bytes) in length. bits(16 bytes)in length.
2. Uses broadcast addresses to send 2. There are no IPv6 broadcast addresses.
traffic to all nodes on a subnet. Instead, multicast scoped addresses are
used.
3. Fragmentation is supported at 3. Fragmentation is not supported at routers. It
Originating hosts and intermediate is only supported at the
routers.
24
DCN(314318) MRS. S.S. KADAM
4. IP header include a checksum. 4. IP header does not include a checksum.
5.IP header includes options. 5. All optional data is moved toIPv6
extension headers.
6.IPsec support is optional 6.IPsec support is required in a full IPv6
implementation.
7. No identification of payload for QoS 7. Payload identification for QoS handling By
Handling by routers is present within routers is included in theIPv6 header using
the IPv4 header. the Flow Label field.
8. Address must be configured either 8. Addresses can be automatically assigned
manually or through DHCP. using stateless address auto configuration,
assigned using DHCPv6, or manually
configured.
9. IP address represented in decimal 9. IP address is represented in hexadecimal
number system number system
10. “.” used as seperator 10. ‘ : ‘ used as separator .
11. Uses host address (A) resource 11. Uses host address (AAAA) resource
records in the domain name system to records in the domain name system to map
map host names to IPv4 addresses. host names to IPv6 addresses.

Transport Layer Protocols


 Transport Layer Works on top of Internet Layer.
 It is concerned with transport of packets from the source to destination.
 In TCP/IP the transport layer is represented by two Protocols:
 TCP
 UDP

1. Transmission Control Protocol (TCP)


 TCP is transmission control protocol.
 It Provides:
 Connection oriented service
 Reliable service
 Stream delivery service
 Sending and receiving buffers
 Bytes and segments
 Full duplex service

 TCP is a connection oriented protocol.


 Connection oriented means that a virtual connection is established before any
user data is transferred.
 If the connection cannot be established, the user program is notified.

25
DCN(314318) MRS. S.S. KADAM
 If the connection is ever interrupted, the user program finds out there is a problem.

 TCP is Reliable-
 Reliable means that every transmission of data is acknowledged by the receiver.
 Reliable does not mean that things don't go wrong, it means that we find out when
things go wrong.
 If the sender does not receive acknowledgement within a specified amount of time,
the sender retransmits the data.
 Stream delivery service:
 TCP is a stream oriented protocol.
 It allows the sending and receiving process to obtain as a stream of bytes.
 TCP creates a working environment in such a way that the sending and
receiving processes seem to be connected by an imaginary “tube” This is
called as stream delivery service.
 TCP : Flow Control
 Sending and receiving buffers:
 The sending and receiving process may not produce and receive data at
the same speed.
 Hence TCP needs buffers for storage.
 There are two types of buffers used in each direction:
1) Sending buffer
2) Receiving buffer
 Full duplex service:
 TCP offers full duplex service where the data can flow in both the direction
simultaneously.
 The TCP segments are sent both the directions.

 Process to process communication:


 The TCP uses port numbers as transport layer addresses.
 Also called as Port to Port communication.

TCP Header

26
DCN(314318) MRS. S.S. KADAM

2. UDP
 UDP is user datagram protocol.
 It is connectionless protocol because data is sent without establishing a connection
between sender and receiver before sending the data.
 UDP is unreliable because data is delivered without acknowledgement.
 UDP does not perform Auto retransmission.
 UDP does not use flow control .
 UDP has high transmission speed.

UDP Datagram Format

UDP Vs TCP
UDP TCP
Complexity UDP is less complex TCP is more complex
Connection UDP is connection less protocol TCP is connection oriented protocol
Reliability It provides unreliable delivery It provides reliable delivery of
of messages messages
Function By using this protocol one As a message makes its way across
program can send a load of the internet from one computer to
packets to another and that another. This is connection based.
would be the end of the
relationship.
layer they exist Transport layer Transport layer
Flow controlling UDP has no flow control TCP has flow control
Overhead Overhead is very low Overhead is low
Which is powerful UDP is less powerful TCP is more powerful.

27
DCN(314318) MRS. S.S. KADAM
5.3 Addressing mechanism in Internet IP Addressing-IP Address classes
 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.
 The Internet Assigned Numbers Authority (IANA) assigns network identifiers to
avoid duplications.

5.2 IP Addressing – IP Address classes, classless IP addressing, Subnetting,


supernetting, Masking.
 IPv4 addresses are unique.
 They are unique in the sense that each address defines one, and only one,
connection to the Internet.
 Two devices on the Internet can never have the same address at the same time.

Address Space:
 IPv4 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.

Notations
There are two prevalent notations to show an IPv4 address: Binary notation and Dotted
decimal notation.
 Binary Notation:
o In binary notation, the IPv4 address is displayed as 32 bits.
o Each octet is often referred to as a byte.
o So it is common to hear an IPv4 address referred to as a 32-bit address or a
4-byte address.
o The following is an example of an IPv4 address in binary notation:
01110101 10010101 00011101 00000010

 Dotted-Decimal Notation:
o To make the IPv4 address more compact and easier to read, Internet
addresses are usually written in decimal form with a decimal point (dot)
separating the bytes.
28
DCN(314318) MRS. S.S. KADAM
o Each byte is identified by a decimal number in the range [0..255].
o The following is the dotted decimal notation of the above address:
117.149.29.2
o Example:

Example: Change the following IPv4 addresses from binary notation to dotted-
decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Solution:
We replace each group of 8 bits with its equivalent decimal number and add dots for
separation.
a. 129.11.11.239
b. 193.131.27.255

IP Address classes
 IPv4 addressing, at its inception, used the concept of classes.
 This architecture is called classful addressing.
 In classful addressing, the address space is divided into five classes: A, B, C, D,
and E.
 Each class occupies some part of the address space.
 We can find the class of an address when given the address in binary notation or
dotted-decimal notation.
 If the address is given in binary notation, the first few bits can immediately tell
us the class of the address.

Fig: Finding the class in binary notation.

29
DCN(314318) MRS. S.S. KADAM

 If the address is given in decimal-dotted notation, the first byte defines the
class.

Fig: Finding the class in decimal notation


Example: Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
Solution:
a. The first bit is O. This is a class A address.
b. The first 2 bits are 1; the third bit is O. This is a class C address.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
Classes and Blocks
One problem with classful addressing is that each class is divided into a fixed
number of blocks with each block having a fixed size.

Fig: Number of blocks and block size in classful IPv4 addressing.


Class A:
• The high-order (First) bit in a class-A address is always set to zero.
• The next seven bits complete the network ID.
• The remaining 24 bits represent the host ID.
• This allows for 128 networks and 16,777,214 hosts per network.
• In this 7 bits are used for network field and 24 bits for host field.
• Class A IP address range includes 1.0.0.0 to 127.255.255.255

30
DCN(314318) MRS. S.S. KADAM

Note: Millions of class A addresses are wasted.

Class B:
• Class B addresses are assigned to medium-sized to large-sized networks.
• The two high-order bits in a class B address are always set to binary 1 0.
• The next 14 bits complete the network ID.
• The remaining 16 bits represent the host ID.
• This allows for 16,384 networks and 65,534 hosts per network.
• Class B IP address range includes 128.0.0.0 to 191.255.255.255

Class C:
• Class C addresses are used for small organizations with a small number of attached
hosts or routers.
• The three high-order bits in a class C address are always set to binary 1 1 0.
• The next 21 bits complete the network ID.
• The remaining 8 bits (last octet) represent the host ID.
• This allows for 2097152 networks and 256 hosts per network.
• Class C IP address range includes 192.0.0.0 to 223.255.255.255.

Class D:
• Class D addresses are reserved for IP multicast addresses.
• The four high-order bits in a class D address are always set to binary 1 1 1 0.
• The remaining bits recognize hosts.
• Class D IP address range includes 224.0.0.0 to 239.255.255.255

Class E:
• Class E is an experimental address that is reserved for future use.
• The high-order bits in a class E address are set to binary 1111.
• Class E IP address range includes 240.0.0.0 to 255.255.255.255

31
DCN(314318) MRS. S.S. KADAM

Netid and Hostid


 Note that the concept does not apply to classes D and E.
 In class A, one byte defines the netid and three bytes define the hostid.
 In class B, two bytes define the netid and two bytes define the hostid.
 In class C, three bytes define the netid and one byte defines the hostid.
 In classful addressing, an IP address in class A, B, or C is divided into netid and
hostid.
 These parts are of varying lengths, depending on the class of the address.

32
DCN(314318) MRS. S.S. KADAM

Mask
 Although the length of the netid and hostid (in bits) is predetermined in classful
addressing, we can also use a mask (also called the default mask/natural masks), a 32- bit
number made of contiguous 1’s followed by contiguous 0’s.
 The masks for classes A, B, and C are shown in Table.
 The concept does not apply to classes D and E.

 The mask can help us to find the netid and the hostid.
 For example, the mask for a class-A address has eight 1s, which means the first 8 bits of
any address in class A define the netid; the next 24 bits define the hostid.

Subnetting
 If an organization was granted a large block in class A or B, it could divide the addresses
into several contiguous groups and assign each group to smaller networks (called
subnets) or, in rare cases, share part of the addresses with neighbors.
 Subnetting increases the number of 1’s in the mask.
 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 unrealisticThe subnet mask follows two rules:
o If a binary bit is set to a 1 (or on) in a subnet mask, the corresponding bit in the
address identifies the network.
o If a binary bit is set to a 0 (or off) in a subnet mask, the corresponding bit in the
address identifies the host.

Finding The Subnet Address: We use binary notation for both the address and the maskand
then apply the AND operation to find the subnet address.
Example: What is the subnetwork address if the destination address is 200.45.34.56 andthe
subnet mask is 255.255.240.0?
Solution :
Step 1: Convert given IP and Subnet mask to BinaryStep 2:
Perform AND Operation on these two.
11001000 00101101 00100010 00111000 Binary 200.45.34.56
11111111 11111111 11110000 00000000 Subnet Mask 255.255.255.0
11001000 00101101 00100000 00000000
33
DCN(314318) MRS. S.S. KADAM

The subnetwork address is 200.45.32.0.


Step 3: Convert the result of AND operation to Dotted Decimal format which is Subnet
mask.
Example 2: (VIMP)
A company is granted the site address 201.70.64.0 (class C). The company needs six
subnets. Design the subnets.
Solution:

 The number of 1s in the default mask is 24 (class C).


 The company needs six subnets.
 This number 6 is not a power of 2.
 The next number that is a power of 2 is 8 (23).
 We need 3 more 1’s in the subnet mask.
 The total number of 1’s in the subnet mask is 27 (24 + 3).
 The total number of 0’s is 5 (32 - 27).
 The mask is
11111111 11111111 11111111 11100000
or
255.255.255.224
 The number of subnets is 8.
 The number of addresses in each subnet is 25 (5 is the number of 0s) or 32.
Subnet 1:
The bit combination is 001.
Taking last octet in binary:0 0 1 0 0 0 0 0 = 32 (10)
Hence the subnet address is, 201.70.64. 32
Subnet 2:
The bit combination is 01 0.
Taking last octet in binary:0 0 1 0 0 0 0 0 = 64(10)
Hence the subnet address is, 201.70.64. 64
Subnet 3:
The bit combination is 011.
Taking last octet in binary:0 1 1 0 0 0 0 0 = 96(10)
Hence the subnet address is, 201.70.64. 96
Subnet 4:
The bit combination is 100.
Taking last octet in binary :1 0 0 0 0 0 0 0 = 128(10)
Hence the subnet address is, 201.70.64. 128
Subnet 5:
The bit combination is 101.
Taking last octet in binary :1 0 1 0 0 0 0 0 = 160(10)
34
DCN(314318) MRS. S.S. KADAM

Hence the subnet address is, 201.70.64. 160


Subnet 6:
The bit combination is 110.
Taking last octet in binary :1 1 0 0 0 0 0 0 = 192 (10)
Hence the subnet address is, 201.70.64. 192

Example 3:
A company is granted the site address 181.56.0.0 (class B). The company needs 1000
subnets. Design the subnets.
Solution:

 The number of 1s in the default mask is 16 (class B).


 The company needs 1000 subnets.
 This number is not a power of 2.
 The next number that is a power of 2 is 1024 (210).
 We need 10 more 1’s in the subnet mask.
 The total number of 1’s in the subnet mask is 26 (16 + 10).
 The total number of 0’s is 6 (32 - 26).
 The mask is
11111111 11111111 11111111 11000000
or
255.255.255.192
 The number of subnets is 1024.
 The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.

35
DCN(314318) MRS. S.S. KADAM

Supernetting
 The most of the class A and class B addresses were exhausted; however, there was still a
huge demand for midsize blocks.
 The size of a class C block with a maximum number of 256 addresses did not satisfy the
needs of most organizations.
 One solution was supernetting.
 In supernetting, an organization can combine several class C blocks to create a larger
range of addresses.
 In other words, several networks are combined to create a supernetwork or a supernet.
 An organization can apply for a set of class C blocks instead of just one.
 For example, an organization that needs 1000 addresses can be granted four contiguous
class C blocks.
 The organization can then use these addresses to create one supernetwork.
 Supernetting decreases the number of 1’s in the mask.
 For example,
o if an organization is given four class C addresses, the mask changes from 24 to 22.
Example:

 We need to make a supernetwork out of 16 class C blocks. What is the supernet mask?
Solution:

 We need 16 blocks.
 For 16 blocks we need to change four 1s to 0s in the default mask. So the mask is
11111111 11111111 11110000 00000000
Or
255.255.240.0
Address Depletion
 The flaws in classful addressing scheme combined with the fast growth of the
Internet lead to the near depletion of the available addresses.
 Yet the number of devices on the Internet is much less than the 232 address
space.
 We have run out of class A and B addresses, and a class C block is too small for
most midsize organizations.
 One solution that has alleviated the problem is the idea of classless addressing.

Classless Addressing
 To overcome address depletion and give more organizations access to the
Internet, classless addressing was designed and implemented.
 In this scheme, there are no classes, but the addresses are still granted in blocks.

36
DCN(314318) MRS. S.S. KADAM

Address Blocks

 In classless addressing, when an entity, small or large, needs to be connected to


the Internet, it is granted a block (range) of addresses.
 The size of the block (the number of addresses) varies based on the nature and
size of the entity.
 For example, a household may be given only two addresses; a large organization
may be given thousands of addresses.
 An ISP, as the Internet service provider, may be given thousands of addresses
based on the number of customers it may serve.
Restriction: To simplify the handling of addresses, the Internet authorities imposethree
restrictions on classless address blocks:
1. The addresses in a block must be contiguous, one after another.
2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8, ...).
3. The first address must be evenly divisible by the number of addresses.
Example:
A company needs 600 addresses. Which of the following set of class C blocks can be used to form
a supernet for this company?
1. 198.47.32.0 198.47.33.0 198.47.34.0
2. 198.47.32.0 198.47.42.0 198.47.52.0 198.47.62.0
3. 198.47.31.0 198.47.32.0 198.47.33.0 198.47.52.0
4. 198.47.32.0 198.47.33.0 198.47.34.0 198.47.35.0
Solution:
1: No, there are only three blocks.
2: No, the blocks are not contiguous.
3: No, 31 in the first block is not divisible by 4.4:
Yes, all three requirements are fulfilled.

5.5 OSI and TCP / IP Network Model.


OSI reference model TCP/IP network model
1)It has 7 layers 1)It has 4 layers
2)Transport layer guarantees delivery of 2)Transport layer does not guarantees
packets delivery of packets
3)Horizontal approach 3)Vertical approach
4)Separate presentation layer 4)No session layer, characteristics are
provided by transport layer
5)Separate session layer 5)No presentation layer, characteristics are
provided by application layer

37
DCN(314318) MRS. S.S. KADAM

6)Network layer provides both 6)Network layer provides only


connectionless and connection connection less services
oriented services
7)It defines the services, interfaces and 7)It does not clearly distinguishes between
protocols very clearly and makes a clear service interface and protocols
distinction between them
8)The protocol are better hidden and can 8)It is not easy to replace the protocols
be easily replaced as the technology
changes

9)OSI truly is a general model 9)TCP/IP cannot be used for any other
application
10)It has a problem of protocol 10) The model does not fit any protocol
filtering into a model stack.

38

You might also like