When I set IP it will change to another ?

Hi,

I want to change TX2 ip,
first, I used

sudo gedit /etc/NetworkManager/NetworkManager.conf

and set

managed = false

and restarted

sudo service network-manager restart

and then I used

sudo gedit /etc/network/interfaces

and set

auto eth0  
iface eth0 inet static  
address 192.168.18.228  
gateway 192.168.18.1  
netmask 255.255.255.0

and restart

sudo /etc/init.d/networking restart

When I use ifconfig to see the IP, it show inet addr:192.168.155.105. Why the IP changed ?

Try moving this to file “/etc/network/interfaces.d/eth0”:

auto eth0  
iface eth0 inet static  
address 192.168.18.228  
gateway 192.168.18.1  
netmask 255.255.255.0

Then edit “/etc/network/interfaces” to become:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
source interfaces.d/eth0

I am guessing that either NetworkManager is still trying to manage, or else it didn’t know changes directly in “/etc/network/interfaces” were all for eth0. If you already segregated eth0 data out like this, then NetworkManager isn’t really disabled from that port and it is still sending out DHCP requirests.