Quote:
Originally Posted by ychaouche
1. Physical (wifi, ethernet, bluetooth)
|
"Physical" means precisely that: The method by which the actual signals representing bits are sent and received. Terms like "WiFi" or "Bluetooth" encompass a awful lot more than just that.
Some examples: The various 802-standards specifying data transmission over twisted-pair wire, coaxial cable, radio waves, and optical fibre.
These standards are implemented as physical components inside various types of tranceivers.
Quote:
Originally Posted by ychaouche
2. Link (PPP, ATM, wifi, ethernet)
|
Layer 2 specifies how sequences of bits (=signals) are grouped to form
frames, which typically include a header, a payload (the actual data), and possibly a trailer.
Layer 2 will typically also specify some form of node addressing, making it possible to send frames to and from specific nodes in a multi-node setup. For 802.3/802.11 that would be the MAC addresses.
Examples:
802.3 ("Ethernet"),
802.11, and yes, PPP.
Note that some of these standards encompass one or more Layer 1 specifications as well. Since Layer 1 can transmit bits, it's entirely possible to use the same Layer 2 frame format with different Layer 1 technologies; Ethernet over twisted-pair, coaxial, and fibreoptic cable all use the exact same Layer 2 frame format. Same with PPP, you can run that over a number of different media/transports.
Layer 2 may also encompass certain "control plane" protocols that network equipment use to communicate with one another and possibly auto-configure links, but that do not contain any upper-layer information.
Examples: The Spanning-Tree protocol (STP/RSTP), Link-Layer Discovery Protocol (LLDP), Link Aggregation Control Protocol (LACP).
Layer 2 standards are implemented inside various types of chips (typically ASICs) inside switches and network interface adapters. The connection to Layer 3 (if relevant) is provided by drivers.
Quote:
Originally Posted by ychaouche
3. Network (IP, ICMP, ARP)
|
Layer 3 deals with network addressing and unlike Layer 2, the addresses may belong to different networks, making it possible to send data from A to B via C. It specifies a header structure for
packets that fit inside one or more Layer 2 frames.
Examples: IPv4, IPv6 (and older standards like IPX, DECnet, etc.)
While Layer 3 should in theory be completely Layer 2-agnostic, a Layer 3 protocol must also specify how a network address is associated with a local Layer 2 address, and how such associations are discovered and published.
Examples: ARP (for IPv4), NDP (for IPv6)
Some non-data-carrying protocols designed for network operations and troubleshooting also fit into this category, simply by virtue of not (normally) carrying user data.
Examples: ICMP (ping), various routing protocols (RIP/OSPF/BGP/etc.)
Quote:
Originally Posted by ychaouche
4. Transport (TCP, UDP, STCP)
|
Correct. These protocols exist within Layer 3 packets and carry the actual application protocol data as a payload. They may or may not include mechanisms for error checking, retransmissions, and throttling.
Quote:
Originally Posted by ychaouche
5. Session (RPC, NetBios)
|
Things get a bit more vague here, as the concept of a "session" simply means a transaction that is started and finished in a particular way, and should be considered ongoing even if no data is currently being transmitted.
NFS and SMB are fairly good examples of protocols that include a session layer (and a lot more). Protocols like Telnet and SSH also work like this, but they rely on a single TCP connection for session management and thus have no real session layer of their own.
Quote:
Originally Posted by ychaouche
6. Presentation (TLS)
|
This is where the theoretical OSI model somewhat breaks down when confronted with reality, as encryption (arguably the most common implementation of presentation-layer functionality) isn't necessarily implemented over a pure Layer 5 session layer.
TLS (and its predecessor SSL) sits directly on top of a transport protocol (TCP or UDP), while IPsec runs directly over Layer 3 (IP) and does session management over a separate UDP connection. In the latter case the encrypted connection is itself treated as a Layer 3 protocol, meaning the result looks something like this:
Code:
Layer 1 - Layer 2 - Layer 3 - IPsec - Encrypted Layer 3 - Layer 4 etc.
But sure, encryption belongs at Layer 6 in the OSI model.
Quote:
Originally Posted by ychaouche
7. Application (HTTP/DNS)
|
Indeed. These are the protocols spoken by various servers and clients.