Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-14-2019, 02:14 AM   #1
LQ Newbie
Registered: Mar 2019
Posts: 3

Rep: Reputation: Disabled
How to set a static IP using netplan? (running Ubuntu Bionic server)

I've followed/looked at several guides (like this one) on how to do the above.

My problem is that no static IP is getting assigned to the built-in ethernet port. I have run
netplan apply
several times. I've also rebooted the PC and still no luck.

I am sure the ethernet port works as I was previously using it on Ubuntu 16.04 just before I decided to fresh install 18.04.2.

Any ideas what I could be doing wrong? I am going to use the ethernet port to connect my main PC to the Ubuntu server via a crossover cable.

If I set the ethernet port to use
and connect an ethernet cable from it to my modem/router and disable my WiFi card (by removing the netplan config), the PC can connect to the net without any issues.



This is the output of
netplan --debug apply
which also shows the contents of my YAML files. I have tried with and without dhcp4/dchp6/gateway4/renderer.

screenshot of netplan --debug:
Old 03-17-2019, 07:18 AM   #2
LQ Newbie
Registered: Mar 2019
Posts: 1

Rep: Reputation: Disabled
Static IP address using netplan

To configure Static IP address on your Ubuntu Bionic Server, you have to follow these steps:
1. Go to /etc/netplan/ directory in your server.
2. Now, you have to open a file called “01-netcfg.yaml” or “50-cloud-init.taml”. In this you have to Configure the following things:
• addresses: Here, you have to enter static IP address here for example (
• Gateway4: Here, you have to enter default gateway IP address for example (
• Nameserver: You have to add DNS entry for example (,
• Dhcp4: no
3. Now, you have to run “sudo netplan apply” command.
4. If there is an issue, you can run “sudo netplan –debug apply” command.

Last edited by krishan25; 03-17-2019 at 07:27 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A start job is running for Wait for Network to be Configured - netplan Ubuntu 18.04 vincix Linux - Networking 1 02-28-2019 02:30 PM
LXer: How to Use the Netplan Network Configuration Tool on Linux LXer Syndicated Linux News 0 09-09-2018 04:51 AM
LXer: How to configure static IP address on Ubuntu 18.04 Bionic Beaver Linux LXer Syndicated Linux News 0 06-04-2018 07:12 AM
Ubuntu 17.04, netplan, bring up interface without ip da1 Ubuntu 3 01-24-2018 10:04 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration