summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assignment2-cs.ru.nl.dig107
-rw-r--r--assignment2-files.camilstaps.nl.dig99
-rw-r--r--assignment2.tex89
3 files changed, 295 insertions, 0 deletions
diff --git a/assignment2-cs.ru.nl.dig b/assignment2-cs.ru.nl.dig
new file mode 100644
index 0000000..adc1f4f
--- /dev/null
+++ b/assignment2-cs.ru.nl.dig
@@ -0,0 +1,107 @@
+$ dig @a.root-servers.net nl
+
+; <<>> DiG 9.9.5-9+deb8u5-Debian <<>> @a.root-servers.net nl
+; (2 servers found)
+;; global options: +cmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39209
+;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 8, ADDITIONAL: 17
+;; WARNING: recursion requested but not available
+
+;; OPT PSEUDOSECTION:
+; EDNS: version: 0, flags:; udp: 4096
+;; QUESTION SECTION:
+;nl. IN A
+
+;; AUTHORITY SECTION:
+nl. 172800 IN NS ns5.dns.nl.
+nl. 172800 IN NS ns4.dns.nl.
+nl. 172800 IN NS ns3.dns.nl.
+nl. 172800 IN NS ns2.dns.nl.
+nl. 172800 IN NS ns1.dns.nl.
+nl. 172800 IN NS nl1.dnsnode.net.
+nl. 172800 IN NS ns-nl.nic.fr.
+nl. 172800 IN NS sns-pb.isc.org.
+
+;; ADDITIONAL SECTION:
+ns5.dns.nl. 172800 IN A 194.0.28.53
+ns5.dns.nl. 172800 IN AAAA 2001:678:2c:0:194:0:28:53
+ns4.dns.nl. 172800 IN A 95.142.99.212
+ns4.dns.nl. 172800 IN AAAA 2a00:1188:5::212
+ns3.dns.nl. 172800 IN A 194.171.17.10
+ns3.dns.nl. 172800 IN AAAA 2001:610:0:800d::10
+ns2.dns.nl. 172800 IN A 213.154.241.85
+ns2.dns.nl. 172800 IN AAAA 2001:7b8:606::85
+ns1.dns.nl. 172800 IN A 193.176.144.5
+ns1.dns.nl. 172800 IN AAAA 2a00:d78:0:102:193:176:144:5
+nl1.dnsnode.net. 172800 IN A 194.146.106.42
+nl1.dnsnode.net. 172800 IN AAAA 2001:67c:1010:10::53
+ns-nl.nic.fr. 172800 IN A 192.93.0.4
+ns-nl.nic.fr. 172800 IN AAAA 2001:660:3005:1::1:2
+sns-pb.isc.org. 172800 IN A 192.5.4.1
+sns-pb.isc.org. 172800 IN AAAA 2001:500:2e::1
+
+;; Query time: 15 msec
+;; SERVER: 198.41.0.4#53(198.41.0.4)
+;; WHEN: Tue Mar 01 21:54:17 CET 2016
+;; MSG SIZE rcvd: 560
+
+$ dig @ns1.dns.nl ru.nl
+
+; <<>> DiG 9.9.5-9+deb8u5-Debian <<>> @ns1.dns.nl ru.nl
+; (2 servers found)
+;; global options: +cmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51542
+;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 5
+;; WARNING: recursion requested but not available
+
+;; OPT PSEUDOSECTION:
+; EDNS: version: 0, flags:; udp: 4096
+;; QUESTION SECTION:
+;ru.nl. IN A
+
+;; AUTHORITY SECTION:
+ru.nl. 3600 IN NS ns3.ru.nl.
+ru.nl. 3600 IN NS ns4.ru.nl.
+ru.nl. 3600 IN NS ns1.surfnet.nl.
+
+;; ADDITIONAL SECTION:
+ns1.surfnet.nl. 3600 IN A 192.87.106.101
+ns1.surfnet.nl. 3600 IN AAAA 2001:610:1:800a:192:87:106:101
+ns3.ru.nl. 3600 IN A 131.174.78.16
+ns4.ru.nl. 3600 IN A 131.174.78.17
+
+;; Query time: 9 msec
+;; SERVER: 193.176.144.5#53(193.176.144.5)
+;; WHEN: Tue Mar 01 21:54:42 CET 2016
+;; MSG SIZE rcvd: 172
+
+$ dig @ns3.ru.nl cs.ru.nl
+
+; <<>> DiG 9.9.5-9+deb8u5-Debian <<>> @ns3.ru.nl cs.ru.nl
+; (1 server found)
+;; global options: +cmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17272
+;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 3
+;; WARNING: recursion requested but not available
+
+;; OPT PSEUDOSECTION:
+; EDNS: version: 0, flags:; udp: 4096
+;; QUESTION SECTION:
+;cs.ru.nl. IN A
+
+;; AUTHORITY SECTION:
+cs.ru.nl. 86400 IN NS ns1.science.ru.nl.
+cs.ru.nl. 86400 IN NS ns2.science.ru.nl.
+
+;; ADDITIONAL SECTION:
+ns2.science.ru.nl. 86400 IN A 131.174.16.133
+ns1.science.ru.nl. 86400 IN A 131.174.224.4
+
+;; Query time: 11 msec
+;; SERVER: 131.174.78.16#53(131.174.78.16)
+;; WHEN: Tue Mar 01 21:54:52 CET 2016
+;; MSG SIZE rcvd: 113
+
diff --git a/assignment2-files.camilstaps.nl.dig b/assignment2-files.camilstaps.nl.dig
new file mode 100644
index 0000000..38bed9c
--- /dev/null
+++ b/assignment2-files.camilstaps.nl.dig
@@ -0,0 +1,99 @@
+$ dig @a.root-servers.net nl
+
+; <<>> DiG 9.9.5-9+deb8u5-Debian <<>> @a.root-servers.net nl
+; (2 servers found)
+;; global options: +cmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39209
+;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 8, ADDITIONAL: 17
+;; WARNING: recursion requested but not available
+
+;; OPT PSEUDOSECTION:
+; EDNS: version: 0, flags:; udp: 4096
+;; QUESTION SECTION:
+;nl. IN A
+
+;; AUTHORITY SECTION:
+nl. 172800 IN NS ns5.dns.nl.
+nl. 172800 IN NS ns4.dns.nl.
+nl. 172800 IN NS ns3.dns.nl.
+nl. 172800 IN NS ns2.dns.nl.
+nl. 172800 IN NS ns1.dns.nl.
+nl. 172800 IN NS nl1.dnsnode.net.
+nl. 172800 IN NS ns-nl.nic.fr.
+nl. 172800 IN NS sns-pb.isc.org.
+
+;; ADDITIONAL SECTION:
+ns5.dns.nl. 172800 IN A 194.0.28.53
+ns5.dns.nl. 172800 IN AAAA 2001:678:2c:0:194:0:28:53
+ns4.dns.nl. 172800 IN A 95.142.99.212
+ns4.dns.nl. 172800 IN AAAA 2a00:1188:5::212
+ns3.dns.nl. 172800 IN A 194.171.17.10
+ns3.dns.nl. 172800 IN AAAA 2001:610:0:800d::10
+ns2.dns.nl. 172800 IN A 213.154.241.85
+ns2.dns.nl. 172800 IN AAAA 2001:7b8:606::85
+ns1.dns.nl. 172800 IN A 193.176.144.5
+ns1.dns.nl. 172800 IN AAAA 2a00:d78:0:102:193:176:144:5
+nl1.dnsnode.net. 172800 IN A 194.146.106.42
+nl1.dnsnode.net. 172800 IN AAAA 2001:67c:1010:10::53
+ns-nl.nic.fr. 172800 IN A 192.93.0.4
+ns-nl.nic.fr. 172800 IN AAAA 2001:660:3005:1::1:2
+sns-pb.isc.org. 172800 IN A 192.5.4.1
+sns-pb.isc.org. 172800 IN AAAA 2001:500:2e::1
+
+;; Query time: 15 msec
+;; SERVER: 198.41.0.4#53(198.41.0.4)
+;; WHEN: Tue Mar 01 21:54:17 CET 2016
+;; MSG SIZE rcvd: 560
+
+$ dig @ns1.dns.nl camilstaps.nl
+
+; <<>> DiG 9.9.5-9+deb8u5-Debian <<>> @ns1.dns.nl camilstaps.nl
+; (2 servers found)
+;; global options: +cmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57380
+;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 3
+;; WARNING: recursion requested but not available
+
+;; OPT PSEUDOSECTION:
+; EDNS: version: 0, flags:; udp: 4096
+;; QUESTION SECTION:
+;camilstaps.nl. IN A
+
+;; AUTHORITY SECTION:
+camilstaps.nl. 3600 IN NS ns0.transip.net.
+camilstaps.nl. 3600 IN NS ns2.transip.eu.
+camilstaps.nl. 3600 IN NS ns1.transip.nl.
+
+;; ADDITIONAL SECTION:
+ns1.transip.nl. 3600 IN A 80.69.69.69
+ns1.transip.nl. 3600 IN AAAA 2a01:7c8:b::53
+
+;; Query time: 9 msec
+;; SERVER: 193.176.144.5#53(193.176.144.5)
+;; WHEN: Tue Mar 01 22:04:40 CET 2016
+;; MSG SIZE rcvd: 169
+
+$ dig @ns1.transip.nl files.camilstaps.nl
+
+; <<>> DiG 9.9.5-9+deb8u5-Debian <<>> @ns1.transip.nl files.camilstaps.nl
+; (2 servers found)
+;; global options: +cmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26044
+;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
+
+;; OPT PSEUDOSECTION:
+; EDNS: version: 0, flags:; udp: 4096
+;; QUESTION SECTION:
+;files.camilstaps.nl. IN A
+
+;; ANSWER SECTION:
+files.camilstaps.nl. 3600 IN A 185.24.220.112
+
+;; Query time: 7 msec
+;; SERVER: 80.69.69.69#53(80.69.69.69)
+;; WHEN: Tue Mar 01 22:04:54 CET 2016
+;; MSG SIZE rcvd: 83
+
diff --git a/assignment2.tex b/assignment2.tex
new file mode 100644
index 0000000..ecbea27
--- /dev/null
+++ b/assignment2.tex
@@ -0,0 +1,89 @@
+\documentclass[a4paper,9pt]{article}
+
+\author{Camil Staps\\\small{s4498062}}
+\title{Networking\\\large{Assignment 2}}
+
+\usepackage{polyglossia}
+\setmainlanguage{english}
+\usepackage{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage{caption}
+\usepackage{enumitem}
+\setenumerate{label=\alph*)}
+
+\usepackage{minted}
+\setminted{fontsize=\scriptsize}
+
+\begin{document}
+
+\maketitle
+
+\section{Packet loss and retransmissions}
+\begin{enumerate}
+ \item This is the probability that the packet arrives three times: $0.99^3=0.970299$.
+
+ And analogously: $0.970299^2=0.941480149401$.
+ \item The probability that a message arrives after exactly $i$ tries is $(1-0.99^6)^(i-1)$ (the probability of failure for the first $i-1$ transmissions) times $0.99^6$ (the probability of success the $i$th time. Therefore, the average number of tries is $\sum_{i=1}^\infty (1-0.99^6)^{i-1}\cdot0.99^6\cdot i=1.06216$.
+ \item It takes half a second for the packet to be transmitted over one link. Over three hops this takes then $1.5s$. Since the acknowledgement has a negligible amount of data, it is transmitted in negligible time. Therefore, the client should wait at least $1.5s$ before retransmitting the packet.
+ \item \begin{description}
+ \item[Reliable data transfer] Yes, because packets are retransmitted when not acknowledged.
+ \item[Throughput] Will be high, because packets are retransmitted when not acknowledged (and the probability of a packet arriving the first try is already quite high).
+ \item[Timing] The protocol does not ensure that message segments arrive in order, or within a certain time period.
+ \item[Security] The protocol does not provide confidentiality (can be sniffed), authenticity (obvious), non-repudiation (idem), integrity (no MAC or so), availability (may just DoS either end, e.g.), or authorization (again obvious).
+ \end{description}
+\end{enumerate}
+
+\section{Persistent connections in HTTP}
+When referring to sections in this assignment I refer to RFC 2616.
+\begin{enumerate}
+ \item According to 8.1.2, persistent connections are closed when a message with the \texttt{Connection: close} header is sent. According to 14.10, this can be sent both in a request and in a response, and hence by both the client and the server. From that moment, the client must not send any more requests on that connection. According to 14.10, the connection should not be considered persistent after the current request/response is complete.
+ \item HTTP/1.1 does not provide any encryption services. We might expect this in section 15, Security Considerations, but nothing is said there about encryption. Typically, we would encrypt HTTP traffic by encapsulating it in an encrypted packet and sending that packet over TCP -- that is, it is not a part of the HTTP protocol.
+ \item According to section 8.1.4, emphasis mine:
+ \begin{quote}
+ Clients that use persistent connections SHOULD limit the number of
+ simultaneous connections that they maintain to a given server. A
+ \emph{single-user client} SHOULD \emph{NOT} maintain \emph{more than 2} connections with
+ any server or proxy. A \emph{proxy} SHOULD use up to \emph{2*N} connections to
+ another server or proxy, where N is the number of simultaneously
+ active users. These guidelines are intended to improve HTTP response
+ times and avoid congestion.
+ \end{quote}
+ The restrictions are only suggestions (SHOULD, not MUST). Single-user clients should maintain at most 2 connections with any server or proxy. From this follows that proxy clients should use up to $2n$ connections with a server or proxy, where $n$ is the number of clients.
+ \item Yes. From 8.1.4:
+ \begin{quote}A client, server, or proxy MAY close the transport connection at any time.\end{quote}
+\end{enumerate}
+
+\section{Analysing HTTP traces}
+\begin{enumerate}
+ \item \url{http://gaia.cs.umass.edu/cs453/index.html} (first line and Host header).
+ \item 1.1 (first line).
+ \item Persistent (Connection header).
+ \item English (Accept-Language header).
+ \item Netscape 7.2 on Windows XP. This is useful because not every browser supports every HTML/CSS/JS feature (see e.g. \url{http://caniuse.com}). The server may then respond with workarounds for that specific browser, if needed.
+ \item No, the connection has been closed because of the Connection header and according to 8.1.2 of RFC 2616, the client must not make any more requests on the same connection after this.
+ \item 100968 bytes.
+ \item Yes, otherwise the status code should have been 206 Partial Content and the Content-Range header should have been present.
+ \item The server should respond with a 304 Not Modified status code according to section 10.3.5.
+ \item According to section 10.3.5, the cache must disregard the 304 status code, and repeat the request without the If-\{Unm,M\}odified-Since and If[-None]-Match conditionals, to force a response with content.
+\end{enumerate}
+
+\section{The dig command for DNS}
+\begin{enumerate}
+ \item \inputminted{text}{assignment2-cs.ru.nl.dig}
+ \item \inputminted{text}{assignment2-files.camilstaps.nl.dig}
+ \item \texttt{dig} first fetches the root servers, then the name servers for the TLD (using the root servers), then the name servers for \texttt{ru.nl} (using the TLD name servers), and then the information of \texttt{cs.ru.nl} (using the \texttt{ru.nl} name servers).
+\end{enumerate}
+
+\section{DNS cache and database}
+\begin{enumerate}
+ \item \texttt{nl}, \texttt{cs.nl}, \texttt{random.cs.nl}.
+ \item It is most likely that \texttt{nl} is cached. All domains under \texttt{nl} will need to use this, so it is used more than any of the other names listed above. For similar reasons, it is the least likely that \texttt{random.cs.nl} will be cached.
+ \item By making a DNS request and checking what server responds. When a site has not recently been accessed, it will be its name server replying. When a site has been recently accessed, it will be some cache in between (in my case, my router, \texttt{192.168.1.1}, is caching DNS queries).
+ \item The higher the TTL, the more likely it is that the record is cached, because these records will stay in the cache longer.
+ \item The FQDN is \texttt{printer}, the IP \texttt{134.122.131.10}.
+ \item \texttt{beta}.
+ \item Using CNAME records follows the DRY principle. When moving to a different server, you will only need to edit the IP address once, in the A record.
+\end{enumerate}
+
+\end{document}
+