13.2 Can't set an IP to unplugged ethernet device.

I’ve an OpenSUSE 13.2 computer with ‘wicked’

root@COMPUTER:/> cat /etc/sysconfig/network/ifcfg-enp5s7
BOOTPROTO=‘static’
BROADCAST=’’
ETHTOOL_OPTIONS=’’
IPADDR=‘1.1.1.1/27’
MTU=’’
NAME=‘DGE-528T Gigabit Ethernet Adapter’
NETWORK=’’
REMOTE_IPADDR=’’
STARTMODE=‘auto’

After boot without ethernet cable:

root@COMPUTER:~> ifconfig enp5s7
enp5s7 Link encap:Ethernet HWaddr 00:21:91:F4:2B:78
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

root@COMPUTER:~> wicked ifstatus enp5s7
enp5s7 setup-in-progress
link: #3, state device-up, mtu 1500
type: ethernet, hwaddr 00:21:91:f4:2b:78
config: compat:/etc/sysconfig/network/ifcfg-enp5s7

How it can set an IP to unplugged enp5s7 ???

nick

I’m not actually seeing a problem here.

As far as I know, when you plug in a live network cable that “ifcfg-” file will be read and the IP from there will be used.

Yes, but how I can bind some network services to the IP? Apache for example.
We are know this possibilities at previous 13.1 version.
In the 13.1 there not nessesary to plug cable for set IP.

nick

If you think that you have lost a capability that used to be there, then file a bug report at the bugzilla.

openSUSE:Submitting bug reports

I ran into the same “new feature” and only way I managed to set the IP address of disconnected interface was to add line like
ifconfig enpX …
into /etc/init.d/after.local

Regards.

If you were able to do this with a disconnected cable, congrats (before). Maybe that was a “new” relatively recent feature which didn’t exist when I looked into this many years and openSUSE versions before. A quick search didn’t turn up what I likely found before and with all the architectural changes since I wouldn’t know if what I found before is still relevant.

Because it was so long ago the details of what I found before is kind of fuzzy, but IIRC

  • The technical term of what you’re asking about is NIC “media sense”
  • There is/was a special small utility that can turn off media sensing just like the more well known Windows method. I found it only after some extensive searching I guess because hardly anyone inquires about it.
  • I seem to remember it has something to do with a NIC autoconfiguration utility, but is not part of the main utility. Is a completely separate piece of code. I probably used the term “hotplug” in my previous searches but I know what I found succeeded the time when hotplug was part of the Linux architecture.

The bottom line probably is that it’s probably faster, easier and simpler to just buy yourself a $5 hub and hook it up to activate the NIC’s media sense rather than spend all the time researching this and maybe the next time there is an architectural change it might not be relevant any more.

BTW - I assume you know that setting up web service like Apache has special considerations, for instance you can’t set it up on Localhost and automatically assume it’ll work on any other network interface, in particular the interface with the network address remote clients would use.

Also, wondering if you have tried using the YAST web server applet (only when using Apache, AFAIK does not support any other webserver). I don’t know if it will bind your web services to an inactive NIC, but using this utility should always be recommended over manual configuration. You can run the following which would install the applet if it isn’t already

zypper in yast2-http-server

HTH,
TSU

Cool! 5$ only. (+ payment for power 10Watt/hour ?)

I’ve simple dhcp-server for some tests. A disconnected ethernet cable is on my table, when I need a dynamic IP, I simple plug the cable for it.
OpenSuSE 13.1 provide this function. But with v13.2 dhcpd not started at all (disconnected cable).
I talk about the one my computer. The schema not changed.

To add “ifconfig…” to /etc/init.d/after.local file - is a good decision and more cheaper :wink: , but I looking for command/s for wickedd to switch off a media sense.

Thanks
nick

I put this link in another thread and am adding another to what appears to be some documentation.

https://gitorious.org/wicked/olafherings-wicked/source/15277454fb864019ead8a02e1839657ea13d1f24:Documentation/WhyWicked.txt
https://github.com/openSUSE/wicked/blob/master/README

hope that helps,

a5’

I came across the answer to this thread while investigating something else.

The piece of code I had found before is still being used and now is documented several times in the system.

The name of the applet is

ifplugd

You can read the MAN page for this and also in the MAN page for ifup.

man ifplugd
man ifup

TSU

had the same problem. finally found solution here:

from thread https://forums.opensuse.org/showthread.php/504887-Wicked-how-to-setup-a-completely-static-configuration