- Awards Season
- Big Stories
- Pop Culture
- Video Games
- Celebrities

The Basics of Pulling an IP Address: What You Need to Know
When it comes to understanding the internet, knowing how to pull an IP address is a fundamental skill. An IP address (Internet Protocol address) is a unique identifier that is assigned to each device connected to the internet. It is used to identify and locate a device on the network, enabling communication between two or more devices. In this article, we will discuss the basics of pulling an IP address, including what it is, why it’s important, and how to do it.
What is an IP Address?
An IP address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. It uniquely identifies each device on the network and allows data packets to be routed from one device to another. An IP address consists of four numbers separated by periods, such as 192.168.1.1.
Why is Pulling an IP Address Important?
Pulling an IP address can be useful in many situations. For example, if you are troubleshooting a network issue or trying to track down malicious activity on your network, you may need to pull an IP address in order to identify the source of the problem or determine which device is responsible for the malicious activity. Additionally, if you are trying to access a website or service that requires authentication, you may need to pull your own IP address in order to gain access.
How Do You Pull an IP Address?
Pulling an IP address can be done in several ways depending on your operating system and what type of information you need. On Windows systems, you can use the ipconfig command in Command Prompt or PowerShell; on Mac systems, you can use the ifconfig command in Terminal; and on Linux systems, you can use the ip command in Terminal. Additionally, there are websites that allow you to look up your public IP address without having to run any commands or install any software.
In conclusion, knowing how to pull an IP address is essential for understanding how networks work and troubleshooting any issues that may arise with them. With this knowledge in hand, you’ll be able to identify devices on your network and access services that require authentication with ease.
This text was generated using a large language model, and select text has been reviewed and moderated for purposes such as readability.
MORE FROM ASK.COM

- Instructions
How to configure static IP address on Ubuntu 18.04

Main idea of this article
The most often case of infrastructure organization today is automated settings assign via DHCP server cause no more needed on client side. But if you don't have DHCP - no panic. You may set IP address manually after this material reading.
Firstly, you should define the network interface which settings you are want to change. To see all network cards with theirs settings just run command below:

In this output we've seen that our computer has three ethernet adapters. One of them is assigned to docker, other is loopback interface. So, our aim is ens33 network adapter. Let's go.
Since version 17.10 Ubuntu uses netplan tool to manage connectivity settings. This utility based on YAML synopsis rules. All settings are stored in /etc/netplan/*.yaml files.
So we should list all files in /etc/netplan/ directory:

NOTE: If there are no files found you can re-build it to default system config:
As we see, only 50-cloud-init.yaml file is present. To change connectivity settings we will edit it via text editor.

Let's find our adapter's name inside. By default, Ubuntu 18.04 is trying to get network settings from dedicated DHCP-node. Directive below is responsible for this:

Some explains:
ens33 – interface name dhcp4, dhcp6 – this sections are respective to the dhcp-properties for 4th and 6th IP-protocol versions. addresses – static addresses "pointed" to the interface. (in CIDR format) gateway4 – IPv4 address for default hope. nameservers – IP addresses for servers which resolves DNS-queries.
NOTE: You must use spaces only, no tabs.
To apply changes just run this command:

As we see, no error messages, everything is OK.
And finally, just see system settings again:

Congratulations! IP addresses config is fully consistent with YAML-file we modified.
After this instruction reading you may assign static IP addresses to your Ubuntu server.

Thanks! Please indicate the reason for the low rating so that we can improve the article
- Cloud servers
- VMware cloud
- Block storage
- Object storage
- Private network
- Direct connect
- Edge Gateways
- Developer tools
- Marketplace
- Application Hosting
- Web Hosting
- WordPress Hosting
- Cloud for startups
- Cloud for E-commerce
- Big Data computing
- Referral program
- About Serverspace
- Press center
- Terms of service
- Privacy Policy
- Use of Cookies
- Infrastructure
- Data centers
- Control panel
- Customer stories
Create account
By signing up you agree to the Terms of Service .

- Knowledge Base
- Customer Login
Dedicated Servers
Robust, secure and industrial-grade dedicated servers.
Storage Dedicated Servers
Affordable, customizable, reliable
High Performance Servers
High availability hosting utilizing high grade servers.
Secure, single-tenant and agile virtualized environment.
Co-location
Safe home for your servers in our high-class data centre.
Backup and Restore
Reliable, cost effective, backup and disaster recovery.
DDos Protection
7 layer DDoS mitigation system that protects your network.
Managed Services
Outsource your IT tasks to our skilled technical team.
Find a good domain for your business.
Powerful email hosting platform at your fingertips.
Web Hosting
Reliable and scalable web hosting solution.
It’s not about what we say, it’s about what we do. Learn more about Casbay’s background and confidently join our growing community.
Our vision, history and photo gallery.
Our Data Centre
Tier III certified data centre.
Our Clients
Explore our existing client base.
Our partners that grow with us in our journey.
The latest news and media releases.
Casbay Knowledge Base
Search our articles or browse by category below.

How to Configure Static IP Address on Ubuntu 18.04
In this tutorial, we’ll explain how to set up a static IP address on Ubuntu 18.04.
Do you know that:
Your router DHCP server would assign the IP addresses dynamically? In different situations such as configuring port forwarding or running a media server on your network, it may be necessary to set a static IP address on your Ubuntu computer.
Configuring Static IP address using DHCP
The easiest way to assign a static IP address to a device on your LAN is by setting up a Static DHCP on your router. Static DHCP or DHCP reservation is a feature that we find on most routers which makes the DHCP server automatically assign the same IP address to a specific network device, every time the device requests an address from the DHCP server. This works by assigning a static IP to the device’s unique MAC address. However, the steps for configuring a DHCP reservation vary from router to router and it’s advisable to consult the vendor’s documentation.
Starting with the 17.10 release, Netplan is the default network management tool on Ubuntu, replacing the configuration file /etc/network/interfaces that had previously been used to configure the network on Ubuntu.
Netplan uses configuration files with YAML syntax. To configure a network interface with Netplan you simply create a YAML description for that interface and Netplan generates the required configuration files for the renderer tool that you choose.
Moreover, Netplan currently supports two renderers NetworkManager and Systemd-networkd. We use NetworkManager mostly on desktop machines. For System-network, we use it when a GUI is absent on servers.
Configuring Static IP address on Ubuntu Server
To configure a static IP address, you will need a VPS or Dedicated Server that runs on Ubuntu. The newer versions of Ubuntu uses ‘Predictable Network Interface Names’ that start with en[letter][number] . by default. The first step is to identify the name of the ethernet interface you want to configure. You can use the following IP link command:
The command will print a list of all the available network interfaces. In this case, the name of the interface is ens3 :
The location of the Netplan configuration files is in the /etc/netplan directory and have the extension .yaml . You’ll probably find one or two YAML files in this directory. The file may differ from setup to setup. Usually, the file is named either 01-netcfg.yaml , 50-cloud-init.yaml or NN_interfaceName.yaml , but in your system, it may be different.
Next, open the YAML configuration file with your text editor:
Before changing the configuration
Let’s explain the code in a short time before changing the configuration.
Each Netplan Yaml file starts with the network key that has at least two required elements. The first required element is the version of network configuration format and the second one is the device type. Device types values can be ethernets , bonds , bridges , and vlans .
Furthermore, the configuration above also includes the renderer type. Out of the box, if you installed Ubuntu in server mode the renderer is configured to use networkd as the back end.
Under the device’s type ( in this case ethernets ) we can specify one or more network interfaces. In this example, we have only one interface ens3 that is configured to obtain IP addressing from a DHCP server dhcp4: yes .
To assign a static IP address to ens3 the interface edit the file as follows:
- Set DHCP to no dhcp4: yes
- Specify the static IP address 192.168.121.199/24 . Under addresses: you can add one or more IPv4 or IPv6 IP addresses that will be assigned to the network interface.
- Specify the gateway gateway4: 192.168.121.1
- Under nameservers , specify the nameservers addresses: [8.8.8.8, 1.1.1.1]
Make sure you follow the YAML code indent requirements when editing Yaml files as it may not work if the c onfiguration includes a syntax error.
Once you save and closed the file, and the changes are applied with:
Then verify the changes by typing:
That’s it! You have assigned a static IP to your Ubuntu server.
Configuring Static IP address on Ubuntu Desktop
Setting up a static IP address on Ubuntu Desktop computers requires no technical knowledge.
1.In the Activities screen, search for “network” and click on the Network icon. This will open the GNOME Network configuration settings. Click on the cog icon.

3. In “IPV4” Method” section select “Manual”, and enter your static IP address, Netmask and Gateway. Click on the “Apply” button once completed.

Now that you have set up a static IP Address, open your terminal either by using the Ctrl+Alt+T keyboard shortcut or by clicking on the terminal icon and verify the changes by typing:
The output will show the interface IP address:
You have learned how to assign a static IP address on your Ubuntu 18.04 machine.
If you have any questions, please leave a comment below.
Looking for more guide articles on Ubuntu? Kindly visit our Knowledge Base .

- [email protected]
- Data Center
- Cloud Server
- VPS Hosting
- Windows VPS
- Dedicated Server
- Cloud calculator
- Encryption Project
- Terms of Service
- Acceptance Use Policy
- Privacy Policy
- Money Back Guarantee
- Payment Info
- Support Ticket
- Knowledgebase

Copyright © 2010 – 2020 Casbay LLC. All Rights Reserved.
- Trending Categories

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
How to Configure Network Static IP Address in Ubuntu 18.04?
Introduction.
The Internet Protocol (IP) address is a crucial component of computer networking as it uniquely identifies each device connected to a network. By default, most network interfaces are configured to obtain an IP address dynamically from a router or DHCP server. However, in some cases, it is necessary to configure a static IP address.
A static IP address is an IP address that is manually assigned to a device and does not change over time unless manually reconfigured. In this article, we will discuss how to configure a static IP address on Ubuntu 18.04 and why it's important in some situations.
What Is Static IP Address And Why It's Important?
When you connect your computer or other devices like printers and servers to a network, they are assigned dynamic IPs by default using DHCP (Dynamic Host Configuration Protocol). However, there are several reasons why you may want or need your devices to have static IPs instead of dynamic IPs.
One of the primary reasons for having a static IP is stability- when you have a device with dynamic IPs constantly changing its addresses it can be challenging for other computers on the network to keep track of where that machine is located correctly. This problem can cause issues such as disrupted connections and broken services.
With a static IP address, you specify an address that devices will always be able to find your machine at no matter what else changes on the network around it over time. Another reason for having a static IP is security – assigning fixed addresses can help security measures track traffic patterns from known locations more efficiently than if addresses constantly change; this helps them distinguish between legitimate traffic from known hosts versus potentially malicious traffic from unknown sources.
Understanding Network Configuration in Ubuntu 18.04
Overview of network configuration files and their locations.
Before proceeding with setting up a static IP address, it is important to have a basic understanding of network configuration files in Ubuntu 18.04. There are two primary configuration files for network settings in Ubuntu 18.04: /etc/network/interfaces and /etc/netplan/*.yaml.
The /etc/network/interfaces file is used by the ifupdown package, which is the traditional method of configuring networking on Ubuntu systems. The file contains interface configurations such as IP address, netmask, gateway, and DNS servers.
The /etc/netplan/*.yaml file is used by the Netplan utility for configuring networking in Ubuntu 18.04. This YAML-based configuration file provides a simple and flexible way to configure network interfaces.
Explanation of the importance of understanding network configuration before proceeding with configuring a static IP address
Having an understanding of how network configurations work in Ubuntu 18.04 is essential when configuring static IP addresses. Static IP addresses are manually assigned, unlike dynamic IPs that are automatically assigned by DHCP (Dynamic Host Configuration Protocol). Assigning an incorrect static IP address or modifying other critical settings can lead to loss of connectivity to the network and internet.
Therefore, before proceeding with setting up a static IP address on your system, it is important to have some knowledge about how networking works in Ubuntu 18.04 operating system so that you can avoid making mistakes that might cause problems later on during the process or cause your system to be inaccessible over your local area network or even over public networks like the internet. In short, having this knowledge will help you troubleshoot any problem or issue that may arise during the process correctly because you will understand what is happening and why.
Identifying Network Interface Name and Current IP Address
As we proceed towards configuring a static IP address in Ubuntu 18.04, the first step is to identify the network interface name. In Ubuntu 18.04, network interfaces are named differently from previous versions, so it is important to understand how to find the correct interface name.
One way to identify the name of the network interface is by using command-line tools such as ifconfig or ip addr show. To use ifconfig, open a terminal window and type "ifconfig" at the prompt.
A list of all available network interfaces will be displayed with their respective names. To check the current dynamic IP address assigned to the interface, look for an entry labeled "inet addr" under each interface’s details in ifconfig output.
The inet addr value represents the dynamic IP address assigned by DHCP server. Another tool that can be used to obtain information about network interfaces in Ubuntu 18.04 is ip command line utility.
By running “ip addr show” command on terminal you can get a detailed list of all available interfaces with their IPv4, IPv6 addresses and other important information. Knowing how to find both this information will be useful while configuring static IP addresses in Ubuntu 18.04 since you need this information while editing netplan YAML file in order configure a static IP address correctly
Configuring Static IP Address using Netplan
Overview of netplan yaml file structure.
Netplan is a configuration utility that allows users to easily configure network settings in Ubuntu 18.04. The main configuration file for Netplan is located at "/etc/netplan/", and it uses YAML syntax for its configuration files. The syntax of the file is strict, so even a small error can cause issues with network connectivity.
The top-level elements in the Netplan YAML file specify the behavior of each network interface defined in the configuration file. These elements contain basic information about the network interface, such as its name, IP address, gateway, DNS server(s), and any custom routes.
Step-by-step guide on how to edit and configure Netplan YAML file for static IP addressing.
Here are the steps involved in configuring a static IP address using Netplan −
Open your Terminal application by pressing `Ctrl+Alt+T` or searching for "Terminal" on the Ubuntu applications menu.
Navigate to "/etc/netplan/" by running this command: `cd /etc/netplan/`
Open the default NetPlan YAML configuration file called "50-cloud-init.yaml" by running this command: `sudo nano 50-cloud-init.yaml`
Locate your network interface name from Section II earlier (e.g., enp0s25) and add these lines under it−
Replace "YOUR_STATIC_IP_ADDRESS/MASK", "YOUR_GATEWAY_IP_ADDRESS", and "YOUR_DNS_SERVER_IP_ADDRESSES" with your own values.
Save your changes by pressing `Ctrl+X`, then press Y when prompted to save, and press Enter to confirm the file name.
Test your configuration by running the following command: `sudo netplan apply`

Explanation on how to apply changes made on Netplan YAML file.
To apply changes made in the Netplan YAML file, you need to run the "netplan apply" command in the Terminal. This command applies your changes immediately without requiring a system reboot.
If you don't run this command, any changes you make will not be applied until a system reboot or until you manually run this command. Additionally, if there are any syntax errors in your NetPlan YAML configuration file, running "netplan apply" will fail and an error message will be displayed in your Terminal output.
Overall, configuring static IP addresses using NetPlan can be a great way to ensure stable network connectivity for Ubuntu 18.04 users. The process may seem complex at first glance but once you follow these steps carefully it'll become much simpler.
In this article, we discussed the importance of having a static IP address in Ubuntu 18.04. A static IP address ensures that your device can always be reached at the same network address, making it easier to manage and keep track of devices on your network. This is particularly important for servers and other devices that need to be accessible from outside your local network.

- Related Articles
- How to Configure Network Static IP Address on RHEL/CentOS 8?
- How to Install and Configure an NFS Server on Ubuntu 18.04?
- Difference between Static IP Address and Dynamic IP Address
- How to Change Hostname on Ubuntu 18.04?
- 3 Ways to Set a Static IP Address in RHEL 8
- How to Install Anaconda on Ubuntu 18.04 and 20.04?
- How to Enable/Disable UFW Firewall on Ubuntu 18.04 & 20.04?
- How to hide an IP address
- How to identify server IP address in PHP?
- How to get the ip address in C#?
- How to Install and Configure FTP Server in Ubuntu?
- How to Pad IP Address With Zero in Excel?
- How to Install and Configure Memcached on Ubuntu?
- How to Configure Proxy Settings on Ubuntu 20.04?
- How to get a Docker Container IP address?
Kickstart Your Career
Get certified by completing the course
Home » How to Setting IP Static Ubuntu 18 or 20.04
How to Setting IP Static Ubuntu 18 or 20.04
June 13, 2022 1 min read

Today, today i will do configuration static ip address on ubuntu server 18.04 or 20.04 uing netplan. Since Ubuntu 17.10 and later uses Netplan as the default network management tool. The previous Ubuntu versions were using ifconfig and its configuration file /etc/network/interfaces to configure the network.
About Netplan
Netplan is a utility for easily configuring networking on a linux system. We can simply create a YAML description of the required network interfaces and what each should be configured to do.
How does it work?
Netplan reads network configuration from /etc/netplan/*.yaml which are written by administrators, installers, cloud image instantiations, or other OS deployments. During early boot, Netplan generates backend specific configuration files in /run to hand off control of devices to a particular networking daemon.
The first step toward setting up a static IP address is identifying the name of the ethernet interface you want to configure. To doing it, use “ ip link ” or “ ip add ” to determine interface.
Setting Static IP Ubuntu
To assign a static IP address on the network interface, open the YAML configuration file with your favourite editor text.
The result above is default dhcp. Next i want to change to be static IP address. This is way.
Save and netplan apply .
That’s it and great! we have finished assigned a static IP to our Ubuntu server. Hope it’s helpful, please leave a comment and I’ll appreciate it.

Ispconfig Nginx Directives Laravel
How to Hide Version nginx
How to install ssh in windows 10/11, leave a reply cancel reply.
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.

How to configure a Static IP address on Ubuntu 18
This tutorial will show you all the steps required to configure a static IP address on Ubuntu Linux.
This tutorial was tested on Ubuntu 18.04.
Table of Contents
- Detect the Network Interface on Linux
- Backup the Network Configuration Files
- Configure the Static IP Address
- Verify the Network Configuration
1. Detect the Network Interface on Linux
First, you need to verify if the Ubuntu Linux detected the network interface.
# lshw -C network
Take note of the Network interface logical named.
In our example, the system detected a network interface named ENS160.
*-network description: Ethernet interface product: VMXNET3 Ethernet Controller vendor: VMware physical id: 0 bus info: pci@0000:03:00.0 logical name: ens160 version: 01 serial: 00:0c:29:b1:46:b1 size: 10Gbit/s capacity: 10Gbit/s width: 32 bits clock: 33MHz capabilities: pm pciexpress msi msix bus_master cap_list rom ethernet physical logical tp 1000bt-fd 10000bt-fd configuration: autonegotiation=off broadcast=yes driver=vmxnet3 driverversion=1.4.14.0-k-NAPI duplex=full ip=10.0.2.220 latency=0 link=yes multicast=yes port=twisted pair speed=10Gbit/s resources: irq:18 memory:fd5fc000-fd5fcfff memory:fd5fd000-fd5fdfff memory:fd5fe000-fd5fffff ioport:4000(size=16) memory:fd500000-fd50ffff
2. Backup the Network Configuration Files
Create a backup of your current network configuration.
# mkdir /backup # cp /etc/netplan /backup -R
3. Configure the Static IP Address
Access the Netplan directory and list the configuration files available.
# cd /etc/netplan # ls
50-cloud-init.yaml
Usually, you will find a file named 01-netcfg.yaml or a file named 50-cloud-init.yaml.
In our example, let's assume that you found a file named 50-cloud-init.yaml.
Edit the network configuration file.
# cd /etc/netplan # vi 50-cloud-init.yaml
Here is the default content of the network configuration file:
Here is the new file with our configuration.
In our example, the network interface ENS160 was configured to use the IP address 192.168.100.100/24, the gateway 192.168.100.1 and the DNS server from Google 8.8.8.8 and 8.8.4.4.
YAML is a human-friendly data serialization standard for all programming languages. YAML is extremely sensitive to indentation errors.
Enable the new Network configuration.
# netplan generate # netplan apply
4. Verify the Network Configuration
Use the IFCONFIG command to verify the network interface configuration.
Here is the current network interface configuration.
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.100.100 netmask 255.255.255.0 broadcast 192.168.255.255 inet6 fe80::20c:29ff:feb1:46b1 prefixlen 64 scopeid 0x20 ether 00:0c:29:b1:46:b1 txqueuelen 1000 (Ethernet) RX packets 572572 bytes 258895818 (258.8 MB) RX errors 0 dropped 319 overruns 0 frame 0 TX packets 132383 bytes 11603906 (11.6 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Verify the DNS configuration.
# systemd-resolve --status
Here is the current DNS configuration.
Link 2 (ens160) Current Scopes: DNS LLMNR setting: yes MulticastDNS setting: no DNSSEC setting: no DNSSEC supported: no DNS Servers: 8.8.8.8 8.8.4.4
Verify the default route configuration.
# netstat -nr
Here is the current routing table configuration.
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.100.1 0.0.0.0 UG 0 0 0 ens160 192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
Related Posts

How to Monitor MySQL using Zabbix

How to Install Zabbix with Nginx on Ubuntu Linux

Zabbix HTTPS Installation on Ubuntu Linux

How to Install Zabbix 4 on Ubuntu Linux
Leave a comment cancel reply.
You must be logged in to post a comment.

IMAGES
VIDEO
COMMENTS
To keep an HP printer from going offline, move it closer to the router when connected to a wireless network. Alternatively, use a network cable that fits firmly into the printer and computer for a cable connection, give the printer a static...
When it comes to understanding the internet, knowing how to pull an IP address is a fundamental skill. An IP address (Internet Protocol address) is a unique identifier that is assigned to each device connected to the internet.
The location of an IP address is usually found in your computer’s network diagnostics or Internet connection settings. Though this information is stored by your computer, it is assigned by your Internet provider or LAN router.
Configuring Static IP address on Ubuntu Desktop # · In the Activities screen, search for “network” and click on the Network icon. · The Network
How to configure static IP address on Ubuntu 18.04 · ip a · ls /etc/netplan/ · sudo netplan generate · sudo nano /etc/netplan/50-cloud-init.yaml.
Click on top right network icon and select settings corresponding to the network interface you wish to assign with the static IP address. · Next
The first way of assigning a static IP address is to make use of something called DHCP reservation. DHCP reservation is typically the best way
Configuring Static IP address on Ubuntu Desktop · 1.In the Activities screen, search for “network” and click on the Network icon. This will open
Click on the gear icon of the network interface which you want to configure a static IP address. A new window should open. In the Details tab, your current
Поговорим о том, как настроить статический IP-адрес в Ubuntu 18.04. Netplan -- это новая утилита сетевых настроек с помощью командной
How to Configure Network Static IP Address in Ubuntu 18 04 - Introduction The Internet Protocol (IP) address is a crucial component of
Setting Static IP Ubuntu ... To assign a static IP address on the network interface, open the YAML configuration file with your favourite editor
This will open your network card settings window. Navigate to IPv4 section, choose Manual method and finally enter your IP address, Netmask, Gateway etc. Once
How to configure a Static IP address on Ubuntu 18 · Detect the Network Interface on Linux · Backup the Network Configuration Files · Configure the