Unformatted Document Excerpt
Coursehero >>
Washington >>
Washington >>
EE 461
Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
note Chapter2
ApplicationLayer
A on the use of these ppt slides:
Were making these slides freely available to all (faculty, students, readers).
Theyre in PowerPoint form so you can add, modify, and delete slides
(including this one) and slide content to suit your needs. They obviously
represent a lot of work on our part. In return for use, we only ask the
following:
If you use these slides (e.g., in a class) in substantially unaltered form,
that you mention their source (after all, wed like people to use our book!)
If you post any slides in substantially unaltered form on a www site, that
you note that they are adapted from (or perhaps identical to) our slides, and
note our copyright of this material.
ComputerNetworking:ATop
DownApproach,
5thedition.
JimKurose,KeithRoss
AddisonWesley,April2009.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2010
J.F Kurose and K.W. Ross, All Rights Reserved
Application 2-1
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8Socketprogrammingwith
UDP
SMTP,POP3,IMAP
2.5DNS
Application 2-2
Chapter2:ApplicationLayer
Ourgoals:
conceptual,implementation
aspectsofnetwork
applicationprotocols
transportlayerservice
models
clientserverparadigm
peertopeerparadigm
learnaboutprotocolsby
examiningpopular
applicationlevelprotocols
HTTP
FTP
SMTP/POP3/IMAP
DNS
programmingnetwork
applications
socketAPI
Application 2-3
Somenetworkapps
email
web
instantmessaging
remotelogin
P2Pfilesharing
multiusernetworkgames
streamingstoredvideo
(YouTube)
voiceoverIP
realtimevideoconferencing
cloudcomputing
Application 2-4
Creatinganetworkapp
application
transport
network
datalink
physical
writeprogramsthat
runon(different)endsystems
communicateovernetwork
e.g.,webserversoftware
communicateswithbrowser
software
Noneedtowritesoftwarefor
networkcoredevices
networkcoredevicesdonotrunuser
applications
applicationsonendsystemsallows
forrapidappdevelopment,
propagation
application
transport
network
datalink
physical
application
transport
network
datalink
physical
Application 2-5
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8SocketprogrammingwithUDP
SMTP,POP3,IMAP
2.5DNS
Application 2-6
Applicationarchitectures
clientserver
peertopeer(P2P)
hybridofclientserverandP2P
Application 2-7
Clientserverarchitecture
server:
alwaysonhost
permanentIPaddress
serverfarmsforscaling
clients:
client/server
communicatewithserver
maybeintermittentlyconnected
mayhavedynamicIPaddresses
donotcommunicatedirectlywith
eachother
Application 2-8
PureP2Parchitecture
noalwaysonserver
arbitraryendsystemsdirectly
communicate
peersareintermittently
connectedandchangeIP
addresses
peerpeer
highlyscalablebutdifficultto
manage
Application 2-9
HybridofclientserverandP2P
Skype
voiceoverIPP2Papplication
centralizedserver:findingaddressofremoteparty:
clientclientconnection:direct(notthroughserver)
Instantmessaging
chattingbetweentwousersisP2P
centralizedservice:clientpresencedetection/location
userregistersitsIPaddresswithcentralserverwhenit
comesonline
usercontactscentralservertofindIPaddressesofbuddies
Application 2-10
Processescommunicating
process:programrunningwithina
host.
withinsamehost,twoprocesses
communicateusinginter
processcommunication(defined
byOS).
processesindifferenthosts
communicatebyexchanging
messages
clientprocess:processthat
initiatescommunication
serverprocess:processthatwaits
tobecontacted
aside:applicationswithP2P
architectureshaveclient
processes&serverprocesses
Application 2-11
Sockets
processsends/receivesmessages
to/fromitssocket
socketanalogoustodoor
sendingprocessshovesmessageout
door
sendingprocessreliesontransport
infrastructureonothersideofdoor
whichbringsmessagetosocketat
receivingprocess
host or
server
host or
server
process
controlled by
app developer
process
socket
socket
TCP with
buffers,
variables
Internet
TCP with
buffers,
variables
controlled
by OS
API:(1)choiceoftransportprotocol;(2)abilitytofixafewparameters
(lotsmoreonthislater)
Application 2-12
Addressingprocesses
toreceivemessages,processmust
haveidentifier
hostdevicehasunique32bitIP
address
Q:doesIPaddressofhoston
whichprocessrunssufficefor
identifyingtheprocess?
Application 2-13
Addressingprocesses
toreceivemessages,process
musthaveidentifier
hostdevicehasunique32bitIP
address
Q:doesIPaddressofhoston
whichprocessrunssufficefor
identifyingtheprocess?
A:No,manyprocessescan
berunningonsamehost
identifierincludesbothIP
addressandportnumbers
associatedwithprocessonhost.
exampleportnumbers:
HTTPserver:80
Mailserver:25
tosendHTTPmessageto
gaia.cs.umass.eduwebserver:
IPaddress:128.119.245.12
Portnumber:80
moreshortly
Application 2-14
Applayerprotocoldefines
typesofmessagesexchanged,
e.g.,request,response
messagesyntax:
whatfieldsinmessages&how
fieldsaredelineated
messagesemantics
meaningofinformationinfields
publicdomainprotocols:
definedinRFCs
allowsforinteroperability
e.g.,HTTP,SMTP
proprietaryprotocols:
e.g.,Skype
rulesforwhenandhow
processessend&respondto
messages
Application 2-15
Whattransportservicedoesanappneed?
Dataloss
someapps(e.g.,audio)cantolerate
someloss
otherapps(e.g.,filetransfer,
telnet)require100%reliabledata
transfer
Timing
someapps(e.g.,Internet
telephony,interactivegames)
requirelowdelaytobe
effective
Throughput
someapps(e.g.,multimedia)
requireminimumamountof
throughputtobeeffective
otherapps(elasticapps)make
useofwhateverthroughputthey
get
Security
encryption,dataintegrity,
Application 2-16
Transportservicerequirementsofcommonapps
Data loss
Throughput
Time Sensitive
file transfer
e-mail
Web documents
real-time audio/video
no loss
no loss
no loss
loss-tolerant
no
no
no
yes, 100s msec
stored audio/video
interactive games
instant messaging
loss-tolerant
loss-tolerant
no loss
elastic
elastic
elastic
audio: 5kbps-1Mbps
video:10kbps-5Mbps
same as above
few kbps up
elastic
Application
yes, few secs
yes, 100s msec
yes and no
Application 2-17
Internettransportprotocolsservices
TCPservice:
UDPservice:
connectionoriented:setuprequired
betweenclientandserverprocesses
reliabletransportbetweensendingand
receivingprocess
flowcontrol:senderwontoverwhelm
receiver
congestioncontrol:throttlesender
whennetworkoverloaded
doesnotprovide:timing,minimum
throughputguarantees,security
unreliabledatatransferbetween
sendingandreceivingprocess
doesnotprovide:connectionsetup,
reliability,flowcontrol,congestion
control,timing,throughput
guarantee,orsecurity
Q:whybother?WhyisthereaUDP?
Application 2-18
Internetapps:application,transportprotocols
Application
e-mail
remote terminal access
Web
file transfer
streaming multimedia
Internet telephony
Application
layer protocol
Underlying
transport protocol
SMTP [RFC 2821]
Telnet [RFC 854]
HTTP [RFC 2616]
FTP [RFC 959]
HTTP (e.g., YouTube),
RTP [RFC 1889]
SIP, RTP, proprietary
(e.g., Skype)
TCP
TCP
TCP
TCP
TCP or UDP
typically UDP
Application 2-19
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
apparchitectures
apprequirements
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8SocketprogrammingwithUDP
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
SMTP,POP3,IMAP
2.5DNS
Application 2-20
WebandHTTP
First,areview
webpageconsistsofobjects
objectcanbeHTMLfile,JPEGimage,Javaapplet,audiofile,
webpageconsistsofbaseHTMLfilewhichincludesseveral
referencedobjects
eachobjectisaddressablebyaURL
exampleURL:
www.someschool.edu/someDept/pic.gif
hostname
pathname
Application 2-21
HTTPoverview
HTTP:hypertexttransfer
protocol
Websapplicationlayerprotocol
client/servermodel
client:browserthatrequests,
receives,displaysWebobjects
server:Webserversendsobjects
inresponsetorequests
PCrunning
Explorer
HTT
P
req
uest
HTT
Pre
spon
se
est
equ
r
se
TTP
H
pon
res
TP
HT
Server
running
ApacheWeb
server
Macrunning
Navigator
Application 2-22
HTTPoverview(continued)
UsesTCP:
HTTPisstateless
clientinitiatesTCPconnection
(createssocket)toserver,port80
serveracceptsTCPconnectionfrom
client
HTTPmessages(applicationlayer
protocolmessages)exchangedbetween
browser(HTTPclient)andWebserver
(HTTPserver)
TCPconnectionclosed
servermaintainsno
informationaboutpastclient
requests
aside
protocolsthatmaintainstateare
complex!
pasthistory(state)mustbe
maintained
ifserver/clientcrashes,theirviews
ofstatemaybeinconsistent,must
bereconciled
Application 2-23
HTTPconnections
nonpersistentHTTP
atmostoneobjectsentover
TCPconnection.
persistentHTTP
multipleobjectscanbesent
oversingleTCPconnection
betweenclient,server.
Application 2-24
NonpersistentHTTP
supposeuserentersURL:
(contains text,
www.someSchool.edu/someDepartment/home.index references to 10
jpeg images)
1a.HTTPclientinitiatesTCPconnectionto
HTTPserver(process)at
www.someSchool.edu on port 80
1b.HTTPserverathost
www.someSchool.edu waitingfor
TCPconnectionatport80.accepts
connection,notifyingclient
2.HTTPclientsendsHTTPrequestmessage
(containingURL)intoTCPconnection
socket.Messageindicatesthatclient
wantsobject
someDepartment/home.index
3.HTTPserverreceivesrequestmessage,
formsresponsemessagecontaining
requestedobject,andsendsmessageinto
itssocket
time
Application 2-25
NonpersistentHTTP(cont.)
4.HTTPserverclosesTCPconnection.
5.HTTPclientreceivesresponsemessage
containinghtmlfile,displayshtml.
Parsinghtmlfile,finds10referenced
jpegobjects
time
6.Steps15repeatedforeachof10jpeg
objects
Application 2-26
NonPersistentHTTP:Responsetime
definitionofRTT:timeforasmall
packettotravelfromclientto
serverandback.
responsetime:
oneRTTtoinitiateTCP
connection
oneRTTforHTTPrequestand
firstfewbytesofHTTPresponse
toreturn
filetransmissiontime
total=2RTT+transmittime
initiate TCP
connection
RTT
request
file
RTT
file
received
time
time to
transmit
file
time
Application 2-27
PersistentHTTP
nonpersistentHTTPissues:
requires2RTTsperobject
OSoverheadforeachTCPconnection
browsersoftenopenparallelTCP
connectionstofetchreferencedobjects
persistentHTTP
serverleavesconnectionopenafter
sendingresponse
subsequentHTTPmessages
betweensameclient/serversentover
openconnection
clientsendsrequestsassoonasit
encountersareferencedobject
aslittleasoneRTTforallthe
referencedobjects
Application 2-28
HTTPrequestmessage
twotypesofHTTPmessages:request,response
HTTPrequestmessage:
ASCII(humanreadableformat)
requestline
(GET,POST,
HEADcommands)
carriagereturncharacter
linefeedcharacter
GET /index.html HTTP/1.1\r\n
Host: www-net.cs.umass.edu\r\n
User-Agent: Firefox/3.6.10\r\n
Accept: text/html,application/xhtml+xml\r\n
header Accept-Language: en-us,en;q=0.5\r\n
lines Accept-Encoding: gzip,deflate\r\n
Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n
Keep-Alive: 115\r\n
carriagereturn,
Connection: keep-alive\r\n
linefeedatstart
\r\n
oflineindicates
endofheaderlines
Application 2-29
HTTPrequestmessage:generalformat
request
line
header
lines
body
Application 2-30
Uploadingforminput
POSTmethod:
webpageoftenincludesform
input
inputisuploadedtoserverin
entitybody
URLmethod:
usesGETmethod
inputisuploadedinURL
fieldofrequestline:
www.somesite.com/animalsearch?monkeys&banana
Application 2-31
Methodtypes
HTTP/1.0
GET
POST
HEAD
asksservertoleaverequested
objectoutofresponse
HTTP/1.1
GET,POST,HEAD
PUT
uploadsfileinentitybodyto
pathspecifiedinURLfield
DELETE
deletesfilespecifiedintheURL
field
Application 2-32
HTTPresponsemessage
status line
(protocol
status code
status phrase)
header
lines
data, e.g.,
requested
HTML file
HTTP/1.1 200 OK\r\n
Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
ETag: "17dc6-a5c-bf716880"\r\n
Accept-Ranges: bytes\r\n
Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=ISO-88591\r\n
\r\n
data data data data data ...
Application 2-33
HTTPresponsestatuscodes
statuscodeappearsin1stlineinserver>clientresponsemessage.
somesamplecodes:
200 OK
requestsucceeded,requestedobjectlaterinthismsg
301 Moved Permanently
requestedobjectmoved,newlocationspecifiedlaterinthismsg(Location:)
400 Bad Request
requestmsgnotunderstoodbyserver
404 Not Found
requesteddocumentnotfoundonthisserver
505 HTTP Version Not Supported
Application 2-34
TryingoutHTTP(clientside)foryourself
1.TelnettoyourfavoriteWebserver:
telnet cis.poly.edu 80
opensTCPconnectiontoport80
(defaultHTTPserverport)atcis.poly.edu.
anythingtypedinsent
toport80atcis.poly.edu
2.typeinaGETHTTPrequest:
GET /~ross/ HTTP/1.1
Host: cis.poly.edu
bytypingthisin(hitcarriage
returntwice),yousend
thisminimal(butcomplete)
GETrequesttoHTTPserver
3.lookatresponsemessagesentbyHTTPserver!
(oruseWireshark!)
Application 2-35
Userserverstate:cookies
manyWebsitesusecookies
fourcomponents:
1)cookieheaderlineofHTTP
responsemessage
2)cookieheaderlineinHTTP
requestmessage
3)cookiefilekeptonusershost,
managedbyusersbrowser
4)backenddatabaseatWebsite
example:
SusanalwaysaccessInternet
fromPC
visitsspecificecommercesitefor
firsttime
wheninitialHTTPrequests
arrivesatsite,sitecreates:
uniqueID
entryinbackenddatabase
forID
Application 2-36
Cookies:keepingstate(cont.)
client
ebay 8734
cookiefile
ebay 8734
amazon 1678
server
usualhttprequestmsg
usualhttpresponse
Set-cookie: 1678
usualhttprequestmsg
cookie: 1678
oneweeklater:
ebay 8734
amazon 1678
usualhttpresponsemsg
usualhttprequestmsg
cookie: 1678
usualhttpresponsemsg
Amazonserver
createsID
1678foruser create
entry
cookie
specific
action
access
access
backend
database
cookie
specific
action
Application 2-37
Cookies(continued)
whatcookiescanbring:
authorization
shoppingcarts
recommendations
usersessionstate(Webemail)
aside
cookiesandprivacy:
cookiespermitsitestolearna
lotaboutyou
youmaysupplynameande
mailtosites
howtokeepstate:
protocolendpoints:maintainstateat
sender/receiverovermultipletransactions
cookies:httpmessagescarrystate
Application 2-38
Webcaches(proxyserver)
Goal:satisfyclientrequestwithoutinvolvingoriginserver
usersetsbrowser:Web
accessesviacache
browsersendsallHTTP
requeststocache
objectincache:cachereturns
object
elsecacherequestsobjectfrom
originserver,thenreturns
objecttoclient
origin
server
HTT
P
req
uest
HTT
client
Pre
spon
se
est
equ
r
nse
TTP
H
sp o
re
TP
HT
client
Proxy
server
e st
requ
P
se
HTT
sp o n
re
TTP
H
origin
server
Application 2-39
MoreaboutWebcaching
cacheactsasbothclientand
server
typicallycacheisinstalledby
ISP(university,company,
residentialISP)
whyWebcaching?
reduceresponsetimeforclient
request
reducetrafficonan
institutionsaccesslink.
Internetdensewithcaches:
enablespoorcontent
providerstoeffectivelydeliver
content(butsodoesP2Pfile
sharing)
Application 2-40
Cachingexample
origin
servers
assumptions
averageobjectsize=100,000bits
avg.requestratefrominstitutions
browserstooriginservers=15/sec
delayfrominstitutionalroutertoany
originserverandbacktorouter=2sec
public
Internet
1.5Mbps
accesslink
consequences
utilizationonLAN=15%
utilizationonaccesslink=100%
totaldelay=Internetdelay+accessdelay
+LANdelay
=2sec+minutes+milliseconds
institutional
network
10MbpsLAN
institutional
cache
Application 2-41
Cachingexample(cont)
possiblesolution
increasebandwidthofaccesslinkto,
say,10Mbps
consequence
utilizationonLAN=15%
utilizationonaccesslink=15%
Totaldelay=Internetdelay+access
delay+LANdelay
=2sec+msecs+msecs
oftenacostlyupgrade
origin
servers
public
Internet
10Mbps
accesslink
institutional
network
10MbpsLAN
institutional
cache
Application 2-42
Cachingexample(cont)
origin
servers
possiblesolution:
installcache
public
Internet
consequence
supposehitrateis0.4
40%requestswillbesatisfiedalmost
immediately
60%requestssatisfiedbyorigin
server
utilizationofaccesslinkreducedto
60%,resultinginnegligibledelays
(say10msec)
totalavgdelay=Internetdelay+
accessdelay+LANdelay=.
6*(2.01)secs+.4*milliseconds<1.4
secs
1.5Mbps
accesslink
institutional
network
10MbpsLAN
institutional
cache
Application 2-43
ConditionalGET
Goal:dontsendobjectifcachehas
uptodatecachedversion
cache:specifydateofcachedcopy
inHTTPrequest
If-modified-since:
<date>
server:responsecontainsnoobject
ifcachedcopyisuptodate:
HTTP/1.0 304 Not
Modified
server
cache
HTTP request msg
If-modified-since: <date>
HTTP response
HTTP/1.0
304 Not Modified
object
not
modified
before
<date>
HTTP request msg
If-modified-since: <date>
HTTP response
HTTP/1.0 200 OK
<data>
object
modified
after
<date>
Application 2-44
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4Electronicmail
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8SocketprogrammingwithUDP
SMTP,POP3,IMAP
2.5DNS
Application 2-45
FTP:thefiletransferprotocol
user
athost
FTP
user
interface
FTP
client
filetransfer
FTP
server
localfile
system
remotefile
system
transferfileto/fromremotehost
client/servermodel
client:sidethatinitiatestransfer(eitherto/fromremote)
server:remotehost
ftp:RFC959
ftpserver:port21
Application 2-46
FTP:separatecontrol,dataconnections
TCPcontrolconnection,
serverport21
FTPclientcontactsFTPserveratport
21,TCPistransportprotocol
clientauthorizedovercontrolconnection
TCPdataconnection,
FTP
FTP
serverport20
clientbrowsesremotedirectorybysending
client
server
commandsovercontrolconnection.
whenserverreceivesfiletransfer
serveropensanotherTCPdata
command,serveropens2ndTCP
connectiontotransferanotherfile.
connection(forfile)toclient
controlconnection:outofband
aftertransferringonefile,servercloses
FTPservermaintainsstate:current
dataconnection.
directory,earlierauthentication
Application 2-47
FTPcommands,responses
samplecommands:
samplereturncodes
sentasASCIItextovercontrol
channel
USER username
PASS password
LISTreturnlistoffileincurrent
directory
RETR filenameretrieves
(gets)file
STOR filenamestores(puts)
fileontoremotehost
statuscodeandphrase(asinHTTP)
331 Username OK,
password required
125 data connection
already open;
transfer starting
425 Cant open data
connection
452 Error writing
file
Application 2-48
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8SocketprogrammingwithUDP
SMTP,POP3,IMAP
2.5DNS
Application 2-49
ElectronicMail
outgoing
messagequeue
usermailbox
Threemajorcomponents:
useragents
mailservers
simplemailtransferprotocol:SMTP
UserAgent
a.k.a.mailreader
composing,editing,readingmail
messages
e.g.,Outlook,elm,Mozilla
Thunderbird,iPhonemailclient
outgoing,incomingmessagesstored
onserver
user
agent
mail
server
SMTP
SMTP
mail
server
user
agent
SMTP
user
agent
mail
server
user
agent
user
agent
user
agent
Application 2-50
ElectronicMail:mailservers
user
agent
MailServers
mailboxcontainsincomingmessages
foruser
messagequeueofoutgoing(tobesent)
mailmessages
SMTPprotocolbetweenmailservers
tosendemailmessages
client:sendingmailserver
server:receivingmailserver
mail
server
SMTP
SMTP
mail
server
user
agent
SMTP
user
agent
mail
server
user
agent
user
agent
user
agent
Application 2-51
ElectronicMail:SMTP[RFC2821]
usesTCPtoreliablytransferemailmessagefromclienttoserver,port25
directtransfer:sendingservertoreceivingserver
threephasesoftransfer
handshaking(greeting)
transferofmessages
closure
command/responseinteraction
commands:ASCIItext
response:statuscodeandphrase
messagesmustbein7bitASCII
Application 2-52
Scenario:AlicesendsmessagetoBob
4)SMTPclientsendsAlicesmessage
overtheTCPconnection
5)Bobsmailserverplacesthemessage
inBobsmailbox
6)Bobinvokeshisuseragenttoread
message
1)AliceusesUAtocomposemessage
andto
bob@someschool.edu
2)AlicesUAsendsmessagetohermail
server;messageplacedinmessage
queue
3)ClientsideofSMTPopensTCP
connectionwithBobsmailserver
1
user
agent
2
mail
server
3
mail
server
4
5
6
user
agent
Application 2-53
SampleSMTPinteraction
S:
C:
S:
C:
S:
C:
S:
C:
S:
C:
C:
C:
S:
C:
S:
220 hamburger.edu
HELO crepes.fr
250 Hello crepes.fr, pleased to meet you
MAIL FROM: <alice@crepes.fr>
250 alice@crepes.fr... Sender ok
RCPT TO: <bob@hamburger.edu>
250 bob@hamburger.edu ... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Do you like ketchup?
How about pickles?
.
250 Message accepted for delivery
QUIT
221 hamburger.edu closing connection
Application 2-54
TrySMTPinteractionforyourself:
telnet servername 25
see220replyfromserver
enterHELO,MAILFROM,RCPTTO,DATA,QUITcommands
aboveletsyousendemailwithoutusingemailclient(reader)
Application 2-55
SMTP:finalwords
SMTPusespersistentconnections
SMTPrequiresmessage(header&
body)tobein7bitASCII
SMTPserverusesCRLF.CRLFto
determineendofmessage
comparisonwithHTTP:
HTTP:pull
SMTP:push
bothhaveASCIIcommand/response
interaction,statuscodes
HTTP:eachobjectencapsulatedin
itsownresponsemsg
SMTP:multipleobjectssentin
multipartmsg
Application 2-56
Mailmessageformat
SMTP:protocolforexchangingemail
msgs
RFC822:standardfortextmessage
format:
To:
headerlines,e.g.,
From:
Subject:
differentfromSMTPcommands!
header
blank
line
body
body
themessage,ASCIIcharacters
only
Application 2-57
Mailaccessprotocols
user
agent
SMTP
sendersmail
server
SMTP
access
protocol
user
agent
receiversmail
server
SMTP:delivery/storagetoreceiversserver
mailaccessprotocol:retrievalfromserver
POP:PostOfficeProtocol[RFC1939]
authorization(agent<>server)anddownload
IMAP:InternetMailAccessProtocol[RFC1730]
morefeatures(morecomplex)
manipulationofstoredmsgsonserver
HTTP:gmail,Hotmail,Yahoo!Mail,etc.
Application 2-58
POP3protocol
authorizationphase
clientcommands:
user:declareusername
pass:password
serverresponses
+OK
-ERR
transactionphase,client:
list:listmessagenumbers
retr:retrievemessagebynumber
dele:delete
quit
S:
C:
S:
C:
S:
+OK POP3 server ready
user bob
+OK
pass hungry
+OK user successfully logged
C:
S:
S:
S:
C:
S:
S:
C:
C:
S:
S:
C:
C:
S:
list
1 498
2 912
.
retr 1
<message 1 contents>
.
dele 1
retr 2
<message 1 contents>
.
dele 2
quit
+OK POP3 server signing off
on
Application 2-59
POP3(more)andIMAP
moreaboutPOP3
previousexampleuses
downloadanddeletemode.
Bobcannotrereademailif
hechangesclient
downloadandkeep:copies
ofmessagesondifferent
clients
POP3isstatelessacross
sessions
IMAP
keepsallmessagesinone
place:atserver
allowsusertoorganize
messagesinfolders
keepsuserstateacross
sessions:
namesoffoldersandmappings
betweenmessageIDsandfolder
name
Application 2-60
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
2.6P2Papplications
2.7Socketprogrammingwith
TCP
2.8Socketprogrammingwith
UDP
SMTP,POP3,IMAP
2.5DNS
Application 2-61
DNS:DomainNameSystem
people:manyidentifiers:
SSN,name,passport#
Internethosts,routers:
IPaddress(32bit)usedfor
addressingdatagrams
name,e.g.,www.yahoo.com
usedbyhumans
Q:mapbetweenIPaddressand
name,andviceversa?
DomainNameSystem:
distributeddatabaseimplementedin
hierarchyofmanynameservers
applicationlayerprotocolhost,routers,
nameserverstocommunicatetoresolve
names(address/nametranslation)
note:coreInternetfunction,
implementedasapplicationlayer
protocol
complexityatnetworksedge
Application 2-62
DNS
DNSservices
hostnametoIPaddress
translation
hostaliasing
Canonical,aliasnames
mailserveraliasing
loaddistribution
replicatedWebservers:setof
IPaddressesforonecanonical
name
WhynotcentralizeDNS?
singlepointoffailure
trafficvolume
distantcentralizeddatabase
maintenance
doesntscale!
Application 2-63
Distributed,HierarchicalDatabase
Root DNS Servers
com DNS servers
yahoo.com
amazon.com
DNS servers DNS servers
org DNS servers
pbs.org
DNS servers
edu DNS servers
poly.edu
umass.edu
DNS serversDNS servers
clientwantsIPforwww.amazon.com;1stapprox:
clientqueriesarootservertofindcomDNSserver
clientqueriescomDNSservertogetamazon.comDNSserver
clientqueriesamazon.comDNSservertogetIPaddressforwww.amazon.com
Application 2-64
DNS:Rootnameservers
contactedbylocalnameserverthatcannotresolvename
rootnameserver:
contactsauthoritativenameserverifnamemappingnotknown
getsmapping
returnsmappingtolocalnameserver
a Verisign, Dulles, VA
c Cogent, Herndon, VA (also LA)
d U Maryland College Park, MD
g US DoD Vienna, VA
h ARL Aberdeen, MD
j Verisign, ( 21 locations)
e NASA Mt View, CA
f Internet Software C. Palo Alto,
k RIPE London (also 16 other locations)
i Autonomica, Stockholm (plus
28 other locations)
m WIDE Tokyo (also Seoul,
Paris, SF)
CA (and 36 other locations)
b USC-ISI Marina del Rey, CA
l ICANN Los Angeles, CA
13rootnameservers
worldwide
Application 2-65
TLDandAuthoritativeServers
Topleveldomain(TLD)servers:
responsibleforcom,org,net,edu,aero,jobs,museums,andalltop
levelcountrydomains,e.g.:uk,fr,ca,jp
NetworkSolutionsmaintainsserversforcomTLD
EducauseforeduTLD
AuthoritativeDNSservers:
organizationsDNSservers,providingauthoritativehostnameto
IPmappingsfororganizationsservers(e.g.,Web,mail).
canbemaintainedbyorganizationorserviceprovider
Application 2-66
LocalNameServer
doesnotstrictlybelongtohierarchy
eachISP(residentialISP,company,university)hasone
alsocalleddefaultnameserver
whenhostmakesDNSquery,queryissenttoitslocal
DNSserver
actsasproxy,forwardsqueryintohierarchy
Application 2-67
DNSname
resolutionexample
root DNS server
2
hostatcis.poly.eduwants
IPaddressfor
gaia.cs.umass.edu
iteratedquery:
contactedserverreplieswith
nameofservertocontact
Idontknowthisname,but
askthisserver
3
4
TLD DNS server
5
local DNS server
dns.poly.edu
1
8
requesting host
7
6
authoritative DNS server
dns.cs.umass.edu
cis.poly.edu
gaia.cs.umass.edu
Application 2-68
DNSname
resolutionexample
root DNS server
recursivequery:
2
putsburdenofname
resolutiononcontactedname
server
heavyload?
3
7
6
TLD DNS server
local DNS server
dns.poly.edu
1
5
4
8
requesting host
authoritative DNS server
dns.cs.umass.edu
cis.poly.edu
gaia.cs.umass.edu
Application 2-69
DNS:cachingandupdatingrecords
once(any)nameserverlearnsmapping,itcachesmapping
cacheentriestimeout(disappear)aftersometime
TLDserverstypicallycachedinlocalnameservers
Thusrootnameserversnotoftenvisited
update/notifymechanismsproposedIETFstandard
RFC2136
Application 2-70
DNSrecords
DNS:distributeddbstoringresourcerecords(RR)
RRformat:(name,
Type=A
nameishostname
valueisIPaddress
Type=NS
value, type, ttl)
Type=CNAME
nameisaliasnameforsome
canonical(thereal)name
www.ibm.com isreally
servereast.backup2.ibm.com
nameisdomain(e.g.,foo.com)
valueiscanonicalname
valueishostnameof
authoritativenameserverforthis
Type=MX
domain
valueisnameofmailserver
associatedwithname
Application 2-71
DNSprotocol,messages
DNSprotocol:queryandreplymessages,bothwithsamemessage
format
msgheader
identification:16bit#forquery,
replytoqueryusessame#
flags:
queryorreply
recursiondesired
recursionavailable
replyisauthoritative
Application 2-72
DNSprotocol,messages
Name,typefields
foraquery
RRsinresponse
toquery
recordsfor
authoritativeservers
additionalhelpful
infothatmaybeused
Application 2-73
InsertingrecordsintoDNS
example:newstartupNetworkUtopia
registernamenetworkuptopia.comatDNSregistrar(e.g.,Network
Solutions)
providenames,IPaddressesofauthoritativenameserver(primaryand
secondary)
registrarinsertstwoRRsintocomTLDserver:
(networkutopia.com, dns1.networkutopia.com, NS)
(dns1.networkutopia.com, 212.212.212.1, A)
createauthoritativeserverTypeArecordfor
www.networkuptopia.com;TypeMXrecordfornetworkutopia.com
HowdopeoplegetIPaddressofyourWebsite?
Application 2-74
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8SocketprogrammingwithUDP
SMTP,POP3,IMAP
2.5DNS
Application 2-75
PureP2Parchitecture
noalwaysonserver
arbitraryendsystemsdirectly
communicate
peersareintermittently
connectedandchangeIP
addresses
peerpeer
Threetopics:
filedistribution
searchingforinformation
caseStudy:Skype
Application 2-76
FileDistribution:ServerClientvsP2P
Question:HowmuchtimetodistributefilefromoneservertoN
peers?
Server
us
File,sizeF
dN
uN
u1
d1
u2
d2
us: server upload
bandwidth
ui: peer i upload
bandwidth
di: peer i download
bandwidth
Network(with
abundantbandwidth)
Application 2-77
Filedistributiontime:serverclient
serversequentiallysendsN
copies:
NF/ustime
clientitakesF/ditimeto
download
TimetodistributeF
toNclientsusing
client/serverapproach
Server
F
us
dN
uN
u1 d1 u2
d2
Network(with
abundantbandwidth)
=dcs=max{NF/us,F/min(di)}
i
increaseslinearlyinN
(forlargeN)
Application 2-78
Filedistributiontime:P2P
servermustsendonecopy:F/us
F
time
clientitakesF/ditimeto
download
NFbitsmustbedownloaded
(aggregate)
fastestpossibleuploadrate:u +u
s
i
Server
us
dN
uN
u1 d1 u2
d2
Network(with
abundantbandwidth)
dP2P=max{F/us,F/min(di),NF/(us+ui)}
i
Application 2-79
Serverclientvs.P2P:example
Clientuploadrate=u,F/u=1hour,us=10u,dminus
Minimum Distribution Time
3.5
P2P
Client-Server
3
2.5
2
1.5
1
0.5
0
0
5
10
15
20
25
30
35
N
Application 2-80
Filedistribution:BitTorrent
P2Pfiledistribution
tracker:trackspeers
participatingintorrent
torrent:groupof
peersexchanging
chunksofafile
obtainlist
ofpeers
trading
chunks
peer
Application 2-81
BitTorrent(1)
filedividedinto256KBchunks.
peerjoiningtorrent:
hasnochunks,butwillaccumulatethemovertime
registerswithtrackertogetlistofpeers,connectstosubsetofpeers
(neighbors)
whiledownloading,peeruploadschunkstootherpeers.
peersmaycomeandgo
oncepeerhasentirefile,itmay(selfishly)leaveor(altruistically)
remain
Application 2-82
BitTorrent(2)
SendingChunks:titfortat
PullingChunks
Alicesendschunkstofour
atanygiventime,different
neighborscurrentlysendingher
peershavedifferentsubsetsof
chunksatthehighestrate
filechunks
reevaluatetop4every10secs
periodically,apeer(Alice)asks
every30secs:randomlyselect
eachneighborforlistofchunks
anotherpeer,startssendingchunks
thattheyhave.
newlychosenpeermayjointop4
Alicesendsrequestsforher
optimisticallyunchoke
missingchunks
rarestfirst
Application 2-83
BitTorrent:Titfortat
(1)AliceoptimisticallyunchokesBob
(2)AlicebecomesoneofBobstopfourproviders;Bobreciprocates
(3)BobbecomesoneofAlicestopfourproviders
Withhigheruploadrate,
canfindbettertrading
partners&getfilefaster!
Application 2-84
DistributedHashTable(DHT)
DHT:distributedP2Pdatabase
databasehas(key,value)pairs;
key:ssnumber;value:humanname
key:contenttype;value:IPaddress
peersqueryDBwithkey
DBreturnsvaluesthatmatchthekey
peerscanalsoinsert(key,value)peers
Application 2-85
DHTIdentifiers
assignintegeridentifiertoeachpeerinrange[0,2n1].
Eachidentifiercanberepresentedbynbits.
requireeachkeytobeanintegerinsamerange.
togetintegerkeys,hashoriginalkey.
e.g.,key=h(LedZeppelinIV)
thisiswhytheycallitadistributedhashtable
Application 2-86
Howtoassignkeystopeers?
centralissue:
assigning(key,value)pairstopeers.
rule:assignkeytothepeerthathastheclosestID.
conventioninlecture:closestistheimmediatesuccessorof
thekey.
e.g.,:n=4;peers:1,3,4,5,8,10,12,14;
key=13,thensuccessorpeer=14
key=15,thensuccessorpeer=1
Application 2-87
CircularDHT(1)
1
3
15
4
12
5
10
8
eachpeeronlyawareofimmediatesuccessorandpredecessor.
overlaynetwork
Application 2-88
CircularDHT(2)
O(N)messages
onavgtoresolve
query,whenthere
areNpeers
0001
Whosresp
Iam
0011
1111
forkey1110?
1110
0100
1110
1110
1100
1110
Defineclosest
asclosest
successor
1010
1110
0101
1110
1000
Application 2-89
CircularDHTwithShortcuts
1
Whosresp
forkey1110?
3
15
4
12
5
10
8
eachpeerkeepstrackofIPaddressesofpredecessor,successor,shortcuts.
reducedfrom6to2messages.
possibletodesignshortcutssoO(logN)neighbors,O(logN)messagesinquery
Application 2-90
PeerChurn
1
Tohandlepeerchurn,requireeachpeerto
3
15
4
12
5
10
knowtheIPaddressofitstwosuccessors.
Eachpeerperiodicallypingsits
twosuccessorstoseeifthey
arestillalive.
8
peer5abruptlyleaves
Peer4detects;makes8itsimmediatesuccessor;asks8whoits
immediatesuccessoris;makes8simmediatesuccessoritssecond
successor.
Whatifpeer13wantstojoin?
Application 2-91
P2PCasestudy:Skype
inherentlyP2P:pairsofusers
communicate.
proprietaryapplicationlayer
Skype
protocol(inferredviareverse
loginserver
engineering)
hierarchicaloverlaywithSNs
IndexmapsusernamestoIP
addresses;distributedover
SNs
Skypeclients(SC)
Supernode
(SN)
Application 2-92
Peersasrelays
problemwhenbothAliceand
BobarebehindNATs.
NATpreventsanoutsidepeer
frominitiatingacalltoinsider
peer
solution:
usingAlicesandBobsSNs,relay
ischosen
eachpeerinitiatessessionwith
relay.
peerscannowcommunicate
throughNATsviarelay
Application 2-93
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8SocketprogrammingwithUDP
SMTP,POP3,IMAP
2.5DNS
Application 2-94
Socketprogramming
Goal:learnhowtobuildclient/serverapplicationthatcommunicateusing
sockets
SocketAPI
introducedinBSD4.1UNIX,1981
explicitlycreated,used,releasedby
apps
client/serverparadigm
twotypesoftransportservicevia
socketAPI:
unreliabledatagram
reliable,bytestreamoriented
socket
ahostlocal,
applicationcreated,
OScontrolledinterface(adoor)
intowhich
applicationprocesscanbothsend
and
receivemessagesto/fromanother
applicationprocess
Application 2-95
SocketprogrammingusingTCP
Socket:adoorbetweenapplicationprocessandendendtransport
protocol(UCPorTCP)
TCPservice:reliabletransferofbytesfromoneprocesstoanother
controlled by
application
developer
controlled by
operating
system
process
process
socket
TCP with
buffers,
variables
socket
TCP with
buffers,
variables
host or
server
internet
controlled by
application
developer
controlled by
operating
system
host or
server
Application 2-96
SocketprogrammingwithTCP
Clientmustcontactserver
serverprocessmustfirstberunning
servermusthavecreatedsocket
(door)thatwelcomesclientscontact
Clientcontactsserverby:
creatingclientlocalTCPsocket
specifyingIPaddress,portnumber
ofserverprocess
whenclientcreatessocket:client
TCPestablishesconnectiontoserver
TCP
whencontactedbyclient,serverTCP
createsnewsocketforserverprocess
tocommunicatewithclient
allowsservertotalkwith
multipleclients
sourceportnumbersusedto
distinguishclients(moreinChap
3)
applicationviewpoint
TCPprovidesreliable,inorder
transferofbytes(pipe)
betweenclientandserver
Application 2-97
Client/serversocketinteraction:TCP
Server(runningonhostid)
Client
create socket,
port=x, for
incoming request:
welcomeSocket =
ServerSocket()
TCP
wait for incoming
connectionsetup
connection request
connectionSocket =
welcomeSocket.accept()
read request from
connectionSocket
write reply to
connectionSocket
close
connectionSocket
create socket,
connect to hostid, port=x
clientSocket =
Socket()
send request using
clientSocket
read reply from
clientSocket
close
clientSocket
Application 2-98
input
stream
Client
Process
process
output
stream
monitor
inFromUser
streamisasequenceofcharacters
thatflowintooroutofaprocess.
inputstreamisattachedtosome
inputsourcefortheprocess,e.g.,
keyboardorsocket.
outputstreamisattachedtoan
outputsource,e.g.,monitoror
socket.
outToServer
keyboard
inFromServer
Streamjargon
clientTCP
clientSocket
socket
to network
input
stream
TCP
socket
from network
Application 2-99
SocketprogrammingwithTCP
Exampleclientserverapp:
1)clientreadslinefromstandardinput
(inFromUserstream),sendsto
serverviasocket(outToServer
stream)
2)serverreadslinefromsocket
3)serverconvertslinetouppercase,sends
backtoclient
4)clientreads,printsmodifiedlinefrom
socket(inFromServerstream)
Application 2-100
Example:Javaclient(TCP)
import java.io.*;
import java.net.*;
class TCPClient {
create
inputstream
create
clientSocketobject
oftypeSocket,
connecttoserver
create
outputstream
attachedtosocket
ThispackagedefinesSocket()
andServerSocket()classes
public static void main(String argv[]) throws Exception
{
servername,
String sentence;
e.g.,www.umass.edu
String modifiedSentence;
serverport#
BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
Socket clientSocket = new Socket("hostname", 6789);
DataOutputStream outToServer =
new DataOutputStream(clientSocket.getOutputStream());
Application 2-101
Example:Javaclient(TCP),cont.
create
inputstream
attachedtosocket
BufferedReader inFromServer =
new BufferedReader(new
InputStreamReader(clientSocket.getInputStream()));
sentence = inFromUser.readLine();
sendline
toserver
outToServer.writeBytes(sentence + '\n');
readline
fromserver
modifiedSentence = inFromServer.readLine();
System.out.println("FROM SERVER: " + modifiedSentence);
closesocket
clientSocket.close();
(cleanupbehindyourself!)
}
}
Application 2-102
Example:Javaserver(TCP)
import java.io.*;
import java.net.*;
class TCPServer {
create
welcomingsocket
atport6789
wait,onwelcoming
socketaccept()method
forclientcontactcreate,
newsocketonreturn
createinput
stream,attached
tosocket
public static void main(String argv[]) throws Exception
{
String clientSentence;
String capitalizedSentence;
ServerSocket welcomeSocket = new ServerSocket(6789);
while(true) {
Socket connectionSocket = welcomeSocket.accept();
BufferedReader inFromClient =
new BufferedReader(new
InputStreamReader(connectionSocket.getInputStream()));
Application 2-103
Example:Javaserver(TCP),cont
createoutput
stream,attached
tosocket
DataOutputStream outToClient =
new DataOutputStream(connectionSocket.getOutputStream());
readinline
fromsocket
clientSentence = inFromClient.readLine();
capitalizedSentence = clientSentence.toUpperCase() + '\n';
writeoutline
tosocket
outToClient.writeBytes(capitalizedSentence);
}
}
}
endofwhileloop,
loopbackandwaitfor
anotherclientconnection
Application 2-104
Chapter2:Applicationlayer
2.1Principlesofnetwork
applications
2.2WebandHTTP
2.3FTP
2.4ElectronicMail
2.6P2Papplications
2.7SocketprogrammingwithTCP
2.8SocketprogrammingwithUDP
SMTP,POP3,IMAP
2.5DNS
Application 2-105
SocketprogrammingwithUDP
UDP:noconnectionbetweenclient
andserver
nohandshaking
senderexplicitlyattachesIPaddress
andportofdestinationtoeach
packet
servermustextractIPaddress,port
ofsenderfromreceivedpacket
applicationviewpoint:
UDPprovidesunreliabletransfer
ofgroupsofbytes(datagrams)
betweenclientandserver
UDP:transmitteddatamaybereceived
outoforder,orlost
Application 2-106
Client/serversocketinteraction:UDP
Server(runningonhostid)
create socket,
port= x.
serverSocket =
DatagramSocket()
read datagram from
serverSocket
write reply to
serverSocket
specifying
client address,
port number
Client
create socket,
clientSocket =
DatagramSocket()
Create datagram with server IP and
port=x; send datagram via
clientSocket
read datagram from
clientSocket
close
clientSocket
Application 2-107
Example:Javaclient(UDP)
input
stream
Client
Process
monitor
inFromUser
keyboard
Input: receives
process
packet (recall
thatTCP received
byte stream)
UDP
packet
receivePacket
packet (recall
that TCP sent byte
stream)
sendPacket
Output: sends
clientUDP
clientSocket
socket
to network
UDP
packet
UDP
socket
from network
Application 2-108
Example:Javaclient(UDP)
import java.io.*;
import java.net.*;
create
inputstream
create
clientsocket
translate
hostnametoIP
addressusingDNS
class UDPClient {
public static void main(String args[]) throws Exception
{
BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
DatagramSocket clientSocket = new DatagramSocket();
InetAddress IPAddress = InetAddress.getByName("hostname");
byte[] sendData = new byte[1024];
byte[] receiveData = new byte[1024];
String sentence = inFromUser.readLine();
sendData = sentence.getBytes();
Application 2-109
Example:Javaclient(UDP),cont.
createdatagramwithdata
tosend,
length,IPaddr,port
senddatagram
toserver
DatagramPacket sendPacket =
new DatagramPacket(sendData, sendData.length, IPAddress, 9876);
clientSocket.send(sendPacket);
DatagramPacket receivePacket =
new DatagramPacket(receiveData, receiveData.length);
readdatagram
fromserver
clientSocket.receive(receivePacket);
String modifiedSentence =
new String(receivePacket.getData());
System.out.println("FROM SERVER:" + modifiedSentence);
clientSocket.close();
}
}
Application 2-110
Example:Javaserver(UDP)
import java.io.*;
import java.net.*;
create
datagramsocket
atport9876
class UDPServer {
public static void main(String args[]) throws Exception
{
DatagramSocket serverSocket = new DatagramSocket(9876);
byte[] receiveData = new byte[1024];
byte[] sendData = new byte[1024];
while(true)
{
createspacefor
receiveddatagram
receive
datagram
DatagramPacket receivePacket =
new DatagramPacket(receiveData, receiveData.length);
serverSocket.receive(receivePacket);
Application 2-111
Example:Javaserver(UDP),cont
String sentence = new String(receivePacket.getData());
getIPaddr
port#,of
sender
InetAddress IPAddress = receivePacket.getAddress();
int port = receivePacket.getPort();
String capitalizedSentence = sentence.toUpperCase();
sendData = capitalizedSentence.getBytes();
createdatagram
tosendtoclient
DatagramPacket sendPacket =
new DatagramPacket(sendData, sendData.length, IPAddress,
port);
writeout
datagram
tosocket
serverSocket.send(sendPacket);
}
}
}
endofwhileloop,
loopbackandwaitfor
anotherdatagram
Application 2-112
Chapter2:Summary
ourstudyofnetworkappsnowcomplete!
applicationarchitectures
clientserver
P2P
hybrid
applicationservicerequirements:
reliability,bandwidth,delay
Internettransportservicemodel
specificprotocols:
HTTP
FTP
SMTP,POP,IMAP
DNS
P2P:BitTorrent,Skype
socketprogramming
connectionoriented,reliable:TCP
unreliable,datagrams:UDP
Application 2-113
Chapter2:Summary
mostimportantly:learnedaboutprotocols
typicalrequest/replymessage
exchange:
clientrequestsinfoorservice
serverrespondswithdata,
statuscode
messageformats:
headers:fieldsgivinginfoabout
data
data:infobeingcommunicated
Importantthemes:
controlvs.datamsgs
inband,outofband
centralizedvs.decentralized
statelessvs.stateful
reliablevs.unreliablemsg
transfer
complexityatnetworkedge
Application 2-114
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more.
Course Hero has millions of course specific materials providing students with the best way to expand
their education.
Below is a small sample set of documents:
Washington - EE - 461
Errataforthe5thEditionp.xxiiiIPsetshouldbeIPsec p.xivJaneiroshouldbereplacedwithJaneiro Chapter1 p.14coopershouldbereplacedbycopper(twoinstances) p.18fibtershouldbechangedtofiber p.35customerprovidedshouldbecustomerprovider p.75P9:onbothlinksshouldbeonal
Washington - EE - 461
461 Course ChronologyWeek 1: Lect 1Lect 2Ch 1.1-1.3Ch 1.4-1.6(HW 1 assigned, due Lect 4)Week 2: Lect 3 Ch 2.1-2.3Lect 4 Ch 2.4-2.6(Lab 1 assigned, due Lect 5)(HW 2 assigned, due Lect 6)Week 3: Lect 5Lect 6Ch 3.1-3.3Ch 3.4-3.5(Lab 2 assigned,
Washington - EE - 461
EE/CSE 461 Intro. to Computer-Commn. Networks (Sp.Instructor: Sumit Roy2012)1Course OutlineOverview of Networks - OSI model, architecture and components, functionsApplications Layer (http, smtp, ftp)Transport Layer (How to make the network invisibl
Washington - EE - 461
Wireshark Lab: TCPVersion: 2.0 2009 J.F. Kurose, K.W. Ross. All Rights ReservedComputer Networking: A Topth down Approach, 5 edition.In this lab, well investigate the behavior of TCP in detail. Well do so by analyzing a trace of the TCP segments sent a
Washington - EE - 461
Wireshark Lab: Ethernet and ARPVersion: 2.0 2009 J.F. Kurose, K.W. Ross. All Rights ReservedComputer Networking: A Topth down Approach, 5 edition.In this lab, well investigate the Ethernet protocol and the ARP protocol. Before beginning this lab, youll
Washington - EE - 461
Wireshark Lab: IPVersion: 2.0 2009 J.F. Kurose, K.W. Ross. All Rights ReservedComputer Networking: A Topth down Approach, 5 edition.In this lab, well investigate the IP protocol, focusing on the IP datagram. Well do so by analyzing a trace of IP datagr
Washington State - HBM - 280
HBM280Paper04:58http:/www.environmentalleader.com/2008/01/25/marriotthiltonotherhotelsgoinggreen/RadissonSASEdinburghswitchedtoenergyefficientlightsatacostof$2,307,andfirst yearsavingswere$27,889Obstacleslieintheway,though,andoneispricing.ButRobertK
Washington State - HBM - 280
Cost of GoingGreenBENEFIT$Reduced Energy CostsSave 30%-50%Hilton saved $9 million in two years ofimplementing an energy reduction planReduction of WasteLEED certified hotels can save up to 70% ofthe cost of their solid wasteBENEFIT$Tax Benefits
Washington State - HBM - 280
HBMTest3StudyGuide05:25CHAPTER4I.4MajorHRMFunctionsA.Staffing:A.1. EmploymentPlanningA.1.a. ThedeterminingofanorganizationshumanresourceneedsA.1.b. Number/typeofemployeesA.2. JobAnalysisA.2.a. JobDescriptionA.2.a.i.Definingessentialfunctionso
Washington State - PSYCH - 324
22:07Section1Womenaremorelikelythanmentosufferfromdepressionandeatingdisorders;men aremorelikelytohaveproblemswithsubstanceabuseandantisocialpersonality disorderDepressionistwotothreetimesmorecommoninwomenthaninmen;thisgender differencehasbeenreport
Washington State - PSYCH - 324
Psychology of Women JournalsbyMichael Knutson11040656
Washington State - PSYCH - 324
Journal 1A Heineken commercial is set at a wedding. As a man orders two Heineken andlooks over to a table where a beautiful woman is sitting with what appears to be hermother. The voice over explains how the wedding is like a jungle how this man ishun
Washington State - PSYCH - 324
Journal 2Gender biases can be seen throughout pop culture, from commercials, totelevision shows, to movies on the big screen. Gender biases include, stereotypes,prejudice, and discrimination, all based on a persons sex. In todays society, peopleprefer
Washington State - PSYCH - 324
Journal 3In a commercial for the Rose Pedal Cottage, a large dollhouse, a young girl isshown decorating, cooking, doing laundry, and taking care of a baby doll for fun. As ifthat wasnt enough subliminal messaging, her mom actually comes and approves th
Washington State - PSYCH - 324
Journal 4The changes involved in adolescent girls becoming women are, for the most part,a mystery to the male population. Pop culture hardly ever discusses the details of pubertybecause it is mostly taboo. Sex education classes rarely go into any detai
Washington State - PSYCH - 324
Journal 5In modern American culture, most people assume that men and women are borndifferent beings. The old saying that men are from Mars and women are from Venussummarizes the popular thought that psychological gender differences are innate, and that
Washington State - PSYCH - 324
A specific stereotype that is common throughout our society is that men are betterat math and science, while females are more prone to the arts and language. DeborahCameron, an Oxford professor of language and communication, claims that this is purespe
Washington State - PSYCH - 324
Journal 7In recent news, Wal-Mart is being sued in a class-action lawsuit involving over ahalf million women. If brought to trial, this case will be the largest discrimination case inhistory in terms of people affected. The suit claims that female empl
Washington State - PSYCH - 324
Journal 8Though women and men have been found to be strikingly similar in their loverelationships, most people assume that women are far more attached to their romanticpartner than men. The stereotypical woman is assumed to be looking for the one toma
Washington State - PSYCH - 324
Journal 9This journal is too easy. Turn on your television or flip through any popularmagazine and try not so see the objectification of women. Sex sells, and advertisingagencies know this. Any sort of personality is thrown out the window in manycomme
Washington State - PSYCH - 324
Journal 10Pregnancy is a serious matter in the life of women. Many physical, biological, andemotional changes occur during pregnancy that can be difficult for many women to dealwith. Many women look forward to the day they have a child of their own, bu
Washington State - PSYCH - 324
21:17MaleRolesRecentHistory:ChanesintheMaleRoleJosephPleck(1981)Wheneverroleschange,ambiguitiesarecreatedbecauseofcontradictionsbetweenthe oldannewrolesInstitutionaldefinitionandcontrolofmasculinitydeclined,shiftingemphasistointernal, psychological
Purdue - MA - 153
Lesson 9Example #1:a. A farmer plans to use 360 feet of fencing to enclose arectangular region, using part of a straight river bankinstead of fencing on one side, as shown in the figure. Findthe area of the region if the length of the side parallel t
Purdue - MA - 153
Lesson 10Quadratic equation:- an equation of the formare real numbers and- special forms of quadratic equations:, whereandThe degree of a quadratic equation is _Example 1: Determine whether each of the following equationsis quadratic.a.b.c.d.
Purdue - MA - 153
Lesson 11Quadratic equation:- an equation of the formare real numbers and- special forms of quadratic equations:, whereandThe degree of a quadratic equation is _Zero Factor Theorem:- the product of two or more factors is zero if and only if at le
Purdue - MA - 153
Lesson 12Application Problems:- you should have some procedure for solving applications (defineunknown values, set-up equations, solve)- pay attention to units, especially when working with distance, rateand time problems (if your rate is in terms of
Purdue - MA - 153
Lesson 13Example 1: Solve the following quadratic equationsa.b.Doeshave any real solutions? Why or why not?Doeshave any solutions?Complex Number:, where and are real numbers andis the real part and is the imaginary partReview of the Product Rul
Purdue - MA - 153
Lesson 14In the previous four lessons, we have worked with quadratic equations;how can you tell whether an equation is quadratic?Example 1: Is the following equation quadratic?Certain equations which are not quadratic can be solved using the samemeth
Purdue - MA - 153
Lesson 15Inequality:- a statement that two quantities or expressions are not necessarilyequal- an inequality can be expressed using any of the following signs:Example 1: Express the following statements as inequalities:a. is at least 18b.is no mor
Purdue - MA - 153
Lesson 16Rectangular coordinate system (Cartesian coordinate system):- two perpendicular number lines in a plane that intersect at the zeropoint of each line (origin)- the horizontal number line is the- the vertical number line is the- the plane is
Purdue - MA - 153
Lesson 17Graph of an equation in two variables:- the set of all ordered pairs that make the equation trueOne of the most basic ways to graph an equation in two variables is to usean -chart.Graphing an equation in two variables using an1. Select arbi
Purdue - MA - 153
Lesson 18Slope:- A ratio (fraction) that compares the vertical change ( ) to thehorizontal change ( ) when moving from one point to another- Denoted symbolically by- vertical change ( ) is the difference between the -coordinates- horizontal change (
Purdue - MA - 153
Lesson 19Slope:- A ratio (fraction) that compares the vertical change ( ) to thehorizontal change ( ) when moving from one point to another- Denoted symbolically by- vertical change ( ) is the difference between the -coordinates- horizontal change (
Purdue - MA - 153
Lesson 20Function:- a connection between sets in which each element of the first setcorresponds with exactly one element of the second set- the first set is called the domain and the second set is called the rangeFunctions as equations:- in terms of
Purdue - MA - 153
Lesson 21Function:- a connection between sets in which each element of the first setcorresponds with exactly one element of the second set- the first set is called the domain and the second set is called the rangeFunctions as equations:- in terms of
Purdue - MA - 153
Lesson 22Given below is a table of inputs, outputs and ordered pairs and the graphof the function ( ).Inputs21012Outputs( ) (2) (1) (0) (1) (2)41014OrderedPairs, ( )(2, 4)(1, 1)(0, 0)(1, 1)(2, 4)Example 1: Use the function ,
Purdue - MA - 153
Lesson 23Given below is the graph of the function , with domain [].range [Example 1: Using the functiona. sketch the graph ofnotation.] andand its graph:and list its domain and range in intervalb. sketch the graph ofinterval notation.c. sketch
Purdue - MA - 153
Lesson 24Piecewise-defined function:- function described by more than one expression- the domain of the function is the domain of each piece together- keep in mind a piecewise-defined function must meet therequirements of a function (every input has
Purdue - MA - 153
Lesson 25Quadratic Function:- a function is quadratic if it is in any of the following forms:o (), where()o (), where()(), whereo ()- the degree of a quadratic function is _- the graph of a quadratic function a parabolaVertex of a parabola:
Purdue - MA - 153
Lesson 26Quadratic Function:- a function is quadratic if it is in any of the following forms:o (), where()o (), where()(), whereo ()- the degree of a quadratic function is _- the graph of a quadratic function a parabolaVertex of a parabola:
Purdue - MA - 153
Lesson 27Operations on Functions:)( )()( ); the sum of two functions is the sum of-(their outputs)( )()( ); the difference of two functions is the-(difference of their outputs( ) ( ); the product of two functions is the product of- ( )( )the
Purdue - MA - 153
Lesson 28Example 1: Given the graph of a polynomial function , find the zeros ofthe function, then find the intervals where the function is positive andnegative (express in interval notation).Example 2: Given the function ( ), find the zeros, thenfi
Purdue - MA - 153
Lesson 29We have already seen that the graph of a polynomial function with a) is linear, and the graph of a polynomialdegree of one ( ( )) is a parabola. Whatfunction with a degree of two ( ( )does the graph of a polynomial function with a degree la
Purdue - MA - 153
Lesson 30Variation:- how one quantity changes (varies) in relation to another quantity- quantities can vary directly, indirectly, jointly or combinedDirect Variation:- as the independent variable increases, the dependent variable alsoincreases- des
Purdue - MA - 153
Lesson 31System of equations:- two or more equations containing common variables- Example:- the solution set of a system is the set containing values of thevariables that satisfy all equations in the system- we will only cover systems with two equat
Purdue - MA - 153
Lesson 32System of equations:- two or more equations containing common variables- the solution set of a system is the set containing values of thevariables that satisfy all equations in the system- we will only cover systems with two equation and two
Purdue - MA - 153
Evening Quiz #3 SolutionMean: 7, High: 10, Low: 2(2 Points) 1. Express as a polynomial. (page 39, #10)()()()(4 Points) 2. Factor the polynomial completely. (page 40, #102)()(()()(()(()))(3 Points) 3. Write the expression as a simpli
Purdue - MA - 153
Evening Quiz #4 SolutionMean: 4.4, High: 10, Low: 1(6 Points each) 1. Simplify the expression completely.(page 48, #38)()()(3 Points each) 2. Rationalize the numerator and simplify completely.(page 48, #56)(()())(()()())
Purdue - MA - 153
Morning Quiz #4Mean: 5, High: 10, Low: 1(4 Points each) 1. Simplify the expression completely.(page 48, #11)()()()((()()(()(()())()(())(()((()(()()()))))))( ))(5 Points each) 2. Simplify the expression complete
Purdue - MA - 153
Evening Quiz #5 SolutionMean: 10, High: 10, Low: 10(9 Points) 1. Two pipes can be used to fill a swimming pool. Whenthe first pipe is closed, the second pipe can fill the pool in 9 hours.When the second pipe is closed, the first pipe can fill the pool
Purdue - MA - 153
Evening Quiz #6 SolutionMean: 10, High: 10, Low: 10(9 Points) 1. Solve the following quadratic equation by completingthe square.()()(()(()()()))()()
Purdue - MA - 153
Morning Quiz #6 SolutionMean:10, High:10, Low:10On average, Mary can do her homework assignments in 100 minutes. Ittakes Frank about 2 hours to complete a given assignment. How long willit take the two of them working together to complete an assignmen
Purdue - MA - 153
Evening Quiz #7 SolutionMean: 5, High: 9, Low: 1(3 Points) 1. Solve the following equation by factoring. Simplifycompletely. (page 84, #7)()()()(())(3 Points) 2. Solve the following quadratic equation by completingthe square. Simplify comple
Purdue - MA - 153
Morning Quiz #7 SolutionMean: 10, High: 10, Low: 10Solve the quadratic equation by completing the square.Divide each term by the leading coefficientIsolate the constant termAdd the square of half the coefficient of()()(to both sides ( )())()
Purdue - MA - 153
Evening Quiz #8 SolutionMean: 10, High: 10, Low: 101. Solve the following equation by using real numbers only. (Example3 part a.)()((())()())Check:FALSETRUE2. Solve the following equation by using real numbers only. (Example4 part b.)(
Broward College - CHM - CHM1045
Aqueous Reactions and Solution StoichiometrySolution CompositionWater possesses many unusual properties. One of the most important properties of water is itsability to dissolve a wide variety of substances. It may sound strange, but absolutely pure wat
Broward College - CHM - CHM1045
Atomic and Molecular WeightsThe subscripts in chemical formulas, and the coefficients in chemical equations represent exactquantities.H2O, for example, indicates that a water molecule comprises exactly two atoms of hydrogen andone atom of oxygen.The
Purdue - MA - 153
Morning Quiz #8 SolutionMean: 8.3, High: 10, Low: 1(7 Points each) 1. Solve the following quadratic equation by completingthe square.()(())(2 Points each) 2. Solve the following quadratic equation using anymethod.()()
Broward College - CHM - CHM1045
Atoms, Molecules and IonsThe Atomic Theory of MatterChemists make their observations in the macroscopic world and seek to understand thefundamental properties of matter at the level of the microscopic world (i.e. molecules andatoms). The reason why ce
Purdue - MA - 153
Evening Quiz #9 SolutionMean: 10, High: 10, Low: 101. Solve the following inequalities. Write solutions in interval notation.a. |||(|][)b.||||||||[]