DNS, TCP and UDP (w4-5) Flashcards
what does heirarchy tell us about the address name (DNS)
Heirarchy tells you who issued the name, not where the address is located physically
gTLD and ccTLD stand for? examples?
generic Top Level Domain and country-code Top Level Domain
gtld: .com, .net…
cctld: .nz, .au…
Secondary Level Domain includes which type of address?
.co.nz, .org.nz, whitehouse.gov …
What server is above the TLD servers? how many instances of them are there?
how many pre-defined IP addresses are there?
Root Servers. roughly 1400 Root servers, widely distributed. 13 pre-defined addresses
which command would you use to look up an IP address of an named address eg www.waikato.cms.ac.nz?
why is it an iterative look up
dig command. it is iterative, as we have to work our way down through the DNS resolver servers, starting from the root server.
do DNS resolvers have to go through the iterative look-up every time someone wants to use an address?
DNS resolvers keep a cache of recently looked up records. The lenght of time each entry is kept for is defined by a person and varies from minutes to days
when looking up a name with DNS, what happens if the first name server does not respond?
when looking up a name, the reply will often contain multiple other name servers, so if the first does not respond, the resolver can try one of the others
What are the 4 basic contents of a UDP packet?
Src and Dest Port, UDP Length and a checksum
when sending a Datagram packet, what are the 4 parameters you will need to fill out
ip, port, byte array and length of data (not lenght of array)
How would you recieve a datagram packet?
4lines of code
DatagramSocket ds = new DatagramSocket();
byte[] buf = new byte[65535];
DatagramPacket dp = new DatagramPacket(buf, 65535);
ds.recv(dp)
To echo back a datagram packet (as a server) you use the method .getSocketAddress() to get what information about the sender
returns the senders InetAddress and senders port in a single object
Why would you predominantly use UDP for DNS lookups?
since DNS lookups preceed nearly every interaction, we need the fastest method possible, TCP = slower
where is TCP implemented in? the operating system, or application software? Do sockets use UDP or TCP?
TCP is implemented in the operating system kernel, sockets use TCP
Which part of the osi model is TCP?
Transport layer
Is TCP reliable? why? is it half duplex?
lost messages are re-transmitted in TCP, and use a weak checksum to protect the messages. It is full duplex, so client and server can send messages simultaneously
Why might a tcp connection have two ports?
Allows client to have multiple connections with the server, meaning it can for example fetch the html and an image resource at the same time.
What is the sequence number in a TCP frame. why is this needed?
it is the position in the series of frames that the particular frame belongs to. Needed to order the frames correctly by the receiver