Computer Networks

Back to Computer Networks

Module 3: Network Layer & Routing

  1. Q1a. Network layer of OSI model does not establish any relationship among different packets of same message. (Write True or False)20152m

    Module 3: Network Layer & Routing

    Network layer of OSI model does not establish any relationship among different packets of same message. (Write True or False)

    View this question on its own page →
    Worked Solution

    Answer

    True

    Explanation

    The Network layer is responsible primarily for logical addressing, routing, and forwarding packets from source to destination.

    When a message is divided into multiple packets, the Network layer can treat those packets independently, particularly in a connectionless datagram network. Different packets may take different routes and may arrive out of order.

    The Network layer does not provide the end-to-end relationship, sequencing, acknowledgements, or retransmissions required for reliable delivery. Those functions are normally provided by the Transport layer when a reliable transport protocol such as TCP is used.

    Therefore, the statement that the Network layer does not establish a relationship among different packets of the same message is True.

    Final answer: True.

  2. Q1a. An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20 The ISP wants to give half of this chunk of addresses to organization A, and a quarter to organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B? (i) 245.248.136.0/21 and 245.248.128.0/22 (ii) 245.248.128.0/21 and 245.248.128.0/22 (iii) 245.248.132.0/22 and 245.248.132.0/21 (iv) 245.248.136.0/22 and 245.248.132.0/2120202m

    Module 3: Network Layer & Routing

    An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it:

    245.248.128.0/20

    The ISP wants to give half of this chunk of addresses to organization A, and a quarter to organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?

    (i) 245.248.136.0/21 and 245.248.128.0/22
    (ii) 245.248.128.0/21 and 245.248.128.0/22
    (iii) 245.248.132.0/22 and 245.248.132.0/21
    (iv) 245.248.136.0/22 and 245.248.132.0/21

    View this question on its own page →
    Worked Solution

    Answer

    (i) 245.248.136.0/21 and 245.248.128.0/22

    Step-by-step solution

    Given block: 245.248.128.0/20.

    A /20 IPv4 block contains:
    23220=212=40962^{32-20}=2^{12}=4096 addresses.

    So the complete range is:
    245.248.128.0 to 245.248.143.255.

    1. Organization A needs half

    Half of 4096 = 2048 addresses.
    A 2048-address block corresponds to /21 because:
    23221=20482^{32-21}=2048.

    The valid /21 sub-blocks inside the /20 are:

    • 245.248.128.0/21 → 245.248.128.0–245.248.135.255
    • 245.248.136.0/21 → 245.248.136.0–245.248.143.255

    2. Organization B needs one quarter

    One quarter of 4096 = 1024 addresses.
    A 1024-address block corresponds to /22 because:
    23222=10242^{32-22}=1024.

    If A receives 245.248.136.0/21, the remaining lower half is 245.248.128.0–245.248.135.255. B can receive 245.248.128.0/22, which covers 245.248.128.0–245.248.131.255.

    The ISP then retains 245.248.132.0–245.248.135.255, which is another /22 block.

    Thus the allocations do not overlap and exactly satisfy the required 1/2 and 1/4 sizes.

    Checking the options

    • (i) A = 245.248.136.0/21, B = 245.248.128.0/22 → valid, non-overlapping. ✅
    • (ii) A = 245.248.128.0/21 and B = 245.248.128.0/22 → overlap. ❌
    • (iii) A and B use overlapping address space and the block sizes/positions are invalid for the required allocation. ❌
    • (iv) A = 245.248.136.0/22 is only 1024 addresses, not the required 2048 for half. ❌

    Final answer: (i) 245.248.136.0/21 and 245.248.128.0/22.

  3. Q1c. How many bits are required to represent IPv4 address in any IPv4 header? (i) 64 bits (ii) 32 bits (iii) 16 bits (iv) 8 bits20232m

    Module 3: Network Layer & Routing

    How many bits are required to represent IPv4 address in any IPv4 header?
    (i) 64 bits
    (ii) 32 bits
    (iii) 16 bits
    (iv) 8 bits

    View this question on its own page →
    Worked Solution

    Answer

    (ii) 32 bits

    Explanation

    An IPv4 address is 32 bits long, normally written as four 8-bit octets in dotted-decimal notation, for example 192.168.1.10.

    The IPv4 header contains two 32-bit address fields:

    • Source address: 32 bits
    • Destination address: 32 bits

    Thus, each individual IPv4 address requires 32 bits.

    Final answer: (ii) 32 bits.

  4. Q1c. Which of the following is not applicable for IP? (i) Error reporting (ii) Handle addressing conventions (iii) Datagram format (iv) Packet handling conventions20192m

    Module 3: Network Layer & Routing

    Which of the following is not applicable for IP?
    (i) Error reporting
    (ii) Handle addressing conventions
    (iii) Datagram format
    (iv) Packet handling conventions

    View this question on its own page →
    Worked Solution

    Answer

    (i) Error reporting

    Explanation

    IP is responsible for logical addressing, packet/datagram format, and packet handling/routing conventions. However, IP itself is a connectionless best-effort delivery protocol and does not provide error reporting as a core IP function.

    Error reporting for IP-related delivery problems is provided by ICMP (Internet Control Message Protocol), which works alongside IP.

    Therefore, among the given choices, error reporting is not directly an IP function.

    Final answer: (i) Error reporting.

  5. Q1c. Which of the following is not applicable for IP? (i) Error reporting (ii) Handle addressing conventions (iii) Datagram format (iv) Packet handling conventions20182m

    Module 3: Network Layer & Routing

    Which of the following is not applicable for IP?
    (i) Error reporting
    (ii) Handle addressing conventions
    (iii) Datagram format
    (iv) Packet handling conventions

    View this question on its own page →
    Worked Solution

    Answer

    (i) Error reporting

    Explanation

    IP is responsible for logical addressing, datagram format, and packet forwarding/handling across interconnected networks. However, error reporting is provided by ICMP, which operates alongside IP rather than being a core function of IP itself.

    Therefore, among the given options, error reporting is the one not directly applicable as an IP function.

    Final answer: (i) Error reporting.

  6. Q1c. Internetworking protocol is known as (i) TCP (ii) IP (iii) ISP (iv) TCP/IP20212m

    Module 3: Network Layer & Routing

    Internetworking protocol is known as

    (i) TCP
    (ii) IP
    (iii) ISP
    (iv) TCP/IP

    View this question on its own page →
    Worked Solution

    Answer

    (ii) IP

    Explanation

    IP (Internet Protocol) is the Network-layer protocol responsible for logical addressing and forwarding datagrams between networks, making internetwork communication possible.

    • TCP: Transport-layer protocol providing reliable, connection-oriented delivery.
    • IP: Network-layer protocol providing logical addressing and datagram delivery across interconnected networks.
    • ISP: Internet Service Provider, not a protocol.
    • TCP/IP: A protocol suite, not the name of the individual internetworking protocol asked for here.

    Final answer: (ii) IP.

  7. Q1d. Which device uses logical addressing system? (i) Hub (ii) Switch (iii) Bridge (iv) Router20212m

    Module 3: Network Layer & Routing

    Which device uses logical addressing system?

    (i) Hub
    (ii) Switch
    (iii) Bridge
    (iv) Router

    View this question on its own page →
    Worked Solution

    Answer

    (iv) Router

    Explanation

    A logical address is an IP address. Routers operate at the Network layer and use logical IP addresses to make forwarding decisions between different networks.

    • Hub → Physical layer; does not use logical addressing for forwarding.
    • Switch → Data Link layer; normally forwards using MAC addresses.
    • Bridge → Data Link layer; uses MAC addresses.
    • Router → Network layer; uses IP/logical addresses.

    Final answer: (iv) Router.

  8. Q1d. What is the maximum header size of an IP packet? (i) 32 bytes (ii) 64 bytes (iii) 30 bytes (iv) 60 bytes20222m

    Module 3: Network Layer & Routing

    What is the maximum header size of an IP packet?

    (i) 32 bytes
    (ii) 64 bytes
    (iii) 30 bytes
    (iv) 60 bytes

    View this question on its own page →
    Worked Solution

    Answer

    (iv) 60 bytes

    Explanation

    For IPv4, the base header is 20 bytes. The header length is specified by the IHL field in units of 32-bit words.

    The IHL field is 4 bits, so its maximum value is 15 words.

    Each word = 4 bytes.

    Maximum header size:
    15×4=6015 \times 4 = 60 bytes.

    Therefore, the maximum IPv4 header size is 60 bytes.

    Final answer: (iv) 60 bytes.

  9. Q1d. Which one of the following is not a function of network layer? (i) Routing (ii) Inter-networking (iii) Congestion control (iv) None of the above20192m

    Module 3: Network Layer & Routing

    Which one of the following is not a function of network layer?
    (i) Routing
    (ii) Inter-networking
    (iii) Congestion control
    (iv) None of the above

    View this question on its own page →
    Worked Solution

    Answer

    (iv) None of the above

    Explanation

    All three listed functions can be associated with the Network layer:

    1. Routing: Determines suitable paths for packets through an internetwork.
    2. Internetworking: IP provides communication across interconnected networks.
    3. Congestion control: Network-layer mechanisms and protocols can participate in congestion management, although congestion control is also handled at the Transport layer in systems such as TCP.

    Therefore, none of options (i), (ii), or (iii) is the intended answer as a non-function.

    Final answer: (iv) None of the above.

  10. Q1e. What is flooding in routing?20152m

    Module 3: Network Layer & Routing

    What is flooding in routing?

    View this question on its own page →
    Worked Solution

    Answer

    Flooding is a routing technique in which a router forwards an incoming packet on all outgoing links except the link on which it arrived, subject to rules that prevent indefinite circulation.

    Key idea

    Instead of calculating one best route, the packet is propagated throughout the network. A packet can reach the destination through multiple paths.

    Advantages

    • Very simple routing method.
    • Does not require complete routing information.
    • Can be highly robust because multiple copies may reach the destination.

    Disadvantages

    • Creates many duplicate packets and wastes bandwidth.
    • Can cause congestion unless controlled.

    Common controls include a hop count/TTL and packet sequence numbers to discard duplicates.

    Exam-ready definition: Flooding forwards packets over all possible outgoing paths, with mechanisms such as hop limits used to control duplicates and loops.

  11. Q1f. Which one of the following protocols is NOT used to resolve one form of address to another one? (i) DNS (ii) ARP (iii) DHCP (iv) RARP20162m

    Module 3: Network Layer & Routing

    Which one of the following protocols is NOT used to resolve one form of address to another one?
    (i) DNS
    (ii) ARP
    (iii) DHCP
    (iv) RARP

    View this question on its own page →
    Worked Solution

    Answer

    (iii) DHCP

    Explanation

    The question asks which protocol is not used to resolve one form of address to another.

    • DNS: Resolves domain names to IP addresses (and supports reverse/other mappings).
    • ARP: Resolves an IPv4 address to a MAC address on a local network.
    • RARP: Historically resolved a MAC address to an IP address.
    • DHCP: Dynamically assigns network configuration such as an IP address, subnet mask, gateway, and DNS server information. It is not primarily an address-resolution protocol.

    Therefore the correct answer is (iii) DHCP.

    Final answer: (iii) DHCP.

  12. Q1f. What is the default subnet mask for a class A network? (i) 127.0.0.1 (ii) 255.0.0.0 (iii) 255.255.255.0 (iv) 255.255.255.020202m

    Module 3: Network Layer & Routing

    What is the default subnet mask for a class A network?

    (i) 127.0.0.1
    (ii) 255.0.0.0
    (iii) 255.255.255.0
    (iv) 255.255.255.0

    View this question on its own page →
    Worked Solution

    Answer

    (ii) 255.0.0.0

    Explanation

    In the traditional classful IPv4 addressing scheme, a Class A network uses:

    • 8 bits for the network portion.
    • 24 bits for the host portion.

    Therefore its default prefix is /8.

    The corresponding subnet mask is:

    255.0.0.0255.0.0.0

    In binary:

    11111111.00000000.00000000.00000000

    Thus the correct answer is (ii) 255.0.0.0.

    Note: 127.0.0.0/8 is reserved for loopback, and 255.255.255.0 is a /24 mask, not the default Class A mask.

  13. Q1g. What does the term 'best effort' mean in context with IP?20172m

    Module 3: Network Layer & Routing

    What does the term 'best effort' mean in context with IP?

    View this question on its own page →
  14. Q1i. Which one of the following is TRUE interior Gateway routing protocols - Routing Information protocol (RIP) and Open Shortest Path First (OSPF)? (i) RIP uses distance vector routing and OSPF uses link state routing (ii) OSPF uses distance vector routing and RIP uses link state routing (iii) Both RIP and OSPF use link state routing (iv) Both RIP and OSPF use distance vector routing20162m

    Module 3: Network Layer & Routing

    Which one of the following is TRUE interior Gateway routing protocols - Routing Information protocol (RIP) and Open Shortest Path First (OSPF)?
    (i) RIP uses distance vector routing and OSPF uses link state routing
    (ii) OSPF uses distance vector routing and RIP uses link state routing
    (iii) Both RIP and OSPF use link state routing
    (iv) Both RIP and OSPF use distance vector routing

    View this question on its own page →
  15. Q2b. Draw the IPV4 Datagram Header Format and explain it.20237m

    Module 3: Network Layer & Routing

    Draw the IPV4 Datagram Header Format and explain it.

    View this question on its own page →
  16. Q3a. We know that there are 2 types of address schemes (i.e. IP address and MAC address) in computer networks. Explain what the need of having two types of addresses. What will happen if we use only IP address in computer networks?201914m

    Module 3: Network Layer & Routing

    We know that there are 2 types of address schemes (i.e. IP address and MAC address) in computer networks. Explain what the need of having two types of addresses. What will happen if we use only IP address in computer networks?

    View this question on its own page →
  17. Q3a. The address of a class B host is to be split into subnets with a 6-bit subnet number: What is the maximum number of subnets and the maximum number of hosts in each subnet? What is the number of networks allowed under Class B addresses?20167m

    Module 3: Network Layer & Routing

    The address of a class B host is to be split into subnets with a 6-bit subnet number: What is the maximum number of subnets and the maximum number of hosts in each subnet? What is the number of networks allowed under Class B addresses?

    View this question on its own page →
  18. Q4a. In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. Find the position of the datagram, the sequence numbers of the first and the last bytes of the payload respectively.20167m

    Module 3: Network Layer & Routing

    In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. Find the position of the datagram, the sequence numbers of the first and the last bytes of the payload respectively.

    View this question on its own page →
  19. Q4b. Describe the services provided by network layer. Explain ICMP.20217m

    Module 3: Network Layer & Routing

    Describe the services provided by network layer. Explain ICMP.

    View this question on its own page →
  20. Q4b. An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are?20167m

    Module 3: Network Layer & Routing

    An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are?

    View this question on its own page →
  21. Q5a. Discuss Link-State routing protocol with an example.20237m

    Module 3: Network Layer & Routing

    Discuss Link-State routing protocol with an example.

    View this question on its own page →
  22. Q5a. Discuss link state routing with an example.20217m

    Module 3: Network Layer & Routing

    Discuss link state routing with an example.

    View this question on its own page →
  23. Q5b. An ISP is granted a block of addresses starting with 120.60.4.0/22. The ISP wants to distribute these blocks to 100 organizations with each organization receiving just eight addresses. Design the sub-blocks and give the slash notation for each sub-block. Find out how many addresses are still available after these allocations.20217m

    Module 3: Network Layer & Routing

    An ISP is granted a block of addresses starting with 120.60.4.0/22. The ISP wants to distribute these blocks to 100 organizations with each organization receiving just eight addresses. Design the sub-blocks and give the slash notation for each sub-block. Find out how many addresses are still available after these allocations.

    View this question on its own page →
  24. Q5b. Explain count-to-infinity problem associated with distance vector routing. Discuss the countermeasures taken in Split Horizon and Poison Reverse techniques.20237m

    Module 3: Network Layer & Routing

    Explain count-to-infinity problem associated with distance vector routing. Discuss the countermeasures taken in Split Horizon and Poison Reverse techniques.

    View this question on its own page →
  25. Q6. Describe RIP routing protocol with an example. Explain count to infinity problem and its countermeasures.202214m

    Module 3: Network Layer & Routing

    Describe RIP routing protocol with an example. Explain count to infinity problem and its countermeasures.

    View this question on its own page →
  26. Q6a. An ISP is granted the block 80.70.56.0/21. The ISP needs to allocate addresses for 2 organizations each 500 addresses, 2 organizations each with 250 addresses and 3 organizations each with 50 addresses. Design a subnet and find the range of addresses and unallocated addresses for each organization.20237m

    Module 3: Network Layer & Routing

    An ISP is granted the block 80.70.56.0/21. The ISP needs to allocate addresses for 2 organizations each 500 addresses, 2 organizations each with 250 addresses and 3 organizations each with 50 addresses. Design a subnet and find the range of addresses and unallocated addresses for each organization.

    View this question on its own page →
  27. Q6a. With the help of a neat and labelled diagram, explain the message format of ICMP. Explain various types of ICMP error messages and query messages.201714m

    Module 3: Network Layer & Routing

    With the help of a neat and labelled diagram, explain the message format of ICMP. Explain various types of ICMP error messages and query messages.

    View this question on its own page →
  28. Q6b. Differentiate between forwarding and routing.20217m

    Module 3: Network Layer & Routing

    Differentiate between forwarding and routing.

    View this question on its own page →
  29. Q7. An ISP is granted the block 80.70.56.0/21. The ISP needs to allocate addresses for two organizations each with 500 addresses, two organizations each with 250 addresses, and three organizations each with 50 addresses. (a) Find the number and range of addresses in the ISP block. (b) Find the range of addresses for each organization and the range of unallocated addresses.202214m

    Module 3: Network Layer & Routing

    An ISP is granted the block 80.70.56.0/21. The ISP needs to allocate addresses for two organizations each with 500 addresses, two organizations each with 250 addresses, and three organizations each with 50 addresses.

    (a) Find the number and range of addresses in the ISP block.
    (b) Find the range of addresses for each organization and the range of unallocated addresses.

    View this question on its own page →
  30. Q7a. Consider a router receiving an IP packet of header size 20 Bytes (having no optional fields) and payload size of 4000 Bytes. Now the router must transmit this packet across an Ethernet network, which has Maximum Transmission Unit (MTU) of 1500 Bytes. If the router attempts to send the maximum payload bits permissible in each attempt, how fragmentation is to be carried out to transmit the IP packet in the Ethernet network?20237m

    Module 3: Network Layer & Routing

    Consider a router receiving an IP packet of header size 20 Bytes (having no optional fields) and payload size of 4000 Bytes. Now the router must transmit this packet across an Ethernet network, which has Maximum Transmission Unit (MTU) of 1500 Bytes. If the router attempts to send the maximum payload bits permissible in each attempt, how fragmentation is to be carried out to transmit the IP packet in the Ethernet network?

    View this question on its own page →
    Worked Solution

    Solution

    The IP packet has:

    • Header size = 20 bytes
    • Payload = 4000 bytes
    • MTU = 1500 bytes

    The maximum payload that can fit in one fragment is:

    150020=14801500 - 20 = 1480 bytes.

    Since IPv4 fragment offsets are measured in units of 8 bytes, 1480 bytes is valid because 1480/8=1851480/8=185.

    Therefore the 4000-byte payload is divided as:

    • Fragment 1: 1480 bytes payload
    • Fragment 2: 1480 bytes payload
    • Fragment 3: 1040 bytes payload

    The fragment offsets are:

    • Fragment 1: 0/8=00/8=0
    • Fragment 2: 1480/8=1851480/8=185
    • Fragment 3: (1480+1480)/8=370(1480+1480)/8=370
    Fragment Payload Total Length Fragment Offset MF bit
    1 1480 bytes 1500 bytes 0 1
    2 1480 bytes 1500 bytes 185 1
    3 1040 bytes 1060 bytes 370 0

    The MF (More Fragments) bit is 1 for the first two fragments and 0 for the final fragment.

    Thus, the original packet is transmitted as three IPv4 fragments with offsets 0, 185, and 370.

  31. Q7a. Explain the procedure for checksum and verification in the IPv4 protocol. What part of an IPv4 packet is covered in the checksum calculation and why? Are options, if present, included in the calculation?20158m

    Module 3: Network Layer & Routing

    Explain the procedure for checksum and verification in the IPv4 protocol. What part of an IPv4 packet is covered in the checksum calculation and why? Are options, if present, included in the calculation?

    View this question on its own page →
  32. Q7b. Discuss the functions and the design issues of the network layer in the OSI model.20177m

    Module 3: Network Layer & Routing

    Discuss the functions and the design issues of the network layer in the OSI model.

    View this question on its own page →
  33. Q7b. Discuss the types of ICMP messages.20156m

    Module 3: Network Layer & Routing

    Discuss the types of ICMP messages.

    View this question on its own page →
  34. Q7b. Explain the responsibility of network and transport layers of OSI model with example.20167m

    Module 3: Network Layer & Routing

    Explain the responsibility of network and transport layers of OSI model with example.

    View this question on its own page →
  35. Q7b. With a neat diagram, explain distance vector routing protocol.20217m

    Module 3: Network Layer & Routing

    With a neat diagram, explain distance vector routing protocol.

    View this question on its own page →
  36. Q8a. What are the functions of a RIP message? List the RIP shortcomings and their corresponding fixes.20167m

    Module 3: Network Layer & Routing

    What are the functions of a RIP message? List the RIP shortcomings and their corresponding fixes.

    View this question on its own page →
  37. Q8a. Discuss four types of link defined by OSPF. What is the basis of classification for the four types of link defined by OSPF?20158m

    Module 3: Network Layer & Routing

    Discuss four types of link defined by OSPF. What is the basis of classification for the four types of link defined by OSPF?

    View this question on its own page →
  38. Q8b. Differentiate between Static Routing and Dynamic Routing.20177m

    Module 3: Network Layer & Routing

    Differentiate between Static Routing and Dynamic Routing.

    View this question on its own page →
  39. Q8b. List RIP shortcomings and their corresponding fixes.20156m

    Module 3: Network Layer & Routing

    List RIP shortcomings and their corresponding fixes.

    View this question on its own page →
  40. Q9a. Compare the following terms: (a) ARP vs RARP201914m

    Module 3: Network Layer & Routing

    Compare the following terms: (a) ARP vs RARP

    View this question on its own page →
  41. Q9a. Explain the following terms: (a) Border Gateway Protocol20177m

    Module 3: Network Layer & Routing

    Explain the following terms: (a) Border Gateway Protocol

    View this question on its own page →
  42. Q9b. **An ISP is granted the block 80.70.56.0/21. The ISP needs to allocate addresses for two organizations each with 500 addresses, two organizations each with 250 addresses, and three organizations each with 50 addresses. (i) Find the number and range of addresses in the ISP block. (ii) Find the range of addresses for each organization and the range of unallocated addresses.**20207m

    Module 3: Network Layer & Routing

    **An ISP is granted the block 80.70.56.0/21. The ISP needs to allocate addresses for two organizations each with 500 addresses, two organizations each with 250 addresses, and three organizations each with 50 addresses.

    (i) Find the number and range of addresses in the ISP block.
    (ii) Find the range of addresses for each organization and the range of unallocated addresses.**

    View this question on its own page →
  43. Q9c. Write short notes on: DHCP20237m

    Module 3: Network Layer & Routing

    Write short notes on: DHCP

    View this question on its own page →