question on natfmartignon/documenti/reseauxavances/nat-http -corrige.pdf · question on nat! the...
TRANSCRIPT
Question on NAT
! The private network in the figure is connected to the Internet through a traditional NAPT. The router has a single public address: (131.175.21.130).
a) Can three private hosts be simultaneously connected to the same web server on the Internet?
b) If so, write down IP address and port addresses in the packets generated by the private hosts and directed to the web server (before and after the NAPT router). Write down the NAT table of the router.
10.10.10.1Port: 6678
10.10.10.2Port: 6678
10.10.10.3Port: 7348
10.10.10.254190.10.45.3
Server WEBPort: 80
Question on NAT
a) Can three private hosts be simultaneously connected to the same web server on the Internet?Yes, because NAPT can multiplex multiple private IP addresses onto the same public IP address by translating also the ports.
10.10.10.254190.10.45.3
Server WEBPort: 8010.10.10.1
Port: 6678
10.10.10.2Port: 6678
10.10.10.3Port: 7348
Question on NAT
10.10.10.254190.10.45.3
Server WEBPorta: 8010.10.10.1
Port: 6678
10.10.10.2Port: 6678
10.10.10.3Port: 7348
10.10.10.1, 6678 131.175.21.130, 6678
10.10.10.2, 6678 131.175.21.130, 7000
10.10.10.3, 7348 131.175.21.130, 7348
NAT Table
Question on NAT
10.10.10.254190.10.45.3
Server WEBPort: 80
10.10.10.1Port: 6678
10.10.10.1, 6678 131.175.21.130, 6678
10.10.10.2, 6678 131.175.21.130, 7000
10.10.10.3, 7348 131.175.21.130, 7348
IP src: 10.10.10.1IP des: 190.10.45.3Port src: 6678Port des: 80
IP src: 131.175.21.130IP des: 190.10.45.3Port src: 6678Port des: 80
NAT Table
Question on NAT
10.10.10.254190.10.45.3
Server WEBPort: 80
10.10.10.2Port: 6678
10.10.10.1, 6678 131.175.21.130, 6678
10.10.10.2, 6678 131.175.21.130, 7000
10.10.10.3, 7348 131.175.21.130, 7348
IP src: 10.10.10.2IP des: 190.10.45.3Port src: 6678Port des: 80
IP src: 131.175.21.130IP des: 190.10.45.3Port src: 7000Port des: 80
NAT Table
Question on NAT
10.10.10.254190.10.45.3
Server WEBPorta: 80
10.10.10.3Port: 6678
10.10.10.1, 6678 131.175.21.130, 6678
10.10.10.2, 6678 131.175.21.130, 7000
10.10.10.3, 7348 131.175.21.130, 7348
IP src: 10.10.10.3IP des: 190.10.45.3Port src: 7348Port des: 80
IP src: 131.175.21.130IP des: 190.10.45.3Port src: 7348Port des: 80
NAT Table
Internet
Question on Tunneling
! Intranet A and Intranet B are connected through a VPN.! The host 10.10.10.3 sends an IP packet to host 10.10.11.1.a) Write the source and destination address of the IP packet travelling in
the Internet.
R1
10.10.11.110.10.10.3
R2
10.10.10.210.10.11.2
136.66.71.254133.32.15.254
Intranet AIntranet B
SubNet10.10.11.0/24SubNet
10.10.10.0/24
Internet
Question on Tunneling
R1
10.10.11.110.10.10.3
R2
10.10.10.210.10.11.2
136.66.71.254133.32.15.254
Intranet AIntranet B
SubNet10.10.11.0/24SubNet
10.10.10.0/24
IP_src:10.10.10.3
IP_des: 10.10.11.1
Payload
IP_src:10.10.10.3
IP_des: 10.10.11.1
Payload
IP_src:136.66.71.254
IP_des: 133.32.15.254
IP_src:10.10.10.3
IP_des: 10.10.11.1
Payload
Question HTTP (1)
! In the following you can find the content of an HTTP Request. Answer to the following questions, indicatingwhere (e.g., in which field) in the HTTP Request you can find the answer:
GET /martignon/index.html HTTP/1.1 Host: www.lri.frUser Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125 Accept: ext/xml, application/xml, application/xhtml+xml, text/html;q=0.9, text/plain;q=0.8, image/png,*,*;q=0.5 Accept-Language: frKeep-Alive: 300 Connection: keep-alive
Question HTTP (1)
1) What is the requested URL? 2) Which version of HTTP is used? 3) Does the browser ask for a persistent
or a non-persistent connection?4) What is, in your opinion, the utility in
indicating the type (and version) of browser used by the client in the HTTP Request?
Question HTTP (1)
1) The requested URL is (see the first two lines of the HTTP message): www.lri.fr/martignon/index.html
2) The HTTP version used is 1.1(first line of the HTTP message)
3) It’s a persistent connection (the header part concerned is connection:keep-alive ).
4) The information on the browser type is needed to “customize” the answer on the browser (e.g., if the HTTP server needs to send a “mobile” version of a website to the client, on a smartphone).
Question HTTP (2)
! An HTTP client sends the following message:Client:GET http://www.lri.fr/index.html HTTP/1.1 User-agent: Mozilla/4.0 Accept: text/html, image/gif, image/jpeg If-modified-since: 27 Feb 2017 08:10:00
a) Write down two feasible responses of the HTTP server (only the status line)
b) Assuming that the message is sent through a Proxy, specify the behavior of the Proxy itself
Question HTTP (2)
! Server Responses:
Client:GET http://www.lri.fr/index.html HTTP/1.1 User-agent: Mozilla/4.0 Accept: text/html, image/gif, image/jpeg If-modified-since: 27 Feb 2017 08:10:00
Server:
HTTP/1.1 200 OKServer:
HTTP/1.1 304 Not Modified
Question HTTP (2)
! The Proxy crosscheck if the resource isavailable in the local cache.
! If not:" Forwards the message to the server
! If so, crosschecks the date associated to the resource:" If it’s older than the one specified in the
message If-modified-since, it it forwarsd the message to the server.
" Otherwise??
Client:GET http://www.lri.fr/index.html HTTP/1.1 User-agent: Mozilla/4.0 Accept: text/html, image/gif, image/jpeg If-modified-since: 27 Feb 2017 08:10:00
Exercice HTTP! Un client HTTP demande à un serveur HTTP une page web constituée
d’un objet de base (ficher HTML) et de 10 autres objets. Chaque objet a une taille L=200 [kbit]. La liaison, bidirectionnelle, entre le client et le serveur a une capacité C=100 [kbit/s]. Les messages de contrôle utilisés pour ouvrir la connexion TCP entre client et serveur, ainsi que le message HTTP “GET” ont une taille m=100 [bit]. Le délai de propagation du lien est tau = 100 [ms].
! Calculer le temps total nécessaire pour que le client reçoive la page web et les 10 objets dans les 2 cas suivants :
a) le client HTTP ouvre en parallèle en modalité non-persistent toutes les connexions TCP nécessaires à télécharger la page web et ses objets (on fait l’hypothèse que le rythme de transmission de chaque connexion TCP soit égal à r=C/N, N est le nombre de connexions ouvertes en parallèle
b) Le client HTTP ouvre en série 11 connexions TCP en modalité non-persistent.
tau