CSCI 4163 / CSCI 6904 Human-Computer Interaction web.cs.dal/~ hawkey /4163
1 CSCI 233 Internet Protocols Class 3 Dave Roberts.
-
Upload
dustin-williams -
Category
Documents
-
view
220 -
download
0
Transcript of 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.
![Page 1: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/1.jpg)
1
CSCI 233Internet Protocols
Class 3
Dave Roberts
![Page 2: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/2.jpg)
FIRST…A LITTLE REVIEW
2
![Page 3: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/3.jpg)
3
Internet Protocol Principles • Good Citizen Principle• Scarcest Internet Resource
![Page 4: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/4.jpg)
4
Outline• Internet addresses• Mapping IP addresses to physical
addresses
![Page 5: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/5.jpg)
INTERNET ADDRESSING
5
![Page 6: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/6.jpg)
The Internet• Is it a physical or virtual network?• It’s a virtual network, defined by
protocols that run on hosts and routers.
• Internet protocols make the Internet look like a world-wide uniform network, although it encompasses many networks that are very different from each other.
6
![Page 7: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/7.jpg)
Internet Addresses• Each host connection on the
Internet has a unique Internet address
• The addresses are designed to make forwarding of Internet packets simple
• An IP address has two parts: a prefix that identifies a network and a suffix that identifies a host on the network 7
![Page 8: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/8.jpg)
Need for Control• To avoid conflicts in address use, some
sort of authority is needed• It makes sense to assign addresses in
blocks, not one at a time• ICANN (Internet Corporation for
Assigned names and Numbers) oversees IP address assignment
• Originally assigned in blocks of Class A, B and C addresses
8
![Page 9: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/9.jpg)
Question• How many Internet addresses can one
host have?• As many as it has network adapters
9
![Page 10: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/10.jpg)
IPv6 Addressing• Each address is 128 bits• Enough addresses for every
person on earth to have an internet with three times the addresses of the present Internet!
• 1024 addresses per square meter of the earth’s surface
10
![Page 11: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/11.jpg)
IPv6 Address Assignments
11
![Page 12: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/12.jpg)
IPv4 to IPv6 Transition
12
![Page 13: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/13.jpg)
IPv6 Address Split
13
![Page 14: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/14.jpg)
IP Addresses
14
![Page 15: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/15.jpg)
Functions of Internet Addresses
• Provide a unique identification for a particular interface between a device and the network so that a datagram can be delivered to the correct recipient
• Enable a path to be found across the Internet to reach the recipient, a process called routing
15
![Page 16: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/16.jpg)
16
IPv4 Address• 32-bit integer, unique for each
host on the network, used in all communication with the host
• <IP address> ::= <netid> <hostid>– Netid: identifier of a network– Hostid: identifier of a host on the
network
![Page 17: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/17.jpg)
17
Dotted Decimal Notation
32-bit Internet address
10000000 00001010 00000010 00011110
Is written
128.10.2.30
![Page 18: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/18.jpg)
18
Classes of IPv4 Addresses
“Classful” addresses—types A, B and C below
first 2 bits distinguish 3 primary classes
Design of these classes is for efficient routing
There have been other refinements—to discuss later
![Page 19: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/19.jpg)
Class Determination Algorithm
19
![Page 20: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/20.jpg)
Address Class Characteristics
20
![Page 21: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/21.jpg)
Host Capacities
21
![Page 22: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/22.jpg)
IP Address Split
22
![Page 23: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/23.jpg)
Advantages of Classful Addressing
• Simplicity and clarity—addresses and their setup are very easy to understand
• Flexibility to accommodate different sizes of networks
• Ease of separating host address for routing
• Allows for reservation of some addresses for special purposes
23
![Page 24: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/24.jpg)
Classless IPv4 Addressing• Temporary addressing scheme
that does away with class A, B, C addresses
• Network prefix can be any specified length
• Forwarding techniques expanded to account for this: called Classless Inter-Domain Routing (CIDR)
24
![Page 25: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/25.jpg)
25
Special IP Addresses
![Page 26: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/26.jpg)
ADDRESS RESOLUTION
26
![Page 27: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/27.jpg)
IP and MAC Addresses• IP address is used to send datagrams
across the Internet—that is, between networks, through routers
• MAC address is used to deliver a frame of data within a single network
• We send a datagram across the Internet with only an IP address
• To deliver to a device at the destination network, a MAC address must be used
27
![Page 28: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/28.jpg)
Local Delivery• The router at the destination
network has the job of delivering the packet to the appropriate host
• The router uses the local physical network to deliver to the local host
• The local physical (MAC) address must be used, not the IP address
28
![Page 29: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/29.jpg)
Address Resolution• The process of determining the
physical address that corresponds to an IP address is called address resolution
• Address resolution must occur at every network the packet encounters in its journey across the Internet
29
![Page 30: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/30.jpg)
Resolution by Direct Mapping
30
HA = f(IA)
![Page 31: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/31.jpg)
Resolution by Dynamic Binding
• ARP broadcasts a request packet• Host who has IP address in packet
replies with physical address
31
![Page 32: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/32.jpg)
ARP Caching• Broadcasting an inquiry is
expensive• Every host must have a cache of
recently acquired bindings• Results of ARP requests are
cached• Before sending request, the cache
is checked
32
![Page 33: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/33.jpg)
ARP Cache Timeout• Responsibility for cache
correctness is with the host maintaining the cache
• Timeout value is set, and addresses from cache are not used if timeout value is exceeded
• ARP performance is sensitive to the value of the timeout
33
![Page 34: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/34.jpg)
Soft State• ARP cache is an example of “soft
state”• Cache owner keeps record of
acquired results, avoids cost of future inquiries
• Cache is usually timed out to automatically remove stale values
34
![Page 35: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/35.jpg)
ARP Refinements• Every ARP request has binding of
source IP and MAC addresses• Since request is broadcast, all
machines can extract sender’s IP to MAC address mapping and cache it
• Most computers broadcast a gratuitous ARP request when they start up in case their mapping has changed 35
![Page 36: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/36.jpg)
IPv6 ARP• Describe IPv6 ARP• There isn’t any!!!
36
![Page 37: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/37.jpg)
37
IPv4 ARP Message Format
Hardware type: 1 for EthernetProtocol type: 0800 for IP addressesXlen—length of physical and high-level addressesARP exchanges involve filling in missing addresses
![Page 38: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/38.jpg)
IPv6 Neighbor Discovery• Neighbor is another computer on
the same network• NDP allows an IPv6 host to
discover all neighbors and routers upon startup
• Early binding avoids delays when packets are transmitted
38
![Page 39: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/39.jpg)
39
Conventions• 1’s refer to “all”• 0’s refer to “this”• Hostid=0 address refers to this
network• Hostid=1’s broadcast to all hosts
– Directed broadcast—netid of a specific network
– Local broadcast—32 1’s—used at startup
![Page 40: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/40.jpg)
Address Resolution• Physical addresses are used by
hardware devices that can communicate directly (ie, MAC addresses on a LAN)
• IP addresses create a massive virtual network
• Network layer sends datagrams across the virtual network
• Data link layer sends frames between physical devices
40
![Page 41: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/41.jpg)
Need for Address Resolution
41
![Page 42: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/42.jpg)
42
ARP• Each host has an Internet address,
Ia• Each host also has a physical
address, Pa • How to route packet to physical
address, given its Internet address?
• Two instances– Sending packets to routers, which
have physical addresses– Sending packets to hosts, which have
physical addresses
![Page 43: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/43.jpg)
43
Direct Mapping Resolution• Choose a numbering scheme that
makes address resolution efficientPA = f(IA)
• If either P’s or I’s can be chosen, a correspondence can be established
• Alternatively, lists of P-A pairs can be stored
![Page 44: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/44.jpg)
44
Dynamic Binding Resolution
ARP—Address Resolution Protocol• host A broadcasts packet with
address IB• Asks host B to respond with PB
• B recognizes the packet, responds with PB
• A receives response, uses PB to send to B
![Page 45: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/45.jpg)
45
ARP Cache• Cache of recently-acquired
physical addresses is kept• ARP is used for packets after the
first in a transmission• ARP cache times out after an
interval• Example of “soft state”
![Page 46: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/46.jpg)
46
ARP Refinements• Sender includes its own I to P
binding in every ARP broadcast, so that receiving site, and others, can update ARP caches
• Receivers update I to P binding in ARP cache before processing ARP packet
![Page 47: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/47.jpg)
47
ARP Encapsulation
![Page 48: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/48.jpg)
48
Internet Protocol Principles • Use the Good Citizen Principle to
limit the impact of resource shortages
• Conserve the scarcest Internet resource
• Use caching to avoid repeated inquiries
![Page 49: 1 CSCI 233 Internet Protocols Class 3 Dave Roberts.](https://reader036.fdocuments.in/reader036/viewer/2022062321/56649da75503460f94a928dc/html5/thumbnails/49.jpg)
Summary• IP Addressing• IP Address Resolution
49