A collection of topics related to networking.
Note: this deals entirely with IPv4, IPv6 isn't covered.
Subnets (sub-networks) are the divisions of a network into smaller networks. A subnet has a size, the number of hosts the subnet can address. The size of a subnet is determined by its subnet mask, which is also how we work out what the network address is of any given IP address.
There are two special addresses in every subnet. The highest address in a subnet is the broadcast address. Any message sent to this address will go to all hosts on the subnet. The lowest address is the address of the network itself. Neither of these addresses will (in this course) be assigned to hosts on the network.
$\mathrm{a.b.c.d/x}$ where $a,b,c,d \in {0 .. 255}; x \in {0 .. 32}$
$\mathrm{a.b.c.d}$ is the network address and $x$ is the number of leading 1s in the subnet mask
100.123.42.0/24 indicates a network address of 100.123.42.0 and a mask of 255.255.255.0, the mask being equivalent to the binary value 1111 1111 1111 1111 1111 1111 0000 0000 (note the 24 ones in the mask matches the CIDR notation's /24)
Bob has an IP of $192.168.1.43$ and subnet mask of $255.255.255.240$, what is his network address and what is his host address? First, convert the IP address and mask into binary: $$i = 192.168.1.43 \implies 1100\:0000\;1010\:1000\;0000\:0001\;0010\:1011$$ $$m = 255.255.255.240 \implies 1111\:1111\:1111\;1111\:1111\:1111\;1111\:0000$$ The network address is the result of a bitwise and ($\&$) of IP and mask: $$i\;\&\; m \implies 1100\:0000\;1010\:1000\;0000\:0001\;0010\:0000 \implies 192.168.1.32$$ The host address is the result of a bitwise and of IP and the negation ($\neg$) of the mask (negating flips the bits, remember): $$i\;\&\; \neg m \implies 0000\:0000\;0000\:0000\:0000\;0000\:0000\;1011 \implies 0.0.0.11$$
If two IP addresses with the same subnet mask do not have the same network address, they are on different networks. E.g. Using the subnet mask $255.255.255.240$, the IPs $192.168.0.7$ and $192.168.0.17$ aren't on matching subnets (the first is on the network $192.168.0.0$ and the second is on the network $192.168.0.16$). You can see from this (and the mask) that there are 16 addresses in each subnet of this size and each of the subnets has its network address as a multiple of 16 ($...0.16$, $...0.32$, etc).
From that fact we can find the smallest subnet that any two (or more) hosts belong to. Lets use $10.174.168.54$ and $10.174.163.129$ (if using more hosts, just take the lowest address and the highest address). Our subnet mask is $???.???.???.???$
Reading from left octet to right octet, find the first they differ in. In this case, that's the third octet ($163$ vs $168$). We can now fill three of our subnet octets since the mask is always a block of $1$s followed by a block of $0$s. Our subnet mask is now $255.255.???.000$
Find the distance between the two values in the octet that changes. For a subnet to contain both $163$ and $168$, it must cover a range of at least $6$ ($163, 164, 165, 166, 167, 168$). Since we can tell from above that the size of a network is always a power of $2$, that means that the range is at least $8$ and the initial guess of our missing octet will use a size of 8, thus our mask becomes $255.255.248.0$ (the third octect being $1111 1000$ to allow for a range of $8$ in those zeroed bits).
Using that initial guess, check the addresses have the same network address. If they are the same, you have found the smallest subnet containing the addresses. If they are not the same, you need to go a step further. in this case they will be $10.174.160.0$ and $10.174.168.0$, which are different networks. Until they are on the same network, change the last $1$ bit in your mask to $0$, doubling the size of the subnet. This changes the mask to $255.255.240.0$, which when used to calculate the network addresses of those IPs results in both the network addresses being $10.174.160.0$.
NOTE: If an IP given is also the broadcast or network address of your smallest subnet, you'll need to make it larger. For the purposes of the course, assume that those addresses will never be assigned to hosts.