OSI (5) - The Application Layer
The Application layer, Layer seven, is the top layer of the both the OSI and TCP/IP models. It is the layer that provides the interface between the applications we use to communicate and the underlying network over which our messages are transmitted. Application layer protocols are used to exchange data between programs running on the source and destination hosts. There are many Application layer protocols and new protocols are always being developed.
The Presentation Layer
The Presentation layer has three primary functions:
- Coding and conversion of Application layer data to ensure that data from the source device can be interpreted by the appropriate application on the destination device.
- Compression of the data in a manner that can be decompressed by the destination device.
- Encryption of the data for transmission and the decryption of data upon receipt by the destination.
The Session Layer
The Session layer handles the exchange of information to initiate dialogs, keep them active, and to restart sessions that are disrupted or idel for a long period of time.
Application Layer Model
The Client-Service Model
Data transfer from a client to a server is referred to as an upload, and data from a server to a client as a download.
In a peer-to-peer network, two or more computers are connected via a network and can share resources (such as printers and files) without having a dedicated server.
Application Layer Protocols
Domain Name System(DNS) - TCP/UDP Port 53
The DNS protocol defines an automated service that matches resource names with the required numeric network address.
DNS is a client/server service. While other services use a client that is an application (such as a web browser, e-mail client), the DNS client runs as a service itself. When configuring a network device, we generally provide one or more DNS Server addresses that the DNS client can use for name resolution. Usually the ISP provies the addresses to use for the DNS servers.
The DNS server stores different types of resource records used to resolve names. Some of these record types are:
- A - an end device address
- NS - an authoritative name server
- CNAME - the canonical name for an alias
- MX - mail exchange record
When a clent makes a query, the servers’s “named” process first look at its own records to see if to can resolve the name. If it is unable to resolve the name using its stored records, it contacts other servers in order to resolve the name.
The Domain Name System uses a hierarchical system to create a name database to provide name resolution. The hierarchy looks like an inverted tree with the root at the top and branches below.
2, WWW Service and HTTP
Hypertext Transfer Protocol(HTTP) - TCP Port 80
URLs (or Uniform Resource Locator) and URIs (Uniform Resource Identifier) are the names most people associate with web addresses.
The Hyperttext Transfer Protocol (HTTP), one of the protocls in the TCP/IP suite, was originally developed to publish and retrieve HTML pages and is now used for distributed, collaborative information systems. HTTP is used across the World Wide Web for data transfer and is one of the most used application protocols.
For secure communication across the Internet, the HTTP Secure (HTTPS) protocol is used for accessing or posting web server information.
3, E-mail Services and SMTP/POP Protocols
Simple Mail Transfer Protocol(SMTP) - TCP Port 25 Post Office Protocol(POP) - UDP Port 110
As shown in the figure, E-mail service works with protocols Post Office Protocol(POP) and Simple Mail Transfer Protocol(SMTP). The Mail User Agent(MUA) allows messages to be sent and places received messages into the client’s mailbox.
The e-mail server operates two separate processes:
- Mail Transer Agent(MTA) - used to forward e-mail
- Mail Delivery Agent(MDA) - used to deliver e-mail
File Transfer Protocol(FTP) - TCP Ports 20 and 21
The File Transfer Protocol(FTP) is another commonly used Application layer protocol. The client establishes two connection to the server:
- TCP port 21:This connection is used for contorl traffic, consisting of client commands and sever replies.
- TCP port 20:This connection is for the actual file transfer and is created every time there is a file transferred.
Dynamic Host Configuration Protocol(DHCP) - UDP Port 67
The DHCP service enables devices on a network to obtain IP addresses and other information from a DHCP server. If the host is powered down or taken off the network, the address is returned to the pool for reuse.
When a DHCP-configured device boots up or connects to the network, the client should follow four steps to communicate with DHCP:
- Broadcasts a DHCP DISCOVER packet to identify any available DHCP servers on the network.
- Receives DHCP OFFER which is a lease offer message with an assigned IP address, subnet mask, DNS server, and default gateway from a DHCP server.
- The client will receive multiple DHCP OFFER packets if there is more than one DHCP server, so it must choose between them and broadcast a DHCP REQUEST packet that identifies the explicit server and lease offer that the client is accepting.
- The selected server will respond with a DHCP ACK message.
6, Telnet Services and Protocol
People needed a way to remotely access the computer systems in the same manner that they did with the directly attached terminials. Telnet was developed to meet that need. Both the protocol itself and the client software that implements the protocol are commonly referred to as Telnet.
SSH provides the structure for secure remote login and other secure network services. It also provides stronger authentication than Telnet and supports the transport of session data using encryption. As a best practice, network professionals should always use SSH in place of Telnet, whenever possible.