Unit 6 NAHI aa rha hai na ki koi baat nhi hai

swapnilyadav3165 15 views 46 slides Mar 08, 2025
Slide 1
Slide 1 of 46
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46

About This Presentation

Ch dh vn ka hi hai na ki koi baat nahi hai na ki koi baat nahi hai


Slide Content

Ch-6 Transport and Application Layer Prof. Ashwini Satkar

Contents 6.1. Process-to-Process Delivery, Multiplexing and De-multiplexing 6.2. User Datagram Protocol (UDP) - Datagram Format, Checksum, UDP operations, Use of UDP 6.3. Transmission Control Protocol (TCP) - TCP Services – Process to-Process Communication, Stream Delivery Service, Sending and Receiving Buffers, Segments, Full – Duplex Communication, Connection oriented service, Reliable service 6.4. TCP Features – Numbering System, Byte Number, Sequence Number, Acknowledgement Number, Flow Control, Error Control, Congestion Control 6.5 TCP Segment Format 6.6 TCP Vs UDP 6.7 Domain Name System (DNS) - Distribution of Name Space, DNS in the Internet 6.8 E-MAIL - Architecture, User Agent, Message Transfer Agent - SMTP, Web Based Mail 6.9 WWW – Architecture 6.9 HTTP - HTTP Transaction

Process to Process Delivery in Transport Layer

Types of Services The data link layer is responsible for delivery of frames between two neighboring nodes over a link. This is called node-to-node delivery. The network layer is responsible for delivery of datagrams between two hosts. This is called host-to-host delivery . Real communication takes place between two processes (application programs). We need process-to-process delivery. The transport layer is responsible for process-to-process delivery- delivery of a packet, part of a message, from one process to another. 

Multiplexing & Demultiplexing Multiplexing is the process of collecting the data from multiple application processes of the sender, enveloping that data with headers and sending them as a whole to the intended receiver. In Multiplexing at the Transport Layer, the data is collected from various application processes. These segments contain the source port number , destination port number, header files, and data . These segments are passed to the Network Layer which adds the source and destination IP address to get the datagram. Demultiplexing Delivering the received segments at the receiver side to the correct app layer processes is called demultiplexing . The destination host receives the IP datagrams , each datagram has a source IP address and a destination IP address . Each datagram carries 1 transport layer segment . Each segment has the source and destination port number . The destination host uses the IP addresses and port numbers to direct the segment to the appropriate socket.

Multiplexing & Demultiplexing

User Datagram Protocol (UDP) User Datagram Protocol (UDP)  is a Transport Layer protocol. UDP is a part of the Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an  unreliable and connectionless protocol.  So, there is no need to establish a connection before data transfer. UDP is connectionless and does not guarantee delivery , order , or error checking , making it a lightweight and efficient option for certain types of data transmission. The UDP enables process-to-process communication used across the internet for time-sensitive transmissions such as video playback. 

UDP Header

UDP Header UDP header is an  8-byte  fixed and simple header, while for TCP it may vary from 20 bytes to 60 bytes . The first 8 Bytes contain all necessary header information and the remaining part consists of data. UDP port number fields are each 16 bits long, therefore the range for port numbers is defined from 0 to 65535. Port number 0 is reserved . Port numbers help to distinguish different user requests or processes.  Source Port:  Source Port is a 2 Byte long field used to identify port number of the source. Destination Port:  It is a 2 Byte long field, used to identify the port of the destined packet. Length:  Length is the length of UDP including the header and the data. It is a 16-bits field. Checksum:  Checksum is 2 Bytes long field. The Checksum calculation is not mandatory in UDP. No Error control or flow control is provided by UDP.

Applications of UDP Used for simple request-response communication when the size of data is less and hence there is lesser concern about flow and error control. It is a suitable protocol for multicasting as UDP supports packet switching. VoIP (Voice over Internet Protocol) services, such as Skype and WhatsApp , use UDP for real-time voice communication . The delay in voice communication can be noticeable if packets are delayed due to congestion control, so UDP is used to ensure fast and efficient data transmission.

Transmission Control Protocol (TCP) Connection-oriented protocol for communications  that helps in the exchange of messages between different devices over a network.  Provides reliable delivery services.  Efficient data transmission over the internet .  

Features of TCP/IP Segment Numbering System TCP  keeps track of the segments being transmitted or received by assigning numbers to each and every single one of them . A specific Byte Number is assigned to data bytes that are to be transferred while segments are assigned  sequence numbers . Acknowledgment Numbers are assigned to received segments . Connection Oriented  It  means sender and receiver are connected to each other till the completion of the process . The order of the data is maintained i.e. order remains same before and after transmission. Full Duplex In  TCP data can be transmitted from receiver to the sender or vice – versa at the same time . It increases efficiency of data flow between sender and receiver. 

Features of TCP/IP Flow Control Flow control limits the rate at which a sender transfers data. This is done to ensure reliable delivery. The receiver continually hints to the sender on how much data can be received (using a sliding window). Error Control TCP implements an error control mechanism for reliable data transfer. Error control is byte-oriented. Segments are checked for error detection. Error Control includes – Corrupted Segment & Lost Segment Management, Out-of-order segments, Duplicate segments, etc. Congestion Control TCP takes into account the level of congestion in the network. Congestion level is determined by the amount of data sent by a sender.

TCP Services Process-to-Process Communication –   TCP provides a process to process communication, i.e , the transfer of data that takes place between individual processes executing on end systems. Stream oriented –   This means that the data is sent and received as a stream of bytes , TCP groups a number of bytes together into a  segment  and adds a header to each of these segments and then delivers these segments to the network layer. Full-duplex service –   This means that the communication can take place in both directions at the same time.  Connection-oriented service –   Unlike UDP, TCP provides a connection-oriented service. It defines 3 different phases:  Connection establishment, Data transfer, Connection termination. Reliability –   TCP is reliable as it uses checksum for error detection, attempts to recover lost or corrupted packets by re-transmission, acknowledgement policy and timers. It uses features like byte number and sequence number and acknowledgement number so as to ensure reliability. Also, it uses congestion control mechanisms.   Multiplexing –   TCP does multiplexing and de-multiplexing at the sender and receiver ends respectively as a number of logical connections can be established between port numbers over a physical connection. 

TCP Segment structure A TCP segment consists of data bytes to be sent and a header that is added to the data by TCP as shown: 

TCP Segment structure The header of a TCP segment can range from 20-60 bytes . 40 bytes are for options . If there are no options, a header is 20 bytes else it can be of upmost 60 bytes.  Header fields:   Source Port Address –   A 16-bit field that holds the port address of the application that is sending the data segment.    Destination Port Address –   A 16-bit field that holds the port address of the application in the host that is receiving the data segment.    Sequence Number –   A 32-bit field that holds the sequence number, i.e , the byte number of the first byte that is sent in that particular segment. It is used to reassemble the message at the receiving end of the segments that are received out of order.

TCP Segment structure Acknowledgement Number A 32-bit field that holds the acknowledgement number, i.e , the byte number that the receiver expects to receive next. It is an acknowledgement for the previous bytes being received successfully.  Header Length (HLEN) This is a 4-bit field that indicates the length of the TCP header by a number of 4-byte words in the header, i.e if the header is 20 bytes(min length of TCP header), then this field will hold 5 (because 5 x 4 = 20) and the maximum length: 60 bytes, then it’ll hold the value 15(because 15 x 4 = 60). Hence, the value of this field is always between 5 and 15.   Control flags These are 6 1-bit control bits that control connection establishment, connection termination, connection abortion, flow control, mode of transfer etc. Their function is:  URG: Urgent pointer is valid ACK: Acknowledgement number is valid( used in case of cumulative acknowledgement) PSH: Request for push RST: Reset the connection SYN: Synchronize sequence numbers FIN: Terminate the connection

TCP Segment structure Window size –   This field tells the window size of the sending TCP in bytes.    Checksum –   This field holds the checksum for error control. It is mandatory in TCP as opposed to UDP.    Urgent pointer –   This field (valid only if the URG control flag is set) is used to point to data that is urgently required that needs to reach the receiving process at the earliest. The value of this field is added to the sequence number to get the byte number of the last urgent byte.   

TCP Vs UDP Basis Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Type of Service TCP is a connection-oriented protocol. Connection orientation means that the communicating devices should establish a connection before transmitting data and should close the connection after transmitting the data. UDP is the Datagram-oriented protocol. This is because there is no overhead for opening a connection, maintaining a connection, or terminating a connection. Reliability TCP is reliable as it guarantees the delivery of data. The delivery of data to the destination cannot be guaranteed. Error checking mechanism TCP provides extensive error-checking mechanisms . It is because it provides flow control and acknowledgment of data. UDP has only the basic error-checking mechanism using  checksum

TCP Vs UDP Basis Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Acknowledgment An acknowledgment segment is present. No acknowledgment segment. Sequence Sequencing of data is a feature of TCP. There is no sequencing of data in UDP. Speed TCP is comparatively slower than UDP. UDP is faster, simpler, and more efficient than TCP. Retransmission Retransmission of lost packets is possible in TCP, but not in UDP. There is no retransmission of lost packets in the User Datagram Protocol (UDP). Header Length TCP has a (20-60) bytes variable length header. UDP has an 8 bytes fixed-length header. Weight TCP is heavy-weight. UDP is lightweight. Broadcasting TCP doesn’t support Broadcasting. UDP supports Broadcasting.

Domain Name System (DNS) It helps you find websites by translating easy-to-remember names (like www.example.com) into the numerical IP addresses (like 192.0.2.1) that computers use to locate each other on the internet. Without DNS, we have to remember long strings of numbers to visit our favorite websites. Domain Name System (DNS) is a hostname used for  IP address  translation services. DNS is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers. It is required for the functioning of the Internet . DNS is used to convert the domain name of the websites to their numerical IP address.

Types of Domain Generic Domains   .com(commercial), . edu (educational), .mil(military), .org(nonprofit organization), .net (similar to commercial) all these are generic domains. Country Domain   .in (India) .us . uk Inverse Domain   if we want to know what is the domain name of the website. IP to domain name mapping. So DNS can provide both the mapping for example to find the IP addresses of a particular website then we have to type nslookup website name

DNS

DNS DNS Record:  Domain name, IP address what is the validity? what is the time to live? and all the information related to that domain name. These records are stored in a tree-like structure. Namespace:  Set of possible names, flat or hierarchical. The naming system maintains a collection of bindings of names to values – given a name, a resolution mechanism returns the corresponding value. Name Server:  It is an implementation of the resolution mechanism.

Electronic Mail Electronic mail, commonly known as email, is a method of exchanging messages over the internet. Here are the basics of email: An email address : This is a unique identifier for each user, typically in the format of [email protected]. An email client : This is a software program used to send, receive and manage emails, such as Gmail, Outlook, or Apple Mail. An email server : This is a computer system responsible for storing and forwarding emails to their intended recipients. To send an email: Compose a new message in your email client. Enter the recipient’s email address in the “To” field. Add a subject line to summarize the content of the message. Write the body of the message. Attach any relevant files if needed. Click “Send” to deliver the message to the recipient’s email server. Emails can also include features such as cc (carbon copy) and bcc (blind carbon copy) to send copies of the message to multiple recipients, and reply, reply all, and forward options to manage the conversation.

Electronic Mail Electronic Mail  (e-mail) is one of most widely used services of  Internet. This service allows an Internet user to send a  message in formatted manner (mail)  to the other Internet user in any part of world. Message in mail not only contain text, but it also contains images, audio and videos data. The person who is sending mail is called  sender  and person who receives mail is called  recipient . It is just like postal mail service.  Components of E-Mail System :  The basic components of an email system are : User Agent (UA), Message Transfer Agent (MTA), Mail Box , and Spool file .

Electronic Mail User Agent (UA) :   The UA is normally a program which is used to send and receive mail. Sometimes, it is called as mail reader . It accepts variety of commands for composing, receiving and replying to messages as well as for manipulation of the mailboxes. Message Transfer Agent (MTA) :   MTA is actually responsible for transfer of mail from one system to another. To send a mail, a system must have client MTA and system MTA . It transfer mail to mailboxes of recipients if they are connected in the same machine. It delivers mail to peer MTA if destination mailbox is in another machine. The delivery from one MTA to another MTA is done by SMTP. Mailbox :   It is a file on local hard drive to collect mails. Delivered mails are present in this file. The user can read it delete it according to his/her requirement. To use e-mail system each user must have a mailbox . Access to mailbox is only to owner of mailbox.

Electronic Mail

Electronic Mail Spool file :   This file contains mails that are to be sent. User agent appends outgoing mails in this file using SMTP. MTA extracts pending mail from spool file for their delivery. E-mail allows one name, an  alias , to represent several different e-mail addresses. It is known as  mailing list . Whenever user have to sent a message, system checks recipient’s name against alias database . If mailing list is present for defined alias, separate messages, one for each entry in the list, must be prepared and handed to MTA. If for defined alias, there is no such mailing list is present, name itself becomes naming address and a single message is delivered to mail transfer entity.

Services provided by E-mail system Composition –  The composition refer to process that creates messages and answers. For composition any kind of text editor can be used. Transfer –  Transfer means sending procedure of mail i.e. from the sender to recipient. Reporting –  Reporting refers to confirmation for delivery of mail. It help user to check whether their mail is delivered, lost or rejected. Displaying –  It refers to present mail in form that is understand by the user. Disposition –  This step concern with recipient that what will recipient do after receiving mail i.e save mail, delete before reading or delete after reading.

Electronic Mail Advantages of email: Convenient and fast communication with individuals or groups globally. Easy to store and search for past messages. Ability to send and receive attachments such as documents, images, and videos. Cost-effective compared to traditional mail and fax. Available 24/7. Disadvantages of email: Risk of spam and phishing attacks. Overwhelming amount of emails can lead to information overload. Can lead to decreased face-to-face communication and loss of personal touch. Potential for miscommunication due to lack of tone and body language in written messages. Technical issues, such as server outages, can disrupt email service. It is important to use email responsibly and effectively, for example, by keeping the subject line clear and concise, using proper etiquette, and protecting against security threats.

World Wide Web (WWW) The World Wide Web (WWW), often called the Web, is a system of interconnected web pages and information that you can access using the Internet . It was created to help people share and find information easily, using links that connect different pages together . The Web allows us to browse websites, watch videos, shop online , and connect with others around the world through our computers and phones . All public websites or web pages that people may access on their local computers and other devices through the internet . Web pages are linked together using hyperlinks which are HTML-formatted and, also referred to as hypertext, these are the fundamental units of the Internet and are accessed through HTTP  

WWW Architecture The  WWW  is mainly a distributed   client/server  service where a client using the browser can access the service using a server. The Service that is provided is distributed over many different locations commonly known as  sites/websites. Each website holds one or more documents that are generally referred to as  web pages. Where each web page contains a link to other pages on the same site or at other sites . These pages can be retrieved and viewed by using browsers.

WWW Architecture Client sends some information that belongs to  site A . It generally sends a request through its browser (It is a program that is used to fetch the documents on the web) and also the request generally contains other information like the address of the site, web page(URL).

WWW Architecture The server at  site A  finds the document then sends it to the client. After that when the user or say the client finds the reference to another document that includes the web page at  site B . The reference generally contains the URL of site B . And the client is interested to take a look at this document too. Then after the client sends the request to the new site and then the new page is retrieved . 1.Client/Browser The Client/Web browser is basically a program that is used to communicate with the web server on the Internet. Each browser mainly comprises of three components and these are: Controller Interpreter Client Protocols The Controller mainly receives the input from the input device , after that it uses the client programs in order to access the documents . After accessing the document, the controller makes use of an interpreter in order to display the document on the screen. An interpreter can be Java, HTML, JavaScript mainly depending upon the type of the document. The Client protocol can be FTP, HTTP, TELNET.

2.Server The Computer that is mainly available for the network resources and in order to provide services to the other computer upon request is generally known as the  server. The Web pages are mainly stored on the server . Whenever the request of the client arrives then the corresponding document is sent to the client. The connection between the client and the server is TCP. It can become more efficient through multithreading or multiprocessing , the server can answer more than one request at a time.

WWW Architecture 3.URL URL is an abbreviation of  the Uniform resource locator. It is basically a standard used for specifying any kind of information on the Internet. In order to access any page the client generally needs an address. To facilitate the access of the documents throughout the world HTTP generally makes use of Locators . URL mainly defines the four things: Protocol It is a client/server program that is mainly used to retrieve the document. Used protocol is HTTP .

WWW Architecture Host Computer It is the computer on which the information is located. It is not mandatory because it is the name given to any computer that hosts the web page. Port The URL can optionally contain the port number of the server. If the port number is included then it is generally inserted in between the host and path and is generally separated from the host by the colon. Path It indicates the pathname of the file where the information is located. 4.HTML HTML is an abbreviation of Hypertext Markup Language. It is generally used for creating web pages . It is mainly used to define the contents, structure and organization of the web page. 5.XML XML is an abbreviation of Extensible Markup Language. It mainly helps in order to define the common syntax in the semantic web.

WWW Features of WWW WWW is open source. It is a distributed system spread across various websites. It is a Hypertext Information System.  It is Cross-Platform.  Uses Web Browsers to provide a single interface for many services. Dynamic, Interactive and Evolving.    Components of the Web There are 3 components of the web: Uniform Resource Locator (URL):    serves as a system for resources on the web.  Hyper Text Transfer Protocol (HTTP):    specifies communication of browser and server.  Hyper Text Markup Language (HTML):   defines the structure, organization and content of a web page. 

HTTP Protocol HTTP  stands for Hypertext Transfer Protocol and is used to access the data on the world wide web i.e   (WWW) . The   HTTP  mainly functions as the combination of  FTP (File Transfer Protocol) and  SMTP (Simple Mail Transfer Protocol). HTTP  is one of the protocols used at the  Application Layer . The  HTTP  is similar to  FTP  because  HTTP  is used to transfer the files and it mainly uses the services of  TCP. In   HTTP,  there is no separate control connection, as only data is transferred between the client and the server. The  HTTP  is like SMTP because the transfer of data between the client and server simply looks like  SMTP  messages. But there is a difference unlike  SMTP,  the  HTTP  messages are not destined to be read  by humans  as they are read and interpreted by  HTPP Client (that is browser) and HTTP server. SMTP  messages are  stored and then forwarded  while the  HTTP  messages are  delivered immediately. The  HTTP  mainly uses the services of the  TCP  on the well-known port that is  port 80. HTTP  is a  stateless protocol. In  HTTP, the  client initializes the transaction by sending a request message, and the server replies by sending a response. This protocol is used to transfer the data in the form of plain text, hypertext, audio as well as video, and so on.

Working of HTTP The HTTP makes use of Client-server architecture . The format of the request and the response message is similar. The Request Message mainly consists of a request line , a header , and a body sometimes . A Response message consists of the status line, a header , and sometimes a body. At the time when a client makes a request for some information (say client clicks on the hyperlink) to the webserver . The browser then sends a request message to the HTTP server for the requested objects. After that the following things happen: There is a connection that becomes open between the client and the webserver through the TCP. After that, the HTTP sends a request to the server that mainly collects the requested data. The response with the objects is sent back to the client by HTTP. At last, HTTP closes the connection.

HTTP

HTTP Request Type This field is used in the request line. The are several request types that are defined and these are mentioned in the table given below; GET- This method is used to request a document from the server . HEAD- This method mainly requests information about a document and not the document itself. POST-This method sends some information from the client to the server . PUT-This method sends a document from the server to the client . TRACE- This method echoes the incoming request . CONNECT-This method means reserved. OPTION- In order to inquire about the available options . URL URL is a Uniform Resource locator and it is mainly a standard way of specifying any kind of information on the Internet. HTTP Version The current version of the HTTP is 1.1. Status Code The status code is the field of the response message . The status code consists of three digits.

HTTP Status Phrase This field is also used in the response message and it is used to explain the status code in the form of text. Header The header is used to exchange the additional information between the client and the server. The header mainly consists of one or more header lines. Each header line has a header name, a colon, space, and a header value. The header line is further categorized into four: General Header It provides general information about the message and it can be present in both request and response. Request Header It is only present in the request message and is used to specify the configuration of the client and the format of the document preferred by the client Response Header This header is only present in the response header and mainly specifies the configuration of the server and also the special information about the request. Entity Header It is used to provide information about the body of the document . Body It can be present in the request message or in the response message. The body part mainly contains the document to be sent or received.

Features of HTTP HTTP is simple The HTTP protocol is designed to be plain and human-readable. HTTP is stateless Hypertext transfer protocol(HTTP) is a stateless protocol, which simply means that there is no connection among two requests that are being consecutively carried out on the same connection. Also, both the client and the server know each other only during the current requests and thus the core of the HTTP is itself a stateless one, On the other hand, the HTTP cookies provide in making use of stateful sessions. HTTP is extensible The HTTP can be integrated easily with the new functionality by providing a simple agreement between the client and the server. HTTP is connectionless As the HTTP request is initiated by the browser (HTTP client) and as per the request information by the user, after that the server processes the request of the client and then responds back to the client

HTTP Advantages of HTTP Given below are the benefits of using HTTP: There is no runtime support required to run properly. As it is connectionless so there is no overhead in order to create and maintain the state and information of the session. HTTP is usable over the firewalls and global application is possible. HTTP is platform-independent. HTTP reports the errors without closing the TCP connection. Offers Reduced Network congestions. Disadvanatges of HTTP There are some drawbacks of using the HTTP protocol: HTTP is not optimized for mobile. HTTP is too verbose. It can be only used for point-to-point connections. This protocol does not have push capabilities. This protocol does not offer reliable exchange without the retry logic.
Tags