June 2023 [Free] Solved BCS-052 Network Programming and Adminstration

Hey there! Welcome to KnowledgeKnot! Don't forget to share this with your friends and revisit often. Your support motivates us to create more content in the future. Thanks for being awesome!

1. (a) What is a default mask? How is it different from a subnet mask? (3 marks)

Answer:

A default mask (also known as a default subnet mask) is a preconfigured network mask used by devices to determine the network portion of an IP address in certain address classes (Class A, Class B, and Class C). The default mask is used when no custom subnetting is applied. It helps in dividing an IP address into its network and host portions based on the class of the IP address.

Subnet Mask

A subnet mask is a 32-bit number that masks an IP address and divides the IP address into network and host portions. Subnet masks are used when more granular control over the network is required, such as in subnetting. It allows a network to be subdivided into smaller sub-networks (subnets), enabling more efficient utilization of IP addresses and enhancing network management.

Differences Between Default Mask and Subnet Mask

  • Purpose:
    • Default Mask: Used for IP address classification (Class A, Class B, or Class C) without additional subnetting.
    • Subnet Mask: Used to define custom subnets by dividing a network into smaller segments to optimize the use of IP addresses.
  • Flexibility:
    • Default Mask: Predefined for each address class (e.g., Class A - 255.0.0.0, Class B - 255.255.0.0, Class C - 255.255.255.0).
    • Subnet Mask: Can be customized to create subnets based on network requirements (e.g., 255.255.255.192 for a smaller subnet).
  • Usage:
    • Default Mask: Used when no subnetting is needed or when working with default address classes.
    • Subnet Mask: Used when subnetting is implemented for network optimization and efficiency.

Conclusion

While the default mask is used for basic network identification based on the address class, a subnet mask offers more control over network design by allowing custom subnets within a larger network.

1. (b) An IP address of one of the hosts and the mask in a class B subnet are given below: IP address: 130.154.121.33, Mask: 255.255.200.0. What is the subnet address? (3 marks)

Answer:

Given Information:

  • IP Address: 130.154.121.33
  • Subnet Mask: 255.255.200.0

Step-by-Step Calculation:

To calculate the subnet address, we need to perform a bitwise AND operation between the given IP address and the subnet mask. This operation will help us extract the network portion of the IP address.

1. Convert the IP address and subnet mask to binary format:

  • IP Address: 130.154.121.33 =
    10000010.10011010.01111001.00100001
  • Subnet Mask: 255.255.200.0 =
    11111111.11111111.11001000.00000000

2. Perform a bitwise AND operation:

Now, we perform the AND operation on each corresponding pair of bits from the IP address and the subnet mask. The AND operation works as follows: if both bits are 1, the result is 1; otherwise, the result is 0.

  • First octet: 10000010 (IP) AND 11111111 (Mask) = 10000010 (Result = 130)
  • Second octet: 10011010 (IP) AND 11111111 (Mask) = 10011010 (Result = 154)
  • Third octet: 01111001 (IP) AND 11001000 (Mask) = 01001000 (Result = 72)
  • Fourth octet: 00100001 (IP) AND 00000000 (Mask) = 00000000 (Result = 0)

3. Subnet Address:

After performing the bitwise AND operation on each octet, we get the subnet address in decimal format:

  • Subnet Address: 130.154.72.0

Conclusion:

The subnet address for the IP address 130.154.121.33 with the subnet mask 255.255.200.0 is 130.154.72.0.

1. (c) Explain the following concepts in context of the NFS (Network File System): (i) Virtual file system (ii) NFS background mounting (6 marks)

Answer:

(i) Virtual File System (VFS):

The Virtual File System (VFS) is an abstraction layer that sits between the operating system kernel and the file system implementation. In the context of NFS, VFS provides a unified interface for accessing files stored on both local and remote systems.

Key points about VFS in the context of NFS:

  • Abstraction: VFS abstracts the details of underlying file systems, allowing NFS to integrate seamlessly with the local file system.
  • Interoperability: It enables applications to perform standard file operations (like open, read, write, and close) without being aware of whether the files are stored locally or remotely.
  • Mounting NFS: When an NFS share is mounted, VFS facilitates translating these file operations into NFS protocol commands to interact with the remote server.

(ii) NFS Background Mounting:

NFS background mounting is a feature that allows the system to attempt to mount a remote file system in the background if the server is unavailable at the time of the initial request.

Key points about NFS background mounting:

  • Non-blocking: If the NFS server is temporarily unavailable, the mounting process does not block other system activities. Instead, it retries the mount operation in the background.
  • Configuration: This feature is typically enabled by specifying the
    bg
    option in the NFS mount command or configuration file (e.g., /etc/fstab).
  • Use Case: Useful in systems where network connectivity to the NFS server might not be guaranteed at boot time, ensuring that the system can continue startup operations without waiting for the server to become available.

The Virtual File System (VFS) abstracts the complexities of file system interactions in NFS, enabling seamless integration of remote and local files, while background mounting ensures that the system can attempt to mount unavailable NFS shares without blocking other processes.

1. (d) Why do you need user management? Explain. (4 marks)

Answer:

1. (e) How are routing tables created and updated in distance vector routing protocol? Explain. (4 marks)

Answer:

1. (f) How is incompatibility problem solved at software level for setting up a computer network. (3 marks)

Answer:

1. (g) Draw the structure of a socket descriptor and describe its fields. (6 marks)

Answer:

1. (h) For what purpose is getsockname() used in socket programming. (2 marks)

Answer:

1. (i) How does DNS server work? (5 marks)

Answer:

1. (j) How do computers belonging to different networks exchange message? Explain with the help of a diagram. (4 marks)

Answer:

2. (a) What are the similarities between file and socket I/O? (3 marks)

Answer:

2. (b) Show the components of SNMP diagrammatically. What are the tasks performed by agent and managed components? Why SNMP is considered to be robust and simple? Explain. (7 marks)

Answer:

2. (c) (I) Explain the following terms: (i) Authentication (ii) Confidentiality (iii) Non-repudiation (6 marks)

Answer:

2. (c) (II) Briefly explain how password policy is implemented in Linux? (4 marks)

Answer:

3. (a) What are the important tasks performed at internet and transport layers? (8 marks)

Answer:

3. (b) What are the outputs of the following address conversion functions? (i) inet() (ii) inet_addr() (iii) inet-ntoa() (6 marks)

Answer:

3. (c) How does user management work? Discuss. (6 marks)

Answer:

4. (a) How does remote log-in process work in Telnet? Explain with the help of a diagram. How is the local log-in different from the remote log-in? (8 marks)

Answer:

4. (b) (i) What command is used in Linux to check how much hard drive space is available? What information is displayed as an output by running this command? (3 marks)

Answer:

4. (b) (ii) What command is used in Linux to find out CPU utilization? In what form the output is displayed by running this command? (3 marks)

Answer:

4. (c) What is the kernel initialization process? What tasks are performed during the initialization process? Elaborate on init() process. (6 marks)

Answer:

5. (a) Write on UDP client UDP server program in C language in Linux/Unix environment as per the following specifications: (i) The UDP client sends five integer numbers to the server. (ii) The server program sends the average of five numbers to the client (10 marks)

Answer:

5. (b) Identify the classes of the following IP addresses: (i) 230.15.20.30 (ii) 130.30.20.25 (2 marks)

Answer:

5. (c) Draw the IP reader format and explain the significance of the following fields: (i) TTL (ii) Flags (iii) Header Length (8 marks)

Answer:

Suggetested Articles