DATA in Layers
| Layer | PDU | Use Case |
|---|---|---|
| Application | Data | End User, bridge between applications and the network |
| Presentation | Data | Translates data if needed |
| Session | Data | Sync and send to port |
| Transport | Segments | Data integrity checking, segmenting, and ordering, TCP/UDP |
| Network | Packets | IP Addressing, Routing, Switches(L3) |
| Data-Link | Frames | MAC, Switches(L2), Organize bits to Frames |
| Physical | Bits | TX/MX bits, cabling, standards. |
![[OSI Model Diagram.png]]
The Physical Layer is the lowest layer(1)of the OSI/TCP model representing the literal physical means of data transmission via bits. 1’s and 0’s, on and off. Every bit transmitted and received by a NIC, data cable, and antenna are represented by this layer. Layer 1 defines these devices and mediums along with the standards in which they physically communicate. It focuses on pure data transmission at it’s rawest form, like a radio wave or fiber pulse, not the logical elements.
The Data-Link layer or Layer 2 focuses on creation of Ethernet [[Frames]] from bits and their transmission via a MAC Address. On a local level, this helps us define where a frame will be sent or received. Data-Link frames stay within their LAN.
The Ethernet Frame
The data-link layer utilizes ethernet frames to transmit layer 1 data into logical form to direct said data to a switch or other device locally. It’s a post card, an encapsulating unit of data(PDU) for addressing who(MAC) our data is going to. MAC addresses will be stripped and added depending on whether the data needs to be routed or retained on the local network.
Preamble - A sequence of binary data to aid in clock synchronization. Handshake
Start frame Delimiter - indicates the end of the preamble and beginning of the frame
Destination MAC Address - MAC address of where frame is being sent
Source MAC Address - MAC address indicating device sending frame
Type - Specifies type of protocol in the payload or length of payload (IPV4/6, ARP)
Payload - The data being transmitted. Between 46-1500 bytes
Frame Check Sequence(FCS)- Error checking. Aids identifying errors during transmission
![[Ethernet Frame.png]] VLAN tagging is often added if subnets are present Data is the most important field of the frame while remainder can be treated as metadata
Where’s my data?
Layer 1 converted our client’s outgoing data into binary and sent it across a physical medium. At layer 2, our interface(NIC) translated the binary data into a logical form for local addressing. An ethernet frame is created with a destination and source address to either send to a device locally or to prepare the transmission for routing outside the LAN via the Layer 3.