Professional Documents
Culture Documents
COMNET
Computer Networks
1
0
0
1
0
1
10
0 1
... ...
1
0
0
1
11
00
0
1
... 10
0
...
11
00 1
...
Lecture notes
(version 6.3)
1 Course presentation
Course objectives
Computer Networks (ComNet) 1/5 : Introduction Pedagogical approach
Instructional methodology
2 Administrative questions
Olivier Fourmaux (olivier.fourmaux@upmc.fr)
Schedule
Evaluation
Version 6.3 3 Course introduction
Network components
Protocol hierarchy
TCP/IP example
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
1 Course presentation
Course objectives
Pedagogical approach Deepen and extend beyond a first course in networking
Instructional methodology example: LI310 course from the UPMC Licence dInformatique
prerequisites, both theoretical and technical:
2 Administrative questions
the vocabulary
Schedule
introduction to signal processing
Evaluation basic protocol mechanisms
classical protocols (HDLC, X25, IP, routing, UDP, TCP)
3 Course introduction ISO layered model
Network components
Protocol hierarchy
TCP/IP example
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Course objectives Course presentation Course objectives
Administrative questions Pedagogical approach Administrative questions Pedagogical approach
Course introduction Instructional methodology Course introduction Instructional methodology
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
PC 1U "serveur"
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Course objectives Course presentation Course objectives
Administrative questions Pedagogical approach Administrative questions Pedagogical approach
Course introduction Instructional methodology Course introduction Instructional methodology
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Course objectives Course presentation
Schedule
Administrative questions Pedagogical approach Administrative questions
Evaluation
Course introduction Instructional methodology Course introduction
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Course presentation
Schedule Schedule
Administrative questions Administrative questions
Evaluation Evaluation
Course introduction Course introduction
1 Course presentation
The week after the final exam (1st session) or the makeup exam Course objectives
(2nd session): Pedagogical approach
Instructional methodology
exams graded and a curve is applied
grades posted on DBUFR 2 Administrative questions
students consult their graded exams Schedule
juries Evaluation
course jury (determines passing or failing)
3 Course introduction
Networking speciality jury (grade compensation)
Masters program jury (final decision) Network components
Protocol hierarchy
TCP/IP example
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
The Internet 1
0
What are the basic elements of the Internet?
0
1
0
1
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Definition
Temps
Demande douverture
Protocol: protocols define format, order of messages sent and
Bonjour 1
0
0
1 de connexion TCP received among network entities, and actions taken upon message
0
1
transmission and receipt.
Rponse positive et
Bonjour tablissement de la connexion Remark
any interaction between entities over the Internet is
based on protocols
O est la gare ? GET http://www.upmc.fr this course focuses mainly on protocols
Examples
Deuxime rue gauche Envoi de la page daccueil web request
resolving name queries into IP addresses
... ...
route computation
congestion control. . .
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
IAB
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
1
0
0
1
0
1 1
0
0
1
0
1
... ... ... ...
00
11
11
00
00
11 11
00
00
11
00
11
10
0 1
... ... 10
0 1
... ...
1
0
0
1
11
00 1
0
0
1
11
00
... ...
0
1
11
00 10
0 1
... 0
1
... 10
0
...
11
00 1
...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
reliability 700.0000
ordering 600.0000
flow control
500.0000
congestion control. . .
TCP 400.0000
simple 200.0000
basis for other protocols
100.0000
UDP
0.0000
t (s)
0.0000 2.0000 4.0000 6.0000 8.0000
1
0
Physical media
0
1
0
1
media with waveguide
... ... ... twisted pair (UTP5+, UTP6,. . . )
11
00
00
11
00
11 coaxial cables (baseband, broadband,. . . )
optical fibers (multimode, monomode,. . . )
media without waveguide
10
0 1
satellite links (geostationary, constellation, . . . )
... ... terrestrial links (radio-waves, micro-waves, infrared,
optical,. . . )
1
0
0
1
11
00 Access technology
shared medium
0
1
... 10
0
... framing
11
00 1
...
Intermediate elements. . .
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
(a)
3
2
1
(b)
(a)
Switching office
3 2 1
Computer Packets queued up
for subsequent
transmission (c)
3
2
1
(d)
Computer
(b) pictures from Stallings W. High Speed Networks
(a) (a)
3
2
1
(b) (b)
2
1
(c) (c)
2 1
(d) (d)
pictures from Stallings W. High Speed Networks pictures from Stallings W. High Speed Networks
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Pkt 1
Propagation
delay Msg
Pkt 2
Types of delays in packet switching:
Pkt 1
Pkt 3 nodal processing delay
Pkt 2
Msg Queuing Pkt 1 uncompressible (Dn )
delay Pkt 3
Time
spent
Pkt 2 queuing delay
Time
hunting
for an
outgoing
Pkt 3 depends on congestion (Dq = 0 if no congestion)
Msg
trunk
Call transmission delay
accept
signal depends on the size of the packet (Dt = L/R)
Data
propagation delay
AB BC CD
v = 2.108 m/s to 3.108 m/s (Dp = d/v )
trunk trunk trunk
Formula for end-to-end delay?
A B C D A B C D A B C D
1
0
0
1
0
1
0
1
... 10
0
...
11
00 1
...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
VLAN 3
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
1
0
0
1
0
1
10
0 1
PPP only for old serial connections? ...
...
PPP over SONET: POS
1
0
0
1
PPP over Ethernet: PPPoE 11
00
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Junction box
cable TV
wire Schedule
Evaluation
Fiber House
3 Course introduction
Network components
(b)
Protocol hierarchy
Residential (PSTN/ADSL, cable, optical fiber,. . . ) TCP/IP example
Part 5/5 (3): Local loop
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
Physical medium
picture from Tanenbaum A. S. Computer Networks 3rd edition picture from Tanenbaum A. S. Computer Networks 3rd edition
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Interface
Presentation protocol
Layer 4 protocol 6 Presentation Presentation PPDU
4 H4 M H4 M
Interface
Session protocol
Layer 3 5 Session Session SPDU
protocol
3 H 3 H 4 M1 H 3 M2 H 3 H 4 M1 H 3 M2
Transport protocol
4 Transport Transport TPDU
Layer 2 Communication subnet boundary
protocol Internal subnet protocol
2 H2 H3 H4 M1 T2 H2 H3 M2 T2 H2 H3 H4 M1 T2 H2 H3 M2 T2
3 Network Network Network Network Packet
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
Physical Physical
picture from Tanenbaum A. S. Computer Networks 3rd edition
these pictures and to the end are from Stallings W. High Speed Networks
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Workstation
1 Course presentation
Frame
Course objectives Router
Relay
Network
Pedagogical approach
Instructional methodology IEEE 802 LAN
Server
2 Administrative questions
Schedule
Application Application
Evaluation
TCP TCP
3 Course introduction IP IP IP
Relay Relay
Protocol hierarchy MAC MAC
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Course presentation Network components Course presentation Network components
Administrative questions Protocol hierarchy Administrative questions Protocol hierarchy
Course introduction TCP/IP example Course introduction TCP/IP example
Application
Logical connection
(TCP connection)
TCP TCP Data
Global network
IP address IP TCP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Application
Data
TCP
IP T Data
I T Data
IP
I T Data
LLC
L I T Data LLC
L I T Data
Frame
MAC
F I T Data F Relay M L I T Data M
Physical Physical
MAC
M L I T Data M Physical
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 1/5 : Introduction
Legacy applications Legacy applications
Contemporary applications Contemporary applications
Support applications Support applications
1 Legacy applications
Introduction
Computer Networks (ComNet) 2/5 : Application Remote login
File transfer
2 Contemporary applications
Olivier Fourmaux (olivier.fourmaux@upmc.fr)
World Wide Web
Electronic mail
Peer-to-peer
Version 6.3
3 Support applications
Directory (DNS)
Network management
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
1 Legacy applications 1
0
0
1
0
1
Introduction ... ... ...
Remote login
00
11
11
00
File transfer 00
11
2 Contemporary applications
World Wide Web 10
0 1
Electronic mail ... ...
Peer-to-peer
1
0
0
1
11
00
3 Support applications
Directory (DNS)
0
1
... 10
0
...
Network management 11
00 1
...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Introduction Legacy applications Introduction
Contemporary applications Remote login Contemporary applications Remote login
Support applications File transfer Support applications File transfer
Remarks:
Transport protocol
standardizes the exchanges of the most common applications 4 Transport Transport
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Application layer: TCP/IP model (1) Application layer: TCP/IP model (2)
TELNET FTP SMTP DNS
OSI TCP/IP
TCP UDP
7 Application Application
IP
6 Presentation
Packet#
ARPANET SATNET radio LAN
5 Session
In the Internet, there are hundreds of application layer protocols!
4 Transport Transport
TELNET to log in to a remote host
3 Network Internet FTP to transfer files
2 Data link Hosttonetwork SMTP to exchange e-mail
1 Physical
HTTP to surf the web
DNS to resolve names on the Internet
SNMP to manage the network. . .
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Introduction Legacy applications Introduction
Contemporary applications Remote login Contemporary applications Remote login
Support applications File transfer Support applications File transfer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Application present since 1969 (RFC 15) and standardized by the Several setup exchanges dedicated to options (RFC 855):
IETF in 1983 (RFC 854 and Internet Standard STD 8) the client sends requests (WILL WONT DO DONT)
based on a TCP connection (server port n 23) Command: Do Suppress Go Ahead
optional negotiation mechanisms Command: Will Terminal Type
Command: Will Negotiate About Window Size
virtual terminal service Command: Will Terminal Speed...
no confidentiality (password in the clear. . . ) the server answers with replies (DO DONT WILL WONT)
Command: Do Terminal Type
Command: Will Suppress Go Ahead
Command: Dont Negotiate About Window Size
TELNET
8
TELNET
Command: Do Terminal Speed...
Client Server
3
4
tty
10
9 2 3 each end-point implements basic NVT functionality
1
0 1
0
tty 7
App.
App. 2
1 4
6
5
option negotiation for more sophisticated hosts
1 Pseudo tty
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Introduction Legacy applications Introduction
Contemporary applications Remote login Contemporary applications Remote login
Support applications File transfer Support applications File transfer
x
OpenSSH (native on BSDs, GNU/Linux, MacOSX, Cygwin. . . )
y Pseudo tty PuTTY (Windows and Unixes). . .
6
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Introduction Legacy applications Introduction
Contemporary applications Remote login Contemporary applications Remote login
Support applications File transfer Support applications File transfer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
The standard TCP/IP file transfer application (RFC 959) Two parallel TCP connections:
out-of-band signaling, two TCP connections control connection
permanent (created at the start of the FTP session)
interactive access full duplex, initiated by the client (server port n 21)
access control (but password in clear type) purely for exchanging requests and responses
requires interactivity (and reliability)
data transfer connection
TCP control connection
port 21 temporary (created for each file transfer)
FTP FTP
Server
full duplex, initiated by the server
Client
11
00 11
00
port 20
client port number communicated ahead of time
10 TCP data connection
send both files and lists of files/directories
FTP
user
Local Remote requires bandwidth (and reliability)
FS file
interface system released at the end of each file transfer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Introduction Legacy applications Introduction
Contemporary applications Remote login Contemporary applications Remote login
Support applications File transfer Support applications File transfer
Many ways to represent data (heterogeneous hosts): ASCII NVT encoding printable, so interactive is possible
file structures: Unix> telnet galion.ufr-info-p6.jussieu.fr 21
unstructured Trying 197.18.176.12...
record structure Connected to localhost.
page structure Escape character is ^].
220 ProFTPD 1.2.0pre10 Server (Debian) [galion.ufr-info-p6.jussieu.fr]
data types: help
ASCII (American Standard Code for Information Interchange) 214-The following commands are recognized (* =>s unimplemented).
EBCDIC (Extended Binary-Coded Decimal Interchange Code) 214-USER PASS ACCT* CWD XCWD CDUP XCUP SMNT*
binary 214-QUIT REIN* PORT PASV TYPE STRU* MODE* RETR
transmission modes: 214-STOR STOU* APPE ALLO* REST RNFR RNTO ABOR
214-DELE MDTM RMD XRMD MKD XMKD PWD XPWD
stream 214-SIZE LIST NLST SITE SYST STAT HELP NOOP
block 214 Direct comments to root@galion.ufr-info-p6.jussieu.fr.
compressed
verify the type of data being transferred Do not confuse the control commands with the ftp user interface ones
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
lightweight file transfer protocol (version 2: RFC 1350) [toto@hobbes]$ tftp calvin.lip6.fr
UDP datagrams sent to port 69 tftp> get config
Received 5220 bytes in 0.377 secs
opcode name description tftp> quit
1 RRQ Read request [toto@hobbes]$
2 WRQ Write request
5 messages:
3 DATA Data RRQ config0 octet 0
4 ACK Acknowledgement 2o No 1 Mo 1
ACK 0
5 ERREUR Error 2o 2o
...
DATA messages each contain 512 bytes (except the last one,
1111111111111
0000000000000
which is smaller or empty) DATA X
2o
0000000000000
1111111111111
2o 512o
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Introduction Legacy applications World Wide Web
Contemporary applications Remote login Contemporary applications Electronic mail
Support applications File transfer Support applications Peer-to-peer
1 Legacy applications
RCP: rcp
Introduction
A Berkeley r command (along with rlogin, rsh,. . . )
Remote login
the rcp client works with the rshd server
File transfer
idem rlogin: obsolete, security problems,. . .
Secure protocols: SCP, SFTP 2 Contemporary applications
scp: copies files like rcp, but encapsulated in SSH World Wide Web
sftp: like FTP, but easily encapsulated Electronic mail
SFTP is a new protocol (IETF IPSEC working group) Peer-to-peer
SFTP can work over SSH (the default for many sftp clients)
SFTP is not the same as FTPS, which secures connections
3 Support applications
with SSL/TLS (Secure Socket Layer/Transport Layer Security) Directory (DNS)
Network management
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
2Mbps
11 0
00 1 11 0
00 1
... ... ... ...
1
0
0
1 1
0
11
00 0
1
11
00
100 Mbps
0
1
... 10
0 0
1
... 10
0
11
00 1
... 11
00 1
...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
a blank line
body
end with a line containing only .
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
From: Olivier Fourmaux <olivier.fourmaux@lip6.fr> Machine only connects to the network sporadically?
Date: Wed, 20 Feb 2002 01:21:01 +0100
To: Toto <toto@free.fr> Messages stored on the last MTA (e.g., that of the ISP)
Subject: Document no 3.02
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb"
several possibilities:
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
direct server access (mount an NFS or SMB volume)
User-Agent: Mutt/1.2.5i POP
--/9DWx/yDrRhgMJTb IMAP
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline HTTP
Content-Transfer-Encoding: 8bit
--/9DWx/yDrRhgMJTb SMTP
Content-Type: application/pdf
Content-Disposition: attachment; filename="sujet-exam-RES.pdf"
?
Content-Transfer-Encoding: base64
?
JVBERi0xLjIKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURl
Y29kZT4+CnN0cmVhbQp4nO1dy7YdtRGd3684Mx6L07T63ZkBdghgXvYlJFlMHNsYm+sHhkCS...
Alices mail server Bobs mail server
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
POP3 IMAP4
Post Office Protocol Version 3 (RFC 1939) Internet Mail Access Protocol version 4 (RFC 2060)
simple complex
TCP connection on port 110 TCP connection on port 143
three states: same functionality as POP, with:
AUTHORIZATION (client identification) attribute-based access (12th e-mail from Alice)
TRANSACTION (client requests and server actions) partial message retrieval (3rd attachment)
UPDATE (server releases resources) synchronization of mailboxes
SMTP SMTP
POP 3 IMAP 4
UA UA
Alices mail server Bobs mail server Alices mail server Bobs mail server
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
1 Legacy applications 1
0
0
1
0
1
Introduction ... ... ...
Remote login
00
11
11
00
File transfer 00
11
2 Contemporary applications
World Wide Web 10
0 1
Electronic mail ... ...
Peer-to-peer
1
0
0
1
11
00
3 Support applications
Directory (DNS)
0
1
... 10
0
...
Network management 11
00 1
...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
anonymous storage 11
00
11
00
11
00
Freenet, Entropy... 1
0
0
1
11
00
audio/video streaming
Standards? 10
0 1
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Client_call(args) Peer_main_loop()
while (true)
Server_main_loop() await(event)
while (true) switch(event.type)
await(call) case timer_expire:
switch(call.procid) do_some_P2P_work()
case 0: call.ret=proc0(call.arg) randomize_timers()
case 1: call.ret=proc1(call.arg) case inbound_mesg:
... handle_mesg()
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application default: exception
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Peers send their lists of files to share A peer sends a search request
The server replies with a list of possible locations
napster.com
napster.com
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Pinging possible peers (searching for the best bandwidth) The peer obtains the file directly from its chosen peer
napster.com napster.com
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
AOL (Nullsoft)
too late: already more than 20K users. . . A
TTL=0 STOP!
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Gnutella: getting around firewalls (1) Gnutella: getting around firewalls (2)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Legacy applications World Wide Web Legacy applications World Wide Web
Contemporary applications Electronic mail Contemporary applications Electronic mail
Support applications Peer-to-peer Support applications Peer-to-peer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
DNS: gTLD (generic Top Level Domain) DNS: ccTLD (country code Top Level Domain)
gTLD intro. description operator ccTLD (ISO 3166) 240 countries and external territories
.aero 2001 Air-transport industry * SITA .ac Ascension Island
.asia 2006 Asia-Pacific region * Afilias .af Afghanistan
.biz 2001 Unrestricted NeuLevel .aq Antarctica (-60S)
.cat 2005 Catalan lingu. & cult.* Asso. puntCAT .eu European Union
.com/.net 1985 Unrestricted VeriSign .fr France
.coop 2001 Cooperative * DotCooperation .gf French Guiana
.edu 1985 (US) educational inst. * VeriSign .gp Guadeloupe
.gov 1985 US government * US Admin. .mq Martinique
.info/.org 01/85 Unrestricted Afilias .pf French Polynesia + Clipperton
.int 1988 Internat. organisations ICANN .pm Saint-Pierre and Miquelon
.job 2005 Human resrc. managment* Employ Media .re Reunion
.mil 1985 US military * US DoD NIC .tf TAAF
.mobi 2005 Mobile device use * Mobi JV .ru Russia (+.su)
.museum 2001 Museums * MuseDoma .tv Tuvalu
.name 2001 Individuals VeriSign .uk United Kingdom (+.gb)
.pro 2001 Professionals RegistryPro .us United States
.tel 2005 Internet Tel. serv.* Telnic Limited .za South Africa
.travel 2005 Travel industry* Tralliance Corp. .zw Zimbabwe
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Legacy applications
Directory (DNS) Directory (DNS)
Contemporary applications Contemporary applications
Network management Network management
Support applications Support applications
cs 0 237 255 int com edu gov mil org net jp us nl ...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
1 0
1 10
1 0
0 A: IP=198.237.57.24
110
1 1 0
0 1 10
Q: pc24.cs.keio.ac.jp ?
Q: pc24.cs.keio.ac.jp ? Q: pc24.cs.keio.ac.jp ? Q: pc24.cs.keio.ac.jp ?
2 8 Serveur 6 A: IP=198.237.57.24
DNS local 8 4 7
A: jp.= Q: pc24.cs.keio.ac.jp ?
200.3.28.7, Q: pc24.cs.keio.ac.jp ? A: IP=198.237.57.24
4 Q: pc24.cs.keio.ac.jp ?
55.120.18.2, A: ac.jp.= 6
... Q: pc24.cs.keio.ac.jp ?
77.181.1.1, 5
3 77.180.4.1, A: keio.ac.jp.= 9
... A: IP=198.237.57.24
A: keio.ac.jp.=
198.237.19.1, 3 198.237.19.1,
5 2
80.4.90.1, Serveur Serveur
... 80.4.90.1,
keio.ac.jp. Q: pc24.cs.keio.ac.jp ? ... keio.ac.jp.
7 198.237.19.1 198.237.19.1
Serveur racine Serveur DNS
80.3.7.6 Serveur ac.jp. entreprise 1
Serveur ac.jp.
Serveur jp. 77.180.4.1
200.3.28.7
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Legacy applications
Directory (DNS) Directory (DNS)
Contemporary applications Contemporary applications
Network management Network management
Support applications Support applications
DNS: structure of one query field DNS: structure of one answer field
0 15 16 bit 31 0 15 16 bit 31
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Legacy applications
Directory (DNS) Directory (DNS)
Contemporary applications Contemporary applications
Network management Network management
Support applications Support applications
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Legacy applications
Directory (DNS) Directory (DNS)
Contemporary applications Contemporary applications
Network management Network management
Support applications Support applications
equipment control
activating (interfaces...)
configuring (routing tables...) 10
0 1
centralized control ... ...
Constraints: 1
0
0
1
11
00
heterogeneous devices
routers, hubs, switches...
computers, printers, probes... 0
1
... 10
0
...
11
00 1
...
multiple constructors
remotely deployed devices
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
OBJECT ID. numeric identifier... system(1) interfaces(2) at(3) ip(4) icmp(5) tcp(6) udp(7) ...
SEQUENCE structure of named elements ... ... ... ... ... ... ...
SEQUENCE OF vector of identical elements
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Legacy applications
Directory (DNS) Directory (DNS)
Contemporary applications Contemporary applications
Network management Network management
Support applications Support applications
allows one to iterate through variables... enterprise: identifies the agents creator
get-next udpInDatagrams.0 udpNoPorts.0 = 0 OID starting with 1.3.6.1.4.1.
... and tables agent addr.: IP address of the agent
get-next udpTable 0 coldStart agent initialised
udpLocalAddress.0.0.0.0.53 = 0.0.0.0 1 warmStart agent reinitialised
get-next udpLocalAddress.0.0.0.0.53 2 linkDown interface disactivated
udpLocalAddress.0.0.0.0.161 = 0.0.0.0 trap type:
3 linkUp interface activated
get-next udpLocalAddress.0.0.0.0.161 ...
udpLocalPort.0.0.0.0.53 = 53 ... 6 entr. specific see the field code entr.
end of table when the name changes: code entr.: sub-code specific to the enterprise
get-next udpLocalPort.0.0.0.0.161 timestamp: number of hundredths of a second since the
snmpInPkts.0 = 12 agent started
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
OSI layer 6 (recommendation X.680 of the ITU) get message written in ASN.1:
properties: getRequest-PDU ::= [0]
universal information representation IMPLICIT SEQUENCE {
type associated with data request-id INTEGER,
designation by a unique identifier (OID) error-status INTEGER {
noError(0), tooBig(1),
BNF notation
noSuchName(2), badValue(3),
description of information exchanged over SNMP:
RFC1157-SNMP DEFINITIONS ::= BEGIN
readOnly(4), genErr(5), -- always 0
Message ::= SEQUENCE { }
version INTEGER {version-1(0)},
community OCTET STRING,
error-index INTEGER, -- always 0
data ANY variable-bindings SEQUENCE OF
}
PDUs ::= CHOICE { SEQUENCE {
get-request GetRequest-PDU, name ObjectName,
get-next-request GetNextRequest-PDU,
get-response GetResponse-PDU, value ObjectSyntax
set-request SetRequest-PDU, }
trap Trap-PDU
}... }
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Legacy applications
Directory (DNS) Directory (DNS)
Contemporary applications Contemporary applications
Network management Network management
Support applications Support applications
Remote MONitoring (RFC 2819 - STD 59) Printer MIB (RFC 1759 - RFC 3805)
Probe for obtaining statistics about an administered network
9 groups:
Ethernet statistics (21 attribute table)
network equipment (observed addresses...)
statistics matrix (between two stations) 274 objects (228 OIDs, including 16 tables)
frame capture
20 groups:
...
general group
many extensions input media group
RMON protocol identification (RFC 2895, 2896) output group
RMON for switched networks (SMON : RFC 2613) output dimensions group
interface management for RMON (IFTOPN : RFC 3144) cover table
RMON for DiffServ (DSMON: RFC 3287) ... marker supplies group
marker colorant group...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Legacy applications Legacy applications
Directory (DNS) Directory (DNS)
Contemporary applications Contemporary applications
Network management Network management
Support applications Support applications
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 2/5 : Application
Basic services Basic services
Reliable service Reliable service
Congestion control Congestion control
1 Basic services
Transport layer review
Computer Networks (ComNet) 3/5 : Transport Multplexing and demultiplexing
UDP: a connectionless mode protocol
2 Reliable service
Olivier Fourmaux (olivier.fourmaux@upmc.fr)
Principles of reliable data transfer
TCP: a connection oriented protocol
Version 6.3 TCP: reliability mechanisms
3 Congestion control
General principles
TCP mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
0
1
1
0
0
1 The transport layer allows two or more entities to directly
... ... ... communicate without having to take into account the various
11
00
00
11
network elements that are traversed:
00
11
virtual association between processes
end-to-end communications
1
0
00
1
abstract out the topology and the associated technologies
1
... present on end-hosts
...
sender: breaks down application layer messages and sends
00
11
11
00
them down to the network layer
receiver: reassembles network layer segments into messages
and sends them up to the application layer
11
00
00
11
... 1
0
00
1
... 2 models define the functionalities associated with each layer...
11
00 1
...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
Session protocol
TELNET FTP SMTP DNS
5 Session Session
IP
3 Network Network Network Network
Packet#
ARPANET SATNET radio LAN
2 Data link Data link Data link Data link
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
PASSIVE ACTIVE
Programming interface (applications or developers) ESTABLISHMENT ESTABLISHMENT
PENDING PENDING
examples of connection-oriented mode primitives:
LISTEN ESTABLISHED
Connect primitive Connection accepted
CONNECT executed TPDU received
SEND Disconnection request Disconnect primitive
TPDU received executed
RECEIVE PASSIVE ACTIVE
DISCONNECT DISCONNECT DISCONNECT
PENDING PENDING
IDLE
Disconnect Disconnection request
primitive executed TPDU received
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
(c)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
Application-level processes transmit their data to the system via Association of a socket with a port number
sockets: multiplexing is the mixing of these data.
identifying the DatagramSocket: (@IPdest, numPortDest)
mux (at the sender): receiving a datagram at a host:
add a header to each block of data at a socket verify its numPortDest
collect data from several sockets send to the socket corresponding to numPortDest
demux (at the receiver): @IPsource, numPortSource
provide the data to the correct socket A B C
A B C P1 P3 P2
P1 P2 P4 P3
111
000 111
000
000
111 000
111
000
111 000
111
DA:@B DP : 1201 DP : 1201 DA:@B
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
P1 P4 P2 P3
Transport
Transport layer TSAP 1522 TSAP1836
connection
SP : 1417 1111
0000
@C>@B
0000
1111
DP : 80
0000
1111
0000
1111 Data link
SP : 3012 0000
1111 layer
@A>@B
1111
0000
0000
1111
DP : 80
0000
1111
0000
1111 11111
00000
@C>@B
00000
11111 Physical
00000
11111
00000
11111
layer
00000
11111
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
1 Basic services 0
1
1
0
0
1
Transport layer review ... ... ...
Multplexing and demultiplexing
11
00
00
11
UDP: a connectionless mode protocol 00
11
2 Reliable service
Principles of reliable data transfer 10
0 1
DATA
TCP: a connection oriented protocol ... ...
TCP: reliability mechanisms
1
0
0
1
11
00
3 Congestion control
General principles ... ...
0
1 10
0
TCP mechanisms 11
00 1
...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
2 lignes (8 octets)
User Datagram Protocol [RFC 768] Source port Destination port
basic, unembellished, Internet transport protocol
Datagram length Checksum
best effort service:
datagrams in transit can. . .
be lost
Message
be duplicated
arrive out of order
(application data)
unconnected service:
no initial exchange
no state information at the end-hosts
each datagram is handled independently
1st bit last bit
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
2 lignes (8 octets)
2 lignes (8 octets)
Source port Destination port Source port Destination port
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
16 bits
32 bits (4 octets)
error control optional
2 lignes (8 octets)
32 bits (4 octets)
Source port Destination port
sender:
2 lignes (8 octets)
Source port Destination port
Datagram length Checksum add a pseudo-header
Datagram length Checksum
checksuma =
P
word16bits
receiver:
Data Data add a pseudo-header
P
recalculate the word16bits
00000000 Protocol Datagram Length = 0: no error detected
16 bits (64 KB maximum) still possible...
IP source address 6= 0: error (silently
total length, with the data, expressed in bytes destroyed)
IP destination address
a
Binary sum over 16 bits, carrying the
overflow
to the least significant bit
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Transport layer review
Reliable service Multplexing and demultiplexing Reliable service Multplexing and demultiplexing
Congestion control UDP: a connectionless mode protocol Congestion control UDP: a connectionless mode protocol
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Transport layer review Basic services Principles of reliable data transfer
Reliable service Multplexing and demultiplexing Reliable service TCP: a connection oriented protocol
Congestion control UDP: a connectionless mode protocol Congestion control TCP: reliability mechanisms
#include <sys/types.h>
1 Basic services
#include <sys/socket.h>
Transport layer review
# Create a descriptor
int socket(int domain, int type, int protocol);
Multplexing and demultiplexing
#
#
domain : PF_INET for IPv4 Internet Protocols
type : SOCK_DGRAM Supports datagrams (connectionless, unreliable msg of a fixed max length)
UDP: a connectionless mode protocol
# protocol : UDP (/etc/protocols)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Transport layer and reliability (1) Transport layer and reliability (2)
Multilayer problem: application, transport and link layer Real channels are usually unreliable
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Well incrementally develop the reliable data transfer protocol Reliable transfer over a reliable channel
(RDT)
underlying channel perfectly reliable
consider only unidirectional data transfer no bit errors
control info flow on both directions no loss of packets
use finite state machines (FSM) to specify sender, receiver: separate FSMs for sender and receiver:
event causing state transition rdt_send(data) rdt_rcv(packet)
Wait for Wait for
actions taken on state transition
call from call from
above packet = make_pkt(data) below
state state udt_send(packet)
1 event
2
actions
sender receiver
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Reliable transfer during operation with no errors: Reliable transfer during error scenario:
rdt_send(data) rdt_send(data)
snkpkt = make_pkt(data, checksum) snkpkt = make_pkt(data, checksum)
udt_send(sndpkt) udt_send(sndpkt)
rdt_rcv(rcvpkt) && rdt_rcv(rcvpkt) &&
isNAK(rcvpkt) isNAK(rcvpkt)
Wait for call Wait for rdt_rcv(rcvpkt) && Wait for call Wait for rdt_rcv(rcvpkt) &&
from above ACK or udt_send(sndpkt) corrupt(rcvpkt) from above ACK or udt_send(sndpkt) corrupt(rcvpkt)
NAK NAK
udt_send(NAK) udt_send(NAK)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
rdt_send(data)
RDT 2.0 is a stop and wait protocol:
sndpkt = make_pkt(0, data, checksum)
sender sends one packet, then waits for receiver response udt_send(sndpkt) rdt_rcv(rcvpkt) &&
poor performance ( corrupt(rcvpkt) ||
Wait for call Wait for
ACK or NAK
isNAK(rcvpkt) )
RDT 2.0 has a fatal flaw! 0 from
0 udt_send(sndpkt)
above
What happens if ACK/NAK corrupted? rdt_rcv(rcvpkt)
rdt_rcv(rcvpkt)
&& notcorrupt(rcvpkt)
sender doesnt know what happened at receiver! && isACK(rcvpkt) && notcorrupt(rcvpkt)
retransmission alone not sufficient: possible duplicates && isACK(rcvpkt)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
sender receiver
ACK first packet bit transmitted, t = 0
last bit transmitted, t = L / R
Data Data
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
1 Basic services
Transport layer review
Multplexing and demultiplexing
UDP: a connectionless mode protocol
2 Reliable service
Principles of reliable data transfer
TCP: a connection oriented protocol
TCP: reliability mechanisms
3 Congestion control
General principles
TCP mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Sequence number
multiplexing at the source
Source port Destination port
partial socket identification
Hlen 111111
000000000000
111111 generally dynamically allocated
R
C
S
S
Y
I
000000
111111
U
A
P
R
S
F
000000
111111000000
111111 111111
000000
000000
111111
000000
111111
(clients)
G
K
H
T
N
N
000000
111111
000000
111111
R
C
S
S
Y
I
Checksum Urgent data ptr Hlen 000000
111111 Rcv window size port number space allocation:
U
A
P
R
S
F
000000
111111
000000
111111
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
000000
111111
000000
111111
R
C
S
S
Y
I
Hlen 000000
111111 Rcv window size
U
A
P
R
S
F
000000
111111 Acknowledgment number
000000
111111
destination listens on the port number the first byte of data
111111
000000
000000
111111
Checksum Urgent data ptr 000000
111111 implicit numbering of the
G
K
H
T
N
N
000000
111111
upon its creation 000000
111111
R
C
S
S
Y
I
Hlen 000000
111111 Rcv window size
following bytes
U
A
P
R
S
F
000000
111111
000000
111111
Options port negotiation or well-known Checksum Urgent data ptr loop after 4 GB
(reserved): loss detection
Unix> cat \etc\services|grep tcp telnet 23/tcp Options
ordering
tcpmux 1/tcp smtp 25/tcp
chargen 19/tcp gopher 70/tcp
ftp-data 20/tcp finger 79/tcp
ftp 21/tcp www 80/tcp
ssh 22/tcp .. kerberos 88/tcp ....
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
G
K
H
T
N
N
000000
111111
000000
111111
R
C
S
S
Y
I
Seq=4200 Hlen 000000
111111 Rcv window size
U
A
P
R
S
F
000000
111111
000000
111111 cumulative, indicating the first
200 Checksum Urgent data ptr non-received byte (other, higher
Seq=4400
sequence number, bytes might
200 Options have been received)
1st byte = 4400
last byte = 4599
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Sending a key stroke and server reply for display ACKs can be more rapid than the application
Host A Host B Host A Host B
Seq=80 Ack=210 Seq=80 Ack=210
the user type "a" ACK data="a" the user type "a" ACK data="a"
the server receive "a" Seq=210 Ack=81
Seq=210 Ack=81 the server receive "a"
ACK data="a" ... and return "a" ACK Seq=210 Ack=81
Seq=81 Ack=211 ACK data="a" ...and return "a"
Seq=81 Ack=211
ACK
ACK
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
waiting for two segments or max 500 ms 4 bits (15 possible values)
Host A Host B 32 bits (4 octets)
number of 32-bit words in the
Seq=21000 Ack=677
Source port Destination port TCP header
ACK 1000 octets
Seq=667 Ack=22000
Sequence number
necessary because the option
Seq=22000 Ack=677 ACK field is of variable length
ACK 1000 octets Acknowledgment number value of 5...
000000
111111
Seq=23000 Ack=677 111111
000000
000000
111111 no options
G
K
H
T
N
N
000000
111111
000000
111111
R
C
S
S
Y
I
Hlen 000000
111111 Rcv window size minimum TCP header
ACK 1000 octets
U
A
P
R
S
F
000000
111111
000000
111111
Seq=667 Ack=24000 length: 20 bytes
Seq=24000 Ack=677 ACK Checksum Urgent data ptr
... to 15
ACK 1000 octets
Seq=25000 Ack=677 10 words of options
Options
maximum 40 bytes of
ACK 1000 octets
Seq=667 Ack=26000 options
ACK maximum TCP header
length: 60 bytes
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Source port Destination port ACK: validity of the Source port Destination port 16 bits
acknowledgement number
min 5 lignes (min 20 octets)
G
K
H
T
N
N
000000
111111 000000
111111
000000
111111 flow control
R
C
S
S
Y
I
R
C
S
S
Y
I
000000
111111 Hlen 000000
111111 Rcv window size
U
A
P
R
S
F
000000
111111
U
A
P
R
S
F
000000
111111 000000
111111
000000
111111
RST: abrupt connection indicates the number of bytes
Checksum Urgent data ptr termination Checksum Urgent data ptr available in the receiver buffer
SYN: synchronisation during dimension the size of the
Options Options senders sliding window
connection opening
FIN: graceful connection
closure
U.E. ING
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
000000
111111
000000
111111
R
C
S
S
Y
I
Hlen 000000
111111 Rcv window size sender:
U
A
P
R
S
F
000000
111111
000000
111111
Acknowledgment number designates data for priority
Checksum Urgent data ptr ajout pseudo-header 000000
111111
111111
000000
000000
111111 treatment
G
K
H
T
N
N
P
checksum= word16bits 000000
111111
000000
111111
R
C
S
S
Y
I
Options Hlen 000000
111111 Rcv window size
U
A
P
R
S
F
000000
111111
receiver: 000000
111111 points to the end of the urgent
Data Checksum Urgent data ptr data
adds pseudo-header
recalculates
P
word16bits application-specific
00000000 Protocol Segment Lenght
= 0: Ok Options interpretation of these data
IP source address 6= 0: destruction and their role
IP destination address
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
000000
111111
000000
111111 N
R
C
S
S
Y
I
Hlen 000000
111111 Rcv window size WSIZE: scale window by a factor of 2 serveur: waits for a connection request
U
A
P
R
S
F
000000
111111
000000
111111
(T=3, L=3, V=N)
Checksum Urgent data ptr
SACK: request selective Closing the connection following the data exchange:
acknowledgement
Options (T=4,L=2, upon open) wait, or not, for remaining data to be sent
SACK: selective acknowledgement of n free the buffers
blocks (T=5, L=2 + 8n, 2n sequence
numbers) ...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Opening exchange, with three segments Initial exchange based on three segments
1 client server: TCP segment with the SYN flag Host A Host B
indicates the clients initial sequence number (ISN)
sending the SYN increments the future sequence number S=3000
no data SYN
2 server client: TCP segment with the SYN + ACK flags S=7000 A=3001
receipt of a SYN has incremented the acknowledgement number SYN + ACK
S=3001 A=7001
indicates the servers initial sequence number (ISN)
sending the SYN increments the future sequence number ACK 200
S=7001 A=3201
server buffer allocated ACK 300
3 client server: TCP segment with the ACK flag S=7301 A=3201
ACK 100
receipt of a SYN has incremented the acknowledgement number
may contain data
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
x + 1) CK =
Q=y , ACK = = y, A
S YN (SE (SEQ sends a TCP FIN segment
SYN
SYN sending the FIN increments the future sequence number
(SE
Q=
x,A
CK
3 the client receives the FIN segment
= y+
(SEQ = x
+ 1, 1) receipt of the FIN increments the sequence number
ACK = y +
1) sends a TCP ACK segment
closes the connection
(a) (b) set a timer
pictures from Tanenbaum (duplicate
A. S. Computer FINs)
Networks 3rd edition
closed RST
closed
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
LISTEN/ CLOSE/
CLOSE/
1 Basic services
SYN/SYN + ACK
LISTEN Transport layer review
SYN
RST/ SEND/SYN
SYN
Multplexing and demultiplexing
RCVD SENT
SYN/SYN + ACK (simultaneous open) UDP: a connectionless mode protocol
(Data transfer state)
ACK/
ESTABLISHED
SYN + ACK/ACK
2 Reliable service
CLOSE/FIN (Step 3 of the three-way handshake)
CLOSE/FIN FIN/ACK
Principles of reliable data transfer
(Active close) (Passive Close) TCP: a connection oriented protocol
FIN
WAIT 1
FIN/ACK
CLOSING
CLOSE
WAIT
TCP: reliability mechanisms
ACK/ ACK/ CLOSE/FIN
FIN
FIN + ACK/ACK
TIME LAST
3 Congestion control
WAIT 2
FIN/ACK
WAIT ACK
General principles
(Timeout/) TCP mechanisms
ACK/
CLOSED
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
TCP is a protocol for reliable transfer over the unreliable IP service RTT = Round Trip Time
base mechanisms: Estimating the retransmission timeout:
pipeline greater than the RTT... but RTT varies!
cumulative ACKs too small: unnecessary retransmissions
single retransmission timer too large: slow reaction to losses
retransmissions triggered by:
Estimating the RTT:
timeouts
duplicate ACKs RTTmeasured = (sending of a segment to reception of the
ACK)
furthermore... RTTmesured can vary rapidly smoothing
simplified TCP sender: RTT = RTTmesured + (1 )RTTold
no duplicate ACKs with typical = 1/8
no flow control
exponentially weighted moving average
no congestion control
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
300
Karns algorithm
250
do not take into account retransmitted packets and double the
RTO with each failure (exponential backoff)
200 persistence timer (avoid blockage)
send an acknowledgement with a window of 0
150
keep alive timer (verify that the other end-host is still there)
100
0 20 40 60 80 100 120 closing timer
temps (ACK)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
data received from the layer above Scenario with a lost ACK
creation of a segment with numSeq Host A Host B
numSeq is the number, in the data stream, of the segments S=4000 A=1100
first byte
ACK 200
start the timer if it is not already set S=1100 A=4200
RTO
the timer is for the oldest non-acknowledged segment ACK
timeout
retransmit the segment associated with the timer retrans. S=4000 A=1100
restart the timer ACK 200
S=1100 A=4200
acknowledgement received (ACK) ACK
if it acknowledges as-yet anacknowledged segments:
S=4200 A=1100
update the base of the transmission window (base emis)
ACK 50
restart the timer if waiting on other ACKs
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
RTO
S=1100 A=4400
ACK 200 ACK
S=1100 A=4400
ACK
S=4400 A=1100
S=4400 A=1100 ACK 200
ACK 200
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
data 2K S
Empty
Window size 2K
ACK = 2048 WIN = 2048
Application
does a 3K
Data Data Data Data write 2K SEQ = 2048
sent and sent but not not sent but not Full
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Principles of reliable data transfer Basic services Principles of reliable data transfer
Reliable service TCP: a connection oriented protocol Reliable service TCP: a connection oriented protocol
Congestion control TCP: reliability mechanisms Congestion control TCP: reliability mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
#include <sys/types.h>
#include <sys/socket.h>
1 Basic services
# create a descriptor and bind local IP and port
Transport layer review
int socket(int domain, int type, int protocol);
# domain : PF_INET for IPv4 Internet Protocols
Multplexing and demultiplexing
# type : SOCK_STREAM Provides sequenced, reliable, 2-way, connection-based byte streams. UDP: a connectionless mode protocol
# An out-of-band data transmission mechanism may be supported.
# protocol : TCP (/etc/protocols)
int bind(int s, struct sockaddr *my_addr, socklen_t addrlen);
2 Reliable service
# Server : passive queuing mode and connection acceptance
int listen(int s, int backlog);
Principles of reliable data transfer
int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
TCP: a connection oriented protocol
# Client : active connection
int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);
TCP: reliability mechanisms
# Send and receive data
int send(int s, const void *msg, size_t len, int flags); 3 Congestion control
int recv(int s, void *buf, size_t len, int flags);
General principles
# End : dealocate
int close(int s); TCP mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Basic services
General principles General principles
Reliable service Reliable service
TCP mechanisms TCP mechanisms
Congestion control Congestion control
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
B finite D
Application queue Application
Transport Transport
d_in C/2 d_in C/2
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Basic services
General principles General principles
Reliable service Reliable service
TCP mechanisms TCP mechanisms
Congestion control Congestion control
C/2
d_in (data)
d_in (data + retransmissions)
d_out
B D
d_out
d_in C/2
d in = d out (goodput)
retransmission cost
useful retransmissions: losses only 4 senders, 4 receivers
d in greater than d out 4 routers
useless retransmissions: late segments multi-hop paths
d in even greater than d out finite buffers
congestion cost:
much more traffic for a given d out
retransmission
duplications of useless segments What happens as d in grows?
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Two approaches:
congestion control by the network
C/2
TCP/IP ECN...)
explicit signalling of available bandwidth (ATM ABR,
TCP/IP RSVP + IntServ...)
d_in
congestion control at the end-systems (end-to-end)
no explicit signalling from the network
additional costs associated with congestion: inference based upon observations at the end-systems
when a packet is lost, all upstream capacity is wasted losses
delays
approach taken by TCP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Basic services
General principles General principles
Reliable service Reliable service
TCP mechanisms TCP mechanisms
Congestion control Congestion control
RTT
cwnd= 2 to 4 MSS
cwnd
dTCP = RTT when restarting (after a loss or
cwnd = varies dynamically with detected congestion inactivity)
MSS
congestion detection by the receiver: cwnd = 1 MSS (dinit = RTT )
timeout (RTO) then exponential growth until
triple duplicate ACK the first loss
3 mechanisms: double cwnd / RTT
AIMD implemented by:
Slow Start cwnd ++ / ACK
caution following timer expiry
MSS
dpotentiel RTT
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Basic services
General principles General principles
Reliable service Reliable service
TCP mechanisms TCP mechanisms
Congestion control Congestion control
16
14 TCP Reno
12
Duplicate ACKs are not as bad as timeouts
10 3 duplicate ACKs:
ssthresh
8
6
ssthresh indicate that the network continues to transmit segments
4 TCP Tahoe cwnd divided by 2
2 t (RTT) cwnd then grows linearly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 a timeout:
From exponential to linear growth indicates that the network is blocked
cwnd > old value of cwnd prior to the loss cwnd = 1 MSS
Slow Start (exponential growth)
implemented with a varying limit:
to ssthresh = cwnd/2 (linear growth)
ssthresh = cwndpriort ol oss /2
more precisely calculated over unacknowledged segments:
ssthresh = flightsize/2
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
Basic services Basic services
General principles General principles
Reliable service Reliable service
TCP mechanisms TCP mechanisms
Congestion control Congestion control
tcptahoe.seq
A trip to Nevada: 800.0000
tcptahoe.cwnd
TCP Tahoe 1988 700.0000
100.0000 100.0000
50.0000
0.0000 0.0000
t (s) t (s)
0.0000 2.0000 4.0000 6.0000 8.0000 0.0000 2.0000 4.0000 6.0000 8.0000
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 3/5 : Transport
The network layer The network layer
IPv4 addressing and control IPv4 addressing and control
Routing Routing
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer Background The network layer Background
IPv4 addressing and control TCP/IP integration IPv4 addressing and control TCP/IP integration
Routing IPv4 packet structure Routing IPv4 packet structure
Presentation protocol 1
6 Presentation Presentation M M ATM Router
X. 25
2 Data link Data link Data link Data link Packets travel individually
Router
and can take different routes
M
M
1 Physical Physical Physical Physical 2
Multiprotocol
Host
Host A Router Router Host B router
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
1
0
0
1
0
1
0
1
ATM ? Ethernet
Packet
(a)
0000000000011111
00000
11111111111
00000
11111 00
11
11
00
G1 G2 G3 G4
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer Background The network layer Background
IPv4 addressing and control TCP/IP integration IPv4 addressing and control TCP/IP integration
Routing IPv4 packet structure Routing IPv4 packet structure
Basic algorithms
IP interface is universal
Routing hierarchy
An interior gateway protocol: OSPF
An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer Background The network layer Background
IPv4 addressing and control TCP/IP integration IPv4 addressing and control TCP/IP integration
Routing IPv4 packet structure Routing IPv4 packet structure
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
1
0
0
1
min 5 lignes (min 20 octets)
0
1
0
1 Ver Hlen TOS Packet Length
D F
M F
Identifier 0
1 Frag. offset
0
1 0
1
0
1
0
1 1
0
D F
M F
Identifier 0
1
0
1 Frag. offset
TTL Protocol Header checksum 0
1
0
1
4 bits
IP source address TTL Protocol Header checksum
max 65 Koctets
Options
Options
Segment / datagram / ...
(transport data)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer Background The network layer Background
IPv4 addressing and control TCP/IP integration IPv4 addressing and control TCP/IP integration
Routing IPv4 packet structure Routing IPv4 packet structure
8 bits
32 bits (4 octets)
32 bits (4 octets) 3 bits for precedence
Ver Hlen TOS Packet Length (priority)
Ver Hlen TOS Packet Length 1
0
0
1 Routine
4 bits (max value: 15) 000:
D F
M F
min 5 lignes (min 20 octets)
0
1
0
1 Identifier 0
1 Frag. offset
D F
M F 0
1
Identifier 0
1
0
1 Frag. offset indicates the number of 0
1
0
1
001: Priority
0
1
0
1
32 bits lines in the IP header 010: Immediate
TTL Protocol Header checksum TTL Protocol Header checksum 011: Flash
mandatory because the
100: Flash override
IP source address option files is variable IP source address
110: Internetwork control
length (20 a 60 bytes)
IP destination address 111: Network control
IP destination address value from 5 (no option)
to 15 (10 lines of options: 3 bits for service
40 bytes) Options Delay
Options
Throughput
Reliability
(Cost)
not used... U.E. ING (DiffServ Byte)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
0
1
1
0
min 5 lignes (min 20 octets)
0
1
0
1
16 bits (64 Kbytes maximum) Ver Hlen TOS Packet Length
D F
M F
Identifier 0
1
0
1
0
1
Frag. offset 0
1
16 bits (loops every 64 K
0
1 1
0
D F
M F
Identifier 0
1
0
1 Frag. offset
TTL Protocol Header checksum expressed in bytes 0
1
0
1
meant to be a unique value for
IP source address the network must allow an TTL Protocol Header checksum
MTUa > 576 bytesb each packet
IP destination address IP source address for reassembling the fragments
a
MTU: Maximum Transmission Unit
b of the same packet
max 10 l.
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer Background The network layer Background
IPv4 addressing and control TCP/IP integration IPv4 addressing and control TCP/IP integration
Routing IPv4 packet structure Routing IPv4 packet structure
examples:
27 0 0 A B C D E 27 5 0 F G H 27 8 1 I J
Options 0x0000 full packet (offset=0)
0x2000 first fragment (offset=0) Header Header Header
0x20A0 middle fragment (offset=1280) (c)
0x00B0 last fragment (offset=1408)
Beware the offset use single bytes in this example taken from Tanenbaum A. S. Computer Networks 3rd edition
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
0
1 0
1
0
1
D F
M F
Identifier 0
1 Frag. offset unitial unit: seconds 0
1
0
1
0
1 Identifier 0
1
0
1
Frag. offset
0
1 0
1
maximum value set by the Unix> cat /etc/protocols
icmp 1 # internet control message protocol
TTL Protocol Header checksum sender (255, 128, 64...) TTL Protocol Header checksum ggp 3 # gateway-gateway protocol
ipencap 4 # IP encapsulated in IP
decremented in each router st 5 # ST datagram mode
IP source address IP source address tcp 6 # transmission control protocol
minimum 1 per routeur egp 8 # exterior gateway protocol
IP destination address number of hops IP destination address udp 17 # user datagram protocol
rdp 27 # "reliable datagram" protocol
max 255 seconds or hops iso-tp4 29 # ISO Transport Protocol class 4
xtp 36 # Xpress Tranfer Protocol
Options avoid loops Options idrp 45 # Inter-Domain Routing Protocol
rsvp 46 # Reservation Protocol
gre 47 # General Routing Encapsulation
ospf 89 # Open Shortest Path First IGP...
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer Background The network layer Background
IPv4 addressing and control TCP/IP integration IPv4 addressing and control TCP/IP integration
Routing IPv4 packet structure Routing IPv4 packet structure
32 bits (4 octets)
16 bits 32 bits (4 octets)
D F
M F
0
1 Identifier 0
1 Frag. offset
D F
M F
Identifier 0
1 Frag. offset 0
1
0
1 sender: 0
1
0
1
0
1
0
1
32 bits (IPv4 address)
checksuma =
P
TTL Protocol Header checksum word16bits TTL Protocol Header checksum
identifies the packet sender
receiver: IP source address
IP source address P
allows a message to be returned
recompute the word16bits
IP destination address = 0: no error detected (yet IP destination address to the sender (ICMP, UDP...)
still possible)
6= 0: error (silent discard) Options
Options
a
Binary sum over 16 bits with overflow
carried to the least significant bit
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
32 bits (4 octets)
32 bits (4 octets)
0 to 40 bytes (aligned on a 32
Ver Hlen TOS Packet Length bit boundary)
0
1
Ver Hlen TOS Packet Length
1
0 0
1 TLV value identical to TCPs
min 5 lignes (min 20 octets)
0
1 1
0
0
1
0
1 0
1
Identifier Frag. offset 0
1
D F
M F
0
1 Identifier 0
1 Frag. offset
0
1
0
1 32 bits (IPv4 address) 0
1
0
1
0
1 examples:
TTL Protocol Header checksum used for routing TTL Protocol Header checksum record route
indicates the network (or strict source routing
IP source address IP source address
network prefix) of the receiver loose source routing
IP destination address identifies the interface of the time stamps
IP destination address
receiver in its network security
Options ...
Options
examined by each router
To avoid!
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
B 10 Network Host
128.0.0.0 to Extracting the netId
191.255.255.255
132.227. 60.135 netId.hostId
192.0.0.0 to
C 110 Network Host 223.255.255.255
&& 255.255. 0. 0 && netmask
132.227. 0. 0 netId. 0. 0
224.0.0.0 to
D 1110 Multicast address 239.255.255.255
Extracting the hostId
240.0.0.0 to 132.227. 60.135 netId.hostId
E 11110 Reserved for future use 247.255.255.255
&& 0. 0.255.255 && !netmask
60.135 hostId
pictures from Tanenbaum A. S. Computer Networks 3rd edition
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
0.1
132.77.0.0/22
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
0
1
... 10
0
...
192.77.22.0/25 11
00 1
...
140.18.0.0\18
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
IPv4: NAT and IETF (RFC 1631) ComNet: course 4/5 outline
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
IPv4: ICMP (Internet Control Message Protocol, RFC 792) ICMP: echo
Encapsulated in IP packets (but belonging to layer 3) ICMP : Echo Request
Host
CiscoSystems
Cisco 7000 SERIES App
Cisco 7000 SERIES
Routeur CiscoSystems
Proto. Unreach.
Frag. Reass. Time Exceed
Port Unreach. Type Code Checksum Unused Data
Type Code Checksum Unused Data 11 0 (Time To Live Exceeded) IP Header
3 0 (Net Unreachable) IP Header 1 (Frag. Reass. Time Exceeded) + 64 bits
1 (Host Unreachable) + 64 bits 1 octet 1 4 2 (IHL * 4) + 8
2 (Protocol Unreachable)
3 (Port Unreachable) Message sent when the TTL or the reassembly time has expired
1 octet 1 4 2 (IHL * 4) + 8 the IP header and some transport layer information is returned
Message sent when the destination cannot be reached
the IP header and some transport layer information are @ source = initiator of the ICMP message
returned @ destination = @ source of the packet in question
@ source = originator of the ICMP message used by the traceroute command
@ destination = @ source of the packet in question
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
IPv4: RARP (Reverse Address Resol. Protocol, RFC 903) IPv4: BOOTP (BOOT Protocol, RFC 951 and 1542)
Inverse of the ARP protocol (broadcast networks)
obtaining an @ IP from a @ MAC on startup portable protocol, over UDP
diskless hosts (X terminals, printers,. . . ) query on port 68, reply on port 67
which IP addresses to use when none are known?
mobile hosts (laptops changing networks. . . )
broadcast @ IP (255.255.255.255)
use of a server (rarpd) default @ IP (0.0.0.0)
relating /etc/ethers and /etc/hosts allows a host to contact a server on another network
packet format identical to ARP via BOOTP relay agents
type Ethernet: 0x8035 many extensions (RFC 1533)
code 3 for an RARP request netmask
code 4 for an RARP reply list of routers in the subnet
autoconfiguration example: list of NTP servers
list of DNS name servers
new host starts an RARP exchange
list of print servers (LPD and others)
the host requests the netmask via ICMP hostname and domainname
the host requests its startup program from teh RARP server default TTL. . .
via tftp
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
IPv4: DHCP (Dynamic Host Config. Protocol, RFC 2131) IPv4: DHCP exchanges
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
The network layer CIDR addressing The network layer CIDR addressing
IPv4 addressing and control Control messages IPv4 addressing and control Control messages
Routing Related mechanisms Routing Related mechanisms
111
000 T1>T2 A>B
11
00 111
000 other VPN approaches at layer 2 (PPP. . . )
000
111 00
11 000
111
A>B A>B
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms
The network layer CIDR addressing The network layer
Routing hierarchy
IPv4 addressing and control Control messages IPv4 addressing and control
An interior gateway protocol: OSPF
Routing Related mechanisms Routing
An exterior gateway protocol : BGP
Connections
to outside
networks
Related mechanisms
3 Routing
Basic algorithms
Routing hierarchy
Corporate Security Inside Outside Firewall An interior gateway protocol: OSPF
network perimeter LAN LAN
An exterior gateway protocol : BGP
pictures from Tanenbaum A. S. Computer Networks 3rd edition
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
port port
111
000 11
00 11
00
00
11
000
111
000
111 00
11
00
11
00
11
00
11
1111
0000
00
11
000
111 00
11 0000
1111
0000000000000
1111111111111
Switching
000
111
000
111 00
11
00
11
00
11
11
00
00
11
000
111 matrix 00
11 00
11
00
11
000
111 00
11
000
111
000
111 00
11
00
11
CiscoSystemsCatalyst
Workgroup Switch
000
111 00
11 CiscoSystems
Cisco 7000SERIES
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Example of a table constructed from distance vectors Limits of distance vector routing
New estimated
Router delay from J
A B C D To A I H K Line
A 0 24 20 21 8 A These algorithms suffer from many problems:
B 12 36 31 28 20 A
C 25 18 19 36 28 I slow convergence
F G 40 27 8 24 20 H
E H D
E
risks of routing loops
14 7 30 22 17 I
F 23 20 19 40 30 I split horizon
G 18 31 6 31 18 H
H 17 20 0 19 12 H A=4 from E
I J K L
I21 0 14 22 10 I E
(a) J 9 11 7 10 0 C
A B
K 24 22 22 0 6 K A=infinite
L 29 33 9 9 15 K D
JA JI JH JK
delay delay delay delay
is is is is
New
routing
vectors sent for the routing tables entire network
8 10 12 6 table limited network size
for J
Vectors received from
J's four neighbors
(b)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
pictures from Tanenbaum A. S. Computer Networks 3rd edition
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
F G
summarize your local information CiscoSystems Cisco 7000SERIES
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Link state: building control packets Link state: broadcasting control packets
B 2 C Link State Packets Each router must receive messages from all other routers:
A B C D E F
4 3 Seq. Seq. Seq. Seq. Seq. Seq. reliable distribution is necessary
A D Age Age Age Age Age Age sequence numbers
1 6 B 4 A 4 B 2 C 3 A 5 B 6 age of the connection
5 7
E 5 C 2 D 3 F 7 C 1 D 7
information conveyed from router to router without changing
E 8 F F 6 E 1 F 8 E 8
message content
(a) (b)
Problem of consistancy while a change is being broadcast
pictures from Tanenbaum A. S. Computer Networks 3rd edition
Hierarchical system for large networks
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Wide area network organization: the Internet ASes (Autonomous Systems, RFC 1930)
AS "A" AS "D"
RIP 2
OSPF
"A" AS "C"
"D"
OSPF
"C" AS "B"
ISIS
AS "E"
AS "F" EIGRP
"B" RIP 2
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Provider Client
Telecom Telecom
operator "X" operator "Y" providers charge their clients
peers exchange traffic without charge
the contracts are secret!
Tier-1 providers are not anyones clients
11 tier-1s: L3 (Level(3), ex-Genuity/BBN), GBLX (Global
ISP "1" ISP "2"
Crossing), AT&T (Worldnet), NTT (ex-Verio), Quest,
Renater Sprint, Tata (ex-Teleglobe), Verizon (ex-UUnet), Savvis
(ex-MCI), TeliaSonera, Tinet (ex-Tiscali).
a network that can reach every other network on the Internet
without purchasing IP transit or paying settlements
Client Institution Enterprise CNRS University
large providers, who own their own physical global-scale
infrastructure
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
For a stub network (on the edge of the Internet): For transit networks:
Telecom
operator "X"
Telecom Telecom
operator "X" operator "Y"
ISP "1"
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
B D E B D E
G G
H H
AS X
AS Y
Version 2 (RFC 2328) incompatible with OSPF v1
Area 0 A
complex definition with several sub-protocols
B D E
hello: test neighbors and elect a designated router (LAN)
Area 1
base transfer: synchronisation
Area 3 F
C update: send the link states
acknowledgement: confirm updates
G request the link states: know the areas routers (NBMA)
H
encapsulation in IP packets (protocol 89)
use of multicast if available:
Exchanging announcements outside the AS 224.0.0.5: all routers of the network
inform regarding local accessibility 224.0.0.6: the designated routers
careful not to transform the network into a transit network
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
AS AS 7486
AS AS 7486
5511
5511
AS 947 AS 24
AS 947 AS 24
interior BGP
exterior BGP
interconnection between the border routers of an AS
interconnection between ASes by border routers
TCP connections on port 179, routed using the ASs IGP
BGP signaling over a direct TCP connection on port 179
full mesh
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
AS 8524 AS 26
Announcement = prefix + some attributes (not all) AS 947
135.207.0.0 /16 135.207.0.0 /16 135.207.0.0 /16
NH =12.125.33.9 NH =12.125.33.9 NH =80.132.50.7
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
MULTI EXIT DISC : when there are many exits from an AS LOCAL PREF : administrative preference
prefer the smaller value prefer the highest value
192.33.182.0 \24
(24, 947) MED=300
AS 7486
AS 7486
AS 743 AS 24
192.33.182.0 \24
192.33.182.0 \24
AS 947
AS 947 AS 24 192.33.182.0 \24 AS 9611
(24, 947) MED=200
192.33.182.0 \24 (24, 743, 947) LP=80 Priority
Priority
192.33.182.0 \24 (9611, 947) LP=50
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Basic algorithms Basic algorithms
The network layer The network layer
Routing hierarchy Routing hierarchy
IPv4 addressing and control IPv4 addressing and control
An interior gateway protocol: OSPF An interior gateway protocol: OSPF
Routing Routing
An exterior gateway protocol : BGP An exterior gateway protocol : BGP
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 4/5 : Network
Ethernet architecture Ethernet architecture
Point-to-point architecture Point-to-point architecture
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
Underlying technologies and OSI model OSI: the data link layer
Application protocol
7 Application Application The data link layer carries bits over a medium using a particular
APDU
Interface Interface transmission technique. The associated functions are:
Presentation protocol
6 Presentation Presentation framing and error control
sequencing, reliability, and flow control
5 Session
Session protocol
Session three technology types for the data link layer:
point-to-point
Transport protocol
multipoint without broadcast U.E. RTEL
4 Transport Transport
multipoint with broadcast (shared medium)
Router
Data link
Frames Packets protocol
here here
1 Physical Physical Physical Physical
Host A Router Router Host B
Transmission
line to a router
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
Ethernet architecture Ethernet architecture
Point-to-point architecture Point-to-point architecture
ere
Ground osph
Copper Insulating Braided Protective
wave Ion
core material outer
conductor
plastic
covering Ethernet ATM MPLS PPP
Sheath Jacket
Core
(glass)
OSI data link + physical layers layers underlying TCP/IP
Cladding Jacket
(glass) (plastic) Core Cladding
(a) (b)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
3 octets 3 octets
00:78:77:0A:91:84
h
00:10:A4:86:2D:0B Code Code
00
11
11
00 10
0 1 constructeur unique
00:20:ED:87:FD:E6
1: Diffusion ou multipoint
0: Adresse individuelle
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
ALOHA CSMA
University of Hawaii, 1970 Improvement over the random approach
datagram based radio network carrier sensing: CSMA (Carrier Sense Multiple Access)
random access protocol, completely decentralized wait before sending
if collision, retransmission after a random wait time collision detection: CSMA/CD (CSMA with Collision
User Detection) retransmissions
example with a mini frame size of 64 bytes
A T detection: 64 bytes at 10 Mbps = 512/107 = 51, 2sec
T prop. max: 2 * 2500m at 2.108 ms 1 = 25sec + 8 trepet
B Packet starts Packet almost
A B A B
at time 0 at B at -
C
(a) (b)
D
Noise burst gets
E back to A at 2
A B A B
Time
(c) Collision at (d)
time
picture from Tanenbaum A. S. Computer Networks 3rd edition
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
0
1
1
0 0
1
1
0
0
1 0
1
0
1 0
1
0
1 0
1
0
1 0
1
1
0 1
0
1111111111111
000000000000000000
11111 1111111111111
000000000000000000
11111
000000000000011111
00000 000000000000011111
00000
0
1 0
1
0
1 0
1
0
1
0
1
0
1
0
1
0
1
0
1
111111111111100000
11111 111111111111100000
11111
1111111111111
000000000000000000
11111 1111111111111
000000000000000000
11111
000000000000011111
111111111111100000
00000
11111 000000000000011111
111111111111100000
00000
11111
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Ethernet: 1000BaseT (Gigabit Ethernet, 1998) Ethernet: 10GBaseT (10Gigabit Ethernet, 2002)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
11
00
100m on OM3 MMF 11
00
00
11 1
0
11
00 1
0
1
0
11
00 1
0
11
00
11
00 C
1
0 11
00 1
0
1
0
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Broadcast @H (@IPB)?
2 octets 2 octets 1 1 2 octets Hlen octets Plen octets Hlen octets Plen octets
(ethernet=6)
(IP=4)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
0000000111
1111111000 00011111111
00000000
111
00000000
11111111 otherwise, send the frame on IF y forwarding
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Autonomous learning
table creation algorithm: multiple paths
1 table initially empty 4 backup path
2 upon frame reception, insertion into the table of: 4 autoconfiguration
1 its @LAN source 8 loops (duplicate frames)
2 its arrival interface spanning tree protocol (STP)
3 its arrival time
3 the entry remains valid for a limited time only
11
00
00
11
00
11 11
00 1
0 11
00 1
0 11
00
note: 00
11 00
11
00
11
0
1
0
1
00
11
00
11
0
1
0
1
00
11
00
11
if @LAN dest is not in the table then broadcast (copy to the 000000000000
1111
11111111 0000000000
1111111111 000000000000
1111 000
11111111 11100000000
11111111 00000000000
111
11111111 0000000000
1111111111
other interfaces, record + CMSA/CD)
such bridges are called: 11
00 11
00
00
11 00
11
00
11
1111111
0000000000
111 111
000
00
11
plug and play (no configuration required) 0000000111
1111111000 00011111111
00000000
111
00000000
11111111
transparent (they do not themselves have addresses)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
1111111111111
Catalyst
00000
11111 1111111111111
CiscoSystems
100 00000
11111 00
11 00
11
00
11 00
11
00
11 11
00 00
11 11
00
10 11
00 00
11 11
00 00
11
00
11 00
11 00
11 00
11
00
11 00
11
00
11
00
11
00
11
111111111111
00000000000000000
11111
00000
11111
00
11
00
11
00
11
111111111111
00000000000000000
11111
00000
11111
111111111111111111
00000 111111111111111111
00000
Workgroup Switch
00000000000011111
111111111111 00000000000011111
111111111111
Catalyst
00000 00000
CiscoSystems
0000000000000 0000000000000
100
1000 000000000000011111
111111111111100000
00000
11111 000000000000011111
111111111111100000
00000
11111
00
11
11
00
11
00 00
11
00
11
00
11 00
11
00
11 00
11
00
11
00
11
111111111111
00000000000000000
11111
00000000000011111
00000
00
11
1111111111111
000000000000000000
11111 11111111111100000
11111
000000000000011111
111111111111100000
00000
11111
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
11
00
00
11 11
00
00
11
11
00 00
11
00
11 11
00 00
11
00
11
00
11
00
11 00
11 00
11
00
11 00
11
00
11 00
11
00
11
00
11
000000000000
11111111111111111
00000 00
11
00
11
111111111111
00000000000000000
11111
00000000000011111
00000 00000000000011111
00000
00
11 00
11
1111111111111
000000000000000000
11111 11111111111100000
11111 1111111111111
000000000000000000
11111 11111111111100000
11111
000000000000011111
111111111111100000
00000
11111 000000000000011111
111111111111100000
00000
11111
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
802.1 Bridging
802.1g MAC distant bridging
802.3 802.5 802.11 802.15 802.16 LAN interconnection of LAN with WAN technologies
MAC MAC MAC MAC MAC
802.1h MAC Bridging of Ethernet V2 in IEEE 802 LAN
802.3 802.5 802.11 802.15 802.16
802.1q Virtual Bridged LAN...
PHY PHY PHY PHY PHY
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Adds a VLAN identifier to the frame: Evolution of the Ethernet frame structure: 1522 bytes max!
only 802.1q enabled equipment exchanges the new frames
VLANaware VLANaware Legacy Legacy
end domain core domain end domain PC possibility to identify 4096 VLANs
3 pirority bits
VLAN
aware VLANaware Switching done Legacy C
PC switch using tags frame VLAN protocol Pri F VLAN Identifier
picture from Tanenbaum A. S. Computer Networks 4rd edition ID (0x8100) I
picture from Tanenbaum A. S. Computer Networks 4rd edition
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
Network
Physical layer Network
Pkt Pkt
Bridge
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
technology technology
Ethernet architecture Ethernet architecture
hardware hardware
Point-to-point architecture Point-to-point architecture
IEEE standards IEEE standards
1 bit
delay
Ring
interface service zone: cell or BSS (Basic Service Set)
wireless stations
Unidirectional
base station or AP (Access Point) acting as an 802 bridge
ring
BSS
(a) (b) (c)
1 1 1
SD AC ED
(a)
AP
Bytes 1 1 1 2 or 6 2 or 6 No limit 4 1 1
Destination Source
SD AC FC Data Checksum ED FS
address address
Frame control
Access control
Ending delimiter
Frame status
...
Starting delimiter
(b)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
2 3 2 2 3
Data link
Frames Packets protocol
here here
10
0 1
Transmission
line to a router
... ...
various transmission units 1
0
0
1
11
00
bits, bytes, cells...
various neighboring layers
can have layers between this layer and the physical layer ... ...
0
1 10
0
can have multiple active elements (multiplexers, modems, 11
00 1
...
bridges, switches, routers, application gateways. . . )
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Most protocols from the data link layer are related to HDLC:
SDLC (Synchronous Data Link Control) from IBM for SNA
1 Ethernet architecture
technology ADCCP (Advance Data Communication Control Procedure)
hardware ANSI version of SDLC
IEEE standards HDLC (High-level Data Link Control) ISO version of SDLC
LAP (Link Access Procedure) ITU version of HDLC
LAP-B for X25
2 Point-to-point architecture
LAP-D for ISDN
HDLC LAP-F for Frame Relay ...
PPP: basic mechanisms
PPP (Point-to-Point Protocol) IETF standard
PPP: usages
These protocols function over a wide variety of physical media
that enable transmission of bits (or other signals) between two
hosts.
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
picture from Tanenbaum A. S. Computer Networks 3rd edition picture from Tanenbaum A. S. Computer Networks 3rd edition
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
PAP (Password Authentication Protocol, RFC 1334) CHAP (CHallenge Authentication Protocol, RFC 1334)
Once the connection is established and the LCP parameters After LCP negotiation and during communication
negotiated identity verification
identity verification PPP frame protocol field: 0xC223
protocol field of the PPP frame: 0xC023 the 2 endpoints share a secret key
cleartext transmission of the identifier and password 4 types of negotiation frames (Configure-Request,
4 types of negotiation frame (Configure-Request, Configure-Ack, Configure-Nak or Configure-Reject)
Configure-Ack, Configure-Nak ou Configure-Reject) format identical to LCP, value of the code field:
format identical to LCP, code value:
1: challenge (binary sequence sent):
1: authentication request:
1B (FieldLgth) bytes
1B (IdLgth) bytes 1B (PassLgth) bytes
FieldLgth binary sequence
IdLgth Identifier PassLgth Password
2: positive acknowledgement: 2: response (sequence returned encrypted with the key
1B (IdLgth) bytes 1B (CCLgth) bytes
certificate):
IdLgth Client message CCLgth encrypted binary sequence
3: negative acknowledgement (retransmission required): 3: success: the received encrypted sequence and the one
1B (IdLgth) bytes calculated locally are identical
IdLgth Client message 4: failure (retransmission necessary)
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
RADIUS (Remote Auth. Dial-In User Service, RFC 2865) RADIUS: message
Centralization of the information regarding a user: Connectionless service (UDP port 1812)
AAA functions: Authentication, Authorization, and reliability handled at the application layer
Accounting 0 7 16 bit 31
code identifier length
identity verification
authentifier
knowing ones rights and access configuration
format: digest = MD5(code+id.+lgth.+auth req+param+secret)
tracking the users actions
client/server model parameters
client can connect to different access points of an ISP
client: access point of an ISP (PPP endpoint, or other proto.) typical exchange:
server: supports a database of ISP users Access-Request client message
username, encrypted password
Serveur RADIUS
IP address of the access point, UDP port
CHAP FAI session type (PPP, rlogin, telnet...)
PPPoA PAP
10
10 PPP Access-Accept RADIUS server resonse
11
00
00
11 list of session attributes (address, servers. . . )
11
00 ADSL RTC
10 Access-Reject RADIUS server response
the user is not in the database, or does not have access rights
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
D F
M F
Identifier 00
11 Frag. offset
Nagles algorithm 00
11
00
11
large headers TTL Protocol Header checksum
example:
trame 1 (A>B) IP source address
0000 45 00 IP destination address
0010 00 29 b5 8e 40 00 40 06 0f 78 84 e3 3d 7a cb 10
0020 ea 14 81 cf 00 15 52 40 18 64 52 65 10 0d 50 18 Source port Destination port
0030 ff ff bb 7b 00 00 64
Sequence number
trame 2 (A>B)
0000 45 00 1111111
0000000
Acknowledgment number
0000000
1111111
G
K
H
T
N
N
0010 00 28 b5 8f 40 00 40 06 0d be 84 e3 3d 7a cb 10 Hlen1111111
0000000
0000000
1111111 Rcv window size
R
C
S
S
Y
I
0000000
1111111
0000000
1111111
U
A
P
R
S
F
0020 ea 14 81 cf 00 15 52 40 18 65 52 65 10 0e 50 10
0030 ff ff aa 5f 00 00
Checksum Urgent data ptr
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
002D|S+2 S=15
S=17 2 Point-to-point architecture
002D|S+3 HDLC
rejet
RTO PPP: basic mechanisms
checksum TCP
non valide PPP: usages
002F| S=12......
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
SNAP/LLC
Telecom operators last mile is usually ATM Destination SAP (0xFE)
VCMUX Source SAP (0xFE) LLC header
Use of AAL 5 ATM connections
Protocol Identifier Frame Type = UI (0x03)
no more HDLC framing (8 or 16 bits) NLPID = PPP (0xCF)
adaptation of CPCS PDU AAL 5 frames ... Protocol Identifier
padding (multiples of 48 bytes) PPP information field PPP payload (8 or 16 bits)
two RFC 1483 encapsulations: ... ...
VC-multiplexed PPP PAD ( 0 - 47 bytes) PPP information field PPP payload
the endpoints know that they are transporting PPP CPCS-UU (1 byte) ...
CPI (1 byte) PAD ( 0 - 47 bytes)
LLC encapsulated PPP
Length (2 bytes) CPCS-PDU CPCS-UU (1 byte)
protocol identification for each PDU CRC (4 bytes) Trailer CPI (1 byte)
Length (2 bytes) CPCS-PDU
CRC (4 bytes) Trailer
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
ISP
000
111 Server
000
111
aggregation routers (high density of PPP terminations) 000
111 modem DSL
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Drawbacks:
LAN technology subject to broadcast bursts Telephone Company
HDLC HDLC
Ethernet architecture Ethernet architecture
PPP: basic mechanisms PPP: basic mechanisms
Point-to-point architecture Point-to-point architecture
PPP: usages PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers
HDLC
Ethernet architecture
PPP: basic mechanisms
Point-to-point architecture
PPP: usages
Olivier Fourmaux (olivier.fourmaux@upmc.fr) Computer Networks (ComNet) 5/5 : Data link and physical layers