Most of the network communication protocols used today have a structure based on the OSI model. (PDF file.)
Though it does not exactly match the layers used in the TCP/IP stack used by the Internet Protocols, it is directly used by many other existing and new networking protocols, and it still a good teaching model, as evidanced by its appearance in the majority of networking courses.
On a transmitting stack/machine each layer of the model appears to the higher layers to make direct communication with the corresponding layer on the receiving PC/Network card.
A particular application may choose to merge two or more of the upper layers into a single piece of code, however the lower layers belong first to the OS, and then to the Hardware, and therefore cannot be merged.
Oubound data will pass downwards through the stack (as shown here), across the network, then back up the stack on the receiving machine, and of course vice versa.
Layer 7 |
Application LayerECHO, ENRP, FTP, Gopher, HTTP, NFS, RTSP, SIP, SMTP, SNMP, SSH, Telnet, Whois, XMPP, IMAP |
---|---|
Layer 6 |
Presentation LayerXDR, ASN.1, SMB, AFP, NCP |
Layer 5 |
Session LayerASAP, TLS, SSL, ISO 8327 / CCITT X.225, RPC, NetBIOS, ASP |
Layer 4 |
Transport LayerTCP, UDP, RTP, SCTP, SPX, ATP, IL |
Layer 3 |
Network LayerIP, ICMP, IGMP, IPX, OSPF, RIP, IGRP, EIGRP, ARP, RARP, X.25 |
Layer 2 |
Data Link LayerEthernet, Token ring, HDLC, Frame relay, ISDN, ATM, 802.11 WiFi, FDDI, PPP |
Layer 1 |
Physical Layer10BASE-T, 100BASE-T, 1000BASE-T, SONET/SDH, G.709, T-carrier/E-carrier, various 802.11 physical layers |