You are not logged in.

#1 2011-06-16 19:40:54

ostanislaw
Member
Registered: 2011-06-16
Posts: 2

netcfg - no connection, interface without devices connected

I have two interfaces eth0, eth1
eth0 (DHCP) - connect to router, provide internet
eth1 (STATIC IP) - connect with print server in my printer
- I expect interface should up without need to have powered on device connected to it

Everything worked fine, when interfaces were configured with /etc/rc.conf.

Now I configured network with netcfg and:
eth0 - up and everything ok
eth1 - no starts up, when no device is connected (powered off device connected) to this ethernet card

log:

# NETCFG_DEBUG="yes" netcfg eth1-static
DEBUG: Loading profile eth1-static
DEBUG: Configuring interface eth1
:: eth1-static up                        [BUSY] DEBUG: status reported to profile_up as: 
DEBUG: Loading profile eth1-static
DEBUG: Configuring interface eth1
DEBUG: ethernet_iproute_up ifup
 > No connection 
DEBUG: profile_up connect failed

but when printer is powered on, interface starts up:

# netcfg eth1-static
:: eth1-static up       [DONE] 

network profile content

# cat /etc/network.d/eth1-static 
CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth1'
IP='static'
ADDR='192.168.0.1'

Am I missing some setting? Maybe I should disable/enable something in profile?



Things to reproduce:
1. two ethernet cards
2. first connected network and second  connected to switched off device, or not connected
3. configure 2 netcfg profiles (first - dhcp, second -static ip)
4. the second interface will fail to start up

Last edited by ostanislaw (2011-06-18 10:31:12)

Offline

#2 2011-06-18 10:43:13

ostanislaw
Member
Registered: 2011-06-16
Posts: 2

Re: netcfg - no connection, interface without devices connected

Now I configured second interface - eth1 the old way in /etc/rc.conf:

eth1="eth1 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 mtu 1492"
INTERFACES=(eth1)

While eth0 is configured by netcfg profile.
Both interfaces works. But my problem is not solved, because both interface should be configured in netcfg.

I think netcfg check if network is available and doesn't start eth1 interface, while device configured the old way in /etc/rc.conf doesn't perform this check. There should be option to disable it in netcfg profile.

Last edited by ostanislaw (2011-06-18 10:44:18)

Offline

#3 2011-06-30 08:10:34

admsimat
Member
Registered: 2010-02-09
Posts: 4

Re: netcfg - no connection, interface without devices connected

Same problem here. I have one ethernet with public address, and another ethernet card wih private address. This card provides a dhcp daemon, so most of the times it is not connected at boot. Now netcfg refuses to enable the interface since there is no connection.
One solution would be to run the iproute commands as a local script, and this works. However, netcfg should just activate interfaces as we wish, and not as IT thinks they should be.

Last edited by admsimat (2011-06-30 08:11:05)

Offline

Board footer

Powered by FluxBB