Top

Computer Networking

31.

Explain routing and routing protocols.

Ans:

Routing is the process of selecting a path for traffic in a network, or between or across multiple networks. This is the primary function of a router (a Layer 3 device).

Routing protocols are the set of rules and algorithms that routers use to communicate with each other and share information about the network's topology. This information allows them to build and maintain routing tables, which they use to determine the best path for forwarding packets.

Routing protocols can be categorized as:

  • Interior Gateway Protocols (IGP): Used for routing within a single autonomous system (a network managed by one organization). Examples:
    • RIP (Routing Information Protocol): An older distance-vector protocol.
    • OSPF (Open Shortest Path First): A modern link-state protocol.
    • EIGRP (Enhanced Interior Gateway Routing Protocol): A Cisco-proprietary hybrid protocol.
  • Exterior Gateway Protocols (EGP): Used for routing between different autonomous systems. The primary example is:
    • BGP (Border Gateway Protocol): The protocol that makes the core of the Internet work.

32.

What is the use of the `ping` command?

Ans:

The ping command is a basic network utility used to test the reachability of a host on an IP network. It measures the round-trip time for messages sent from the originating host to a destination computer.

It works by sending an ICMP (Internet Control Message Protocol) Echo Request packet to the target host and waiting for an ICMP Echo Reply.

Primary uses are:

  • To verify that a remote host is up and running.
  • To check for basic network connectivity between your device and a target.
  • To get a rough measure of the latency (round-trip time) to a host.

Example: ping google.com

33.

What is the use of the `traceroute` (or `tracert`) command?

Ans:

The traceroute (on Linux/macOS) or tracert (on Windows) command is a network diagnostic tool used to display the routing path (the sequence of routers) and measure the transit delays of packets across an IP network.

It works by sending a sequence of packets towards the destination with an incrementally increasing Time-to-Live (TTL) value. The TTL is a mechanism that limits the lifespan of data in a network.

  1. It first sends a packet with TTL=1. The first router it reaches decrements the TTL to 0, discards the packet, and sends an ICMP 'Time Exceeded' error back. The source records the router's IP and the round-trip time.
  2. It then sends a packet with TTL=2. This packet passes the first router and is dropped by the second router, which sends an error back.
  3. This process continues until the packet finally reaches the destination host.

This allows you to see every 'hop' a packet takes on its way to the destination and helps identify points of failure or high latency in the path.

34.

What is `ipconfig` (or `ifconfig`)?

Ans:

ipconfig (on Windows) and ifconfig (on Linux/macOS, though now often replaced by `ip addr`) are command-line utilities used to display the current TCP/IP network configuration values of a computer.

They can show you critical information for each network adapter, including:

  • IP Address
  • Subnet Mask
  • Default Gateway
  • MAC Address
  • DNS Server information

They can also be used to perform certain administrative tasks, such as releasing and renewing a DHCP-assigned IP address (e.g., ipconfig /release and ipconfig /renew on Windows).

35.

What is Wi-Fi and what are some common standards?

Ans:

Wi-Fi is a wireless networking technology that allows devices like computers, mobile phones, and other equipment to connect to the Internet or communicate with one another wirelessly within a particular area.

Wi-Fi technologies are based on the IEEE 802.11 set of standards. Some common standards include:

  • 802.11b (Wi-Fi 1): An older standard, max speed of 11 Mbps on the 2.4 GHz band.
  • 802.11g (Wi-Fi 3): Max speed of 54 Mbps on the 2.4 GHz band.
  • 802.11n (Wi-Fi 4): Works on both 2.4 GHz and 5 GHz bands, with speeds up to 600 Mbps. Introduced MIMO (Multiple Input, Multiple Output).
  • 802.11ac (Wi-Fi 5): Works primarily on the 5 GHz band, with speeds over 1 Gbps.
  • 802.11ax (Wi-Fi 6/6E): The latest mainstream standard, designed for better performance in congested environments. Offers higher speeds and efficiency on both 2.4 GHz and 5 GHz bands (and 6 GHz for Wi-Fi 6E).

36.

What are public and private IP addresses?

Ans:

IP addresses are divided into two main categories: public and private.

Private IP Addresses:

  • These are addresses reserved for use within a private (local) network.
  • They are not routable on the public internet.
  • Devices within a home or office network (like your laptop, phone, printer) are assigned private IP addresses.
  • The reserved ranges are:
    • 10.0.0.0 to 10.255.255.255 (Class A)
    • 172.16.0.0 to 172.31.255.255 (Class B)
    • 192.168.0.0 to 192.168.255.255 (Class C)

Public IP Addresses:

  • These are addresses that are directly accessible over the internet.
  • Each public IP address must be globally unique.
  • Your router is assigned a public IP address by your Internet Service Provider (ISP).
  • NAT (Network Address Translation) is used to map the many private IPs inside your network to the single public IP of your router.

37.

What is CIDR notation?

Ans:

CIDR (Classless Inter-Domain Routing) notation is a method for representing an IP address and its associated subnet mask in a more compact way.

It is written as the IP address followed by a forward slash ('/') and then a number. This number represents the number of leading '1' bits in the subnet mask (i.e., the length of the network prefix).

Example:

  • An IP address 192.168.1.0 with a subnet mask of 255.255.255.0.
  • The subnet mask in binary is 11111111.11111111.11111111.00000000.
  • There are 24 leading '1' bits.
  • Therefore, in CIDR notation, this is written as 192.168.1.0/24.

CIDR replaced the older, inflexible classful networking system (Class A, B, C) and allows for much more flexible allocation of IP addresses.

38.

What is a VLAN?

Ans:

A VLAN (Virtual Local Area Network) is a technology that allows you to logically segment a single physical LAN into multiple, separate virtual LANs.

Devices within a VLAN can communicate with each other as if they were on their own dedicated physical network, even if they are physically connected to the same switch as devices in other VLANs.

Benefits of VLANs:

  • Creates separate broadcast domains: Traffic from one VLAN is not forwarded to another, which reduces broadcast traffic and improves performance.
  • Enhanced Security: You can group users and devices by department (e.g., Sales, Engineering, HR) regardless of their physical location and apply separate security policies to each group.
  • Flexibility and Scalability: Network administrators can easily move a device to a different VLAN by changing the configuration on the switch, without any physical recabling.

39.

What is PoE (Power over Ethernet)?

Ans:

PoE (Power over Ethernet) is a technology that allows network cables (specifically, twisted-pair Ethernet cables) to carry electrical power along with data.

This means a single cable can provide both a data connection and electrical power to devices. This is extremely useful for devices that are installed in locations where a separate power outlet is inconvenient, expensive, or not feasible to install.

Common devices that use PoE include:

  • IP security cameras
  • Wireless Access Points (WAPs)
  • VoIP phones
  • IoT sensors

40.

What is a Denial-of-Service (DoS) attack?

Ans:

A Denial-of-Service (DoS) attack is a cyber-attack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connected to the Internet.

This is typically accomplished by flooding the target with a huge volume of traffic or sending it malformed requests that cause it to crash or become overwhelmed. The goal is not to steal information, but to prevent legitimate users from accessing the service.

A DDoS (Distributed Denial-of-Service) attack is a variant where the attack traffic comes from many different sources (often a botnet of compromised computers), making it much harder to block.

Loading…
Tags: Computer Networking Interview Questions and Answers || Computer Networking Sort Questions and Answers || Computer Networking Detailed Questions and Answers || Computer Networking Tutorial