Setup static IP under Ubuntu
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Flying Over Ancient Lands
--
Chapters
00:00 Setup Static Ip Under Ubuntu
02:30 Accepted Answer Score 13
03:30 Answer 2 Score 3
03:46 Answer 3 Score 1
04:16 Answer 4 Score 0
04:26 Thank you
--
Full question
https://superuser.com/questions/751995/s...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ubuntu #networking #debian #ip
#avk47
ACCEPTED ANSWER
Score 13
Ok, I ditched Microsoft and change my household computers and laptops to Ubuntu 14.04 :)
After a week long searching the internet how to get a static ip-address on Ubuntu 14.04 I finally found a way ...
It seems the network-manager is overwriting (or by-passing) my /etc/network/interfaces every single time, I thought of removing it but decided on trying to use it first.
Go to the right upper corner and click the network icon, go down to the bottom and right click edit connections.
This opens network connections and choose the connection to change, click edit and go to IPv4 settings. Choose Method: Manual and then fill in the Address, Netmask and Gateway ... and your desired DNS server.
Just save and your done ... it will change to the given static IP-address on the fly ... even after reboot!!
This might be an old thread, but after a week of searching I updated the 10 first hits in Google ... hope to safe other people some time!!
Take care!
ANSWER 2
Score 3
Your gateway
is incorrect (gateway 192.168.2.0
). This is not a valid IP and you should substitute it with your router's IP address.
ANSWER 3
Score 1
I think I found the answer, having moved the content from /etc/network/interfaces.d/eth
into /etc/network/interfaces
, and rebooted, it is working now.
cat /etc/network/interfaces.d/eth >> /etc/network/interfaces
rm /etc/network/interfaces.d/eth
service networking restart
reboot
I guess that ifup
understand source-directory /etc/network/interfaces.d
and can handle it correctly while network manager can't.
ANSWER 4
Score 0
gateway 192.168.2.0
May not be configured to your routers correct gateway.