IITIAN1997 STUDIO

Computer communication and networking

JLEE CSE · 11 practice questions with answers

Practise and take a mock test →

OSI model, protocols, IP addressing, routing

Topics: Network goals and topologies; OSI and TCP/IP models; transmission media; switching; data link layer: framing, error control, MAC; IP addressing and subnetting; routing; TCP and UDP; application protocols.

Network basics, models and delays

Topologies: bus, star, ring, mesh (a full mesh of n nodes needs n(n − 1)/2 links), tree and hybrid. The OSI model has seven layers; TCP/IP has four or five. Transmission delay = packet size ÷ bandwidth; propagation delay = distance ÷ signal speed (about 2 × 10⁸ m/s in cable).

  • Full mesh links = n(n − 1)/2
  • Transmission delay = L/B
  • Propagation delay = d/v

Example: How many links does a full mesh of 6 computers need?

  1. 6 × 5/2.
  2. = 15.

Answer: 15

Example: Find the propagation delay over 2000 km at 2 × 10⁸ m/s, and the time to send 1 MB at 8 Mbit/s.

  1. 2 × 10⁶/2 × 10⁸ = 10 ms.
  2. 8 Mbit/8 Mbit/s = 1 s.

Answer: 10 ms; 1 s

Data link layer and IP addressing

The data link layer frames data, detects errors (CRC) and controls access (CSMA/CD on classic Ethernet). IPv4 addresses are 32 bits; a /n prefix leaves 32 − n host bits, giving 2^(32 − n) − 2 usable hosts. Subnetting borrows host bits to make smaller networks. IPv6 uses 128-bit addresses.

  • Hosts = 2^(32 − n) − 2
  • Borrowing k bits → 2ᵏ subnets
  • IPv6: 128 bits

Example: Split 192.168.10.0/24 into /26 subnets. How many subnets, hosts each, and the first subnet’s broadcast?

  1. 2 bits borrowed: 4 subnets; 6 host bits: 62 hosts each.
  2. First subnet 192.168.10.0–63: broadcast 192.168.10.63.

Answer: 4 subnets, 62 hosts, .63

Example: How many hosts fit in a /20 network?

  1. 12 host bits.
  2. 2¹² − 2 = 4094.

Answer: 4094

Routing, transport and applications

Routers forward packets by routing tables built statically or by protocols (RIP, OSPF, BGP). TCP gives reliable, ordered delivery with a three-way handshake (SYN, SYN-ACK, ACK); UDP is fast and connectionless (DNS queries, streaming, games). Well-known ports: FTP 21, SSH 22, SMTP 25, DNS 53, HTTP 80, HTTPS 443.

  • TCP: reliable, handshake
  • UDP: fast, no connection
  • HTTP 80, HTTPS 443, DNS 53

Example: Which port does HTTPS use, and which transport protocol suits live video calls?

  1. HTTPS uses port 443.
  2. Live calls prefer UDP: late packets are useless anyway.

Answer: 443; UDP

The OSI model has seven layers: physical, data link, network, transport, session, presentation, application. TCP/IP merges them into four. The data link layer frames bits and uses MAC addresses; the network layer routes with IP; TCP gives reliable connection-oriented delivery using a three-way handshake, and UDP is fast and connectionless. IPv4 classes: A 1–126, B 128–191, C 192–223. A /n subnet has 2^(32−n) − 2 usable hosts. DNS maps names, DHCP assigns addresses, ARP maps IP to MAC. HTTP uses port 80, HTTPS 443, FTP 21, SMTP 25, DNS 53. Routing protocols are RIP (distance-vector) and OSPF (link-state).

  • Hub: physical layer; switch: data link; router: network.
  • Private IPv4: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
  • 127.0.0.1 is loopback.
  • CRC detects burst errors.
  • NAT lets many private hosts share one public IP.

Key formulas

  • hosts = 2^(32 − n) − 2
  • bandwidth-delay = B × t
  • T_prop = d/v

Practice questions

Routers operate at the

  1. physical layer
  2. data link layer
  3. network layer
  4. application layer
Show the answer

Answer: C. network layer Layer 3.

TCP is

  1. connection-oriented
  2. connectionless
  3. a physical layer
  4. a hardware bus
Show the answer

Answer: A. connection-oriented Reliable.

UDP is

  1. connection-oriented
  2. connectionless
  3. routing
  4. encryption
Show the answer

Answer: B. connectionless No handshake.

HTTPS uses port

  1. 21
  2. 53
  3. 80
  4. 443
Show the answer

Answer: D. 443 TLS.

DNS uses port

  1. 25
  2. 53
  3. 80
  4. 110
Show the answer

Answer: B. 53 Name service.

ARP maps

  1. IP to MAC
  2. name to IP
  3. MAC to port
  4. port to IP
Show the answer

Answer: A. IP to MAC Address resolution.

DHCP

  1. assigns IP addresses
  2. encrypts mail
  3. routes packets
  4. stores web pages
Show the answer

Answer: A. assigns IP addresses Dynamic configuration.

Usable hosts in a /24 are

  1. 254
  2. 256
  3. 128
  4. 1024
Show the answer

Answer: A. 254 2⁸ − 2.

192.168.1.1 is a

  1. private address
  2. public address
  3. multicast address
  4. MAC address
Show the answer

Answer: A. private address RFC 1918.

OSPF is a

  1. link-state protocol
  2. distance-vector protocol
  3. transport protocol
  4. physical cable
Show the answer

Answer: A. link-state protocol Dijkstra.

The number of OSI layers is

  1. 4
  2. 5
  3. 7
  4. 9
Show the answer

Answer: C. 7 Seven.

The practice questions were written for this studio; they are not copied from ASTU papers. ASTU publishes no topic syllabus for these exams, so the topics are an informed guide based on diploma courses, not an official list.

Practise and take a mock test →