ITI 510 - cju.com - the homepage site of chris uriarte
Download
Report
Transcript ITI 510 - cju.com - the homepage site of chris uriarte
ITI-510
Computer
Networks
ITI 510 – Computer Networks
Meeting 4
Rutgers University Center for Applied
Computer Technology
Instructor: Chris Uriarte
Today’s Agenda
• Transport Layer Protocols
ITI-510
Computer
Networks
– Concepts
– TCP
– UDP
• Network Connectivity
• Wide Area Network Technologies
Transport Layer Protocols
ITI-510
Computer
Networks
• Transport layer protocols exist at the 4th
layer of the OSI reference model
• Conceptually between the Application layer
(e.g. A web browser using HTTP) and the
Network Layer (e.g. IP Protocol)
Transport Layer Roles
ITI-510
Computer
Networks
• Remember, the Network Layer (e.g. IP) is
responsible for the routing of packets from a source
computer to a destination computer.
– Sometimes we say that IP provides computer-tocomputer connectivity.
• Transport Layer protocols provide application-toapplication connectivity, ensuring that packets
generated from a source application (e.g. a web
browser) make it to a destination application (e.g.
web server software that delivers web pages)
– Sometimes we say that transport layer protocols
provide application-to-application or end-to-end
connectivity.
Transport Layer Functionality
ITI-510
Computer
Networks
• The transport layer provides a number of
important functions:
– Identifies the sending and receiving application.
– Some Transport Layer protocols may provide
reliability features (ensures that a packet makes
it to its destination).
– Some Transport Layer protocols may provide
flow control features (ensures that packets are
sent to a receiver at a rate that the receiver can
keep up with)
Specific Transport Layer
Protocols
ITI-510
Computer
Networks
• There are two major Transport Layer
Protocols used on networks today:
– TCP (Transmission Control Protocol)
– UDP (User Datagram Protocol)
• There are a number of differences
between these two protocols, mainly in
the areas related to:
– Reliability
– Overhead
– Flow Control
Important Transport Layer
Concepts: Port Numbers
• Application Identification
ITI-510
Computer
Networks
– Since Transport Layer protocols are responsible
for routing traffic between the correct sending
and receiving applications, we need to identify
what application a packet should be associated
with.
– To address this issue, each transport layer
packet not only contains a source and
destination IP address, but also contains a
source and destination port number.
– The source and destination port number is the
unique application identifier between the
sending and receiving hosts.
Port Numbers
ITI-510
Computer
Networks
• When a host initializes a connection with a
peer, it must know the port number of the
destination application.
– How does a client computer know what port
number is associated with a server application
that it is trying to contact?
– There must be some type of arrangement
between the client software and the server
software so the client knows what port to
contact on the server.
– Often, this arrangement is defined by a
standards body, which publishes a list of wellknown port numbers.
• For example: All web servers must use port 80, so
web browsers know to request web pages from port
80.
Some Well-Known Port Numbers
• Examples of well-known port numbers:
ITI-510
Computer
Networks
–
–
–
–
–
Telnet: Port 23
FTP: Port 21
Web/HTTP: Port 80
Email/SMTP: Port 25
SSH: Port 22
• Therefore, servers that implement the
following protocols will “listen” for packets
on their respective port numbers.
Connectionless vs. Connection
Oriented
ITI-510
Computer
Networks
• There are two connection techniques used
to pass packets between applications.
– A connectionless protocol sends packets to a
peer computer one at a time and generally does
not know if the packet reached its destination
successfully or in one piece. (Throw the packet
over the fence and hope it gets there; Analogy:
Sending a letter via the mail)
– A connection-oriented protocol establishes a
full-duplex (two way) connection with a peer
and is aware of errors, lost packets and failed
connections (Analogy: Sending a message by
placing a telephone call)
User Datagram Protocol (UDP)
ITI-510
Computer
Networks
• UDP is a Transport Layer Protocol that
provides unreliable data transfer between
applications.
• UDP utilizes a connectionless service
paradigm (there is no interactive session
between applications).
• Engineered for sending small amounts of
data between applications (small database
queries, simple messaging and monitoring
protocols, etc.)
• Quick and Efficient: Requires very little
overhead to send and receive a message.
Transmission Control Protocol (TCP)
ITI-510
Computer
Networks
• TCP is a Transport Layer Protocol that
provides reliable connectivity between
applications – it ensures that packets
make it to their final destination.
• Uses a connection-oriented service
paradigm, establishing two-way
communication between host computers.
• Provides enhanced data flow and reliability
features.
Using TCP and UDP as
Transport Layer Protocols
ITI-510
Computer
Networks
• TCP and UDP each have different packet structures,
but their use is consistent with the general rules of
the OSI reference model.
• When data is created at the application layer, it is
passed down to the transport layer. The TCP or
UDP packet is then formed using the application
data.
• The TCP or UDP packet is then passed down to the
Network layer.
• TCP and UDP are exclusively used with IP at the
network layer, so we often use the term “TCP/IP”
or “UDP/IP” which signifies that we are using
these Transport Layer and Network Layer protocol
combinations.
Sending Data With TCP/IP
ITI-510
Computer
Networks
• To achieve reliability, TCP uses an
“acknowledgement” protocol between
sender and receiver.
• When a packet is sent from a sending
host, the receiving host “acknowledges”
the reception of the packet, which lets the
sender know that the packet was
successfully received.
• The sender assigns each packet a unique
segment number, so the receiver can
associated an “ACK” with the particular
segment number.
Example of TCP Transmission an
Acknowledgements
ITI-510
Computer
Networks
Host A
Host B
Send Segment 1
ACK Segment 1
Send Segment 500
ACK Segment 500
Send Segment 2
Implementation of Reliability
Features in TCP
ITI-510
Computer
Networks
• Remember: One of TCP’s core features is
its ability to provide reliable transport of
data between hosts.
• Therefore, TCP utilizes a retransmission
scheme used to retransmit packets that
have not been acknowledged by the
receiving hosts.
• After sending a packet, TCP keeps starts a
timer. If the sender does not receive and
acknowledgement for a sent packet before
the timer expires, the packet is
retransmitted.
Example: TCP Retransmission
ITI-510
Computer
Networks
Host A
Send Segment 1
Retransmission
Timer
Host B
(Packet Lost)
Re-transmit Segment 1
ACK Segment 1
Send Segment 500
ACK Segment 500
Send Segment 2
TCP: Determining the
Transmission Timeout
• How fast should the re-transmission timer be?
ITI-510
Computer
Networks
– If it’s too small, we may re-transmit many
unnecessary packets.
– If it’s too big, we may be waiting around for a long
time before we re-transmit.
• TCP’s answer: Calculate an adaptive
retransmission timer for TCP sessions.
– Based on the average round trip time between hosts,
TCP will calculate an optimal retransmission time for
that particular connection.
– This allows connections to hosts on slow links to have
longer re-transmission times and connections to
hosts on fast links to to have small re-transmission
timers.
TCP Flow Control
ITI-510
Computer
Networks
• If we must wait for an “ACK” for each
packet before sending another packet, we
could be reducing our overall throughput
(send-wait-ack;send-wait-ack, etc.)
• Therefore, TCP allows a sender to transmit
a series of packets without receiving an
“ACK” before sending another packet.
(send-send-send-send-wait-ack)
• The receiving host advertises a window,
which specifies how many packets a
sending host can send before receiving an
“ACK”.
TCP Transmission Window
Example
ITI-510
Host A
Host B
Window
Advertisement:
“Send me up to 5
packets without
receiving an ACK”
Computer
Networks
Send Segments 1-5
ACK Segments 1-5
Send Segments 5-10
WAIT for an ACK
before sending another
packet
ACK Segments 5-10
TCP Startup and Shutdown
ITI-510
Computer
Networks
• TCP Utilizes a “3-way Handshake” to initiate a
connection.
– Before data is transmitted between hosts, the host
that initiates the connection sends a special “SYN”
(synchronize) packet to the the destination host.
– The destination host acknowledges the receipt of the
“SYN” packet and sends its own “SYN” packet (this is
known as the SYN-ACK stage).
– The initiating host responds with one additional “ACK”
and the connection is considered established. Hosts
can now begin transmitting data to each other.
– This startup process is sometimes described as “SYN,
SYN-ACK, ACK”
• The shutdown of a connection is similar, but a twoway handshake is used.
– The host closing the connection sends a “FIN” and
the receiving hosts returns an “ACK” (FIN-ACK). The
connection is then considered terminated.
Closed Connections – Not quite
Closed
ITI-510
Computer
Networks
• After hosts have officially closed the TCP
connection (FIN-ACK), the connection
actually stays open for a period of time to
allow any lost packets to be retransmitted.
• This state is known as the 2MSL or MSL2
state. (MSL = “Maximum Segment
Length).
• The duration of the MSL2 state varies, and
depends on the average round trip time of
segments between hosts.
Connection Close and MSL2
State Example
Host A
ITI-510
Computer
Networks
Send Segment 100
Host B
Retransmission
Timer
(Packet Lost)
FIN Request to End
Connection
ACK to FIN request
MSL2 State
Re-Transmit
Segment 100
ACK Segment 100
Physical Network Connectivity
ITI-510
Computer
Networks
• There are many different ways to
physically connect devices to a network
and to connect networks to other
networks.
• Many different types of telecommunication
technologies and hardware solutions are
utilized to connect networks.
Types of LAN Network
Technologies
ITI-510
Computer
Networks
• Today, several physical network technologies are
used on Local Area Networks.
• The most popular today are:
– Fast Ethernet (or 100BaseT) – moves data at
100MB/Sec
– Ethernet (10BaseT used today for start topologies;
10Base2 is a legacy technology used for Bus
networks) – moves data at 10MB/sec
– Gigabit Ethernet (1000BaseT uses standard Ethernet
cables; 1000BaseFX uses Fiber Optic cables) –
moves data at 1000MB/sec. Still an expensive
technology.
• Each of the technologies today can utilize a
standard “Category 5” network cable, except
1000BaseFX, which uses a Fiber Optic cable.
Host-level Physical Connectivity
ITI-510
Computer
Networks
• Hosts are connected to a LAN using a
Network Interface Card (NIC).
• The type of NIC used depends on the type
networking technology used on its Local
Area Network (LAN).
– e.g. In order to support Fast Ethernet
(100MB/sec), a host must have a NIC card that
supports it.
Connecting Hosts to Other Hosts
ITI-510
Computer
Networks
• There are two ways to connect a host to other
network hosts:
– Connect two hosts directly using a special “crossover
cable”.
– Connect multiple hosts via a hub or a switch
• Hubs/Switches can be connected to other
hubs/switches.
• Hubs and switches are specific to the physical
network technology being used
– E.g. a Fast Ethernet hub is required to use Fast
Ethernet between hosts on the network; A
1000BaseFX switch is required to use fiber optic
Gigabit Ethernet on a network.
• Routers and gateways usually interface with the
LAN at a hub or switch.
Hubs vs. Switches
ITI-510
Computer
Networks
• The difference between a hub and a switch is in the
internal technology of the devices.
• A Hub passes on all data it receives to ALL devices
attached to it. Technically a Hub is a categorized
as a repeater, since all data is replicated to all
devices.
– As a result, a 100MB/sec Hub provides a total of
100MB/sec bandwidth that is shared between all
devices attached to it.
• A Switch controls the flow of traffic depending on
the destination MAC address associated with each
packet. Packets are only sent to the port that the
destination device is attached to.
– A 100MB/sec Switch provides a dedicated100MB/Sec
bandwidth for each individual port.
Hubs vs. Switches (con’t)
ITI-510
Computer
Networks
• Mid-size and Large LANs benefit greatly
from using switches (in fact, it’s almost a
requirement for larger LANs – 50+
computers).
• Price used to be an issue, but switches are
now affordable for all types of
organizations and home users.
• Switches often provide advanced
management features and are the key to
scaleable networks.
WAN Technologies
ITI-510
Computer
Networks
• There are many different types of Wide
Area Network technologies used today.
• The major issues considered when
choosing WAN technologies are:
– Cost (initial and ongoing)
– Bandwidth
– Reliability
Popular WAN Technologies
ITI-510
Computer
Networks
• Dial-up POTS Modems – Still very popular today;
Supports up to 56Kbps; Low acquisition and startup
costs; Only requires a modem and a phone line;
Typically uses the Layer 2 protocol “PPP” instead of
Ethernet.
• ISDN – allows digital communication over a special
telephone line; Supports speeds up to 128Kbps;
Acquisition costs range between $200-$400;
Usually a per-minute usage charge; Typically uses
PPP; Actually installs a 2-channel digital line that
has 2 phone numbers associated with it. A special
ISDN modem allows you to dial into an ISP for
faster Internet service, or use the two lines for
regular voice features.
• Cable-based Broadband – provides very fast
connectivity over cable television coax cable;
Typically low acquisition fees, $100-$400; Supports
up to 10MB/sec (about 200X the speed of dial-up);
Providers typically limit upload and/or download
speeds; Requires a cable modem.
Popular WAN Technologies
(con’t)
ITI-510
Computer
Networks
• DLS (ADSL, SDSL, IDSL) – provides a
very fast connection over a special
telephone line; Supports up to
7.1MB/sec; Acquisition costs between
$100 and $400; Monthly costs from $40
to $1000+; Requires a DSL modem; Not
available in all areas; The farther you are
from the Telco's Central Office (CO), the
lower the speed you can achieve.
• Satellite connectivity – provides a faster
connection using a small satellite dish;
Supports up to 1MB/sec; Acquisition costs
can be as high as $2000; Requires special
hardware; Latency is very high.
Popular WAN Technologies
• T and OC-class WAN Connections
ITI-510
Computer
Networks
– The telephone company installs a point-to-point
line between your location and some other
location (typically your ISP or a branch office).
– Installation can range from $500 to $5000;
Monthly costs for basic line depends on distance
between two points and line type. Can range
between $300 and $50K
– Technologies include: T1 (up to 1.54MB/sec);
T3 (up to 45MB/sec); OC3
(155MB);OC12(622MB);OC48(2.5GB)
– Very reliable, high-performace WAN
technologies used by companies for Internet
access, remote office access; Higher speed
lines are used by network carriers and phone
companies to carry aggregate traffic.
T1/T3 WAN Connections
ITI-510
Computer
Networks
• Typically utilized by companies for Internet access
or to interconnect remote offices.
• Requires you to first provision Internet service
through a provider and then provision a T1/T3 to
the provider’s POP (point of presence)
• T1/T3 line terminates at a device called a
CSU/DSU, which plugs into a standard router.
• Bandwidth can be subscribed to in partial
increments (e.g Partial T1 or Partial T3;
128K,256K,512K,768K,1MB,1.54MB,2MB,3MB,
etc.)
• Total costs includes line fee (paid to Telco) plus
bandwidth fee paid to ISP if being used for Internet
connectivity. Typical full T1 Internet access costs
around $1300/mo total in most major areas.