2. PART I
COURSE OVERVIEW
AND
INTRODUCTION
Internetworking With TCP/IP vol 1 -- Part 1 1 2005
3. Topic And Scope
Internetworking: an overview of concepts, terminology, and
technology underlying the TCP/IP Internet protocol suite and
the architecture of an internet.
Internetworking With TCP/IP vol 1 -- Part 1 2 2005
4. You Will Learn
d Terminology (including acronyms)
d Concepts and principles
– The underlying model
– Encapsulation
– End-to-end paradigm
d Naming and addressing
d Functions of protocols including ARP, IP, TCP, UDP,
SMTP, FTP, DHCP, and more
d Layering model
Internetworking With TCP/IP vol 1 -- Part 1 3 2005
5. You Will Learn
(continued)
d Internet architecture and routing
d Applications
Internetworking With TCP/IP vol 1 -- Part 1 4 2005
6. What You Will NOT Learn
d A list of vendors, hardware products, software products,
services, comparisons, or prices
d Alternative internetworking technologies (they have all
disappeared!)
Internetworking With TCP/IP vol 1 -- Part 1 5 2005
7. Schedule Of Topics
d Introduction
d Review of
– Network hardware
– Physical addressing
d Internet model and concept
d Internet (IP) addresses
d Higher-level protocols and the layering principle
d Examples of internet architecture
Internetworking With TCP/IP vol 1 -- Part 1 6 2005
8. Schedule Of Topics
(continued)
d Routing update protocols
d Application-layer protocols
Internetworking With TCP/IP vol 1 -- Part 1 7 2005
9. Why Study TCP/IP?
d The Internet is everywhere
d Most applications are distributed
Internetworking With TCP/IP vol 1 -- Part 1 8 2005
10. Remainder Of This Section
d History of Internet protocols (TCP/IP)
d Organizations
d Documents
Internetworking With TCP/IP vol 1 -- Part 1 9 2005
11. Vendor Independence
d Before TCP/IP and the Internet
– Only two sources of network protocols
* Specific vendors such as IBM or Digital Equipment
* Standards bodies such as the ITU (formerly known
as CCITT)
d TCP/IP
– Vendor independent
Internetworking With TCP/IP vol 1 -- Part 1 10 2005
12. Who Built TCP/IP?
d Internet Architecture Board (IAB)
d Originally known as Internet Activities Board
d Evolved from Internet Research Group
d Forum for exchange among researchers
d About a dozen members
d Reorganized in 1989 and 1993
d Merged into the Internet Society in 1992
Internetworking With TCP/IP vol 1 -- Part 1 11 2005
13. Components Of The
IAB Organization
d IAB (Internet Architecture Board)
– Board that oversees and arbitrates
– URL is
http://www.iab.org/iab
d IRTF (Internet Research Task Force)
– Coordinates research on TCP/IP and internetworking
– Virtually defunct, but may re-emerge
Internetworking With TCP/IP vol 1 -- Part 1 12 2005
14. Components Of The
IAB Organization
(continued)
d IETF (Internet Engineering Task Force)
– Coordinates protocol and Internet engineering
– Headed by Internet Engineering Steering Group (IESG)
– Divided into N areas (N is 10 plus or minus a few)
– Each area has a manager
– Composed of working groups (volunteers)
– URL is
http://www.ietf.org
Internetworking With TCP/IP vol 1 -- Part 1 13 2005
15. ICANN
d Internet Corporation for Assigned Names and Numbers
http://www.icann.org
d Formed in 1998 to subsume IANA contract
d Not-for-profit managed by international board
d Now sets policies for addresses and domain names
d Support organizations
– Address allocation (ASO)
– Domain Names (DNSO)
– Protocol parameter assignments (PSO)
Internetworking With TCP/IP vol 1 -- Part 1 14 2005
16. ICANN
d Internet Corporation for Assigned Names and Numbers
http://www.icann.org
d Formed in 1998 to subsume IANA contract
d Not-for-profit managed by international board
d Now sets policies for addresses and domain names
d Support organizations
– Address allocation (ASO)
– Domain Names (DNSO)
– Protocol parameter assignments (PSO)
d For fun see http://www.icannwatch.org
Internetworking With TCP/IP vol 1 -- Part 1 14 2005
17. World Wide Web Consortium
d Organization to develop common protocols for World Wide
Web
d Open membership
d Funded by commercial members
d URL is
http://w3c.org
Internetworking With TCP/IP vol 1 -- Part 1 15 2005
18. Internet Society
d Organization that promotes the use of the Internet
d Formed in 1992
d Not-for-profit
d Governed by a board of trustees
d Members worldwide
d URL is
http://www.isoc.org
Internetworking With TCP/IP vol 1 -- Part 1 16 2005
19. Protocol Specifications
And Documents
d Protocols documented in series of reports
d Documents known as Request For Comments (RFCs)
Internetworking With TCP/IP vol 1 -- Part 1 17 2005
20. RFCs
d Series of reports that include
– TCP/IP protocols
– The Internet
– Related technologies
d Edited, but not peer-reviewed like scientific journals
d Contain:
– Proposals
– Surveys and measurements
– Protocol standards
Internetworking With TCP/IP vol 1 -- Part 1 18 2005
21. RFCs
d Series of reports that include
– TCP/IP protocols
– The Internet
– Related technologies
d Checked and edited by IESG
d Contain:
– Proposals
– Surveys and measurements
– Protocol Standards
– Jokes!
Internetworking With TCP/IP vol 1 -- Part 1 19 2005
22. RFCs
(continued)
d Numbered in chronological order
d Revised document reissued under new number
d Numbers ending in 99 reserved for summary of previous
100 RFCs
d Index and all RFCs available on-line
Internetworking With TCP/IP vol 1 -- Part 1 20 2005
23. Requirements RFCs
d Host Requirements Documents
– Major revision/clarification of most TCP/IP protocols
– RFC 1122 (Communication Layers)
– RFC 1123 (Application & Support)
– RFC 1127 (Perspective on 1122-3)
d Router Requirements
– Major specification of protocols used in IP gateways
(routers)
– RFC 1812 (updated by RFC 2644)
Internetworking With TCP/IP vol 1 -- Part 1 21 2005
24. Special Subsets Of RFCs
d For Your Information (FYI)
– Provide general information
– Intended for beginners
d Best Current Practices (BCP)
– Engineering hints
– Reviewed and approved by IESG
Internetworking With TCP/IP vol 1 -- Part 1 22 2005
25. A Note About RFCs
d RFCs span two extremes
– Protocol standards
– Jokes
d Question: how does one know which are standards?
Internetworking With TCP/IP vol 1 -- Part 1 23 2005
26. TCP/IP Standards (STD)
d Set by vote of IETF
d Documented in subset of RFCs
d Found in Internet Official Protocol Standards RFC and on
IETF web site
– Issued periodically
– Current version is RFC 3600
Internetworking With TCP/IP vol 1 -- Part 1 24 2005
27. Internet Drafts
d Preliminary RFC documents
d Often used by IETF working groups
d Available on-line from several repositories
d Either become RFCs within six months or disappear
Internetworking With TCP/IP vol 1 -- Part 1 25 2005
28. Obtaining RFCs And
Internet Drafts
d Available via
– Email
– FTP
– World Wide Web
http://www.ietf.org/
d IETF report contains summary of weekly activity
http://www.isoc.org/ietfreport/
Internetworking With TCP/IP vol 1 -- Part 1 26 2005
29. Summary
d TCP/IP is vendor-independent
d Standards set by IETF
d Protocol standards found in document series known as
Request For Comments (RFCs)
d Standards found in subset of RFCs labeled STD
Internetworking With TCP/IP vol 1 -- Part 1 27 2005
31. PART II
REVIEW OF
NETWORK HARDWARE AND
PHYSICAL ADDRESSING
Internetworking With TCP/IP vol 1 -- Part 2 1 2005
32. The TCP/IP Concept
d Use existing network hardware
d Interconnect networks
d Add abstractions to hide heterogeneity
Internetworking With TCP/IP vol 1 -- Part 2 2 2005
33. The Challenge
d Accommodate all possible network hardware
d Question: what kinds of hardware exist?
Internetworking With TCP/IP vol 1 -- Part 2 3 2005
34. Network Hardware Review
d We will
– Review basic network concepts
– Examine example physical network technologies
– Introduce physical (hardware) addressing
Internetworking With TCP/IP vol 1 -- Part 2 4 2005
35. Two Basic Categories
Of Network Hardware
d Connection oriented
d Connectionless
Internetworking With TCP/IP vol 1 -- Part 2 5 2005
36. Connection Oriented
(Circuit Switched Technology)
d Paradigm
– Form a ‘‘connection’’ through the network
– Send / receive data over the connection
– Terminate the connection
d Can guarantee bandwidth
d Proponents argue that it works well with real-time
applications
d Example: ATM network
Internetworking With TCP/IP vol 1 -- Part 2 6 2005
37. Connectionless
(Packet Switched Technology)
d Paradigm
– Form ‘‘packet’’ of data
– Pass to network
d Each packet travels independently
d Packet includes identification of the destination
d Each packet can be a different size
d The maximum packet size is fixed (some technologies limit
packet sizes to 1,500 octets or less)
Internetworking With TCP/IP vol 1 -- Part 2 7 2005
38. Broad Characterizations Of
Packet Switching Networks
d Local Area Network (LAN)
d Wide Area Network (WAN)
d Categories are informal and qualitative
Internetworking With TCP/IP vol 1 -- Part 2 8 2005
39. Local Area Networks
d Engineered for
– Low cost
– High capacity
d Direct connection among computers
d Limited distance
Internetworking With TCP/IP vol 1 -- Part 2 9 2005
40. Wide Area Networks
(Long Haul Networks)
d Engineered for
– Long distances
– Indirect interconnection via special-purpose hardware
d Higher cost
d Lower capacity (usually)
Internetworking With TCP/IP vol 1 -- Part 2 10 2005
41. Examples Of Packet
Switched Networks
d Wide Area Nets
– ARPANET, NSFNET, ANSNET
– Common carrier services
d Leased line services
– Point-to-point connections
d Local Area Nets
– Ethernet
– Wi-Fi
Internetworking With TCP/IP vol 1 -- Part 2 11 2005
42. ARPANET (1969-1989)
d Original backbone of Internet
d Wide area network around which TCP/IP was developed
d Funding from Advanced Research Project Agency
d Initial speed 50 Kbps
Internetworking With TCP/IP vol 1 -- Part 2 12 2005
43. NSFNET (1987-1992)
d Funded by National Science Foundation
d Motivation: Internet backbone to connect all scientists and
engineers
d Introduced Internet hierarchy
– Wide area backbone spanning geographic U.S.
– Many mid-level (regional) networks that attach to
backbone
– Campus networks at lowest level
d Initial speed 1.544 Mbps
Internetworking With TCP/IP vol 1 -- Part 2 13 2005
44. ANSNET (1992-1995)
End-User Site
MCI Point of Presence
d Backbone of Internet before commercial ISPs
d Typical topology
Internetworking With TCP/IP vol 1 -- Part 2 14 2005
45. Wide Area Networks Available
From Common Carriers
d Point-to-point digital circuits
– T-series (e.g., T1 = 1.5 Mbps, T3 = 45 Mbps)
– OC-series (e.g., OC-3 = 155 Mbps, OC-48 = 2.4 Gbps)
d Packet switching services also available
– Examples: ISDN, SMDS, Frame Relay, ATM
Internetworking With TCP/IP vol 1 -- Part 2 15 2005
46. Example Local Area
Network: Ethernet
d Extremely popular
d Can run over
– Copper (twisted pair)
– Optical fiber
d Three generations
– 10Base-T operates at 10 Mbps
– 100Base-T (fast Ethernet) operates at 100 Mbps
– 1000Base-T (gigabit Ethernet) operates at 1 Gbps
d IEEE standard is 802.3
Internetworking With TCP/IP vol 1 -- Part 2 16 2005
47. Ethernet Frame Format
Destination Source Frame
Preamble Address Address Type Frame Data CRC
8 octets 6 octets 6 octets 2 octets 46–1500 octets 4 octets
d Header format fixed (Destination, Source, Type fields)
d Frame data size can vary from packet to packet
– Maximum 1500 octets
– Minimum 46 octets
d Preamble and CRC removed by framer hardware before
frame stored in computer’s memory
Internetworking With TCP/IP vol 1 -- Part 2 17 2005
48. Example Ethernet Frame In Memory
02 07 01 00 27 ba 08 00 2b 0d 44 a7 08 00 45 00
00 54 82 68 00 00 f f 01 35 21 80 0a 02 03 80 0a
02 08 08 00 73 0b d4 6d 00 00 04 3b 8c 28 28 20
0d 00 08 09 0a 0b 0c 0d 0e 0 f 10 11 12 13 14 15
16 17 18 19 1a 1b 1c 1d 1e 1 f 20 21 22 23 24 25
26 27 28 29 2a 2b 2c 2d 2e 2 f 30 31 32 33 34 35
36 37
d Octets shown in hexadecimal
d Destination is 02.07.01.00.27.ba
d Source is 08.00.2b.0d.44.a7
d Frame type is 08.00 (IP)
Internetworking With TCP/IP vol 1 -- Part 2 18 2005
49. Point-to-Point Network
d Any direct connection between two computers
– Leased line
– Connection between two routers
– Dialup connection
d Link-level protocol required for framing
d TCP/IP views as an independent network
Note: some pundits argue the terminology is incorrect because a
connection limited to two endpoints is not technically a
‘‘network’’
Internetworking With TCP/IP vol 1 -- Part 2 19 2005
50. Hardware Address
d Unique number assigned to each machine on a network
d Used to identify destination for a packet
Internetworking With TCP/IP vol 1 -- Part 2 20 2005
51. Hardware Address Terminology
d Known as
– MAC (Media Access Control) address
– Physical address
– Hardware unicast address
d Hardware engineers assign fine distinctions to the above
terms
d We will treat all terms equally
Internetworking With TCP/IP vol 1 -- Part 2 21 2005
52. Use Of Hardware Address
d Sender supplies
– Destination’s address
– Source address (in most technologies)
d Network hardware
– Uses destination address to forward packet
– Delivers packet to proper machine.
d Important note: each technology defines its own addressing
scheme
Internetworking With TCP/IP vol 1 -- Part 2 22 2005
53. Three Types Of Hardware
Addressing Schemes
d Static
– Address assigned by hardware vendor
d Configurable
– Address assigned by customer
d Dynamic
– Address assigned by software at startup
Internetworking With TCP/IP vol 1 -- Part 2 23 2005
54. Examples Of Hardware Address Types
d Configurable: proNET-10 (Proteon)
– 8-bit address per interface card
– All 1s address reserved for broadcast
– Address assigned by customer when device installed
d Dynamic MAC addressing: LocalTalk (Apple)
– Randomized bidding
– Handled by protocols in software
Internetworking With TCP/IP vol 1 -- Part 2 24 2005
55. Examples Of Hardware Address Types
(continued)
d Static MAC addressing: Ethernet
– 48-bit address
– Unicast address assigned when device manufactured
– All 1s address reserved for broadcast
– One-half address space reserved for multicast (restricted
form of broadcast)
d Ethernet’s static addressing is now most common form
Internetworking With TCP/IP vol 1 -- Part 2 25 2005
56. Bridge
d Hardware device that connects multiple LANs and makes
them appear to be a single LAN
d Repeats all packets from one LAN to the other and vice
versa
d Introduces delay of 1 packet-time
d Does not forward collisions or noise
d Called Layer 2 Interconnect or Layer 2 forwarder
d Makes multiple LANs appear to be a single, large LAN
d Often embedded in other equipment (e.g., DSL modem)
Internetworking With TCP/IP vol 1 -- Part 2 26 2005
57. Bridge
(continued)
d Watches packets to learn which computers are on which
side of the bridge
d Uses hardware addresses to filter
Internetworking With TCP/IP vol 1 -- Part 2 27 2005
58. Layer 2 Switch
d Electronic device
d Computers connect directly
d Applies bridging algorithm
d Can separate computers onto virtual networks (VLAN
switch)
Internetworking With TCP/IP vol 1 -- Part 2 28 2005
59. Physical Networks As
Viewed By TCP/IP
d TCP/IP protocols accommodate
– Local Area Network
– Wide Area Network
– Point-to-point link
– Set of bridged LANs
Internetworking With TCP/IP vol 1 -- Part 2 29 2005
60. The Motivation For Heterogeneity
d Each network technology has advantages for some
applications
d Consequence: an internet may contain combinations of
technologies
Internetworking With TCP/IP vol 1 -- Part 2 30 2005
61. Heterogeneity And Addressing
d Recall: each technology can define its own addressing
scheme
d Heterogeneous networks imply potential for heterogeneous
addressing
d Conclusion: cannot rely on hardware addressing
Internetworking With TCP/IP vol 1 -- Part 2 31 2005
62. Summary
d TCP/IP is designed to use all types of networks
– Connection-oriented
– Connectionless
– Local Area Network (LAN)
– Wide Area Network (WAN)
– Point-to-point link
– Set of bridged networks
Internetworking With TCP/IP vol 1 -- Part 2 32 2005
63. Summary
(continued)
d Each technology defines an addressing scheme
d TCP/IP must accommodate heterogeneous addressing
schemes
Internetworking With TCP/IP vol 1 -- Part 2 33 2005
65. PART III
INTERNETWORKING CONCEPT
AND ARCHITECTURAL MODEL
Internetworking With TCP/IP vol 1 -- Part 3 1 2005
66. Accommodating Heterogeneity
d Approach 1
– Application gateways
– Gateway forwards data from one network to another
– Example: file transfer gateway
d Approach 2
– Network-level gateways
– Gateway forwards individual packets
d Discussion question: which is better?
Internetworking With TCP/IP vol 1 -- Part 3 2 2005
67. Desired Properties
d Universal service
d End-to-end connectivity
d Transparency
Internetworking With TCP/IP vol 1 -- Part 3 3 2005
68. Agreement Needed To
Achieve Desired Properties
d Data formats
d Procedures for exchanging information
d Identification
– Services
– Computers
– Applications
d Broad concepts: naming and addressing
Internetworking With TCP/IP vol 1 -- Part 3 4 2005
69. The TCP/IP Internet Concept
d Use available networks
d Interconnect physical networks
– Network of networks
– Revolutionary when proposed
d Devise abstractions that hide
– Underlying architecture
– Hardware addresses
– Routes
Internetworking With TCP/IP vol 1 -- Part 3 5 2005
70. Network Interconnection
d Uses active system
d Each network sees an additional computer attached
d Device is IP router (originally called IP gateway)
Internetworking With TCP/IP vol 1 -- Part 3 6 2005
71. Illustration Of
Network Interconnection
Net 1 R Net 2
d Network technologies can differ
– LAN and WAN
– Connection-oriented and connectionless
Internetworking With TCP/IP vol 1 -- Part 3 7 2005
72. Building An Internet
d Use multiple IP routers
d Ensure that each network is reachable
d Do not need router between each pair of networks
Internetworking With TCP/IP vol 1 -- Part 3 8 2005
73. Example Of Multiple Networks
Net 1 R2 Net 2 R2 Net 3
d Networks can be heterogeneous
d No direct connection from network 1 to network 3
Internetworking With TCP/IP vol 1 -- Part 3 9 2005
74. Physical Connectivity
In a TCP/IP internet, special computers called IP routers or IP
gateways provide interconnections among physical networks.
Internetworking With TCP/IP vol 1 -- Part 3 10 2005
75. Packet Transmission Paradigm
d Source computer
– Generates a packet
– Sends across one network to a router
d Intermediate router
– Forwards packet to ‘‘next’’ router
d Final router
– Delivers packet to destination
Internetworking With TCP/IP vol 1 -- Part 3 11 2005
76. An Important Point
About Forwarding
Routers use the destination network, not the destination
computer, when forwarding packets.
Internetworking With TCP/IP vol 1 -- Part 3 12 2005
77. Equal Treatment
The TCP/IP internet protocols treat all networks equally. A
Local Area Network such as an Ethernet, a Wide Area Network
used as a backbone, or a point-to-point link between two
computers each count as one network.
Internetworking With TCP/IP vol 1 -- Part 3 13 2005
78. User’s View Of Internet
d Single large (global) network
d User’s computers all attach directly
d No other structure visible
Internetworking With TCP/IP vol 1 -- Part 3 14 2005
79. Illustration Of User’s View Of
A TCP/IP Internet
user’s view
Internetworking With TCP/IP vol 1 -- Part 3 15 2005
80. Actual Internet Architecture
d Multiple physical networks interconnected
d Each host attaches to one network
d Single virtual network achieved through software that
implements abstractions
Internetworking With TCP/IP vol 1 -- Part 3 16 2005
81. The Two Views Of
A TCP/IP Internet
user’s view actual connections
Internetworking With TCP/IP vol 1 -- Part 3 17 2005
82. Architectural Terminology
d End-user system is called host computer
– Connects to physical network
– Possibly many hosts per network
– Possibly more than one network connection per host
d Dedicated systems called IP gateways or IP routers
interconnect networks
– Router connects two or more networks
Internetworking With TCP/IP vol 1 -- Part 3 18 2005
83. Many Unanswered Questions
d Addressing model and relationship to hardware addresses
d Format of packet as it travels through Internet
d How a host handles concurrent communication with several
other hosts
Internetworking With TCP/IP vol 1 -- Part 3 19 2005
84. Summary
d Internet is set of interconnected (possibly heterogeneous)
networks
d Routers provide interconnection
d End-user systems are called host computers
d Internetworking introduces abstractions that hide details of
underlying networks
Internetworking With TCP/IP vol 1 -- Part 3 20 2005
86. PART IV
CLASSFUL INTERNET ADDRESSES
Internetworking With TCP/IP vol 1 -- Part 4 1 2005
87. Definitions
d Name
– Identifies what an entity is
– Often textual (e.g., ASCII)
d Address
– Identifies where an entity is located
– Often binary and usually compact
– Sometimes called locator
d Route
– Identifies how to get to the object
– May be distributed
Internetworking With TCP/IP vol 1 -- Part 4 2 2005
88. Internet Protocol Address
(IP Address)
d Analogous to hardware address
d Unique value assigned as unicast address to each host on
Internet
d Used by Internet applications
Internetworking With TCP/IP vol 1 -- Part 4 3 2005
89. IP Address Details
d 32-bit binary value
d Unique value assigned to each host in Internet
d Values chosen to make routing efficient
Internetworking With TCP/IP vol 1 -- Part 4 4 2005
90. IP Address Division
d Address divided into two parts
– Prefix (network ID) identifies network to which host
attaches
– Suffix (host ID) identifies host on that network
Internetworking With TCP/IP vol 1 -- Part 4 5 2005
91. Classful Addressing
d Original IP scheme
d Explains many design decisions
d New schemes are backward compatible
Internetworking With TCP/IP vol 1 -- Part 4 6 2005
92. Desirable Properties Of An
Internet Addressing Scheme
d Compact (as small as possible)
d Universal (big enough)
d Works with all network hardware
d Supports efficient decision making
– Test whether a destination can be reached directly
– Decide which router to use for indirect delivery
– Choose next router along a path to the destination
Internetworking With TCP/IP vol 1 -- Part 4 7 2005
93. Division Of Internet Address
Into Prefix And Suffix
d How should division be made?
– Large prefix, small suffix means many possible
networks, but each is limited in size
– Large suffix, small prefix means each network can be
large, but there can only be a few networks
d Original Internet address scheme designed to accommodate
both possibilities
– Known as classful addressing
Internetworking With TCP/IP vol 1 -- Part 4 8 2005
94. Original IPv4 Address Classes
0 1 8 16 24 31
Class A 0 netid hostid
Class B 1 0 netid hostid
Class C 1 1 0 netid hostid
Three Principle Classes
0 1 2 3 31
Class D 1 1 1 0 IP multicast
Class E 1 1 1 1 0 reserved
Other (seldom used) Classes
Internetworking With TCP/IP vol 1 -- Part 4 9 2005
95. Important Property
d Classful addresses are self-identifying
d Consequences
– Can determine boundary between prefix and suffix from
the address itself
– No additional state needed to store boundary information
– Both hosts and routers benefit
Internetworking With TCP/IP vol 1 -- Part 4 10 2005
96. Endpoint Identification
Because IP addresses encode both a network and a host on that
network, they do not specify an individual computer, but a
connection to a network.
Internetworking With TCP/IP vol 1 -- Part 4 11 2005
97. IP Address Conventions
d When used to refer to a network
– Host field contains all 0 bits
d Broadcast on the local wire
– Network and host fields both contain all 1 bits
d Directed broadcast: broadcast on specific (possibly remote)
network
– Host field contains all 1 bits
– Nonstandard form: host field contains all 0 bits
Internetworking With TCP/IP vol 1 -- Part 4 12 2005
98. Assignment Of IP Addresses
d All hosts on same network assigned same address prefix
– Prefixes assigned by central authority
– Obtained from ISP
d Each host on a network has a unique suffix
– Assigned locally
– Local administrator must ensure uniqueness
Internetworking With TCP/IP vol 1 -- Part 4 13 2005
99. Advantages Of Classful Addressing
d Computationally efficient
– First bits specify size of prefix / suffix
d Allows mixtures of large and small networks
Internetworking With TCP/IP vol 1 -- Part 4 14 2005
100. Directed Broadcast
IP addresses can be used to specify a directed broadcast in
which a packet is sent to all computers on a network; such
addresses map to hardware broadcast, if available. By
convention, a directed broadcast address has a valid netid and
has a hostid with all bits set to 1.
Internetworking With TCP/IP vol 1 -- Part 4 15 2005
101. Limited Broadcast
d All 1’s
d Broadcast limited to local network only (no forwarding)
d Useful for bootstrapping
Internetworking With TCP/IP vol 1 -- Part 4 16 2005
102. All Zeros IP Address
d Can only appear as source address
d Used during bootstrap before computer knows its address
d Means ‘‘this’’ computer
Internetworking With TCP/IP vol 1 -- Part 4 17 2005
103. Internet Multicast
d IP allows Internet multicast, but no Internet-wide multicast
delivery system currently in place
d Class D addresses reserved for multicast
d Each address corresponds to group of participating
computers
d IP multicast uses hardware multicast when available
d More later in the course
Internetworking With TCP/IP vol 1 -- Part 4 18 2005
104. Consequences Of IP Addressing
d If a host computer moves from one network to another, its
IP address must change
d For a multi-homed host (with two or more addresses), the
path taken by packets depends on the address used
Internetworking With TCP/IP vol 1 -- Part 4 19 2005
105. Multi-Homed Hosts And Reliability
NETWORK 1
I1 I2 I3
R A B
I4 I5
NETWORK 2
d Knowing that B is multi-homed increases reliability
d If interface I3 is down, host A can send to the interface I5
Internetworking With TCP/IP vol 1 -- Part 4 20 2005
106. Dotted Decimal Notation
d Syntactic form for expressing 32-bit address
d Used throughout the Internet and associated literature
d Represents each octet in decimal separated by periods (dots)
Internetworking With TCP/IP vol 1 -- Part 4 21 2005
107. Example Of Dotted Decimal
Notation
d A 32-bit number in binary
10000000 00001010 00000010 00000011
d The same 32-bit number expressed in dotted decimal
notation
128 . 10 . 2 . 3
Internetworking With TCP/IP vol 1 -- Part 4 22 2005
108. Loopback Address
d Used for testing
d Refers to local computer (never sent to Internet)
d Address is 127.0.0.1
Internetworking With TCP/IP vol 1 -- Part 4 23 2005
109. Classful Address Ranges
Class Lowest Address Highest Address
A 1.0.0.0 126.0.0.0
B 128.1.0.0 191.255.0.0
C 192.0.1.0 223.255.255.0
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.254
Internetworking With TCP/IP vol 1 -- Part 4 24 2005
110. Summary Of Address Conventions
all 0s This host 1
all 0s host Host on this net 1
all 1s Limited broadcast (local net) 2
net all 1s Directed broadcast for net 2
127 anything (often 1) Loopback 3
Notes: 1 Allowed only at system startup and is
never a valid destination address.
2 Never a valid source address.
3 Should never appear on a network.
Internetworking With TCP/IP vol 1 -- Part 4 25 2005
111. An Example Of IP Addresses
ETHERNET
128.10.0.0
WI-FI ISP
NETWORK 9.0.0.0
128.210.0.0
routers
Internetworking With TCP/IP vol 1 -- Part 4 26 2005
112. Example Host Addresses
ETHERNET 128.10.0.0
128.10.2.3 128.10.2.8 128.10.2.26
MERLIN GUENEVERE LANCELOT
(multi-homed (Ethernet (Ethernet
host) host) host)
128.210.0.3
To ISP
128.10.0.6 128.10.2.70
WI-FI
128.210.50 NETWORK
128.210.0.0
TALIESYN GLATISANT
(router) (router)
128.210.0.1
ARTHUR
(Wi-Fi
host)
Internetworking With TCP/IP vol 1 -- Part 4 27 2005
113. Another Addressing Example
d Assume an organization has three networks
d Organization obtains three prefixes, one per network
d Host address must begin with network prefix
Internetworking With TCP/IP vol 1 -- Part 4 28 2005
114. Illustration Of IP Addressing
Rest of the Internet
Hosts and routers
using other addresses
Router to Internet R1
Site with three
networks
128.10.0.0
R2 R3
192.5.48.0 128.211.0.0
128.211.0.9
H1
Example host
Internetworking With TCP/IP vol 1 -- Part 4 29 2005
115. Summary
d IP address
– 32 bits long
– Prefix identifies network
– Suffix identifies host
d Classful addressing uses first few bits of address to
determine boundary between prefix and suffix
Internetworking With TCP/IP vol 1 -- Part 4 30 2005
116. Summary
(continued)
d Special forms of addresses handle
– Limited broadcast
– Directed broadcast
– Network identification
– This host
– Loopback
Internetworking With TCP/IP vol 1 -- Part 4 31 2005
118. PART V
MAPPING INTERNET ADDRESSES
TO PHYSICAL ADDRESSES
(ARP)
Internetworking With TCP/IP vol 1 -- Part 5 1 2005
119. Motivation
d Must use hardware (physical) addresses to communicate
over network
d Applications only use Internet addresses
Internetworking With TCP/IP vol 1 -- Part 5 2 2005
120. Example
d Computers A and B on same network
d Application on A generates packet for application on B
d Protocol software on A must use B’s hardware address
when sending a packet
Internetworking With TCP/IP vol 1 -- Part 5 3 2005
121. Consequence
d Protocol software needs a mechanism that maps an IP
address to equivalent hardware address
d Known as address resolution problem
Internetworking With TCP/IP vol 1 -- Part 5 4 2005
122. Address Resolution
d Performed at each step along path through Internet
d Two basic algorithms
– Direct mapping
– Dynamic binding
d Choice depends on type of hardware
Internetworking With TCP/IP vol 1 -- Part 5 5 2005
123. Direct Mapping
d Easy to understand
d Efficient
d Only works when hardware address is small
d Technique: assign computer an IP address that encodes the
hardware address
Internetworking With TCP/IP vol 1 -- Part 5 6 2005
124. Example Of Direct Mapping
d Hardware: proNet ring network
d Hardware address: 8 bits
d Assume IP address 192.5.48.0 (24-bit prefix)
d Assign computer with hardware address K an IP address
192.5.48.K
d Resolving an IP address means extracting the hardware
address from low-order 8 bits
Internetworking With TCP/IP vol 1 -- Part 5 7 2005
125. Dynamic Binding
d Needed when hardware addresses are large (e.g., Ethernet)
d Allows computer A to find computer B’s hardware address
– A starts with B’s IP address
– A knows B is on the local network
d Technique: broadcast query and obtain response
d Note: dynamic binding only used across one network at a
time
Internetworking With TCP/IP vol 1 -- Part 5 8 2005
126. Internet Address Resolution Protocol (ARP)
d Standard for dynamic address resolution in the Internet
d Requires hardware broadcast
d Intended for LAN
d Important idea: ARP only used to map addresses within a
single physical network, never across multiple networks
Internetworking With TCP/IP vol 1 -- Part 5 9 2005
127. ARP
d Machine A broadcasts ARP request with B’s IP address
d All machines on local net receive broadcast
d Machine B replies with its physical address
d Machine A adds B’s address information to its table
d Machine A delivers packet directly to B
Internetworking With TCP/IP vol 1 -- Part 5 10 2005
128. Illustration Of ARP
Request And Reply Messages
A X B Y
A broadcasts request for B
(across local net only)
A X B Y
B replies to request
Internetworking With TCP/IP vol 1 -- Part 5 11 2005
129. ARP Packet Format When
Used With Ethernet
0 8 16 31
ETHERNET ADDRESS TYPE (1) IP ADDRESS TYPE (0800)
ETH ADDR LEN (6) IP ADDR LEN (4) OPERATION
SENDER’S ETH ADDR (first 4 octets)
SENDER’S ETH ADDR (last 2 octets) SENDER’S IP ADDR (first 2 octets)
SENDER’S IP ADDR (last 2 octets) TARGET’S ETH ADDR (first 2 octets)
TARGET’S ETH ADDR (last 4 octets)
TARGET’S IP ADDR (all 4 octets)
Internetworking With TCP/IP vol 1 -- Part 5 12 2005
130. Observations About Packet Format
d General: can be used with
– Arbitrary hardware address
– Arbitrary protocol address (not just IP)
d Variable length fields (depends on type of addresses)
d Length fields allow parsing of packet by computer that does
not understand the two address types
Internetworking With TCP/IP vol 1 -- Part 5 13 2005
131. Retention Of Bindings
d Cannot afford to send ARP request for each packet
d Solution
– Maintain a table of bindings
d Effect
– Use ARP one time, place results in table, and then send
many packets
Internetworking With TCP/IP vol 1 -- Part 5 14 2005
132. ARP Caching
d ARP table is a cache
d Entries time out and are removed
d Avoids stale bindings
d Typical timeout: 20 minutes
Internetworking With TCP/IP vol 1 -- Part 5 15 2005
133. Algorithm For Processing
ARP Requests
d Extract sender’s pair, (IA, EA) and update local ARP table if
it exists
d If this is a request and the target is ‘‘me’’
– Add sender’s pair to ARP table if not present
– Fill in target hardware address
– Exchange sender and target entries
– Set operation to reply
– Send reply back to requester
Internetworking With TCP/IP vol 1 -- Part 5 16 2005
134. Algorithm Features
d If A ARPs B, B keeps A’s information
– B will probably send a packet to A soon
d If A ARPs B, other machines do not keep A’s information
– Avoids clogging ARP caches needlessly
Internetworking With TCP/IP vol 1 -- Part 5 17 2005
135. Conceptual Purpose Of ARP
d Isolates hardware address at low level
d Allows application programs to use IP addresses
Internetworking With TCP/IP vol 1 -- Part 5 18 2005
136. ARP Encapsulation
d ARP message travels in data portion of network frame
d We say ARP message is encapsulated
Internetworking With TCP/IP vol 1 -- Part 5 19 2005
137. Illustration Of ARP Encapsulation
ARP MESSAGE
FRAME FRAME DATA AREA
HEADER
Internetworking With TCP/IP vol 1 -- Part 5 20 2005
138. Ethernet Encapsulation
d ARP message placed in frame data area
d Data area padded with zeroes if ARP message is shorter
than minimum Ethernet frame
d Ethernet type 0x0806 used for ARP
Internetworking With TCP/IP vol 1 -- Part 5 21 2005
139. Reverse Address Resolution Protocol
d Maps Ethernet address to IP address
d Same packet format as ARP
d Intended for bootstrap
– Computer sends its Ethernet address
– RARP server responds by sending computer’s IP address
d Seldom used (replaced by DHCP)
Internetworking With TCP/IP vol 1 -- Part 5 22 2005
140. Summary
d Computer’s IP address independent of computer’s hardware
address
d Applications use IP addresses
d Hardware only understands hardware addresses
d Must map from IP address to hardware address for
transmission
d Two types
– Direct mapping
– Dynamic mapping
Internetworking With TCP/IP vol 1 -- Part 5 23 2005
141. Summary
(continued)
d Address Resolution Protocol (ARP) used for dynamic
address mapping
d Important for Ethernet
d Sender broadcasts ARP request, and target sends ARP reply
d ARP bindings are cached
d Reverse ARP was originally used for bootstrap
Internetworking With TCP/IP vol 1 -- Part 5 24 2005
143. PART VI
INTERNET PROTOCOL:
CONNECTIONLESS DATAGRAM
DELIVERY
Internetworking With TCP/IP vol 1 -- Part 6 1 2005
144. Internet Protocol
d One of two major protocols in TCP/IP suite
d Major goals
– Hide heterogeneity
– Provide the illusion of a single large network
– Virtualize access
Internetworking With TCP/IP vol 1 -- Part 6 2 2005
145. The Concept
IP allows a user to think of an internet as a single virtual
network that interconnects all hosts, and through which
communication is possible; its underlying architecture is both
hidden and irrelevant.
Internetworking With TCP/IP vol 1 -- Part 6 3 2005
146. Internet Services
And Architecture
Of Protocol Software
APPLICATION SERVICES
RELIABLE TRANSPORT SERVICE
CONNECTIONLESS PACKET DELIVERY SERVICE
d Design has proved especially robust
Internetworking With TCP/IP vol 1 -- Part 6 4 2005
147. IP Characteristics
d Provides connectionless packet delivery service
d Defines three important items
– Internet addressing scheme
– Format of packets for the (virtual) Internet
– Packet forwarding
Internetworking With TCP/IP vol 1 -- Part 6 5 2005
148. Internet Packet
d Analogous to physical network packet
d Known as IP datagram
Internetworking With TCP/IP vol 1 -- Part 6 6 2005
149. IP Datagram Layout
DATAGRAM HEADER DATAGRAM DATA AREA
d Header contains
– Source Internet address
– Destination Internet address
– Datagram type field
d Payload contains data being carried
Internetworking With TCP/IP vol 1 -- Part 6 7 2005
150. Datagram Header Format
0 4 8 16 19 24 31
VERS HLEN TYPE OF SERVICE TOTAL LENGTH
IDENT FLAGS FRAGMENT OFFSET
TTL TYPE HEADER CHECKSUM
SOURCE IP ADDRESS
DESTINATION IP ADDRESS
IP OPTIONS (MAY BE OMITTED) PADDING
BEGINNING OF PAYLOAD (DATA)
.
.
.
Internetworking With TCP/IP vol 1 -- Part 6 8 2005
151. Addresses In The Header
d SOURCE is the address of original source
d DESTINATION is the address of ultimate destination
Internetworking With TCP/IP vol 1 -- Part 6 9 2005
152. IP Versions
d Version field in header defines version of datagram
d Internet currently uses version 4 of IP, IPv4
d Preceding figure is the IPv4 datagram format
d IPv6 discussed later in the course
Internetworking With TCP/IP vol 1 -- Part 6 10 2005
153. Datagram Encapsulation
d Datagram encapsulated in network frame
d Network hardware treats datagram as data
d Frame type field identifies contents as datagram
– Set by sending computer
– Tested by receiving computer
Internetworking With TCP/IP vol 1 -- Part 6 11 2005
154. Datagram Encapsulation For Ethernet
IP HEADER IP DATA
FRAME HEADER FRAME DATA
d Ethernet header contains Ethernet hardware addresses
d Ethernet type field set to 0x0800
Internetworking With TCP/IP vol 1 -- Part 6 12 2005
155. Datagram Encapsulated In Ethernet Frame
02 07 01 00 27 ba 08 00 2b 0d 44 a7 08 00 45 00
00 54 82 68 00 00 f f 01 35 21 80 0a 02 03 80 0a
02 08 08 00 73 0b d4 6d 00 00 04 3b 8c 28 28 20
0d 00 08 09 0a 0b 0c 0d 0e 0 f 10 11 12 13 14 15
16 17 18 19 1a 1b 1c 1d 1e 1 f 20 21 22 23 24 25
26 27 28 29 2a 2b 2c 2d 2e 2 f 30 31 32 33 34 35
36 37
d 20-octet IP header follows Ethernet header
d IP source: 128.10.2.3 (800a0203)
d IP destination: 128.10.2.8 (800a0208)
d IP type: 01 (ICMP)
Internetworking With TCP/IP vol 1 -- Part 6 13 2005
156. Standards For Encapsulation
d TCP/IP protocols define encapsulation for each possible type
of network hardware
– Ethernet
– Frame Relay
– Others
Internetworking With TCP/IP vol 1 -- Part 6 14 2005
157. Encapsulation Over Serial Networks
d Serial hardware transfers stream of octets
– Leased serial data line
– Dialup telephone connection
d Encapsulation of IP on serial network
– Implemented by software
– Both ends must agree
d Most common standards: Point to Point Protocol (PPP)
Internetworking With TCP/IP vol 1 -- Part 6 15 2005
158. Encapsulation For Avian Carriers (RFC 1149)
d Characteristics of avian carrier
– Low throughput
– High delay
– Low altitude
– Point-to-point communication
– Intrinsic collision avoidance
d Encapsulation
– Write in hexadecimal on scroll of paper
– Attach to bird’s leg with duct tape
d For an implementation see
http://www.blug.linux.no/rfc1149
159. A Potential Problem
d A datagram can contain up to 65535 total octets (including
header)
d Network hardware limits maximum size of frame (e.g.,
Ethernet limited to 1500 octets)
– Known as the network Maximum Transmission Unit
(MTU)
d Question: how is encapsulation handled if datagram exceeds
network MTU?
Internetworking With TCP/IP vol 1 -- Part 6 16 2005
160. Possible Ways To Accommodate
Networks With Differing MTUs
d Force datagram to be less than smallest possible MTU
– Inefficient
– Cannot know minimum MTU
d Hide the network MTU and accommodate arbitrary
datagram size
Internetworking With TCP/IP vol 1 -- Part 6 17 2005
161. Accommodating Large Datagrams
d Cannot send large datagram in single frame
d Solution
– Divide datagram into pieces
– Send each piece in a frame
– Called datagram fragmentation
Internetworking With TCP/IP vol 1 -- Part 6 18 2005
162. Illustration Of When Fragmentation Needed
Host Host
A B
Net 1 Net 3
MTU=1500 MTU=1500
Net 2
R1 R2
MTU=620
d Hosts A and B send datagrams of up to 1500 octets
d Router R1 fragments large datagrams from Host A before
sending over Net 2
d Router R2 fragments large datagrams from Host B before
sending over Net 2
Internetworking With TCP/IP vol 1 -- Part 6 19 2005
163. Datagram Fragmentation
d Performed by routers
d Divides datagram into several, smaller datagrams called
fragments
d Fragment uses same header format as datagram
d Each fragment forwarded independently
Internetworking With TCP/IP vol 1 -- Part 6 20 2005
164. Illustration Of Fragmentation
Original datagram
.
. .
.
. .
data1 .
. data2 .
. data3
Header .
. .
.
600 bytes .
.
.
600 bytes .
.
.
200 bytes
. .
Header1 data1 fragment #1 (offset of 0)
Header2 data2 fragment #2 (offset of 600)
Header3 data3 fragment #3 (offset of 1200)
d Offset specifies where data belongs in original datagram
d Offset actually stored as multiples of 8 octets
d MORE FRAGMENTS bit turned off in header of fragment
#3
Internetworking With TCP/IP vol 1 -- Part 6 21 2005
165. Fragmenting A Fragment
d Fragment can be further fragmented
d Occurs when fragment reaches an even-smaller MTU
d Discussion: which fields of the datagram header are used,
and what is the algorithm?
Internetworking With TCP/IP vol 1 -- Part 6 22 2005
166. Reassembly
d Ultimate destination puts fragments back together
– Key concept!
– Needed in a connectionless Internet
d Known as reassembly
d No need to reassemble subfragments first
d Timer used to ensure all fragments arrive
– Timer started when first fragment arrives
– If timer expires, entire datagram discarded
Internetworking With TCP/IP vol 1 -- Part 6 23 2005
167. Time To Live
d TTL field of datagram header decremented at each hop (i.e.,
each router)
d If TTL reaches zero, datagram discarded
d Prevents datagrams from looping indefinitely (in case
forwarding error introduces loop)
d IETF recommends initial value of 255 (max)
Internetworking With TCP/IP vol 1 -- Part 6 24 2005
168. Checksum Field In Datagram Header
d 16-bit 1’s complement checksum
d Over IP header only!
d Recomputed at each hop
Internetworking With TCP/IP vol 1 -- Part 6 25 2005
169. IP Options
d Seldom used
d Primarily for debugging
d Only some options copied into fragments
d Are variable length
d Note: padding needed because header length measured in
32-bit multiples
d Option starts with option code octet
Internetworking With TCP/IP vol 1 -- Part 6 26 2005
170. Option Code Octet
0 1 2 3 4 5 6 7
COPY OPTION CLASS OPTION NUMBER
Option Class Meaning
0 Datagram or network control
1 Reserved for future use
2 Debugging and measurement
3 Reserved for future use
Internetworking With TCP/IP vol 1 -- Part 6 27 2005
171. IP Semantics
d IP uses best-effort delivery
– Makes an attempt to deliver
– Does not guarantee delivery
d In the Internet, routers become overrun or change routes,
meaning that:
– Datagrams can be lost
– Datagrams can be duplicated
– Datagrams can arrive out of order or scrambled
d Motivation: allow IP to operate over the widest possible
variety of physical networks
Internetworking With TCP/IP vol 1 -- Part 6 28 2005
172. Output From
PING Program
PING venera.isi.edu (128.9.0.32): 64 data bytes
at 1.0000 second intervals
72 bytes from 128.9.0.32: icmp_seq=0. time=170. ms
72 bytes from 128.9.0.32: icmp_seq=1. time=150. ms
72 bytes from 128.9.0.32: icmp_seq=1. time=160. ms
72 bytes from 128.9.0.32: icmp_seq=2. time=160. ms
72 bytes from 128.9.0.32: icmp_seq=3. time=160. ms
----venera.isi.edu PING Statistics----
4 packets transmitted, 5 packets received,
-25% packet loss
round-trip (ms) min/avg/max = 150/160/170
d Shows actual case of duplication
Internetworking With TCP/IP vol 1 -- Part 6 29 2005
173. Summary
d Internet Protocol provides basic connectionless delivery
service for the Internet
d IP defines IP datagram to be the format of packets on the
Internet
d Datagram header
– Has fixed fields
– Specifies source, destination, and type
– Allows options
d Datagram encapsulated in network frame for transmission
Internetworking With TCP/IP vol 1 -- Part 6 30 2005
174. Summary
(continued)
d Fragmentation
– Needed when datagram larger than MTU
– Usually performed by routers
– Divides datagram into fragments
d Reassembly
– Performed by ultimate destination
– If some fragment(s) do not arrive, datagram discarded
d To accommodate all possible network hardware, IP does not
require reliability (best-effort semantics)
Internetworking With TCP/IP vol 1 -- Part 6 31 2005
176. PART VII
INTERNET PROTOCOL:
FORWARDING IP DATAGRAMS
Internetworking With TCP/IP vol 1 -- Part 7 1 2005
177. Datagram Transmission
d Host delivers datagrams to directly connected machines
d Host sends datagrams that cannot be delivered directly to
router
d Routers forward datagrams to other routers
d Final router delivers datagram directly
Internetworking With TCP/IP vol 1 -- Part 7 2 2005
178. Question
Does a host need to make forwarding choices?
Internetworking With TCP/IP vol 1 -- Part 7 3 2005
179. Question
Does a host need to make forwarding choices?
Answer: YES!
Internetworking With TCP/IP vol 1 -- Part 7 3 2005
180. Example Host That Must Choose
How To Forward Datagrams
path to some path to other
destinations destinations
R1 R2
HOST
d Note: host is singly homed!
Internetworking With TCP/IP vol 1 -- Part 7 4 2005
181. Two Broad Cases
d Direct delivery
– Ultimate destination can be reached over one network
– The ‘‘last hop’’ along a path
– Also occurs when two communicating hosts both attach
to the same physical network
d Indirect delivery
– Requires intermediary (router)
Internetworking With TCP/IP vol 1 -- Part 7 5 2005
182. Important Design Decision
Transmission of an IP datagram between two machines on a
single physical network does not involve routers. The sender
encapsulates the datagram in a physical frame, binds the
destination IP address to a physical hardware address, and
sends the resulting frame directly to the destination.
Internetworking With TCP/IP vol 1 -- Part 7 6 2005
183. Testing Whether A Destination
Lies On The Same Physical Network
As The Sender
Because the Internet addresses of all machines on a single
network include a common network prefix and extracting that
prefix requires only a few machine instructions, testing whether
a machine can be reached directly is extremely efficient.
Internetworking With TCP/IP vol 1 -- Part 7 7 2005
184. Datagram Forwarding
d General paradigm
– Source host sends to first router
– Each router passes datagram to next router
– Last router along path delivers datagram to destination
host
d Only works if routers cooperate
Internetworking With TCP/IP vol 1 -- Part 7 8 2005
185. General Concept
Routers in a TCP/IP Internet form a cooperative,
interconnected structure. Datagrams pass from router to router
until they reach a router that can deliver the datagram directly.
Internetworking With TCP/IP vol 1 -- Part 7 9 2005
186. Efficient Forwarding
d Decisions based on table lookup
d Routing tables keep only network portion of addresses (size
proportional to number of networks, not number of hosts)
d Extremely efficient
– Lookup
– Route update
Internetworking With TCP/IP vol 1 -- Part 7 10 2005
187. Important Idea
d Table used to decide how to send datagram known as
routing table (also called a forwarding table)
d Routing table only stores address of next router along the
path
d Scheme is known as next-hop forwarding or next-hop
routing
Internetworking With TCP/IP vol 1 -- Part 7 11 2005
188. Terminology
d Originally
– Routing used to refer to passing datagram from router to
router
d More recently
– Purists decided to use forwarding to refer to the process
of looking up a route and sending a datagram
d But...
– Table is usually called a routing table
Internetworking With TCP/IP vol 1 -- Part 7 12 2005
189. Conceptual Contents Of Routing Table
Found In An IP Router
20.0.0.5 30.0.0.6 40.0.0.7
Network Network Network Network
10.0.0.0 Q 20.0.0.0 R 30.0.0.0 S 40.0.0.0
10.0.0.5 20.0.0.6 30.0.0.7
An example Internet with IP addresses
TO REACH ROUTE TO
NETWORK THIS ADDRESS
20.0.0.0 / 8 DELIVER DIRECT
30.0.0.0 / 8 DELIVER DIRECT
10.0.0.0 / 8 20.0.0.5
40.0.0.0 / 8 30.0.0.7
The routing table for router R
Internetworking With TCP/IP vol 1 -- Part 7 13 2005
190. Special Cases
d Default route
d Host-specific route
Internetworking With TCP/IP vol 1 -- Part 7 14 2005
191. Default Route
d Special entry in IP routing table
d Matches ‘‘any’’ destination address
d Only one default permitted
d Only selected if no other match in table
Internetworking With TCP/IP vol 1 -- Part 7 15 2005
192. Host-Specific Route
d Entry in routing table
d Matches entire 32-bit value
d Can be used to send traffic for a specific host along a
specific path (i.e., can differ from the network route)
d More later in the course
Internetworking With TCP/IP vol 1 -- Part 7 16 2005
193. Level Of Forwarding Algorithm
EXAMINATION OR DATAGRAM
UPDATES OF ROUTES TO BE FORWARDED
ROUTING
FORWARDING
TABLE
ALGORITHM
IP addresses used
Physical addresses used
DATAGRAM TO BE SENT
PLUS ADDRESS OF NEXT HOP
d Routing table uses IP addresses, not physical addresses
Internetworking With TCP/IP vol 1 -- Part 7 17 2005
194. Summary
d IP uses routing table to forward datagrams
d Routing table
– Stores pairs of network prefix and next hop
– Can contain host-specific routes and a default route
Internetworking With TCP/IP vol 1 -- Part 7 18 2005
196. PART VIII
ERROR AND CONTROL
MESSAGES
(ICMP)
Internetworking With TCP/IP vol 1 -- Part 8 1 2005
197. Errors In Packet Switching Networks
d Causes include
– Temporary or permanent disconnection
– Hardware failures
– Router overrun
– Routing loops
d Need mechanisms to detect and correct
Internetworking With TCP/IP vol 1 -- Part 8 2 2005
198. Error Detection And
Reporting Mechanisms
d IP header checksum to detect transmission errors
d Error reporting mechanism to distinguish between events
such as lost datagrams and incorrect addresses
d Higher level protocols (i.e., TCP) must handle all other
problems
Internetworking With TCP/IP vol 1 -- Part 8 3 2005
199. Error Reporting Mechanism
d Named Internet Control Message Protocol (ICMP)
d Required and integral part of IP
d Used primarily by routers to report delivery or routing
problems to original source
d Also includes informational (nonerror) functionality
d Uses IP to carry control messages
d No error messages sent about error messages
Internetworking With TCP/IP vol 1 -- Part 8 4 2005
200. ICMP Purpose
The Internet Control Message Protocol allows a router to send
error or control messages to the source of a datagram, typically
a host. ICMP provides communication between the Internet
Protocol software on one machine and the Internet Protocol
software on another.
Internetworking With TCP/IP vol 1 -- Part 8 5 2005
201. Error Reporting Vs. Error Correction
d ICMP does not
– Provide interaction between a router and the source of
trouble
– Maintain state information (each packet is handled
independently)
d Consequence
When a datagram causes an error, ICMP can only report the
error condition back to the original source of the datagram; the
source must relate the error to an individual application
program or take other action to correct the problem.
Internetworking With TCP/IP vol 1 -- Part 8 6 2005
202. Important Restriction
d ICMP only reports problems to original source
d Discussion question: what major problem in the Internet
cannot be handled with ICMP?
Internetworking With TCP/IP vol 1 -- Part 8 7 2005
203. ICMP Encapsulation
d ICMP message travels in IP datagram
d Entire ICMP message treated as data in the datagram
d Two levels of encapsulation result
Internetworking With TCP/IP vol 1 -- Part 8 8 2005
204. ICMP Message Encapsulation
ICMP MESSAGE
IP HEADER IP DATA
FRAME HEADER FRAME DATA
d ICMP message has header and data area
d Complete ICMP message is treated as data in IP datagram
d Complete IP datagram is treated as data in physical network
frame
Internetworking With TCP/IP vol 1 -- Part 8 9 2005
205. Example Encapsulation In Ethernet
02 07 01 00 27 ba 08 00 2b 0d 44 a7 08 00 45 00
00 54 82 68 00 00 f f 01 35 21 80 0a 02 03 80 0a
02 08 08 00 73 0b d4 6d 00 00 04 3b 8c 28 28 20
0d 00 08 09 0a 0b 0c 0d 0e 0 f 10 11 12 13 14 15
16 17 18 19 1a 1b 1c 1d 1e 1 f 20 21 22 23 24 25
26 27 28 29 2a 2b 2c 2d 2e 2 f 30 31 32 33 34 35
36 37
d ICMP header follows IP header, and contains eight bytes
d ICMP type field specifies echo request message (08)
d ICMP sequence number is zero
Internetworking With TCP/IP vol 1 -- Part 8 10 2005
206. ICMP Message Format
d Multiple message types
d Each message has its own format
d Messages
– Begin with 1-octet TYPE field that identifies which of
the basic ICMP message types follows
– Some messages have a 1-octet CODE field that further
classifies the message
d Example
– TYPE specifies destination unreachable
– CODE specifies whether host or network was
unreachable
Internetworking With TCP/IP vol 1 -- Part 8 11 2005
207. ICMP Message Types
Type Field ICMP Message Type
0 Echo Reply
3 Destination Unreachable
4 Source Quench
5 Redirect (change a route)
6 Alternate Host Address
8 Echo Request
9 Router Advertisement
10 Router Solicitation
11 Time Exceeded for a Datagram
12 Parameter Problem on a Datagram
13 Timestamp Request
14 Timestamp Reply
15 Information Request
16 Information Reply
17 Address Mask Request
18 Address Mask Reply
Internetworking With TCP/IP vol 1 -- Part 8 12 2005
208. ICMP Message Types
(continued)
Type Field ICMP Message Type
30 Traceroute
31 Datagram Conversion Error
32 Mobile Host Redirect
33 IPv6 Where-Are-You
34 IPv6 I-Am-Here
35 Mobile Registration Request
36 Mobile Registration Reply
37 Domain Name Request
38 Domain Name Reply
39 SKIP
40 Photuris
Internetworking With TCP/IP vol 1 -- Part 8 13 2005
209. Example ICMP Message
(ICMP Echo Request)
0 8 16 31
TYPE (8 or 0) CODE (0) CHECKSUM
IDENTIFIER SEQUENCE NUMBER
OPTIONAL DATA
...
d Sent by ping program
d Used to test reachability
Internetworking With TCP/IP vol 1 -- Part 8 14 2005
210. Example ICMP Message
(Destination Unreachable)
0 8 16 31
TYPE (3) CODE (0-12) CHECKSUM
UNUSED (MUST BE ZERO)
INTERNET HEADER + FIRST 64 BITS OF DATAGRAM
...
d Used to report that datagram could not be delivered
d Code specifies details
Internetworking With TCP/IP vol 1 -- Part 8 15 2005
211. Example ICMP Message
(Redirect)
0 8 16 31
TYPE (5) CODE (0 to 3) CHECKSUM
ROUTER INTERNET ADDRESS
INTERNET HEADER + FIRST 64 BITS OF DATAGRAM
...
d Used to report incorrect route
Internetworking With TCP/IP vol 1 -- Part 8 16 2005
212. Situation Where An ICMP Redirect
Cannot Be Used
R2
R3
R1 R5
S D
R4
d R5 cannot redirect R1 to use shorter path
Internetworking With TCP/IP vol 1 -- Part 8 17 2005
213. Example ICMP Message
(Time Exceeded)
0 8 16 31
TYPE (11) CODE (0 or 1) CHECKSUM
UNUSED (MUST BE ZERO)
INTERNET HEADER + FIRST 64 BITS OF DATAGRAM
...
d At least one fragment failed to arrive, or
d TTL field in IP header reached zero
Internetworking With TCP/IP vol 1 -- Part 8 18 2005
214. ICMP Trick
d Include datagram that caused problem in the error message
– Efficient (sender must determine how to correct
problem)
– Eliminates need to construct detailed message
d Problem: entire datagram may be too large
d Solution: send IP header plus 64 bits of data area (sufficient
in most cases)
Internetworking With TCP/IP vol 1 -- Part 8 19 2005
215. Summary
d ICMP
– Required part of IP
– Used to report errors to original source
– Reporting only: no interaction or error correction
d Several ICMP message types, each with its own format
d ICMP message begins with 1-octet TYPE field
d ICMP encapsulated in IP for delivery
Internetworking With TCP/IP vol 1 -- Part 8 20 2005
217. PART IX
INTERNET PROTOCOL:
CLASSLESS AND SUBNET
ADDRESS EXTENSIONS
(CIDR)
Internetworking With TCP/IP vol 1 -- Part 9 1 2005
218. Recall
In the original IP addressing scheme, each physical network is
assigned a unique network address; each host on a network has
the network address as a prefix of the host’s individual address.
d Routers only examine prefix (small routing tables)
Internetworking With TCP/IP vol 1 -- Part 9 2 2005
219. An Observation
d Division into prefix and suffix means: site can assign and
use IP addresses in unusual ways provided
– All hosts and routers at the site honor the site’s scheme
– Other sites on the Internet can treat addresses as a
network prefix and a host suffix
Internetworking With TCP/IP vol 1 -- Part 9 3 2005
220. Classful Addressing
d Three possible classes for networks
d Class C network limited to 254 hosts (cannot use all-1s or
all-0s)
d Personal computers result in networks with many hosts
d Class B network allows many hosts, but insufficient class B
prefixes
Internetworking With TCP/IP vol 1 -- Part 9 4 2005
221. Question
d How can we minimize the number of assigned network
prefixes (especially class B) without abandoning the 32-bit
addressing scheme?
Internetworking With TCP/IP vol 1 -- Part 9 5 2005
222. Two Answers To The Minimization Question
d Proxy ARP
d Subnet addressing
Internetworking With TCP/IP vol 1 -- Part 9 6 2005
223. Proxy ARP
d Layer 2 solution
d Allow two physical networks to share a single IP prefix
d Arrange special system to answer ARP requests and forward
datagrams between networks
Internetworking With TCP/IP vol 1 -- Part 9 7 2005
224. Illustration Of Proxy ARP
Main Network
H1 H2 H3 Router running proxy ARP
R
H4 H5
Hidden Network
d Hosts think they are on same network
d Known informally as the ARP hack
Internetworking With TCP/IP vol 1 -- Part 9 8 2005
225. Assessment Of Proxy ARP
d Chief advantages
– Transparent to hosts
– No change in IP routing tables
d Chief disadvantages
– Does not generalize to complex topology
– Only works on networks that use ARP
– Most proxy ARP systems require manual configuration
Internetworking With TCP/IP vol 1 -- Part 9 9 2005
226. Subnet Addressing
d Not part of original TCP/IP address scheme
d Allows an organization to use a single network prefix for
multiple physical networks
d Subdivides the host suffix into a pair of fields for physical
network and host
d Interpreted only by routers and hosts at the site; treated like
normal address elsewhere
Internetworking With TCP/IP vol 1 -- Part 9 10 2005
227. Example Of Subnet Addressing
Network 128.10.1.0
128.10.1.1 128.10.1.2
H1 H2
REST OF THE
R
INTERNET
Network 128.10.2.0
128.10.2.1 128.10.2.2
all traffic to H3 H4
128.10.0.0
d Both physical networks share prefix 128.10
d Router R uses third octet of address to choose physical net
Internetworking With TCP/IP vol 1 -- Part 9 11 2005
228. Interpretation Of Addresses
d Classful interpretation is two-level hierarchy
– Physical network identified by prefix
– Host on the net identified by suffix
d Subnetted interpretation is three-level hierarchy
– Site identified by network prefix
– Physical net at site identified by part of suffix
– Host on the net identified by remainder of suffix
Internetworking With TCP/IP vol 1 -- Part 9 12 2005