Академический Документы
Профессиональный Документы
Культура Документы
IP Addressing
Basic Addressing Working with Addresses Summarization & Subnets VLSM Working with VLSM Networks Classful Addressing Working with Classful Addressing
Basic Addressing
IP addresses are written in dotted decimal format. Four sections are separated by dots. Each section contains a number between 0 and 255.
Dots separate the sections
10.1.1.1
Basic Addressing
Why is each section a number between 0 and 255?
Computers operate in binary, humans operate in decimal. Computers treat IP addresses as a single large 32 digit binary number, but this is hard for people to do. So, we split them up into four smaller sections so we can remember and work with them better!
Basic Addressing
10.1.1.1
32/4 == 8. 00001010 00000001 00000001 00000001 28 = 256. 8 8 8 8 But, computers number 32 starting at 0, so to make a space of 256 numbers, we Each 8 digit group represents a number between 0 and 255 number from 0 to 255.
Basic Addressing
Each device on a network is assigned an IP address. Each IP address has two fundamental parts:
10.1.1.1
The network portion, which describes the physical wire the device is attached to. The host portion, which identifies the host on that wire. How can we tell the difference between the two sections?
Network
Host
Basic Addressing
The network mask shows us where to split the network and host sections. Each place there is a 1 in the network mask, that binary digit belongs to the network portion of the address. Each place there is a 0 in the network mask, that binary digit belongs to the host portion of the address.
10.1.1.1
Network
255.255.255.0
Host
Basic Addressing
An alternative set of terminology is:
The network portion of the address is called the prefix. The host portion of the address is called the host. The network mask is expressed as a prefix length, which is a count of the number of 1s in the subnet mask. 10.1.1.1
Prefix
Host
= 24
10.1.1.1/24
Basic Addressing
The network address is the IP address with all 0s in the host bits. The broadcast address is the IP address with all 1s in the host bits. Packets sent to either address will be delivered to all the hosts connected to the wire.
10 00001010
prefix
1 1 000000011 00000001
0/24 00000000
host
these bits are 0, so this is the network address 10 00001010 prefix 1 1 000000011 00000001 255/24 11111111 host
192.168.100.80/26 ????
0 0 0 0 0 0
48
24 12 6 3 1 0
remainder
divide by 2 remainder divide by 2 remainder divide by 2 remainder divide by 2 remainder divide by 2 remainder
Left
Right
If you have a prefix length, just wrote down the number of 1s. If you have a network mask, computer the binary as with the IP address.
AND these two. Convert back to dotted decimal. This is the network address.
If you have a prefix length, just wrote down the number of 1s. If you have a network mask, computer the binary as with the IP address.
NOR these two. Convert back to dotted decimal. This is the host address.
32
16 8 4 2 1
1
0 1 0 0 0
32
0 8 0 0 0 168
255.255.255.192 8 +8 +8 +2 == 26
The remainder tells us what the network address in the fourth octet is
1 2 4 8 16 32 64 128
1 2 4 8 16 32 64 128
64 addresses 64 - 2 == 62 hosts
64 + (64 - 1) == 127 192.168.100.127 is the broadcast address
Take the prefix length and divide by 8. Take the resulting number, and ignore those octets out of the IP address--these are all part of the network address! Were going to use the remainder to find the third octet of the network address.
The remainder tells us what the network address in the third octet is
1 2 4 8 16 32 64 128
4 x 25 == 100 4 x 26 == 104 Third octet is 100! Set the fourth octet to 0. 192.168.100.0/22
1 2 4 8 16 32 64 128
10.1.1.0/26
Changing the mask bit from 1 to 0, which shortens the prefix length, means the bit in the two networks that distinguish them from one another are now considered host bits!