This project was developed for 42 school. For comprehensive information regarding the requirements, please consult the PDF file in the subject folder of the repository. Furthermore, I have provided my notes and a concise summary below.
+ keywords: how TCP/IP addressing works
+ efficient allocation of address space is necessary
+ subnetting (network -> how big, host -> how many)
+ IPv4 (32 bits) - subnet mask (bitwise AND operation yields the routing prefix)
- Subnet: logical division of an IP network (dividing a network into two or more network is called subnetting) => network number or routing prefix, and the rest field or host identifier.
- The rest field is an identifier for a specific host or network interface.
- The routing prefix may be expressed as the first address of a network, written in Classless Inter-Domain Routing (CIDR) notation, followed by a slash character (/), and ending with the bit-length of the prefix.
- For example, 198.51.100.0/24 is the prefix of the Internet Protocol version 4 network starting at the given address, having 24 bits allocated for the network prefix, and the remaining 8 bits reserved for host addressing. Addresses in the range 198.51.100.0 to 198.51.100.255 belong to this network, with 198.51.100.255 as the subnet broadcast address.
- Calculate how many host bits you need to hack
255.255.255.0 = 11111111.11111111.11111111.00000000
10.1.1.0
; - Save the host bits. How many do we need?
e.g. consider you have to find space for at least 40 hosts, 3 networks => 6 bits
; - Find the increment = last network bit. It is used to create the network (how big they are, network ranges).
E.g. following the previous example it would be 64
; - Create your networks
10.1.1.0 - 10.1.1.63 /26 => it is 63 because we are couting zero
10.1.1.64 - 10.1.1.127 /26
10.1.1.128 - 10.1.1.191 /26
255.255.255.192 = 11111111.11111111.11111111.11000000
Subnet
Let’s subnet your home network // You SUCK at subnetting // EP 6
Guide to NetPractice
Subnet Calculator
Internet Primer - CS50 Shorts