Professional Documents
Culture Documents
OSI Model
OSI Model
It is highly reliable , as it uses 3 way handshake , flow control , error control and
congestion control.
It makes sure or guaranteed that data sent from source computer are received
accurately by the destination computer.
Some protocols used by TCP are : HTTP, HTTPS , FTP ,SMTP , Telnet , etc.
TRANSPORT LAYER
UDP (User datagram Protocol)
UDP is connection less protocol i.e. no connection is established between sender and
receiver before the transmission of data.
Connection less approach is said to be unreliable ; it doesn’t mean that data isn’t going
to get its destination; its only means that it isn’t guaranteed to get its destination.
UDP is used to transfer data at a faster rate.
It is less reliable and so used for transmitting data such as audio , video etc.
UDP neither guarantees the delivery of data nor does it retransmits the lost packets.
Some frequently used UDP protocols are : DNS , DHCP ,TFTP, SNMP ,VOIP, RIP etc.
TRANSPORT LAYER
UDP (User datagram Protocol)
In UDP, When multiple datagrams are sent to a destination, they may take different
paths and arrive in the wrong order.
UDP does not keep track of sequence numbers the way TCP does. UDP has no way to
reorder the datagrams into their transmission order.
Therefore, UDP simply reassembles the data in the order that it was received and
forwards it to the application.
If the sequence of the data is important to the application, the application will have to
identify the proper sequence of the data and determine how the data should be
processed.
TRANSPORT LAYER
.
Note:
The UDP PDU is referred
to as a datagram,
although the
terms segment and
datagram are sometimes
used interchangeably to
describe a Transport layer
PDU
TRANSPORT LAYER
Other differences are:
Both TCP and UDP can check errors , but only TCP can correct the error since it has both
congestion and flow control.
TCP does Flow Control whereas UDP does not have an option for Flow Control.
Conclusion
Both TCP and UDP have their advantages and disadvantages. UDP is faster, simpler and
efficient and hence generally used for sending audio, video files, and TCP, on the other hand,
is robust, reliable and guarantees the delivery of packets in the same order.
Hence, we conclude that both TCP and UDP are essential for data transmission.
Special Stuff :
Some Protocols that used both TCP & UDP are DNS, Syslog etc.
Some Protocols that neither use TCP nor UDP ,they have their own delivery mechanism
EIGRP (Enhances Interior Gateway Routing Protocol) ,OSPF (Open Shortest Path First)
etc.
Port No : port no. is the 16-bit no corresponding to different protocols either uses TCP or
UDP.
TRANSPORT LAYER
Flow Control
Network hosts have limited resources such as memory or bandwidth.
When transport layer is aware that these resources are overtaxed, some protocols can
request to sending application running at sender side reduce the rate of data flow.
Flow control can prevent the loss of segments on the network and avoid the need of
retransmission.
The transport layer implements two flow control methods.
1. Ready / Not Ready Signals Method
2. Windowing
Ready / Not Ready Signals Method
In this method sender sends data according to its buffer size, whereas receiver receives
data In its buffer size.
when receivers buffer get filled, it sends not ready signal to sender, so that sender can
stop transmitting more segments.
Receiver sends ready signal when it become ready to receive next segments.
This method has following two problems.
TRANSPORT LAYER
Problem with Ready/Not Ready Signal:
First, Receiver may respond to the sender with a NOT READY SIGNAL only
when its buffer fills up. While this message on its way to the sender, the sender
is still sending the segments to the receiver, which the receiver will have to
drop because its buffer space is full.
Windowing :
In windowing , a window size is defined between sender and receiver .
Sender host will wait for an acknowledgement signal after sending the segments equal
to the window size.
If any packet lost in the way ,receiver will respond with acknowledgement for lost packet
and sender will send lost packet again.
Note: window size is automatically set during the three step handshake process . It can
be adjust anytime throughout the lifetime of connection.
Note: Window size determines the number of bytes send before an acknowledgement is expected.
Also called a Sliding Windows.
TRANSPORT LAYER
Error Control:
Transport Layer ensures that the complete message arrives at the receiving transport layer
without any error. Error correction is done through retransmission.
Connection multiplexing:
Transport layer multiplexes connections that allow multiple applications to
simultaneously send and receive data.
Simply Connection multiplexing feature allows multiple applications to connect at a
time.
To make connection multiplexing possible, transport layer assigns a unique set of
numbers for each connection. These numbers are called port number or socket
numbers.
These port numbers allow multiple applications to send and receive data simultaneously.
NETWORK LAYER
Network Layer is also known as CISCO Layer.
Network layer is responsible for the source to destination OR HOST TO HOST or Machine to
Machine delivery of a packet across multiple networks i.e. if two systems are attached to
different networks with devices like routers, then network layer is used.
Basically, network layer is responsible for logically addressing the packet and the path
determination.
Addressing is done through routed protocols such as IP, IPX , AppleTalk, and DECnet.
Path Selection is done by routing protocols such as RIP, IGRP, EIGRP, OSPF ,and BGP.
The PDU of the network layer is Packet or Datagram.
Router and some special purpose Switches (Layer 3 Switches) operates on network layer.
Some protocols used by this layer are :
IPv4 , IPv6, ICMP ,IPsec (IP Security) ,IPX (Internetwork Packet Exchange), IGMP (Internet Group
Management Protocol) etc.
Primary jobs of network layer include:
Logical Addressing
Routing
Switching (Packet Switching, Circuit Switching, Message Switching)
Fragmentation
Error Handling
Note: Packet Switching is the responsibility of Network Layer, Circuit Switching is the
responsibility of Physical Layer.
NETWORK LAYER
Logical Addressing
Each node over the network must have a logical address in order to
communicate , using IPV4 OR IPV6.
These logically addresses can be assigned statically or dynamically via DHCP
server.
IP (Internet Protocol)
An IP Address, short for Internet Protocol provides an identity to a computer or
any other device that is connected to a network so that each computer or device
on network can communicate with other device.
e.g. 192.168.10.23 or 11000111 . 00110010 . 11111111. 10101010
Types of IP Address w.r.t Version:
1. IPV4 (Internet Protocol Version 4)
2. IPV6 (Internet Protocol Version 6)
NETWORK LAYER
IPv4 IPv6
• IPv4 is a 32 bit IP Address. • IPv6 is 128 bit IP Address.
• IPv4 is numeric address whose • IPv6 is an alphanumeric address
binary bits are separated by dot whose binary bits are separated by
(.) colon ( : )
• 4 octets (8 bit group) • In its full notation, an IPv6 address is
• IPv4 has five different classes of represented in eight groups of four
hexadecimal digits (eight 16-bit
IP Address.
blocks)
Class A, Class B, Class C, Class D, • IPv6 is classless address i.e. it does not
Class E
have any different classes as IPv4.
IPv4 has limited number of IP • IPv6 has unlimited number of IP
Addresses i.e. up to 4.19 billion. Addresses i.e. up to 2 128 IP Addresses.
E.g. is 192.168.12.14 • E.g.
2001:0db8:0a0b:12f0:0000:0000:0000
:0001
NETWORK LAYER
Routing
Routers appends Layer 4 (Transport Layer) data to Layer 3 (Network Layer) and
then send data down to Layer 2 i.e. Data Link Layer.
Network Layer Header contains IP Addressing information.
Routing information determines best path.
Error Handling
ICMP (Internet Control Message Protocol) is used to send Error Messages.
Utilized by PING & TRACEROUTE (tracert).
DATALINK LAYER
Data Link layer provides connections between hosts on same network i.e. it
provides a means for exchanging data over a common local media.
Simply , it is responsible for node to node or hop to hop communication.
The PDU of Data Link layer is Frame.
Communication devices operates on network layer are Network Bridges,
Switches etc.
Some specific responsibilities of data link layer include:
Framing
Addressing
Synchronization
Flow control (Different Algos such as Stop & Wait,GBN – Go back N etc.)
This flow control is between node to node (not host to host as done by Transport Layer flow control)
Error Control (Hop to Hop – CRC , Checksum , Parity bit or Hamming Code etc.)
Multi-Access or Access Control (CSMA/CD , ALOHA, Token Ring or Token Bus etc.)
Note: CRC Method is used by Data Link Layer; Checksum is used by Transport Layer.
DATALINK LAYER
Framing:
The data link layer takes the packets it gets from the network layer and encapsulates
them into frames for transmission, then it sends each frame bit-by-bit on the hardware.
At receiver’s end , data link layer picks up signals from hardware and assembles them
into frames.
Each frame contains a frame header, a payload field for holding the packet, and a frame
trailer. Trailer
Header Payload
CRC
Header contains the information such as Source Mac and Destination Mac.
Payload is the actual data or message.
Trailer contains some extra bits for Error detection and Error Correction.
Frame Trailer :
The frame trailer usually consists of a CRC(Cyclic Redundancy Check)/checksum value of the
whole frame, for error detection purposes. CRC/Checksums are basically mathematical
functions applied on the frame contents, to detect bit corruption due to different noise
sources on the link. While the sender adds a checksum to every frame, the receiver verifies
the checksum independently, before accepting a frame as valid.
The frame trailer may also optionally have an End-Of-Frame Detector Flag (EFD-Flag), for
the receiver to know the end of a particular frame.
DATALINK LAYER
Physical Addressing:
the Data Link layer adds a header to the frame in order to define physical
address i.e. MAC Address of the sender or receiver of the frame, if the frames
are to be distributed to different systems on the network
MAC Address:
MAC Address is a 48 bit or 12 digit hexadecimal number that is used for
communication between two hosts in an Ethernet environment, it is also
known as Hardware Address, because it is burned on Network Adapter or NIC.
Sometimes also known as Physical Address.
E.g. 00-21-6A-B0-AC-24
Synchronization:
When data frames are sent on the link, both machines must be synchronized in
order to transfer to take place.
DATALINK LAYER
Multi-Access:
When host on the shared link tries to transfer the data, it has a high probability
of collision.
Data-link layer provides mechanism such as CSMA/CD to equip capability of
accessing a shared media among multiple Systems.
Some protocols used by Data Link Layer are:
PPP (Point to Point Protocol)
SDLC (Synchronous Data Link Protocol)
HDLC (High - level Data Link Protocol)
ATM (Asynchronous Transfer Mode)
Frame Relay
Note:802.3 (Ethernet), 802.11 (Wi-Fi),
PHYSICAL LAYER
Physical Layer is the lowest layer and is concerned with wiring and electrical
standards.
Physical Layer deals with communication media.
This layer receive frames from data link layer and convert them into bits and
then loads these bits on actual communication media such as twisted pair,
coaxial, fiber optics or other wireless media like Radio waves, Microwaves etc.
The physical layer technologies are defined by organizations such as:
ISO (International Organization for Standardization)
IEEE (Institute of Electrical and Electronics Engineers)
ANSI (American National Standards Institute)
ITU (International Telecommunication) etc.
Devices Operates on Physical Layer are Hubs, Repeaters , Modem etc.
PHYSICAL LAYER
Following are a few physical responsibilities are
Representation of Bits
Bits must be encoded into transmission for transmission. It also defines the type of
encoding.
Data Rate
It also defines the rate of transmission in bits per second (bps)
Synchronization
Synchronization is done at bit level.
Interface
It defines the transmission interface between devices and transmission medium.
Line configuration
It defines whether transmission is point-to-point to multi-point.
Topologies
It ensures devices must be connected using topologies: star, bus, mesh, ring
Transmission mode
It defines the direction of transmission: simplex, half duplex or full duplex.
PHYSICAL LAYER
SUMMARY