Beruflich Dokumente
Kultur Dokumente
THE BASICS
Base-2
Only two tokens 0 and 1
Places are powers of 2
Power of 27 26 25 24 23 22 21 20
2
Value 128 64 32 16 8 4 2 1
IP Addressing Binary Sequence
Decimal Binary
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
IP Addressing Structure
Convert Binary to Decimal
What is 1010 1100 in decimal?
Write
out
the
powers
of
2
(from
Right
to
Left)
Power
27
26
25
24
23
22
21
20
Value
128
64
32
16
8
4
2
1
Write
the
bits
of
the
given
Binary
number
under
the
correct
place
values
Power
27
26
25
24
23
22
21
20
Value
128
64
32
16
8
4
2
1
1
0
1
0
1
1
0
0
Add
up
the
Values
where
the
given
binary
number
has
a
1
128
+
32
+
8
+
4
=
172
172 = 1 0 1 0 1 1 0 0
IP Addressing Structure
Practice converting decimal to 8-bit binary
Convert whole IP address to Binary
Just do each octet on its own!
Fill out Octet with leading 0's.
172 . 17 . 13 . 57
1010 1100 . 0001 0001 . 0000 1101 . 0011 1001
172 . 17 . 11 . 16
1010 1100 . 0001 0001 . 0000 1011 . 0001 0000
Easier way
Microsoft Calculator
Start All Programs Accessories Calculator
Under View menu, choose Scientific (XP) or
Programmer (Win7)
Basic IP Addressing Review
32-bit address
Represented as four 8-bit numbers (octets)
separated by periods (dotted decimal)
8-bits gives decimal values 0 255 for each octet
e.g. 192.168.163.24
192.168.163.24
with subnet mask of 255.255.0.0
Sends to 192.168.164.145
Local or Not?
Classless Inter-Domain Routing (CIDR or
Slash Notation)
Just another way of saying same things as IP address
and Subnet Mask
100.18.73.201 /8
n 100.18.73.201 mask 255.0.0.0
Default Subnet Masks
Also called Classful subnetting
Class determined by first octet
Class A : 1 127 (0xxxxxxxx) : 255.0.0.0
n 7 bits for network ID
Class B : 128 191 (10xxxxxx) : 255.255.0.0
n 6+8 = 14 bits for network ID
Class C : 192 223 (110xxxxx) : 255.255.255.0
n 5+8+8=21 bits for network ID
204.153.163.200
First
octet (204) between 192 and 223
Class C network
Class B
Happy Medium
n 16,384 (214) networks; 65,534 (216 - 2) hosts per net
Class C
Lotsof networks (221 = 2,097,152)
Only 254 (28 - 2) hosts per network
Example network
Multiple Class C networks
201.47.51.0 201.47.52.0
201.47.50.0 201.47.54.0
201.47.53.0
Multi-Class C Plus/Minus
Positives
Each sub-network has own network address
All subnets can be routed out to Internet
Negatives
Need multiple, full, Class-C addresses
(good luck)
Private IP Addresses
Reserved by Internet committees for internal, private
use
Not routable on The Internet
1 class A :: 10.0.0.0
APIPA :: 169.254.0.0
Automatic Private IP Addressing
Use Private IP addresses
192.168.10.0 192.168.20.0
Negatives
Need something else to get out to internet
n Network Address Translation (NAT)
n Translates the Private addresses inside into a real address
on the outside
Use of NAT
IP Addressing Basics Summary
IP address is 32-bits long
Part of IP address will be network
Rest of IP address with be host
Number of bits in network determined by Subnet Mask
Each node must have unique IP address