TCP and DNS Flashcards
How many DNS servers are there?
3
What are the DNS servers?
Authoritative
Recursive
Caching
What is the Authoritative name server use for?
holds the answer to a query
What is the Recursive name server used for?
performs the search on your behalf to get the answer
What is the Caching name server used for?
stores the answer to a query to respond quicker
is IP reliable?
No
What is IP classed as?
best-effort network
how do they provide a more reliable connection?
They build higher level protocols on top of IP
What is the drawback of building a higher level protocol on top of IP?
can increase latency
What is transmission control protocol used for?
TCP is used to provide
reliable
end-to-end
full duplex
virtual connection
What kind of protocol is TCP?
connection-oriented protocol
Why is TCP end-to-end?
because it works between 2 communicating machines like a piece of wire
Why is TCP connection-oriented?
because you have to explicitly setup the connection before we can use it and tear it down afterwards
What are the problems with TCP
out-of-order delivery
Packet loss
How does TCP solve this?
problems of TCP (packet loss, out of order delivery)
by using sequence numbers
What are sequence numbers?
every byte transmitted is associated to an individual 32-bit number to identify it and they roll over when they reach 2^32 so should be far apart in time that reuse isnt a problem
COUNTER VARIABLE
What does TCP header store?
sequence number of the first byte in the packet
How does sequence number solve out of order delivery?
you know the sequence number of every byte in the packet and the first byte is in the packet header so recipients can reorder packets in the right order based on seq number
What causes paths used to route the packet to change?
network conditions
What does TCP do ensure no packet loss?
it sends acknowledgments and retransmits lost packets
What happens if no acknowledgment is received?
if its not received after a certain time period packet is resent and this goes on until it receives one
But how does sender know which bytes to send again?
TCP header includes ACK field contain SEQ number of the next byte
so sender knows which bytes have been received correctly and can then resend lost data based on this
Whats wrong with current approach?
slows down transmission
sender waits for ACK before sending next packet
network idle during this time
Whats a faster way to send data?
Windowing
What is Windowing?
it sends data in packets up to a certain window size than just one packet
How does sender know how much to send at a time?
TCP allows receiver to tell sender how much space is free
What does TCP header contain to help with size?
Window field used to adjust the window size dynamically
What else can window field be used to adjust?
congestion and also stop the sender sending
What are the stages in TCP lifestyle?
first connection needs to be established
involves 2 sides agreeing SEQ numbers
done by exchange of synchronise packets at the start
What is the TCP lifestyle process called?
3 way handshake
How do you close TCP connection?
using FIN and ACKs
What is FIN for?
to close connection
What is ACK for?
to acknowledge all data has been received