Am new to Tizen OS , We have a Build machine installed with Tizen and I need to configure Static IP Address . ConnMan Tools is not installed on my machine. I have gone through number of blogs on each and every blog mentioned only with ConnMan tool. Is there any way to configure the IP Address with command line like what we do in Fedora or Solaris by updating the scripts file under networking-scripts folder.

有帮助吗?

解决方案

Try this (remembers to set correct IP and MAC):

1) create file '/etc/init.d/eth0' and set execute rights to it (555 are fine):

#!/bin/sh

HWADDR='fe:fe:fe:fe:xx:xx'
IP='10.10.xx.xxx'
NETMASK='255.255.255.0'

ifconfig eth0 hw ether $HWADDR
ifconfig eth0 $IP netmask $NETMASK up

2) create file '/usr/lib/systemd/system/eth0-setup.service':

[Unit]
Description=Configure MAC on eth0 interface
DefaultDependencies=no
Before=net-config.service

[Service]
Type=simple
ExecStart=/etc/init.d/eth0

[Install]
WantedBy=network.target

3) Verify: run first script and see if eth0 is up and running as you need. Restart and see if it was configured on boot.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top