1 of 85

Introduction to Data Communication and Networking

VI SEM EEE

EEE- 324T

Department of Electrical and Electronics Engineering, BVCOE, New Delhi

Subject: IDCN, Instructor: Dr.SUDHA.K

1

2 of 85

COURSE OBJECTIVES

  • 1. To build an understanding of the fundamental concepts of data communication.
  • 2. To familiarize the student with the basic taxonomy of data link layer.
  • 3. To understand and implement the network routing, IP addressing, subnetting.
  • 4. To enumerate the functions of transport layer and application layer.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

2

3 of 85

COURSE OUTCOMES(CO)

CO 1 Understand basic concepts of data communications.

CO 2 Understand and explain various functions of data link layer.

CO 3 Understand and implements the network routing, IP addressing, subnetting.

CO 4 Enumerate the functions of transport layer and application layer.

3

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

4 of 85

UNIT- IV

  • Transport Layer: Process to Process Delivery: UDP; TCP, congestion control.
  • Application Layer: Client Server Model, Domain Name System (DNS): Electronic Mail (SMTP), file transfer(FTP), HTTP and WWW.

4

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

5 of 85

����������Transport Layer�

  • The transport layer is the fourth layer of the OSI model and is the core of the Internet model.
  • It responds to service requests from the session layer and issues service requests to the network Layer.
  • The transport layer provides transparent transfer of data between hosts.
  • It provides end-to-end control and information transfer with the quality of service needed by the application program.
  • It is the first true end-to-end layer, implemented in all End Systems (ES).

5

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

6 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

6

TRANSPORT LAYER FUNCTIONS / SERVICES

The transport layer is located between the network layer and the application layer.

The transport layer is responsible for providing services to the application layer; it receives services from the network layer.

The services that can be provided by the transport layer are

  1. Process-to-Process Communication
  2. Addressing : Port Numbers
  3. Encapsulation and Decapsulation
  4. Multiplexing and Demultiplexing
  5. Flow Control
  6. Error Control
  7. Congestion Control

7 of 85

  • Process-to-Process Communication
  • The Transport Layer is responsible for delivering data to the appropriate application process on the host computers.
  • This involves multiplexing of data from different application processes, i.e. forming data packets, and adding source and destination port numbers in the header of each Transport Layer data packet.
  • Together with the source and destination IP address, the port numbers constitutes a network socket, i.e. an identification address of the process-to-process communication.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

7

8 of 85

  • Addressing: Port Numbers
  • Ports are the essential ways to address multiple entities in the same location.
  • Using port addressing it is possible to use more than one network-based application at the same time.
  • Three types of Port numbers are used :
  • Well-known ports - These are permanent port numbers. They range between 0 to 1023.These port numbers are used by Server Process.
  • Registered ports - The ports ranging from 1024 to 49,151 are not assigned or controlled.
  • Ephemeral ports (Dynamic Ports) – These are temporary port numbers. They range between 49152–65535.These port numbers are used by Client Process.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

8

9 of 85

  • Encapsulation and Decapsulation
  • To send a message from one process to another, the transport-layer protocol encapsulates and decapsulates messages.
  • Encapsulation happens at the sender site. The transport layer receives the data and adds the transport-layer header.
  • Decapsulation happens at the receiver site. When the message arrives at the destination transport layer, the header is dropped and the transport layer delivers the message to the process running at the application layer.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

9

10 of 85

  • Multiplexing and Demultiplexing
  • Whenever an entity accepts items from more than one source, this is referred to as multiplexing (many to one).
  • Whenever an entity delivers items to more than one source, this is referred to as demultiplexing (one to many).
  • The transport layer at the source performs multiplexing .
  • The transport layer at the destination performs demultiplexing.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

10

11 of 85

  • Flow Control
  • Flow Control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver.
  • It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with data from transmitting node.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

11

12 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

12

13 of 85

  • Error Control
  • Error control at the transport layer is responsible for
  • 1. Detecting and discarding corrupted packets.
  • 2. Keeping track of lost and discarded packets and resending them.
  • 3. Recognizing duplicate packets and discarding them.
  • 4. Buffering out-of-order packets until the missing packets arrive.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

13

14 of 85

  • Error Control involves Error Detection and Error Correction

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

14

15 of 85

  • Congestion Control
  • Congestion in a network may occur if the load on the network (the number of packets sent to the network) is greater than the capacity of the network (the number of packets a network can handle).
  • Congestion control refers to the mechanisms and techniques that control the
  • congestion and keep the load below the capacity.
  • Congestion Control refers to techniques and mechanisms that can either prevent congestion, before it happens, or remove congestion, after it has happened
  • Congestion control mechanisms are divided into two categories,
  • 1. Open loop - prevent the congestion before it happens.
  • 2. Closed loop - remove the congestion after it happens.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

15

16 of 85

PORT NUMBERS

  • A transport-layer protocol usually has several responsibilities.
  • One is to create a process-to-process communication.
  • Processes are programs that run on hosts. It could be either server or client.
  • A process on the local host, called a client, needs services from a process usually on the remote host, called a server.
  • Processes are assigned a unique 16-bit port number on that host.
  • Port numbers provide end-to-end addresses at the transport layer.
  • They also provide multiplexing and demultiplexing at this layer.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

16

17 of 85

  • The port numbers are integers between 0 and 65,535 .

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

17

18 of 85

  • ICANN (Internet Corporation for Assigned Names and Numbers) has divided the port numbers into three ranges:
  • Well-known ports
  • Registered
  • Ephemeral ports (Dynamic Ports)

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

18

19 of 85

WELL-KNOWN PORTS

  • These are permanent port numbers used by the servers.
  • They range between 0 to 1023.
  • This port number cannot be chosen randomly.
  • These port numbers are universal port numbers for servers.
  • Every client process knows the well-known port number of the corresponding server process.
  • For example, while the daytime client process, a well-known client program, can use an ephemeral (temporary) port number, 52,000, to identify itself, the daytime server process must use the well-known (permanent) port number 13.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

19

20 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

20

21 of 85

  • EPHEMERAL PORTS (DYNAMIC PORTS)
  • The client program defines itself with a port number, called the ephemeral port number.
  • The word ephemeral means “short-lived” and is used because the life of a client is normally short.
  • An ephemeral port number is recommended to be greater than 1023.
  • These port number ranges from 49,152 to 65,535 .
  • They are neither controlled nor registered. They can be used as temporary or private port numbers.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

21

22 of 85

  • REGISTERED PORTS
  • The ports ranging from 1024 to 49,151 are not assigned or controlled.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

22

23 of 85

TRANSPORT LAYER PROTOCOLS

  • Three protocols are associated with the Transport layer.
  • They are
  • (1) UDP –User Datagram Protocol
  • (2) TCP – Transmission Control Protocol
  • (3) SCTP - Stream Control Transmission Protocol
  • Each protocol provides a different type of service and should be used appropriately.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

23

24 of 85

  • UDP - UDP is an unreliable connectionless transport-layer protocol used for its simplicity and efficiency in applications where error control can be provided by the application-layer process.
  • TCP - TCP is a reliable connection-oriented protocol that can be used in any application where reliability is important.
  • SCTP - SCTP is a new transport-layer protocol designed to combine some features of UDP and TCP in an effort to create a better protocol for multimedia communication.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

24

25 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

25

26 of 85

USER DATAGRAM PROTOCOL (UDP)

  • User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol.
  • UDP adds process-to-process communication to best-effort service provided by IP.
  • UDP is a very simple protocol using a minimum of overhead.
  • UDP is a simple demultiplexer, which allows multiple processes on each host to communicate.
  • UDP does not provide flow control , reliable or ordered delivery.
  • UDP can be used to send small message where reliability is not expected.
  • Sending a small message using UDP takes much less interaction between the sender and receiver.
  • UDP allow processes to indirectly identify each other using an abstract locator called port or mailbox

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

26

27 of 85

UDP PORTS

  • Processes (server/client) are identified by an abstract locator known as port.
  • Server accepts message at well known port.
  • Some well-known UDP ports are 7–Echo, 53–DNS, 111–RPC, 161–SNMP, etc.
  • < port, host > pair is used as key for demultiplexing.
  • Ports are implemented as a message queue.
  • When a message arrives, UDP appends it to end of the queue.
  • When queue is full, the message is discarded.
  • When a message is read, it is removed from the queue.
  • When an application process wants to receive a message, one is removed from the front of the queue.
  • If the queue is empty, the process blocks until a message becomes available.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

27

28 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

28

29 of 85

UDP DATAGRAM (PACKET) FORMAT

  • UDP packets are known as user datagrams .
  • These user datagrams, have a fixed-size header of 8 bytes made of four fields, each of 2 bytes (16 bits).

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

29

30 of 85

  • Source Port Number
  • Port number used by process on source host with 16 bits long.
  • If the source host is client (sending request) then the port number is an temporary one requested by the process and chosen by UDP.
  • If the source is server (sending response) then it is well known port number.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

30

31 of 85

  • Destination Port Number
  • Port number used by process on Destination host with 16 bits long.
  • If the destination host is the server (a client sending request) then the port number is a well known port number.
  • If the destination host is client (a server sending response) then port number is an temporary one copied by server from the request packet.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

31

32 of 85

  • Length
  • This field denotes the total length of the UDP Packet (Header plus data)
  • The total length of any UDP datagram can be from 0 to 65,535 bytes.
  • Checksum
  • UDP computes its checksum over the UDP header, the contents of the message body, and something called the pseudo header.
  • The pseudo header consists of three fields from the IP header—protocol number, source IP address, destination IP address plus the UDP length field.
  • Data
  • Data field defines the actual payload to be transmitted.
  • Its size is variable.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

32

33 of 85

UDP SERVICES

  • Process-to-Process Communication
  • UDP provides process-to-process communication using socket addresses, a combination of IP addresses and port numbers.
  • Connectionless Services
  • UDP provides a connectionless service.
  • There is no connection establishment and no connection termination .
  • Each user datagram sent by UDP is an independent datagram.
  • There is no relationship between the different user datagrams even if they are coming from the same source process and going to the same destination program.
  • The user datagrams are not numbered.
  • Each user datagram can travel on a different path.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

33

34 of 85

  • Flow Control
  • UDP is a very simple protocol.
  • There is no flow control, and hence no window mechanism.
  • The receiver may overflow with incoming messages.
  • The lack of flow control means that the process using UDP should provide for this service, if needed.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

34

35 of 85

  • Error Control
  • There is no error control mechanism in UDP except for the checksum.
  • This means that the sender does not know if a message has been lost or duplicated.
  • When the receiver detects an error through the checksum, the user datagram is silently discarded.
  • The lack of error control means that the process using UDP should provide for this service, if needed.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

35

36 of 85

  • Checksum
  • UDP checksum calculation includes three sections: a pseudo header, the UDP header, and the data coming from the application layer.
  • The pseudo header is the part of the header in which the user datagram is to be encapsulated with some fields filled with 0s.
  • Optional Inclusion of Checksum
  • The sender of a UDP packet can choose not to calculate the checksum.
  • In this case, the checksum field is filled with all 0s before being sent.
  • In the situation where the sender decides to calculate the checksum, but it happens that the result is all 0s, the checksum is changed to all 1s before the packet is sent.
  • In other words, the sender complements the sum two times.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

36

37 of 85

  • Congestion Control
  • Since UDP is a connectionless protocol, it does not provide congestion control.
  • UDP assumes that the packets sent are small and sporadic(occasionally or at irregular intervals) and cannot create congestion in the network.
  • This assumption may or may not be true, when UDP is used for interactive real-time transfer of audio and video.
  • Encapsulation and Decapsulation
  • To send a message from one process to another, the UDP protocol encapsulates and decapsulates messages.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

37

38 of 85

  • Queuing
  • In UDP, queues are associated with ports.
  • At the client site, when a process starts, it requests a port number from the operating system.
  • Some implementations create both an incoming and an outgoing queue associated with each process.
  • Other implementations create only an incoming queue associated with each process.
  • Multiplexing and Demultiplexing
  • In a host running a transport protocol suite, there is only one UDP but possibly several processes that may want to use the services of UDP.
  • To handle this situation, UDP multiplexes and demultiplexes.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

38

39 of 85

  • APPLICATIONS OF UDP
  • UDP is used for management processes such as SNMP.
  • UDP is used for route updating protocols such as RIP.
  • UDP is a suitable transport protocol for multicasting. Multicasting capability is embedded in the UDP software
  • UDP is suitable for a process with internal flow and error control mechanisms such as Trivial File Transfer Protocol (TFTP).
  • UDP is suitable for a process that requires simple request-response communication with little concern for flow and error control.
  • UDP is normally used for interactive real-time applications that cannot tolerate uneven delay between sections of a received message.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

39

40 of 85

TRANSMISSION CONTROL PROTOCOL (TCP)

  • TCP is a reliable, connection-oriented, byte-stream protocol.
  • TCP guarantees the reliable, in-order delivery of a stream of bytes. It is a full-duplex protocol, meaning that each TCP connection supports a pair of byte streams, one flowing in each direction.
  • TCP includes a flow-control mechanism for each of these byte streams that allow the receiver to limit how much data the sender can transmit at a given time.
  • TCP supports a demultiplexing mechanism that allows multiple application programs on any given host to simultaneously carry on a conversation with their peers.
  • TCP also implements congestion-control mechanism. The idea of this mechanism is to prevent sender from overloading the network.
  • Flow control is an end to end issue, whereas congestion control is concerned with how host and network interact.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

40

41 of 85

TCP SERVICES

  • Process-to-Process Communication
  • TCP provides process-to-process communication using port numbers.
  • Stream Delivery Service
  • TCP is a stream-oriented protocol.
  • TCP allows the sending process to deliver data as a stream of bytes and allows the receiving process to obtain data as a stream of bytes.
  • TCP creates an environment in which the two processes seem to be connected by an imaginary “tube” that carries their bytes across the Internet.
  • The sending process produces (writes to) the stream and the receiving process consumes (reads from) it.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

41

42 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

42

43 of 85

  • Full-Duplex Communication
  • TCP offers full-duplex service, where data can flow in both directions at the same time.
  • Each TCP endpoint then has its own sending and receiving buffer, and segments move in both directions.
  • Multiplexing and Demultiplexing
  • TCP performs multiplexing at the sender and demultiplexing at the receiver.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

43

44 of 85

  • Connection-Oriented Service
  • TCP is a connection-oriented protocol.
  • A connection needs to be established for each pair of processes.
  • When a process at site A wants to send to and receive data from another process at site B, the following three phases occur:
  • 1. The two TCP’s establish a logical connection between them.
  • 2. Data are exchanged in both directions.
  • 3. The connection is terminated.
  • Reliable Service
  • TCP is a reliable transport protocol.
  • It uses an acknowledgment mechanism to check the safe and sound arrival of data.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

44

45 of 85

TCP SEGMENT

  • A packet in TCP is called a segment.
  • Data unit exchanged between TCP peers are called segments.
  • A TCP segment encapsulates the data received from the application layer.
  • The TCP segment is encapsulated in an IP datagram, which in turn is encapsulated in a frame at the data-link layer.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

45

46 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

46

47 of 85

  • TCP is a byte-oriented protocol, which means that the sender writes bytes into a TCP connection and the receiver reads bytes out of the TCP connection.
  • TCP does not, itself, transmit individual bytes over the Internet.
  • TCP on the source host buffers enough bytes from the sending process to fill a reasonably sized packet and then sends this packet to its peer on the destination host.
  • TCP on the destination host then empties the contents of the packet into a receive buffer, and the receiving process reads from this buffer at its leisure.
  • TCP connection supports byte streams flowing in both directions.
  • The packets exchanged between TCP peers are called segments, since each one carries a segment of the byte stream.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

47

48 of 85

TCP PACKET FORMAT

  • TCP (Transmission Control Protocol) is a fundamental protocol in the TCP/IP (Transmission Control Protocol/Internet Protocol) family.
  • It offers a dependable and organized data distribution between applications that are executed on several hosts in a network.
  • The TCP packet format must be understood in order to analyze and resolve network communication issues.
  • The TCP packet format will be thoroughly examined in this article, along with its many fields and their importance.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

48

49 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

49

Diagram Showing the TCP packet Format

50 of 85

TCP Packet format has these fields�

  • Source Port(16 bits): It holds the source/transmitting application’s port number and helps in determining the application where the data delivery is planned.
  • Destination Port (16 bits): This field has the port number of the transmitting application and helps to send the data to the appropriate application.
  • Sequence Number (32 bits): It ensures that the data is received in proper order by ordered segmenting and reassembling them at the receiving end.
  • Acknowledgment Number (32 bits): This field contains the upcoming sequence number and it acknowledges the feedback up to that.
  • Data Offset (4 bits): The data offset field indicates the starting point of the TCP data payload also storing the size of the TCP header.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

50

51 of 85

  • Control Flags (9 bits): TCP uses a few control flags to regulate communication. Some of the important flags include:
    • SYN (Synchronize): Responsible for connecting the sender and receiver.
    • ACK (Acknowledgment): Its purpose is transfer the acknowledgement of whether the the sender has received data.
    • FIN (Finish): It informs whether the TCP connection is terminated or not.
    • RST (Reset): Mainly used to reset the connection when an error occurs.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

51

52 of 85

  • Window Size (16 bits): The size of the sender’s receive window is specified by this property.
  • Checksum (16 bits): It reveals if the header was damaged during transportation.
  • Urgent Pointer (16 bits): This field points to the packet’s first byte of urgent data.
  • Options (Variable length): This field represents the different TCP options.
  • Data Payload: This field mainly contains the information which is the actual application data that is being transmitted.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

52

53 of 85

APPLICATION LAYER

  • The application layer in the OSI model is the closest layer to the end user which means that the application layer and end user can interact directly with the software application. The application layer programs are based on client and servers.
  • The Application layer includes the following functions:
  • Identifying communication partners: The application layer identifies the availability of communication partners for an application with data to transmit.
  • Determining resource availability: The application layer determines whether sufficient network resources are available for the requested communication.
  • Synchronizing communication: All the communications occur between the applications requires cooperation which is managed by an application layer.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

53

54 of 85

  • Services of Application Layers:
  • Network Virtual terminal: An application layer allows a user to log on to a remote host. To do so, the application creates a software emulation of a terminal at the remote host. The user's computer talks to the software terminal, which in turn, talks to the host. The remote host thinks that it is communicating with one of its own terminals, so it allows the user to log on.
  • File Transfer, Access, and Management (FTAM): An application allows a user to access files in a remote computer, to retrieve files from a computer and to manage files in a remote computer. FTAM defines a hierarchical virtual file in terms of file structure, file attributes and the kind of operations performed on the files and their attributes.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

54

55 of 85

  • Addressing: To obtain communication between client and server, there is a need for addressing. When a client made a request to the server, the request contains the server address and its own address. The server response to the client request, the request contains the destination address, i.e., client address. To achieve this kind of addressing, DNS is used.
  • Mail Services: An application layer provides Email forwarding and storage. o Directory Services: An application contains a distributed database that provides access for global information about various objects and services. o Authentication: It authenticates the sender or receiver's message or both.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

55

56 of 85

Network Application Architecture

  • Application architecture is different from the network architecture. The network architecture is fixed and provides a set of services to applications. The application architecture, on the other hand, is designed by the application developer and defines how the application should be structured over the various end systems.
  • Application architecture is of two types:
  • Client-server architecture: An application program running on the local machine sends a request to another application program is known as a client, and a program that serves a request is known as a server. For example, when a web server receives a request from the client host, it responds to the request to the client host.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

56

57 of 85

  • Characteristics of Client-server architecture:
  • In Client-server architecture, clients do not directly communicate with each other. For example, in a web application, two browsers do not directly communicate with each other.
  • A server is fixed, well-known address known as IP address because the server is always on while the client can always contact the server by sending a packet to the sender's IP address.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

57

58 of 85

  • Disadvantage Of Client-server architecture:
  • It is a single-server based architecture which is incapable of holding all the requests from the clients. For example, a social networking site can become overwhelmed when there is only one server exists.
  • P2P (peer-to-peer) architecture: It has no dedicated server in a data center. The peers are the computers which are not owned by the service provider. Most of the peers reside in the homes, offices, schools, and universities. The peers communicate with each other without passing the information through a dedicated server, this architecture is known as peer-to-peer architecture. The applications based on P2P architecture includes file sharing and internet telephony.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

58

59 of 85

  • Features of P2P architecture
  • Self scalability: In a file sharing system, although each peer generates a workload by requesting the files, each peer also adds a service capacity by distributing the files to the peer.
  • Cost-effective: It is cost-effective as it does not require significant server infrastructure and server bandwidth.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

59

60 of 85

  • Client and Server processes
  • A network application consists of a pair of processes that send the messages to each other over a network.
  • In P2P file-sharing system, a file is transferred from a process in one peer to a process in another peer. We label one of the two processes as the client and another process as the server.
  • With P2P file sharing, the peer which is downloading the file is known as a client, and the peer which is uploading the file is known as a server. However, we have observed in some applications such as P2P file sharing; a process can be both as a client and server. Therefore, we can say that a process can both download and upload the files.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

60

61 of 85

FTP

  • FTP stands for File transfer protocol.
  • FTP is a standard internet protocol provided by TCP/IP used for transmitting the files from one host to another.
  • It is mainly used for transferring the web page files from their creator to the computer that acts as a server for other computers on the internet.
  • It is also used for downloading the files to computer from other servers.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

61

62 of 85

  • Objectives of FTP
  • It provides the sharing of files.
  • It is used to encourage the use of remote computers.
  • It transfers the data more reliably and efficiently.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

62

63 of 85

  • Why FTP?
  • Although transferring files from one system to another is very simple and straightforward, but sometimes it can cause problems. For example, two systems may have different file conventions.
  • Two systems may have different ways to represent text and data. Two systems may have different directory structures. FTP protocol overcomes these problems by establishing two connections between hosts.
  • One connection is used for data transfer, and another connection is used for the control connection.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

63

64 of 85

  • Mechanism of FTP

The FTP client has three components: the user interface, control process, and data transfer process. The server has two components: the server control process and the server data transfer process.

64

65 of 85

  • There are two types of connections in FTP:

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

65

66 of 85

  • Control Connection: The control connection uses very simple rules for communication. Through control connection, we can transfer a line of command or line of response at a time. The control connection is made between the control processes. The control connection remains connected during the entire interactive FTP session.
  • Data Connection: The Data Connection uses very complex rules as data types may vary. The data connection is made between data transfer processes. The data connection opens when a command comes for transferring the files and closes when the file is transferred.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

66

67 of 85

  • FTP Clients
  • FTP client is a program that implements a file transfer protocol which allows you to transfer files between two hosts on the internet.
  • It allows a user to connect to a remote host and upload or download the files.
  • It has a set of commands that we can use to connect to a host, transfer the files between you and your host and close the connection.
  • The FTP program is also available as a built-in component in a Web browser. This GUI based FTP client makes the file transfer very easy and also does not require to remember the FTP commands.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

67

68 of 85

  • Advantages of FTP:
  • Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest way to transfer the files from one computer to another computer.
  • Efficient: It is more efficient as we do not need to complete all the operations to get the entire file.
  • Security: To access the FTP server, we need to login with the username and password. Therefore, we can say that FTP is more secure.
  • Back & forth movement: FTP allows us to transfer the files back and forth. Suppose you are a manager of the company, you send some information to all the employees, and they all send information back on the same server.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

68

69 of 85

  • Disadvantages of FTP:
  • The standard requirement of the industry is that all the FTP transmissions should be encrypted.
  • However, not all the FTP providers are equal and not all the providers offer encryption. So, we will have to look out for the FTP providers that provides encryption.
  • FTP serves two operations, i.e., to send and receive large files on a network. However, the size limit of the file is 2GB that can be sent.
  • It also doesn't allow you to run simultaneous transfers to multiple receivers.
  • Passwords and file contents are sent in clear text that allows unwanted eavesdropping. So, it is quite possible that attackers can carry out the brute force attack by trying to guess the FTP password.
  • It is not compatible with every system.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

69

70 of 85

  • E-mail Protocols are set of rules that help the client to properly transmit the information to or from the mail server.
  • SMTP, POP, and IMAP
  • SMTP
  • SMTP stands for Simple Mail Transfer Protocol.
  • It was first proposed in 1982. It is a standard protocol used for sending e-mail efficiently and reliably over the internet.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

70

71 of 85

  • Key Points:
  • SMTP is application level protocol.
  • SMTP is connection oriented protocol.
  • SMTP is text based protocol.
  • It handles exchange of messages between e-mail servers over TCP/IP network.
  • Apart from transferring e-mail, SMPT also provides notification regarding incoming mail.
  • When you send e-mail, your e-mail client sends it to your e-mail server which further contacts the recipient mail server using SMTP client.
  • These SMTP commands specify the sender’s and receiver’s e-mail address, along with the message to be send.
  • The exchange of commands between servers is carried out without intervention of any user.
  • In case, message cannot be delivered, an error report is sent to the sender which makes SMTP a reliable protocol.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

71

72 of 85

  • SMTP Commands:
  • The following table describes some of the SMTP commands:
  • 1 HELLO This command initiates the SMTP conversation.
  • 2 EHELLO This is an alternative command to initiate the conversation. ESMTP indicates that the sender server wants to use extended SMTP protocol.
  • 3 MAIL FROM This indicates the sender’s address.
  • 4 RCPT TO It identifies the recipient of the mail. In order to deliver similar message to multiple users this command can be repeated multiple times.
  • 5 SIZE This command let the server know the size of attached message in bytes.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

72

73 of 85

  • 6 DATA The DATA command signifies that a stream of data will follow. Here stream of data refers to the body of the message.
  • 7 QUIT This commands is used to terminate the SMTP connection.
  • 8 VERFY This command is used by the receiving server in order to verify whether the given username is valid or not.
  • 9 EXPN It is same as VRFY, except it will list all the users name when it used with a distribution list.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

73

74 of 85

  • IMAP IMAP stands for Internet Mail Access Protocol. It was first proposed in 1986.
  • Key Points:
  • IMAP allows the client program to manipulate the e-mail message on the server without downloading them on the local computer.
  • The e-mail is hold and maintained by the remote server.
  • It enables us to take any action such as downloading, delete the mail without reading the mail. It enables us to create, manipulate and delete remote message folders called mail boxes.
  • IMAP enables the users to search the e-mails.
  • It allows concurrent access to multiple mailboxes on multiple mail servers.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

74

75 of 85

  • IMAP Commands
  • 1 IMAP_LOGIN This command opens the connection.
  • 2 CAPABILITY This command requests for listing the capabilities that the server supports.
  • 3 NOOP This command is used as a periodic poll for new messages or message status updates during a period of inactivity.
  • 4 SELECT This command helps to select a mailbox to access the messages.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

75

76 of 85

  • 5 EXAMINE It is same as SELECT command except no change to the mailbox is permitted.
  • 6 CREATE It is used to create mailbox with a specified name.
  • 7 DELETE It is used to permanently delete a mailbox with a given name.
  • 8 RENAME It is used to change the name of a mailbox.
  • 9 LOGOUT This command informs the server that client is done with the session. The server must send BYE untagged response before the OK response and then close the network connection.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

76

77 of 85

HTTP

  • HTTP stands for HyperText Transfer Protocol.
  • It is a protocol used to access the data on the World Wide Web (www).
  • The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio, video, and so on.
  • This protocol is known as HyperText Transfer Protocol because of its efficiency that allows us to use in a hypertext environment where there are rapid jumps from one document to another document.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

77

78 of 85

  • HTTP is similar to the FTP as it also transfers the files from one host to another host.
  • But, HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control connection to transfer the files.
  • HTTP is used to carry the data in the form of MIME-like format.
  • HTTP is similar to SMTP as the data is transferred between client and server.
  • The HTTP differs from the SMTP in the way the messages are sent from the client to the server and from server to the client.
  • SMTP messages are stored and forwarded while HTTP messages are delivered immediately.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

78

79 of 85

  • Features of HTTP:
  • Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a request and waits for a response from the server. When the server receives the request, the server processes the request and sends back the response to the HTTP client after which the client disconnects the connection. The connection between client and server exist only during the current request and response time only.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

79

80 of 85

  • Media independent: HTTP protocol is a media independent as data can be sent as long as both the client and server know how to handle the data content. It is required for both the client and server to specify the content type in MIME-type header.
  • Stateless: HTTP is a stateless protocol as both the client and server know each other only during the current request. Due to this nature of the protocol, both the client and server do not retain the information between various requests of the web pages.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

80

81 of 85

  • HTTP Transactions

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

81

82 of 85

  • Messages : HTTP messages are of two types: request and response. Both the message types follow the same message format.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

82

83 of 85

  • Request Message: The request message is sent by the client that consists of a request line, headers, and sometimes a body.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

83

84 of 85

  • Response Message: The response message is sent by the server to the client that consists of a status line, headers, and sometimes a body.

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

84

85 of 85

Department of Electrical and Electronics Engineering, BVCOE New Delhi Subject: IDCN, Instructor: Dr.SUDHA.K

85