Computer Networks Exam 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/58

encourage image

There's no tags or description

Looks like no tags are added yet.

59 Terms

1
New cards

Transport layer

Provides for logical communication between application processes running on different hosts

(Logical in the sense that application sees the processes as directly connected)

Only implemented in end systems

2
New cards

Network layer

Provides logical communication between hosts

3
New cards

User Datagram Protocol (UDP)

Transport layer protocol which provides unreliable, connectionless service (no handshake)

Delivers data from process to process

Provides integrity checking through the checksum field in the segment header

Unregulated, so no flow or congestion control

4
New cards

Transmission Control Protocol

Transport layer protocol which provides reliable, connection-oriented service (three way handshake)

Delivers data from process to process

Provides integrity checking through checksum field in the segment header

Provides reliable, in-order data transfer, flow control, and congestion control

5
New cards

Internet Protocol

Network-layer protocol which provides best-effort/unreliable delivery service

No guarantees or delivery, timing, or integrity

6
New cards

Socket

Door through which data passes from the network to a process or vice versa

Processes may have more than one of these

7
New cards

Demultiplexing

Receiver uses special header info fields to deliver segments to correct socket

8
New cards

Multiplexing

Sender handles data from multiple sockets and adds a transport header

9
New cards

UDP socket identification

(destination IP address, destination port number)

10
New cards

TCP socket identification

(source IP address, source port number, destination IP address, destination port number)

11
New cards

Web server socket methodology

Use one process and create a new thread with a new connection socket for each new client connection.

Frequent creating and closing of sockets can severely impact the performance of a busy Web server.

12
New cards

Benefits of UDP over TCP

  • Finer application-level control over what data is sent, and when

    • Bypasses congestion control throttling and reliable delivery slow-downs

    • Good for real-time applications

  • No connection establishment

    • Bypass connection delay

  • No connection state

    • More active clients can be supported without the need for connection state

  • Smaller packet header overhead


13
New cards

TCP connection state

  • Receive and send buffers

  • Congestion-control parameters

  • Sequence and acknowledgment number parameters


14
New cards

TCP segment header size

20 bytes

15
New cards

UDP segment header size

8 bytes

16
New cards

Applications and protocols which run over TCP


  • Electronic mail - SMTP

  • Remote terminal access - Telnet

  • Secure remote terminal access - SSH

  • Web - HTTP/1 or 2

  • File transfer - FTP

  • Streaming multimedia - DASH

  • Internet telephony


17
New cards

Applications and protocols which run over UDP

  • Remote file server - NFS

  • Web - HTTP/3

  • Remote file server - NFS

  • Network management - SNMP

  • Name translation - DNS

  • Internet telephony


18
New cards

UDP segment structure

  • Source port #

  • Destination port #

  • Length

  • Checksum

  • Application data


19
New cards

End-end principle

Functions placed at the lower levels may be redundant or of little value when compared to the cost of providing them at the higher level.

20
New cards

Reliable channel

No transferred data bits are corrupted and all are delivered in the order in which they were sent

This service abstraction is implemented by a reliable data transfer protocol

21
New cards

RDT1.0 - Over a perfectly reliable channel

  • Packet flow is only from sender to receiver

  • Receiver side provides no feedback to the sender since nothing can go wrong


22
New cards

RDT2.0 - Over a channel with bit errors

  • Bits in the packet may be corrupted but packets are in order

  • Uses both positive and negative acknowledgements to signify what has been received correctly or incorrectly

  • Retransmission required if incorrect

  • Stop and wait protocol because the sender will not send a new piece of data until the receiver has correctly received the current packet

  • Flaw: ACK or NAK may be corrupted


23
New cards

Automatic Repeat reQuest (ARQ) protocols

Reliable data transfer protocol based on retransmission

Require:

  1. Error detection

  2. Receiver feedback

  3. Retransmission


24
New cards

RDT2.1 - Solution for rdt2.0 corrupted ACK or NACK

Alternate solution:

  • Sender requests repeated reply from receiver

    • Request may also be corrupted

  • Add enough checksum bits to allow the sender to detect and recover from bit errors

Implemented solution:

  • Sender resends the current data packet when it receives a garbled ACK or NAK packet

    • Introduces duplicate packets into the sender-to-receiver channel

    • Add a sequence number field which the receiver can check to determine whether or not the received packet is a retransmission

      • 1-bit sequence number suffices in stop-and-wait protocols


25
New cards

RDT3.0 - Over a lossy channel with bit errors

  • In addition to corrupting bits, the underlying channel can lose packets as well

  • Approach to solve this is for the sender to choose a time value such that packet loss is likely, although not guaranteed to have happened

  • After counter timeout, packet is resent

  • If duplicate packets are sent, the receiver will detect this based on the sequence number

  • Also known as the alternating-bit protocol


26
New cards

RDT2.2 - NAK free

  • Instead of sending a NAK, send an ACK for the last correctly received packet

  • Duplicate ACKs signify that the receiver did not correctly receive the packet following the packet that is being ACKed twice


27
New cards

Pipelining

Sender is allowed to send multiple packets without waiting for acknowledgements

  • Range of sequence numbers must be increased

  • Sender and receiver sides of the protocols may have to buffer more than one packet

  • Pipelined error recovery required

    • Go-Back-N

    • Selective repeat


28
New cards

Go-Back-N (GBN) protocol

Sender is allowed to transmit multiple packets (when available) without waiting for an acknowledgement but is constrained to have no more than some maximum allowable number, N, of unacknowledged packets in the pipeline.

  • N referred to as the window size

  • GBN protocol is a sliding-window protocol

  • If there are not N outstanding, unacknowledged packets, sender can send

  • ACKS are cumulative, indicating all packets up to its sequence number have been received

  • For lost or overly delayed packets, a timeout will occur and the sender will resend all packets that have been previously sent but not acknowledged

  • Timer times the oldest transmitted but not yet acknowledged packet

  • Receiver discards out of order packets and ACKs for most recently received in-order packet

  • Single packet error can cause a large number of packets to be retransmitted


29
New cards

Selective repeat protocol

Avoids unnecessary retransmissions by having the sender retransmit only those packets which were received in error (lost or corrupted) at the receiver

  • Windows size N limits the number of outstanding, unacknowledged packets

  • Sender will have already received ACKs for some of the packets in the window

  • Each packet must have its own timer, since only a single packet will be transmitted on timeout

  • Receiver ACKs and buffers out-of-order packets within the receive window until missing packets are received

  • Receiver acknowledges received packets with sequence numbers below the current window base to move the sender window forward


30
New cards

Packet reordering

Channel can be thought of as essentially buffering packets and spontaneously emitting these packets at any point in the future.

Ex. an old copy of a packet appears even though neither the sender or receiver window contains it

To guard against duplicate packets and their reused sequence numbers:

  • Ensure that a sequence number is not reused until the sender is “sure” that any previously sent packets with sequence number x are no longer in the network.

  • Done by assuming a packet cannot “live” in the network for longer than some fixed maximum amount of time.


31
New cards

TCP connection

  • Full-duplex service

  • Point-to-point, between a single sender and a single receiver

  • Three segments are sent to establish the connection, known as three-way handshake


32
New cards

Maximum segment size (MSS)

The maximum amount of data that can be grabbed and placed in a segment

Does not include the TCP/IP headers

Must fit in MTU

Has typical value of 1460 bytes

33
New cards

Maximum transmission unit (MTU)

The length of the largest link-layer frame that can be sent by the local sending host

Includes TCP/IP headers

Ethernet and PPL link-layer protocols have ___ of 1500 bytes

34
New cards

TCP header

  • Source port #

  • Destination port #

  • Checksum

  • Sequence number

  • Acknowledgement number

  • Receive window

  • Header length

  • Options

  • Flag

  • Urgent data pointer field


35
New cards

TCP sequence number

The byte-stream number of the first byte in the segment sent to a host

36
New cards

TCP acknowledgement number

The sequence number of the next byte which the Host A expects to receive from Host B

37
New cards

Exponential weighted moving average (EWMA)

More weight is placed on recent samples than on old samples.

The weight of a sample decays exponentially fast as updates proceed

38
New cards

TCP fast retransmit mechanism

The receipt of three duplicate ACKs for a given segment serves as an implicit NAK for the following segment, triggering retransmission of that segment before timeout

The sender will receive the original ACK for the last received data and then three additional ACKs for the same data (there is a gap and the new data is not what is expected)

39
New cards

TCP selective acknowledgement

Allows a TCP receiver to acknowledge out-of-order segments selectively rather than just cumulatively acknowledging the last correctly received, in-order segment

40
New cards

TCP flow-control service

Eliminates the possibility of the sender overflowing the receiver’s buffer.

Matches the rate at which the sender is sending against the rate at which the receiving application is reading.

41
New cards

TCP receive window

Gives the sender an idea of how much free buffer space is available at the receiver

LastByteRcvd - LastByteRead <= RcvBuffer

rwnd = RcvBuffer - [LastByteRcvd - LastByteRead]

Sender tracks that in order to not overflow the rwnd:

LastByteSent - LastByteAcked <= rwnd

When rwnd is 0, sender must continue to send segments with one data byte until an ACK returns with a nonzero rwnd value.

42
New cards

Establishing a TCP connection

  • Client sends TCP SYN segment

  • Server allocates buffers and variables and sends a connection-granted, SYN-ACK segment

  • Client allocates buffers and variables and acknowledges the server’s connection-granted segment


43
New cards

Fast open/ 0-RTT handshaking

A cookie is provided by the server to the client

It encodes all the connection information needed in a future connection

44
New cards

Closing a TCP connection

  • The client sends a special TCP FIN segment

  • The server sends an ACK segment

  • The server sends a TCP FIN segment back

  • The client sends an ACK segment

All buffers and variables are deallocated

45
New cards

SYN flood attack

A Denial of Service attack where attackers send a large number of TCP SYN segments without completing the third handshake step

The server’s connection resources become exhausted as they are allocated but never used for half-open connections

46
New cards

Costs of congestion

  • Increased queuing delay as the packet arrival rate to a congested link nears its capacity

  • Decreased application-to-application throughput due to the presence of retransmitted packets

  • Potential for congestion collapse


47
New cards

Goal of congestion

For N connections, set their transport layer’s sending rates so that their aggregate sending rate is close to, but does not exceed, the bottleneck link capacity

48
New cards

End-to-end congestion control

Congestion must be inferred by the end systems based only on observed network behavior (ex. packet loss and delay)

49
New cards

Network-assisted congestion control

Routers provide explicit feedback to the sender and/or receiver regarding the congestion state of the network

50
New cards

Congestion window

Imposes a constraint on the rate at which a TCP sender can send traffic into the network

The sender’s send rate is roughly cwnd/RTT bytes/sec. By adjusting the value of cwnd, the sender can therefore adjust the rate at which it sends data into its connection.

51
New cards

TCP maximum amount of unacknowledged data at sender

LastByteSent - LastByteAcked <= min{cwnd, rwnd}

52
New cards

TCP congestion control

Infers congestion based on a loss event

Self-clocking because it uses acknowledgements to trigger/clock its increase in congestion window size

53
New cards

Classic TCP congestion control - Slow-start state

The value of cwnd begins at 1 MSS and increases by 1 MSS every time a transmitted segment is first acknowledged.

Results in a doubling of the sending rate every RTT

Starts slow but grows exponentially fast

When congestion is detected:

  • Sets cwnd value to 1 MSS

  • Sets ssthresh to cwnd/2

  • When ssthresh is equal to cwnd ushers in the next state


54
New cards

Classic TCP congestion control - Congestion-avoidance state

Increases the value of cwnd by just a 1 MSS every RTT

When congestion is detected:

  • Timeout-indicated loss

    • Sets cwnd value to 1 MSS

    • Sets ssthresh to cwnd/2

  • Triple ACK loss

    • Halves the value of cwnd + 3 MSS

    • Sets ssthresh to cwnd/2


55
New cards

TCP congestion control - Reno fast recovery

After triple duplicate ACKs, reduces the congestion window and recovers without resetting to 1 MSS as a timeout would

56
New cards

TCP congestion control - Cubic

Uses cubic window growth around the window size at a previous congestion event, increasing cautiously near that earlier size

57
New cards

TCP congestion control - Bottleneck bandwidth and RTT

Uses estimates of bottleneck bandwidth and minimum RTT to keep the path busy while limiting persistent queue buildup

58
New cards

TCP congestion control - Vegas: Delay-based

Uses measured RTT delay to proactively detect congestion onset, hopefully before packet loss occursT

59
New cards

TCP congestion control - Tahoe

Cut its congestion window to 1 MSS and entered slow-start phase after either a timeout-indicated or triple-duplicate-ACK-indicated loss event