Chabot College ELEC 99.05 IP Addressing CISCO NETWORKING ACADEMY

advertisement
Chabot College
ELEC 99.05
IP Addressing
CISCO NETWORKING ACADEMY
Logical Address Composition
Though the exact length and format of a
logical (layer 3) address differs
depending on the protocol, all logical
addresses share this basic formula:
NETWORK
NUMBER
CISCO NETWORKING ACADEMY
HOST NUMBER
IP Addresses
• IP addresses are the most common
logical addresses. (Everyone on the
Internet has one.)
• 32 - bit numbers (IP version 4)
CISCO NETWORKING ACADEMY
32 bits not enough
• 32 - bits yields 232 unique numbers
• 232 = 4,294,967,296
– there are over 4 billion possible IPv4
addresses
– but many are “wasted” due to the
allocation scheme
CISCO NETWORKING ACADEMY
IPv6: The Next Generation
The newest version of IP (version 6, or IPng)
uses 128 bits, yielding
2128 unique combinations
That’s over 340,000,000,000,000,000,000,000,000,000,000,000,000
possible addresses!
CISCO NETWORKING ACADEMY
IPv4 vs. IPv6
• IPv6 is slowly be integrated in the
existing Internet.
• IPv4’s 32 bits continues to be the
dominant form of IP addressing.
CISCO NETWORKING ACADEMY
IP Addresses
We use dotted notation to represent the
value of each byte (octet) of the IPv4
address in decimal.
10101100 00011100 1110110 00001010
172
.
28 .
118 . 10
CISCO NETWORKING ACADEMY
Dotted Decimal Notation
Which addresses are legal?
201.165.321.1
12.1.2.2
198.261.34.2
645.250.2.4
209.254.130.4
CISCO NETWORKING ACADEMY
Dotted Decimal Notation
The highest decimal number for any
octet is 255, or 11111111 in binary.
201.165.321.1
12.1.2.2
198.261.34.2
645.250.2.4
209.254.130.4
CISCO NETWORKING ACADEMY
IP Address Classes
• IPv4 uses a “class” system.
• There are 5 classes of IP addresses:
– Class A
– Class B
– Class C
– Class D
– Class E
CISCO NETWORKING ACADEMY
Address Classes
Class A
Class B
Class C
Used for Internet hosts
Used for Internet hosts
Used for Internet hosts
Class D
Class E
Used for Internet multicasts
Unused (used “experimentally”)
Computers on the Internet can only be addressed
using Class A, Class B, or Class C addresses.
CISCO NETWORKING ACADEMY
Determining Address Class
Class A
Class B
Class C
First octet is between
0 - 127
First octet is between 128 - 191
First octet is between 192 - 223
Class D
Class E
First octet is between 224 - 239
First octet is between 240 - 255
What is special about these numbers?
CISCO NETWORKING ACADEMY
What class is 180.129.41.9?
Class A
Class B
Class C
First octet is between 0 - 127
First octet is between 128 - 191
First octet is between 192 - 223
Class D
Class E
First octet is between 224 - 239
First octet is between 240 - 255
Class B
CISCO NETWORKING ACADEMY
What class is 224.0.0.9?
Class A
Class B
Class C
First octet is between 0 - 127
First octet is between 128 - 191
First octet is between 192 - 223
Class D
Class E
First octet is between 224 - 239
First octet is between 240 - 255
Class D
CISCO NETWORKING ACADEMY
What class is 207.21.54.25?
Class A
Class B
Class C
First octet is between 0 - 127
First octet is between 128 - 191
First octet is between 192 - 223
Class D
Class E
First octet is between 224 - 239
First octet is between 240 - 255
Class C
CISCO NETWORKING ACADEMY
Class-what’s the difference?
• The address class can be used to
determine:
– network number
– host address
NETWORK
NUMBER
CISCO NETWORKING ACADEMY
HOST NUMBER
Address Classes
1st octet
2nd octet
3rd octet
4th octet
Class A
Network
Host
Host
Host
Class B
Network Network
Host
Host
Class C
Network Network Network
CISCO NETWORKING ACADEMY
Host
Address Classes
Class A
85
45
31
158
Class B
168
65
114
201
Class C
210
144
235
56
Network
Host
CISCO NETWORKING ACADEMY
Which part is network?
199.46.36.5
199.46.36.5
111.211.11.1
111.211.11.1
7.141.30.89
7.141.30.89
CISCO NETWORKING ACADEMY
Which part is network?
222.8.56.107
222.8.56.107
192.168.16.2
192.168.16.2
163.100.5.1
163.100.5.1
CISCO NETWORKING ACADEMY
Network Numbers
• A network number is the address of the
network itself.
• It is not the address of any host on the
network.
• Network numbers are reserved and
cannot be assigned to any host.
CISCO NETWORKING ACADEMY
Network Numbers by Class
Following are examples of network numbers.
Notice that the entire host portion is 0.
1st octet
2nd octet
3rd octet
4th octet
Class A
63
0
0
0
Class B
142
56
0
0
Class C
209
126
155
0
Network numbers are reserved, and cannot be
assigned to any workstation.
CISCO NETWORKING ACADEMY
Network Numbers
How do you write a network number?
Set the entire host portion to all zeros.
84.124.51.1 (host address)
84.0.0.0 (network number)
170.98.34.2 (host address)
170.98.0.0 (network number)
CISCO NETWORKING ACADEMY
Broadcast Address
• Packets sent to a broadcast address will be
sent to all hosts on the network.
• A broadcast address is not the address of
any host on the network.
• Broadcast addresses are reserved and
cannot be assigned to any host.
CISCO NETWORKING ACADEMY
Broadcast Addresses by Class
Following are examples of broadcast addresses.
Notice that the entire host portion is 255.
1st octet
2nd octet
3rd octet
4th octet
Class A
63
255
255
255
Class B
142
56
255
255
Class C
209
126
155
255
Broadcast addresses are reserved, and cannot be
assigned to any workstation.
CISCO NETWORKING ACADEMY
Broadcast Addresses
How do you write a broadcast address?
Set the entire host portion to all ones.
84.124.51.1 (host address)
84.255.255.255 (broadcast address)
170.98.34.2 (host address)
170.98.255.255 (broadcast address)
CISCO NETWORKING ACADEMY
The Network Number
• Because the network number provides
logical order, it can not be randomly
assigned.
• One organization administrates IP
addressing.
CISCO NETWORKING ACADEMY
InterNIC
• The management of IP addresses has
been the responsibility of an
organization known as InterNIC.
• Currently, Network Solutions (Verisign)
controls InterNIC.
CISCO NETWORKING ACADEMY
Class A addresses
First octet is between 0 - 127
Network
Number
between 0 - 127
CISCO NETWORKING ACADEMY
Host
Host
Host
8 bits
8 bits
8 bits
With 24 bits available for hosts,
there are 224 possible addresses.
That’s 16,777,216 nodes!
Class A addresses
• There are 126 class A addresses.
– 0 and 127 have special meaning and are
not used.
• Only large organizations such as the military,
government agencies, universities, and large
corporations have class A addresses.
• Cable Modem ISPs have 24.0.0.0
• Pacbell DSL users have 63.0.0.0
CISCO NETWORKING ACADEMY
Class A addresses
• Class A addresses account for 2,147,483,648
of the possible IPv4 addresses.
• That’s 50 % of the total unicast address
space!
CISCO NETWORKING ACADEMY
Class B addresses
First octet is between 128 - 191
Network Network
Number
between
128 - 191
CISCO NETWORKING ACADEMY
Host
Host
8 bits
8 bits
With 16 bits available for hosts,
there are 216 possible addresses.
That’s 65,536 nodes!
Class B addresses
• There are 16,384 (214) class B networks.
• Class B addresses represent 25% of the
total IPv4 unicast address space.
• Class B addresses are assigned to large
organizations including corporations
(such as Cisco, government agencies,
and school districts).
CISCO NETWORKING ACADEMY
Class C addresses
First octet is between 192 - 223
Network Network Network
Host
8 bits
Number
between
192 - 223
CISCO NETWORKING ACADEMY
With 8 bits available for hosts,
there are 28 possible addresses.
That’s 256 nodes!
Class C addresses
• There are 2,097,152 possible class C
networks.
• Class C addresses represent 12.5% of
the total IPv4 unicast address space.
CISCO NETWORKING ACADEMY
IP address shortage
• In the early days of the Internet, IP
addresses were allocated to
organizations based on request rather
than actual need.
CISCO NETWORKING ACADEMY
No Medium Size
• 16 million
• 65,536
• 256
For most organizations, 256 is too small
a limit on hosts, yet 65,536 is far too
many.
CISCO NETWORKING ACADEMY
The Subnet Mask
• The solution to the IP address shortage
was thought to be the subnet mask.
• Formalized in 1985, the subnet mask
breaks a single class A, B or C network
in to smaller pieces.
CISCO NETWORKING ACADEMY
Class B Subnet Example
Address
Mask
Network
172
Network
28
Host
69
Host
137
255
255
0
0
8 bits
8 bits
What if 216, or 65,536, hosts is too many (it is)?
This network could be broken up in to smaller
pieces by creating subnets.
CISCO NETWORKING ACADEMY
Class B Subnet Example
Address
Mask
Network
172
Network
28
Subnet
69
Host
137
255
255
255
0
8 bits
8 bits
Note that the subnet mask in the third octet is
set to all “1”s.
Those 8 “1”s mean that all 8 of those bits are
used to determine subnetwork number.
CISCO NETWORKING ACADEMY
Class B Subnet Example
Given the Class B address 172.28.0.0
Class B
Network Network
Host
Routers “see” this network as 172.28.0.0
172.28.1.2
172.28.2.2
172.28.3.2
CISCO NETWORKING ACADEMY
All of these addresses are
on the same network
Host
Class B Subnet Example
Using subnets...
Network Network
Subnet
Host
Internet routers still “see” this net as 172.28.0.0
172.28.1.2
172.28.2.2
172.28.3.2
CISCO NETWORKING ACADEMY
But internal routers think all
these addresses are on different
networks, called subnetworks
Class B Subnet Example
Network Network
Subnet
Host
Using the 3rd octet, 172.28.0.0 was divided
into:
172.28.1.0
172.28.5.0
172.28.9.0
172.28.13.0
172.28.17.0
CISCO NETWORKING ACADEMY
172.28.2.0
172.28.6.0
172.28.10.0
172.28.14.0
172.28.18.0
172.28.3.0
172.28.7.0
172.28.11.0
172.28.15.0
172.28.19.0
172.28.4.0
172.28.8.0
172.28.12.0
172.28.16.0
and so on ...
Class B Subnet Example
What’s happened to the host fields?
Network Network
Subnet
Host
8 bits
8 bits
8 bits are now used to represent subnets.
Only 8 bits remain for possible hosts.
CISCO NETWORKING ACADEMY
Class B Subnet Example
What’s happened to the host fields?
Network Network
Subnet
Host
8 bits
8 bits
8-bit subnet field = 28 subnets = 256 subnets.
8-bit host field = 28 hosts = 256 hosts.
Remember, we started with 65,536 hosts!
CISCO NETWORKING ACADEMY
Class B Subnet Example
• Run winipcfg to examine your curriculum
PC’s IP address configuration.
• What is your IP address class?
• B
The first octet is 172
Class B ranges from 128 - 191.
CISCO NETWORKING ACADEMY
Class B Subnet Example
• The default subnet mask for a class B
network is 255.255.0.0
Network Network
255
255
Host
0
Host
0
• What subnet mask is assigned to your
PC?
CISCO NETWORKING ACADEMY
Class B Subnet Example
• The default subnet mask for a class B
network is 255.255.0.0
Network Network
255
255
Host
0
Host
0
• What subnet mask is assigned to your
PC?
Network Network
255
255
CISCO NETWORKING ACADEMY
Subnet
255
Host
0
Class B Subnet Example
• 172.28.0.0 has been divided into 256
subnets, each with 256 hosts:
– 172.28.1.0
– 172.28.2.0
– 172.28.3.0
– 172.28.4.0
– 172.28.5.0
– and so on...
CISCO NETWORKING ACADEMY
(Actually, 256 minus 2.
We’ll see why shortly...)
etc...
172.28.5.0
172.28.3.0
172.28.2.0
172.28.1.0
172.28.100.0
172.28.101.0
172.28.102.0
172.28.103.0
172.28.104.0
etc...
172.28.118.0
(Cisco Lab)
CISCO NETWORKING ACADEMY
Instructional Net.
Chabot Network
172.28.0.0
Class B
Subnetted
255.255.255.0
Admin Net.
172.28.4.0
Download