Uni-Sine
Computer ScienceCourses

IP Addressing & Protocols: an interactive course

IP Addressing & Protocols is an interactive IP addressing course about how devices find each other on a network. Its 25 short sections cover IPv4 addresses as four octets of bits, network and host parts, subnet masks and CIDR prefixes, network and broadcast addresses, counting hosts, ports, TCP and UDP, private addresses and NAT, DHCP, DNS and IPv6.

More than half the sections are practice, with random addresses each time, so subnetting goes from confusing to routine.

What the course covers

SectionsTopicWhat you do
1 to 3What an IP address is: four numbers, 32 bitsRead the value of an octet from its bits
4 to 5Network part and host partDecide whether two addresses are on the same network
6 to 9Subnet masks, CIDR prefixes and network addressesTurn masks into prefixes, then find the network address
10 to 12Broadcast addresses, host ranges and host countsSort addresses into network, host or broadcast, then count hosts
13 to 16Ports, TCP and UDPMatch well-known ports to services, then choose TCP or UDP
17 to 19Private addresses and NATSpot private addresses, then route a reply through NAT
20 to 23DHCP and DNSFill in the DHCP messages, then order a DNS lookup
24 to 25IPv6Shorten an IPv6 address

Addresses and subnets

An IPv4 address such as 192.168.1.20 is four octets, each 8 bits, so each number runs from 0 to 255. A subnet mask, or a CIDR prefix such as /24, says how many bits are the network part; the rest identify the host. From the mask you can find the network address, the broadcast address and how many devices fit. Our guides to IP addresses and subnet masks go deeper on both.

Ports and transport

An IP address gets data to a device; a port number gets it to the right program, such as 443 for secure web pages. TCP opens a connection with a three-way handshake and resends anything lost, while UDP skips both for speed. See what is TCP for more.

Everyday services

Private addresses only work inside a home or office, and NAT lets them share one public address. DHCP hands each new device an address automatically, DNS turns names into addresses, and IPv6 uses 128-bit addresses because IPv4 has run short.

Try a question from the course

Each octet is 8 bits, and the leftmost bit is worth 128, halving each step to the right. The octet 11000000 has 1s under 128 and 64, so its value is 192. The octet 10101000 has 1s under 128, 32 and 8, which add up to 168.

Now read a new octet, then press Mark to check your answer in the course.

Turn one octet of an address from binary to decimal, or decimal to 8 bits.

Press Mark to have your answer marked in the IP Addressing & Protocols course.

Who this course is for

  • A-level and university computing students learning subnetting, TCP and UDP and network services.
  • GCSE students who want to go beyond the basics of IP addresses and protocols.
  • Beginners in IT and networking who need subnetting to become second nature.

What you need to know first

The course page lists Binary, Hexadecimal & Decimal and Networking Hardware first. Binary is essential: subnetting is mostly reading and comparing bits.

How long it takes

There are 25 sections and most take a few minutes. Learners without a plan can open two sections of a course a day, in order, so the whole course takes 13 days. A plan removes the daily limit and lets you go straight to any topic, such as counting hosts.

Interactive calculatorNumber Base ConverterConvert octets between binary and decimal as you practise subnetting.

Common questions

Is this IP addressing course free?
You can take every section without paying, two sections a day, in order. A plan removes the daily limit and opens any section straight away.
What is a subnet mask?
A 32-bit number that marks which part of an IP address is the network and which is the host. 255.255.255.0, or /24, means the first 24 bits are the network part.
How many hosts are in a /24 network?
There are 8 host bits, which gives 2⁸ = 256 addresses. Two are reserved, the network address and the broadcast address, leaving 254 usable hosts.
What is the difference between TCP and UDP?
TCP sets up a connection, numbers the data and resends anything lost, so it is reliable. UDP just sends, which is faster and suits video calls and games where late data is useless.
What do DHCP and DNS do?
DHCP gives a device an IP address automatically when it joins a network. DNS looks up the IP address that belongs to a name you type, so your device knows which server to contact.
Why do we need IPv6?
IPv4 has about 4.3 billion addresses, which is not enough for every device. IPv6 uses 128-bit addresses, giving far more than will ever be needed.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Number Base Converter

    Convert between binary, hex and decimal and add in binary

    Open the tool
  • Learn it

    IP Addressing & Protocols

    IPv4, IPv6, subnetting and the protocols that power the internet

    Start the course
  • Test it

    GCSE Computer Science

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Computer Science · NetworksWhat is an IP address? IPv4, IPv6 and how to find yoursWhat an IP address is and how it works: IPv4 and IPv6, public vs private, static vs dynamic, what your IP reveals and how to find yours.