# HTTP ![](https://i.imgur.com/Zyt7XtT.png) 1. HTTP 1.1 2. en-GB, en-US,en 3. 192.168.43.226 4. 200 OK ![](https://i.imgur.com/MTHKELO.png) 5. If Modified Since-Fri, 26 Feb 2021 06:59:01 GMT 6. No, the server didn't return the file, as there is no Content Header ![](https://i.imgur.com/f94IOC8.png) 7. The browser sent only one Http request and multiple TCP requests, in packet number 22 I have "BILL OF RIGHTS" 8. Packet number 26 contains the response. ![](https://i.imgur.com/nfjqJ23.png) 9. Three HTTP requests were sent one for html doc and one for each of the two images. 10. Two images were downloaded sequentially, as after receiving response from first image only the GET request for next image was sent. For first image response received was 200 OK and for second was 301 moved permanently, which means the image was moved. # DNS ![](https://i.imgur.com/CgpTfOg.png) 1. Name = "UnKnown" IpAddr = 192.168.43.1 2. None authoritative servers responded, however eight non-authoritative servers were present including use2.akam.net, use5.akam.net 3. I tried to obtain IpAddr of www.vnit.ac.in which was 210.212.165.239 ![](https://i.imgur.com/9K9rQ49.png) 4. All the DNS quering were sent using UDP protocol. 5. Destination port for DNS query and Source port of DNS reponse was 53. 6. The DNS query was send to IpAddr 192.168.43.1 which is the same as the address of DNS server received using ipconfig. # TCP ![](https://i.imgur.com/qGpHHrR.png) 1. IpAddr=192.168.43.226 Port=59570 used by client to upload file. 2. IpAddr=128.119.245.12 Port=80 for sending and receving used by gaia.cs.umass.edu. ![](https://i.imgur.com/UmiMCQ9.png) 3. Packet number 5, sequence number 0, the Syn bit(11th bit) is set in flag. ![](https://i.imgur.com/XUHKodb.png) 4. **a.** Sequence number of the SYNACK segment sent by gaia.cs.umass.edu to the client computer in reply to the SYN is **0**. **b.** Value of Acknowledgement field is 1. **c.** The server adds one to initial sequence number of SYN statement from the client computer. **d.** Both the SYN and Acknowledgement fields are set. ![](https://i.imgur.com/HJCJbhi.png) 5. Sequence number is 1 for the TCP segment containing the HTTP POST command. ![](https://i.imgur.com/W6DO9nY.png) 6.**a.** The sequence numbers of the first six segments in the TCP connection are 10, 12, 19, 21, 23, 25. **Answer of b,d is in table** | Segment | Sent | Received | RTT |Length| | -------- | -------- | -------- |--------|--------| | 1|2.471655|2.797151|0.325496|731| | 2|2.471909|2.816679|0.34477‬|12222| | 3|2.797196|2.829551|0.032355‬|1358| | 4|2.816714|2.851009|0.034295‬|2716| | 5|2.829625|2.856273|0.026648|2716| | 6|2.851045|2.887943|0.036898|2716| * **c.** Estimated RTT According to the formula: EstimatedRTT = 0.875 * EstimatedRTT + 0.125 * SampleRTT EstimatedRTT after receipt of ACK of segment : =RTT for seg1 = 0.325496 EstimatedRTT after receipt of ACK of segment : =0.875x0.325496+0.0125x0.34477‬=0.289118 EstimatedRTT after receipt of ACK of segment : =0.875x0.289118625+0.0125x0.032355=0.253383 EstimatedRTT after receipt of ACK of segment : =0.875x0.253383234375+0.0125x0.034295=0.222139 EstimatedRTT after receipt of ACK of segment : =0.875x0.222139+0.0125x0.026648=0.416843 EstimatedRTT after receipt of ACK of segment : =0.875x0.416843+0.0125x0.036898=0.365199 * **e.** Total time=f - first ACK=0.090792 Throughput=total filesize/total time=22,459/0.090792 =241.56993 Kbps # UDP ![](https://i.imgur.com/FjJnsb1.png) 1. Source port, Destination port, Length, CheckSum ![](https://i.imgur.com/9mOHj44.png) 2. UDP header length is 8 bytes, 2 bytes for each header field. ![](https://i.imgur.com/9484PU9.png) 3. The length field specifies the number of bytes in the UDP segment (header plus data). An explicit length value is needed since the size of the data field may differ from one UDP segment to the next. The length of UDP payload for selected packet is 1330 bytes. 1338 bytes - 8 bytes = 1330 bytes. 4. The maximum number of bytes that can be included in a UDP payload is (2^16 – 1) bytes plus the header bytes. This gives 65535 bytes – 8 bytes = 65527 bytes. 5. The largest possible source port number is (2^16 – 1) = 65535. ![](https://i.imgur.com/kfZtx63.png) 6. The IP protocol number for UDP is 0x11 hex, which is 17 in decimal value