How Data Link layer trailer prevents data from being intercepted and tampers
I am reading on https://tryhackme.com/room/introtonetworking, it is talking about OSI model.
It said that Data Link layer trailer can increase security as the data can't be intercepted and tampered. How can it do it?. If it is because of the trailer added in at the end of the data, what stops a man-in-the-middle from changing this trailer too?
The data link layer also adds a piece on at the end of the transmission, which is used to verify that the data has not been corrupted on transmission; this also has the added bonus of increased security, as the data can't be intercepted and tampered with without breaking the trailer. This whole process is referred to as encapsulation; the process by which data can be sent from one computer to another.
In most cases the data link layer does not prevent interception and malicious tampering. Data link layer protocols like Ethernet or PPP usually have a checksum to detect accidental packet corruption, but that's all. This "can increase security" but it does not make sure that "data can't be intercepted and tampered". Somebody intercepting data at the data link layer could simply change the checksum too so that the manipulation will not be detected.
There can be better protection at the data link layer though, even this is not common in typical LAN or WAN. There are actually products which provide L2 encryption. In most cases though application simply do not rely on security properties L2, i.e. they use network layer (L3) protection with VPN like IPSec or use application layer protection with TLS like in HTTPS.