Week 5
Week 5
The optional and variable-length options field is used when a sender and
receiver negotiate the maximum segment size (MSS) or as a window
scaling factor for use in high-speed networks. A time-stamping option is
also defined.
The flag field contains 6 bits. The ACK bit is used to indicate that the value carried
in the acknowledgment field is valid; that is, the segment contains an
acknowledgment for a segment that has been successfully received. The RST, SYN,
and FIN bits are used for connection setup and teardown, as we will discuss at the
end of this section. Setting the PSH bit indicates that the receiver should pass the
data to the upper layer immediately. Finally, the URG bit is used to indicate that
there is data in this segment that the sending-side upper-layer entity has marked as
“urgent.” The location of the last byte of this urgent data is indicated by the 16-bit
urgent data pointer field. TCP must inform the receiving-side upper-layer entity
when urgent data exists and pass it a pointer to the end of the urgent data.
https://packetlife.net/blog/2011/mar/2/tcp-flags-psh-and-urg/
http://www.firewall.cx/networking-to
pics/protocols/tcp/137-tcp-window-s https://packetlife.net/blog/2011/mar/
ize-checksum.html 2/tcp-flags-psh-and-urg/
TCP Connection Establishment and Termination
Sequence and acknowledgment numbers for a simple
Telnet application over TCP
Round Trip Time Estimation and Timeout
The sample RTT, denoted SampleRTT, for a segment TCP maintains an average, called EstimatedRTT, of the
is the amount of time between when the segment is sent SampleRTT values. Upon obtaining a new SampleRTT, TCP
(that is, passed to IP) and when an acknowledgment for updates EstimatedRTT according to the following formula
the segment is received.
If the TCP sender receives three duplicate ACKs for the same
data, it takes this as an indication that the segment following the
segment that has been ACKed three times has been lost.
In the case that three duplicate ACKs are received, the TCP
sender performs a fast retransmit [RFC 5681], retransmitting
the missing segment before that segment’s timer expires.
TCP Flow Control Service:
TCP provides a flow-control service to its applications to
eliminate the possibility of the sender overflowing the receiver’s
buffer. Flow control is thus a speed-matching service—matching
the rate at which the sender is sending against the rate at which
the receiving application is reading.
Host B tells Host A how much spare room it has in the connection buffer by placing its current value of rwnd in the
receive window field of every segment it sends to A. Initially, Host B sets rwnd = RcvBuffer.
TCP: Flow Control:
Host A in turn keeps track of two variables, LastByteSent and
Last-Byte Acked, which have obvious meanings. Note that the
difference between these two variables, LastByteSent –
LastByteAcked, is the amount of unacknowledged data that A has sent
into the connection.
By keeping the amount of unacknowledged data less than the value of rwnd,
Host A is assured that it is not overflowing the receive buffer at Host B.
TCP Connection Termination
TCP Connection Termination
when a host sends a reset segment, it is telling the source “I
don’t have a socket for that segment. Please do not resend the
segment.”
TCP Congestion Control
TCP sender perceives that there is little congestion on the path
between itself and the destination, then the TCP sender increases
its send rate; if the sender perceives that there is congestion
along the path, then the sender reduces its send rate.
https://tools.ietf.org/html/rfc2001
TCP Congestion Control: Reno and Tahoe
Network Layer
The role of the network layer is deceptively simple—to move
packets from a sending host to a receiving host. To do so, two
important network-layer functions can be identified:
Data Transfer
VC Teardown
https://www.cpe.ku.ac.th/~plw/dccn/presentation/ch08.pdf
Datagram Networks
In a datagram network, each time an end system wants to send Specifically, each router has a forwarding table that maps
a packet, it stamps the packet with the address of the destination destination addresses to link interfaces; when a packet arrives at
end system and then pops the packet into the network. the router, the router uses the packet’s destination address to
look up the appropriate output link interface in the forwarding
table.
port here—
referring to the physical input and output router interfaces
if the memory bandwidth is such that B packets per second can be written
into, or read from, memory, then the overall forwarding throughput (the total
rate at which packets are transferred from input ports to output ports) must be
less than B/2
Switching
Switching via a bus. In this approach, an input
port transfers a packet directly to the
output port over a shared bus
https://www.eit.lth.se/ppplab/IPHeader.htm