Week 1 2 Networks and The Internet
Week 1 2 Networks and The Internet
WEEK 1
WEEK 1: NETWORKS AND THE
INTERNET
(Web Services ?)
Networks Review
XML
TCP/IP Overview SOAP
The Internet and the Application Layer
web, Protocols Layer -Client -server Application
-Sockets and Ports
-Internet Protocol Stack
Persistent Connections
-Protocol Layering and
Data What are YOUR experiences ?
• -Delay and Loss in Special Interests ? YOUR
Networks wishes ?
PART I
• Single machine
Local ISP
• connect to ISP
• PPP
• Small organizations Home Machines
• connect machines
by LAN Small
Organization
• Large Company
• many machines
• different networks
• internal routing
• Intranet
• Connect to ISP
• high capacity link
• Internet
THE ISP’S NETWORK
NAP R
NAP R
R NAP
CONNECTING ISPS
NETWORK CONNECTIONS
R NAP
NAP R
NAP R
R NAP
PROTOCOL OVERVIEW
Definesacceptable
behaviour:
Agreed data format
– Handshake
– Message
– Response
transport protocol
technology
THE TCP/IP LAYERS
tcp, udp
Transport Transport
ip ip
Internet Internet Internet
• Don’t be shy !
• Ask questions ! Get answers (hopefully )
• Notes can still be improved, you may want
to help !
FURTHER INFORMATION
physical medium
INTERNET PROTOCOL STACK
• application: supporting net apps
• ftp, smtp, http
application
• transport: end host- end host
• tcp, udp transport
• network: source to destination
network
• ip, routing protocols
tcp, udp
Transport Transport
ip ip
Internet Internet
Internet
Physical Media
LAYERS: LOGICAL COMMUNICATION
application application
transport transport
Each Layer
network network
• distributed data link
data link
• “entities” physical
physical
implement
application network
layer functions
transport data link
at each node
network physical
• entities perform application
data link transport
actions,
exchange physical network
messages data link
with peers physical
LAYERS: LOGICAL COMMUNICATION
data
application application
transport transport
E.g. transport network
network data
• take data from data link
data link
app physical
physical
• add addressing,
application network
reliability check
transport data link
info to form
physical data
“datagram” network application
data link ack
• send datagram transport
to peer physical network
• wait for peer to ack receipt data link
• analogy: post office physical
LAYERS: PHYSICAL COMMUNICATION
data
application application
transport transport
network network
data link data link
physical physical
application network
transport data link
network physical data
application
data link transport
physical network
data link
physical
PROTOCOL LAYERING AND DATA
source destination
M application application M message
Ht M transport transport Ht M segment
Hn Ht M network network Hn Ht M datagram
Hl Hn Ht M link link Hl Hn Ht M frame
physical physical
LAYERS IN ACTION
Application M M
Transport Ht M
Ht M
Internet Hi Ht M Hi Ht M
Media access Hm H i H t M Hm H i H t M
DELAY AND LOSS IN
NETWORKS
processing
queueing
transmission propagation
8.00
R = transmission rate 7.00
(bits/sec) 6.00
5.00
L = average packet size (bits) 4.00
3.00
2.00
AL/R
R/L = max rate of packet 1.00
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
transmission
AL/R = traffic intensity
PART II
Our goals:
• specific protocols:
• conceptual aspects of
• http (today)
network application
• smtp
protocols
• pop
• client-server
paradigm • dns
User Agent
Client2 • Protocol interface
Protocol
• Protocol messages
ADDRESSING AND NAMING
globally host
unique specific
SOCKETS AND PORTS
Sockets provide an API for application
Protocol
• Request-response
Client Server
• Do-operation
Sender Receiver
TRANSPORT REQUIREMENTS OF COMMON APPS
Data loss Bandwidth
some apps (e.g.,
• some apps (e.g., audio)
multimedia) require
can tolerate some loss minimum amount of
• other apps (e.g., file bandwidth to be
“effective”
transfer, telnet) require other apps (“elastic apps”)
100% reliable data make use of whatever
Timing
transfer bandwidth they get
• some apps (e.g., Internet
telephony, interactive
games) require low delay
to be “effective”
TRANSPORT REQUIREMENTS OF COMMON
APPS
Application Underlying
Application layer protocol transport protocol
Non-persistent Persistent
• http/1.0: server parses request, • default for htp/1.1
responds, closes TCP • on same TCP connection:
connection server, parses request,
• 2 RTTs to fetch object
responds, parses new
request,..
• TCP connection
• client sends requests for
• object request/transfer all referenced objects as
• each transfer suffers from
soon as it receives base
HTML.
TCP’s initially slow sending rate
• fewer RTTs, less slow start.
• many browsers open multiple
parallel connections
PART III
• HTTP
• UDP connections
• TCP connections
• Java Examples
HTTP
status line
(protocol
status code HTTP/1.0 200 OK
status phrase) Date: Thu, 06 Jul 2002 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
header Last-Modified: Mon, 22 Jun 1998 …...
lines Content-Length: 6821
Content-Type: text/html
200 OK
• request succeeded, requested object later in this message
301 Moved Permanently
• requested object moved, new location specified later in this
message (Location:)
400 Bad Request
• request message not understood by server
404 Not Found
• requested document not found on this server
505 HTTP Version Not Supported
WHY WEB CACHING?
origin
servers
public
Assume: cache is “close” to
Internet
client (e.g., in same network)
• faster response time: cache
“closer” to client 1.5 Mbps
• decrease traffic to distant access link
often a bottleneck.
• Cache slower on a miss.
institutional
cache
WEB CACHES (PROXY SERVER)
client server