Cis81 E1 6 IPv4Addresses Part1
Cis81 E1 6 IPv4Addresses Part1
Spring 2010
This Presentation
For a copy of this presentation and access to my web site for other
CCNA, CCNP, and Wireless resources please email me for a
username and password.
Email: [email protected]
Web Site: www.cabrillo.edu/~rgraziani
2
Note
3
Number Systems
www.thinkgeek.com
5
Base 10 (Decimal) Number System
Digits (10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Number of:
104 103 102 101 100
10,000’s 1,000’s 100’s 10’s 1’s
1,309 1 3 0 9
99 9 9
100 1 0 0
6
Number System Rules
1. All digits start with 0
2. A Base-n number system has n number of digits:
Decimal: Base-10 has 10 digits
Binary: Base-2 has 2 digits
Hexadecimal: Base-16 has 16 digits
3. The first column is always the number of 1’s
Number of:
27 ___ ___ ___ 23 22 21 20
128’s 8’s 4’s 2’s 1’s
Dec.
2 1 0
10 1 0 1 0
17
70
130
255
8
Digits (2): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s
Dec.
2 1 0
10 1 0 1 0
17 1 0 0 0 1
70 1 0 0 0 1 1 0
130 1 0 0 0 0 0 1 0
255 1 1 1 1 1 1 1 1
9
Digits (2): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s
Dec.
1 0 0 0 1 1 0
1 0 1 0 0 0
0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
172
192
10
Digits (2): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s
Dec.
70 1 0 0 0 1 1 0
40 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0
128 1 0 0 0 0 0 0 0
172 1 0 1 0 1 1 0 0
192 1 1 0 0 0 0 0 0
11
Rick’s Program
12
Rick’s Program
13
Rick’s Program
14
Binary
to/from
Decimal
15
IPv4 Addresses
IPv4 Addresses
17
IPv4 Addresses
IPv4 Addresses are 32 bit addresses:
1010100111000111010001011000100
18
IPv4 Addresses
An IP address has two parts:
network number
host number
19
IPv4 Addresses
Answer:
Newer technology - Classless IP Addressing
The subnet mask determines the network portion and the host
portion.
Value of first octet does NOT matter (older classful IP addressing)
Hosts and Classless Inter-Domain Routing (CIDR).
Classless IP Addressing is what is used within the Internet and in
most internal networks.
20
Types of
Addresses
Network
Addresses have
all 0’s in the host
portion.
Broadcast
Addresses have
all 1’s in the host
portion.
Host Addresses
can not have all
0’s or all 1’s in the
host portion.
11111111111111110000000000000000
Subnet Mask
Used to define the:
Network portion
Host portion
32 bits
Contiguous set of 1’s followed by a contiguous set of 0’s
1’s: Network portion
0’s: Host portion
24
Dividing the Network and Host Portions
11111111.11111111.00000000.00000000
Expressed as:
Dotted decimal
Ex: 255.255.0.0
Slash notation or prefix length
/16 (the number of one bits)
25
Network
Addresses
26
Example 1
Network Address: 192.168.1.0
Subnet Mask: 255.255.255.0
192.168.1.0
Network Host
172.0.0.0
Network Host
28
Example 3
Network Address: 172.0.0.0
Subnet Mask: 255.255.0.0
172.0.0.0
Network Host
29
Subnet Masks – Your Turn!
Underline the network portion of each address:
Network Address Subnet Mask
172.0.0.0 255.0.0.0
172.16.0.0 255.255.0.0
192.168.1.0 255.255.255.0
192.168.0.0 255.255.0.0
192.168.0.0 255.255.255.0
10.1.1.0 /24
10.2.0.0 /16
10.0.0.0 /16
30
Subnet Masks – Your Turn!
Underline the network portion of each address:
Network Address Subnet Mask
172.0.0.0 255.0.0.0
172.16.0.0 255.255.0.0
192.168.1.0 255.255.255.0
192.168.0.0 255.255.0.0
192.168.0.0 255.255.255.0
10.1.1.0 /24
10.2.0.0 /16
10.0.0.0 /16
31
Why the mask matters: Number of hosts!
Subnet Mask: 1st octet 2nd octet 3rd octet 4th octet
255.0.0.0 or /8 Network Host Host Host
255.255.0.0 or /16 Network Network Host Host
255.255.255.0 or /24 Network Network Network Host
The more host bits in the subnet mask means the more hosts in the
network.
Subnet masks do not have to end on “natural octet boundaries”
32
Subnet: 255.0.0.0 (/8)
33
Subnet: 255.255.0.0 (/16)
8 bits 8 bits
With 16 bits available for hosts,
there a 216 possible addresses.
That’s 65,536 nodes!
65,534 host addresses, one for network address and one for
broadcast address.
34
Subnet: 255.255.255.0 (/24)
8 bits
With 8 bits available for hosts,
there a 28 possible addresses.
That’s 256 nodes!
254 host addresses, one for network address and one for
broadcast address.
35
IP Addresses
36
Broadcast
Addresses
37
Subnet Masks – Your Turn!
What is the broadcast address of each network:
Network Address Subnet Mask Broadcast Address
172.0.0.0 255.0.0.0
172.16.0.0 255.255.0.0
192.168.1.0 255.255.255.0
192.168.0.0 255.255.0.0
192.168.0.0 255.255.255.0
10.1.1.0 /24
10.2.0.0 /16
10.0.0.0 /16
38
Subnet Masks – Your Turn!
What is the broadcast address of each network:
Network Address Subnet Mask Broadcast Address
172.0.0.0 255.0.0.0 172.255.255.255
172.16.0.0 255.255.0.0 172.16.255.255
192.168.1.0 255.255.255.0 192.168.1.255
192.168.0.0 255.255.0.0 192.168.255.255
192.168.0.0 255.255.255.0 192.168.0.255
10.1.1.0 /24 10.1.1.255
10.2.0.0 /16 10.2.255.255
10.0.0.0 /16 10.0.255.255
39
Bringing it
all together
41
Bringing it all together
Convert these addresses and masks to Binary (to be used
later)
192.168.10.100/24
45
Range of hosts – Your Turn!
Network Address Subnet Mask Broadcast Address
172.0.0.0 255.0.0.0 172.255.255.255
172.0.0.1 through 172.255.255.254
47
Range of hosts – Your Turn!
Host Addresses in binary
50
Range of hosts – The rest…
Host Addresses in binary
52
Subnet Masks: Non-Natural Boundaries
Subnet masks do not have to end on natural octet
boundaries
Convert these to binary:
192.168.1.0 255.255.255.224
53
Subnet Masks: Non-Natural Boundaries
Subnet masks do not have to end on natural octet
boundaries
172.1.16.0 10101100.00000001.00010000.00000000
255.255.240.0 11111111.11111111.11110000.00000000
54
Subnet Masks: Non-Natural Boundaries
Subnet masks do not have to end on natural octet
boundaries
172.1.16.0 10101100.00000001.00010000.00000000
255.255.240.0 11111111.11111111.11110000.00000000
172.1.16.1 10101100.00000001.00010000.00000001
172.1.16.2 10101100.00000001.00010000.00000010
172.1.16.3 10101100.00000001.00010000.00000011
…
172.1.16.255 10101100.00000001.00010000.11111111
172.1.17.0 10101100.00000001.00010001.00000000
172.1.17.1 10101100.00000001.00010001.00000001
…
172.1.31.254 10101100.00000001.00011111.11111110
55
Subnet Masks: Non-Natural Boundaries
Subnet masks do not have to end on natural octet
boundaries
172.1.16.0 10101100.00000001.00010000.00000000
255.255.240.0 11111111.11111111.11110000.00000000
172.1.16.1 10101100.00000001.00010000.00000001
…
172.1.31.254 10101100.00000001.00011111.11111110
172.1.31.255 10101100.00000001.00011111.11111111
(broadcast)
56
Subnet Masks: Non-Natural Boundaries
Subnet masks do not have to end on natural octet
boundaries
192.168.1.0 11000000.10101000.00000001.00000000
255.255.255.224 11111111.11111111.11111111.11100000
192.168.1.1 11000000.10101000.00000001.00000001
192.168.1.2 11000000.10101000.00000001.00000010
192.168.1.3 11000000.10101000.00000001.00000011
…
192.168.1.29 11000000.10101000.00000001.00011101
192.168.1.30 11000000.10101000.00000001.00011110
192.168.1.31 11000000.10101000.00000001.00011111
(broadcast)
57
Subnet Masks: Non-Natural Boundaries
Subnet masks do not have to end on natural octet
boundaries
192.168.1.0 11000000.10101000.00000001.00000000
255.255.255.224 11111111.11111111.11111111.11100000
192.168.1.1 11000000.10101000.00000001.00000001
…
192.168.1.30 11000000.10101000.00000001.00011110
192.168.1.31 11000000.10101000.00000001.00011111
(broadcast)