Search results

Search This Blog

Experiment - 67 :- Installation and Configuration of TCP/IP Protocol

Installation and Configuration of TCP/IP Protocol

Objectives

  1. To install and configure the TCP/IP protocol on a Windows and a Linux machine.
  2. To understand how to set static and dynamic IP addresses.
  3. To verify network connectivity using various commands.

Materials Needed

  • Two computers (one running Windows and one running Linux)
  • Network switch or router
  • Ethernet cables
  • Access to administrative privileges on both systems
  • Basic knowledge of command-line interface (CLI) for Linux

Procedure

Part 1: Configuration on Windows
  1. Open Network Connections:

    • Press Windows + R, type ncpa.cpl, and press Enter.
  2. Select Network Adapter:

    • Right-click on the active network adapter (e.g., Ethernet or Wi-Fi) and select Properties.
  3. Install TCP/IP Protocol:

    • Ensure that Internet Protocol Version 4 (TCP/IPv4) is listed. If not, click Install, select Protocol, and add it.
  4. Configure TCP/IP Settings:

    • Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
    • Choose to either obtain an IP address automatically (for DHCP) or use the following settings for a static IP:
      • IP Address: 192.168.1.10
      • Subnet Mask: 255.255.255.0
      • Default Gateway: 192.168.1.1
      • Preferred DNS Server: 8.8.8.8
    • Click OK to save the settings.
  5. Verify Configuration:

    • Open Command Prompt and type ipconfig.
    • Check that the IP address, subnet mask, and gateway are correctly configured.
Part 2: Configuration on Linux
  1. Open Terminal:

    • Access the terminal on your Linux machine.
  2. Check Current Network Interfaces:

    • Run the command:
      bash
      1ip addr
    • Identify the network interface (e.g., eth0wlan0).
  3. Configure TCP/IP Settings:

    • For Debian/Ubuntu:

      • Edit the network interfaces file:
        bash
        1sudo nano /etc/network/interfaces
      • Add the following lines for static IP configuration:
        plaintext
        1auto eth0 2iface eth0 inet static 3 address 192.168.1.20 4 netmask 255.255.255.0 5 gateway 192.168.1.1 6 dns-nameservers 8.8.8.8 8.8.4.4
      • Save and exit (Ctrl + X, then Y, then Enter).
    • For Red Hat/CentOS:

      • Edit the interface configuration file:
        bash
        1sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
      • Modify or add the following lines for static IP:
        plaintext
        1DEVICE=eth0 2BOOTPROTO=none 3ONBOOT=yes 4IPADDR=192.168.1.20 5NETMASK=255.255.255.0 6GATEWAY=192.168.1.1 7DNS1=8.8.8.8 8DNS2=8.8.4.4
      • Save and exit.
  4. Restart Networking Service:

    • For Debian/Ubuntu:
      bash
      1sudo systemctl restart networking
    • For Red Hat/CentOS:
      bash
      1sudo systemctl restart network
  5. Verify Configuration:

    • Run the command:
      bash
      1ip addr
    • Check that the IP address, subnet mask, and gateway are correctly configured.
Part 3: Testing Connectivity
  1. Ping Test:

    • From the Windows machine, open Command Prompt and type:
      bash
      1ping 192.168.1.20
    • From the Linux machine, open the terminal and type:
      bash
      1ping 192.168.1.10
    • Verify that you receive replies from the other machine.
  2. Check DNS Resolution:

    • On both machines, test DNS resolution by pinging a public domain:
      bash
      1ping google.com

Expected Outcomes

  • Both machines should have their TCP/IP settings configured correctly.
  • The Windows machine should be able to ping the Linux machine and vice versa.
  • DNS resolution should

Post a Comment

If you have any doubts, please let me know

Previous Post Next Post