0% found this document useful (0 votes)
6 views26 pages

Lecture 2

The lecture provides an overview of network technology and applications, emphasizing the End-2-End principle which states that applications should run on end systems rather than network-core devices. It discusses various application architectures, including client-server, peer-to-peer, and hybrid models, along with the communication processes and transport service requirements for different applications. Additionally, it covers the Internet transport protocols (TCP and UDP) and their roles in ensuring reliable data transfer and addressing processes.

Uploaded by

kimon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views26 pages

Lecture 2

The lecture provides an overview of network technology and applications, emphasizing the End-2-End principle which states that applications should run on end systems rather than network-core devices. It discusses various application architectures, including client-server, peer-to-peer, and hybrid models, along with the communication processes and transport service requirements for different applications. Additionally, it covers the Internet transport protocols (TCP and UDP) and their roles in ensuring reliable data transfer and addressing processes.

Uploaded by

kimon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lecture 2:

Overview of Network Technology &


Applications – the End-2-End Principle!

Aggelos Bletsas

TEL418 Computer Networks II


Spring Semester 2021
School of ECE, Technical Univ. of Crete

1
Slides adapted from “Computer Networking: A top-down Approach – 5th
edition” by Jim Kurose and Keith Ross, Addison-Wesley, April 2009.

All material copyright 1996-2009


J.F Kurose and K.W. Ross, All Rights Reserved

2
3
Some network apps
r e-mail r social networks
r web r voice over IP
r instant messaging r real-time video
r remote login conferencing
r P2P file sharing r grid computing

r multi-user network
games
r streaming stored video
clips

4
Creating a network app application
transport
network
data link

write programs that physical

v run on (different) end


systems
v communicate over network
v e.g., web server software
communicates with browser
software application

No need to write software


transport
network
data link

for network-core devices


application
physical
transport
network
v Network-core devices do data link
physical
not run user applications
v applications on end systems
allows for rapid app
development, propagation
5
Creating a network app (2)
No need to write software
for network-core
devices!

This is the celebrated


“End-2-End principle”! application
transport
network
data link

Please Read the physical

Saltzer/Clark/Reed very
influential paper!

6
Application architectures
A. Client-server
Including data centers / cloud computing
B. Peer-to-peer (P2P)
C. Hybrid of client-server and P2P

7
A. Client-server architecture
server:
v always-on host
v permanent IP address
v server farms for
scaling
clients:
client/server v communicate with server
v may be intermittently
connected
v may have dynamic IP
addresses
v do not communicate
directly with each other
8
Server Farm Example:Google Data Centers

r Estimated cost of data center: $600M


r Google spent $2.4B in 2007 on new data
centers
r Each data center uses 50-100 megawatts
of power
B. Pure P2P architecture
r no always-on server
r arbitrary end systems
directly communicate peer-peer
r peers are intermittently
connected and change IP
addresses

Highly scalable but


difficult to manage

10
C. Hybrid of client-server and P2P
Skype
v voice-over-IP P2P application
v centralized server: finding address of remote
party:
v client-client connection: direct (not through
server)
Instant messaging
v chatting between two users is P2P
v centralized service: client presence
detection/location
• user registers its IP address with central
server when it comes online
• user contacts central server to find IP
addresses of buddies
11
How do different apps communicate?
Processes
Process: program running Client process: process
within a host. that initiates
• within same host, two
communication
processes communicate Server process: process
using inter-process that waits to be
communication (defined contacted
by OS).
• processes in different • Note: applications with
hosts communicate by P2P architectures have
exchanging messages client processes &
server processes

12
How do different apps communicate?
Sockets
host or host or
r process sends/receives server server
messages to/from its
socket controlled by
app developer
r socket analogous to door process process

v sending process shoves socket socket


message out door TCP with TCP with
Internet buffers,
buffers,
v sending process relies on variables variables
transport infrastructure
on other side of door which
controlled
brings message to socket by OS
at receiving process
r API: (1) choice of transport protocol;
(2) ability to fix a few parameters (lots more on this later)
13
What transport service does an app need?
Data loss Throughput
r some apps (e.g., audio) can r some apps (e.g.,
tolerate some loss multimedia) require
r other apps (e.g., file minimum amount of
transfer, telnet) require throughput to be
100% reliable data “effective”
transfer
r other apps (“elastic
Timing apps”) make use of
r some apps (e.g., whatever throughput they
Internet telephony, get
interactive games)
require low delay to be Security
“effective” r Encryption, data
integrity, …
14
What can be guaranteed?

• Bandwidth and Timing Constraints cannot be


guaranteed from transport layer – we need to
engineer solutions! Any ideas?
[more on this later]

• Lossless data transfer and security can be


guaranteed (almost surely!)

15
Internet transport protocols services

TCP service: UDP service:


r connection-oriented: setup r unreliable data transfer
required between client and between sending and
server processes receiving process
r reliable transport between r does not provide:
sending and receiving process connection setup,
r flow control: sender won’t reliability, flow control,
overwhelm receiver congestion control, timing,
throughput guarantee, or
r congestion control: throttle
security
sender when network
overloaded
r does not provide: timing, Q: why bother? Why is
minimum throughput there a UDP?
guarantees, security
16
Addressing processes
r Q: does IP address of
r to receive messages, host on which process
process must have runs suffice for
identifier identifying the process?
r host device has unique v A: No, many processes
32-bit IP address (IPv4) can be running on
r host device has unique same
128-bit IP address (IPv6) r Identifier includes both
r Exercise: use ipconfig IP address and port
from command prompt to numbers associated with
get your IP address process on host.
(Windows) r Example port numbers:
Use ipconfig getifaddr en0
v HTTP server: 80
(MAC) v Mail server: 25
17
Transport service requirements of common apps

Application Data loss Throughput Time Sensitive

file transfer no loss elastic no


e-mail no loss elastic no
Web documents no loss elastic no
real-time audio/video loss-tolerant audio: 5kbps-1Mbps yes, 100’s
video:10kbps-5Mbps msec
stored audio/video loss-tolerant same as above
interactive games loss-tolerant few kbps up yes, few secs
instant messaging no loss elastic yes, 100’s
msec
yes and no

18
Internet apps: application, transport protocols

Application Underlying
Application layer protocol transport protocol

e-mail SMTP [RFC 2821] TCP


remote terminal access Telnet [RFC 854] TCP
Web HTTP [RFC 2616] TCP
file transfer FTP [RFC 959] TCP
streaming multimedia HTTP (eg Youtube), TCP or UDP
RTP [RFC 1889]
Internet telephony SIP, RTP, proprietary
(e.g., Skype) typically UDP

19
What does an App-layer protocol consist of?

r Types of messages Public-domain protocols:


exchanged, r defined in RFCs
e.g., request, response
r allows for
v

r Message syntax: interoperability


what fields in messages &
r e.g., HTTP, SMTP,
v
how fields are delineated
BitTorrent
r Message semantics
Proprietary protocols:
v meaning of information in
fields r e.g., Skype, ppstream
r Rules for when and how
processes send &
respond to messages
20
EXAMPLE: Socket programming with TCP

Example client-server app:


1) client reads line from standard
input (inFromUser stream) ,
sends to server via socket
(outToServer stream)
2) server reads line from socket
3) server converts line to
uppercase, sends back to
client
4) client reads, prints modified
line from socket
(inFromServer stream)

21
Example: Java client (TCP)
import [Link].*;
import [Link].*;
class TCPClient {

public static void main(String argv[]) throws Exception


{
String sentence;
String modifiedSentence;
Create
input stream BufferedReader inFromUser =
new BufferedReader(new InputStreamReader([Link]));
Create
client socket, Socket clientSocket = new Socket("hostname", 6789);
connect to server
Create DataOutputStream outToServer =
output stream new DataOutputStream([Link]());
attached to socket
22
Example: Java client (TCP), cont.

Create BufferedReader inFromServer =


input stream new BufferedReader(new
attached to socket InputStreamReader([Link]()));

sentence = [Link]();
Send line
to server [Link](sentence + '\n');

Read line modifiedSentence = [Link]();


from server
[Link]("FROM SERVER: " + modifiedSentence);

[Link]();

}
}
23
Example: Java server (TCP)
import [Link].*;
import [Link].*;

class TCPServer {

public static void main(String argv[]) throws Exception


{
String clientSentence;
Create String capitalizedSentence;
welcoming socket
ServerSocket welcomeSocket = new ServerSocket(6789);
at port 6789
while(true) {
Wait, on welcoming
socket for contact Socket connectionSocket = [Link]();
by client
BufferedReader inFromClient =
Create input new BufferedReader(new
stream, attached InputStreamReader([Link]()));
to socket

24
Example: Java server (TCP), cont

Create output
stream, attached DataOutputStream outToClient =
to socket new DataOutputStream([Link]());
Read in line
from socket clientSentence = [Link]();

capitalizedSentence = [Link]() + '\n';


Write out line
[Link](capitalizedSentence);
to socket
}
}
} End of while loop,
loop back and wait for
another client connection

25
Thank you!

26

You might also like