Networking Notes 2 - Addressing
Network Notes 2
IPv4
Each IPv4 have 4 byte, 5 classes
Class - 2-level hierarchy of IP address(Netid+Hostid)
- A: Byte1 Netid; Byte2,3,4 Hostid
- B: Byte1,2 Netid; Byte 3,4 Hostid
- C: Byte1,2,3 Netid; Byte 4 Hostid
- D: The address range of IP Multicast, is 224.0.0.0 ~ 239.255.255.255.
- E: The address range of ?,240.0.0.0~255.255.255.255
I should only focus on ABC here.
The 2-level hierarchy of IP addresses is not sufficient for organizations
Subnetting
We usually want to division of a network into smaller networks(subnet).
We have 3 level of IDs of hierarchy
- NetID
- SubnetID
- HostID
In a subnet, Device can phtsically reach each other without intervening router.
Masking
Masking is the process of extracting the network address from an IP address
- Default Mask: used by routers outside
- Subnet MaskL used by route inside
Mask
- 32 bits long
- NetID = 1
- HostID = 0
IP address Essentially a binary number
Example:11111111 00000000 00000000 00000000 = 255.0.0.0
Masking is AND
operation of the IP address
The 11111111
is the netID and the 0s
is HostID.
NetIDs are managed by Regional Internet Registries
- APNIC (Asia)
- ARIN (American)
- LACNIC (Latin American)
- RIPE NCC (Europe)
HostIDs are managed by the network administrator(owner of the NetID)
CIDR - Classless InterDomain Routing
The length of the network prefix in IP addresses is kept arbitrary.
Networking Notes 2 - Addressing