Search code examples
linuxnetworkingipv4linux-mintifconfig

ifconfing setting does not maintain...?


I run a Linux Mint Cinnamon 17.3 on Surface pro 2 and I am using ThinkPad USB network card.

I want to create a simple network between two computers (connected with RJ-45).

So I try to setup eth0 on Surface like:

sudo ifconfig eth0 10.0.0.1 netmask 255.255.255.0

on the other PC (R-Pi with raspbian) I run command:

sudo ifconfig eth0 10.0.0.2 netmask 255.255.255.0

Everything is OK on R-Pi.

I tried to ping from Surface to R-Pi (ping 10.0.0.2)- straight after ifconfig it pings without problem, but after like 15s it fails. When I try to ping again, it says

connect: network unreachable and IP address on eth0 gets lost...

How can I make this work?


Solution

  • Looks like another program like NetworkManager takes care of configuring your network device.

    So if you want to configure it manually, you can set your device to unmanaged state in NetworkManager to prevent it overwriting your network settings.

    If you don't have other network devices you also can disable the NetworkManager service or remove it completely from your system.