How to do Debian 11 Network configuration

Debian is a Linux-based distribution known for its power, stability and security. Network configuration is a broad process to set up controls of a network, manage the network flow and operation to support the network communication for a specific organization or network owner. Multiple configuration settings are included while configuring the network: Router Configuration, Host Configuration, Software Configuration.

In this descriptive post, network configuration of Debian 11 is explained using command line and GUI as well.

Why Network Configuration is important

The primary task of network administrators is to monitor several activities over a network and network configuration allows them to track any changes that are affecting the performance of the network. With the help of tracking changes administrators can reduce the downtime of a network. In case if any system update causes hindrance to performance of the network; then you can fall back to previous configuration that worked well. Moreover, network security can also be optimized, and it helps to save the previous network configuration settings. For instance, a dynamic IP is used by most internet users, you can set static IP and it is helpful in several businesses where you have to remember the IP addresses of internal as well as external devices. And a business using VPN networks can get advantage of static IP to provide remote work access to their employees.

How to configure network settings in Debian 11

This section will present the process of network configuration of Debian 11: primarily there are three fundamental requirements for network settings:

  • Configuring IP address
  • Changing Hostname

Configuring IP: You can use “nmtui” command on Debian 11 to configure IP address; type and execute the following command in your terminal:

$ nmtui

The following interface you will see and select the option “Edit a connection”:

Graphical user interface, application Description automatically generated

After that select your ethernet connection and hit enter on “Edit” option:

Note: Use the “tab” key to navigate to several options and hit “enter” to select/edit that option.

Graphical user interface, application Description automatically generated

Navigate to IPv4 CONFIGURATION option and to open its settings, press enter on “<Show>” option:

Graphical user interface, text Description automatically generated

Once you have navigated to the settings; you can configure IP address by following few steps mentioned below:

Set the IPv4 Configuration method to “manual”:

Change the IP address in the “Addresses” option: 192.168.18.200

Set the gateway in “Gateway” option: 192.168.18.1

Lastly, input the DNS server address: 8.8.8.8

Graphical user interface Description automatically generated

Scroll down and hit enter on “OK”:

Graphical user interface, text, email Description automatically generated

After that, navigate to “Back” option:

Graphical user interface, text, application, Word Description automatically generated

Choose the option “Activate a connection”:

Graphical user interface, PowerPoint Description automatically generated with medium confidence

Lastly, choose “Deactivate” to deactivate the connection:

Graphical user interface, application Description automatically generated

After that, choose “Activate a connection” to start the connection again and navigate to “OK”:

Graphical user interface, application Description automatically generated

As we have changed the IP of interface “enp0s3” so, the following command will show the newly set IP address of the selected network interface:

$ ip add show enp0s3

Text Description automatically generated

Changing IP address using GUI : Firstly, click on “Activities” and type “settings” in search bar; you will see the settings icon in search results; click on it to open settings:

A screenshot of a computer Description automatically generated with medium confidence

Once “Settings” is opened; click on “Network” placed on left side and navigate setting gear icon:

Graphical user interface, application Description automatically generated

You will see a new window that contains the current IP address, gateway, DNS server, Netmask, as shown in the image below:

Graphical user interface, text, application, email Description automatically generated

Now, move to “IPv4” tab to make some changes: perform the following steps carefully:

Step 1: Firstly, change the IPv4 method from Automatic to Manual:

Step 2: Move to “Addresses” section, and write the IP address, Netmask and Gateway:

Step 3: After that, turn off the automatic DNS toggle button and put the DNS value:

Note: We have used the following values in this section:

IP address: 192.168.18.150

Netmask: 255.255.255.0

Gateway: 192.168.18.2

DNS: 8.8.8.8

Graphical user interface, text, application Description automatically generated

After inserting values, apply the changes by clicking on “Apply” button:

Turn OFF/Turn ON the button to allow computer to use new data:

Graphical user interface, text, application, email Description automatically generated

Once you have done this; click on the gear icon and look for details; it is observed that the values are changed now:

Graphical user interface, text, application Description automatically generated

Changing hostname using terminal : Run the network manager in terminal by issuing the following command:

$ nmtui

The interface shows three options; choose “Set system hostname” and navigate to “OK” to proceed:

Graphical user interface, application Description automatically generated

Your current hostname will be displayed and can be edited:

Graphical user interface Description automatically generated

Type new hostname by replacing the old one: For instance, our old hostname was “adnan” and we have changed it to “linuxhint”: Hit enter on “OK” to complete this step:

Graphical user interface, text Description automatically generated with medium confidence

After changes, you have to confirm the change by putting the password and then clicking on Authenticate:

Graphical user interface, application Description automatically generated

After successful authentication, it will display a message, set the hostname to ‘linuxhint’, navigate to “OK” to finish the process:

Graphical user interface, text Description automatically generated

The hostname must be changed after completion of the process:

You can verify the changes by using the command mentioned below:

$ hostname

Text Description automatically generated with low confidence

Changing hostname using hostnamectl command : There is another command in Debian 11 that can be used to change as well as check the hostname in Debian 11. Use the following command to check your current hostname:

$ hostnamectl

Text Description automatically generated

It is observed that the current hostname in “linuxhint”; for instance, the command mentioned below will change the hostname to “adnan”:

$ hostnamectl set-hostname adnan

Restart the terminal and run the following command to check the hostname:

$ hostnamectl

Conclusion

Debian is an open-source distribution of Linux OS that can be used for networking purposes as well. It allows you to configure the network settings as per the user requirements and settings. In this guide, we have described the network configuration on Debian 11; two basic configurations are performed. This guide provides the step-by-step process to change the IP address as well as the hostname on Debian 11. Terminal enthusiasts can use nmtui command to configure network settings whereas the graphical method is also described in this post.



from https://ift.tt/3aMdUAw

Post a Comment

0 Comments