CMPE 80N Spring 2003 Week 9 - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

CMPE 80N Spring 2003 Week 9

Description:

It takes care of reliable, error-free transfer of data, and in-sequence delivery ... UDP is preferred to transfer audio/video streams ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 49
Provided by: man46
Category:
Tags: 80n | cmpe | spring | week

less

Transcript and Presenter's Notes

Title: CMPE 80N Spring 2003 Week 9


1
CMPE 80N Spring 2003Week 9
  • Introduction to Networks and the Internet

2
Announcements
  • Quiz 3 on 06.03.
  • Internet History video on Thu, 05.29.
  • Project 2 due on 06.05 (by midnight).
  • Look at the instructions on Project 2s Web page.
  • Final exam on 06.09 from 730-1030pm.
  • Comprehensive.
  • Location BE 152 and BE 165 (overflow room).

3
Today
  • TCP (contd).
  • UDP.

4
Flow Control
  • Flow control is necessary so that source doesnt
    transmit too fast for given receiver.
  • E.g., a fast server trying to send 1Gb/s data to
    a small PC.
  • Without some form of control, some data will get
    lost.

5
TCP Flow Control
  • Sliding window.
  • Receivers advertised window.
  • Size of advertised window related to receivers
    buffer space.
  • Sender can send data up to receivers advertised
    window.

6
TCP Sliding Window
7
TCP Flow Control Example
App. writes 2K of data
4K
2KSEQ0
2K
ACK2048 WIN2048
App. does 3K write
2K SEQ2048
0
Sender blocked
App. reads 2K of data
ACK4096 WIN0
ACK4096 WIN2048
2K
1K SEQ4096
Sender may send up to 2K
1K
8
Circuit- versus Packet Switching
9
Circuit Switching
  • Old telephone technology.
  • For each connection, switches establish physical
    circuit.

10
Circuit Switching - Example
Switch
Switching offices
11
Circuit Switching (contd)
  • Switches are set up at the beginning of the
    connection and maintained throughout the
    connection.
  • Network resources reserved and dedicated from
    sender to receiver.
  • Not a very efficient strategy.
  • A connection holds a physical line even during
    silence periods (when there is nothing to
    transmit)

12
Packet Switching
  • Sharing by taking turns.
  • Analogy conveyor belt in a warehouse.
  • Items are picked from the storage room and placed
    on the conveyor belt every time a customer makes
    an order.
  • Different customers may request a different
    number of items
  • Different users items may be interspersed on the
    conveyor belt (they are multiplexed).
  • Networks use a similar idea.
  • Packet switching
  • Packetize data to transfer.
  • Multiplex it onto the wire.
  • Packets from different connections share the same
    link.

13
Packet Switching Example
Payload
Header
A
C
D
B
14
Packet Switching
  • Each packet is composed by payload (the data we
    want to transmit) and header.
  • The header contains information useful for
    transmission, such as
  • Source (senders) address.
  • Destination (recipients) address.

15
Packet Switching (contd)
  • The header introduces overhead, that is,
    additional bits to be sent.
  • Tradeoff?
  • What happens if the payload is too small?
  • Or too big?

16
Circuit Switching vs Packet Switching
  • Circuit switching
  • Must set up a connection (initial delay)
  • Resources are dedicated
  • Therefore they may be used inefficiently!
  • Packet switching
  • Very small set-up delay.
  • Efficient shared use of resources.
  • But, may may result in too many packets being
    injected into the network.

17
Queuing
Packets are queued inside router, waiting to be
transmitted on outgoing link.
18
Queuing (contd)
  • What happens if packets are coming in faster than
    router is able to forward them?
  • Needs to queue the packets as they are waiting
    to be transmitted.
  • What happens when a queue becomes too long?
  • Packets are dropped!
  • How can the receiver detected that a packet was
    dropped?
  • Look at the packet sequence number!

19
Congestion
  • Total offered load exceeds what network can
    handle.
  • Congestion collapse
  • When congestion occurs, packets get dropped.
  • Due to packet loss, packets get retransmitted.
  • Congestion gets worse and worse!
  • Snow ball effect.

20
Congestion Control
  • Why do it at the transport layer?
  • Real fix to congestion is to slow down sender.
  • Use law of conservation of packets.
  • Keep number of packets in the network constant.
  • Dont inject new packet until old one leaves.
  • Congestion indicator packet loss.

21
TCP and Congestion Control
  • Interprets packet loss as an indicator of
    congestion
  • When it senses packet loss, it slows down the
    rate of packet transmission
  • When packets are received correctly, sends
    packets faster
  • Still within the limits of the sliding window

22
TCP Congestion Control
  • Like, flow control, also window based.
  • Sender keeps congestion window.
  • Goal figure out size of congestion window.
  • Trade-off?

23
TCP Congestion Control (contd)
  • Slow start Jacobson 1988
  • Connections congestion window starts at 1
    segment.
  • If segment ACKed before time out, cwincwin1.
  • As ACKs come in, current cwin is increased by 1.
  • Exponential increase 1, 2, 4, 8, etc.

24
TCP Congestion Control (contd)
  • Congestion Avoidance
  • Slow start is aggressive exponential increase.
  • Start low.
  • But increase fast until finds available
    bandwidth.
  • Then, cwin grows linearly.
  • Upper bound set by flow control, I.e., maximum
    number of packets receiver can handle.

25
TCP Congestion Avoidance
  • Congestion Avoidance
  • cwin grows linearly until it reaches receivers
    advertised window.
  • If timeout, thresholdcwin/2 and cwin1.
  • Re-enters slow-start until cwinthreshold.

26
TCP Congestion Control Example
cwin
timeout
threshold
threshold
time
27
TCP Retransmission Timer
  • When segment sent, retransmission timer starts.
  • If segment ACKed, timer stops.
  • If time out, segment retransmitted and timer
    starts again.

28
How to set timer?
  • Based on round-trip time time between a segment
    is sent and ACK comes back.
  • If timer is too short, unnecessary
    retransmissions.
  • If timer is too long, long retransmission delay.

29
TCP Segment Header
0
31
16
15
Source port
Destination port
Sequence number
Acknowledgment number
Header length
P
R
S
F
U
A
Window size
Checksum
Urgent pointer
Options (0 or more 32-bit words)
Data
30
TCP Header Fields
  • Source and destination ports identify connection
    end points.
  • Sequence number.
  • Acknowledgment number specifies next byte
    expected.
  • TCP header length how many 32-bit words are
    contained in header.
  • 6-bit unused field.

31
TCP Header Fields (contd)
  • 6 1-bit flags
  • URG indicate urgent data present urgent
    pointer gives byte offset from current sequence
    number where urgent data is.
  • ACK indicates whether segment contains
    acknowledgment if 0, acknowledgement number
    field ignored.
  • PUSH indicates PUSHed data so receiver delivers
    it to application immediately.

32
TCP Header Fields (contd)
  • Flags (contd)
  • RST used to reset connection, reject invalid
    segment, or refuse to open connection.
  • SYN used to establish connection connection
    request, SYN1, ACK0.
  • FIN used to release connection.
  • Window size how many bytes can be sent starting
    at acknowledgment number.

33
TCP Header Fields (contd)
  • Checksum checksums the headerdatapseudo-header.
  • Options provide way to add extra information.
  • Examples
  • Maximum payload host is willing to accept can be
    advertised during connection setup.
  • Window scale factor that allows sender and
    receiver to negotiate larger window sizes.

34
UDP
  • Provides connection-less, unreliable service.
  • No delivery guarantees.
  • No ordering guarantees.
  • No duplicate detection.
  • Low overhead.
  • No connection establishment/teardown.
  • Suitable for short-lived connections.
  • Example client-server applications.

35
UDP Segment Format
0 15
31
Destination port
Source port
Length
Checksum
Data
Source and destination ports identify the end
points. Length 8-byte header data. Checksum
optional if not used, set to zero.
36
TCP and UDP
  • TCP provides end-to-end communication. It takes
    care of reliable, error-free transfer of data,
    and in-sequence delivery
  • UDP has less overhead compared to TCP, but does
    not guarantee transfers
  • TCP is preferred to transfer files
  • UDP is preferred to transfer audio/video streams
  • In real-time streaming, we cannot afford the
    delay consequent to packet retransmission
  • Both protocols support multiplexing, i.e. they
    allow several distinct streams of data between
    two hosts

37
The Domain Name System (DNS)
38
DNS
  • IP addresses are not easy to remember.
  • The Domain Name System (DNS) maps IP addresses to
    host names.
  • Host name is formed by machine name followed by
    domain name.
  • Host_name.domain_name

39
DNS (contd)
  • The domain_name is formed by the institutional
    site name and the Top-Level Domain name (TLD).
  • So the host name is of the formmachine_name.Ist_s
    ite_name.TLD_name
  • Examples
  • sundance.ucsc.edu
  • soe.ucsc.edu (alias for sundance.ucsc.edu)
  • italia.cse.ucsc.edu
  • helios.jpl.nasa.gov
  • www.cnn.com

40
TLD
  • TLD names identify organization types or country
    codes.
  • Examples
  • .com Commercial org. .au Australia
  • .edu Educational site in US .ca Canada
  • .gov Government site in US .fr France
  • .mil Military organization in US .de Germany
  • .net Network site .uk Great Britain
  • .org Nonprofit organization .it Italy
  • .es Spain
  • Countries define their own internal hierarchy
    (e.g., .ac.uk, .edu.au)

41
DNS (contd)
  • Organizations can create any internal DNS
    hierarchy.
  • Authority for creating new subdomains within a
    domain name is delegated to each domain.
  • Administration of ucsc.edu has authority to
    create cse.ucsc.edu and need not contact any
    central naming authority.

42
Example of DNS Hierarchy
43
DNS Name Space
  • DNS names are managed by a hierarchy of DNS
    servers.
  • Hierarchy is related to DNS domain hierarchy
  • Root server at top of tree knows about next level
    servers.
  • Next level servers, in turn, know about lower
    level servers.

44
Example of DNS Hierarchy
45
Example of DSN Hierarchy (contd)
46
Choosing DNS Server Architecture
  • Small organizations can use a single server.
  • Easy to administer.
  • Inexpensive.
  • Large organizations often use multiple servers.
  • Reliability through redundancy.
  • Improved response time through load sharing.

47
Name Resolution
  • Resolving a name means mapping the host name to
    the IP address.
  • Reverse mapping is also possible.
  • A client computer calls a DNS server for name
    resolution
  • DNS request contains name to be resolved.
  • DNS reply contains IP address for name in request.

48
Using DNS Servers
  • Each DNS server is the authoritative server for
    the names it manages.
  • If request contains name managed by receiving
    server, that server replies directly.
  • Otherwise, request is forwarded to the
    appropriate authoritative server.
  • DNS request is originally sent to root server,
    which points at next server to use
  • Eventually, the authoritative server for the DNS
    name in the request is located and IP address is
    returned.
Write a Comment
User Comments (0)
About PowerShow.com