Menu
Coddy logo textTech

Frames and MACs

Lesson 8 of 32 in Coddy's The OSI Model course.

Layer 2 turns raw bits into frames: packages with a source and destination address that make sense on the local network segment.

Those addresses are MAC addresses: burned into every network card at the factory, written as six two-digit hex bytes like 3c:5a:b4:12:34:56. Six bytes is 48 bits, enough that every card ever made gets a unique one.

MACs only matter one hop at a time: your machine to the switch, the switch to the router. Beyond the local segment, layer 3 takes over.

challenge icon

Challenge

Beginner

Two facts about a MAC address: print how many bytes long it is, then how many bits, each on its own line.

Expected output:

6
48

Try it yourself

Terminal

All lessons in The OSI Model

Practice on your own: Terminal playground