I'm using a third-party custom Yocto image that by default set the network connection with DHCP. /etc/network/interfaces file is not present at all.

In order to set a static address I create the file as usual:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address 192.168.1.210
  netmask 255.255.255.0
  gateway 192.168.1.1

and rebooted but nothing has changed:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:60:80:40:00:11
          inet addr:192.168.1.117  Bcast:192.168.255.255  Mask:255.255.0.0
          inet6 addr: fd00::260:80ff:fe40:11/64 Scope:Global
          inet6 addr: fe80::260:80ff:fe40:11/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2037 errors:0 dropped:0 overruns:0 frame:0
          TX packets:924 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:157492 (153.8 KiB)  TX bytes:100759 (98.3 KiB)
          Interrupt:152 Base address:0xc000

I don't find a "usual" way to set or restart networking services (I know a bit Debian) hence I'm not sure if I need to enable something else.

I checked any script in /etc/init.d but there are only scripts for dropbear, ntpd and few others.

Here some other information:

# uname --a
Linux 3.10.31-ltsi-05172-g28bac3e-dirty #10 SMP Mon Nov 6 16:01:20 EST 2017 armv7l GNU/Linux

Любая идея, как запросить использование файла интерфейсов?

0