networking:subnet_masks:introduction_to_ip_addresses_and_subnetting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
networking:subnet_masks:introduction_to_ip_addresses_and_subnetting [2020/08/19 16:02] – 192.168.1.1 | networking:subnet_masks:introduction_to_ip_addresses_and_subnetting [2020/08/19 16:11] (current) – 192.168.1.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Networking - Subnet Masks - Introduction to IP Addresses and Subnetting ====== | ====== Networking - Subnet Masks - Introduction to IP Addresses and Subnetting ====== | ||
+ | |||
+ | An IP address contains a **network** portion and a **host** portion. | ||
+ | |||
+ | The **netmask** determines the division between these portions. | ||
+ | |||
+ | Together the operating system can determine which IPs are part of the local subnet and which ones are outside. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== The Classless Internet Domain Routing (CIDR) Notation ===== | ||
+ | |||
+ | An IPv4 IP address (32 bits) of 192.168.1.200 with a subnet mask of 255.255.255.0 is represented in CIDR notation as: 192.168.1.200/ | ||
+ | |||
+ | * The network address is 192.168.1.0 (Logical AND between the address and the netmask). | ||
+ | * There' | ||
+ | * Only 254 addresses are usable because the first one is used for the network address and the last is the broadcast address. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | If we use 192.168.1.200/ | ||
+ | |||
+ | The way to find out the number of subnets and hosts is simple. | ||
+ | |||
+ | * Find out the number of added bits (26-24 = 2). | ||
+ | * Find out how many bits are left (8-2 = 6). | ||
+ | * Calculate 2^6 and you get 64. This is the number of hosts per subnet. | ||
+ | * For the total number of subnets all you do is divide 256/64 and we'll get 4 subnets. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | A table might make this clearer: | ||
+ | |||
+ | ^MASK BITS^# OF SUBNETS^# OF HOSTS^ADDED BITS^SUBNET MASK BITS (DEC)^ | ||
+ | |/ | ||
+ | |/ | ||
+ | |/ | ||
+ | |/ | ||
+ | |/ | ||
+ | |/ | ||
+ | |/ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | The next steps is to find: | ||
+ | |||
+ | * Network Address of the IP | ||
+ | * Broadcast Address of the IP | ||
+ | |||
+ | Let's take for example 192.168.1.75/ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Summary ===== | ||
+ | |||
+ | So what's the point of all this madness? | ||
+ | |||
+ | Here's a real world example. | ||
networking/subnet_masks/introduction_to_ip_addresses_and_subnetting.1597852955.txt.gz · Last modified: 2020/08/19 16:02 by 192.168.1.1