CS138-lecture-20210316

Review for exam #

Example question set for Ch 1-2 #

  1. What are the layers in TCP/IP protocol stack?

    Application, transport, network, link, physical

  2. What are layers in OSI reference model?

    Extra 2 layers are presentation and

  3. What is the major difference between packet switching and circuit switching?

    Circuit reserves some resources, packet switchings allows sharing

  4. What is the difference between routing and forwarding?

    Router is global, forwarding is local

  5. What is the relationship between routing and forwarding?

    Interplay

  6. How many types of packet delay does a network have?

    4, nodal processing, packet transmission, propagation delay, queueing delay

  7. Which tool/utility/program can be used to find out the IP address of the routers on the path from one source and destination?

    traceroute

  8. Which tool/utility/program can be used to intercept and analyze network packets?

    Wireshark

  9. On which layer is SSL/TLS implemented for network security?

    Application layer

  10. What does DDoS mean?

    Distributed denial of service

  11. Among HTTP, FTP, SMTP, DNS, which protocols use TCP?

    HTTP, FTP, SMTP

  12. What are the service port numbers for HTTP, FTP, SMTP, DNS respectively?

    80, 21/20, 25, 53

  13. What is the major difference between persistent and non-persistent modes of HTTP?

    Persistent allows one connection to be shared by multiple object transmissions. Non-persistent must have a connectino for each object transmission.

  14. What is the major difference between Client/Server model and P2P model?

    Client/server has an always on server, P2P doesn’t have a server (everyone is a peer)

  15. Where is URL specified in HTTP request format?

    In the first line (the request line) of request format

  16. Where is the status code specified in HTTP response format?

    In the first line, the status line

  17. Is web cache a client or server for the original browser who sent the request to get one object?

    Server

  18. What benefits come from the conditional get technology? (at least 2 examples)

    No object transmission delay, lower link utilization

  19. What is the major difference between SMTP and POP/IMAP?

    Push versus pull

  20. What is the format for DNS resource records? (RR)

    Name, value, type, TTL

  21. Among the socket library functions, what are used by TCP and what are used by UDP?

    TCP: UDP:

  22. What is the major difference between TCP and UDP?

    TCP has a handshake, and is reliable. UDP is non-reliable

True or false questions #

  1. Internet is a single network? (F)
  2. DNS runs on routers as it’s a network core function. (F)
  3. A network alyer does not need to rely on any service from its below layer. (F)
  4. TCP is a protocol on Application layer. (F)
  5. FDM/TDM is a pcket switching protocol (F)
  6. It’s impossible to have packet loss as the network is supposed to guarantee reliability (F)
  7. All the packet headers are added to data at application layer when the data leaves the application program (F)
  8. Routers support all seven layers of the OSI reference model (F)
  9. SMTP is a P2P protocol and there is no client in its communications (F)
  10. SMTP is a pull protocol (F)

Long answer questions #

  1. Cookie scenario in slides of ch. 1. How many components to make cookie system function? What are they respectively? What are their functionalities respectively? Especially, what cookie header lines in the first HTTP response message and next HTTP request messages?

There are four functions. Cookie on client, database on server, header line with cookie ID, header line from server. Database on server side contains all the info, cookie contains the ID, all future client/server messages have ID in headers.

  1. To insert resource records into DNS, what steps are needed? What RRs are inserted? Refer to the slides in Ch. 2

image_2021-03-16-09-29-28

  1. What are the functions related to TCP and UDP socket programming?

image_2021-03-16-09-29-51 image_2021-03-16-09-29-56 image_2021-03-16-09-30-08 image_2021-03-16-09-30-23

UDP cont. #

image_2021-03-16-09-37-05 image_2021-03-16-09-34-20

If packet isn’t lost:

sequenceDiagram participant S as Sender participant R as Receiver S ->> R: send pkt 0 R ->> S: ack 0 S ->> R: pkt 1 R ->> S: ack 1 S ->> R: pkt 0

image_2021-03-16-09-39-25 image_2021-03-16-09-42-15

In case d, the functionality still works but the performance is poor, because each packet is transmitted twice after the first premature timeout.

image_2021-03-16-09-44-36 image_2021-03-16-09-45-53

RTT = round trip time

image_2021-03-16-09-50-38 image_2021-03-16-09-52-46 image_2021-03-16-09-55-00