1
Introduction
Internet Protocols
CSC / ECE 573
Fall, 2005
N. C. State Universitycopyright 2005 Douglas S. Reeves 2
Lecture Notes
⇒Will be online by noon of the preceding day (todaywas an exception)
copyright 2005 Douglas S. Reeves 3
Today’s Lecture
I. Course Background
II. Course Overview
III. Internet Growth and Performance
IV. Basic Concepts and Terms
V. Ethernet Frames
VI. Defining Internet Standards
COURSE BACKGROUND
copyright 2005 Douglas S. Reeves 5
Syllabus and Calendar Are Online• http://courses.ncsu.edu/csc573/
copyright 2005 Douglas S. Reeves 6
“Your Instructor”
2
copyright 2005 Douglas S. Reeves 7
Expected Student Background
• Programming ability– (C / C++ advised, all code examples given in C)
• Course in Operating Systems
• Introduction to Computer Networks
• Computer Science or Computer Engineeringbackground
copyright 2005 Douglas S. Reeves 8
Student Survey
• Please fill out a card with…– Your neighbor’s name– How well your neighbor programs in C / C++
(not at all, beginner, intermediate, advanced)
– Your neighbor’s prior networking background• courses, projects• work experience
copyright 2005 Douglas S. Reeves 9
Textbooks
• Required: D. Comer,Internetworking withTCP/IP: Principles,Protocols, andArchitectures, Volume I(5th ed.)
copyright 2005 Douglas S. Reeves 10
Textbooks
• Recommended:D.Comer andD.L.Stevens,Internetworking withTCP/IP: Client-ServerProgramming andApplications, Volume III(Linux or Windowsedition)
copyright 2005 Douglas S. Reeves 11
RFCs
• We will refer frequently to IETF Requests forComments
the IETF web page (www.ietf.org) the RFC search page(http://www.rfc-editor.org/rfcsearch.html)
copyright 2005 Douglas S. Reeves 12
A Protocol Specification Example
• The ICMP specification(http://www.ietf.org/rfc/rfc0792.txt)
• A “prettier” version(http://www.zvon.org/tmRFC/RFC792/Output/index.html)
3
copyright 2005 Douglas S. Reeves 13
Homework / Grading
• Class participation: Encouraged!
5%Participation
100%TOTAL
30%Final Exam
15%Midterm exam
20%Project
30%Homework
WeightActivity
copyright 2005 Douglas S. Reeves 14
Help
• My availability
• The TA: Juan Du
• The class message board
• Other students
copyright 2005 Douglas S. Reeves 15
Policy on Plagiarism
11. Thou shalt not
copy…
copyright 2005 Douglas S. Reeves 16
The Project
• Implement an existing network protocol, and test it– e.g., TCP, RIP, DNS
• Implement an existing application-level protocol– e.g., IMAP, SSH, HTTP
• Implement a new protocol described in a recentresearch paper, and write the specification
• Design, specify, implement, and test (!) areplacement for TCP to use in an interplanetaryInternet
OVERVIEW
copyright 2005 Douglas S. Reeves 18
Course Objectives• Learn about the most important Internet
protocols, including their…1.function2.performance and design tradeoffs3. implementation
• Learn how to write protocol specifications
• Learn how to program client-serverapplications using the sockets API
• Be able to analyze Internet traffic
4
copyright 2005 Douglas S. Reeves 19
Topics We Study
ARP / RARP
IPv4 classful and classless addresses, subnetting
IP
ICMP
UDP, TCP
Sockets API and client-server programming
Routing: RIP, OSPF, BGP
DHCP
DNS
Basic,“workhorse”
protocols
copyright 2005 Douglas S. Reeves 20
Topics We Study (cont’d)
Multicast
RTP and VoIP
IPSec
IPv6
Mobile IP
Newer, less“mature” protocols
copyright 2005 Douglas S. Reeves 21
Why Has the TCP/IP Protocol Suite BeenSo Successful?
• My opinion…
– A single, unifying layer (IP)
– An open, highly dynamic standards process
– Emphasis on practicality and simplicity
– Emphasis on scalability, extensibility, instead ofmaximum features or efficiency
• “Working code and rough consensus”
• Will it last?
copyright 2005 Douglas S. Reeves 22
A Little History
• Started as a research network by the USgovernment (DARPA really did invent theInternet)
• Transitioned to commercial operation in the mid-1990s
• Some references– http://www.isoc.org/internet/history/
– http://www.zakon.org/robert/internet/timeline/
copyright 2005 Douglas S. Reeves 23
A Few Highlights
• 1961 – First paper on packet switching
• 1969 – 4-node ARPANET (UCLA+SRI+UCSB+Utah, 50Kbps)
• 1969 – First RFC• 1971 – First real application in use (email)
• 1975 – Ethernet invented
• 1980-81 – UDP, IPv4, TCP RFCs adopted• 1984 – DNS introduced
• 1986 – IETF and IRTF started
• 1988 – First Internet worm released
copyright 2005 Douglas S. Reeves 24
A Few Highlights (cont’d)
• 1991 – WWW protocols created, first webserver
• 1993 – first web browser (Mosaic)• 1994 – IPv6 effort started• 1995 – Internet backbone taken over by
commercial service providers• 2000 – Major attacks over the Internet become
common
5
copyright 2005 Douglas S. Reeves 25
Who Owns the Internet?
• Countries operate national networks, usually ina non-competitive environment
• Network service providers (commercial carriers)provide the “backbone” bandwidth
• Companies and organizations build their ownprivate networks (intranets) and connect to theInternet
• Internet service providers (ISPs) provide accesslinks to individual customers
Internet Growth and Performance
copyright 2005 Douglas S. Reeves 27
How Many Computers Connect to theInternet?
Computers with registered IP addresses
copyright 2005 Douglas S. Reeves 28
Routing Table Growth
copyright 2005 Douglas S. Reeves 29
How Much Traffic Is There?
• Really difficult to answer, lots of debate about whatthe real numbers are
• One prediction (2001):
4898200Price($/month/Mbps)
35,264,0008,816,0002,204,000Total traffic (Mbps)
200520032001Year
copyright 2005 Douglas S. Reeves 30
Internet Share by Country
100.0 %14.6 %160.0 %938,710,929100.0 %6,420,102,722WORLDTOTAL
1.8 %49.2 %115.9 %16,448,9660.5 %33,443,448Oceania /Australia
7.3 %12.5 %277.1 %68,130,8048.5 %546,723,509LatinAmerica /Caribbean
23.8 %68.0 %106.7 %223,392,8075.1 %328,387,059NorthAmerica
2.3 %8.3 %311.9 %21,770,7004.1 %260,814,179Middle East
28.7 %36.8 %161.0 %269,036,09611.4 %731,018,523Europe
34.5 %8.9 %183.2 %323,756,95656.4 %3,622,994,130Asia
1.7 %1.8 %258.3 %16,174,60014.0 %896,721,874Africa
WorldUsers %
% Population( Penetration )
Usage Growth2000-2005
Internet Usage,Latest Data
Population% of World
Population( 2005 Est.)
WorldRegions
WORLD INTERNET USAGE AND POPULATION STATISTICS
6
copyright 2005 Douglas S. Reeves 31
Map of Intercontinental Bandwidth (2001)
copyright 2005 Douglas S. Reeves 32
Who “Peers” with Whom?
copyright 2005 Douglas S. Reeves 33
What Applications Use the Internet?
• Example measured from one set of backbonelinks…
5% - 21%Other0% - 7%File transfer0% - 6%Mail
0% - 26%Streaming0% - 80%P2P+unknown11 - 90%Web
% of Traffic (Bytes)Protocol
• Typically over 80% of Internet traffic uses TCPcopyright 2005 Douglas S. Reeves 34
How Big Are Packets?
copyright 2005 Douglas S. Reeves 35
How Long / Large Are Connections?
• Most are short and small– 40-70% last less than 2 seconds– 90% of flows transfer less than 1 KB
• Only 1% last more than 15 minutes
copyright 2005 Douglas S. Reeves 36
Internet Performance Example• 99.98% network uptime
• Avg. internet latency (one way) < 40 ms.– (speed of light: halfway around globe = 65ms)
• Avg packet loss rate < 0.05%
7
copyright 2005 Douglas S. Reeves 37
How Many Routers Are Traversed on aTypical “Path”?
copyright 2005 Douglas S. Reeves 38
Security Trends
0
20000
40000
60000
80000
100000
120000
140000
1988 1991 1994 1997 2000 2003
# of SecurityIncidents
Some Basic Concepts and Terms
copyright 2005 Douglas S. Reeves 40
Terminology
• An internet: any interconnected networks– an intranet: all owned and operated by a single
organization
• The Internet: “A collection of networks and routersthat spans the globe and uses the TCP/IPprotocols to form a single, cooperative virtualnetwork.”– packet-switched, connectionless
copyright 2005 Douglas S. Reeves 41
Terminology (cont’d)
• A datagram (or packet) is the unit of transmissionin the TCP/IP protocol suite– has one header, contains source and destination
addresses
copyright 2005 Douglas S. Reeves 42
Protocols
• Protocol specifications generally contain…1. purpose2. formats of messages exchanged (syntax)
3. interpretation of message contents (semantics)
4. actions taken upon receipt of messages (statemachine)
5. how to handle errors
8
copyright 2005 Douglas S. Reeves 43
Layers of the TCP/IP Protocol Suite
Application Layer
Transport Layer
Network Layer
Link Layer
Ex.: FTP, E-mail, HTTP, …
Ex.: TCP, UDP
Ex.: IP
Ex.: Ethernet
copyright 2005 Douglas S. Reeves 44
“Anything over IP, IP over Anything”
copyright 2005 Douglas S. Reeves 45
TCP/IP Encapsulation and Decapsulation
FTP
TCP
IP
Application Data
Application Data
Application DataTCP Header
IPHeader
EthernetHeader
EthernetTrailer
Enca
psul
atio
n
Application DataTCP Header
IPHeader
TCP Header
Ethernet
Dec
apsu
latio
n
copyright 2005 Douglas S. Reeves 46
TCP/IP Demultiplexing (Decapsulation)
Demultiplexingbased on frame typein Ethernet header
Demultiplexingbased onProtocol Typein IP header
Demultiplexingbased ondestination port# in TCP orUDP header
EthernetDriver
ARP IP RARP
ICMP IGMPTCP UDP
application application application application… …
copyright 2005 Douglas S. Reeves 47
Example: Two Networks Connected by aRouter
copyright 2005 Douglas S. Reeves 48
“Layering Considered Harmful?”
• Yes!– Why?
• No!– Why not?
9
copyright 2005 Douglas S. Reeves 49
Capturing and Analyzing Traffic: Ethereal
• Free, available on most platforms (Windows,Linux, Unix)
• “Captures” traffic from a network
• Analyzes and displays traffic in convenient form– understands 100’s of protocols– very convenient filters for isolating traffic of interest
Download at http://www.ethereal.com
Ethernet Framing AndPacket Sizes
copyright 2005 Douglas S. Reeves 51
HW1
• Online now, due next Tuesday
• Ethereal
• Getting help
copyright 2005 Douglas S. Reeves 52
Ethernet
• 2 Versions: RFC 894 (“Ethernet”), IEEE 802.3
• Speeds: 10 Mb/s, 100 Mb/s, 1 Gb/s, 10 Gb/s
copyright 2005 Douglas S. Reeves 53
Ethernet Frames
data (e.g., IP datagram)EthernetHeader
EthernetTrailer
46-1500 bytes14 bytes 4 bytes
SourceMAC Address
Data (Frame)
Type
DestinationMAC Address
6 bytes 6 bytes 2 bytes
• Link layer (MAC) addresses = 48 bits• 248 ~= 3 quadrillion addresses
copyright 2005 Douglas S. Reeves 54
Maximum IP Packet Sizes
• MTU = maximum transmission unit– a function of the link layer
• If an IP packet exceeds the MTU, it must besplit up (fragmented) before transmission, andreassembled later
576X.251492IEEE 802.31500RFC 8944352FDDI
MTU (bytes)Network
10
Defining Internet Standards
copyright 2005 Douglas S. Reeves 56
Who Makes the Rules?
• IETF (Internet Engineering Task Force)– develops standards (solutions to short- and medium-
term needs)
• IETF composed of “Areas”1. Applications Area2. General Area3. Internet Area4. Operations and Management Area5. Routing Area6. Security Area7. Transport Area
copyright 2005 Douglas S. Reeves 57
IETF (cont’d)
• Areas are composed of “Working Groups”– August 2005: 123 working groups (some more active
than others)
• Other groups: IAB, ISOC, IRTF, IANA, IESG,Regional Registries, DNS root server operators, …
copyright 2005 Douglas S. Reeves 58
Standards Making Process
The IRTF or an IETF BOF(“birds of a feather”) groupsolicits ideas, identifies a need
An IETF Working Group iscreated, charged withdeveloping a proposal
Proposals are presented,debated, revised, expanded
Prototypes are implemented,tested
Interoperability tests areconducted
Experience with real users
copyright 2005 Douglas S. Reeves 59
IETF: a Meritocracy?
• Open, no-fee membership
• Published goals, milestones, and proposals
• No formal voting; disputes resolved by discussionand demonstration (mostly)– mailing lists and 3-a-year meetings
• Standardization only after several implementations
copyright 2005 Douglas S. Reeves 60
Internet Drafts and RFCs
• Internet drafts– working documents– only valid for 6 months (expire after that)
• “Request for Comments”, since 1969– numbered sequentially (August 2005: #4150)
11
copyright 2005 Douglas S. Reeves 61
RFC 2026: “The Internet StandardsProcess”
• Standards status (“maturity level”)– Proposed Standard
• Ex.: Network Address Translation – Protocol Translation
– Draft Standard• Ex.: Lightweight Directory Access Protocol
– Internet Standard• Ex.: IP, UDP
• Other types of RFCs– Best current practices
– Experimental– Informational
copyright 2005 Douglas S. Reeves 62
SummaryWelcome to the class! You’re in good hands
The Internet isn’t perfect but it works and is here tostay
The layered approach wins most of the time
Internet performance characteristics todaylow utilizationLow loss rateLow latencyHigh availability
Security threats are a major concern
Ethernet frames support 1500 byte transfers (MTUs)
copyright 2005 Douglas S. Reeves 63
Next Lecture
• IP, version 4 (IPv4)