ScholaFly

CS08-03 Computer Science Watch

IP addresses and MAC addresses

Watch on YouTube

In this lesson

IP and MAC addresses for GCSE Computer Science, with worked examples and the mistakes examiners report. OCR J277 GCSE. Protocols and layers 3 of 6. Full Protocols and layers playlist: https://www.youtube.com/playlist?list=PLD_gG3hKyrIE More at https://scholafly.com

By the end: Describe what an IP address and a MAC address are for, write a valid IPv4 address, a valid IPv6 address and a valid MAC address in the right format, and explain why a device needs both - the MAC address to reach it within its own network and the IP address to reach it across networks.

What it covers

  1. 0:00 Intro: IP and MAC addresses
  2. 0:33 IP and MAC addresses: the IP address
  3. 4:52 IP and MAC addresses: the IPv6 address
  4. 6:16 The MAC address
  5. 9:20 Why a device needs

Key words

About this video

IP and MAC Addresses | GCSE Computer Science | CS08-03

IP and MAC addresses for GCSE Computer Science, with worked examples and the mistakes examiners report.
OCR J277 GCSE. Protocols and layers 3 of 6.
Full Protocols and layers playlist: https://www.youtube.com/playlist?list=PLD_gG3hKyrIE
More at https://scholafly.com

Watch first: CS07-06 - https://youtu.be/05DzEHu_qnI
Video code: CS08-03 (search "ScholaFly CS08-03")

#GCSEComputerScience #ProtocolsAndLayers #IPAndMACAddresses

For teachers
This GCSE Computer Science lesson teaches IP addresses and MAC addresses. By the end, students should be able to describe what an IP address and a MAC address are for, write a valid IPv4 address, a valid IPv6 address and a valid MAC address in the right format, and explain why a device needs both - the MAC address to reach it within its own network and the IP address to reach it across networks. It works through five worked examples and the mistakes examiners report.

Exam board specification references:
OCR J277
- 1.3.2

Read the transcript

Why does every device on a network carry two different addresses, when one sounds like plenty? A parcel shows why. Its postal address finds the street and changes when you move, but at a block of flats the courier needs the name on the letterbox. Devices split the job the same way: one address comes from the network and can change, the other is built in at the factory.

Start with the one that can change. An IP address identifies a device on a network, so that data can be routed to it across networks, including the Internet. The network a device joins gives it its IP address. Move the device to another network, and it gets another address. One course lists these addresses as a topic of their own. Another course's papers have asked which address a packet is sent to, so this is time well spent there too. The older version is IP version four. An IPv4 address is thirty-two bits, written as four denary numbers, ordinary base ten numbers, separated by full stops. For example, one nine two, dot, one six eight, dot, nought, dot, twenty-five. Four numbers, three full stops. Each of those four numbers is stored in its own byte, and binary, from the video Denary to binary and back, sets its range. With eight bits, what are the smallest and largest values one part can hold? Nought and two hundred and fifty-five. Eight bits give two hundred and fifty-six patterns, and the first pattern, all zeros, is nought. One examiner's report records where that goes wrong: "Few candidates were able to accurately identify the denary values that can be used in an IPv4 address. 256 was a common error for the highest number, and 1 was also often given as the lowest number." The fix is to go back to the bits. All zeros is nought, all ones is two hundred and fifty-five, and no part of an IPv4 address goes outside that. The separator matters as much as the numbers. In IPv4 it is the full stop, and nothing else. Now five addresses to judge. One nine two dot one six eight dot one dot three hundred. Ten dot nought dot nought dot one. One seven two dot sixteen dot two five six dot four. Eight dot eight dot eight dot eight. And one nine two, colon, one six eight, colon, one, colon, one. Decide which are valid, and say what is wrong with each of the others. Pause it there and work it out for yourself. Two pass: ten dot nought dot nought dot one, and the one made of four eights. The first address ends in three hundred, which is over two hundred and fifty-five. The third has two hundred and fifty-six in it, one past the top. The last uses colons, and IPv4 only takes full stops. A line from that same report covers the last one: "The answer for the final space was often given as a colon or a hyphen." The habit that fixes it: say the separator as part of the format, every time. Four denary numbers, separated by full stops.

IPv4 has a limit. Thirty-two bits give about four billion addresses, which is not enough for every device in the world. IP version six fixes that. An IPv6 address is one hundred and twenty-eight bits. It is written as eight groups of four hexadecimal digits, separated by colons. Hexadecimal digits run from nought to nine and then A to F. The video Binary and hexadecimal shows why four bits make one hex digit. One example starts two A nought three, then the separator, then two C four nought, and carries on in the same way to the end. Write any valid IPv6 address, then count its groups and name its separator. Any eight groups of four hex digits, with a colon between neighbouring groups, will do. Count them: eight, never six, and colons, never full stops.

Now the address that does not change. A MAC address identifies a device's network interface card, the part that connects it to a network. It is assigned when the card is made, and does not normally change, wherever the device goes. A MAC address is forty-eight bits, written as six pairs of hexadecimal digits, separated by colons or hyphens. Here is one: three C, two two, F B, seven A, nine one, nought E, with a hyphen between each pair. The first half identifies the manufacturer of the card. The second half is that individual card's own serial number. Inside a local network, data reaches the right device by its MAC address. A switch keeps a record of the MAC addresses connected to it. Now an address made of six groups of two hex digits, with colons between them. Is that an IPv6 address or a MAC address, and how can you tell? MAC. It has six pairs. An IPv6 address has eight sets of four, so the count gives it away even though both use hex. A later examiner's report notes: "IPv4 was more commonly accurate, although a common error was giving numbers greater than 255. Few candidates were able to give an IPv6 address. Common errors including giving 6 groups of numbers and separating each group with a full stop." The fix is to count out loud when you write one. Eight groups of four for IPv6, six pairs of two for MAC, and full stops only in IPv4. If you already have the MAC format, you are with the answers that scored. The same report lists them: "The most common responses given marks included identifying that it is usually in hexadecimal and that the groups are separated by colons or hyphens. Some candidates identified the two separate parts of the MAC address." Those three points make the checklist to use instead of a vague description: hexadecimal, colons or hyphens, and two parts.

Now why a device needs both. The IP address gets data to the right network, across the Internet. The MAC address gets it to the right device within that local network. It is the parcel again. The postal address crosses the country; the name on the letterbox finds the one flat in the building. Now a laptop is carried from a home network to a school network. Which of its two addresses changes, and which stays the same? The IP address changes, because the new network hands out its own. The MAC address stays, because it is built into the card.

Each address gets a question now, and the parcel gets the last one. Is ten dot twenty dot three hundred dot one a valid IPv4 address? No. Three hundred is over two hundred and fifty-five, the most one eight-bit part can hold. Now IPv6: what separates its groups, and how many groups are there? Colons, and eight groups of four hex digits. Another one: which half of a MAC address tells you who made the card? The first half. The second half is that card's own serial number. Now the parcel: why does a phone on the Internet need both addresses? The IP address gets data across networks to the right one, like the postal address. The MAC address finds the right device inside it, like the letterbox.

Every video in the chapter up to this one is listed here, this one last. Once you know all three formats cold, a thumbs up records it, and you can skip this one next time. If they still blur together, save the video for later. A few addresses written out by hand, each one counted, and the formats stop blurring.

Next in the chapter: Standards. Hopefully that's next in your feed, but if not, search for ScholaFly C S oh eight, oh four.

Every other video is on scholafly.com too, easy to search by video code or by keyword. Whatever you're revising, go there and have a look, or, watch the next video.

Related terms

For: OCR GCSE J277

On the specification

BoardSpecStatement
OCR GCSE J2771.3.2Wired and wireless networks, protocols and layers
For teachers

This GCSE Computer Science lesson teaches IP addresses and MAC addresses. By the end, students should be able to describe what an IP address and a MAC address are for, write a valid IPv4 address, a valid IPv6 address and a valid MAC address in the right format, and explain why a device needs both - the MAC address to reach it within its own network and the IP address to reach it across networks. It works through five worked examples and the mistakes examiners report.