File - McAvoy Tech Teaching

advertisement
NT1210 Introduction to Networking
Unit 8:
Chapter 8, The Internet Protocol (IP)
1
Objectives
 Identify the major needs and stakeholders for computer
networks and network applications.
 Identify the classifications of networks and how they are
applied to various types of enterprises.
 Compare and contrast the OSI and TCP/IP models and
their applications to actual networks.
 Explain the functionality and use of typical network
protocols.
2
Objectives
 Differentiate among major types of LAN and WAN
technologies and specifications and determine how
each is used in a data network.
 Explain basic security requirements for networks.
 Use network tools to monitor protocols and traffic
characteristics.
 Plan and design an IP network by applying subnetting
skills.
 Explain the functionality of typical network protocols.
3
Objectives
 Plan and design an IP network by applying subnetting
skills.
 Categorize TCP/IP protocols according to network
model layers.
 Describe how TCP/IP addressing moves data packets
through networks.
4
Introducing the Internet Protocol (IP)
 TCP/IP Model review: Layers 1 and 2 Protocols
Example LAN/WAN Standards and Types in the TCP/IP Model
5
Figure 8-1
Introducing the Internet Protocol (IP)
 TCP/IP Model review: Upper layers define non-physical
(logical) networking functions
Various Perspectives on the TCP/IP Model and Roles
6
Figure 8-2
Introducing the Internet Protocol (IP)
 Network Layer protocols
 IP: Most important protocol defined by Network layer
 Almost every computing device on planet communicates, and
most use IP to do so
 Network layer also defines other protocols
7
Introducing the Internet Protocol (IP)
 Network Layer protocols: Part 1
Name
ICMP
ARP
DHCP
DNS
Full Name
Comments
Messages that hosts and routers use to manage
Internetwork Control
and control packet forwarding process; used by
Message Protocol
ping command
Address Resolution
Used by LAN hosts to dynamically learn
Protocol
another LAN host’s MAC address
Dynamic Host
Used by host to dynamically learn IP address
Configuration Protocol (and other information) it can use
Allows hosts to use names instead of IP
Domain Name
address; needs DNS server to translate name
System/Service
into corresponding IP address (required by IP
routing process)
Other TCP/IP Network Layer Protocols
Table 8-1
8
Introducing the Internet Protocol (IP)
 Network Layer protocols: Part 2
Name
Full Name
RIP
Routing Information
Protocol
Enhanced Interior
EIGRP Gateway Routing
Protocol
Open Shortest Path
OSPF
First
Comments
Application that runs on routers so that routers
dynamically learn IP routing tables (used to
route IP packets correctly); open standard
protocol defined in RFC 2453
Proprietary routing protocol owned by Cisco
Systems
Open source routing protocol defined in RFC
2328
Other TCP/IP Network Layer Protocols
Table 8-1
9
Introducing the Internet Protocol (IP)
 IPv6: Next generation of IP addressing.
 Needed because IPv4 addresses exhausted.
 128-bit long addresses: 2128 or 3.4x1038 or over 340
undecillion IPs, that’s 340 with 36 zero’s after it.
 Customer usually gets /64 subnet, which yields 4 billion
times IPs available in all of IPv4.
 Comparison: Number of IPv4 addresses equal to weight
of cat; number of IPv6 addresses equal to weight of
Earth and provides enough IP addresses for every grain
of sand on every beach on earth.
10
Introducing the Internet Protocol (IP)
 Migration to IPv6 has taken over decade and still in
process.
 IPv6 originally defined back in mid-1990s.
 June 6, 2012 – Was the scheduled IPv6 Day, official
worldwide “switch over” day, moved up to February
2012.
IPv4 Vs. IPv6 Timeline
Figure 8-3
11
Introducing the Internet Protocol (IP)
 IP defines many functions that work together with one
ultimate goal: To send data from one host to another
host through any TCP/IP network.
 Most important functions include:
 Creating end-to-end physical paths through TCP/IP network by
interconnecting physical networks (LANs and WANs) using
routers
 Identifying individual hosts and groups of hosts using IP
addressing
 Routing (forwarding) IP packets to correct destination host
Example of a Post Office Sorting a Letter Sent to Hollywood, California
12
Figure 8-4
Introducing the Internet Protocol (IP)
 IP is like Post Office
Example of a Post Office Sorting a Letter Sent to Hollywood, California
13
Figure 8-4
Introducing the Internet Protocol (IP)
 Routers in IP network: Interconnect LANs and WANs
via physical connectors called interfaces
 Example: Cisco 1841 router with two built-in Gigabit Ethernet
LAN interfaces that use RJ-45 connectors
Enterprise Class Router, LAN Interfaces, and WAN Interfaces
14
Figure 8-5
Introducing the Internet Protocol (IP)
 IP interconnects LANs and WANs
Interconnected LANs and WANs: Redundancy, but No LAN/WAN Detail
15
Figure 8-7
Introducing the Internet Protocol (IP)
 IPv4 Addresses
 32 bits
 Expressed in binary and dotted decimal forms
 Source and destination IP addresses included in 20-byte IP
header added to all IP packets
IPv4 Header Format and Fields
Figure 8-8
16
Introducing the Internet Protocol (IP)
 Converting binary IP address to dotted decimal
1. Separate 32 bits into 4 groups of 8 bits each
2. Do binary-to-decimal conversion of each 8-bit number (each
decimal value between 0 and 255)
3. Put period (dot) between each decimal number
Generic View of Converting from Binary IP Address to DDN Format
17
Figure 8-9
Introducing the Internet Protocol (IP)
 Example: Converting binary IP address to dotted
decimal
Converting Binary IP Address to DDN 10.1.2.3
18
Figure 8-10
Introducing the Internet Protocol (IP):
Routing
 Routing IP Packets from Source to Destination
 IP addressing groups addresses into networks
 All addresses with same value in first parts of addresses
considered to be in one network
 Example: All addresses that begin with 11, 12, 13, 14, or 15 in
that particular network
Example IP Address Groupings: All with the Same First Octet in the Same Group
19
Figure 8-11
Introducing the Internet Protocol (IP):
Routing
 IP routing example with routing tables: PC11 in left LAN
sends IP packet to address 12.1.1.21 (LAN on upper
right)
Example IP Address Groupings: All with the Same First Octet in the Same Group
20
Figure 8-12
Introducing the Internet Protocol (IP):
Routing
 Routers build routing tables in two ways
 Static configuration: Routes entered manually and do not
change
 Dynamic routing
protocol: Application
router uses to
automatically learn
new routes from
other routers
Routing Protocols Advertising All Addresses that Begin with 12 as One Route
21
Figure 8-13
Introducing the Internet Protocol (IP): Other
Protocols
 Domain Name System/Service (DNS): Mapping
names to IP addresses
 Users use names; IP
routing uses numbers
 DNS translates name into
corresponding IP address
 DNS client sends
DNS Request message
 DNS server returns
DNS Reply
DNS Name Resolution Request, Reply, and Packet to Server1 IP Address
22
Figure 8-14
Introducing the Internet Protocol (IP): Other
Protocols
Layer 3 - Network
IP with its Support Protocols
Figure 8-15
23
IP Addressing on User LANs: Network
Settings
 Locations Need IP addresses
 Each LAN and WAN interface on hosts and routers need IP
address to communicate
IP Addresses Used on Every LAN/WAN Interface
24
Figure 8-17
IP Addressing on User LANs: Network
Settings
 IP Address grouping: Allows IP routing to work better
 Routers list one number to represent each network
(address group) in routing tables
IP Address Groupings: IP Networks
Figure 8-18
25
IP Addressing on User LANs: Network
Settings
 Original IPv4 RFC defined way to group IPv4 addresses
using IP address classes (classful IP addressing)
 Every possible IPv4 address falls into class
First Octet Class
0
A
1 - 126
A
127
A
128 - 191
B
192 - 223
C
224 - 239
D
240 - 255
E
Purpose
Reserved
Unicast addresses, in class A networks
Reserved for loopback testing
Unicast addresses, in class B networks
Unicast addresses, in class C networks
Multicast addresses; not used as unicast IP addresses
Experimental; not used as unicast IP addresses
Summary of IPv4 Address Classes Based on First Octet Values
26
Table 8-2
IP Addressing on User LANs: Network
Settings
 Class A includes lower half of IPv4 address space: All
IPv4 address that begin with first octet between 0 and
127
Network ID
1.0.0.0
2.0.0.0
3.0.0.0
4.0.0.0
…
126.0.0.0
Size (Number of
Class A IP Network Concept
Addresses)
All addresses with a first octet equal to 1
> 16,000,000
All addresses with a first octet equal to 2
> 16,000,000
All addresses with a first octet equal to 3
> 16,000,000
All addresses with a first octet equal to 4
> 16,000,000
Etc….
> 16,000,000
All addresses with a first octet equal to 126 > 16,000,000
Example Class A Networks
Table 8-3
27
IP Addressing on User LANs: Network
Settings
 Class B includes ¼ of IPv4 address space with first
octet value from 128 – 191
 Includes medium number (216) of medium sized IP
networks for approximately 65,000 hosts per network
Size (Number
Network ID Concept
of Addresses)
128.1.0.0
All with a first two octets equal to 128.1
> 65,000
128.2.0.0
All with a first two octets equal to 128.2
> 65,000
128.3.0.0
All with a first two octets equal to 128.3
> 65,000
150.48.0.0
All with a first two octets equal to 150.48 > 65,000
180.255.0.0 All with a first two octets equal to 180.255 > 65,000
191.200.0.0 All with a first two octets equal to 191.200 > 65,000
Example Class B Networks
Table 8-4
28
IP Addressing on User LANs: Network
Settings
 Class C includes 1/8th of IPv4 address space with first
octet between 192 and 223
 Large number of small IP networks: over 2,000,000 IP
networks, each with 256 IP addresses each
Network ID
192.1.1.0
192.1.2.0
192.1.3.0
200.200.200.0
220.255.0.0
223.1.1.0
Size (Number of
Addresses)
All with a first three octets equal to 192.1.1
254
All with a first three octets equal to 192.1.2
254
All with a first three octets equal to 192.1.3
254
All with a first three octets equal to 200.200.200 254
All with a first three octets equal to 220.255.0
254
All with a first three octets equal to 123.1.1
254
Concept
Example Class C Networks
Table 8-5
29
IP Addressing on User LANs: Network
Settings
 LAN IP address classes summary
Summary of How Class Rules Break Down the IPv4 Address Space
30
Figure 8-20
IP Addressing on User LANs: Network
Settings
 Private addresses: Classful IP networks reserved for
enterprises to use in their network designs
 Can only be used on local LAN; can’t be routed through
WAN (non-routable)
 Not regulated by agencies such as ARIN or ICANN
Network ID Concept
Size (Number of Addresses)
Over 16,000,000 networks of
10.x.x.x
Class A Private IP addressing space
over 16,000,000 IPs each
172.16.x.x –
Over 65,000 networks of over
Class B Private IP addressing space
172.31.x.x
>65,000 IPs each
Over 65,000 networks of 256
192.168.x.x Class C Private IP addressing space
IPs each
31
IP Addressing on User LANs: Network
Settings
 Static IP address assignment: Manually configured
Static IP Address Assignment on Mac OS X
32
Figure 8-21
IP Addressing on User LANs: Network
Settings
 Most host OS’s allow static configuration of several
network settings
Host IP Settings
Figure 8-22
33
IP Addressing on User LANs: Network
Settings
 Dynamic Host Configuration Protocol (DHCP)
defines way hosts can lease IP address from DHCP
network server so does not have to be configured
statically
 Operates on client-server concept
 DHCP protocol defined by set of RFCs
Sample Network for DHCP Discussions
Figure 8-23
34
IP Addressing on User LANs: Network
Settings
 Example: IP address assignment design using both
DHCP and statically assigned addresses
Location
Atlanta LAN
Boston LAN
San Fran LAN
Type
Static
DHCP
Static
DHCP
Static
DHCP
Range
11.1.1.1 - 11.1.1.254
11.1.2.1 - 11.1.2.254
172.20.1.1 - 172.20.1.254
172.20.2.1 - 172.20.2.254
172.30.1.1 - 172.30.1.254
172.30.2.1 - 172.30.2.254
Address Planning: Some Static, Some DHCP, for Every LAN
35
Table 8-6
IP Addressing on User LANs: Network
Settings
 Once DHCP server exists in network and has been
configured with set of IP addresses to lease, DHCP
clients can request IP addresses
DHCP Lease Process between a DHCP Client and Server
36
Figure 8-24
IP Addressing on User LANs: Network
Settings
 User can see results of DHCP process from computer
DHCP Client Configuration on Mac OS X
Figure 8-25
37
IP Addressing on User LANs: Network
Settings
 DHCP example: Crossing networks to access DHCP
server
Remote DHCP Client in Boston
Figure 8-26
38
Short Break
Take 10
39
IP Routing with Focus on Layer 3
 IP defines how to route packets across TCP/IP network
 Some routing tasks must use logic from lower two
layers because Network layer (3) cannot physically
send bits
 Network layer relies on
Layers 1 and 2 logic
for this
IP Routing Perspective, While Ignoring LAN/WAN Details
40
Figure 8-27
IP Routing with Focus on Layer 3
 Router must have IP routing table with useful entries to
route IP packets.
 Routing table may list multiple routes.
 Each IP route identifies network, as well as other
information about how to send packets to that network.
 Routers look at incoming packet’s destination IP address
and compare it to list of network IDs in its routing table to
determine where to send packet to destination.
41
IP Routing with Focus on Layer 3
 Finding a classful network ID based on IP address
Five Classful Networks in a Small Corporate Network
42
Figure 8-28
IP Routing with Focus on Layer 3
 Each route in routing table lists:
 Information about how
to match IP packets
 Forwarding instructions that
tell router where to forward
packets to (e.g., next
router)
 Example: R1’s IP routing
table shows five network IDs so it knows routes to all
five networks
R1 Routing Table with Routes for Five Classful Networks
43
Figure 8-29
IP Routing with Focus on Layer 3
 Router compares incoming IP packet’s destination
address to information in its routing tables to find best
route to destination
How Router R1 Uses its IP Routing Table: Match and Forward
44
Figure 8-30
IP Routing with Focus on Layer 3
Routing from End-to-End: Multiple Cooperative Routing Decisions
45
Figure 8-31
IP Routing with Focus on Layer 3:
Subnetting
 Classful IP networks and wasted IP addresses
 Subnetting: Process of subdividing network to create smaller
groups of consecutive IP addresses
 Subnets (subdivided networks): Smaller groups of addresses
Numbers of Classful Networks, and Their Sizes
46
Figure 8-32
IP Routing with Focus on Layer 3:
Subnetting
 Example: Several subnets created by subnetting network
10.0.0.0
 Each subnet has subnet/network ID
Subdividing (Subnetting) Class A Network 10.0.0.0
47
Figure 8-33
IP Routing with Focus on Layer 3:
Subnetting
 Example continued: IP addresses and networks
replaced with five subnets of network 10.0.0.0
Sample Corporate Network Using Subnets of Network 10.0.0.0
48
Figure 8-34
IP Routing with Focus on Layer 3:
Subnetting
 Subnet mask: Shows how much of IP address for each
device is in common to all IPs in subnet
 Example 255.255.255.0 (/24): First three octets (first 24 bits)
must be equal for all subnets in network
 PC11 sends packet to PC21
(destination IP address
10.1.2.21)
 R1 will have route for PC21’s
subnet (network ID 10.1.2.0)
Routing Logic with Subnets and Masks
Figure 8-35
49
IP Routing with Focus on Layer 3:
Subnetting
 Classful networks have default subnet mask based on
each class
 Class A: 255.0.0.0 (8 bits)
 Class B: 255.255.0.0 (16 bits)
 Class C: 255.255.255.0 (24 bits)
 If subnet mask anything other than default, then
subnetting being used
Routing Logic with Subnets and Masks
Figure 8-35
50
IP Routing with Focus on Layer 3:
Subnetting
 How to calculate subnets
1. Determine network class (A, B, or C)
2. Determine EITHER number of hosts needed for each subnet
OR how many subnets needed
3. Determine how many bits needed to provide correct number of
hosts/subnets; last subnet is NOT usable
4. Calculate IPs for each subnet; first IP identifies subnet (Network
ID) and last IP identifies broadcast address
5. Determine subnet mask (total number of bits for network/subnet
ID)
51
IP Routing with Focus on Layer 3:
Subnetting
 Example: Calculating subnets for network 192.168.12.0




Class: C
Number of subnets needed: 14
Number of bits needed to supply 14 subnets: 3
Number of bits left to determine number of IPs per subnet: 5
(results in 32 IPs per subnet)
 Subnet mask: 255.255.255.224 (default 16 bits + 3 more bits for
subnetting = 19 bits)
52
IP Routing with Focus on Layer 3:
Subnetting
Subnet No.
0
1
2
3
4
5
6
7
Network ID
192.16.12.0
192.16.12.32
192.16.12.64
192.16.12.96
192.16.12.128
192.16.12.160
192.16.12.192
192.16.12.224
Host Range IPs
192.16.12.1 – 192.16.12.30
192.16.12.33 – 192.16.12.62
192.16.12.65 – 192.16.12.94
192.16.12.97 – 192.16.12.126
192.16.12.129 – 192.16.12.158
192.16.12.161 – 192.16.12.190
192.16.12.161 – 192.16.12.222
192.16.12.225 – 192.16.12.254
53
Broadcast IP
192.16.12.31
192.16.12.63
192.16.12.95
192.16.12.127
192.16.12.159
192.16.12.191
192.16.12.223
192.16.12.255
IP Routing with Focus on Layer 3:
Subnetting
 What happens when PC11 sends IP packet to PC12:
Same subnet
1. PC11 determines its own
IP address and subnet
mask (10.1.1.11 and
255.255.255.0)
2. PC11 decides determines
destination is in same
subnet
3. PC11 sends packet directly
to PC12 without going through router R1
IP Host Routing Logic: Local Destination
Figure 8-36
54
IP Routing with Focus on Layer 3:
Subnetting
 What happens when PC11 sends IP packet to PC12:
Different subnets
1. Host’s default gateway (default router) setting tells it where to
send packets when they have destination address in different
subnet
2. Default gateway tells host
IP address of router attached
to its LAN
3. Router then consults its
routing table and
determines how to
deliver packet
IP Host Routing Logic: Remote Destination
55
Figure 8-37
IP Routing with Layer 1, 2, and 3
Interactions
 Encapsulation: Action taken by lower layer when it
takes data from higher layer and adds header (and
sometimes trailer) to higher layer’s data
 Example: PC11 opened
web browser and tried to
connect to URL at web
server: PC11 creating bits
it uses to send to
server S1 (web server)
Encapsulation Review: Application, Transport, and Network Layers
56
Figure 8-38
IP Routing with Layer 1, 2, and 3
Interactions
 PC encapsulating IP packet into Ethernet frame (step 4)
 Sending bits over LAN cable into network (step 5)
Encapsulation Review: Data Link Layer
Figure 8-39
57
IP Routing with Layer 1, 2, and 3
Interactions
 De-encapsulation: On the destination side
De-encapsulation on a Receiving Host (S1)
58
Figure 8-40
IP Routing with Layer 1, 2, and 3
Interactions
 Addressing frames and packets when crossing SAME
subnet: Both MAC and IP addresses in Ethernet frame
and encapsulated IP packet
IP and Ethernet Addresses, PC11 to server S1, Same Subnet
59
Figure 8-42
IP Routing with Layer 1, 2, and 3
Interactions
 To learn destination MAC address, sending device uses
Address Resolution Protocol (ARP) and info in ARP table
Address
Short Answer Long Answer
Given to Ethernet NIC by manufacturer; sending
Source MAC On NIC
host can find MAC on NIC hardware.
Source IP
Configuration Either through static configuration or DHCP
From its ARP table, or if not found, by using ARP
Destination
ARP
protocol and sending ARP Request and waiting
MAC
for ARP Reply from destination
Destination
User
Either typed or clicked by user
IP
How a Sending IP Host Knows What Addresses to Use
60
Table 8-9
IP Routing with Layer 1, 2, and 3
Interactions
 Discovering MAC addresses using ARP: ARP Request
and ARP Reply
 ARP Request (ARP
Broadcast): Sending device queries for
MAC address of destination device;
sends Request as broadcast
to all other devices
on subnet
 Example: PC11 wants
to send packet to server S1
(in same subnet) but does not
know S1’s MAC address;
PC11 sends ARP Request to all devices on subnet
ARP Request (Broadcast)
Figure 8-43
61
IP Routing with Layer 1, 2, and 3
Interactions
 ARP Reply: Lists IP address ARP Request asked about
with corresponding MAC address of that host
 Example: ARP Reply that server
S1 makes in response to
PC11’s ARP Request
 ARP Reply is unicast
since ARP Request
generated from one
particular device
ARP Reply (Unicast)
Figure 8-44
62
IP Routing with Layer 1, 2, and 3
Interactions
 Routing data between different subnets
 IP packets in network act like person traveling to destination,
using all forms of transportation; packet goes from end-to-end
 Data Link frames act like individual vehicles used for only part
of trip (e.g., just train); frames never leave their own LAN/WAN
Example, IP Packet End-to-End, Data Link Heads Stay on LAN or WAN Figure 8-45
63
IP Routing with Layer 1, 2, and 3
Interactions
 Addressing frames and packets when crossing subnets
example: PC11 (10.1.1.11) sends IP packet to PC21
(10.1.2.21)
 Hosts sit on different LANs (may also be in different subnets)
IP Addresses Stay the Same Through End-to-End Path
64
Figure 8-46
IP Routing with Layer 1, 2, and 3
Interactions
 Example: PC11 sends IP packet to PC21
 PC11’s logic tells it to send packet to default router because
destination is in different network or subnet
 PC11 encapsulates packet inside Ethernet frame with
destination MAC address R1
Ethernet Frames Use MAC on that LAN (Only)
65
Figure 8-47
IP Routing with Layer 1, 2, and 3
Interactions
 Removing/adding Data Link headers: Router removes
IP packet from incoming Data Link frame (deencapsulation) and then adds new Data Link header
and trailer before sending packet (encapsulation)
 Steps router goes through:
1. De-encapsulates IP packet from inside Data Link frame
2. Makes routing decision using packet’s destination IP address
and its own IP routing table, identifying correct outgoing
interface
3. Encapsulates packet into new Data Link frame that works on
outgoing interface
4. Sends packet through outgoing interface to destination
Routers Discard Old and Add New Data Link Framing
66
Figure 8-48
IP Routing with Layer 1, 2, and 3
Interactions
 Example: When R1 receives packet destined to subnet
on R2
Routers Discard Old and Add New Data Link Framing
67
Figure 8-48
IP Routing with Layer 1, 2, and 3
Interactions
 Using ARP with routers: R2 needs to deliver IP packet
to host PC21
1. R2 builds Ethernet header with
PC21’s MAC address as
destination
2. If R2 does not know
PC21’s MAC address
(i.e., it is not in its ARP table), R2 uses
ARP to learn MAC address
3. When R2 receives ARP Reply with PC21’s
MAC address, sends frame
Example of Router R2 Using ARP to Learn a Local Host’s MAC Address
68
Figure 8-49
Summary, This Chapter…
 Described the main functions of the TCP/IP network
layer in regards to its focus on either physical or logical
functions, and the focus on the network or endpoint
hosts.
 Listed three major functions defined by IP.
 Listed common TCP/IP network layer functions in
addition to IP.
 Examined a figure of an Enterprise TCP/IP network and
determine where IP address groups (IP networks or
subnets) would be needed.
69
Summary, This Chapter…
 Looked at any IP version 4 address and determined its
class, and if a unicast IP address, determined the class
A, B, or C network ID of the network in which it resides.
 Listed the four IP settings typically set on IP hosts
during static configuration.
 Described the layer 3 logic used by routers when
routing IP packets.
 Described an IP host’s layer 3 logic when routing IP
packets.
70
Summary, This Chapter…
 Explained the basic ideas of how the IP subnetting
process subdivides a classful network into smaller
groups.
 Predicted the MAC and IP addresses used by two
hosts on the same LAN subnet when they send IP
packets to each other.
 Predicted the MAC and IP addresses used throughout
an IP packet’s journey from a host in one subnet to a
host in another subnet.
71
Questions? Comments?
72
Download