Transport layer and by fuk43069

VIEWS: 0 PAGES: 5

									                                                                                 Application

                   Transport layer and                                           Transport

                         U(DP)!                                                   Network
                      Chapter 5.1 in the textbook

                                                                                    Link


                                                                                  Physical




                                Application                                      Application


                                Transport                                        Transport


                                 Network                                          Network
                                                    Routers*




                                   Link                                             Link


                                 Physical                                         Physical




                                Application
                                                                   Transport layer
                                                    • Different transport layers do different things
                                Transport
                                                     • Hard to come up with a good definition that
                                                               covers all them
Hosts




                                 Network
                                                    • The minimal definition is:
        Routers*




                                   Link              • Provides communication from one process to
                                                               another process
                                 Physical                • In code, transport layer provides sockets
                                                                User Datagram
                 Transport layer
                                                                   Protocol
       • Typically we want to overcome the               • UDP is (almost) the lightest transport
          shortcomings of the network layer                protocol we could come up with
         • Dropped packets                               • UDP does exactly two things:
         • Out-of-order packets                           • Multiplexing (ports)
         • Corrupted packets                              • Checksumming (error detection)
       • UDP does very little of this; TCP does all of   • What about all those other things we
          this                                             would like at the transport layer?




                                                                           0
                                                                           1
                                                                           2
                                                                           3
                                                                           4
        Internet                                         Internet
                                                                           5


                                                                          ...

                                      129.100.65.123                                     129.100.65.123
                                                                        65535




                         0                                                 0
                         1                                                 1
                         2                                                 2
  S: 1.2.3.4:34012       3                                                 3
D: 129.100.65.123:5
                         4                                                 4
        Internet                                         Internet                 S: 1.2.3.4:34012
                         5                                                 5
                                                                                D: 129.100.65.123:5

                         ...                                              ...

                                      129.100.65.123                                     129.100.65.123
                       65535                                            65535
                              Message for:
                                  Joe
Internet                      Internet




               Message for:
                   Joe




Internet                      Internet




Message for:
    Bill
Internet                      Internet


                                             Message for:
                                                 Bill
Internet   Internet




Internet   Internet




                      Well-known ports
              • There are two ways to know which port to
                connect to

Internet
                • “Well-known” ports defined by RFCs
                 • HTTP is TCP/80, DNS is UDP/53, etc.
                • Have one “well-known port” called a port
                  mapper (TCP/111 and UDP/111)
                  • Query the port mapper when you want to
                      know which port a service is on
                                                                                   User Datagram
                                                                                      Protocol
                                                                          • UDP offers ports and checksumming and
                                                                              that’s it
                                                                                                                    16 bits
                      • BitTorrent typically runs on some
                        well-known ports                                          Source port                   Destination port
                      • It’s easy to throttle content based
                        only on source/destination ports
                      • Bell’s throttling further than that,                     Payload length                   Checksum
                        looking at packets at the
                        application layer




UDP: User Datagram Protocol                        [RFC 768]          UDP: more
! “no frills,” “bare bones”                                           ! often used for streaming
  Internet transport                                                      multimedia apps                                   32 bits
                                 Why is there a UDP?
  protocol                                                                 " loss tolerant                      source port #    de s t p o r t #
                                 ! no connection                                                   Length, in
! “best effort” service, UDP       establishment (which can                " rate sensitive     bytes of UDP       length             checksum
  segments may be:                 add delay)                                                       segment,
                                                                      !   other UDP uses            including
   " lost                        ! simple: no connection state            " DNS                       header
   " delivered out of order        at sender, receiver
     to app                                                               " SNMP
                                 ! small segment header                                                                Application
                                                                      ! reliable transfer over UDP:
!   connectionless:              ! no congestion control: UDP                                                            data
                                                                        add reliability at
    "   no handshaking between     can blast away as fast as                                                           (message)
                                                                        application layer
        UDP sender, receiver       desired
                                                                         " application-specific
    "   each UDP segment
                                                                            error recovery!
        handled independently                                                                                      UDP segment format
        of others

                                                       CS357b    16                                                                     CS357b      17

								
To top