Network Transport & UDP Flashcards

1
Q

Hourglass model of the Internet

A
  • Few network protocols
    – They are the ‘glue’ that allow inter-operation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Transport services and protocols

A
  • Provide logical communication between app processes running on different hosts
  • Transport protocols run in end system
    • Send side: breaks app messages into segments, passes to network layer
    • Receiver side: reassembles segments into messages, passes to app layer
  • More than one transport protocol available to apps
    • Internet: TCP and UDP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Transport Layer service (Service Types)

A
  1. Connection-oriented service
    - 3 Phases: connection set-up, data transfer, disconnect
  2. Connectionless service
    - Transfer of isolated units
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Transport Layer service (Aim)

A

– To Improve the Network Service quality that applications get from the network layer, e.g.:
* Reliable service
* Ensuring integrity of data passed to applications

– Can not guarantee delay or bandwidth guarantees (if the network layer does not provide those guarantees)

  • Essentially a socket-to-socket communication service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Internet Transport Layer

A
  • Lowest level end-to-end protocol
  • Transport header generated by sender is interpreted only by destination
  • Routers / gateways view transport header as part of the payload – they only see the Network (IP) header
  • Can add extra functionality to the best effort packet delivery service provided by IP
    – Can make up for some of the shortcomings of core network
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Transport vs Network layer

A
  • Network layer: logical communication between hosts
  • Transport layer: logical communication between processes
    – Relies on, enhances, network layer services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Transport vs Network Layer (household analogy)

A

12 kids in Ann’s house sending letters to 12 kids in Bill’s house:
* Hosts = houses
* Processes = kids
* App messages = letters in envelopes
* Transport protocol = Ann and Bill who demux to in-house siblings
* Network-layer protocol = postal service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Reminder: Layer relationship

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Internet transport-layer protocols

A
  • Reliable, in-order delivery: TCP (and QUIC)
    – Congestion control
    – Flow control
    – Connection setup
  • Unreliable, unordered delivery: UDP
    – No-frills extension of “besteffort” IP
  • Services not available:
    – Delay guarantees
    – Bandwidth guarantees
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Some Transport Layer functions

A
  • Multiplexing/de-multiplexing data for multiple
    applications
    – Uses “port’’ abstraction
  • Connection establishment
    – Logical end-to-end connection
  • Error control
    – Hides unreliability of network layer from applications
    * Corruption, loss, duplication, reordering
  • End-to-end flow control
    – To avoid flooding the receiver
  • Congestion control
    – To avoid flooding the network
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Multiplexing/ Demultiplexing

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How demultiplexing wokrs

A
  • Host receives IP datagrams
    • Each datagram has source IP address, destination IP address
    • Each datagram carries one transport-layer segment
    • Each segment has source, destination port number
  • Host uses IP addresses & port numbers to direct segment to appropriate socket
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Connectionless demultiplexing

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Connectionless demux: example

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Connection-oriented demux

A
  • TCP socket identified by 4- tuple:
    • Source IP address
    • Source port number
    • Dest IP address
    • Dest port number
  • demux: receiver uses all four values to direct segment to appropriate socket
  • Server host may support many simultaneous TCP sockets:
    • Each socket identified by its own 4-tuple
  • Web servers have different sockets for each connecting client
    • Non-persistent HTTP will have different socket for each request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Connection-oriented demux:
example

A
17
Q

UDP: User Datagram Protocol

A
  • “Best effort” service, UDP segments may be:
    – Lost
    – Delivered out-of-order to app
  • Connectionless:
    – No handshaking between UDP sender, receiver
    – Each UDP segment handled independently of others
  • UDP is “mostly IP with a short transport header”
    – Source and destination port
    – Ports allow for dispatching of messages to receiver process
  • UDP use:
    – Streaming multimedia apps
    (loss tolerant, rate sensitive)
    – DNS
    – SNMP
  • Reliable transfer over UDP:
    – Add reliability at application layer
    – Application-specific error recovery!
18
Q

UDP: segment header

A
19
Q

why is there a UDP

A
  • No connection establishment (which can add delay)
  • Simple: no connection state at sender, receiver
  • Small header size (only 8 bytes)
  • No congestion control: UDP can blast away as fast as desired
20
Q

UDP length limits

A
  • Length in bytes (UDP header and data)
    – Minimum is 8 bytes (length of UDP header)
    – Maximum is
    * Length field is 16 bits, so 216 - 1 = 65,535 is the max. value
    * 65,535 – (UDP header) – (Minimum IP* header)
    * 65,535 – 8 – 20 = 65,507 bytes
21
Q

UDP Checksum (Goal)

A

Detect “ errors ” (e.g., flipped bits) in transmitted segment

22
Q

UDP Checksum (Sender)

A

– Treat segment contents, including header fields, as sequence of 16-bit integers
– Checksum: addition (one’s complement sum) of segment contents
– Sender puts checksum value into UDP checksum field

23
Q

UDP Checksum (Receiver)

A

– Compute checksum of received segment
– Check if computed checksum equals checksum field value:
* NO - error detected
* YES - no error detected. But maybe errors nonetheless?
More later …

24
Q

UDP checksum (cont.)

A
  • Basically a 16 bit sum of words in packet
    – Note: we’ll see the same algorithm in detail when we look at IP
  • Covers network-layer (IP) and UDP headers +
    payload

– But UDP layer doesn’t know internals of network layer…

25
Q

UDP IPv4 pseudo header

A
  • UDP checksum based on pseudo header not
    real one
    – Protocol must = 17 (UDP)
    – Source and dest. addresses must match real IP header
    – UDP length must match value in UDP header
26
Q

UDP IPv4 pseudo header (cont.)

A
  • Pseudo header never actually sent over the network
  • Can be recreated on the receiving side easily to verify integrity
  • Used because the source and destination
    addresses are intrinsic to the meaning of a
    packet
    • Though they are not part explicitly part of the UDP header
    • Not included in the send packet to avoid duplication
27
Q

Checksum Calculation - Example 1

A

Checksum is 16 bits long so we need to truncate the result.

Add the overflow bit to the rest 16 bits!

28
Q

Checksum Calculation - Example 2

A
29
Q

What layer is ICMP?

A
  • RFC 792: “ICMP uses the basic support of IP as if it were a higherlevel protocol, however, ICMP is actually an integral part of IP, and must be implemented by every IP module.”
30
Q

How does a sender know what port number to use ?

A
  • The port numbers ranging from 0 to 1023 are called wellknown port numbers and are restricted
  • These well-known ports are reserved for use by the well-known application protocols such as HTTP (port 80) and FTP (port 21)
  • The list of well-known port numbers is given in RFC 1700
  • Developers designing applications (“server” side of P2P or client/server applications) must determine which ports to use for each protocol they design