Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 41383  / 2 Years ago, fri, december 10, 2021, 3:59:19

I recently installed Ubuntu Desktop 13.10 and I am trying to set up static IP by changing the /etc/network/interfaces file from:



# interfaces(5) file used by ifup(8) and ifdown(8)                                                                                                                        
auto lo
iface lo inet loopback

iface eth0 inet dynamic


to:



# interfaces(5) file used by ifup(8) and ifdown(8)                                                                                                                        
auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.1.70
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8


Using whatever I gleaned from these FAQ/Tutorial Sites





I have double checked those numbers, and they are the same values I use on 2 different computers at the office (NOTE: those 2 computers, raspis, are connected to a network switch then the router, whereas the desktop currently in question connect directly to the router). However, when I enable static addresses and restart, the machine does not get the ip address I requested (192.168.1.70), instead getting a different one (192.168.1.111) disabling the NIC altogether. I have also tried requesting a different ip address (192.168.1.199) in case the old one was taken, but that too results in the NIC being disabled.



I am asking this question here as google/SO does not seem to have an answer specifically pertaining to what users should do, and how they should proceed when simply "googling the problem" and quickly updating a single file does not result in static addresses. I am specifically requesting the following:




  1. An answer as to why this may not be working (ie. whether this is Ubuntu 13.10 related).

  2. How to debug the network initialization during boot.

  3. How to finally set up static ip addressing.



EDIT:



As per Atari's requests, I tried setting the IP using the GUI instead of the command line. To do this, I had to purge the /etc/network/interfaces file first (by commenting out the static related lines), restarting, then trying again. If I do not do this, I can not even access the options of my NIC. This did assign a static IP to my computer, however, now I only have local access to and from it (via ssh) with absolutely no access to the internet.


More From » 13.10

 Answers
1

You are missing the line which will cause the configuration to be run at startup.



Edit your /etc/network/interfaces configuration and add the line:



auto eth0


In the mean time, you can set the static address with the command:



sudo ifup eth0


It you want to have the interface to start only when you are connected to a specific network, check the documentation and examples for the ifupdown package. In particular, look at the mapping command. The ping-places.sh command can be useful in identifying which network you are on.


[#28677] Sunday, December 12, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
herriail

Total Points: 11
Total Questions: 122
Total Answers: 118

Location: Peru
Member since Tue, Mar 16, 2021
3 Years ago
herriail questions
Tue, May 18, 21, 02:11, 3 Years ago
Sun, Dec 12, 21, 06:06, 2 Years ago
Wed, May 24, 23, 01:42, 1 Year ago
Sun, Jan 29, 23, 00:48, 1 Year ago
;