CS Atlas GATE 2027
Computer Networks course
0 / 90 complete

Computer Networks/Phase 5 · Application Layer

Chapter review L5.1 · Item 77 of 90

Client-server model

Read at your own pace. Try the questions before opening the answers.

On this page

Chapter recap

A client starts each exchange; a server listens at a well-known port. An application protocol defines message types, syntax, meaning, timing and the transport it rides on (TCP for reliable exchanges, UDP for quick small ones). A TCP server holds one listening socket plus one socket per connection. P2P peers serve each other.

Practice questions

  1. NAT · 1 mark

    A server process accepts 25 TCP connections. How many sockets does it have open (including the listening one)?

    Write your answer before opening the key.

  2. MCQ · 1 mark

    Which socket call does the server use to wait for a new connection?

    1. connect()
    2. accept()
    3. bind()
    4. send()
  3. MSQ · 1 mark

    Which typically use TCP?

    1. Fetching a web page
    2. Sending an e-mail
    3. A single short name lookup
    4. Downloading a file
  4. MCQ · 1 mark

    In client-server, the client port is usually:

    1. well-known (0–1023)
    2. ephemeral, chosen by the client's OS
    3. always 80
    4. the same as the server port
  5. NAT · 2 marks

    Client-server: 100 copies of a 10⁹-bit file from a 1 Gbps server upload. Minimum time (s)?

    Write your answer before opening the key.

  6. MCQ · 1 mark

    Which layer of the 5-layer model contains application protocols?

    1. Transport
    2. Application
    3. Network
    4. Session
  7. MCQ · 1 mark

    In P2P file distribution, adding more peers:

    1. always slows everyone down
    2. adds upload capacity as well as demand
    3. removes the need for any server or tracker in all designs
    4. makes TCP unnecessary
  8. MSQ · 1 mark

    An application protocol must specify:

    1. the syntax of messages
    2. the meaning of fields
    3. the IP header format
    4. the order of messages

Answer key

Try the questions first. Open when you are ready to check.
  1. 26 — 25 + 1.

    Review lesson 5.1

  2. B — accept() blocks until a client connects.
    • A: Client call.
    • C: Assigns the address.
    • D: Sends data.

    Review lesson 4.4

  3. ABD — They need every byte reliably.
    • C: Short lookups use UDP by default.

    Review lesson 5.1

  4. B — Clients use temporary ports.
    • A: Servers use well-known ports.
    • C: 80 is a server port.
    • D: Not required.

    Review lesson 4.1

  5. 100 — 10¹¹ / 10⁹ = 100 s.

    Review lesson 5.1

  6. B — Top layer.
    • A: Below.
    • C: Below.
    • D: Not a TCP/IP layer.

    Review lesson 1.1.2

  7. B — Each peer also uploads.
    • A: Capacity grows too.
    • C: Many P2P systems still use a tracker.
    • D: Peers still use TCP.

    Review lesson 5.1

  8. ABD — IP headers belong to the network layer.
    • C: Not the application's job.

    Review lesson 5.1

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.