1 / 35

CMPE 150 – Winter 2009

CMPE 150 – Winter 2009. Lecture 15 February 26, 2009 P.E. Mantey. CMPE 150 -- Introduction to Computer Networks. Instructor: Patrick Mantey mantey@soe.ucsc.edu http://www.soe.ucsc.edu/~mantey/ Office: Engr. 2 Room 595J Office hours: Tues 3-5 PM, Mon 5-6 PM*

clark
Télécharger la présentation

CMPE 150 – Winter 2009

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMPE 150 – Winter 2009 Lecture 15 February 26, 2009 P.E. Mantey

  2. CMPE 150 -- Introduction to Computer Networks • Instructor: Patrick Mantey mantey@soe.ucsc.edu http://www.soe.ucsc.edu/~mantey/ • Office: Engr. 2 Room 595J • Office hours: Tues 3-5 PM, Mon 5-6 PM* • TA: Anselm Kia akia@soe.ucsc.edu • Web site: http://www.soe.ucsc.edu/classes/cmpe150/Winter09/ • Text: Tannenbaum: Computer Networks (4th edition – available in bookstore, etc. )

  3. Syllabus

  4. Problem Assignment #6 • On class web page this afternoon • Due Tuesday, March 3

  5. Today’s Agenda • Intro to Transport Layer • Connections • Berkeley Sockets • QOS • Addressing / TSAP (of TPDU) • Flow Control / Buffering • Protocols • UDP • RTP • TCP • Congestion management • Timers / RTT estimates • Exponential backoff

  6. Text Readings • Today: • Chapter 6, Sections 6.1.1-6.1.3, 6.2.1-6, 6.3-6.5 (TCP) • Tuesday • Chapter 6, Section 6.6 (TCP Performance)

  7. Internet Layering Level 5 -- Application Layer (rlogin, ftp, SMTP, POP3, IMAP, HTTP..) Level 4 -- Transport Layer(a.k.a Host-to-Host) (TCP, UDP) Level 3 -- Network Layer (a.k.a. Internet) (IP, ICMP, ARP) Level 2 -- (Data)Link Layer / MAC sub-layer (a.k.a. Network Interface or Network Access Layer) Level 1 -- Physical Layer

  8. Types of Transport Services • Connection-less versus connection-oriented. • Connection-less service: no logical connections, no flow or error control. • Connection-oriented: • Based on logical connections: connection setup, data transfer, connection teardown. • Flow and error control.

  9. Quality of Service • User may specify QoS parameters at the transport layer. • At connection setup time, user may define preferred, acceptable, and minimum values for various service parameters. • Transport layer determines whether it’s possible to provide required service based on available network service(s).

  10. Transport-Layer QoS Parameters 1 • Connection establishment delay: time to establish connection. • Connection establishment failure probability: probability connection is not established within maximum establishment time. • Throughput: bytes transferred per second measured over a time interval.

  11. Transport-Layer QoS Parameters 2 • Transit delay: time between sending a message and receiving it on the other side (measured by the transport entities). • Residual error ratio: ratio of messages in error to total messages sent. • Priority: way for user to indicate that some connections are more important. • Resilience: probability connection is terminated due to congestion, etc.

  12. Transport Layer QoS • Only few transport protocols provide QoS parameters. • Most just try to minimize residual error rate. • QoS parameters specified by transport user when connection is setup. • Desired and minimum acceptable values can be specified. • Service negotiation.

  13. Transport Service Primitives • Allow transport users (e.g., application programs) to access transport service. • Example: connection-oriented transport service primitives. PRIMITIVE TPDU Sent Meaning LISTEN (none) listen for connection CONNECT Connection Req. try to establish connection SEND DATA send data RECEIVE (none) waits for data DISCONNECT Disc. Req. try to release connection

  14. TPDU • Transport protocol data unit. • Messages sent between transport entities. • TPDUs are contained in network-layer packets, which in turn are contained in DLL frames. Frame header Packet header TPDU header TPDU payload

  15. Transport Service Primitives (3) A state diagram for a simple connection management scheme. Transitions labeled in italics are caused by packet arrivals. The solid lines show the client's state sequence. The dashed lines show the server's state sequence.

  16. Berkeley Sockets 1 • Set of transport-level primitives made available by Berkeley UNIX. • Server side: • SOCKET: create new communication end point. • BIND: attach local address to socket (once server binds address, clients can connect to it). • LISTEN: listen for connection (non-blocking). • ACCEPT: accept new connection. • SEND, RECEIVE: send and receive data. • CLOSE: release connection.

  17. Berkeley Sockets 2 • Client side: • SOCKET: create socket. • CONNECT: try to establish connection. • SEND, RECEIVE: send and receive data. • CLOSE: release connection (symmetric release).

  18. Transport Layer Addressing • Transport Layer Address • Port (TSAP) • Network Layer Address • IP address (NSAP)

  19. Addressing TSAPs, NSAPs and transport connections.

  20. Transport Protocol Issues: Addressing • Address of the transport-level entity. • TSAP: transport service access point (analogous to NSAP). • Internet TSAP: (IP address, local port). • Internet NSAP: IP address. • There may be multiple TSAPs on one host. • Typically, only one NSAP. _______________________________________ Transport Service Access Point / Network Service Access Point

  21. Example 1 • Finding the time of day from a time-of-day server. • Time-of-day server process on host 2 attaches itself to TSAP 122 and waits for requests (e.g., through LISTEN). • Application process (TSAP 6) on host 1 wants to find out the time-of-day; issues CONNECT specifying TSAP 6 as source and TSAP 122 as destination.

  22. Example 2 • Transport entity on host 1 tries to establish transport connection between its TSAP 6 and the TSAP 122 on host 2. • Transport entity on host 2 contacts process on TSAP 122; if it agrees, transport connection established.

  23. Finding Services 1 • Well-known TSAP. • Time-of-day server has been using TSAP 122 forever so every users know it. • Initial connection protocol: special process server that proxies for less well-known services. • Process server listens to set of ports at the same time. • Users CONNECT to a TSAP, and if there are no servers, process server is likely to be listening. It them spawns requested server.

  24. Finding Services 2 • Name or directory service. • Name server listens to well-known TSAP. • User sends service name and name server responds with service’s TSAP. • New services need to register with name server. • Finding the server’s network address. • Hierarchical addresses solve this problem, i.e., the NSAP is part of the TSAP.

  25. Connection Establishment • CONNECTION REQUEST and CONNECTION ACCEPTED TPDUs. • Problem: delayed duplicates. • Duplicates can re-appear and be taken as the real messages. • Solution: messages age and are discarded after some time; need to discard ack’s. • Maximum hop count. • Timestamp.

  26. Avoiding Duplicates 1 • Solution by Tomlinson (1975) + Sunshine and Dalal (1978). • 2 identically numbered TPDUs are never outstanding at the same time. • Bounded packet lifetime. • Each host has its clock. • Clock as a counter that increments itself. • #bits(counter)>= #bits(sequence number). • Clocks don’t “crash”.

  27. Avoiding Duplicates 2 • When connection setup, low-order k bits of clock used as initial sequence number. • Each connection starts numbering its TPDUs with different sequence number. • Sequence number space need to be such that by the time sequence numbers wrap around, old TPDUs with same sequence numbers have aged.

  28. Sequence Numbers versus Time 1 Seq. #’s . Linear relation between time and initial sequence number. Time

  29. Sequence Numbers versus Time 2 Seq. #’s T . Host crash: when it comes up, it doesn’t know where it were in the sequence # space. 80 . Example: T=60 sec and clock ticks once per second. . At t=30s, TPDU on connection 5 gets seq.# 80. Forbidden region Time 30 80 . Host crashes and comes up. . At t=60s, reopens connections 0~4. . At t=70s, reopens connection 5 and at t=80s, sends TPDU 80. . Old TPDU 80 still valid, and one would look like a duplicate. . To prevent this, check if it’s in the “forbidden region” and delay sequence number.

  30. Three-Way Handshake • Solves the problem of getting 2 sides to agree on initial sequence number. 2 1 CR: connection request. CR (seq=x) ACK(seq=y,ACK=x) DATA(seq=x, ACK=y)

  31. 3-Way Handshake: Delayed Duplicates 1 2 1 . Old duplicate CR. . The ACK from host 2 tries to verify if host 1 was trying to open a new connection with seq=x. . Host 1 rejects host 2’s attempt to establish. Host 2 realizes it was a duplicate CR and aborts connection. * CR(seq=x) ACK(seq=y, ACK=x) REJECT(ACK=y)

  32. 3-Way Handshake: Duplicates 2 2 1 . Old duplicate CR and ACK to connection accepted. * CR(seq=x) ACK(seq=y, ACK=x) DATA(seq=x, ACK=z) REJECT(ACK=y)

  33. Campus and CENIC Networks Mark Boolootian, Network Engineer, Information Technology Services • Campus network overview: “Hub and spokes”, 1 Gbps links, redundant architecture. • QoS – now for telephone call setup • Routing, performance monitoring • External connections: ISP, CENIC (DC, HPR), peering • costs / cost avoidance

  34. Campus /CENIC web pages • UCSC http://newnoc.ucsc.edu/ • CENIC http://calren2.ucsc.edu/nrg/ • http://www.cenic.net/operations/maps/ • Boolootian et al. on “Traffic Management” http://calren2.cenic.org/ASN/reports/bactac_files/frame.htm • http://www.cenic.net/operations/maps/

More Related