Layer 4 through Layer 7 are services are delivered by the upper layers of the Open Systems Interconnection (OSI) communication model. Layer 4-7 services, sometimes referred to as the upper layers, support end-to-end communication between a source and destination application and are used whenever a message passes from or to a user.
Providing Layer 4-7 services involves sitting somewhere in the middle of the network delivery path and using that vantage point to apply new services without requiring change to applications on either end. The list of possible Layer 4-7 services is effectively infinite in a cloud computing or software-defined networking (SDN) infrastructure because they can be built in the upper layers of the OSI model, largely independent of the underlying network. For example, SDN can change Layer 4-7 network services by enabling virtual applications of load balancing, WAN acceleration and virtual security appliances.
Layer 4, the Transport Layer, ensures end-to-end delivery of messages for both "connection-mode" data such as TCP connections and "connectionless-mode" data such as UDP datagrams. For both modes, the endpoints of communication are identified by port numbers such as TCP port 80 or UDP port 161.
Layer 5, the Session Layer, provides services for coordinating communication between applications and synchronizing message delivery. For example, a protocol with suspend/resume or checkpoint/rollback capabilities includes session layer services such as ITU X.225, AppleTalk or RPC.
Layer 6, the Presentation Layer, provides services for converting data from local format (abstract syntax) into a machine-independent format (transfer syntax). Many application protocols are defined in Abstract Syntax Notation One (ASN.1) notation. ASN.1 defines a set of data structures mapped to encoding rules – for example, how an Integer should be encoded into a bit string to be transmitted to and decoded by a recipient using XML Encoding Rules (XER).
Layer 7, the Application Layer provides common services used by applications to establish, release and abort communication with each other, as well as specific services. Most applications “live” at Layer 7, including the File Transfer Protocol (FTP), the Simple Mail Transfer Protocol (SMTP), the Post Office Protocol (POP), the Hyper Text Transfer Protocol (HTTP) and the Domain Name System Protocol (DNS).