CS MCQs

OSI and TCP/IP Models MCQs, Set 1 of 1

  1. Q1. How many layers are in the OSI model?

    • A.5
    • B.6
    • C.7(correct answer)
    • D.4

    Physical, Data link, Network, Transport, Session, Presentation, Application.

  2. Q2. Which OSI layer routes packets between networks?

    • A.Data link
    • B.Network(correct answer)
    • C.Transport
    • D.Session

    The network layer (layer 3) handles logical addressing and routing, e.g. IP.

  3. Q3. A typical network switch operates at which OSI layer?

    • A.Physical
    • B.Data link(correct answer)
    • C.Network
    • D.Application

    Switches forward frames using MAC addresses, which is layer 2.

  4. Q4. TCP and UDP belong to which OSI layer?

    • A.Network
    • B.Transport(correct answer)
    • C.Session
    • D.Presentation

    They provide end-to-end delivery between processes, which is layer 4.

  5. Q5. Which protocol provides reliable, connection-oriented delivery?

    • A.UDP
    • B.IP
    • C.TCP(correct answer)
    • D.ICMP

    TCP uses acknowledgements, retransmission and ordering.

  6. Q6. The TCP connection setup is known as the:

    • A.Two-way handshake
    • B.Three-way handshake(correct answer)
    • C.Four-way handshake
    • D.Single handshake

    SYN, SYN-ACK, ACK.

  7. Q7. How many bits are in an IPv4 address?

    • A.16
    • B.32(correct answer)
    • C.64
    • D.128

    Four octets of 8 bits each.

  8. Q8. How many bits are in an IPv6 address?

    • A.32
    • B.64
    • C.128(correct answer)
    • D.256

    IPv6 uses 128-bit addresses written as eight groups of hex digits.

  9. Q9. What is the unit of data at the data link layer called?

    • A.Packet
    • B.Segment
    • C.Frame(correct answer)
    • D.Bit

    Layer 2 frames; layer 3 packets; layer 4 segments; layer 1 bits.

  10. Q10. Which device connects different networks and forwards packets using IP addresses?

    • A.Hub
    • B.Switch
    • C.Router(correct answer)
    • D.Repeater

    Routers work at layer 3 and choose paths between networks.

  11. Q11. How long is a MAC address?

    • A.32 bits
    • B.48 bits(correct answer)
    • C.64 bits
    • D.128 bits

    Six bytes, usually written as six pairs of hex digits.

  12. Q12. Which protocol finds the MAC address for a known IPv4 address?

    • A.DNS
    • B.ARP(correct answer)
    • C.DHCP
    • D.ICMP

    ARP (Address Resolution Protocol) broadcasts “who has this IP?” on the local network.

  13. Q13. The Internet layer of the TCP/IP model matches which OSI layer?

    • A.Transport
    • B.Data link
    • C.Network(correct answer)
    • D.Session

    Both handle IP addressing and routing.

  14. Q14. A subnet mask of 255.255.255.0 is written in CIDR notation as:

    • A./8
    • B./16
    • C./24(correct answer)
    • D./32

    Three octets of all 1s = 24 network bits.

  15. Q15. Which OSI layer handles encryption and data format translation?

    • A.Session
    • B.Presentation(correct answer)
    • C.Application
    • D.Transport

    The presentation layer (layer 6) deals with encoding, compression and encryption.

  16. Q16. Which of these is a private IPv4 address?

    • A.8.8.8.8
    • B.192.168.1.10(correct answer)
    • C.172.32.0.1
    • D.11.0.0.1

    Private ranges are 10.0.0.0/8, 172.16.0.0/12 (172.16-172.31) and 192.168.0.0/16.

All OSI and TCP/IP Models sets