You are not logged in.

#1 2008-09-17 11:58:04

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

netcfg v2.1.0

netcfg v2.1 is mostly a bug fix release, however there are some important changes and new features.

- Remove driver specific hacks/quirks. They now need to be enabled manually using the QUIRKS=() array.
- auto-wireless has been moved from net-profiles to a separate daemon net-auto.
- A new option (IWCONFIG) to run iwconfig with set arguments before connecting
- Various minor fixes

Details can be found on the wiki for all these options
http://wiki.archlinux.org/index.php/Network_profiles

Development details for netcfg can also be found on the wiki
http://wiki.archlinux.org/index.php/Net … evelopment

Last edited by iphitus (2008-09-17 12:01:15)

Offline

#2 2008-09-17 15:30:45

buddabrod
Member
From: Germany
Registered: 2007-02-25
Posts: 220

Re: netcfg v2.1.0

Hey there, is it possible to use wpa HEX keys with netcfg? I tried with quotation marks and woithout, I always get

:: home up  - wpa_supplicant did not start, possible configuration error                   [FAIL]

I my wpa_supplicant.conf I have the hex key without quotation marks and it works flawlessly.

Offline

#3 2008-09-17 16:09:11

thomasd
Member
Registered: 2008-08-11
Posts: 114

Re: netcfg v2.1.0

I need some help on the following: I want to connect using netcfg-auto-wireless or net-auto on bootup to a hidden network and have therefore set SCAN="no" in the profile.

It worked exactly once. It scanned for networks and then connected to my hidden network. Next times it found no networks at all.

Is this supposed to work in the new version? If yes, what are the required settings? If no, why did it work once? I have no ideas...

Thanks for any help,
Thomas

Offline

#4 2008-09-17 16:54:38

Robertek
Member
From: Czech Republic
Registered: 2007-06-02
Posts: 165
Website

Re: netcfg v2.1.0

I have request for another quirk:

I need set ap (iwconfig ra0 ap xxxxxxx) value before connect to my home ap and than "prescan".

IWCONFIG="ap xxxx" desnt help

It is a rt2860 wireles card.

Last edited by Robertek (2008-09-17 16:59:09)

Offline

#5 2008-09-17 19:27:00

linfan
Member
From: Stockholm, Sweden
Registered: 2004-04-23
Posts: 135

Re: netcfg v2.1.0

new upgrade of netcfg2 fails - if i downgrade and put netcfg in IgnorePkg all is ok. What do I need to add and in what files to be able to use the new netcfg?

Dmesg

NET: Registered protocol family 10
lo: Disabled Privacy Extensions
ath0: no IPv6 routers present
[linfan@sawerlap ~]$

_________________

rc.conf

MODULES=(forcedeth ath_pci snd-mixer-oss snd-pcm-oss snd-hwdep snd-seq snd-s
eq-oss snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore vboxdrv)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="*****"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
#
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#eth0="dhcp"
#INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package requird)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(ethernet)
NETWORKS=(laptop)
#NETWORKS=SENSORED
#NETWORKS=ppp
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng !network net-profiles @openntpd netfs crond alsa fam hal cups timidity++ vboxnet)

_____

/etc/network.d/laptop
CONNECTION="wireless"
INTERFACE=ath0
SCAN="yes"
SECURITY="wpa"
ESSID="********"
KEY="********"
IP="dhcp"
TIMEOUT=20

Offline

#6 2008-09-17 20:01:47

linfan
Member
From: Stockholm, Sweden
Registered: 2004-04-23
Posts: 135

Re: netcfg v2.1.0

dunno if it is correct but I added

QUIRKS=(preessid prescan) right after INTERFACE=ath0

I use the atheros-newhal-svn from AUR.

168c:001c Ethernet controller: Atheros Communications Inc. module: ath_pci
          AR242x 802.11abg Wireless PCI Express Adapter

Any way it now started when rebooting.

Last edited by linfan (2008-09-17 20:02:51)

Offline

#7 2008-09-19 11:57:35

n8schicht
Member
From: Südbaden
Registered: 2006-12-27
Posts: 138
Website

Re: netcfg v2.1.0

When using netcfg-auto-wireless (or net-auto daemon): how does it choose which wireless network to take? For me, since the update it's always picking the wrong one (the weaker one).

Offline

#8 2008-09-19 13:45:29

iamcraig
Member
Registered: 2008-06-19
Posts: 5

Re: netcfg v2.1.0

As currently implied in the netcfg wiki referenced in the top post, prior to the new net-auto daemon, the old net-profiles daemon could handle 'auto-wireless' along with an 'ethernet' profile via NETWORKS in rc.conf. This was a very clean, no-brainer way for me to move about with my laptop, semi-automagically changing network connections willy-nilly via a net-profiles restart.

That stopped working with the new netcfg, so I went looking for another way to be lazy.

My (occasionally workable) experimental solutions with different combinations of the network, net-profiles, and net-auto daemons (and their associated settings in rc.conf) lacked elegance, robustness, and simplicity; so I decided it would be cleaner to just modify the net-auto daemon script, /etc/rc.d/net-auto.

Basically, I went from this:

        for network in ${AUTO_NETWORKS[@]}; do
            case $network in
                auto-*) # Automatic configuration, store type and get interface next
                    auto=$network
                    ;;
                *) # Either interface or profile
                    if [[ "$auto" ]]; then # Auto set, so interface
                        /usr/bin/netcfg-$auto $network
                        unset auto 
                    fi
            esac
        done

to this:

        for network in ${AUTO_NETWORKS[@]}; do
            case $network in
                auto-*) # Automatic configuration, store type and get interface next
                    auto=$network
                    ;;
                *) # Either interface or profile
                    if [[ "$auto" ]]; then # Auto set, so interface
                        /usr/bin/netcfg-$auto $network
                        unset auto
                    else
                        /usr/bin/netcfg2 -c $network
                    fi
            esac
        done

and added 'ethernet' to AUTO_NETWORKS in rc.conf, i.e. for my laptop:

AUTO_NETWORKS=(ethernet auto-wireless eth1)

Now I once again have a single network daemon, net-auto, in rc.conf that will automatically connect me to whatever is available when I boot up, and a simple daemon restart gets me up and running again if I shuffle cords or wireless connections.

Disclaimer: I'm a user, not a developer, so there may be some reason why this solution is a bad idea. If so, I'd certainly like to know the right way to do what I want to do.

cheers,
craig

Offline

#9 2008-09-20 11:21:51

buddabrod
Member
From: Germany
Registered: 2007-02-25
Posts: 220

Re: netcfg v2.1.0

I have a feature request: I'd like somehting like "execute echo 5 > /sys/bus/pci/devices/0000\:03\:00.0/power_level after connecting to the AP". Since this setting is "fogotten" by the driver after bringing it down, this would be very useful :-)

Right now I have a bash alias for it.

Offline

#10 2008-09-20 15:26:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.1.0

buddabrod wrote:

I have a feature request: I'd like somehting like "execute echo 5 > /sys/bus/pci/devices/0000\:03\:00.0/power_level after connecting to the AP". Since this setting is "fogotten" by the driver after bringing it down, this would be very useful :-)

Right now I have a bash alias for it.

POST_UP="" should do the job.

Offline

#11 2008-09-20 15:55:26

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: netcfg v2.1.0

May refer to my question is this thread: http://bbs.archlinux.org/viewtopic.php?id=55458 ?

I really would like to know whether there's a way to configure the menu on boot.

Offline

#12 2008-09-21 22:21:33

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: netcfg v2.1.0

THX!

After the upgrade to v2.1, I can connect to my WPA2-PSK-secured network at the office. With previous versions, I had to use wicd or the CLI. Now net-profiles is connecting automatically at boot!

Atheros AR5008 with ndiswrapper. No quirks used, only external WPA_CONF instead of in-profile configuration.

Zl.

Offline

#13 2008-09-21 23:15:28

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: netcfg v2.1.0

what command will completely reset wireless, i do not get wireless after suspend / hibernate
i have intel iwl 4965


Acer Aspire V5-573P Antergos KDE

Offline

#14 2008-09-22 00:14:40

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: netcfg v2.1.0

To completely reset wireless, you could do this:

sudo netcfg2 -a # tell netcfg to take down every profile
sudo netcfg2 clean # tell netcfg to clear all its state info
for i in /sys/class/net/*; do
  i="${i##*/}"
  case "$i" in
    lo|wmaster0) ;;
    *) sudo ifconfig "$i" down;; # take down every hardware interface
  esac
done
sudo modprobe -r iwl4965 # unload your wifi driver
sleep 5
sudo modprobe iwl4965  # reload wifi driver

That almost certainly is overkill, but it should reset everything.

Offline

#15 2008-10-04 00:14:22

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.1.0

Anyone who has experienced DNS or DHCP issues with the last release, please try the release presently in testing (2.1.2)

Last edited by iphitus (2008-10-04 00:14:59)

Offline

#16 2008-10-04 13:12:14

turtle
Member
From: Czestochowa, Poland
Registered: 2006-02-05
Posts: 20
Website

Re: netcfg v2.1.0

iphitus wrote:

please try the release presently in testing (2.1.2)

This version doesn't work for me.

The reason is that in the file /usr/lib/network/ethernet.subr in lines 45 and 107 there is the option -q, which is not an option of dhcpcd.

Offline

#17 2008-10-04 14:07:05

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.1.0

turtle wrote:
iphitus wrote:

please try the release presently in testing (2.1.2)

This version doesn't work for me.

The reason is that in the file /usr/lib/network/ethernet.subr in lines 45 and 107 there is the option -q, which is not an option of dhcpcd.

Oh yuck, dhcpcd 4 is still in testing, I thought it had moved.

-q is a dhcpcd 4 option.

Offline

#18 2008-10-04 14:09:17

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: netcfg v2.1.0

@turtle: what version of dhcpcd do you have installed? I think the latest netcfg was tweaked to handle the dhcpcd 4.0.1 release in testing. Perhaps it's not backwards-compatible with the dhcpcd 3.2.1 in core. (I'm merely surmising; I haven't installed either of the new dhcpcd or the new netcfg yet.)

Offline

#19 2008-10-04 15:21:27

turtle
Member
From: Czestochowa, Poland
Registered: 2006-02-05
Posts: 20
Website

Re: netcfg v2.1.0

Profjim wrote:

@turtle: what version of dhcpcd do you have installed?

I have installed version 3.2.1. I have just upgraded dhcpcd to 4.0.1 from testing  and netcfg 2.1.2 works again smile

Offline

#20 2008-10-31 23:26:45

wirenik
Member
Registered: 2008-08-22
Posts: 134

Re: netcfg v2.1.0

I love netcfg2, it's a great little piece of software. Thanks so much for your contribution big_smile

One thing I noticed: When I use netcfg2 and it fails because of failed wireless network association, there's a period at the end of the output. When it fails because of DHCP timeout, there isn't a period. (I think that's what it is; it may be vice versa tongue) Just thought I'd let you know, because of consistency and stuff.


moljac024: No one really knows what happens inside /dev/null... it could be a gateway to another universe....
dunc: If it is, the people who live there must be getting pretty annoyed by now with all the junk we send them.

Offline

#21 2008-10-31 23:56:00

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.1.0

Thanks wirenik!

re consistency: I have a big, awesome patch that has been submitted to me that'll be merged into the next version, and tackles a lot of things including consistency.

Offline

#22 2008-12-01 21:51:29

JaQoB
Member
Registered: 2007-04-04
Posts: 60

Re: netcfg v2.1.0

Maybe a stupid question...
But earlier, you could write NETWORKS=(eth0 myHomeWlan) and eth0 was supported if it was available, otherwise it tried the myHomeWlan profile.
Now it seems to use both at the same time.

I guess i should use AUTO_NETWORKS=(eth0 auto-wireless wlan0) in some way... But the only effect i get is that it tries all wireless in my house...

Offline

#23 2008-12-29 10:42:28

irfan
Member
Registered: 2008-07-03
Posts: 26

Re: netcfg v2.1.0

Hi,
I get this message:

:: home up                                                                [BUSY] 
wlan0: lease of 4294967295 would overflow, treating as infinite
                                                                         [DONE]

What does it mean?

_____________________
profile:

CONNECTION="wireless"
INTERFACE=wlan0
SCAN="yes"
SECURITY="wpa"
ESSID="Purple Stain"
KEY="xxxxxxxxxxxx"
IP="dhcp"
TIMEOUT=20

netcfg v2.1.2
iwlwifi-4965 (IPW4965)

Last edited by irfan (2008-12-29 10:46:01)

Offline

#24 2008-12-29 11:09:52

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.1.0

it's most likely dhcpcd just complaining. Shouldn't be a problem. The dhcp server sets the time an IP lease has before it expires. In this case, it's given a ridiculously long time (136 years) so dhcpcd is just assuming that it's a lease forever.

Last edited by iphitus (2008-12-29 11:10:24)

Offline

#25 2008-12-29 11:27:45

irfan
Member
Registered: 2008-07-03
Posts: 26

Re: netcfg v2.1.0

ok, thanks smile

Offline

Board footer

Powered by FluxBB