OSI reference model

# Name use PDU protocols "address" (connectivity) devices / HW implemented by
7 Application app's gateway to network. supports network apps. "data"/"message" + header HTTP FTP Telnet DHCP DNS SNMP SMTP BGP UPnP ... host name client/server peer-to-peer, "gateway" app program in user mode
6 Presentation "translation of syntax" from app to network e.g. compression, encryption, file formats, coding (MIME, ASCII / EBCDIC, XML, JSON e.g. TLS/SSL
5 Session establishes, maintains, ends sessions. "dialog control" e.g. duplex; checkpointing / recovery
4 Transport reliable end-to-end data transfer: error detection / correction, acknowledgement, flow control, segmentation TCP: segment
UDP: datagram
TCP (connecton-oriented: guaranteed delivery, incl. flow control, congestion control, segmentation), UDP (connectionless) port O.S. TCP/IP stack
3 Network routing datagrams from one host to another. hierarchical logical addressing, fragmenting, routing (path determination in internetwork), delivery error reporting. QoS prioritization. Best effort, connectionless. datagram / packet IP, ICMP, NDP, routing IP address; protocol field router O.S. TCP/IP stack
2 Data link move packet from one node to the next. framing, media access control, physical addressing, transmission error detection frame Ethernet (802.3), WiFi (802.11), ARP, PPP, Frame Relay, CDP, LLDP MAC; Type field NIC, switch, bridge, WAP NIC firmware & driver
1 Physical move bits from one node to the next. medium, encoding, signaling voltages, data rates, transceiving (encoded / modulated bits) hub, repeater, media converter, "modem" (ISDN, T1, POTS, DSL, 802.11 PHY), cabling / connectors / topology NIC electronics / transceiver

please do not throw sausage pizza away
layers 1 to 3: "lower" layers. network
layers 4 to 7: "upper" layers. host
"8th layer" problem: your users

TCP/IP model lumps application, presentation, session layers into an Application layer. Transport layer also called Host-to-Host layer. Network layer also called Internet(working) layer. TCP and IP work as a team, complementing each other. There is only one IP protocol and all Internet components that have a network layer component must run it. IP is the glue that binds the Internet together.

OSI layers and corresponding TCP/IP layers and protocols:

Encapsulation of PDUs: