Date post: | 28-Dec-2015 |
Category: |
Documents |
Upload: | gerald-bryant |
View: | 243 times |
Download: | 0 times |
11
NetworkingNetworking
22
Internet HistoryInternet History
1961:1961: Kleinrock - Kleinrock - queueing theory shows queueing theory shows effectiveness of packet-effectiveness of packet-switchingswitching
1964:1964: Baran - packet- Baran - packet-switching in military netsswitching in military nets
1967:1967: ARPAnet conceived ARPAnet conceived by Advanced Research by Advanced Research Projects AgencyProjects Agency
1969:1969: first ARPAnet node first ARPAnet node operationaloperational
1972:1972: ARPAnet ARPAnet
demonstrated demonstrated publiclypublicly
NCP (Network NCP (Network Control Protocol) first Control Protocol) first host-host protocol host-host protocol
first e-mail programfirst e-mail program ARPAnet has 15 ARPAnet has 15
nodesnodes
1961-1972: Early packet-switching 1961-1972: Early packet-switching principlesprinciples
33
Internet HistoryInternet History
1970:1970: ALOHAnet satellite ALOHAnet satellite network in Hawaiinetwork in Hawaii
1973:1973: Metcalfe’s PhD thesis Metcalfe’s PhD thesis proposes Ethernetproposes Ethernet
1974:1974: Cerf and Kahn - Cerf and Kahn - architecture for architecture for interconnecting networksinterconnecting networks
late70’s:late70’s: proprietary proprietary architectures: DECnet, SNA, architectures: DECnet, SNA, XNAXNA
late 70’s:late 70’s: switching fixed switching fixed length packets (ATM length packets (ATM precursor)precursor)
1979:1979: ARPAnet has 200 nodes ARPAnet has 200 nodes
Cerf and Kahn’s Cerf and Kahn’s internetworking principles:internetworking principles: minimalism, autonomy - minimalism, autonomy -
no internal changes no internal changes required to interconnect required to interconnect networksnetworks
best effort service best effort service modelmodel
stateless routersstateless routers decentralized controldecentralized control
define today’s Internet define today’s Internet architecturearchitecture
1972-1980: Internetworking, new and 1972-1980: Internetworking, new and proprietary netsproprietary nets
44
Internet HistoryInternet History
1983:1983: deployment of deployment of TCP/IPTCP/IP
1982:1982: SMTP e-mail SMTP e-mail protocol defined protocol defined
1983:1983: DNS defined for DNS defined for name-to-IP-address name-to-IP-address translationtranslation
1985:1985: FTP protocol FTP protocol defineddefined
1988:1988: TCP congestion TCP congestion controlcontrol
new national new national networks: Csnet, networks: Csnet, BITnet, NSFnet, MinitelBITnet, NSFnet, Minitel
100,000 hosts 100,000 hosts connected to connected to confederation of confederation of networksnetworks
1980-1990: new protocols, a proliferation 1980-1990: new protocols, a proliferation of networksof networks
55
Internet HistoryInternet History
Early 1990’s: Early 1990’s: ARPAnet ARPAnet decommissioneddecommissioned
1991: 1991: NSF lifts restrictions on NSF lifts restrictions on commercial use of NSFnet commercial use of NSFnet (decommissioned, 1995)(decommissioned, 1995)
early 1990s:early 1990s: Web Web hypertext [Bush 1945, hypertext [Bush 1945,
Nelson 1960’s]Nelson 1960’s] HTML, HTTP: Berners-LeeHTML, HTTP: Berners-Lee 1994: Mosaic, later Netscape1994: Mosaic, later Netscape late 1990’s: late 1990’s:
commercialization of the commercialization of the WebWeb
Late 1990’s – 2000’s:Late 1990’s – 2000’s: more killer apps: more killer apps:
instant messaging, instant messaging, peer2peer file sharing peer2peer file sharing (e.g., Naptser)(e.g., Naptser)
network security to network security to forefrontforefront
est. 50 million host, est. 50 million host, 100 million+ users100 million+ users
backbone links backbone links running at Gbpsrunning at Gbps
1990, 2000’s: commercialization, the Web, 1990, 2000’s: commercialization, the Web, new appsnew apps
Structure of the InternetStructure of the Internet
Europe
Japan
Backbone 1
Backbone 2
Backbone 3
Backbone 4, 5, N
Australia
Regional A
Regional B
NAP
NAP
NAP
NAP
SOURCE: CISCO SYSTEMS
MAPS UUNET MAPKOREA
Internet Host Count 1991-Internet Host Count 1991-20032003
172,000,000ESTIMATE:300,000,000 hosts by 2005
“Host” computer than can be reached by a URL
Internet Leverage by CountryInternet Leverage by CountryRankRank CountryCountry UsersUsers % of % of
UsersUsers% of World% of World LeveragLeverag
ee
11 U.S.U.S. 166M166M 25.025.0 4.524.52 5.555.55
22 JapanJapan 56M56M 8.48.4 2.052.05 4.204.20
33 ChinaChina 46M46M 7.07.0 20.9720.97 0.330.33
44 U.K.U.K. 35M35M 5.35.3 0.970.97 5.465.46
55 GermanyGermany 32M32M 4.84.8 1.341.34 3.583.58
66 S. KoreaS. Korea 26M26M 3.93.9 0.780.78 5.005.00
77 ItalyItaly 20M20M 3.03.0 0.930.93 3.233.23
88 RussiaRussia 18M18M 2.72.7 2.342.34 1.151.15
99 FranceFrance 17M17M 2.62.6 0.970.97 2.682.68
1010 CanadaCanada 17M17M 2.62.6 0.510.51 5.105.10
1111 BrazilBrazil 14M14M 2.12.1 2.842.84 0.740.74
1212 AustraliaAustralia 11M11M 1.71.7 0.320.32 5.315.31
1313 NetherlandNetherlandss
10M10M 1.51.5 0.260.26 5.775.77
LEVERAGE = % OF INTERNET USERS ÷ % OF WORLD POPULATION
WORLD TOTAL USERS (AUG. 2003): 700,000,000
99
What’s the Internet: “nuts and What’s the Internet: “nuts and bolts” viewbolts” view
millions of connected millions of connected computing devices: computing devices: hosts, hosts, end-systemsend-systems PCs workstations, PCs workstations,
serversservers PDAs phones, toastersPDAs phones, toasters
running running network appsnetwork apps communication linkscommunication links
fiber, copper, radio, fiber, copper, radio, satellitesatellite
transmission rate = transmission rate = bandwidthbandwidth
routers:routers: forward packets forward packets (chunks of data)(chunks of data)
local ISP
companynetwork
regional ISP
router workstation
servermobile
1010
““Cool” internet appliancesCool” internet appliances
World’s smallest web serverhttp://www-ccs.cs.umass.edu/~shri/iPic.html
IP picture framehttp://www.ceiva.com/
Web-enabled toaster+weather forecaster
1111
What’s the Internet: “nuts and What’s the Internet: “nuts and bolts” viewbolts” view
protocolsprotocols control sending, control sending, receiving of msgsreceiving of msgs e.g., TCP, IP, HTTP, FTP, e.g., TCP, IP, HTTP, FTP,
PPPPPP Internet: Internet: “network of “network of
networks”networks” loosely hierarchicalloosely hierarchical public Internet versus public Internet versus
private intranetprivate intranet Internet standardsInternet standards
RFC: Request for commentsRFC: Request for comments IETF: Internet Engineering IETF: Internet Engineering
Task ForceTask Force
local ISP
companynetwork
regional ISP
router workstation
servermobile
1212
What’s the Internet: a service viewWhat’s the Internet: a service view communication communication
infrastructure infrastructure enables enables distributed applications:distributed applications: Web, email, games, e-Web, email, games, e-
commerce, database., commerce, database., voting, file (MP3) sharingvoting, file (MP3) sharing
communication services communication services provided to apps:provided to apps: connectionlessconnectionless connection-orientedconnection-oriented
cyberspacecyberspace [Gibson]: [Gibson]:
““a consensual hallucination experienced daily by a consensual hallucination experienced daily by billions of operators, in every nation, ...." billions of operators, in every nation, ...."
1313
What’s a protocol?What’s a protocol?human protocols:human protocols: ““what’s the time?”what’s the time?” ““I have a question”I have a question” introductionsintroductions
… … specific msgs sentspecific msgs sent
… … specific actions specific actions taken when msgs taken when msgs received, or other received, or other eventsevents
network protocols:network protocols: machines rather than machines rather than
humanshumans all communication all communication
activity in Internet activity in Internet governed by protocolsgoverned by protocols
protocols define format, protocols define format, order of msgs sent and order of msgs sent and
received among received among network entities, and network entities, and actions taken on msg actions taken on msg transmission, receipttransmission, receipt
1414
What’s a protocol?What’s a protocol?a human protocol and a computer network protocol:a human protocol and a computer network protocol:
Q:Q: Other human protocols? Other human protocols?
Hi
Hi
Got thetime?
2:00
TCP connection req
TCP connectionresponseGet http://www.awl.com/kurose-ross
<file>time
1515
1616
A closer look at network A closer look at network structure:structure: network edge:network edge: applications applications
and hostsand hosts network core:network core:
routersrouters network of networksnetwork of networks
access networks, physical access networks, physical media:media: communication links communication links
1717
The network edge:The network edge: end systems (hosts):end systems (hosts):
run application programsrun application programs e.g. Web, emaile.g. Web, email at “edge of network”at “edge of network”
client/server modelclient/server model client host requests, receives client host requests, receives
service from always-on service from always-on serverserver
e.g. Web browser/server; e.g. Web browser/server; email client/serveremail client/server
peer-peer model:peer-peer model: minimal (or no) use of minimal (or no) use of
dedicated serversdedicated servers e.g. Gnutella, KaZaAe.g. Gnutella, KaZaA
1818
Network edge: connection-oriented Network edge: connection-oriented serviceservice
Goal:Goal: data transfer between data transfer between end systemsend systems
handshaking:handshaking: setup (prepare setup (prepare for) data transfer ahead of for) data transfer ahead of timetime Hello, hello back human Hello, hello back human
protocolprotocol set up “state”set up “state” in two in two
communicating hostscommunicating hosts TCP - Transmission Control TCP - Transmission Control
Protocol Protocol Internet’s connection-Internet’s connection-
oriented serviceoriented service
TCP service TCP service [RFC 793][RFC 793] reliable, in-orderreliable, in-order byte- byte-
stream data transferstream data transfer loss: loss:
acknowledgements and acknowledgements and retransmissionsretransmissions
flow control:flow control: sender won’t sender won’t
overwhelm receiveroverwhelm receiver congestion control:congestion control:
senders “slow down senders “slow down sending rate” when sending rate” when network congestednetwork congested
1919
Network edge: connectionless Network edge: connectionless serviceservice
Goal:Goal: data transfer between data transfer between end systemsend systems same as before!same as before!
UDPUDP - User Datagram - User Datagram Protocol [RFC 768]: Protocol [RFC 768]: Internet’s connectionless Internet’s connectionless serviceservice unreliable data transferunreliable data transfer no flow controlno flow control no congestion controlno congestion control
App’s using TCP:App’s using TCP: HTTP (Web), FTP (file HTTP (Web), FTP (file
transfer), Telnet transfer), Telnet (remote login), SMTP (remote login), SMTP (email)(email)
App’s using UDP:App’s using UDP: streaming media, streaming media,
teleconferencing, teleconferencing, DNS, Internet DNS, Internet telephonytelephony
2020
The Network CoreThe Network Core mesh of interconnected mesh of interconnected
routersrouters thethe fundamental question: fundamental question:
how is data transferred how is data transferred through net?through net? circuit switching:circuit switching:
dedicated circuit per dedicated circuit per call: telephone netcall: telephone net
packet-switching:packet-switching: data data sent thru net in discrete sent thru net in discrete “chunks”“chunks”
2121
Network Core: Circuit Network Core: Circuit SwitchingSwitching
End-end resources End-end resources reserved for “call”reserved for “call”
link bandwidth, switch link bandwidth, switch capacitycapacity
dedicated resources: dedicated resources: no sharingno sharing
circuit-like circuit-like (guaranteed) (guaranteed) performanceperformance
call setup requiredcall setup required
2222
Network Core: Circuit Network Core: Circuit SwitchingSwitching
network resources network resources (e.g., bandwidth) (e.g., bandwidth) divided into divided into “pieces”“pieces”
pieces allocated to pieces allocated to callscalls
resource piece resource piece idleidle if not used by if not used by owning call owning call (no (no sharing)sharing)
dividing link dividing link bandwidth into bandwidth into “pieces”“pieces” frequency frequency
divisiondivision time divisiontime division
2323
Packet switching versus circuit Packet switching versus circuit switchingswitching
1 Mbit link1 Mbit link each user: each user:
100 kbps when 100 kbps when “active”“active”
active 10% of timeactive 10% of time circuit-switching: circuit-switching:
10 users10 users packet switching: packet switching:
with 35 users, with 35 users, probability > 10 probability > 10 active less active less than .0004than .0004
Packet switching allows more users to use network!Packet switching allows more users to use network!
N users
1 Mbps link
2424
Network TaxonomyNetwork TaxonomyTelecommunication
networks
Circuit-switchednetworks
FDM TDM
Packet-switchednetworks
Networkswith VCs
DatagramNetworks
• Datagram network is not either connection-oriented or connectionless.• Internet provides both connection-oriented (TCP) and connectionless services (UDP) to apps.
2525
Access networks and physical Access networks and physical mediamedia
Q: Q: How do connection end How do connection end systems connect to edge systems connect to edge router?router?
residential access netsresidential access nets institutional access institutional access
networks (school, networks (school, company)company)
mobile access networksmobile access networks
Keep in mind: Keep in mind: bandwidth (bits per bandwidth (bits per
second) of access second) of access network?network?
shared or dedicated?shared or dedicated?
2626
Residential access: point to point Residential access: point to point accessaccess
Dialup via modemDialup via modem up to 56Kbps direct access up to 56Kbps direct access
to router (often less)to router (often less) Can’t surf and phone at Can’t surf and phone at
same time: can’t be same time: can’t be “always on”“always on”
ADSL:ADSL: asymmetric digital subscriber line asymmetric digital subscriber line up to 1 Mbps upstream (today typically < 256 kbps)up to 1 Mbps upstream (today typically < 256 kbps) up to 8 Mbps downstream (today typically < 1 Mbps)up to 8 Mbps downstream (today typically < 1 Mbps) FDM: 50 kHz - 1 MHz for downstreamFDM: 50 kHz - 1 MHz for downstream
4 kHz - 50 kHz for upstream4 kHz - 50 kHz for upstream
0 kHz - 4 kHz for ordinary telephone0 kHz - 4 kHz for ordinary telephone
2727
Residential access: cable modemsResidential access: cable modems
HFC: hybrid fiber coaxHFC: hybrid fiber coax asymmetric: up to 10Mbps upstream, 1 Mbps asymmetric: up to 10Mbps upstream, 1 Mbps
downstreamdownstream networknetwork of cable and fiber attaches homes to ISP of cable and fiber attaches homes to ISP
routerrouter shared access to router among homeshared access to router among home issues: congestion, dimensioningissues: congestion, dimensioning
deployment: available via cable companies, e.g., deployment: available via cable companies, e.g., MediaOneMediaOne
2828
Residential access: cable modemsResidential access: cable modems
Diagram: http://www.cabledatacomnews.com/cmic/diagram.html
2929
Cable Network Architecture: OverviewCable Network Architecture: Overview
home
cable headend
cable distributionnetwork (simplified)
Typically 500 to 5,000 homes
3030
Cable Network Architecture: OverviewCable Network Architecture: Overview
home
cable headend
cable distributionnetwork (simplified)
3131
Cable Network Architecture: OverviewCable Network Architecture: Overview
home
cable headend
cable distributionnetwork
server(s)
3232
Company access: local area Company access: local area networksnetworks
company/univ company/univ local area local area networknetwork (LAN) connects (LAN) connects end system to edge end system to edge routerrouter
Ethernet:Ethernet: shared or dedicated shared or dedicated
link connects end link connects end system and routersystem and router
10 Mbs, 100Mbps, 10 Mbs, 100Mbps, Gigabit EthernetGigabit Ethernet
deployment:deployment: institutions, institutions, home LANs happening home LANs happening nownow
3333
Wireless access networksWireless access networks shared shared wirelesswireless access access
network connects end network connects end system to routersystem to router via base station aka “access via base station aka “access
point”point” wireless LANs:wireless LANs:
802.11b (WiFi): 11 Mbps802.11b (WiFi): 11 Mbps wider-area wireless accesswider-area wireless access
provided by telco operatorprovided by telco operator 3G ~ 384 kbps3G ~ 384 kbps
Will it happen??Will it happen?? WAP/GPRS in EuropeWAP/GPRS in Europe
basestation
mobilehosts
router
3434
Home networksHome networks
Typical home network components: Typical home network components: ADSL or cable modemADSL or cable modem router/firewall/NATrouter/firewall/NAT EthernetEthernet wireless accesswireless access
pointpoint
wirelessaccess point
wirelesslaptops
router/firewall
cablemodem
to/fromcable
headend
Ethernet(switched)
3535
Physical MediaPhysical Media Bit: Bit: propagates betweenpropagates between
transmitter/rcvr pairstransmitter/rcvr pairs physical link:physical link: what lies what lies
between transmitter & between transmitter & receiverreceiver
guided media:guided media: signals propagate in solid signals propagate in solid
media: copper, fiber, coaxmedia: copper, fiber, coax unguided media:unguided media:
signals propagate freely, signals propagate freely, e.g., radioe.g., radio
Twisted Pair (TP)Twisted Pair (TP) two insulated two insulated
copper wirescopper wires Category 3: Category 3:
traditional phone traditional phone wires, 10 Mbps wires, 10 Mbps EthernetEthernet
Category 5 TP: Category 5 TP: 100Mbps Ethernet100Mbps Ethernet
3636
Physical Media: coax, fiberPhysical Media: coax, fiber
Coaxial cable:Coaxial cable: two concentric copper two concentric copper
conductorsconductors bidirectionalbidirectional baseband:baseband:
single channel on cablesingle channel on cable legacy Ethernetlegacy Ethernet
broadband:broadband: multiple channel on multiple channel on
cablecable HFCHFC
Fiber optic cable:Fiber optic cable: glass fiber carrying light glass fiber carrying light
pulses, each pulse a bitpulses, each pulse a bit high-speed operation:high-speed operation:
high-speed point-to-point high-speed point-to-point transmission (e.g., 5 Gps)transmission (e.g., 5 Gps)
low error rate: repeaters low error rate: repeaters spaced far apart ; immune spaced far apart ; immune to electromagnetic noiseto electromagnetic noise
3737
Physical media: radioPhysical media: radio
signal carried in signal carried in electromagnetic electromagnetic spectrumspectrum
no physical “wire”no physical “wire” bidirectionalbidirectional propagation propagation
environment effects:environment effects: reflection reflection obstruction by obstruction by
objectsobjects interferenceinterference
Radio link types:Radio link types: terrestrial microwaveterrestrial microwave
e.g. up to 45 Mbps channelse.g. up to 45 Mbps channels LANLAN (e.g., WaveLAN) (e.g., WaveLAN)
2Mbps, 11Mbps2Mbps, 11Mbps wide-areawide-area (e.g., cellular) (e.g., cellular)
e.g. 3G: hundreds of kbpse.g. 3G: hundreds of kbps satellitesatellite
up to 50Mbps channel (or multiple up to 50Mbps channel (or multiple smaller channels)smaller channels)
270 msec end-end delay270 msec end-end delay geosynchronous versus LEOSgeosynchronous versus LEOS
3838
Tier-1 ISP: e.g., SprintTier-1 ISP: e.g., SprintSprint US backbone network
3939
Protocol “Layers”Protocol “Layers”Networks are Networks are
complex! complex! many “pieces”:many “pieces”:
hostshosts routersrouters links of various links of various
mediamedia applicationsapplications protocolsprotocols hardware, hardware,
softwaresoftware
Question:Question: Is there any hope of Is there any hope of organizingorganizing structure of structure of
network?network?
Or at least our discussion Or at least our discussion of networks?of networks?
4040
Why layering?Why layering?Dealing with complex systems:Dealing with complex systems: explicit structure allows identification, explicit structure allows identification,
relationship of complex system’s piecesrelationship of complex system’s pieces layered layered reference modelreference model for discussion for discussion
modularization eases maintenance, updating modularization eases maintenance, updating of systemof system change of implementation of layer’s change of implementation of layer’s
service transparent to rest of systemservice transparent to rest of system e.g., change in gate procedure doesn’t e.g., change in gate procedure doesn’t
affect rest of systemaffect rest of system layering considered harmful?layering considered harmful?
4141
Network abstractionsNetwork abstractions
International Standards Organization International Standards Organization (ISO) developed the (ISO) developed the Open Systems Open Systems InterconnectionInterconnection ( (OSIOSI) model to ) model to describe networks:describe networks: 7-layer model.7-layer model.
Provides a standard way to classify Provides a standard way to classify network components and operations.network components and operations.
4242
OSI modelOSI model
physical mechanical, electrical
data link reliable data transport
network end-to-end service
transport connections
presentation data format
session application dialog control
application end-use interface
4343
OSI layersOSI layers
PhysicalPhysical: connectors, bit formats, etc.: connectors, bit formats, etc. Data linkData link: error detection and control : error detection and control
across a single link (single hop).across a single link (single hop). NetworkNetwork: end-to-end multi-hop data : end-to-end multi-hop data
communication.communication. TransportTransport: provides connections; : provides connections;
may optimize network resources.may optimize network resources.
4444
OSI layers, cont’d.OSI layers, cont’d.
SessionSession: services for end-user : services for end-user applications: data grouping, applications: data grouping, checkpointing, etc.checkpointing, etc.
PresentationPresentation: data formats, : data formats, transformation services.transformation services.
ApplicationApplication: interface between : interface between network and end-user programs.network and end-user programs.
4545
Internet protocol stackInternet protocol stack application:application: supporting network supporting network
applicationsapplications FTP, SMTP, STTPFTP, SMTP, STTP
transport:transport: host-host data transfer host-host data transfer TCP, UDPTCP, UDP
network:network: routing of datagrams from routing of datagrams from source to destinationsource to destination IP, routing protocolsIP, routing protocols
link:link: data transfer between data transfer between neighboring network elementsneighboring network elements PPP, EthernetPPP, Ethernet
physical:physical: bits “on the wire” bits “on the wire”
application
transport
network
link
physical
4646
Layering: logical communication Layering: logical communication
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
networklink
physical
Each layer:Each layer: distributeddistributed ““entities” entities”
implement implement layer functions layer functions at each nodeat each node
entities entities perform perform actions, actions, exchange exchange messages with messages with peers peers
4747
Layering: Layering: logical logical communication communication
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
networklink
physical
data
data
E.g.: transportE.g.: transport take data from take data from
appapp add addressing, add addressing,
reliability check reliability check info to form info to form “datagram”“datagram”
send datagram send datagram to peerto peer
wait for peer to wait for peer to ack receiptack receipt
analogy: post analogy: post officeoffice
data
transport
transport
ack
4848
Layering: physical communication Layering: physical communication
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
networklink
physical
data
data
4949
Protocol layering and dataProtocol layering and data
Each layer takes data from aboveEach layer takes data from above adds header information to create new data unitadds header information to create new data unit passes new data unit to layer belowpasses new data unit to layer below
applicationtransportnetwork
linkphysical
applicationtransportnetwork
linkphysical
source destination
M
M
M
M
Ht
HtHn
HtHnHl
M
M
M
M
Ht
HtHn
HtHnHl
message
segment
datagram
frame
5050
TCP/UDPTCP/UDP
5151
Transport protocolsTransport protocols Transform Transform host-to-host host-to-host communication, offered communication, offered
by network layer, to by network layer, to process-to-process process-to-process communicationcommunication
Deliver important services to application layer:Deliver important services to application layer:1.1. Guaranteed message deliveryGuaranteed message delivery2.2. In-order deliveryIn-order delivery3.3. Detect/eliminate message replicationDetect/eliminate message replication4.4. Support arbitrarily large messagesSupport arbitrarily large messages5.5. Support synchronization between sender & receiverSupport synchronization between sender & receiver6.6. Allow receiver to apply flow control to senderAllow receiver to apply flow control to sender7.7. Support multiple application processes on each hostSupport multiple application processes on each host8.8. Other services? (congestion control, quality-of-service, Other services? (congestion control, quality-of-service,
…)…) Overview:Overview:
UDP: unreliable message delivery protocolUDP: unreliable message delivery protocol TCP: reliable stream transfer protocolTCP: reliable stream transfer protocol
5252
User Datagram Protocol User Datagram Protocol (UDP)(UDP)
SrcPort DstPort
Checksum Length
Data
0 16 31
Connectionless, unreliable, message delivery Connectionless, unreliable, message delivery But, optional checksum provides limited error detection But, optional checksum provides limited error detection
Computed over UDP header, message, and IP pseudoheaderComputed over UDP header, message, and IP pseudoheader Pseudoheader: IP src & dst addresses, protocol #, and UDP lengthPseudoheader: IP src & dst addresses, protocol #, and UDP length If source does not want to compute checksum, it sets it to zeroIf source does not want to compute checksum, it sets it to zero
Allows process demultiplexing using Allows process demultiplexing using portsports 16 bits per port: 65536 possible channels per host16 bits per port: 65536 possible channels per host
No flow control: sender can overrun receiver’s buffersNo flow control: sender can overrun receiver’s buffers
5353
Transmission Control Protocol Transmission Control Protocol (TCP)(TCP) Reliable, connection-oriented, byte-stream delivery serviceReliable, connection-oriented, byte-stream delivery service
Full duplex connectionFull duplex connection Supports flow control (and congestion control; to be covered later)Supports flow control (and congestion control; to be covered later) Supports application layer demultiplexing using portsSupports application layer demultiplexing using ports Segments vs application-layer “writes”: when does TCP transmit a Segments vs application-layer “writes”: when does TCP transmit a
segment?segment? Maximum Segment Size (MSS), Push operation, Send-TimerMaximum Segment Size (MSS), Push operation, Send-Timer
Application process
Writebytes
TCP
Send buffer
Segment Segment Segment
Transmit segments
Application process
Readbytes
TCP
Receive buffer
…
… …
5454
TCP segment formatTCP segment format Ports: as in UDPPorts: as in UDP SeqNum, AckNum, AdvWindowSeqNum, AckNum, AdvWindow: used in sliding-window algorithm : used in sliding-window algorithm
for reliable, in-order, unique delivery, and for flow-controlfor reliable, in-order, unique delivery, and for flow-control Flags: SYN, FIN, RESET, PUSH, URG, ACKFlags: SYN, FIN, RESET, PUSH, URG, ACK Checksum: computed as in UDP (but required)Checksum: computed as in UDP (but required) HdrLen: in 32-bit words; TCP header may include optionsHdrLen: in 32-bit words; TCP header may include options TCP options: Maximum Segment Size (MSS), timestamp, window TCP options: Maximum Segment Size (MSS), timestamp, window
scalescale
Options (variable)
Data
Checksum
SrcPort DstPort
HdrLen 0 Flags
UrgPtr
AdvertisedWindow
SequenceNum
Acknowledgment
0 4 10 16 31
5555
Connection establishmentConnection establishment CallerCaller (active open) and (active open) and calleecallee (passive open) (passive open) 3-way handshake algorithm3-way handshake algorithm Why don’t we set the initial sequence numbers to zero?Why don’t we set the initial sequence numbers to zero? What if any of the 3WHS messages get lost/delayed? What if any of the 3WHS messages get lost/delayed? What if the server wants to deny the connection?What if the server wants to deny the connection? Map the Unix system calls Map the Unix system calls socketsocket(), (), bindbind(), (), connectconnect(), (), listenlisten(), (),
acceptaccept() to the following diagram () to the following diagram
Active participant(client)
Passive participant(server)
SYN, SequenceNum = x
SYN + ACK, SequenceNum = y,
ACK, Acknowledgment = y + 1
Acknowledgment = x + 1
5656
Connection terminationConnection termination
Graceful closeGraceful close: independent termination of each : independent termination of each direction of the connectiondirection of the connection
Initiated by Initiated by closeclose() system call() system call After all pending data have been sent and ACKed, send After all pending data have been sent and ACKed, send
last segment with FIN bit setlast segment with FIN bit set That direction of the connection is closed 2*MSL seconds That direction of the connection is closed 2*MSL seconds
(2*120secs) after the remote end ACKs the FIN message(2*120secs) after the remote end ACKs the FIN message Why do we need to wait before closing the connection?Why do we need to wait before closing the connection? Why to wait for 2* MSL instead of 1*MSL?Why to wait for 2* MSL instead of 1*MSL?
Abrupt connection termination Abrupt connection termination Initiated by Initiated by abortabort(), or by error conditions(), or by error conditions Send segment with RST bit set, discarding any pending Send segment with RST bit set, discarding any pending
datadata
5757
TCP connection establishment & TCP connection establishment & tear-down state-transition diagramtear-down state-transition diagram
CLOSED
LISTEN
SYN_RCVD SYN_SENT
ESTABLISHED
CLOSE_WAIT
LAST_ACKCLOSING
TIME_WAIT
FIN_WAIT_2
FIN_WAIT_1
Passive open Close
Send/SYNSYN/SYN + ACK
SYN + ACK/ACK
SYN/SYN + ACK
ACK
Close/FIN
FIN/ACKClose/FIN
FIN/ACKACK + FIN/ACKTimeout after two segment lifetimes
FIN/ACK
ACK
ACK
ACK
Close/FIN
Close
CLOSED
Active open/SYN
5858
IPIP
5959
Internet Protocol (IP)Internet Protocol (IP)
Designed by Kahn & Cerf in early 70sDesigned by Kahn & Cerf in early 70s Most scalable and successful Most scalable and successful
internetworking protocol internetworking protocol
R1
ETH FDDI
IPIP
ETH
TCP R2
FDDI PPP
IP
R3
PPP ETH
IP
H1
IP
ETH
TCP
H8
6060
IP in communicationIP in communication
physical
data link
network
transport
presentation
application
session
physical
data link
network
transport
presentation
application
session
physical
data link
network
node A router node B
IP
6161
IP service modelIP service model
Service model of an internetwork should Service model of an internetwork should be feasible by any underlying network be feasible by any underlying network technologytechnology
IP service model: IP service model: host-to-host best-effort datagram host-to-host best-effort datagram
deliverydelivery ““Best-effort” means no guarantees for Best-effort” means no guarantees for
reliable or timely deliveryreliable or timely delivery IP was designed to “run over anything”IP was designed to “run over anything”
6262
IP headerIP header Important enough to remember its Important enough to remember its
fields!fields!Version HLen TOS Length
Ident Flags Offset
TTL Protocol Checksum
SourceAddr
DestinationAddr
Options (variable) Pad(variable)
0 4 8 16 19 31
Data
6363
IP addressesIP addresses IP vs MAC addressesIP vs MAC addresses Uniqueness Uniqueness
requirementrequirement Scalability Scalability
requirement: requirement: hierarchyhierarchy NetworkNetwork Host (interface)Host (interface)
ClassfulClassful addressing: addressing: Classes A, B, C, D, EClasses A, B, C, D, E
In mid-90s, addressing In mid-90s, addressing became became classlessclassless see CIDR (later)see CIDR (later)
Example: Example: GAtech web server GAtech web server
(www.gatech.edu): (www.gatech.edu): 130.207.165.120 130.207.165.120
Network Host
7 24
0(a)
Network Host
14 16
1 0(b)
Network Host
21 8
1 1 0(c)