To make an IP address permanent, you typically need to configure a static IP address on your device or in your network settings. Here are the steps for different operating systems:
For Windows:
- Open Control Panel.
- Go to Network and Sharing Center.
- Click on Change adapter settings.
- Right-click on your network connection and select Properties.
- Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
- Choose Use the following IP address and enter your desired IP address, subnet mask, and default gateway.
- Click OK to save the settings.
For macOS:
- Open System Preferences.
- Click on Network.
- Select your network connection (e.g., Wi-Fi or Ethernet).
- Click on Advanced.
- Go to the TCP/IP tab.
- Change Configure IPv4 to Manually.
- Enter your desired IP address, subnet mask, and router address.
- Click OK and then Apply.
For Linux:
- Open a terminal.
- Edit the network configuration file. For example, for Ubuntu, you can use:
sudo nano /etc/netplan/01-netcfg.yaml - Add or modify the configuration to set a static IP:
network: version: 2 ethernets: eth0: dhcp: no addresses: - 192.168.1.100/24 gateway4: 192.168.1.1 nameservers: addresses: - 8.8.8.8 - 8.8.4.4 - Save the file and apply the changes:
sudo netplan apply
For Routers:
- Log in to your router's web interface.
- Look for DHCP settings or LAN settings.
- Find the option to assign a static IP address to a specific MAC address.
- Enter the MAC address of your device and the desired IP address.
- Save the settings.
After following these steps, your device should retain the same IP address even after reboots or disconnections.
