1. University MCA (AI/ML) Semester 1
  2. CAP7001
  3. Unit 1

CAP7001 · Unit 1: Network basics

Protocols, layered architecture and the OSI model

19 practice questions · in the MTE and ETE syllabus

Key points

  • Protocol elements: syntax, semantics, timing
  • OSI has 7 layers; PDUs: bit, frame, packet, segment
  • Presentation = translation/encryption; session = dialog control
  • Router works up to the network layer
  • Layer N uses layer N - 1 and serves layer N + 1 through an interface

A protocol defines how devices communicate; its three key elements are syntax (format), semantics (meaning) and timing (when and how fast). The OSI model splits communication into seven layers, and the same layers on two hosts talk by peer-to-peer processes.

#LayerPDU / job
7ApplicationUser services
6PresentationTranslation, encryption, compression
5SessionDialog control, synchronization
4TransportSegments, process-to-process
3NetworkPackets, logical addressing, routing
2Data linkFrames, MAC addressing, framing
1PhysicalBits, signals, media

On the way down each layer adds a header (the data link layer also adds a trailer); this is encapsulation.

Worked example: 1000 bytes of data plus three 20-byte headers and a 4-byte trailer gives 1064 bytes on the wire.

Exam pitfall: a router looks only as high as the network layer; it does not read transport data when forwarding.

Layered architecture

Each layer uses the services of the layer below and offers services to the layer above through an interface on the same host, while it talks to its peer on the other host through a protocol. Only the physical layer actually moves bits between machines; peer communication at higher layers is logical.

  • Benefit: modularity. A layer can be redesigned (for example a new link technology) without changing the others, as long as its interface stays the same.
  • Encapsulation: the upper layer's data unit becomes the payload of the lower layer, which adds its own header (and at the data link layer a trailer).
  • Repeated functions at different scopes: error and flow control appear at the data link layer (hop to hop) and at the transport layer (end to end). A packet crossing 3 routers travels in 4 separate frames but keeps one network-layer packet end to end.
  • Overhead: 1460 data bytes + 20 TCP + 20 IP + 14 Ethernet header + 4 trailer = 1518 bytes on the wire, so 1460 / 1518 = 96.2% is application data.

Try two questions

Question 1 · Tier 2, Understand

In a layered architecture, what does the interface between two adjacent layers define?

  1. The format of the frames on the wire
  2. The physical connector between two hosts
  3. The operations and services the lower layer offers to the upper layer
  4. The routing table entries used by the network layer
Show the answer

C. An interface specifies what the upper layer may ask the lower layer to do and what information is passed between them on the same host.

Why not A: That is part of a protocol, not an interface.

Why not B: That is the physical medium.

Why not D: Routing tables are data, not a layer interface.

Question 2 · Tier 2, Understand

In a layered architecture, what happens to the data unit that a layer receives from the layer above when sending?

  1. It is split into bits by every layer
  2. It becomes the payload, and the layer adds its own header (and sometimes a trailer)
  3. Its header is removed before passing it down
  4. It is sent unchanged to the peer layer directly
Show the answer

B. This is encapsulation: each layer wraps the upper layer's data unit with its own control information.

Why not A: Only the physical layer works with bits.

Why not C: Headers are removed on the receiving side.

Why not D: Data passes down to the physical layer before crossing the link.