You are not logged in.
When the other end of the LAN cable is not connected to the router, Netcfg can't assign a static ip address to the interface. In older version (6 month old) it was working, but with newer version I get a "No connection" error:
[root@backmack:/]# NETCFG_DEBUG="yes" netcfg -u mylan
DEBUG: Loading profile mylan
DEBUG: Configuring interface eth0
:: mylan up [BUSY] DEBUG: status reported to profile_up as:
DEBUG: Loading profile mylan
DEBUG: Configuring interface eth0
DEBUG: ethernet_up bring_interface up eth0
> No connection
DEBUG: profile_up connect failedmy /etc/network.d/mylan
CONNECTION='ethernet'
DESCRIPTION='mylan'
INTERFACE='eth0'
IP='static'
ADDR='192.168.0.1'
NETMASK='255.255.255.224'I think this is a bug, it should be possible to assign IP address to a LAN card even it has no cable inserted.
Last edited by backmack (2012-09-03 16:45:55)
Offline
Can you connect manually (substituting your details, and then assuming you have a valid nameserver in /etc/resolv.conf)?
/sbin/ip link set dev ${interface} up
/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
/sbin/ip route add default via ${gateway}Offline
Can you connect manually (substituting your details, and then assuming you have a valid nameserver in /etc/resolv.conf)?
/sbin/ip link set dev ${interface} up /sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface} /sbin/ip route add default via ${gateway}
Yes it works, after that i can see my eth0 interface with assigned ip address in "ip addr list"
Offline
Well, I don't know what extra safety measures netcfg is performing, but I found it noticeably slower to connect my static IP compared to using those commands in a custom systemd ".service" file. Maybe someone with greater knowledge could explain if netcfg is waiting for a link response or something.
Offline
Miscellaneous options
IPCFG
Array of arguments to pass to ip. The power of this options is
that it allows both simple and complicated routing
configurations, within the framework of netcfg.SKIPNOCARRIER
‘yes’/‘no’. Don’t abort interface setup if no carrier is
found.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
$ man netcfg-profiles wrote:Miscellaneous options
IPCFG
Array of arguments to pass to ip. The power of this options is
that it allows both simple and complicated routing
configurations, within the framework of netcfg.SKIPNOCARRIER
‘yes’/‘no’. Don’t abort interface setup if no carrier is
found.
Thank you, [Solved].
Offline