static ip – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Wed, 24 Aug 2022 10:46:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How to Configure Static IP Address on Ubuntu 22.04 https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/ https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comments Thu, 28 Apr 2022 17:44:55 +0000 https://tecadmin.net/?p=29160 After installing Ubuntu 22.04 the default network interface assigns an IP address using the DHCP server. Also, the wireless network will be active and enable networking over the wifi network. You can also configure the network interface with static IPv4 addresses. Ubuntu 22.04 uses the Netplan as a network manager. This tutorial helps you to [...]

The post How to Configure Static IP Address on Ubuntu 22.04 appeared first on TecAdmin.

]]>
After installing Ubuntu 22.04 the default network interface assigns an IP address using the DHCP server. Also, the wireless network will be active and enable networking over the wifi network.

You can also configure the network interface with static IPv4 addresses. Ubuntu 22.04 uses the Netplan as a network manager.

This tutorial helps you to configure network interfaces on Ubuntu 22.04 Desktop and Ubuntu 22.04 Server editions. The desktop users can use any one of the below methods but the server users that have CLI only access use the second method to edit network interface configuration files.

Method 1: Configuring Static IPv4 Address on Ubuntu 22.04 Desktop

The Ubuntu Desktop editions have a graphical interface for configuring the network interfaces. Follow the below steps to configure a static IP address on Ubuntu 22.04 Desktop system.

    • Click the network icon in the upper-right corner.
    • Then expand the Wired Connected dropdown.
    • Now, click on Wired Setting as shown below image.

    Configuring Static IP on Ubuntu 22.04
    Edit Wired Interface Settings
    • A network settings dialog box will appear.
    • Now, click “Network” in left sidebar.
    • Under the Wired section, click the Gear icon as showing in below image

    Configuring Static IP on Ubuntu 22.04
    Edit Network Interface
    • A new Wired dialog box will appear.
    • Now, click on “IPv4” tab.
    • Set IPv4 Method to Manual
    • Input a valid IP address, Netmark and Gateway address
    • Set the DNS server (optional)
    • Click Apply button to save changes

    Configuring Static IP on Ubuntu 22.04
    Configuring Static IP on Ubuntu
  1. Finally disable and then again enable networking to apply changes.

    Configure Static IP Address on Ubuntu 22.04
    Disable and Enable Networking
  2. All done. Ubuntu Desktop system IP address is now changed.

Method 2: Configuring Static IPv4 Address on Ubuntu 22.04 Server with CLI

Server editions are installed without any graphical interface. In that case, you need to configure the IP address using the command line.

Ubuntu uses the Netplan as a network manager that is responsible for configuring the network interfaces. Follow the below steps:

  1. First, find out the network interface name in your system. The interface name can differ based on the installation type and system hardware. To find the interface name type:
    sudo ip a 
    
    Configure Static IPv4 Address using Netplan on Ubuntu
    Checking the network interface name

    The above output shows that the system is configured with the network interface name eth0. This can be different on your system.

  2. Now, create or edit the network configuration file under the /etc/netplan directory. Create a configuration file and edit it in an editor:
    sudo vi /etc/netplan/01-netcfg.yaml 
    

    Add the network configuration in YAML format as below:

    network:
        version: 2
        renderer: networkd
        ethernets:
            eth0:
                addresses:
                    - 192.168.1.212/24
                nameservers:
                    addresses: [8.8.8.8, 8.8.4.4]
                routes:
                    - to: default
                      via: 192.168.1.2

    In the above configuration:

    • eth0 – is the network interface name
    • addresses – is used to configure IPv4 address on an interface. Make sure to define CIDR. You can add multiple addresses here
    • nameservers – Set the name servers here. 8.8.8.8 and 8.8.4.4 are Google’s name servers
    • routes – This is used to set gateway on your system.

    Make sure the IPv4 address belongs to the system network and has the correct gateway Ip address. Once confirmed, save file content and close it.

  3. Apply the changes by running the following commands.Now, execute the following command to apply the changes:
    sudo netplan apply 
    

    That’s it. The static IP address is configured on your Ubuntu system.

Conclusion

In this tutorial, you have learned 2 methods of configuring network interface on Ubuntu 22.04 systems. The first method uses the GUI interface to set up a static IP address. The second method provides you with the instructions to configure the network interface via the command line using Netplan.

You can also configure multiple IP addresses on a single network interface.

The post How to Configure Static IP Address on Ubuntu 22.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/feed/ 10
How to Configure Static IPv4 Address on Ubuntu 20.04 https://tecadmin.net/set-static-ip-on-ubuntu-20-04-desktop/ https://tecadmin.net/set-static-ip-on-ubuntu-20-04-desktop/#respond Sun, 26 Apr 2020 04:14:46 +0000 https://tecadmin.net/?p=21163 Question – How do I set a static IP Address on Ubuntu 20.04 LTS Desktop systems? Steps to set the static IP address on your Ubuntu Desktop system Ubuntu 20.04 systems uses netplan from the previous LTS system. The desktop systems provide an attractive graphical user interface to work with it. Using the GUI, you [...]

The post How to Configure Static IPv4 Address on Ubuntu 20.04 appeared first on TecAdmin.

]]>
Question – How do I set a static IP Address on Ubuntu 20.04 LTS Desktop systems? Steps to set the static IP address on your Ubuntu Desktop system

Ubuntu 20.04 systems uses netplan from the previous LTS system. The desktop systems provide an attractive graphical user interface to work with it. Using the GUI, you can easily change or set a static IP address on your Ubuntu system.

Set A Static IP on Ubuntu 20.04

You must have a root or sudo privileged account in the Ubuntu system. Login to your Ubuntu 20.04 Desktop system. After that open settings on your machine as shown in the below screenshot.

Open Settings Ubuntu 20.04

In the settings window, click on Network tab in the left sidebar. After that click icon to open the setting for your systems network interface as shown on the below screen.

Open network connections Ubuntu 20.04

This window will show you the current IP address configured on your system.

Now select the IPv4 tab
Then under the IPv4 Method select the “Manual” option.
In the Addresses section and set your IP Address, Netmask, and Gateway. You may also set remote DNS IP addresses. If you don’t know what to set here use 8.8.8.8 and 8.8.4.4 as shown in below screenshot.

Set Static IP Ubuntu 20.04

View Current IPs on Ubuntu

You can view the current static IP under the details tab.

View IP Ubuntu 20.04

To view IP on the command line. Press CTRL + ALT + T to launch the terminal on your Ubuntu system. Then type the following command to view all IP addresses configured on your system.

ip addr show

Multiple static IP on Ubuntu 20.04

The post How to Configure Static IPv4 Address on Ubuntu 20.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/set-static-ip-on-ubuntu-20-04-desktop/feed/ 0
How to Configure Static IP Address on Ubuntu 18.04 (Desktop) https://tecadmin.net/change-ip-address-on-ubuntu-18-04-desktop/ https://tecadmin.net/change-ip-address-on-ubuntu-18-04-desktop/#comments Tue, 08 May 2018 08:00:42 +0000 https://tecadmin.net/?p=16414 Question – How To Change IP Address on Ubuntu 18.04 Desktop? Steps to set the static IP address on your Ubuntu Desktop system Ubuntu 18.04 systems are using netplan instead of older static interfaces. The desktop provides an attractive GUI for working with it. You can easily change or set a static IP address on [...]

The post How to Configure Static IP Address on Ubuntu 18.04 (Desktop) appeared first on TecAdmin.

]]>
Question – How To Change IP Address on Ubuntu 18.04 Desktop? Steps to set the static IP address on your Ubuntu Desktop system

Ubuntu 18.04 systems are using netplan instead of older static interfaces. The desktop provides an attractive GUI for working with it. You can easily change or set a static IP address on your Ubuntu system.

For the server edition, you can follow this tutorial to configure IP address on Ubuntu using the command line.

Step 1 – Open Network Settings

Login to your Ubuntu Desktop system. After that open settings windows on your Ubuntu Desktop machine as showing in the below screen.

Ubuntu open settings

In the left sidebar click on the Network tab. After that click icon to open setting for your systems network interface as shown in the below screen.

Ubuntu open network settings

This window will show you the current IP address configured on your system. Now select the IPv4 tab.

Ubuntu IPv4 settings tab

Step 2 – Setup Static IP on Ubuntu 18.04

Under the IPv4 Method select the “Manual” option.

Now go to the Addresses section and set your IP Address, Netmask, and Gateway.

Ubuntu set IP address

You can also set remote DNS IP addresses. If you don’t know what to set here use 8.8.8.8 and 8.8.4.4 as shown in below screenshot.

Ubuntu set remote dns

Step 3 – View Current IPs

Press CTRL + ALT + T to launch the terminal on your Ubuntu system. Now type following IP command to view all IP addresses configured on your system.

ip addr show

Ubuntu check local ip command

The post How to Configure Static IP Address on Ubuntu 18.04 (Desktop) appeared first on TecAdmin.

]]>
https://tecadmin.net/change-ip-address-on-ubuntu-18-04-desktop/feed/ 1