0% found this document useful (0 votes)
3 views15 pages

MAC Sublayer Functions Explanation

The document outlines the MAKAUT Computer Networks Semester 6 exam paper, detailing answers for Group A (very short answers), Group B (short answers), and Group C (long answers). It covers topics such as MAC sublayer functions, FTP operation, session layer functions, and various networking protocols. Each section provides concise explanations and examples relevant to computer networking concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views15 pages

MAC Sublayer Functions Explanation

The document outlines the MAKAUT Computer Networks Semester 6 exam paper, detailing answers for Group A (very short answers), Group B (short answers), and Group C (long answers). It covers topics such as MAC sublayer functions, FTP operation, session layer functions, and various networking protocols. Each section provides concise explanations and examples relevant to computer networking concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

MAC Sublayer Functions Explanation

solve this quetion properly from start to end and while at the group c portion give big big answers

Let's solve the MAKAUT Computer Networks Semester 6 exam (2023–2024) paper completely. You
asked for Group C to be answered with long, detailed explanations, so I’ll treat that accordingly.

🧩 Group A – Very Short Answer (Answer Any 10) [1×10 = 10]


1. What is DNS in computer network?
➤ DNS (Domain Name System) translates human-friendly domain names (like www.example.com)
into IP addresses understood by machines (like 192.0.2.1).

2. Which multiplexing technique shifts each signal to a different carrier frequency?


➤ Frequency Division Multiplexing (FDM).

3. What is the Hamming Distance between two equal codewords?


➤ The Hamming Distance is the number of positions at which the corresponding bits differ. For
identical codewords, it is 0.

4. What are autonomous systems in computer networks?


➤ An autonomous system is a collection of IP networks under the control of a single organization
that presents a common routing policy to the Internet.

5. TCP assigns a sequence number to each segment that is being sent. The sequence number
for each segment is the number of the _______ byte carried in that segment.
➤ first byte.
6. What are the transmission modes in FTP?
➤ Stream mode, Block mode, and Compressed mode.
7. In synchronous TDM, for n signal sources of the same data rate, what will be the number of
slots in each frame?
➤ n slots.
8. In bit stuffing, when is an extra 0 bit stuffed to the data section of the frame?
➤ After five consecutive 1s, a 0 is stuffed.
9. What are the number of bits required for IPv4 addresses when expressed in binary?
➤ 32 bits.

10. In the ____ bucket algorithm, bursty chunks are stored in bucket and sent out at an average
rate.
➤ Leaky bucket.
11. Why is PGP needed?
➤ Pretty Good Privacy (PGP) is needed for secure email communication — it provides encryption,
authentication, and integrity.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 1/15
12. The point where the secure internal network and untrusted external network meet and a
firewall is installed is known as ______.
➤ Demilitarized Zone (DMZ).

📄 Group B – Short Answer (Answer Any 3) [5×3 = 15]


2. How does FTP work?
FTP (File Transfer Protocol) works using a client-server model. It uses two separate connections between
client and server:

Control Connection (Port 21): For commands and responses.


Data Connection (Port 20): For actual file transfer.
It supports active and passive modes:

In active mode, the client opens a random port and tells the server to connect to it.
In passive mode, the server tells the client which port to use for data transfer.

3. Describe the functions of the session layer of the OSI model.


Session Layer (Layer 5) establishes, maintains, and terminates communication sessions between
applications.
Key functions:

Dialog control (full/half duplex).


Synchronization with checkpoints.

Session management and recovery.

4. What is piggybacking? Discuss its advantages.


Piggybacking is the technique of delaying the ACK of received frames and sending it along with the
next data frame.
Advantages:

Reduces overhead.

Improves channel efficiency.


Fewer separate ACK frames.

5. First address of classless block 12.2.2.76/27?


/27 = 255.255.255.224 → Block size = 32
Network address = 12.2.2.(76 - (76 % 32)) = 12.2.2.64
So, first address = 12.2.2.64

6. Can a correct UDP checksum ensure error-free delivery?


No. Even if checksum matches, some rare undetected errors may still exist due to checksum limitations.
With TCP, additional mechanisms like sequence numbers and acknowledgements provide more robust
error handling.

📘 Group C – Long Answer (Answer Any 3) [15×3 = 45]


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 2/15
Q7: MAC, ALOHA, Go-Back-N

(a) Functions of MAC sublayer [4]

Controls access to the shared physical medium.

Resolves collisions (e.g., CSMA/CD, CSMA/CA).


Frame delimitation and addressing (e.g., using MAC address).

Error detection via CRC.

Implements protocol-specific mechanisms (e.g., token passing).

(b) Working of Pure ALOHA and Slotted ALOHA [3+2]

Pure ALOHA:
➤ Send any time. If no collision, success. Else, wait random time and resend.
➤ Vulnerable time = 2 × Tframe.

Slotted ALOHA:
➤ Time is divided into slots. Transmit only at slot boundaries.
➤ Vulnerable time = Tframe.
➤ Throughput is higher than Pure ALOHA (maximum ~37% vs ~18%).

(c) Go-Back-N Protocol [6]


A sliding window protocol where sender can send N frames before needing an ACK.

If one frame is lost, all subsequent frames are resent.


Receiver can only accept in-order frames.
Diagram:

csharp

Sender → F1 → F2 → F3 → ...
← ACK1 ← X (ACK2 lost)
Go back and resend from F2 onward

Q8: Private IP, DHCP, CIDR block

(a) What is a private IP address and why is it needed? [5]

Private IPs are reserved IPs for internal network use (not routable on the internet).
Ranges:

10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255

192.168.0.0 – 192.168.255.255
Needed to reduce IPv4 exhaustion and for internal communication.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 3/15
(b) DHCP State Transition Diagram [6]
States:

1. INIT → client broadcasts DHCPDISCOVER


2. SELECTING → receives DHCPOFFERs

3. REQUESTING → sends DHCPREQUEST


4. BOUND → receives DHCPACK and uses IP
5. RENEWING → sends DHCPREQUEST to renew lease

6. REBINDING → tries another DHCP server


(Diagram includes transitions and timers like T1, T2)

(c) First and last address of 205.16.37.39/28 [4]


/28 = 255.255.255.240 → block size = 16
Network: 205.16.37.(39 - (39 % 16)) = 205.16.37.32
Broadcast: 205.16.37.47
→ First address: 205.16.37.33
→ Last address: 205.16.37.46

Q9: TCP 3-way Handshake, Port Numbers, Bucket Algorithms

(a) Three-way handshake in TCP with diagram [6]


Used to establish a reliable TCP connection.
Steps:

1. SYN → Client sends SYN(seq=x)


2. SYN-ACK → Server replies SYN(seq=y), ACK(x+1)
3. ACK → Client replies ACK(y+1)
Diagram:

arduino

Client → SYN(x) → Server


Client ← SYN-ACK(y, x+1) ← Server
Client → ACK(y+1) → Server

(b) Port Number Importance [2+1]

Identifies specific processes/services on a host.


For TCP connection:

Host A to B: Src port = x, Dest port = y


Host B to A: Src = y, Dest = x

(c) Leaky-bucket & Token-bucket algorithm [4+2]

Leaky Bucket: Constant output rate. Used for traffic shaping.


➤ Bucket leaks at fixed rate; bursts not allowed.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 4/15
Token Bucket: Allows burst. Tokens accumulate; data sent when tokens exist.
➤ If enough tokens, a burst can go through.

Combination: Token Bucket for burst tolerance + Leaky Bucket for smooth output → optimized
QoS.

Would you like Q10 or Q11 solved too?

yes

Let's now complete the remaining Group C Long Answer Questions (Q10 and Q11) from your MAKAUT
Computer Networks Semester 6 exam paper, with detailed explanations as requested.

✅ Q10: Packet Filter Firewall & Symmetric Key Encryption [7 + 8 =


15]

(a) How does a Packet Filter Firewall work? [7 marks]

A packet filtering firewall operates at the network layer (Layer 3) of the OSI model and filters traffic
based on predefined rules related to the following criteria:

Source IP address
Destination IP address

Source port
Destination port
Protocol (TCP, UDP, ICMP, etc.)

🔧 Working Principle:
1. When a packet arrives at the firewall, it checks the header information.
2. The firewall compares it against a rule table (Access Control List - ACL).

3. Based on the rules, it performs one of the following:


Allow (ACCEPT) the packet.

Deny (DROP) the packet silently.


Reject with an error message.

✅ Advantages:
Lightweight and fast.
Easy to configure for basic security needs.
Can prevent unauthorized access from known IPs or ports.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 5/15
❌ Limitations:
Cannot inspect the packet content (no deep inspection).

Vulnerable to IP spoofing.
Cannot detect attacks in the payload.

🔐 Example Rule Table:


Rule Source IP Dest IP Protocol Port Action
1 Any 10.0.0.5 TCP 80 Allow
2 192.168.* Any UDP 53 Allow

3 Any Any Any Any Deny

(b) With block diagram explain symmetric key encryption. [8 marks]

Symmetric Key Encryption is a cryptographic technique where the same key is used for both encryption
and decryption of the message.

🧱 Block Diagram:
csharp

[Plaintext]
|
v
[Encryption Algorithm]
| (uses secret key K)
v
[Ciphertext] → (Sent over insecure channel) →
|
v
[Decryption Algorithm]
| (same key K)
v
[Plaintext]

🔐 Important Components:
Plaintext: Original data/message to be encrypted.
Key (K): A shared secret key known to both sender and receiver.

Encryption Algorithm: Transforms plaintext into ciphertext using key.

Ciphertext: Scrambled unreadable message.


Decryption Algorithm: Converts ciphertext back to plaintext using the same key.

🔒 Examples of Symmetric Key Algorithms:


AES (Advanced Encryption Standard)

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 6/15
DES (Data Encryption Standard)

RC4
Blowfish

✅ Advantages:
Faster than asymmetric encryption.

Good for encrypting large amounts of data.

❌ Disadvantages:
Key distribution is difficult.

If the key is compromised, the data security is broken.

✅ Q11: Distance Vector Routing & Packet Layer Traversal [5 + 5 +


5 = 15]

(a) Explain the Two Node Instability Problem in Distance Vector Routing. [5 marks]

In Distance Vector Routing, routers exchange information only with their immediate neighbors. The
two-node instability problem arises when:

One router goes down or a link fails.


The other router keeps updating its table based on the invalid distance from its neighbor.

Both routers keep increasing the metric to a particular destination indefinitely (called count-to-
infinity problem).

🧱 Scenario:
Router A and B connected to each other.
Destination network D is originally 1 hop away from A.

A loses connection to D.

B still believes D is reachable via A.

A then thinks D is reachable via B → loop begins.

(b) Solutions to the Two Node Instability Problem in Distance Vector Routing. [5
marks]

To avoid or reduce the count-to-infinity problem, several techniques are used:

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 7/15
✅ 1. Split Horizon:
A router does not advertise a route back to the neighbor from which it learned that route.

Breaks the loop immediately.

✅ 2. Split Horizon with Poison Reverse:


Instead of not advertising, it advertises the route with infinite metric (unreachable) back to the
source.

✅ 3. Hold-Down Timers:
After a route becomes unreachable, routers wait for a certain period before accepting new
updates about that route. Helps avoid false reconvergence.

✅ 4. Triggered Updates:
When a route changes, send updates immediately, rather than waiting for the regular update
interval.

(c) Assume a packet has to visit two routers during transmission from source to
destination. Determine how many times the packet has to visit the network layer
and the data link layer. [5 marks]

Let’s break this step by step. A packet from source → Router 1 → Router 2 → Destination.

💡 At Each Hop:
The data link layer operates between each directly connected pair.

The network layer is involved at every device (source, routers, destination) for routing.

🧾 Total Traversals:
Device Network Layer Data Link Layer

Source 1 1
Router 1 1 2 (receive + forward)

Router 2 1 2 (receive + forward)

Destination 1 1
Total 4 6

✅ So, the packet has to visit:


Network Layer: 4 times
Data Link Layer: 6 times

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 8/15
Let me know if you'd like a clean PDF version of the entire solution or help with practicing more CN
problems!

explain the group-B


questions in details

Here’s a detailed explanation of all Group-B questions from the MAKAUT 2023–24 Semester 6
Computer Networks exam (EC602/PCC-CS602):

📄 Group-B (Short Answer Type Questions)


Answer any three: Each question carries 5 marks.

Q2. How does FTP work?

FTP (File Transfer Protocol) is a standard network protocol used to transfer files from one host to
another over a TCP/IP-based network, such as the internet.

🌐 Client-Server Model:
FTP uses a client-server architecture.

The FTP client initiates a connection to an FTP server to perform operations like uploading or
downloading files.

🔗 Two Separate Connections:


1. Control Connection (Port 21)
➤ Used for exchanging commands (like `USER`, `PASS`, `LIST`, `RETR`, `STOR`) and server responses.
➤ Remains open throughout the session.
2. Data Connection (Port 20 or dynamic port)
➤ Used for actual file transfer and directory listing.
➤ Opened and closed as needed.

🔄 Modes of Operation:
Active Mode:
➤ Client opens a random port and tells the server (through the control connection) to connect back
to that port to send data.

Passive Mode:
➤ Server opens a random port and tells the client to initiate the data connection.
➤ Useful when client is behind a firewall.

📥 Typical FTP Session Steps:


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 9/15
1. Client connects to server using control connection.

2. Authentication via `USER` and `PASS` commands.


3. Server confirms and accepts.

4. Data transfer commands (`LIST`, `RETR`, `STOR`) are sent.

5. Files are transferred over the data connection.


6. Connection is closed after the session ends.

Q3. Describe the functions of the Session Layer of the OSI Reference Model.

The Session Layer is Layer 5 in the OSI (Open Systems Interconnection) model. It acts as a dialogue
controller between two communicating devices.

🔑 Main Functions of Session Layer:


1. Session Establishment, Maintenance, and Termination:

Initiates, maintains, and terminates communication sessions.


Ensures that a session is properly opened and closed.

2. Dialog Control:

Controls who sends and who receives during a session.

Can support half-duplex (one-way at a time) or full-duplex (two-way simultaneously)


communication.

3. Synchronization:
Inserts checkpoints into data streams.

If a failure occurs, communication can resume from the last checkpoint, not from the
beginning.
4. Token Management:

In collaborative environments, a token is passed so only the holder can perform certain
operations (e.g., editing a document).

5. Session Recovery:

In case of session interruption, the layer can help resume from a known good state.

📍 Example:
In video conferencing or file transfer applications, the session layer ensures that the session persists
even if there's temporary disconnection and that data integrity is maintained.

Q4. What is piggybacking? Discuss its advantages.

Piggybacking is a technique used in bi-directional communication protocols like sliding window


protocols (e.g., TCP), where acknowledgements (ACKs) are not sent separately, but instead combined
with data going in the reverse direction.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 10/15
🔁 How it Works:
Normally, when Host A sends data to Host B, Host B needs to send an ACK.

Instead of sending the ACK immediately, Host B waits until it has data to send to Host A and
includes the ACK in the header of the data packet.

This reduces the number of packets transmitted.

✅ Advantages of Piggybacking:
1. Improved Efficiency:

Reduces overhead of sending separate ACK packets.


Saves bandwidth and reduces congestion on the network.

2. Better Channel Utilization:

Optimizes the usage of available transmission time and medium.


3. Reduced Packet Count:

Fewer packets means lower processing at routers and intermediate nodes.

4. Energy Saving (in wireless networks):


Fewer transmissions mean reduced power usage, which is helpful in battery-operated
devices.

❌ Limitation:
If the receiver has no data to send back, ACKs might be delayed, leading to retransmission
timeouts.

Q5. What is the first address of a block of classless addresses if one of the addresses
is 12.2.2.76/27?

To find the first (network) address of a CIDR block, we calculate based on the /27 subnet mask.

Step-by-step:

IP Address: 12.2.2.76

Subnet Mask: /27 → 255.255.255.224


Block size = 2<sup>(32−27)</sup> = 32 IP addresses

Now determine the network:

Find the nearest multiple of 32 less than or equal to 76:


76 ÷ 32 = 2.375 → floor = 2

2 × 32 = 64
So, the network address = 12.2.2.64

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 11/15
✅ Answer: 12.2.2.64 is the first address of the block.
Q6. Can the receiver be absolutely sure that no bit errors have occurred if the UDP
checksum matches? What about TCP?

UDP Checksum:

UDP includes a 16-bit checksum for error detection.


It uses 1’s complement arithmetic to verify data integrity.

✅ If the checksum matches, it suggests no errors, but it's not 100% guaranteed because:
Some types of errors (e.g., bit inversions that cancel each other) can go undetected.
The checksum is not cryptographically strong.

❌ So, receiver cannot be absolutely sure that no errors occurred.


TCP Checksum:

TCP also uses a similar checksum technique.


However, TCP is a connection-oriented protocol and includes additional mechanisms for
reliability:
Sequence numbers

ACKs
Retransmissions
Flow and congestion control

✅ So, while TCP checksum alone can't guarantee no errors, the overall reliability mechanisms
ensure error detection and recovery.

Would you like me to turn these Group-B explanations into a printable PDF or help you practice similar
questions for preparation?

i cant understanf q5

Let me explain Q5 from Group B step by step in a very simple way.

Q5. What is the first address of a block of classless addresses if one of the addresses
is 12.2.2.76/27?

You are given:

IP Address: `12.2.2.76`

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 12/15
Subnet mask: `/27`

We are asked:
👉 "What is the first address (i.e., network address) of this block?"

✅ Step 1: Understand what /27 means


/27 means the subnet mask is:

255.255.255.224

This mask keeps 27 bits for network, and 5 bits for host (because 32 − 27 = 5)
So, number of addresses in this block =
25 = 32
👉 Each block will have 32 IP addresses.
✅ Step 2: Find which block `12.2.2.76` belongs to

To find the first address of the block, we need to find the nearest multiple of 32 that is less than or
equal to 76.

List of multiples of 32:

0, 32, 64, 96, 128, ...

Which multiple is just below or equal to 76?


👉 It is 64
So the first address (network address) of the block is:
🟩 12.2.2.64
✅ Bonus: What are the addresses in this block?
Since the block has 32 addresses, and starts from `12.2.2.64`, the IPs in this block range from:

First IP (network address): `12.2.2.64`


Last IP (broadcast address): `12.2.2.95`
(Because 64 + 32 − 1 = 95)

✅ Final Answer:
The first address of the block is: `12.2.2.64`

Let me know if you'd also like a visual diagram to explain this, or want help solving more subnetting
problems!

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 13/15
isnt there a similar kind of question in group C ,plese exaplin that also

Yes! You're absolutely right, Nasim — there is a very similar question in Group C, specifically:

✅ Group C, Q8(c):
"A block of 16 addresses is granted to a small organization. If one of the addresses is
205.16.37.39/28, what are the first and last addresses in the block?"

Let’s break it down step by step just like we did with the previous one:

✅ Step 1: Understand what /28 means


`/28` → 28 bits for network, remaining 4 bits for host (since 32 − 28 = 4)
So, number of addresses in the block:

24 = 16

➤ This block has 16 IP addresses.

✅ Step 2: Figure out which block `205.16.37.39` belongs to

We need to find the first address (network address) of the block that contains `205.16.37.39`.
Since each block has 16 addresses, look at the nearest multiple of 16 that is less than or equal to 39.

Multiples of 16:

0, 16, 32, 48, 64, ...

The one that comes just before 39 is:


➤ 32

So the network address is:


🟩 205.16.37.32

✅ Step 3: List of IPs in the block


Block size = 16
So IPs go from:

First address = 205.16.37.32


Last address = 205.16.37.(32 + 15) = 205.16.37.47

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 14/15
✅ Step 4: Find usable IP range (optional bonus)
If needed, you could also mention:

Usable IPs (for assigning to devices) range from 205.16.37.33 to 205.16.37.46


Because:
`205.16.37.32` = Network address

`205.16.37.47` = Broadcast address

✅ Final Answer:
First address (network): `205.16.37.32`
Last address (broadcast): `205.16.37.47`

Let me know if you’d like to practice more CIDR subnetting problems, or want this included in a
summarized PDF notes file!

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 15/15

You might also like