Networking Fundamentals · Topic 1 of 5
Ethernet and Layer 2 Addressing
Learn Ethernet frames, MAC address format, unicast, multicast and broadcast, and address resolution with ARP and IPv6 neighbor discovery for JN0-106.
- 5 min
- A MAC address is 48 bits; the first 24 bits are the OUI.
- Broadcast MAC is
ff:ff:ff:ff:ff:ff; a 1 in the lowest bit of the first byte means multicast. - Ethernet payload is 46 to 1500 bytes; a standard untagged frame is 64 to 1518 bytes.
What it is
Ethernet is the Layer 2 technology used on almost every wired LAN. It defines the frame format, the MAC addresses that identify interfaces on a segment, and how devices share or use the link.
Layer 2 addressing means the MAC address. A frame is delivered on the local segment by MAC address, while the IP packet inside it carries the end to end Layer 3 addresses. Address resolution finds the MAC address that belongs to a known IP address on the same segment: ARP does this for IPv4 and neighbor discovery does it for IPv6.
How it works
The Ethernet frame
| Field | Size | Purpose |
|---|---|---|
| Preamble and SFD | 8 bytes | Synchronizes the receiver; not counted in the frame size |
| Destination MAC | 6 bytes | Who the frame is for |
| Source MAC | 6 bytes | Who sent it |
| EtherType or Length | 2 bytes | Payload type, for example 0x0800 IPv4, 0x86DD IPv6, 0x0806 ARP |
| Payload | 46 to 1500 bytes | The packet, padded if shorter than 46 bytes |
| FCS | 4 bytes | CRC to detect damaged frames |
A standard frame is 64 to 1518 bytes without a VLAN tag. An 802.1Q tag adds 4 bytes. A receiver that finds a bad FCS drops the frame; Ethernet itself does not resend it, so recovery is left to upper layers such as TCP.
Half and full duplex
Early Ethernet shared one medium, so stations used CSMA/CD: listen before sending, detect collisions, back off and retry. Modern switched links are full duplex, where each side sends and receives at the same time and collisions cannot happen. A duplex mismatch, one side full and the other half, shows up as late collisions and errors on the interface.
The MAC address
A MAC address is 48 bits, written as 12 hexadecimal digits. Junos OS shows it with colons, for example 00:05:86:71:1a:c0.
| Part | Bits | Meaning |
|---|---|---|
| OUI | First 24 bits | Organizationally unique identifier, assigned to the vendor |
| Device part | Last 24 bits | Assigned by the vendor to the interface |
The lowest bit of the first byte is the individual/group bit. If it is 0 the address is unicast; if it is 1 the address is multicast. The broadcast address is all ones, ff:ff:ff:ff:ff:ff, and every station on the segment processes it.
ARP for IPv4
Before a host sends an IPv4 packet on Ethernet it needs the MAC address of the next hop. If the destination is on the same subnet, the next hop is the destination itself; if not, it is the default gateway.
- The host checks its ARP cache.
- If there is no entry, it broadcasts an ARP request: "Who has 10.1.1.1?"
- The owner of 10.1.1.1 sends a unicast ARP reply with its MAC address.
- The host caches the mapping and sends the frame.
On a Junos device, show arp lists the IPv4 to MAC mappings it has learned, with the interface for each entry.
user@router> show arp no-resolve
MAC Address Address Interface Flags
00:05:86:71:1a:c0 10.1.1.2 ge-0/0/1.0 none
no-resolve stops the device from trying to turn the IP addresses into host names, which makes the output faster.
Neighbor discovery for IPv6
IPv6 has no broadcast and no ARP. Neighbor Discovery Protocol (NDP) uses ICMPv6 messages instead.
| ARP (IPv4) | NDP (IPv6) |
|---|---|
| ARP request, sent as broadcast | Neighbor solicitation, sent to a solicited-node multicast address |
| ARP reply | Neighbor advertisement |
ARP cache, show arp | Neighbor cache, show ipv6 neighbors |
| Own protocol, EtherType 0x0806 | Part of ICMPv6, carried inside IPv6 |
NDP also handles router discovery, so a host can learn its default router and prefix from router advertisements.
Where the MAC address changes
As a packet crosses routers, the IP addresses stay the same end to end, but the MAC addresses change on every hop. Each router strips the incoming frame, looks up the destination IP, resolves the next hop MAC and builds a new frame.
Common mistakes
Thinking the destination MAC is the remote host. When the destination is on another subnet, the frame goes to the default gateway's MAC address, not the remote host's. The host ARPs for the gateway.
Expecting ARP in IPv6. IPv6 uses neighbor solicitation and neighbor advertisement over ICMPv6, and there is no broadcast at all.
Mixing up the MAC address halves. The vendor part is the first 24 bits (OUI), and the vendor assigned serial is the last 24 bits.
An ARP request is a broadcast, but the ARP reply is unicast. Exam options often swap the two.
What to remember for the exam
- A MAC address is 48 bits; the first 24 bits are the OUI.
- Broadcast MAC is
ff:ff:ff:ff:ff:ff; a 1 in the lowest bit of the first byte means multicast. - Ethernet payload is 46 to 1500 bytes; a standard untagged frame is 64 to 1518 bytes.
- The FCS detects errors; damaged frames are dropped, not repaired.
- ARP maps IPv4 to MAC; request is broadcast, reply is unicast; view it with
show arp. - IPv6 uses NDP (ICMPv6 neighbor solicitation and advertisement); view it with
show ipv6 neighbors. - MAC addresses change hop by hop; IP addresses do not.
Check yourself
A host sends a packet to a server in another subnet. Which MAC address is the frame's destination?
The default gateway's MAC address, because frames are delivered only on the local segment.
Which IPv6 messages replace the ARP request and ARP reply?
Neighbor solicitation replaces the request and neighbor advertisement replaces the reply, both carried in ICMPv6.
How many bits is a MAC address, and which part identifies the vendor?
48 bits; the first 24 bits are the OUI that identifies the vendor.
Topic 1 of 5 in Networking Fundamentals
Test yourself on Networking Fundamentals
The full Juniper JNCIA-Junos JN0-106 question bank has 1,155 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.