Skip to content

Expand some content #2823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 57 additions & 5 deletions docs/books/admin_guide/12-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,71 @@ The notation called CIDR is more and more frequent: 192.168.1.10/24

IP addresses are used for the proper routing of messages (packets). They are divided into two parts:

* the fixed part, identifying the network;
* the identifier of the host in the network.
* Network Bits - The part associated with consecutive "1" s in the binary subnet mask
* Host Bits - The part associated with consecutive "0" s in the binary subnet mask
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Network Bits should be "network bits" and Host Bits should be "host bits" throughout, there's no need to capitalize either. In addition, indicating the plural of the 1 and 0 should not be outside of the quotes. The quotes here are unnecessary, but if you want to use them, put the plural inside the quotes as well. Either 1s or "1s" (same with 0).

Otherwise this looks good @jimcat8!


The subnet mask is a set of **4 bytes** intended to isolate:
```
|<- Host Bits ->|
|<-- Network Bits -->|
192.168.1.10 ==> 11000000.10101000.00000001.00001010
255.255.255.0 ==> 11111111.11111111.11111111.00000000
```

The subnet mask is used to define the Network Bits and Host Bits of an IP address. By using subnet mask, we can determine the current IP address:

* the network address (**NetID** or **SubnetID**) by performing a bitwise logical AND between the IP address and the mask;
* the host address (**HostID**) by performing a bitwise logical AND between the IP address and the complement of the mask.

```
192.168.1.10 ==> 11000000.10101000.00000001.00001010
255.255.255.0 ==> 11111111.11111111.11111111.00000000

NetID 11000000.10101000.00000001.00001010
192 . 168 . 100 . 0

HostID 00000000.00000000.00000000.00001010
0 . 0 . 0 . 10
```

**Legitimate subnet mask** - In order from left to right, consecutive 1s can be defined as valid subnet masks.

```
legitimate 11111111.11111111.11111111.00000000

illegitimate 11001001.11111111.11111111.00000000
```

!!! tip

The IP address and subnet mask must appear in pairs, which is determined by the basic principles of network communication.

There are also specific addresses within a network, which must be identified. The first address of a range as well as the last one have a particular role:

* The first address of a range is the **network address**. It is used to identify networks and to route information from one network to another.
* The first address of a range is the **network address**. It is used to identify networks and to route information from one network to another. This address can be obtained through Logic and Operations.

```
192.168.1.10 ==> 11000000.10101000.00000001.00001010
255.255.255.0 ==> 11111111.11111111.11111111.00000000

network address 11000000.10101000.00000001.00000000
192 . 168 . 100 . 0
```

**Logic and Operations** - When both are true (1), the result is true (1); otherwise, it is false (0)

* The last address of a range is the **broadcast address**. It is used to broadcast information to all the machines on the network. Keep the Network Bits unchanged and replace all Host Bits with 1 to obtain the this address.

```
192.168.1.10 ==> 11000000.10101000.00000001.00001010
255.255.255.0 ==> 11111111.11111111.11111111.00000000

broadcast address 11000000.10101000.00000001.11111111
192 . 168 . 100 . 255
```

!!! tip

* The last address of a range is the **broadcast address**. It is used to broadcast information to all the machines on the network.
These two addresses that play special roles **cannot** be assigned to the terminal machine for use.

### MAC address / IP address

Expand Down