DCC_Unit 4_Notes_Final
DCC_Unit 4_Notes_Final
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
• 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
• 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.
4
DCN(314318) MRS. S.S. KADAM
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
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.
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.
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
The data link layer is responsible for moving frames from one hop (node) to the next.
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
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.
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.
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
Devices
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.
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
Ethernet II header
28
* Note: The length of the address fields is determined by the corresponding address length fields
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
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
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:
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.
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.
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 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.
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.
29
DCN(314318) MRS. S.S. KADAM
If the address is given in decimal-dotted notation, the first byte defines the
class.
30
DCN(314318) MRS. S.S. KADAM
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
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
Example 3:
A company is granted the site address 181.56.0.0 (class B). The company needs 1000
subnets. Design the subnets.
Solution:
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
37
DCN(314318) MRS. S.S. KADAM
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