Sie sind auf Seite 1von 47

Logo

Capa de Transporte
Tecnologa y detalle de operacin TCP/UDP

Fredy Campos A.
f.campos@ieee.org

Carrera Profesional de Ingeniera Electrnica y


Telecomunicaciones
Universidad Nacional Tecnolgica de Lima Sur (UNTELS)

2015
Objetivos
Revisar de los protocolos de transporte del modelo TCP/IP.
Revisar los fundamentos de operacin del nivel de
transporte con nfasis en TCP.

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 2


Contenido
Repasando la Suite TCP/IP
El nivel de transporte
Protocolo TCP
Protocolo UDP

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 3


Repasando la suite TCP/IP (1)
Protocolos

Transport

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 4


Repasando la suite TCP/IP (2)
Funciones nivel de transporte

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 5


El nivel de transporte (2)
Introduccin
Procesa los datos de la red para ser utilizadas por las
aplicaciones.

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 6


El nivel de transporte (3)
Confiable vs. Best-Effort

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 7


El nivel de transporte (4)
Servicio confiable

Sender Receiver
Synchronize

Acknowledge,Synchronize

Acknowledge

ConnectionEstablished
ConnectionEstablished

DataTransfer
(SendSegments)

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 8


El nivel de transporte (5)
TCP y UDP

TransmissionControl Orientadoa
Application Protocol(TCP) conexin

Transport UserDatagram Noorientadoa


Protocol(UDP) conexin
Internet

DataLink

Physical

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 9


El nivel de transporte (6)
Mapeo de L4 en L3

Transport TCP UDP


Layer
6 17 Protocol
Internet Numbers
IP
Layer

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 10


El nivel de transporte (7)
Mapeo de L4 en L3

Protocol Protocol Number


ICMP 1
IP in IP (tunneling) 4
IGRP 9
EIGRP 88
OSPF 89
IPv6 41
GRE 47
Layer 2 tunnel (L2TP) 115

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 11


El nivel de transporte (8)
Mapeo de Aplicaciones en L4

F T S D T S R
T E M N F N I
Application P
Layer
P L T S T M
N P P P
E
T

21 23 25 53 69 161 520 Port


Transport Numbers
Layer TCP UDP

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 12


El nivel de transporte (9)
Multiplexado de aplicaciones

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 13


El nivel de transporte (10)
Multiplexado de aplicaciones

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 14


El nivel de transporte (11)
Multiplexado de aplicaciones

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 15


Agenda

Repasando la Suite TCP/IP


El nivel de transporte
Protocolo TCP
Protocolo UDP

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 16


Protocolo TCP (1)
Caractersticas

Header TCP

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 17


Protocolo TCP (2)
Evolucin del header TCP

Definido en RFC 793, Sep1981 Definido en RFC3168 (Sep2001), RFC3540(Jun2003)


URG: Urgent Pointer field significant Llamado ECN (Explicit Congestion Notification)
ACK: Acknowledgment field significant NS: Nonce Sum
PSH: Push Function CWR: Congestion Window Reduced
RST: Reset the connection ECE: ECN-Echo
SYN: Synchronize sequence numbers Referencia:http://www.networksorcery.com/enp/rfc/rfc3168.txt
FIN: No more data from sender Referencia:http://www.networksorcery.com/enp/rfc/rfc3540.txt
Referencia:http://www.networksorcery.com/enp/rfc/rfc793.txt

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 18


Protocolo TCP (3)
Nmero de puertos

Source Destination

Port Port

TelnetZ
HostA HostZ

SP DP Destinationport=23.
1028 23 Sendpackettomy
Telnet
application.

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 19


Protocolo TCP (4)
Nmero de puertos

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 20


Protocolo TCP (5)
Three Way Handshake/Open Connection
HostA HostB

SendSYN
1 (seq=100ctl=SYN)
SYNreceived

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 21


Protocolo TCP (6)
Three Way Handshake/Open Connection
HostA HostB

SendSYN
1 (seq=100ctl=SYN)
SYNreceived

SendSYN,ACK 2
SYNreceived (seq=300ack=101ctl=syn,ack)

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 22


Protocolo TCP (7)
Three Way Handshake/Open Connection
HostA HostB

SendSYN
1 (seq=100ctl=SYN)
SYNreceived

SendSYN,ACK 2
SYNreceived (seq=300ack=101ctl=syn,ack)

Established
3 (seq=101ack=301ctl=ack)

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 23


Protocolo TCP (8)
Idea for Opening & Closing Connection

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 24


Protocolo TCP (9)
Process for Opening & Closing Connection

Closing Connection
Opening Connection

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 25


Protocolo TCP (10)
Simple Acknowledgment
Sender Receiver
Send1
Receive1

Window size = 1
2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 26
Protocolo TCP (11)
Simple Acknowledgment
Sender Receiver
Send1
Receive1
SendACK2
ReceiveACK2

Window size = 1
2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 27
Protocolo TCP (12)
Simple Acknowledgment
Sender Receiver
Send1
Receive1
SendACK2
ReceiveACK2
Send2
Receive2

Window size = 1
2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 28
Protocolo TCP (13)
Simple Acknowledgment
Sender Receiver
Send1
Receive1
SendACK2
ReceiveACK2
Send2
Receive2
SendACK3
ReceiveACK3

Window size = 1
2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 29
Protocolo TCP (14)
Simple Acknowledgment
Sender Receiver
Send1
Receive1
SendACK2
ReceiveACK2
Send2
Receive2
SendACK3
ReceiveACK3
Send3
Receive3

Window size = 1
2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 30
Protocolo TCP (15)
Simple Acknowledgment
Sender Receiver
Send1
Receive1
SendACK2
ReceiveACK2
Send2
Receive2
SendACK3
ReceiveACK3
Send3
Receive3

ReceiveACK4 SendACK4

Window size = 1
2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 31
Protocolo TCP (16)
Sequence and Acknowledgment numbers

Source Dest. Sequence Acknowledgement



Port Port # #

Ijust
sent#11. Ijustgot#10,
nowIneed#11.
Source Dest Seq. Ack.

1028 23 10
10 1

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 32


Protocolo TCP (17)
Sequence and Acknowledgment numbers

Source Dest. Sequence Acknowledgement



Port Port # #

Ijust
sent#11. Ijustgot#10,
nowIneed#11.
Source Dest Seq. Ack.

1028 23 10
10 1 Source Dest Seq. Ack.

23 1028 1 11
11

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 33


Protocolo TCP (18)
Sequence and Acknowledgment numbers

Source Dest. Sequence Acknowledgement



Port Port # #

Ijust
sent#11. Ijustgot#10,
nowIneed#11.
Source Dest Seq. Ack.

1028 23 10
10 1 Source Dest Seq. Ack.

Source Dest Seq. Ack. 23 1028 1 11


11

1028 23 11
11 2

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 34


Protocolo TCP (19)
Sequence and Acknowledgment numbers

Source Dest. Sequence Acknowledgement



Port Port # #

Ijust
sent#11. Ijustgot#10,
nowIneed#11.
Source Dest Seq. Ack.

1028 23 10
10 1 Source Dest Seq. Ack.

Source Dest Seq. Ack. 23 1028 1 11


11

1028 23 11
11 2 Source Dest Seq. Ack.

23 1028 101 12
12

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 35


Protocolo TCP (20)
Windowing - Idea

Window size=1
Sending machine waits for an
acknowledgment for each data
segment it transmits before
transmitting another.

Window size=3
its allowed to transmit three
data segments before an
acknowledgment is received.

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 36


Protocolo TCP (21)
Windowing - Concepto
Se define por el tamao de la ventana (window)
Window
Cantidad de segmentos (medido en bytes) que la mquina
origen puede enviar sin recibir un reconocimiento de la
mquina destino
Usado para establecer un control de flujo
Tipos:
Fijo, Fixed windowing: Establece un tamao fijo a la ventana
TCP usada
Variable, Sliding windowing: Establece un tamao variable que
se negocia al inicio de la conexin y puede cambiar durante la
sesin TCP

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 37


Protocolo TCP (22)
Windowing & Flow Control

3072

A SEQ 1024

Buffering
B
SEQ 2048

SEQ 3072

CPU Busy
0
7 3 Win
30
Ack

Windows
Update

Waiting 2
in 307
3 073 W
Ack
Data segment=1000 bytes

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 38


Protocolo TCP (23)
Envo confiable sin errores

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 39


Protocolo TCP (24)
Envo confiable con errores

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 40


Protocolo TCP (25)
Envo confiable y windowing

Sender Receiver

Windowsize=3
Send1

Windowsize=3
Send2
Windowsize=3
Send3 Packet3is
ACK3
Windowsize=2 Dropped
Windowsize=3
Send3
Windowsize=3
Send4
ACK5
Windowsize=2

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 41


Protocolo UDP (1)
Caractersticas
Connectionless transport protocol in the TCP/IP and OSI models
Simple protocol that exchanges datagrams, without
acknowledgments or guaranteed delivery.
Error processing and retransmission must be handled by higher layer
protocols
Provide best-effort delivery
Designed for applications that do not need to put sequences of
segments together
TFTP (Trivial File Transfer Protocol)
SNMP (Simple Network Management Protocol)
DHCP (Dynamic Host Control Protocol)
DNS (Domain Name System)

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 42


Protocolo UDP (2)
Header

Bit0 Bit15 Bit16 Bit31

SourcePort(16bits) DestinationPort(16bits)
8
Bytes
Length(16bits) Checksum(16bits)

Data(ifAny)

No sequence or acknowledgment fields

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 43


Protocolo UDP (3)
Comparacin funcional con TCP

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 44


Conclusiones

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 45


Bibliografa

Cisco Networking Academy Program : CCNA 1 and 2


Companion Guide, Cisco Press, 3th Edition, 2005
Stallings, William. Data and Computer Communications, 8th
Edition, Prentice Hall, 2009
Stephen McQuerry. Interconnecting Cisco Network Devices,
Part 1 (ICND1), 2nd Edition, Cisco Press, 2008

2015 | Fredy Campos | f.campos@ieee.org Capa de Transporte - Tecnologa y detalle TCP/UDP 46


Fredy Campos A.
f.campos@ieee.org

Carrera Profesional de Ingeniera Electrnica y Telecomunicaciones


Universidad Nacional Tecnolgica de Lima Sur (UNTELS)

2015 | Fredy Campos | f.campos@ieee.org Capa de enlace y redes LAN - Desafos y switch - P3 47