35 lines
1.3 KiB
Markdown
35 lines
1.3 KiB
Markdown
# 2. Data link Layer
|
|
The Data Link Layer is responsible for handling the data transfer between two devices on the **same** network. (so a bit like the Network Layer)
|
|
|
|
The Data Link Layer also splits up packets into smaller chunks called a frame. The reverse happens on the receiving device (reassembling frames into packets).
|
|
|
|
Like the Network Layer the Data Link Layer is also responsible for flow control and error checking.
|
|
|
|
## Error Detection
|
|
Transmissions are not always error free. In case of an error, it should be detected and the message should be re transmitted (whenever possible)
|
|
|
|
Detecting errors are handled by different algorithms:
|
|
- Parity bits
|
|
- CRC
|
|
|
|
## Data Framing
|
|
Data is split up in smaller chunks called frames. For each frame we add some extra data:
|
|
|
|
- Who is sender?
|
|
- Who is receiver?
|
|
- Length of chunk
|
|
- Type of chunk (normal message, error message, control message)
|
|
- Error checking values (ex. CRC code)
|
|
- Data and metadata are put in single message called frame
|
|
|
|
## Ethernet Protocol
|
|
Ethernet is a protocol used at the data link layer of wired networks.
|
|
|
|
Ethernet uses specific hardware addresses to identify hosts on a network.
|
|
These 6-byte-integer addresses are names Medium Access Control (MAC Address)
|
|
|
|
Ethernet frame has the following format:
|
|
![[ethernet-frame.png]]
|
|
|
|
## Wireless networks
|