Module 4
Module 4
TRANSPORT LAYER
Process To Process Delivery
The transport layer is responsible for process-to process
delivery—the delivery of a packet, part of a message, from one
process to another.
Types of data deliveries
Addressing
Data Link layer – MAC address
Network Layer – IP Address
Transport layer – Port Number (16 bit)
Socket Address – Combination of IP and Port Number
Multiplexing and Demultiplexing
Connectionless Vs Connection oriented Service
Unreliable – It uses its own flow and error control mechanism. Fast
service.
Error Control
Three Protocols
User Datagram Protocol (UDP)
Connectionless, unreliable transport protocol.
UDP packets, called user datagram.
Source port number – port number used by the process running on
the source host.
Flow and error control – no flow and error control mechanisms. The receiver
may overflow with incoming messages. Sender does not know if a message has
been lost or duplicated.
Connection oriented
Reliable
1. Byte number - The bytes of data being transferred in each connection are
numbered by TCP.
Flow control
Error control
Congestion control
Segment – Packet in TCP
Control fields
A TCP Connection
Stream Control Transmission Protocol (SCTP)
SCTP is a message-oriented, reliable protocol that combines the best
features of UDP and TCP.
SCTP Services
1. Process to process communication
2. Multiple streams
3. Multihoming- connected to more than one physical address with
multiple IP address.
4. Full duplex communication
6. Reliable service
SCTP Features
Transmission Sequence number – Data unit in SCTP is data Chunk.
So it is numbered using TSN.
Flow control
Error control
Congestion control
Packet format
General header
2. Choke packet
3. Implicit Signaling – no communication between congested node and the
source.
2. Priority Queuing
3. Weighted fair Queuing
Traffic Shaping
1. Leaky Bucket
A leaky bucket shapes algorithm bursty traffic into fixed-rate traffic
by averaging the data rate. It may drop the packets if the bucket is
full.
2. Token Bucket
The token bucket allows bursty traffic at a regulated maximum rate.
3. Resource reservation – The QoS is improved if the resources(buffer,
bandwidth, CPU time etc) are reserved beforehand.
Logging
Local and remote log-in
26.58
Local log-in
A user types at a terminal, the keystroke are accepted by the terminal driver. It
passes the character to the OS. The OS interprets the combination of characters
and invokes the desired application program or utility.
Remote log-in
The user sends the keystrokes to the terminal driver, the local OS accepting the
character but not interpret them.
Characters are send to the TELNET client, which transforms the character to a
universal character called Network Virtual Terminal (NVT) and delivers to local
TCP/IP protocol stack.
The NVT travel through the internet and arrive at the TCP/IP stack at the remote
machine. Then it pass to the TELNET server, which change the character to the
corresponding characters understandable by the remote computer. Then travel this
in to pseudo terminal driver. The OS then passes the character to the appropriate
application program.
Concept of NVT (Network Virtual Terminal)
26.60
Some NVT control characters
ELECTRONIC MAIL
26.62
First scenario in electronic mail
26.63
When the sender and the receiver of an e-mail are on the same system,
we need only two user agents.
26.64
Second scenario in electronic mail
26.65
When the sender and the receiver of an e-mail are on
different systems, we need two UAs and a pair of
MTAs (client and server).
26.66
Third scenario in electronic mail
26.67
When the sender is connected to the mail server via a LAN or a WAN, we
need two UAs and two pairs of MTAs (client and server).
26.68
Fourth scenario in electronic mail
26.69
Push versus pull in electronic email
26.70
When both sender and receiver are connected to the mail server via a
LAN or a WAN, we need two UAs, two pairs of MTAs and a pair of
MAAs.
This is the most common situation today.
26.71
Services of user agent
26.72
User Agent types
1) Command driven – It normally accepts a one-character command from
the keyboard to perform its task. For e.g.: If user type r, at the command
prompt, to reply to the sender of the message, or type the character R to
reply to the sender and all recipients. Some examples of command-driven
user agents are mail, pine, and elm.
2) GUI based – They contain the Graphical User Interface components that
allow the user to interact with the software by using both the keyboard
and the mouse. Some examples of GUI-based user agents are Eudora,
Outlook, and Netscape.
Format of an e-mail
26.74
Addresses
Format of commands
commands
Responses
Mail transfer Phases
Connection establishment
Mail transfer
Connection termination
Message Access Agent: POP and IMAP
The first and second stages of mail delivery use SMTP. SMTP is a Push
protocol. The third stage needs a pull protocol. So it uses a message access
agent.
Post Office Protocol version 3 (POP 3)
Internet mail Access Protocol version 4 (IMAP4)
POP3
POP3 has two modes: The delete mode and keep mode.
The exchange of commands and responses in POP3
26.85
IMAP4-Internet Mail Access Protocol
POP3 is deficient in several ways:
1. It does not allow the user to organize her mail on the server.
2. It does not allow the user to partially check the contents of the mail
before downloading.
IMAP4 provides the following extra functions:
A user can check the email header prior to downloading.
A user can search the contents of the email for a specific string of
characters prior to downloading.
The well-known port 21 is used for the control connection and the
well-known port 20 for the data connection.
FTP
Using the control connection
Communication over data connection
Web page is stored in server. Each time client request arrives, the
corresponding document is sent to the client. To improve efficiency,
servers normally store requested files in a cache in memory.
The server includes the cookie in the response that it sends to the
client.
When the client receives the response, the browser stores the cookie
in the cookie directory.
WEB DOCUMENTS
The documents in the WWW can be grouped into three:-
1. Static documents - fixed document, client can only get the copy of document.
HTML is a language for creating web pages.
3. Active Documents – Program to be run at the client side. Technologies used are
Java Applets, Java Script etc.
Hypertext Transfer Protocol(HTTP)
It is a protocol mainly to access data on the WWW. HTTP functions as a
combination of FTP and SMTP.
HTTP uses the services of TCP on well-known port 80.
HTTP Transaction
Request and Response messages
Request and Status Lines
Request type
Status code
Header
1.General header
2.Request header
3.Entity header
4.Response header
Body
It contains the document to be sent or received.
Network Management System
Configuration management – Manage the network and entities.
❖ Capacity
❖ Traffic
❖ Throughput
❖ Response time
SNMP concept
Managers and Agents
A management station called a manager, is a host that runs the SNMP
client program
A managed station called an agent, is a router that runs the SNMP server
program.
SNMP defines the format of packets exchanged between a manager and an agent. It
reads and changes the status (values) of objects (variables) in SNMP packets.
SMI defines the general rules for naming objects, defining object types (including
range and length), and showing how to encode objects and values. SMI does not
define the number of objects an entity should manage or name the objects to be
managed or define the association between the objects and their values.
MIB creates a collection of named objects, their types, and their relationships to
each other in an entity to be managed.
NETWORK SECURITY
SECURITY SERVICES
Four of these services are related to the message exchanged using the
network. The fifth service provides entity authentication or identification.
Message Confidentiality
The transmitted message must make sense to only the intended receiver.
Message Integrity
Message integrity means that the data must arrive at the receiver exactly as they were
sent.
Message Authentication
In message authentication the receiver needs to be sure of the sender's identity and
that an imposter has not sent the message.
Message Nonrepudiation
It means that a sender must not be able to deny sending a message that he or she, in
fact, did send.
Entity Authentication
In entity authentication, the entity or user is verified prior to access to the system
resources
Message Confidentiality
Message Integrity
Document and Fingerprint
This digest is then mangled with the second 512-bit block to create the
second intermediate digest. The (n - l)th digest is mangled with the nth
block to create the nth digest.
If a block is not 512 bits, padding (Os) is added to make it so. When the
last block is processed, the resulting digest is the message digest for the
entire message.
Message Authentication
MDC - The digest created by a hash function is normally called a modification
detection code (MDC). The code can detect any modification in the message. An
MDC uses a keyless hash function
MAC - To provide message authentication, we need to change a modification
detection code to a message authentication code (MAC). MAC uses a keyed hash
function.
Digital signature
The differences between two types of signatures: conventional and
digital.
1) Inclusion
2) Verification method
3) Relationship
4) Duplicity
In digital signature, we use the private and public key of the sender.
Process- Signing the Digest
Services
Message Integrity
Message Authentication
Message Nonrepudiation
Entity Authentication
The entity whose identity needs to be proved is called the claimant; the party
that tries to prove the identity of the claimant is called the verifier.
In entity authentication, the claimant must identify herself to the verifier. This
can be done with one of three kinds of witnesses:
1. Something known. This is a secret known only by the claimant that can be
checked by the verifier. Examples are a password, a PIN number, a secret key,
and a private key.
2. Something possessed. This is something that can prove the claimant's identity.
Examples are a passport, a driver's license, an identification card, a credit card,
and a smart card.
3. Something inherent. This is an inherent characteristic of the claimant. Examples
are conventional signature, fingerprints, voice, facial characteristics, retinal
pattern, and handwriting.
Passwords - The simplest and the oldest method of entity authentication is the
password
Fixed Password - In this group, the password is fixed; the same password is
used over and over for every access. This approach is subject to several
attacks.
1. Eavesdropping
2. Stealing a password
3. Accessing a file
4. Guessing
XOR Cipher
Rotation cipher
Substitution cipher : S-box
Transposition Cipher : P-box (Permutation)
3. Modern round Ciphers
Data Encryption Standard (DES)
• Advanced Encryption Standard (AES)
AES
Structure of each round
Others Ciphers
IDEA – International Data Encryption Algorithm
Blowfish
CAST-128
RC5
It is a family of cipher with different block sizes, key sizes and number of
rounds.
Mode of Operation
Electronic Code Book (ECB)
Cipher Block Chaining (CBC)
Cipher Feedback (CFB)
Output Feedback (OFB)
ASYMMETRIC KEY CRYPTOGRAPHY
RSA (Rivest, Shamir and Adleman)
Selecting Keys
Diffie-Hellman
Two parties create a symmetric session key to exchange data without
having to remember or store the keys for future use.
Idea of Diffie-Hellman