https://github.com/cypri1-dev/42_netpractice
42 Net Practice est un projet qui développe les compétences en réseaux informatiques. Il couvre les bases des adresses IP, du routage, du subnetting et des protocoles, à travers des exercices pratiques. Les étudiants configurent et dépannent des réseaux, renforçant ainsi la compréhension des réseaux modernes.
https://github.com/cypri1-dev/42_netpractice
42 42projects netpractice netpractice-42
Last synced: 2 months ago
JSON representation
42 Net Practice est un projet qui développe les compétences en réseaux informatiques. Il couvre les bases des adresses IP, du routage, du subnetting et des protocoles, à travers des exercices pratiques. Les étudiants configurent et dépannent des réseaux, renforçant ainsi la compréhension des réseaux modernes.
- Host: GitHub
- URL: https://github.com/cypri1-dev/42_netpractice
- Owner: cypri1-dev
- Created: 2024-08-23T13:00:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-23T14:34:28.000Z (almost 2 years ago)
- Last Synced: 2025-02-01T14:18:15.478Z (over 1 year ago)
- Topics: 42, 42projects, netpractice, netpractice-42
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##
## Descrition
42 Net Practice is a project that develops skills in computer networking. It covers the basics of IP addresses, routing, subnetting, and protocols through practical exercises. Students configure and troubleshoot networks, thereby strengthening their understanding of modern networks.
## Logic
In the 42 Net Practice project, you will encounter a series of practical exercises where you will need to extract four essential pieces of information from an IP address and its subnet mask:
- `Network IP` : This is the address that identifies the subnet.
- `Range start` : This is the first usable IP address in the subnet.
- `Range end` : This is the last usable IP address in the subnet.
- `Broadcast IP` : This is the address used to send a message to all devices in the subnet.
## Calculations
In the following sections, we will use the host address `192.168.1.15/27` as an example.
## Finding the Network IP
To find the Network IP associated with our host address, we first focus on the last part of our host address: the `suffix` (192.168.1.15/`27`). This means that the first 27 bits of the address are used to identify the network, and the remaining bits are used to identify hosts within this subnet.
In binary, we can replace the first 27 bits with 1s, which gives us: `11111111.11111111.11111111.11100000`. This is called the `mask`.
Now, let's convert our host address to binary: `11000000.10101000.00000001.00001111`.
The Network IP is obtained by performing the binary operation `&` with the previous results as operands. The resulting value is: `11000000.10101000.00000001.00000000`.Once converted, the IP address is `192.186.1.0`
## Finding Range Start
This is the first usable IP address in the subnet. It immediately follows the Network IP and identifies the first device on this network. So our range start is `192.168.1.1`.
## Finding the Broadcast IP
Now let's take our `mask` and derive its inverse using the binary operation `~`: `00000000.00000000.00000000.00011111`.
The Broadcast IP is obtained by performing the binary operation `|` with the inverse of the mask and the Network IP as operands: `11000000.10101000.00000001.00011111`. Once converted: `192.168.1.31`.
## Finding Range End
This is the last usable IP address in the subnet. It precedes the Broadcast IP and identifies the last device on this network. So our range end is `192.168.1.30`.
## Conclusion
By following the above process, we obtain the following values:
- Network IP: `192.186.1.0`
- Range start: `192.168.1.1`
- Range end: `192.168.1.30`
- Broadcast IP: `192.168.1.31`