Answer the question
In order to leave comments, you need to log in
How can I prevent the network settings in /etc/network/interfaces from being reset after a reboot?
Upon reboot, the IP address changes to the one issued by the router 192.168.1.49, and I need 100 at the end.
I opened the file sudo nano /etc/network/interfaces
I entered:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
# ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:0c:a4:8a
inet addr:192.168.1.49 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe0c:a48a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:4750 errors:0 dropped:0 overruns:0 frame:0
TX packets:1814 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:619136 (604.6 KiB) TX bytes:676681 (660.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:158 errors:0 dropped:0 overruns:0 frame:0
TX packets:158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13160 (12.8 KiB) TX bytes:13160 (12.8 KiB)
sudo ifconfig eth0 down && ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up
Answer the question
In order to leave comments, you need to log in
Stop the networking manager service.
But at the same time, remember that now - all changes in the network are only on command, without automation. And desktop icons will stop responding to changes.
Do you have NetworkManager running? By the way, if this is a desktop, then it's better to configure it through NM without getting into the configs.
Or maybe it's better to configure the router so that it gives you the desired IP?
Look at the router settings. Perhaps it is configured to give out IP via DHCP.
Well, the most stupid option is to put 444 on the file.
However, you must understand that someone is trying to rewrite it and this is not the best option.
There are several options
, for example, some web panel has network settings and tries to generate them every time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question