side_notes
There is confusion between:
- IP protocol
- IP address
IP address:
- The IP address is an identifier (ID).
- It can be either public or private
- It is assigned to a network interface (NOT the device as a whole)
How to read:
Example: 192.168.1.34/24
Each octet is a number from 0 to 255.
-
We read the prefix length (after the /).
get the 8th root of the number. The result will be the length of the network address
example: (24)^(1/8) = 3 => making the first 3 octets for the network address. -
The remaining octet(s) is the device’s(host)
The router ignores the host part; it forward packets based on : **192.168.1.0/24**
“To reach any device in 192.168.1.x, send packets this way.”
- **Special addresses (in a /24 network):
| Address | Meaning |
|---|---|
192.168.1.0 | Network ID (not a device) |
192.168.1.255 | Broadcast |
192.168.1.1 | Often the router |
192.168.1.34 | A host |
| An IP address is a logical location: the prefix identifies the network, and the remaining bits identify the device inside that network. |
IP protocol:
- The IP protocol wraps data into IP packets.
- IP is NOT a packet, IP create packets.
We say that IP is packet-based because:
- Does not maintain connections
- Sends independent packets
- Each packet is routed separately
This is called connectionless networking