Computer Networks - Questions and Answers

I. Fill in the Blanks

1. The hostname command is used to display ______.

The hostname command is used to display the name of the computer.

2. The length of a IPv4 and a IPv6 is ______ and ______ bytes respectively.

The length of a IPv4 and a IPv6 is 4 and 16 bytes respectively.

3. An access point is used to connect ______.

An access point is used to connect wireless devices to a wired network.

4. The ping command is used to ______.

The ping command is used to test connectivity between two network devices.

5. HTTPS transfer ______ data.

HTTPS transfer encrypted data.

II. Multiple Choice Questions

1. Which device is required to connect multiple heterogeneous networks?

C) Router

A router is required to connect multiple heterogeneous networks as it can route data between different networks and protocols.

2. Which is the largest type of computer network?

D) WAN

WAN (Wide Area Network) is the largest type of computer network that spans large geographical areas, often countries or continents.

3. Which protocol transfers encrypted data instead of plain data?

B) HTTPS

HTTPS (Hypertext Transfer Protocol Secure) transfers encrypted data instead of plain data, providing secure communication.

4. How many bytes are reserved for OUI in a MAC address?

A) 3

3 bytes (24 bits) are reserved for OUI (Organizationally Unique Identifier) in a MAC address. The first 3 bytes identify the manufacturer.

5. IP address can be automatically assigned if the network is connected with

D) DHCP Server

IP addresses can be automatically assigned if the network is connected with a DHCP (Dynamic Host Configuration Protocol) Server, which dynamically assigns IP addresses to devices on the network.

III. Short Answer Questions

1. Mention the name of components required to set up a MAN network. Draw a block diagram of a MAN network labeling name of each component.

Components required to set up a MAN (Metropolitan Area Network):

  • Multiple LANs (Local Area Networks)
  • Routers to connect different LANs
  • Switches for intra-LAN connectivity
  • Fiber optic cables or wireless links for connectivity
  • Network Interface Cards (NICs)
  • Servers for centralized services

Block Diagram of MAN Network:

[LAN 1] --- [Router] --- [LAN 2]

      |

      |

[LAN 3] --- [Router] --- [LAN 4]

      |

      |

[Central Server]


Each LAN contains multiple computers connected through switches

Routers interconnect different LANs across the metropolitan area

Central server provides shared resources and services

2. Why hostname should not be used to identify a computer in a computer network?

Hostname should not be used to identify a computer in a computer network because:

  • Hostnames can be changed easily by users
  • Multiple computers can have the same hostname, causing conflicts
  • Hostnames are not unique across different networks
  • Network routing requires unique identifiers like IP addresses
  • Hostname resolution depends on DNS services which may not always be available
  • IP addresses provide a standardized, hierarchical addressing system
3. Give five examples of valid and five examples of invalid IPv4 addresses.

Five examples of valid IPv4 addresses:

  1. 192.168.1.1
  2. 10.0.0.1
  3. 172.16.254.1
  4. 8.8.8.8 (Google DNS)
  5. 255.255.255.0 (Subnet mask)

Five examples of invalid IPv4 addresses:

  1. 256.168.1.1 (First octet exceeds 255)
  2. 192.168.1.256 (Fourth octet exceeds 255)
  3. 192.168.1 (Only 3 octets)
  4. 192.168.1.1.1 (5 octets instead of 4)
  5. 192.168.01.001 (Leading zeros not allowed in standard notation)
4. Can we compare HTTP and FTP protocols? Mention their functionality.

Comparison of HTTP and FTP protocols:

Aspect HTTP (Hypertext Transfer Protocol) FTP (File Transfer Protocol)
Primary Function Transfer web pages and web content Transfer files between computers
Port Number Port 80 (HTTP), Port 443 (HTTPS) Port 21 (control), Port 20 (data)
Security HTTPS provides encryption FTPS or SFTP provide security
Connection Type Stateless - each request is independent Stateful - maintains connection
Authentication Basic authentication or session-based Username/password required
Data Transfer Primarily for web content (HTML, CSS, JS) Any type of files (documents, images, etc.)
5. How many 16 port switches are required to connect 31 computers in a network?

Calculation:

Each 16-port switch can connect 15 computers (since one port is needed to connect to another switch)

Number of computers that can be connected with n switches = 15n + 1

We need to solve: 15n + 1 ≥ 31

15n ≥ 30

n ≥ 2

Therefore, 2 sixteen-port switches are required to connect 31 computers.

Explanation: With 2 switches, we can connect 15 computers to each switch (total 30 computers) and use one port from each switch to connect the switches together, making the total 31 connections possible.