ECE303 Assignment 2
ECE303 Assignment 2
ECE303 Assignment 2
Assignment 2
Transport Layer:
1. Explain the concept of logical communication in the transport layer. How does it differ
from physical communication at the lower layers of the network model?
2. Compare and contrast User Datagram Protocol (UDP) and Transmission Control Protocol
(TCP) in terms of their reliability, connection establishment, and use cases.
3. Describe how multiplexing and demultiplexing work in the transport layer. How does a
transport-layer protocol distinguish between different application-layer processes?
4. Discuss how the transport layer handles data transmission over an unreliable network.
What mechanisms are used in protocols like TCP to ensure reliability despite the
underlying network issues?
5. UDP is considered a connectionless and unreliable protocol. Discuss scenarios where
using UDP is preferred over TCP despite its lack of reliability and error correction.
6. How does UDP handle multiplexing and demultiplexing without establishing a
connection? What information is used to route data to the correct application process?
7. Draw and explain the structure of a TCP segment. Discuss the purpose of the various
fields in the TCP header, such as sequence number, acknowledgment number, and flags.
8. Describe the three-way handshake process in TCP connection establishment. Why is this
process essential for reliable communication?
9. What is TCP flow control, and how is it achieved using the sliding window protocol?
Explain the significance of the "window size" in this process.
10. Describe the different phases of TCP congestion control (Slow Start, Congestion
Avoidance, Fast Retransmit, and Fast Recovery). How does TCP respond to network
congestion?
11. Explain how UDP ensures data integrity through the use of checksums. Why doesn’t
UDP provide retransmission mechanisms like TCP?
12. Discuss how TCP handles timeouts and retransmissions. How does TCP adjust its
timeout interval dynamically, and why is this important?
13. Explain the differences between multiplexing in TCP and UDP. How do port numbers
play a role in multiplexing and demultiplexing processes?
14. What is meant by a "persistent connection" in TCP, and how does it differ from a "non-
persistent connection"? Give examples of applications where each type would be
preferred.
15. What is the role of the congestion window in TCP’s congestion control algorithm? How
does the size of the congestion window change during different stages of data
transmission?
16. A TCP connection has the following round-trip time (RTT) measurements (in
milliseconds) for four consecutive segments: 120 ms, 100 ms, 150 ms, and 110 ms. Using
the following formula, calculate the estimated RTT after receiving the fourth segment:
Estimated RTT =(1−α )× Previous RTT + α × Sample RTT
Assume α =0.125 and the initial estimated RTT is 100 ms.
Also, calculate the TCP timeout interval using the formula:
Timeout Interval=Estimated RTT + 4 × Deviation ,
where Deviation is calculated as the difference between the Sample RTT and the
Estimated RTT.
17. A TCP connection uses a sliding window mechanism with a window size of 5 segments.
The receiver's advertised window is 8 segments, and the sender's congestion window
(CWND) is currently 6 segments. If each segment is 500 bytes, and the current sequence
number sent is 10500, calculate: The range of sequence numbers that can be sent without
waiting for an acknowledgment. The number of bytes that can still be sent based on the
sender's window and receiver's advertised window.
Network Layer:
1. Explain the concept of the network service model in the network layer. Compare the
services provided by the network layer in a connectionless model like IP versus a
connection-oriented model.
2. Discuss the differences between IPv4 and IPv6 in terms of address length, header format,
and functionality. Why is transitioning to IPv6 necessary despite the success of IPv4?
3. Draw the format of an IPv4 datagram and explain the purpose of key fields such as the
header checksum, time-to-live (TTL), and fragmentation fields.
4. Explain the concept of subnetting. Why is it used, and how does a subnet mask help in
dividing an IP address into network and host parts?
5. Compare classful and classless IP addressing. Why did the Internet transition from
classful to classless addressing, and how does Classless Inter-Domain Routing (CIDR)
improve IP address allocation?
6. Describe the role of the Internet Control Message Protocol (ICMP). What types of ICMP
messages are used for error reporting and network diagnostics?
7. Discuss the format and structure of an IPv6 address. Explain how IPv6 addresses are
written and compressed, and the different types of IPv6 addresses (unicast, multicast,
anycast).
8. Compare and contrast link-state routing and distance vector routing algorithms. Discuss
the key differences in terms of convergence time, complexity, and network overhead.
9. Describe the working principles of the OSPF routing protocol. How does OSPF ensure
that it finds the shortest path between routers in a network?
10. What is the purpose of the Border Gateway Protocol (BGP) in inter-domain routing?
Explain how BGP prevents routing loops and ensures the scalability of large networks.
13. An IPv4 packet of size 2400 bytes, including a 20-byte header, needs to be transmitted
over a network with an MTU of 600 bytes.
a. How many fragments will be created?
b. Calculate the size and offset of each fragment.
14. Given the following routing table of a router using the distance vector algorithm,
calculate the new routing table after receiving the following update from a neighboring
router:
o Cost to A = 1
o Cost to B = 4
o Cost to C = 2
Determine the next hop for the following destination IP addresses using the longest prefix
match: a. 192.168.1.130
b. 192.168.1.200
c. 192.168.0.50
1. Explain the differences between a switch and a hub in terms of how they handle data
transmission and manage collisions in a network.
2. What is the role of a Network Interface Card (NIC) in data link layer communication?
How does it handle MAC addressing and data framing?
3. Compare the functionalities of a modem and a router in a network. How does each device
contribute to communication between different layers of the network?
4. Explain the concept of Cyclic Redundancy Check (CRC) in error detection. How does
CRC detect errors in data transmission?
5. What is the difference between error detection and error correction? Describe a common
error correction technique and explain how it works.
6. Compare CSMA/CD (Carrier Sense Multiple Access with Collision Detection) and
CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance). Where are these
techniques used, and how do they handle collisions?
7. Describe the basic principles of Frequency Division Multiple Access (FDMA) and Time
Division Multiple Access (TDMA). How do these techniques allocate bandwidth among
users?
8. Explain the role of MAC addresses in Ethernet networks. How are MAC addresses
structured, and why are they necessary for data link layer communication?
9. Discuss the structure and characteristics of a Local Area Network (LAN). What are the
advantages of using a LAN within an organization?
10. Explain how the Address Resolution Protocol (ARP) is used to map an IP address to a
MAC address in a local network. What is an ARP cache, and how is it maintained?
11. Draw and explain the structure of an Ethernet frame. Discuss the purpose of each field in
the frame, such as the preamble, source MAC address, destination MAC address, and
payload.
12. Describe the structure and function of IEEE 802.11 wireless networks. How do wireless
LANs differ from wired Ethernet networks in terms of data transmission and security?
13. Differentiate between a firewall and a gateway in a network. What specific functions
does each device serve at the network access layer?
14. Compare the structure and usage of different communication media: copper cables (STP,
UTP), coaxial cables, and optical fibers. What are the advantages and disadvantages of
each?
15. Define bandwidth and data rate. How are these two concepts related, and how do they
influence the performance of a network?
16. Given a data bit sequence 10111001 and a generator polynomial 1001, calculate the CRC
code using the polynomial division method. Show the step-by-step process of calculating
the remainder and appending it to the data sequence.
17. A company has a LAN with a network address 192.168.10.0/24. The LAN needs to be
divided into 4 subnets.
a. What will be the new subnet mask?
b. How many hosts will be available per subnet?
c. Calculate the range of IP addresses for each subnet.
18. Consider an Ethernet network using CSMA/CD with a maximum propagation delay of 50
microseconds.
a. Calculate the minimum frame size for a collision to be detected.
b. How does this frame size affect the efficiency of the network?
19. A wireless communication system uses FDMA with a total available bandwidth of 200
MHz, divided into 25 channels.
a. Calculate the bandwidth of each channel.
b. If the system switches to TDMA with 5 time slots per channel, calculate the effective
bandwidth available per user in each time slot.
20. An optical fiber has a bandwidth of 10 GHz. Assuming the system can transmit 2 bits per
Hz, calculate the maximum data rate supported by the optical fiber. How would using a
more efficient modulation scheme impact the data rate?