How to Configure Networking in KDE Plasma

Learn how to use KDE Network Manager

Pixabay

 

Configuring a static IP address with the KDE Network Manager is fairly straightforward. It's a good way to lock down a single IP address for a specific machine so it never changes (until you change it).

How do you make this happen? With the KDE Network Manager (otherwise known as Connections).

Why Configure a Static IP Address

Imagine you’ve just installed a Linux distribution that includes the KDE Plasma desktop. Everything is going great, but then you decide you either want to be able to secure shell (SSH) into that desktop, or you want to be able to share out folders on your network.

Out of that box, that KDE Plasma desktop is going to get its IP address assigned via Dynamic Host Configuration Protocol (DHCP). In other words, the desktop will get a temporary IP address, from a router (configured by your Internet Service Provider - such as AT&T, Comcast, etc.). How long that desktop we have that IP address is up to the ISP (and how they’ve configured the DHCP service on the router).

When that DHCP IP address lease expires, your desktop will be given a different address, which means you won’t be able to connect to that desktop (or its shared folders) until you find out the new IP address.

Which KDE?

For this howto, we used KDE 5.13.5, running on the NEON distribution, which happens to be the best route to using the latest version of the KDE Plasma desktop.

Wired or Wireless?

This howto will assume you are working with a wired connection. If you're working with a wireless connection, you will only need to modify the type of connection you edit (Wireless, instead of Wired). This will also assume you want to connect using a static IP address.

Accessing the KDE Network Manager

In order to configure networking in KDE Plasma, you have to open the Network Manager. To do this, follow these steps:

  1. Click on the farthest left icon in the system tray to open the Networks popup.

    Screenshot of the KDE Plasma desktop.
  2. Click the Settings button at the top of the popup.

    Screenshot of the KDE Plasma Networks popup.
  3. You should now see the Connections window.

    Screenshot of the KDE Connections window.
  4. Prepare to configure.

Configure Networking

Configure your network for a static IP address with the following steps:

  1. Click Wired connection 1 in the left pane of the Connections window.

    Screenshot of the KDE Connections options window.
  2. Click the IPv4 tab.

    Screenshot of the KDE Network IPv4 tab.
  3. From the Method drop-down, select Manual.

    Screenshot of the KDE Connections IPv4 window.
  4. Enter the DNS server addresses (optional) in the DNS Servers section. If you add more than one DNS address, separate them with a comma.

    Screenshot of entering a DNS server address.
  5. Click Add.

  6. Type the IP address (under Address) and use the Enter key on your keyboard to move to Netmask. Type the netmask address (usually 255.255.255.0) and then tab to Gateway. For the gateway address, type the address of your router.

    Screenshot of adding a static IP address.
  7. Click Apply.

  8. Click OK.

A Word on IP Addresses

If you’ve never configured a static IP address, know that the address you configure has to be on the same address scheme as your router. So if your router’s IP address is 192.168.1.1, then you have to use an IP address such as 192.168.1.2. You also must make sure the IP address you want to configure isn’t already in use. A good way to find that out is to run the ping command on the address in question. Open a terminal window and issue a command like ping 192.168.1.2. If the command comes back saying Destination host unreachable, that address is safe to use.

A Word on DNS

DNS stands for Dynamic Name Service and is responsible for translating URLs into IP addresses that the external network can use. Without DNS, you’d have to memorize IP addresses, instead of URLs. So instead of typing google.com, you’d have to know the IP address for that address (which is 64.233.185.139). You can opt to not configure static DNS addresses. If you don’t, your computer will get its DNS from the router that would have served up its IP address.

You might think that the newly configured IP address will take effect immediately. It won't. That doesn't happen until you disconnect and reconnect to the network. Fortunately, this is quite simple. Here’s how:

  1. Open the Networks popup (as you did to access the Network Manager).

  2. Click Disconnect.

    Screenshot of the KDE Plasma Networks Disconnect button.
  3. Click Connect.

    Screenshot of the KDE Plasma Networks Connect button.
  4. Click a blank spot on the desktop to dismiss the popup.

Congratulations, your new (static) IP address is now in effect. You don’t have to worry about it ever changing, until you decide.