Computer Networks
Module 3: Network Layer & Routing
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
View this question on its own page →Network layer of OSI model does not establish any relationship among different packets of same message. (Write True or False)
Worked SolutionAnswer
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.
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
View this question on its own page →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/21Worked SolutionAnswer
(i) 245.248.136.0/21 and 245.248.128.0/22
Step-by-step solution
Given block: 245.248.128.0/20.
A
/20IPv4 block contains:
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/21because:
.The valid
/21sub-blocks inside the/20are:- 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/22because:
.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
/22block.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.
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
View this question on its own page →How many bits are required to represent IPv4 address in any IPv4 header?
(i) 64 bits
(ii) 32 bits
(iii) 16 bits
(iv) 8 bitsWorked SolutionAnswer
(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.
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
View this question on its own page →Which of the following is not applicable for IP?
(i) Error reporting
(ii) Handle addressing conventions
(iii) Datagram format
(iv) Packet handling conventionsWorked SolutionAnswer
(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.
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
View this question on its own page →Which of the following is not applicable for IP?
(i) Error reporting
(ii) Handle addressing conventions
(iii) Datagram format
(iv) Packet handling conventionsWorked SolutionAnswer
(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.
Q1c. Internetworking protocol is known as (i) TCP (ii) IP (iii) ISP (iv) TCP/IP20212m
Module 3: Network Layer & Routing
View this question on its own page →Internetworking protocol is known as
(i) TCP
(ii) IP
(iii) ISP
(iv) TCP/IPWorked SolutionAnswer
(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.
Q1d. Which device uses logical addressing system? (i) Hub (ii) Switch (iii) Bridge (iv) Router20212m
Module 3: Network Layer & Routing
View this question on its own page →Which device uses logical addressing system?
(i) Hub
(ii) Switch
(iii) Bridge
(iv) RouterWorked SolutionAnswer
(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.
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
View this question on its own page →What is the maximum header size of an IP packet?
(i) 32 bytes
(ii) 64 bytes
(iii) 30 bytes
(iv) 60 bytesWorked SolutionAnswer
(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:
bytes.Therefore, the maximum IPv4 header size is 60 bytes.
Final answer: (iv) 60 bytes.
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
View this question on its own page →Which one of the following is not a function of network layer?
(i) Routing
(ii) Inter-networking
(iii) Congestion control
(iv) None of the aboveWorked SolutionAnswer
(iv) None of the above
Explanation
All three listed functions can be associated with the Network layer:
- Routing: Determines suitable paths for packets through an internetwork.
- Internetworking: IP provides communication across interconnected networks.
- 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.
Q1e. What is flooding in routing?20152m
Module 3: Network Layer & Routing
View this question on its own page →What is flooding in routing?
Worked SolutionAnswer
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.
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
View this question on its own page →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) RARPWorked SolutionAnswer
(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.
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
View this question on its own page →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.0Worked SolutionAnswer
(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:
In binary:
11111111.00000000.00000000.00000000Thus 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.
Q1g. What does the term 'best effort' mean in context with IP?20172m
Module 3: Network Layer & Routing
View this question on its own page →What does the term 'best effort' mean in context with IP?
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
View this question on its own page →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 routingQ2b. Draw the IPV4 Datagram Header Format and explain it.20237m
Module 3: Network Layer & Routing
View this question on its own page →Draw the IPV4 Datagram Header Format and explain it.
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
View this question on its own page →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?
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
View this question on its own page →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?
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
View this question on its own page →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.
Q4b. Describe the services provided by network layer. Explain ICMP.20217m
Module 3: Network Layer & Routing
View this question on its own page →Describe the services provided by network layer. Explain ICMP.
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
View this question on its own page →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?
Q5a. Discuss Link-State routing protocol with an example.20237m
Module 3: Network Layer & Routing
View this question on its own page →Discuss Link-State routing protocol with an example.
Q5a. Discuss link state routing with an example.20217m
Module 3: Network Layer & Routing
View this question on its own page →Discuss link state routing with an example.
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
View this question on its own page →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.
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
View this question on its own page →Explain count-to-infinity problem associated with distance vector routing. Discuss the countermeasures taken in Split Horizon and Poison Reverse techniques.
Q6. Describe RIP routing protocol with an example. Explain count to infinity problem and its countermeasures.202214m
Module 3: Network Layer & Routing
View this question on its own page →Describe RIP routing protocol with an example. Explain count to infinity problem and its countermeasures.
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
View this question on its own page →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.
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
View this question on its own page →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.
Q6b. Differentiate between forwarding and routing.20217m
Module 3: Network Layer & Routing
View this question on its own page →Differentiate between forwarding and routing.
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
View this question on its own page →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.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
View this question on its own page →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?
Worked SolutionSolution
The IP packet has:
- Header size = 20 bytes
- Payload = 4000 bytes
- MTU = 1500 bytes
The maximum payload that can fit in one fragment is:
bytes.
Since IPv4 fragment offsets are measured in units of 8 bytes, 1480 bytes is valid because .
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:
- Fragment 2:
- Fragment 3:
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.
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
View this question on its own page →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?
Q7b. Discuss the functions and the design issues of the network layer in the OSI model.20177m
Module 3: Network Layer & Routing
View this question on its own page →Discuss the functions and the design issues of the network layer in the OSI model.
Q7b. Discuss the types of ICMP messages.20156m
Module 3: Network Layer & Routing
View this question on its own page →Discuss the types of ICMP messages.
Q7b. Explain the responsibility of network and transport layers of OSI model with example.20167m
Module 3: Network Layer & Routing
View this question on its own page →Explain the responsibility of network and transport layers of OSI model with example.
Q7b. With a neat diagram, explain distance vector routing protocol.20217m
Module 3: Network Layer & Routing
View this question on its own page →With a neat diagram, explain distance vector routing protocol.
Q8a. What are the functions of a RIP message? List the RIP shortcomings and their corresponding fixes.20167m
Module 3: Network Layer & Routing
View this question on its own page →What are the functions of a RIP message? List the RIP shortcomings and their corresponding fixes.
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
View this question on its own page →Discuss four types of link defined by OSPF. What is the basis of classification for the four types of link defined by OSPF?
Q8b. Differentiate between Static Routing and Dynamic Routing.20177m
Module 3: Network Layer & Routing
View this question on its own page →Differentiate between Static Routing and Dynamic Routing.
Q8b. List RIP shortcomings and their corresponding fixes.20156m
Module 3: Network Layer & Routing
View this question on its own page →List RIP shortcomings and their corresponding fixes.
Q9a. Compare the following terms: (a) ARP vs RARP201914m
Module 3: Network Layer & Routing
View this question on its own page →Compare the following terms: (a) ARP vs RARP
Q9a. Explain the following terms: (a) Border Gateway Protocol20177m
Module 3: Network Layer & Routing
View this question on its own page →Explain the following terms: (a) Border Gateway Protocol
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
View this question on its own page →**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.**Q9c. Write short notes on: DHCP20237m