How to manually configure IP address?

0228

Manually configuring an IP address involves setting a static IP address, subnet mask, gateway, and DNS servers on your device. Here’s how to do it on different operating systems:

For Linux (Using Command Line)

  1. Open Terminal.

  2. Identify Your Network Interface:

    ip a

    Look for the interface name (e.g., eth0, enp0s3, etc.).

  3. Assign a Static IP Address:
    Replace INTERFACE_NAME, YOUR_IP, SUBNET_MASK, and GATEWAY with your actual values.

    sudo ip addr add YOUR_IP/SUBNET_MASK dev INTERFACE_NAME

    Example:

    sudo ip addr add 192.168.1.100/24 dev eth0
  4. Set the Default Gateway:

    sudo ip route add default via GATEWAY

    Example:

    sudo ip route add default via 192.168.1.1
  5. Configure DNS:
    Edit the /etc/resolv.conf file to add DNS servers:

    sudo nano /etc/resolv.conf

    Add lines like:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
  6. Verify Configuration:

    ip a show INTERFACE_NAME

For Windows

  1. Open Control Panel and go to Network and Sharing Center.

  2. Click on Change adapter settings.

  3. Right-click on your network connection (e.g., Ethernet or Wi-Fi) and select Properties.

  4. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.

  5. Choose Use the following IP address and enter:

    • IP address: e.g., 192.168.1.100
    • Subnet mask: e.g., 255.255.255.0
    • Default gateway: e.g., 192.168.1.1
  6. Choose Use the following DNS server addresses and enter:

    • Preferred DNS server: e.g., 8.8.8.8
    • Alternate DNS server: e.g., 8.8.4.4
  7. Click OK to save the settings.

For macOS

  1. Open System Preferences and go to Network.

  2. Select your network connection (e.g., Ethernet or Wi-Fi).

  3. Click on Advanced and go to the TCP/IP tab.

  4. Change Configure IPv4 to Manually.

  5. Enter:

    • IP Address: e.g., 192.168.1.100
    • Subnet Mask: e.g., 255.255.255.0
    • Router: e.g., 192.168.1.1
  6. Go to the DNS tab and add DNS servers:

    • e.g., 8.8.8.8 and 8.8.4.4.
  7. Click OK and then Apply.

Conclusion

Manually configuring an IP address can help in situations where DHCP is not functioning or when specific network settings are required. Always ensure that the IP address you choose is not already in use on the network to avoid conflicts. If you have any questions or need further assistance, feel free to ask!

0 Comments

no data
Be the first to share your comment!