Tutorial: How do IP packets and MAC Frames go together?

It is important to understand how packets and frames are related, and in particular, IP packets vs. Ethernet or MAC frames.

Simple network example. Routers move packets from one circuit to another.

Packets are for networks. A packet is a block of user data, such as a piece of an e-mail message, with a network address on the front. The network address is the final destination. The standard for network addresses is IP.

Network equipment like routers receive an IP packet on an incoming circuit, examine the indicated destination IP address, use it to make a route decision, then implement the decision by forwarding the packet to the next router, on a different circuit.

A frame is a lower-level idea. Frames are used to communicate between stations on the same circuit. The circuit may have multiple stations physically connected onto it, like a wireless LAN, a few stations connected by a LAN switch, or only two stations like a point-to-point LAN cable. Each station has a Media Access Control (MAC) address, sometimes called a hardware address, link address or Layer 2 address.

A frame has framing to mark the beginning and end, sender and receiver MAC addresses to indicate the stations on the circuit, control information, a payload and an error detection mechanism.

The frame is transmitted on the circuit, and all stations on the circuit receive it. If an error is detected at a receiving station, the frame is discarded and might have to be retransmitted somehow.

If no errors are detected, the receiver compares the destination MAC address on the received frame to its own MAC address, and if they are the same, processes the frame, extracting the data payload and passing it to higher level software on the receiver.

If the MAC addresses are not the same, the receiver ignores it and waits for the next one.

The end result is that the payload in the frame is communicated to the correct station on the same circuit, with no errors.

Packet with its IP address vs. frame and its MAC address

The main purpose of packets is to append an IP address to your data. The IP address is used by network equipment to make route decisions: to relay the packet from one circuit to a different circuit. This is accomplished by receiving the packet then transmitting it to a different machine, usually the next router in the chain.

To actually transmit a packet to another router, the packet is inserted as the payload in a frame, then the frame is broadcast on the circuit that connects to the next router.

Notice that there are two addresses: the IP network address and the MAC address.

The IP address on the packet is the final destination, and so does not change. The MAC address on the frame indicates the destination on the current circuit, and so is changed as the data is forwarded from one circuit to another.


 

This and related topics are covered in:

CTNS Certification Package

CIPTS Certification Package

Instructor-Led Course 101
Telecom, Datacom and Networking for Non-Engineering Professionals

DVD-Video V3 Fundamentals of Datacom and Networking

Telecom 101 Textbook