Linux Mint – Setting up a static IP

How to install Ubuntu Server 19.10

If you prefer your system to be reachable on your network via the same IP address each time, a static IP lease or static IP assignment is recommended. The two terms may sound the same, but the difference comes with who assigns the address. For example, a static lease, also known as a DHCP reservation, is where you configure your router to assign the same IP address to your machine each time. This is by far the easiest way to go, but unfortunately, most small office and home office routers do not feature an option to do this. If your router doesn’t have an option to set a static lease (reservation), read on to discover how to change Mint’s connection from DHCP to static and set the address manually.

First, you’ll need to access your network settings. To do this, click on the network icon located near the clock in your system tray and then click on Network Settings. From there, a new window titled Networking will appear. On this screen, you’ll be able to edit the advanced options for your wired and wireless connections, such as the IP address in this example. To edit an IP address of a wired interface, click on the Wired section on the left-hand side pane and then on the Options… button in the lower-right corner of the screen. This will bring up yet another window, Editing Wired connection 1. If you click on the IPv4 Settings tab, as shown in the following screenshot, you’ll be able to edit your IP address:

Note

If you’re a beginner, you may not want to edit the automatically created connection. Instead, create a new one. This way, if you make a mistake, you can delete the connection you created and go back to the original connection that is known to be working.

Now that you’re here, what settings should you provide to create your static connection? While there is no basic rule of thumb, as every network is different, there are a few key rules to keep in mind. As you probably already know, assigning the same IP address to two devices would cause conflict. Therefore, you should ensure that the address you assign is not in use. Most routers start assigning IP addresses beginning with a specific number. For example, perhaps your router exists at 192.168.1.1, and the first IP address it assigns is 192.168.1.100. Considering this IP address, as long as you haven’t manually configured any other devices, you should be safe to use anything in between 192.168.1.2 and 192.168.1.99. For the other values, the DNS servers and Gateway is most likely your router, so you can use your router’s IP address for both. Search domains

is most likely the name of your network; you may or may not have set this.

If you are not sure of what your values are, rather than just assuming that your router is both your gateway and DNS server, the
nm-tool command will tell you what the IP address is for your DNS server as well as your Gateway address. If you’re unsure of which IP addresses are in use within your network, consider logging in to your router’s configuration page. Most home and small office routers feature a configuration page that will allow you to see a list of all the connected devices. The following screenshot shows the output of the nm-tool command:

Once you have all the variables you need, you’re ready to set a static IP address. On the Editing Wired connection window, which appeared earlier, choose Manual from the Method dropdown. Underneath Addresses, click on Add to add an IP address, Netmask, and Gateway address. After you click on Save, the connection will be changed to the values you provided. If you need to switch back to DHCP in the future, navigate back to Network Settings and change the dropdown accordingly.

Comments are closed.