Está en la página 1de 130

•Tema 4: PROTOCOLOS

•Flujo de Datos en una red


• ICMP/IP/IPX,IP, DIRECCIONAMIENTO
• Protocolos de Enrutamiento (Estatico-Dinamico)
• Control de Gestion
• Servicios de Capas de Transporte y Superiores
FLUJO DE DATOS EN UNA
RED
LANs
• Operate within a limited geographic area
• Allow many users to access high-bandwidth
media
• Provide full-time connectivity to local services
• Connect physically adjacent devices
LAN Devices
WAN Technologies Include
• Analog modems
• Integrated Services Digital Network (ISDN)
• Digital Subscriber Line (DSL)
• Frame Relay
• Asynchronous Transfer Mode (ATM)
• T (US) and E (Europe) carrier series: T1, E1,
T3, E3
• Synchronous Optical Network (SONET)
WAN Devices
Metropolitan-Area Networks
(MANs)
• A MAN is a network that spans a metropolitan
area such as a city or suburban area.
• A MAN usually consists of two or more LANs in
a common geographic area.
NICs

• Bus architectures
• ISA (Industry Standard Architecture)
• EISA (Extended ISA)
• PCI (Peripheral Component Interconnect)
• MCA (Micro Channel Architecture)
• PCMCIA (Personal Computer Memory
Card International Association)
NICs in the OSI Model
Repeaters: Layer 1
Repeaters

A repeater solves the problem of too many nodes and


not enough cable; cleans, amplifies, and resends a
signal that is weakened by long cable length.
Switches: Layer 2
LAN Switches

Combine the
connectivity of a
hub with the traffic
regulation of a
bridge on each
port
Cual es la diferencia entre un
"Switch" y un "Hub" ?
• El "Hub" básicamente extiende la funcionalidad de la red (LAN) para que el
cableado pueda ser extendido a mayor distancia, es por esto que un "Hub" puede
ser considerado como una repetidora. El problema es que el "Hub" transmite estos
"Broadcasts" a todos los puertos que contenga, esto es, si el "Hub" contiene 8
puertos ("ports"), todas las computadoras que estén conectadas al "Hub" recibirán
la misma información, y como se mencionó anteriormente , en ocasiones resulta
innecesario y excesivo

• Un "Switch" es considerado un "Hub" inteligente, cuando es inicializado el "Switch",


éste empieza a reconocer las direcciones "MAC" que generalmente son enviadas
por cada puerto, en otras palabras, cuando llega información al "Switch" éste tiene
mayor conocimiento sobre que puerto de salida es el más apropiado, y por lo tanto
ahorra una carga ("bandwidth") a los demás puertos del "Switch", esta es una de la
principales razones por la cuales en Redes por donde viaja Vídeo o CAD, se
procura utilizar "Switches" para de esta forma garantizar que el cable no sea
sobrecargado con información que eventualmente sería descartada por las
computadoras finales,en el proceso, otorgando el mayor ancho de banda
("bandwidth") posible a los Vídeos o aplicaciones CAD.
Layer 1 Devices

– Layer 1 provides the physical media and its encoding.


– Examples:
• Ethernet
• Serial
• Repeater
• Physical interface of the NIC
Layer 2 Devices

– Layer 2 devices provide an interface with the physical


media.
– Examples:
• NIC
• Bridge
• Switch
Layer 2 Addressing

–MAC address
–Assigned to end devices
Layer 3 Devices and Their
Function

–The network layer provides connectivity and


path selection between two host systems.
–In the host, this is the path between the data
link layer and the upper layers of the NOS.
–In the router, it is the actual path across the
network.
Layer 3 Addressing

–Each NOS has its own Layer 3 address


format.
–OSI uses an NSAP.
–TCP/IP uses IP.
ARP
ARP Table
Host-to-Host Packet Delivery (1
of 22)
Host-to-Host Packet Delivery (2
of 22)
Host-to-Host Packet Delivery (3
of 22)
Host-to-Host Packet Delivery (4
of 22)
Host-to-Host Packet Delivery (5
of 22)
Host-to-Host Packet Delivery (6
of 22)
Host-to-Host Packet Delivery (7
of 22)
Host-to-Host Packet Delivery (8
of 22)
Host-to-Host Packet Delivery (9
of 22)
Host-to-Host Packet Delivery
(10 of 22)
Host-to-Host Packet Delivery
(11 of 22)
Host-to-Host Packet Delivery
(12 of 22)
Host-to-Host Packet Delivery
(13 of 22)
Host-to-Host Packet Delivery
(14 of 22)
Host-to-Host Packet Delivery
(15 of 22)
Host-to-Host Packet Delivery
(16 of 22)
Host-to-Host Packet Delivery
(17 of 22)
Host-to-Host Packet Delivery
(18 of 22)
Host-to-Host Packet Delivery
(19 of 22)
Host-to-Host Packet Delivery
(20 of 22)
Host-to-Host Packet Delivery
(21 of 22)
Host-to-Host Packet Delivery
(22 of 22)
Default Gateway
Host-Based Tools: ping
Host-Based Tools: Table
Host-Based Tools: tracert
Summary
– Layer 1 provides the physical media and its
encoding.
– Layer 2 devices provide an interface with the
physical media.
– Layer 2 addresses are MAC addresses.
– The network layer provides connectivity and
path selection between two host systems.
– Layer 3 addresses are IP addresses.
Summary (Cont.)
– Before a host can send data to another host, it
must have the MAC address of that host.
– If the MAC address is not known, ARP is used to
map Layer 2 to Layer 3.
– Reliable communication requires a TCP session.
– Data sent must be acknowledged.
– If hosts are on different segments, a default
gateway is needed.
– Several host-based tools are available to check
connectivity between hosts:
• ping
• tracert
• arp
IP / DIRECCIONAMIENTO /
SUBNETEO
Overview of TCP/IP
• The TCP/IP Protocol Suite
• Protocols in the TCP/IP Suite
• TCP/IP Applications
• What Is a Socket?
The TCP/IP Protocol Suite
TCP/IP Protocol Suite

HTTP FTP SMTP


Application
DNS POP3 SNMP

Transport TCP UDP

ARP IGMP
Internet IPv4 ICMP
IPv6

Network Mobile
Ethernet Wi-Fi broadband
Interface
Protocols in the TCP/IP Suite
OSI TCP/IP TCP/IP Protocol Suite

Application HTTP DNS


Presentation Application FTP POP3
Session SMTP SNMP

Transport Transport TCP UDP

ARP IGMP
Network Internet IPv4 ICMP IPv6

Data Link Network Mobile


Interface Ethernet Wi-Fi
Physical broadband
TCP/IP Applications
Some common application layer protocols:
• HTTP
• HTTPS
• FTP
• RDP
• SMB
• SMTP
• POP3
What Is a Socket?
• A socket is a combination of IP address,
transport protocol, and port
TCP/IP Protocol Suite

HTTP (80) SMTP (25)


HTTPS (443) DNS (53)
POP3 (110) FTP (21)

TCP/UDP

IPv4 IPv6
Understanding IPv4 Addressing
• IPv4 Addressing
• Public and Private IPv4 Addresses
• How Dotted Decimal Notation Relates to
Binary Numbers
• Simple IPv4 Implementations
• More Complex IPv4 Implementations
IPv4 Addressing
An IPv4 configuration identifies a computer to other computers on a network

IP Address Subnet 1
192.168.2.180
255.255.255.0

IP Address
192.168.2.181
255.255.255.0

Default gateway defines


the preferred router
IP Address
192.168.2.182 IP Address
255.255.255.0 192.168.1.200
255.255.255.0

Dotted decimal
IP Address
representation
192.168.1.201
of the address 255.255.255.0
and subnet mask IP Address
192.168.1.202
Subnet 2 255.255.255.0
Public and Private IPv4
Addresses
Public Private
• Required by devices and • Not routable on the
hosts that connect directly Internet
to the Internet • 10.0.0.0/8
• 172.16.0.0/12
• Must be globally unique • 192.168.0.0./16
• Routable on the Internet • Can be assigned locally
by organization
• Must be assigned by
IANA/RIR • Must be translated to
access the Internet
How Dotted Decimal
Notation Relates to Binary
Numbers
8-Bit Octet
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

Decimal Value
Simple IPv4 Implementations
Class A (/8) Network Host ID
Large ID
0
Network w x y z

Class B (/16) Network ID Host ID


Medium 10
Network w x y z

Class C (/24) Network ID Host ID


Small Network 110
w x y z
Hosts for Classes of
IP Addresses

Class A (24 bits for hosts) 224 - 2* = 16,777,214 maximum hosts


Class B (16 bits for hosts) 216 - 2* = 65,534 maximum hosts
Class C (8 bits for hosts) 28 - 2* = 254 maximum hosts
* Subtracting the network and broadcast reserved address
IP Addresses as Decimal
Numbers
Network IDs and Broadcast
Addresses
An IP address such as 176.10.0.0 that has all binary 0s in
the host bit positions is reserved for the network address.

An IP address such as 176.10.255.255 that has all binary 1s


in the host bit positions is reserved for the broadcast
address.
Private Addresses
More Complex IPv4 Implementations
172.16.17.1
172.16.16.0/22

172.16.17.0/24
172.16.20.0/22

172.16.16.1/20 172.16.24.0/22 172.16.17.254

172.16.18.0/24

172.16.28.0/22
Subnetting and Supernetting
• How Bits Are Used in a Subnet Mask or
Prefix Length
• The Benefits of Using Subnetting
• Calculating Subnet Addresses
• Calculating Host Addresses
• Discussion: Creating a Subnetting
Scheme for a New Office
How Bits Are Used in a Subnet
Mask or Prefix Length
Class B Address with Subnet

Number of Subnets 32
128
64
168
2
40
256

Network ID Subnet ID Host ID

1 0

Number of Hosts 16,382


32,766
1,022
2,046
4,094
8,190
510
65,534
254
The Benefits of Using
Subnetting
When you subdivide a network into subnets, you
create a unique ID for each subnet that is derived
from the main network ID
By using subnets, you can:
• Use a single network address across multiple
locations
• Reduce network congestion by segmenting
traffic
• Increase security by using firewalls
• Overcome limitations of current technologies
Calculating Subnet Addresses
When determining subnet addresses you should:
• Choose the number of subnet bits based on the
number of subnets required
• Use 2n to determine the number of subnets
available from n bits

For five locations, the following three subnet bits


are required:
• 5 locations = 5 subnets required
• 22 = 4 subnets (not enough)
• 23 = 8 subnets
Calculating Host Addresses
When determining host addresses you should:
• Choose the number of host bits based on the
number of hosts that you require on each
subnet
• Use 2n-2 to determine the number of hosts
that are available on each subnet

For subnets with 100 hosts, seven host bits are


required:
• 26-2 = 62 hosts (not enough)
• 27-2 = 126 hosts
CCNA 2 Chapter 15
Routing and Routing Protocols

By
Your Name
Objectives
• Introduction to static routing
• Dynamic routing overview
• Routing protocols overview
Static Versus Dynamic Routes
Why Use a Static Route?
The ip route Command
Static Routes
The ip default-network
Command
Verifying a Static Route
• The command show
running-config is
used to view the active
configuration in
NVRAM to verify that
the static route was
entered correctly.
Troubleshooting Static Routes
• The show interfaces command
• The ping command
• The traceroute command
Dynamic Routing Overview
Routed Protocols Versus
Routing Protocol
Autonomous System
Dynamic Routing Operations
Classes of Routing Protocols
Distance Vector Routing
Basics
Distance Vector Discovery
Complex Metrics
Link-State Routing Basics
Link-State Network Discovery
Link-State Topology Changes
Link-State Concerns
Distance Vector Versus
Link State
Path Determination
Path Selection and Packet
Switching
IP Routing Configuration
Tasks
The router and network
Commands
Routing Protocols
• RIP — A distance vector interior routing protocol
• IGRP — The Cisco distance vector interior
routing protocol
• OSPF — A link-state interior routing protocol
• EIGRP — The Cisco advanced distance vector
interior routing protocol
• BGP — A distance vector exterior routing
protocol
CAPAS SUPERIORES
Tema 3
TCP/IP Transport and
Application Layers
Objectives
• TCP/IP transport layer
• TCP/IP application layer
Routed Protocols Versus
Routing Protocols

Routing protocols determine the path that routed


protocols follow to their destinations.
The Transport Layer Functions
Five basic services:
• Segmenting upper-layer application data
• Establishing end-to-end operations
• Sending segments from one end host to
another end host
• Ensuring data reliability
• Providing flow control
Role of Transport Layer
• Application layer
– Communication for specific applications
– E.g., HyperText Transfer Protocol (HTTP), File Transfer
Protocol (FTP), Network News Transfer Protocol (NNTP)
• Transport layer
– Communication between processes (e.g., socket)
– Relies on network layer and serves the application layer
– E.g., TCP and UDP
• Network layer
– Logical communication between nodes
– Hides details of the link technology
– E.g., IP
104
Transport Protocols
• Provide logical communication
between application processes running
on different hosts application
transport
• Run on end hosts network
data link network
– Sender: breaks application physical
network
data link
physical
data link
messages into segments, physical
network
and passes to network layer data link
physical network
data link
– Receiver: reassembles physical

segments into messages, network


data link
physical
passes to application layer
application
• Multiple transport protocol available to transport
network
applications data link
physical
– Internet: TCP and UDP
105
Multiplexing and Demultiplexing
• Host receives IP datagrams
32 bits
– Each datagram has source
and destination IP address, source port # dest port #

– Each datagram carries one


transport-layer segment other header fields

– Each segment has source


and destination port
application
number data
• Host uses IP addresses and port (message)
numbers to direct the segment to
appropriate socket
TCP/UDP segment format

106
Flow Control
• Avoids the problem of a host at one side of the
connection overflowing the buffers in the host at
the other side
• Ensures the integrity of the data
Session Establishment
Three-Way Handshake
Windowing
• A method of controlling the amount of
information transferred end to end
• Information can be measured in terms of the
number of packets or the number of bytes
Window Size

Larger window sizes


increase
communication
efficiency.
Acknowledgment
• Positive acknowledgment requires a recipient to
communicate with the source, sending back an
acknowledgment message when it receives
data.
• Sender keeps a record of each data packet that
it sends and expects an acknowledgment.
Layer 4 Protocols
Internet Transport Protocols
• Datagram messaging service (UDP)
– No-frills extension of “best-effort” IP
• Reliable, in-order delivery (TCP)
– Connection set-up
– Discarding of corrupted packets
– Retransmission of lost packets
– Flow control
– Congestion control (next lecture)
• Other services not available
– Delay guarantees
– Bandwidth guarantees

114
UDP
• Connectionless
• Unreliable
• Transmits messages (called user datagrams)
• Provides no software checking for message
delivery (unreliable)
• Does not reassemble incoming messages
• Uses no acknowledgments
• Provides no flow control
Unreliable Message Delivery Service

• Lightweight communication between processes


– Avoid overhead and delays of ordered, reliable delivery
– Send messages to and receive them from a socket
• User Datagram Protocol (UDP)
– IP plus port numbers to support (de)multiplexing
– Optional error checking on the packet contents

SRC port DST port

checksum length

DATA
116
UDP Segment Format
Why Would Anyone Use UDP?
• Finer control over what data is sent and when
– As soon as an application process writes into the socket
– … UDP will package the data and send the packet
• No delay for connection establishment
– UDP just blasts away without any formal preliminaries
– … which avoids introducing any unnecessary delays
• No connection state
– No allocation of buffers, parameters, sequence #s, etc.
– … making it easier to handle many active clients at once
• Small packet header overhead
– UDP header is only eight-bytes long

118
Popular Applications That Use
UDP
• Multimedia streaming
– Retransmitting lost/corrupted packets is not worthwhile
– By the time the packet is retransmitted, it’s too late
– E.g., telephone calls, video conferencing, gaming
• Simple query protocols like Domain Name System
– Overhead of connection establishment is overkill
– Easier to have application retransmit if needed

“Address for www.cnn.com?”

119 “12.3.4.15”
TCP/IP Protocol Graph
TCP
• Connection oriented
• Reliable
• Divides outgoing messages into segments
• Reassembles messages at the destination
station
• Resends anything not received
• Reassembles messages from incoming
segments
TCP Segment Format
Port Numbers
Transmission Control Protocol (TCP)

• Connection oriented
– Explicit set-up and tear-down of TCP session
• Stream-of-bytes service
– Sends and receives a stream of bytes, not messages
• Reliable, in-order delivery
– Checksums to detect corrupted data
– Acknowledgments & retransmissions for reliable delivery
– Sequence numbers to detect losses and reorder data
• Flow control
– Prevent overflow of the receiver’s buffer space
• Congestion control
– Adapt to network congestion for the greater good

124
An Analogy: Talking on a Cell Phone

• Alice and Bob on their cell phones


– Both Alice and Bob are talking
• What if Alice couldn’t understand Bob?
– Bob asks Alice to repeat what she said
• What if Bob hasn’t heard Alice for a while?
– Is Alice just being quiet?
– Or, have Bob and Alice lost reception?
– How long should Bob just keep on talking?
– Maybe Alice should periodically say “uh huh”
– … or Bob should ask “Can you hear me now?” 

125
Some Take-Aways from the Example

• Acknowledgments from receiver


– Positive: “okay” or “ACK”
– Negative: “please repeat that” or “NACK”
• Timeout by the sender (“stop and wait”)
– Don’t wait indefinitely without receiving some response
– … whether a positive or a negative acknowledgment
• Retransmission by the sender
– After receiving a “NACK” from the receiver
– After receiving no feedback from the receiver

126
Challenges of Reliable Data Transfer

• Over a perfectly reliable channel


– All of the data arrives in order, just as it was sent
– Simple: sender sends data, and receiver receives data
• Over a channel with bit errors
– All of the data arrives in order, but some bits corrupted
– Receiver detects errors and says “please repeat that”
– Sender retransmits the data that were corrupted
• Over a lossy channel with bit errors
– Some data are missing, and some bits are corrupted
– Receiver detects errors but cannot always detect loss
– Sender must wait for acknowledgment (“ACK” or “OK”)
– … and retransmit data after some time if no ACK arrives

127
TCP Support for Reliable
Delivery
• Checksum
– Used to detect corrupted data at the receiver
– …leading the receiver to drop the packet
• Sequence numbers
– Used to detect missing data
– ... and for putting the data back in order
• Retransmission
– Sender retransmits lost or corrupted data
– Timeout based on estimates of round-trip time
– Fast retransmit algorithm for rapid retransmission

128
Tearing Down the Connection
B

A
time

• Closing the connection


– Finish (FIN) to close and receive remaining bytes
– And other host sends a FIN ACK to acknowledge
– Reset (RST) to close and not receive remaining bytes

129
Sending/Receiving the FIN
Packet
• Sending a FIN: close() • Receiving a FIN: EOF
– Process is done sending – Process is reading data
data via the socket from the socket
– Process invokes “close()” – Eventually, the attempt to
to close the socket read returns an EOF
– Once TCP has sent all of
the outstanding bytes…
– … then TCP sends a FIN

130

También podría gustarte