Static IP Address

From Variscite Wiki
Revision as of 17:33, 11 October 2018 by Admin (talk | contribs) (Created page with "{{PageHeader|Configuring Static IP Addresses}} {{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}Category: DART-6ULCategory: VAR-SOM-MX7 __toc__ It is sometimes desir...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Configuring Static IP Addresses

It is sometimes desirable to provide static IP configuration for network interface instead of relying on DHCP.

Using /etc/network/interfaces

Edit /etc/network/interfaces and add configuration sections for network interfaces. The example below configures eth0

auto eth0
    iface eth0 inet static
    address 192.0.2.7
    netmask 255.255.255.0
    gateway 192.0.2.254

Configure connman interface blacklist

The default Yocto network manager is connman. It as service to manage network connections in embedded devices. To check if connman is running on your system execute the following command:

# ps ax | grep connman

Connman may override the settings in /etc/network/interfaces unless configured to ignore certain interfaces. For example, to instruct connman to ignore eth0 and eth1, create /etc/connman/main.conf and add the following:

[General]
NetworkInterfaceBlacklist=eth0,eth1