MAPA DE VALORES DE TERRENOS POR ZONAS ... del... n n أ¦ n أ¦ n n n n أ¦ n أ¦ أ¦ n n أ¦ n n أ¦ n n أ¦
TCPIP_Aplicación
-
Upload
mercedes-zegarra -
Category
Documents
-
view
110 -
download
0
Transcript of TCPIP_Aplicación
![Page 1: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/1.jpg)
© 2007 Cisco Systems, Inc. Todos los derechos reservados. Cisco Public 1
Protocolos y funcionalidad de la capa de Aplicación
Modificado por: Ing. Emerson Carranza Milla
![Page 2: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/2.jpg)
Funcionalidad de la Capa de Aplicación y Protocolos
![Page 3: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/3.jpg)
Introducción
Para los profesionales de redes es importante conocer cómo una aplicación puede formatear, transmitir e interpretar mensajes que se envían y reciben a través de la red.
La visualización de los mecanismos que permiten la comunicación a través de la red se hace más sencilla si utilizamos el marco en capas del modelo Interconexión de sistema abierto (OSI).
En este capítulo, se enfatiza el rol de la capa de Aplicación y sus componentes: aplicaciones, servicios y protocolos.
![Page 4: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/4.jpg)
ObjetivosEn este capítulo se aprenderá a: Describir cómo las funciones de las tres capas superiores del modelo OSI proporcionan
servicios de red a las aplicaciones de usuario final. Describir cómo los protocolos de la capa de aplicación TCP/IP proporcionan los servicios
especificados por las capas superiores del modelo OSI. Definir cómo la gente utiliza la capa de aplicación para comunicarse a través de la red de
información. Describir la función de las conocidas aplicaciones TCP/IP, como la World Wide Web y el correo
electrónico, y sus servicios relacionados (HTTP, DNS, SMB, DHCP, SMTP/POP y Telnet). Describir los procesos para compartir archivos que utilizan las aplicaciones entre pares y el
protocolo Gnutella. Explicar cómo los protocolos garantizan que los servicios que se ejecutan en una clase de
dispositivo puedan enviar y recibir datos desde y hacia muchos dispositivos de red diferentes. Utilizar herramientas de análisis de red para examinar y explicar cómo funcionan las
aplicaciones comunes de usuarios.
![Page 5: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/5.jpg)
Aplicaciones: Interfaces entre las Redes
![Page 6: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/6.jpg)
Capa de Aplicación: Modelo OSI y TCP/IP
En este modelo, la información se pasa de una capa a otra, comenzando en la capa de Aplicación en el host de transmisión, siguiendo por la jerarquía hacia la capa Física, pasando por el canal de comunicaciones al host de destino, donde la información vuelve a la jerarquía y termina en la capa de Aplicación
![Page 7: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/7.jpg)
7
Los protocolos e la capa de aplicación son utilizados para intercambiar los datos entre programas que se ejecutan en los hosts origen y destino.
Existen muchos protocolos de la capa de aplicación y nuevos protocolos están siempre en desarrollo.
HTTP (www)
HTTP HTTP
Capa de Aplicación: Modelos OSI y TCP/IP
![Page 8: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/8.jpg)
8
Capa de Aplicación: Modelos OSI y TCP/IP
La funcionalidad de los protocolos de la capa de aplicación TCP/IP caben dentro del marco de las tres capas superiores del modelo OSI: Aplicación, Presentación y Sesión.
Inicialmente, los protocolos de la capa de aplicación TCP/IP fueron desarrollados antes de la aparición de: computadoras personales, interfaces gráficas de usuario y objetos multimedia.
Estos protocolos implementaron muy poco de la funcionalidad que es especificada en las capas de sesión y persentación del modelo OSI.
![Page 9: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/9.jpg)
9
La Capa de Presentación
La capa de presentación tiene tres funciones principales: Codificación y conversión de la data de la capa de aplicación para
asegurar que los datos del dispositivo origen puedan ser interpretados por el dispositivo destino.
Encriptación de la data a ser transmitida y desencriptación al ser recibida por el dispositivo destino.
Formatos de compresión y codificación: Graphics Interchange Format (GIF) Joint Photographic Experts Group (JPEG) Tagged Image File Format (TIFF).
![Page 10: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/10.jpg)
10
La Capa de Sesión
Crea y mantiene diálogos entre aplicaciones origen y destino. Maneja el intercambio de información, para:
Iniciar diálogos Mantenerlos activos Reiniciar sesiones que se interrumpen o desactivan durante un largo
período de tiempo La mayoría de las aplicaciones, similares a web browsers o clientes e-mail,
incorporan funcionalidad de las capas 5, 6 y 7 del modelo OSI.
![Page 11: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/11.jpg)
11
Nivel de Aplicación: Modelos OSI y TCP/IP
Protocolos Comunes TCP/IP Domain Name Service Protocol (DNS): es utilizado para resolver nombres Internet
a direcciones IP. Hypertext Transfer Protocol (HTTP): es utilizado para tranferencia de archivos que
componen las páginas web de la World Wide Web. Simple Mail Transfer Protocol (SMTP): es utilizado para la transferencia de
mensajes y archivos adjuntos. Telnet: protocolo de emulación de terminal, es utilizado para proveer acceso remoto
a servidores y dispositivos de red. File Transfer Protocol (FTP): es utilizado para transferencia interactiva de archivos
entre sistemas.
Nota: Normalmente, un único servidor puede funcionar como un servidor para múltiples aplicaciones
![Page 12: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/12.jpg)
12
Petición de Comenntarios (RFCs: Request for Comments)
Los protocolos de la suite TCP/IP están generalmente definidas por Requests for Comments (RFCs). Mantenidos por IETF (Internet Engineering Task Force) Existen unos cuantos para entretenerse en:
ftp://ftp.rfc-editor.org/in-notes/rfc1882.txt.
![Page 13: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/13.jpg)
13
Software de la capa de Aplicación
Aplicaciones reconocidas por la red Son programas de software que utiliza la gente para comunicarse a través de la red. Estas aplicaciones de usuario final implementan los protocolos de la capa de
aplicación y pueden comunicarse directamente con las capas inferiores del stack de protocolos.
Ejemplos: Los clientes de correo electrónico y los exploradores Web.
Aplicaciones de usuario
Servicios
Operaciones del sistema
En la capa de aplicación, existen 2 formas de programas de software o procesos que proveen acceso a la red: Aplicaciones Servicios
![Page 14: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/14.jpg)
14
Software de la capa de Aplicación
Servicios de la capa de aplicación Otros programas pueden necesitar la ayuda de los servicios de la capa de Aplicación
para utilizar los recursos de la red, tales como: transferencia de archivos o cola de impresión en red.
Estos servicios son los programas que se comunican con la red y preparan los datos para la transferencia.
Aplicaciones de usuario
Servicios
Operaciones del sistema
![Page 15: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/15.jpg)
15
Software de la capa de Aplicación
La capa de Aplicación utiliza protocolos que son implementados dentro de las aplicaciones y servicios. Aplicaciones: proveen al usuario una forma de crear mensajes. Servicios: establecen una interfaz a la red. Protocolos: proveen las reglas y formatos que gobiernan el modo en que los
datos son tratados.
Cuando se discute la aplicación "Telnet" se puede hacer referencia a la aplicación, al servicio o al protocolo.
![Page 16: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/16.jpg)
Aplicaciones del Usuario, Servicios y Protocolos de la Capa de Aplicación
Los protocolos de la capa de aplicación especifican: Los mensajes que se intercambian entre los host origen y destino Sintaxis de los comandos de control Tipo y formato de los datos que se transmiten Métodos adecuados para notificación y recuperación de errores. 16
![Page 17: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/17.jpg)
17
Funciones del Protocolo de la Capa de Aplicación
Los protocolos de la capa de aplicación son utilizados por los dispositivos fuente y destino durante una sesión de comunicación.
Tanto la fuente como el destino deben disponer del mismo conjunto de protocolos. Protocolos:
Establecen reglas consistentes para el intercambio de datos. Especifican la estructura y tipo de mensajes que se intercambian. Tipos de mensajes: Solicitud, respuesta, acuse de recibo, mensaje de error,
etc. Definen los diálogos, garantizando transmisiones con respuestas esperadas y
con el correcto servicio de invocación.
![Page 18: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/18.jpg)
18
Funciones del Protocolo de la Capa de Aplicación
Aplicaciones y servicios pueden usar múltiples protocolos. Encapsula el protocolo o es encapsulado por este protocolo Invoca otros protocolos
Utilizando un web browser (HTTP): Se puede invocar:
DNS, ARP, ICMP Se puede usar:
TCP, UDP, Ethernet, PPP Uso:
IP
![Page 19: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/19.jpg)
Aplicaciones y Servicios
19
![Page 20: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/20.jpg)
20
Modelo Cliente Servidor
Cliente: dispositivo que solicita la información Servidor: dispositivo que responde a la solicitud. El cliente empieza el intercambio solicitando datos al servidor. El Servidor responde enviando datos al cliente. En suma, la transferencia de datos puede tambien requerir información de
control, tales como: Autenticación de usuario Identificación de la data a ser tranferida
![Page 21: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/21.jpg)
21
Servidores
Un servidor generalmente es una computadora que contiene información para ser compartida con muchos sistemas cliente: Web server Email server File or database server Applications server
Algunos servidores pueden requerir de autenticación de la información de cuenta del usuario para verificar si el usuario tiene permiso para acceder a los datos solicitados o para utilizar una operación en particular.
Si se solicita subir datos al servidor FTP, se puede obtener permiso para escribir una carpeta personal pero no para leer otros archivos del sitio.
![Page 22: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/22.jpg)
22
Servidores
El servidor ejecuta un servicio o proceso, a veces denominado daemon de servidor.. Al igual que la mayoría de los servicios, los daemons generalmente se ejecutan en
segundo plano y no se encuentran bajo control directo del usuario. Los daemons se describen como servidores que "escuchan" una solicitud del
cliente, porque están programados para responder cada vez que recibe una solicitud para el servicio proporcionado por el daemon
Cuando un daemon "escucha" una solicitud de un cliente, intercambia los mensajes adecuados con el cliente, según lo requerido por su protocolo, y procede a enviar los datos solicitados al cliente en el formato correspondiente.
![Page 23: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/23.jpg)
Protocolos y Servicios de la Capa de Aplicación
Una única aplicación puede emplear diferentes servicios de la capa de Aplicación Un servicio puede tener muchas solicitudes Para cada solicitud, pueden ejecutarse múltiples procesos. Los servicios y procesos de capa de Aplicación dependen del soporte de las funciones de la
capa inferior para administrar en forma exitosa las múltiples conversaciones. 23
![Page 24: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/24.jpg)
Redes y Aplicaciones entre Pares: Peer to Peer
Modelo Punto a Punto Las redes punto a punto tienen dos formas distintivas:
Diseño de redes punto a punto Aplicaciones punto a punto (P2P).
Redes entre pares Dos o más computadoras están conectadas a través de una red y pueden compartir recursos
sin tener un servidor dedicado. Cada dispositivo final conectado (conocido como punto) puede funcionar como un servidor o
como un cliente. 24
![Page 25: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/25.jpg)
Redes y Aplicaciones entre Pares: Peer to Peer
Aplicaciones punto a punto Una aplicación punto a punto (P2P), permite a un dispositivo actuar como cliente o como
servidor dentro de la misma comunicación. En este modelo, cada cliente es un servidor y cada servidor es un cliente. Ambos pueden iniciar una comunicación y se consideran iguales en el proceso. Las aplicaciones punto a punto pueden utilizarse en las redes punto a punto, en redes
cliente/servidor y en Internet. 25
![Page 26: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/26.jpg)
Servicios y Protocolos de la Capa de Aplicación
26
![Page 27: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/27.jpg)
Protocolo y Servicios DNS
Números de Puerto Los números de puerto identifican las aplicaciones y los servicios de la capa de
Aplicación que son los datos de origen y destino. Algunos de estos servicios con puertos predefinidos son:
Sistema de nombres de dominio (DNS): puerto TCP/UDP 53. Protocolo de transferencia de hipertexto (HTTP: Hypertext Transfer Protocol):
puerto TCP 80. Protocolo simple de transferencia de correo (SMTP: Simple Mail Transfer
Protocol): puerto TCP 25. Protocolo de oficina de correos (POP): puerto UDP 110. Telnet: puerto TCP 23. Protocolo de configuración dinámica de host (DHCP): puerto UDP 67. Protocolo de transferencia de archivos (FTP: File Transfer Protocol): puertos
TCP 20 y 21.
27
![Page 28: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/28.jpg)
Protocolo y Servicios DNS
Protocolo DNS Define un servicio automatizado que coincide con nombres de recursos que tienen la dirección
de red numérica solicitada. Incluye las consultas sobre formato, las respuestas y los formatos de datos. Las comunicaciones del protocolo DNS utilizan un formato simple llamado mensaje. Este formato de mensaje se utiliza para todos los tipos de solicitudes de clientes y respuestas
del servidor, mensajes de error y para la transferencia de información de registro de recursos entre servidores. 28
![Page 29: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/29.jpg)
Protocolo y Servicios DNS
29
Al configurar un dispositivo de red, generalmente proporcionamos una o más direcciones del servidor DNS que el cliente DNS puede utilizar para la resolución de nombres.
Los sistemas operativos informáticos también tienen una utilidad denominada nslookup que permite al usuario consultar manualmente los servidores de nombre para resolver un determinado nombre de host.
![Page 30: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/30.jpg)
Protocolo y Servicios DNS
Un servidor DNS proporciona la resolución de nombres utilizando el daemon de nombre que generalmente se llama named
Cuando un cliente realiza una consulta, el proceso "named" del servidor primero observa en sus propios registros para ver si puede resolver el nombre. Si no puede resolver el nombre utilizando los registros almacenados, contacta a otros servidores para hacerlo. 30
![Page 31: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/31.jpg)
Protocolo y Servicios DNS
El sistema de nombres de dominio utiliza un sistema jerárquico para crear una base de datos para proporcionar una resolución de nombres
31
![Page 32: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/32.jpg)
Servicio WWW y HTTP
Cuando se escribe una dirección Web (URL: localizador uniforme de recursos) en un explorador de Internet, el explorador establece una conexión con el servicio Web del servidor que utiliza el protocolo HTTP 32
![Page 33: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/33.jpg)
Servicio WWW y HTTP
HTTP especifica un protocolo de solicitud/respuesta. Cuando un cliente, generalmente un explorador Web, envía un mensaje de solicitud a un servidor,
el protocolo HTTP define los tipos de mensajes que el cliente utiliza para solicitar la página Web y envía los tipos de mensajes que el servidor utiliza para responder.
Los tres tipos de mensajes más comunes son GET, POST y PUT. GET es una solicitud de datos del cliente POST y PUT se utilizan para enviar mensajes que cargan los datos al servidor Web.
33
![Page 34: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/34.jpg)
Servicios E_mail y Protocolos SMTP/POP
Cuando una persona escribe mensajes de correo electrónico, generalmente utiliza una aplicación denominada Agente de usuario de correo (MUA)
Para recibir e-mails desde un servidor de e-mail, el cliente de correo electrónico puede utilizar un POP.
Al enviar un e-mail desde un cliente o un servidor, se utilizan formatos de mensajes y cadenas de comando definidas por el protocolo SMTP.
34
![Page 35: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/35.jpg)
Servicios E_mail y Protocolos SMTP/POP
Procesos del servidor e-mail: MTA y MDA El servidor de e-mail ejecuta dos procesos individuales:
Agente de transferencia de correo (MTA, Mail Transfer Agent). Agente de entrega de correo (MDA, Mail Delivery Agent).
Si el correo está dirigido a un usuario cuyo buzón está en el servidor local, el correo se pasa al MDA.
Si el correo es para un usuario que no está en el servidor local, el MTA enruta el e-mail al MTA en el servidor correspondiente.
35
![Page 36: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/36.jpg)
Servicios E_mail y Protocolos SMTP/POP
El cliente puede estar conectado a un sistema de e-mails corporativo, como Lotus Notes de IBM, Groupwise de Novell o Microsoft Exchange.
Estos sistemas a veces tienen su propio formato interno de correo electrónico y sus clientes generalmente se comunican con el servidor de correo electrónico a través de un protocolo propietario.
36
![Page 37: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/37.jpg)
Servicios E_mail y Protocolos SMTP/POP
Algunos de los comandos especificados en el protocolo SMTP son: HELO: identifica el proceso de cliente SMTP para el proceso de servidor SMTP. EHLO: es la versión más nueva de HELO, que incluye extensiones de servicios, y MAIL FROM: identifica al emisor. RCPT TO: identifica al receptor, y DATA: identifica el cuerpo del mensaje.
37
![Page 38: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/38.jpg)
FTP
Un cliente FTP es una aplicación que se ejecuta en una computadora y se utiliza para cargar y descargar archivos desde un servidor que ejecuta el daemon FTP (FTPd).
Para transferir los archivos en forma exitosa, FTP requiere de dos conexiones entre cliente y servidor: una para comandos y respuestas, otra para la transferencia real de archivos.
El cliente establece la primera conexión con el servidor en TCP puerto 21: Esta conexión se utiliza para controlar el tráfico, que consiste en comandos del cliente y respuestas del servidor.
El cliente establece la segunda conexión con el servidor en TCP puerto 20: Esta conexión es para la transferencia real de archivos y se crea cada vez que se transfiere un archivo. 38
![Page 39: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/39.jpg)
DHCP
Este servicio automatiza la asignación de direcciones IP, máscaras de subred, gateways y otros parámetros de redes IP.
DHCP permite a un host obtener una dirección IP en forma dinámica cuando se conecta a la red.
Se realiza el contacto con el servidor de DHCP y se solicita una dirección. El servidor DHCP elije una dirección de un rango configurado de direcciones denominado
"pool" y se la asigna al host por un período establecido. 39
![Page 40: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/40.jpg)
DHCP
El servidor DHCP mantiene un pool de las direcciones IP y alquila una dirección a cualquier cliente habilitado por DHCP cuando el cliente está activado.
Mensajes típicos: DHCP Discovery ACK DHCP DHCP Request NACK DHCP 40
![Page 41: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/41.jpg)
Protocolo SMB y Servicios para Compartir Archivos
El Bloque de mensajes del servidor (SMB) es un protocolo cliente-servidor para compartir archivos
A diferencia del protocolo para compartir archivos respaldado por FTP, los clientes establecen una conexión a largo plazo con los servidores.
Una vez establecida la conexión, el usuario del cliente puede acceder a los recursos en el servidor como si el recurso fuera local para el host del cliente. 41
![Page 42: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/42.jpg)
Protocolo SMB y Servicios para Compartir Archivos
Los mensajes SMB pueden: Iniciar, autenticar y terminar sesiones Controlar el acceso a archivos e impresoras Permitir a una aplicación enviar o recibir mensajes hacia o desde otro dispositivo
42
![Page 43: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/43.jpg)
Protocolo y Servicios Telnet
Una conexión que utiliza Telnet se llama Sesión o conexión de terminal virtual (VTY). En lugar de utilizar un dispositivo físico para conectar al servidor, Telnet utiliza software para
crear un dispositivo virtual que proporciona las mismas funciones que una sesión terminal con acceso a la Interfaz de línea de comandos (CLI) del servidor. 43
![Page 44: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/44.jpg)
Protocolo y Servicios Telnet
Algunos de los comandos del protocolo Telnet de muestra son: Are You There (AYT): Permite al usuario solicitar que aparezca algo en la pantalla del terminal
para indiciar que la sesión VTY está activa. Erase Line (EL): Elimina todo el texto de la línea actual. Interrupt Process (IP): Suspende, interrumpe, aborta o termina el proceso al cual se conectó la
terminal virtual. 44
![Page 45: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/45.jpg)
Protocolo Gnutella y Servicios P2P
Con las aplicaciones P2P basadas en el protocolo Gnutella, las personas pueden colocar archivos en sus discos rígidos para que otros los descarguen.
El software del cliente compatible con Gnutella permite a los usuarios conectarse con los servicios Gnutella en Internet, ubicarlos y acceder a los recursos compartidos por otros pares Gnutella.
Muchas aplicaciones del cliente están disponibles para acceder en la red Gnutella, entre ellas: BearShare, Gnucleus, LimeWire, Morpheus, WinMX y XoloX 45
![Page 46: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/46.jpg)
Protocolo Gnutella y Servicios P2P
El protocolo Gnutella define cinco tipos de paquetes diferentes: ping: para descubrir un dispositivo, pong: como respuesta a un ping, consulta: para ubicar un archivo, query hit: como respuesta a una consulta, y push: como una solicitud de descarga. 46
![Page 47: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/47.jpg)
47
Application Layer Services and Protocols
Servers typically have multiple clients requesting information at the same time.
For example, a Telnet server may have many clients requesting connections to it. These individual client requests must be handled simultaneously and
separately for the network to succeed. The Application layer processes and services rely on support from lower
layer functions to successfully manage the multiple conversations.
![Page 48: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/48.jpg)
Application Layer Protocols
![Page 49: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/49.jpg)
49
HTTP (WWW)
FTP
SMTP (email)
Telnet
(file transfer)
(remote login)
DHCP(IP address resolution)
DNS
(file sharing)P2P
(domain name resolution)
(file sharing)SMB
We will examine HTTP in detail.
![Page 50: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/50.jpg)
50
DataHTTP Header
TCP Header
IP Header
Data Link Header
Data Link Trailer
IP PacketData Link Header
Data Link Trailer
IP PacketData Link Header
Data Link Trailer
IP PacketData Link Header
Data Link Trailer
IP PacketData Link Header
Data Link Trailer
IP PacketData Link Header
Data Link Trailer
IP PacketData Link Header
Data Link Trailer
DataHTTP Header
TCP Header
IP Header
Data Link Header
Data Link Trailer
Reminder of encapsulation/decapsulation
![Page 51: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/51.jpg)
51
Focus on Application Header and/or Data
We will examine how the application (header) and/or data communication with each other between the client and the server.
“Later” we will look at what roles the other layers, protocols (TCP, IP, etc.) play.
HTTP
HTTP
![Page 52: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/52.jpg)
52
HTTP (HyperText Transfer Protocol)
HTTP – The Web’s application layer protocol. RFC 1945 and RFC 2616 Implemented in:
Client program Server program
Current version: HTTP/1.1 Encapsulated in TCP (more later)
HTTP Server
HTTP Client
HTTPHTTP
![Page 53: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/53.jpg)
53
HTTP (HyperText Transfer Protocol)
Web page (also called a html document) Web page consists of objects
Objects (examples): HTML file JPEG image GIF image JAVA applet Audio file
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Rick Graziani, Cabrillo College</title><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
The base HTML file references other objects in the page.
![Page 54: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/54.jpg)
54
Web Browser - Client
Browser – The user agent for the Web. Displays requested Web page and provides navigational and
configuration features. Browser and client may be used interchangeably in this discussion. HTTP has nothing to do with how a Web page is interpreted (displayed) by
the client (browser).
HTTP Client
![Page 55: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/55.jpg)
55
Web Server
Web Server – Stores web objects, each addressable by a URL. Implement the server side of HTTP. Examples:
Apache Microsoft Internet Information Server
HTTP Server
![Page 56: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/56.jpg)
56
HTTP Request Message
Request Message Request line Header lines
ASCII Text Request line: Method field
GET, POST and HEAD The great majority of Requests are GETs
GET /~rgraziani/ HTTP/1.1
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
Host: www.cabrillo.edu
Connection: Keep-Alive
HTTP Client
HTTP Server
Some data omitted for brevity
![Page 57: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/57.jpg)
57
HTTP Request Message
Request Line
GET - Browser/client is requesting an object
/~rgraziani/ - Browser is requesting this object in this
directory (default is index.html)
HTTP/1.1 - Browser implements the HTTP/1.1 (1.1 is
backwards compatible with 1.0)
Note: HTTP GET is also used by some P2P applications like Gnutella and Bittorrent.
GET /~rgraziani/ HTTP/1.1
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
Host: www.cabrillo.edu
Connection: Keep-Alive
![Page 58: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/58.jpg)
58
HTTP Request Message
Request Line
GET: - Used by browser/client to request an object.
POST: - Used when user has filled out a form and sending
information to the server. (Forms do not have to
use POST.)
- Example: words in a search engine
HEAD: - Similar to a GET, but the server will responds with a
HTTP message but leaves out the requested object.
PUT: - Used with Web publishing tools, upload objects.
DELETE: - Used with Web publishing tools, delete objects.
GET /~rgraziani/ HTTP/1.1
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
Host: www.cabrillo.edu
Connection: Keep-Alive
![Page 59: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/59.jpg)
59
HTTP Request Message
Header Lines
Accept-Language:- User prefers this language of the object
User-Agent: - The browser type making the request
Host: - Host on which the object resides
Connection: - Client/browser is telling the server to keep
this TCP connection Open, known as a
persistent connection.
- We will talk about this later in TCP
(transport layer)
GET /~rgraziani/ HTTP/1.1
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
Host: www.cabrillo.edu
Connection: Keep-Alive
![Page 60: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/60.jpg)
60
HTTP Response MessageHTTP/1.1 200 OKDate: Fri, 22 Feb 2008 16:34:18 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Thu, 15 Nov 2007 19:33:12 GMTContent-Length: 15137Connection: closeContent-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Some data omitted for brevity
HTTP Client
HTTP Server
![Page 61: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/61.jpg)
61
HTTP Response MessageHTTP/1.1 200 OKDate: Fri, 22 Feb 2008 16:34:18 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Thu, 15 Nov 2007 19:33:12 GMTContent-Length: 15137Connection: closeContent-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Response message: Status line Header lines Entity body
![Page 62: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/62.jpg)
62
HTTP Response MessageHTTP/1.1 200 OKDate: Fri, 22 Feb 2008 16:34:18 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Thu, 15 Nov 2007 19:33:12 GMTContent-Length: 15137Connection: closeContent-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Status Line
HTTP/1.1 – Server is using HTTP/1.1
200 OK - Status code, request succeeded and information is
returned in response
![Page 63: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/63.jpg)
63
HTTP Response MessageHTTP/1.1 404
Status Codes
200 OK
- Status code, request succeeded and information is returned in response.
301 Moved Permanently
- Requested object has been permanently moved.
400 Bad Request
- Generic error message, request not understood by server.
404 Not Found:
-The requested document does not exist on server.
505 HTTP Version Not Supported
- The requested HTTP protocol version not supported by server.
![Page 64: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/64.jpg)
64
HTTP Response MessageHTTP/1.1 200 OKDate: Fri, 22 Feb 2008 16:34:18 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Thu, 15 Nov 2007 19:33:12 GMTContent-Length: 15137Connection: closeContent-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Header Lines
Date: – Server is using HTTP/1.1
Server: - Status code, request succeeded and
information is returned in response
Last-Modified: – Date/time when object created or modified
Content-Length: – Number of bytes in object being sent
Connection: – Server going to close TCP connection after
sending the requested object.
Content-Type: – Object in entity body is HTML text
![Page 65: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/65.jpg)
65
HTTP Response MessageHTTP/1.1 200 OKDate: Fri, 22 Feb 2008 16:34:18 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Thu, 15 Nov 2007 19:33:12 GMTContent-Length: 15137Connection: closeContent-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Entity Body
<!DOCTYPE html PUBLIC etc.:
– HTML text and other objects to be used by the browser/client
![Page 66: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/66.jpg)
66
HTTP Request and Response MessagesGET /~rgraziani/ HTTP/1.1
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
Host: www.cabrillo.edu
Connection: Keep-Alive
HTTP Client
HTTP Server
HTTP/1.1 200 OKDate: Fri, 22 Feb 2008 16:34:18 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Thu, 15 Nov 2007 19:33:12 GMTContent-Length: 15137Connection: closeContent-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
HTTP
HTTP
![Page 67: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/67.jpg)
67
User-Server Interaction: Cookies
Web servers are considered stateless – they do not maintain state information, keep track of the user. Higher performance – allowing the server to handle thousands of
simultaneous TCP connections (later). Web servers use cookies to track users. Cookies defined in RFC 2109
![Page 68: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/68.jpg)
68
User-Server Interaction: Cookies
Web server installs cookies on client when: Accessed the web site for the first time (Web server does not know client
by name.)
and/or User provides information to the web server. (Web server now knows
client by name.) HTTP on Web server responds with a Set-cookie: header with an ID.
This ID is stored on the client’s computer. Each time client/browser accesses web site. The GET includes Cookie: or
User_ID or similar with the ID.
HTTP Client
HTTP Server
HTTP Requests (GET) now include ID
HTTP: Response Set-cookie: ID
HTTP Requests: GET (first time)
Web server can now track clients activities on the web site.
![Page 69: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/69.jpg)
69
HTTP Request and Response MessagesGET /jpeg/cap81/cam0.36705623.rgb888.enc HTTP/1.1
<information omitted>
Cookie: SLSPOTNAME5=Cowells; SLSPOTNAME4=Waimea%20Bay; SLSPOTNAME3=Pipeline; SLSPOTNAME2=38th%20Ave%2E; SLSPOTNAME1=Cowells; SLSPOTID5=4189; SLSPOTID4=4755; SLSPOTID3=4750; SLSPOTID2=4191; SLSPOTID1=4189; OAX=R8bfwEbcU08ABCBu; USER_ID=5551212 <not my actual user-id>; <rest of informaton omitted for brevity>
HTTP Client
HTTP Server
HTTP/1.1 200 OKDate: Fri, 22 Feb 2008 19:00:15 GMTServer: Apache/1.3.34 (Unix)Last-Modified: Fri, 22 Feb 2008 18:51:47 GMTETag: "760a31-18ce-47bf19c3"Accept-Ranges: bytesContent-Length: 6350Keep-Alive: timeout=15, max=257Connection: Keep-AliveContent-Type: text/plain <information omitted>
HTTP: Cookie 5551212 included
HTTP data customized for Rick Graziani
![Page 70: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/70.jpg)
70
Web Caching
Web cache or proxy server – Web cache satisfies HTTP requests on the behalf of the Origin Web server. Own disk storage Keeps copies of recently requested objects
Typically installed at ISP or larger institutions. Advantages:
Reduces the response time for client requests, especially if there are any bottlenecks in the network.
Reduces traffic on institution’s access link to the ISP (Internet).
Client
Client
Origin Server
Orgin Server
HTTP RequestHTTP
Request
HTTP RequestHTTP
Request
HTTP Response
HTTP Response
HTTP Response
HTTP Response
Web Cache or Proxy Server
![Page 71: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/71.jpg)
71
Web Caching
1. Client/browser sends HTTP Request to Web cache (Proxy server).2. Web cache checks to see if it has a local copy of the object.
2a. Local copy: Web cache sends object to client’s browser. 2b. No Local copy: Web cache sends HTTP request to origin server.
3. Origin server sends object to Web cache.4. Web cache stores a local copy of the object.5. Web cache forwards copy of the object to the client browser.Note: TCP connections are also created between Client and Web Cache; Web
cache and Origin server (later).
Web Cache or Proxy Server
Client
Client
Origin Server
Origin Server
HTTP RequestHTTP
Request
HTTP RequestHTTP
Request
HTTP Response
HTTP Response
HTTP Response
HTTP Response
![Page 72: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/72.jpg)
72
Web Caching (Extra)
Problem – stale cache Object may have been modified on Origin server since copy was
cached by the Web cache. Solution – Conditional GET
Request method: GET Includes header: If-Modified-Since:
Web cache sends Conditional GET to Origin server to see if there is a newer version of the object. No newer version: Send current local object Newer version: Replaces current object and forwards newer version.
![Page 73: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/73.jpg)
73
Web Cache – Steps (Extra)
1. Client/browser sends HTTP Request to Web cache (Proxy server).
2. Web cache checks to see if it has a local copy of the object. No local copy
3. Web cache sends HTTP request to origin server.
4. Origin Web server sends HTTP response with object requested
5. Web cache stores local copy of the object with last-modified date.
6. Web cache forwards object to client/browser.
1. Web cache receives another request for this HTTP object.
2. Web cache sends a Conditional GET to the Origin Web server, with If-modified-since: header.
3. Origin Web Server returns: No change: HTTP Response message 304 Not Modified, no object.
Web cache sends local object. Change: HTTP Response 200 OK, with object.
Web cache replace object and forwards update object.
![Page 74: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/74.jpg)
74
HTTPS
HTTPS (Hypertext Transfer Protocol over Secure Socket Layer) is a URL scheme used to indicate a secure HTTP connection.
HTTPS is not a separate protocol combination of a normal HTTP interaction over an encrypted:
Secure Sockets Layer (SSL) or Transport Layer Security (TLS) connection
![Page 75: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/75.jpg)
75
FTP (File Transfer Protocol)
FTP was developed to allow for file transfers between a client and a server. Used to push and pull files from a server running the FTP daemon (FTPd). Uses get and put commands. RFC 959
FTP Client
FTP Server
![Page 76: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/76.jpg)
76
Client initiates a TCP control connection with FTP server using port 21. This connection remains open until the user quits the FTP application. TCP port 21 connection includes:
Username and password is sent over TCP port 21. Remote directory changes
This state information significantly reduces total number of sessions on server.
For each file transferred, TCP opens and closes a TCP data connection on port 20.
More later on TCP ports and connections.
TCP data connection port 20
TCP control connection port 21
Username and password
Change directory on Server
Copy file from client to server – Connection Closed
TCP data connection port 20
Copy file from server to client – Connection Closed
TCP control connection port 21
Quit FTP Application – Connection Closed
FTP (File Transfer Protocol)
![Page 77: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/77.jpg)
77
SMTP – Simple Mail Transfer Protocol
Email – One of the killer applications of the Internet.
![Page 78: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/78.jpg)
78
Internet mail involves: User agents
Allows users to read, reply, compose, forward, save, etc., mail messages GUI user agents: Outlook, Eudora, Messenger Text user agents: mail, pine, elm
Mail servers Stores user mail boxes, communicates with local user agents and other
mail servers. SMTP
Principle application layer protocol for Internet mail Sent over TCP
Mail access protocols: POP3, IMAP, HTTP
SMTPSMTP
POP3 IMAP
User agent User agentMail server Mail server
SMTP – Simple Mail Transfer Protocol
![Page 79: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/79.jpg)
79
SMTP RFC 2821 Transfers messages from sender’s mail server to recipient’s mail
server Push protocol, not a pull protocol
Push (from client to server or server to server) Pull (from server to client)
Retrieving email Historically, users would log into local mail server to read mail. Since early 1990’s, clients use mail access protocols:
POP3 IMAP HTTP
SMTPSMTP
POP3 IMAP
User agent User agentMail server Mail server
SMTP – Simple Mail Transfer Protocol
![Page 80: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/80.jpg)
80
SMTP – Simple Mail Transfer Protocol
POP3 (Post Office Protocol) RFC 1939 Limited functionality Uses TCP port 110 Download-and-delete mode
Retrieves messages on server and store the locally Delete messages on server
Download-and-keep mode Does not delete messages on server when retrieved.
Problem Difficult to access email from multiple computers – work and home. Some email may have already been downloaded on another
computer (work) – download-and-delete To read email from another computer, must leave on server –
download-and-keep Does not provide means for user to create remote folders on mail
server
![Page 81: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/81.jpg)
81
IMAP (Internet Message Access Protocol) RFC 2060 Mail not downloaded, but kept on server Received email is associated with user’s INBOX Users can create and manage remote folders Users can retrieve portions of the email:
Message header: Subject line and Sender
Web-based email Introduced with Hotmail in mid-1990’s Communicates with remote mailbox using HTTP HTTP is used to push (client to server) and pull the email (server to
client)
SMTP
IMAP HTTP
User agent User agentMail server Mail server
SMTP – Simple Mail Transfer Protocol
SMTP
![Page 82: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/82.jpg)
82
SMTP
Mail software, processes used: MTA and MDA MUA (Mail User Agent) – Email client software. MTA (Mail Transfer Agent) – Software that governs transfer of email
between mail servers. Includes UNIX sendmail, Microsoft Exchange Server, Postfix, and Exim
MDA (Mail Delivery Agent) – Software that governs transfer of email from mail servers to clients. On Unix systems, procmail and maildrop are the most popular MDAs.
MTA receives email from the
client's MUA passes email to the MDA
for final delivery uses SMTP to route email
between servers
![Page 83: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/83.jpg)
83
Telnet
Telnet provides a standard method of emulating text-based terminal devices over the data network.
Server
Telnet Telnet
![Page 84: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/84.jpg)
84
Telnet
Allows a user to remotely access another device (host, router, switch). A connection using Telnet is called a Virtual Terminal (VTY) session, or
connection. Telnet uses software to create a virtual device that provides the same
features of a terminal session with access to the server command line interface (CLI).
Telnet clients: Putty Teraterm Hyperterm
Server
TelnetTelnet
![Page 85: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/85.jpg)
85
Telnet
Telnet supports user authentication, but does not encrypt data. All data exchanged during a Telnet sessions is transported as plain text. Secure Shell (SSH) protocol offers an alternate and secure method for
server access. Stronger authentication Encrypts data
![Page 86: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/86.jpg)
86
DHCP – Dynamic Host Configuration Protocol
IP addresses and other information can be obtained: Statically Dynamically (DHCP)
![Page 87: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/87.jpg)
87
DHCP
DHCP Information can include: IP address Subnet mask Default gateway Domain name DNS Server
DHCP servers can be: Server on LAN Router Server at ISP
![Page 88: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/88.jpg)
88
DHCP
We will discuss DHCP more when we discuss IPv4.
![Page 89: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/89.jpg)
89
DNS – Domain Name System
DNS allows users (software) to use domain names instead of IP addresses
![Page 90: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/90.jpg)
90
Name Resolution
Resolver DNS client programs used to look up DNS name information. Name Resolution The two types of queries that a DNS resolver (either a DNS client or another
DNS server) can make to a DNS server are the following:Recursive queries Queries performed by Host to Local DNS ServerIterative queries Queries performed Local DNS server to other servers
Need the IP address
![Page 91: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/91.jpg)
91
DNS Name Resolution
User types http://www.example.com
Step 1. The DNS resolver on the DNS client sends a recursive query to its
configured Local DNS server. Requests IP address for "www.example.com". The DNS server for that client is responsible for resolving the name
Cannot refer the DNS client to another DNS server.
1
![Page 92: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/92.jpg)
92
Step 2. Local DNS Server forwards the query to a Root DNS server.
Step 3. Root DNS server
Makes note of .com suffix Returns a list of IP addresses for TLD (Top Level Domain Servers)
responsible for .com.
DNS Name Resolution
1
2 23
![Page 93: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/93.jpg)
93
DNS Name Resolution
Root DNS Servers There are 13 Root DNS servers (labeled A through M)
TLD Servers Responsible for domains such as .com, edu, org, .net, .uk, jp, fr Network Solutions maintains TLD servers for .com Educause maintains TLD servers for .edu There are redundant servers throughout the world.
![Page 94: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/94.jpg)
94
Step 4. The local DNS server sends query for www.example.com to one of the
TLD servers.
Step 5. TLD Server
Makes note of example.com Returns IP address for authoritative server example.com (such as
dns.example.com server)
DNS Name Resolution4 4
5
![Page 95: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/95.jpg)
95
Step 6. Local DNS server sends query for www.example.com directly to DNS
server for example.com
Step 7. example.com DNS server responds with its IP address for
www.example.com
6
6
DNS Name Resolution
7
![Page 96: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/96.jpg)
96
Step 8. Local DNS server sends the IP address of www.example.com to the DNS
client.
DNS Caching When a DNS server receives a DNS reply (mapping hostname to an IP
address) it can cache the information in its local memory. DNS servers discard cached information after a period of time (usually 2
days) A local DNS server can cache TLD server addresses, bypassing the root
DNS servers in the query chain.
8
7
DNS Name Resolution
![Page 97: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/97.jpg)
97
DNS Name Resolution
In the worst cases, you'll get a dialog box that says the domain name doesn't exist - even though you know it does.
This happens because the authoritative server is slow replying to the first, and your computer gets tired of waiting so it times-out (drops the connection) or the domain name does not exist.
But if you try again, there's a good chance it will work, because the authoritative server has had enough time to reply, and your name server has stored the information in its cache.
![Page 98: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/98.jpg)
98
nslookup
nslookup Displays default DNS server for your host Can be used to query a domain name and get the IP address
![Page 99: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/99.jpg)
99
DNS Name Resolution
ipconfig /displaydns After a certain amount of time, specified in the Time to Live (TTL)
associated with the DNS resource record, the resolver discards the record from the cache.
ipconfig /flushdns – Manually deletes entries The default TTL for positive responses is 86,400 seconds (1 day). The default TTL for negative responses is 300 seconds.
![Page 100: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/100.jpg)
100
(Missing Info) DNS: 204.127.199.8
![Page 101: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/101.jpg)
101
![Page 102: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/102.jpg)
102
![Page 103: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/103.jpg)
103
![Page 104: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/104.jpg)
104
SMB – Server Message Block Protocol
The Server Message Block (SMB) is a client/server file sharing protocol. IBM developed Server Message Block (SMB) in the late 1980s to describe the structure of shared network resources, such as directories, files, printers, and serial ports.
![Page 105: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/105.jpg)
105
SMB
Request-response protocol . Unlike FTP, clients establish a long term connection to servers. Client can access the resources on the server as if the resource is local to
the client host. SMB is sent over TCP
Prior to Windows 2000 windows used a proprietary protocol (NETBIOS) to send SMB.
Linux/UNIX have similar protocol: SAMBA
![Page 106: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/106.jpg)
106
SMB
SMB messages can: Start, authenticate, and terminate sessions Control file and printer access Allow an application to send or receive messages to or from another
device
![Page 107: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/107.jpg)
107
Peer-to-Peer (P2P) Networking and Applications
In addition to the client/server model for networking, there is also a peer-to-peer model.
Two or more computers are connected via a network and can share resources (such as printers and files) without having a dedicated server.
End devices (peers) can function as either a server or client.
![Page 108: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/108.jpg)
108
P2P File Sharing
P2P (Peer-to-Peer) file sharing accounts for more traffic on the Internet than any other application (2004).
Peers (hosts) act as both clients and servers. No centralized file server. HTTP GET and responses are commonly used.
![Page 109: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/109.jpg)
109
By Peter SvenssonThe Associated PressOct. 19, 2007“Peer-to-peer applications account for between 50 percent and 90
percent of overall Internet traffic, according to a survey this year by ipoque GmbH, a German vendor of traffic-management equipment.”
![Page 110: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/110.jpg)
110
Challenge with P2P – locating content across thousands or millions of peers.
One solution – centralized directory Approach done by Napster
Problems (non-legal problems) Single point of failure Performance bottlenecks
1 – Inform and Update
Centralized Directory Server
P2P – Centralized Directory
1 – Inform and Update
1 – Inform and Update
1 – Inform and Update
Peer
Peer
Peer
Peer
2 – Query for content
3 – File Transfer
Napster
![Page 111: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/111.jpg)
111
1. Peer A starts P2P application
2. Informs centralized directory server of its: IP address Names of objects making available for sharing (MP3, videos, etc.)
3. Directory server collects information from each peer that becomes active. Dynamic database Maps IP addresses with object names
4. Peer A queries directory server for IP addresses of other peers for specific content Directory Server returns IP addresses for those peers (Peer B)
5. Peer A establishes TCP connection and downloads file (i.e. HTTP GET) from other peer, Peer B.
6. Directory server removes Peer from database when Peer closes application or disconnects from Internet (periodic messages – pings – from server).
1 – Inform and Update
Centralized Directory Server
P2P – Centralized Directory
1 – Inform and Update
1 – Inform and Update
1 – Inform and Update
Peer
Peer B
Peer
Peer A
2 – Query for content
3 – File Transfer
![Page 112: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/112.jpg)
112
Gnutella – public domain file sharing application Fully distributed approach
No centralized server Gnutella peer maintains peering relationship (TCP connection – later) which
a number of other peers (usually fewer than 10).
P2P – Query Flooding
Peer A
Peer CPeer B
Peer D Peer E
Peer F
Query
Query
Query
QueryQuery
Query hit
Query hit
Query hitFile transfer
Gnutella
![Page 113: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/113.jpg)
113
Peer A searches for a file
1. Peer A sends query to all neighboring peers.
2. If neighboring peer does not have file, forwards query to all its neighboring peers
3. If any peer has the file it returns a query hit message.
4. Peer A selects a peer, Peer C, to retrieve file (HTTP GET)
5. A direct TCP connection is made with selected peer, Peer C.
6. HTTP response is used to send file.
Query Flooding Non-scalable and causes a significant amount of traffic on Internet. Gnutella modified it to limited-scope flooding which limits how many peers
away the query is sent to, usually 7 to 10. (similar to TTL – later).
Peer A
Peer CPeer B
Peer D
P2P – Query Flooding
Peer E
Peer F
Query
Query
Query
QueryQuery
Query hit
Query hit
Query hitFile transfer
![Page 114: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/114.jpg)
114
How a peer joins and departs Gnutella network
1. Finding peers: Bootstrap program: Client maintains a list of peer IP addresses who are
usually up Contact Gnutella site that maintains a list
2. Client attempts to make contact with peers (TCP connection – later)
3. Client sends Gnutella ping message to peer. Forwards Gnutella ping to other peers, who continue to forward ping
until limited-scope is reached.
4. Each peer returns a Gnutella pong message including: Its IP address Number of files it is sharing Total size of the files
Peer A
Peer CPeer B
Peer D
P2P – Query Flooding
Peer E
Peer F
Query
Query
Query
QueryQuery
Query hit
Query hit
Query hitFile transfer
![Page 115: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/115.jpg)
115
Kazaa combines ideas from Napster and Gnutella 2004 – Contributed to more traffic on Internet than any other application 2007 – Bittorrent became the leading application Proprietary technology
P2P - Combination
Kazaa
![Page 116: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/116.jpg)
116
Kazaa does not use a centralized server Group leader peers (parent)
Higher bandwidth and Internet connectivity Greater Gnutella responsibilites
Peers (child) – non-group leaders Child peer establishes TCP connection with a group leader Group leader:
maintains database directory of child peers including their IP addresses maintain TCP connections with other group leaders
Child peers query group leaders who forward the query to other group leaders Child peer selects peer for TCP connection and file transfer
P2P - Combination
Group Leader
Group Leader
Group Leader
Query
Query
Query
Query Reply
File Transfer
![Page 117: TCPIP_Aplicación](https://reader034.fdocuments.es/reader034/viewer/2022051411/545f4878b1af9fea338b4be0/html5/thumbnails/117.jpg)
Chapter 3Application Layer Functionality and Protocols