You are not logged in.

#101 2008-03-28 22:00:47

Blind
Member
From: Desert mountain
Registered: 2005-02-06
Posts: 386

Re: netcfg v2.0.6

No, you have to specify
NETWORKS=(auto-wireless XXX)
where XXX is the name of you wireless interface (e.g. wlan0)!
eth0 is usually an ethernet, and not a wireless, interface.
Sorry if I explain something obvious.

Offline

#102 2008-03-29 08:42:34

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: netcfg v2.0.6

Hi all,
I noticed a small thing on wireless profile:
I need to specify extra options with

WEP_OPTS="..."

instead of

IFOPTS="..."

Offline

#103 2008-03-29 13:12:50

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Re: netcfg v2.0.6

hi people, i only see you talking about wireless stuff. I just have a ethernet connection and would want to know if there is a auto-ethernet...

I have 2 network cards on my desktop, sometimes i have one connected and other times the other one is the one connected. My router gives ips from dhcp.

Is there something really simple that i don't see, that can scan for the ethernet that is connected get the address and then stop? I just need that. With the old/current style, it takes quite some time to get the ips, because one of the interfaces isn't connected and it stil gets a strange ip something like 169.???.???.???

help? smile

Offline

#104 2008-03-29 13:55:35

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: netcfg v2.0.6

have you tried making a profile for each interface?
i thinkt it should connect to the first that is up, and since only one will be up at a time, it will connect to that.

Offline

#105 2008-03-29 14:23:32

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Re: netcfg v2.0.6

Stoffi wrote:

have you tried making a profile for each interface?
i thinkt it should connect to the first that is up, and since only one will be up at a time, it will connect to that.

i'll try it roll

Offline

#106 2008-03-30 15:03:14

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

Re: netcfg v2.0.6

It seems that nobody uses a wifi card with the chipset RaLink RT2500. Or mayby nobody had the same problem. I came to the conclusion that the problem with netcfg2 lays in the file /usr/lib/network/wireless.subr, in fact in the line

# Required by ipw3945 to properly re-associate
eval "iwconfig $INTERFACE mode managed essid \"$ESSID\""

After commenting this line I can connect to my router with the profile:

CONNECTION="wireless"
HOSTNAME=turtle
INTERFACE=ra0
ESSID="pointer"
IP="static"
IFOPTS="192.168.2.102 netmask 255.255.255.0 broadcast 192.168.2.255"
GATEWAY="192.168.2.1"
DNS1=10.10.0.1
WEP_OPTS="essid $ESSID"
SCAN="yes"
SECURITY="none"
PRE_UP="/usr/local/bin/pointer"
TIMEOUT=20

However, in order not to modify the file /usr/lib/network/wireless.subr I decided to change my profile to:

CONNECTION="ethernet"
HOSTNAME=turtle
INTERFACE=ra0
IP="static"
IFOPTS="192.168.2.102 netmask 255.255.255.0 broadcast 192.168.2.255"
GATEWAY="192.168.2.1"
DNS1=10.10.0.1
PRE_UP="/usr/local/bin/pointer"

and now with the file /usr/local/bin/pointer"

#!/bin/bash
iwconfig ra0 mode managed
iwpriv ra0 set AuthMode=WPAPSK
iwpriv ra0 set EncrypType=TKIP
iwconfig ra0 essid pointer
iwpriv ra0 set WPAPSK=mypassphrase
iwconfig ra0 essid pointer

it works. Hope, it will be useful for people using RaLink RT2500 with WPA.

Offline

#107 2008-03-31 13:36:35

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

Re: netcfg v2.0.6

Ermak wrote:

Is it correct that netcfg sets up ethernet *and also* wifi network since both are available? Is not better to ignore wifi since the first network is up?

That's what the EXCLUSIVE-option is for.

Zl.

Offline

#108 2008-03-31 16:42:10

Xerion
Member
Registered: 2008-03-20
Posts: 7

Re: netcfg v2.0.6

However it seems to have problem if they have the same network gateway ?

Offline

#109 2008-03-31 17:15:18

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

Re: netcfg v2.0.6

Thankful if somebody would give an example how the 'auto-wireless' and 'EXCLUSIVE-option' are to be used. They don't seem to make any sense, why I prefer not to use them. What are they good for?

I would much appreciate some examples explained in plain English wink

Offline

#110 2008-03-31 20:03:46

stylopath
Member
Registered: 2007-07-26
Posts: 112

Re: netcfg v2.0.6

In the profile, you can set "EXCLUSIVE=yes" to tell Netcfg2 that if this profile is activated, all other profiles must be deactivatet.
Then, for example, if you change from one to another profile, the first one gets disabled before the first is enabled.

I use EXCLUSIVE for every profile btw, before that option was included i had to modify netcfg2 by hand to shut down all profiles before connecting to a new one...

exclusive ftw big_smile

Offline

#111 2008-04-01 05:18:53

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

Re: netcfg v2.0.6

Hehe... that seems like madness... editing rc.conf and/or having many NETWORKS=() lines hashed (#) except for one unhashed would accomplish the same thing, wouldn't it?

Something like this:

#NETWORKS=(wlan0 wep ethernet)
#NETWORKS=(ethernet)
NETWORKS=(wlan0)
#NETWORKS=(menu)

Or am I still missing some delicacy of netcfg2?

Offline

#112 2008-04-01 16:16:35

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

Re: netcfg v2.0.6

Don't you think

NETWORKS_EXCLUSIVE=(wlan0 wep ethernet)

is more simple, more KISS, more Archlinux?

Zl.

Offline

#113 2008-04-01 17:36:47

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

Re: netcfg v2.0.6

I just don't get it sad

I only have three profiles. What would

NETWORKS_EXCLUSIVE=(wlan0 wep ethernet)

accomplish that would not be accomplished by

NETWORKS=(wlan0 wep ethernet)

?

Offline

#114 2008-04-02 07:09:32

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

Re: netcfg v2.0.6

Your method could get you 3 IP addresses if you're able to connect to all three profiles at the same time.

The EXCLUSIVE (in rc.conf or inside the profiles) method will stop connecting to profiles once 1 connection is established.

I hope it's clear now.

Zl.

Offline

#115 2008-04-03 16:00:12

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

Re: netcfg v2.0.6

Auto-wireless was driving me crazy for a while now, because it always connected me to my neighbours network and not to mine. Here is how it looked like:

Me:   profile name: ahb   SSID: pozilei
Neighbour:   profile name: hxo   SSID: HNXEOT

I thought, maybe it has something to do with alphabetical order of SSID, so I changed mine to bergwerk, but still my neighbour's network came up with auto-wireless. So I changed it to ANHEBT, and now it actually connects my own network first.

But why is that? I can't really see the logic behind it.
And also: wouldn't it make sense to introduce a new parameter in the profiles, something like FIRSTCHOICE="yes"?
Or (even better): couldn't the logic behind all this be changed to connect to the strongest network available?

Offline

#116 2008-04-06 03:21:19

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 265

Re: netcfg v2.0.6

I've written a script /usr/bin/netcfg-auto-ip to solve this problem.
ref: http://bbs.archlinux.org/viewtopic.php?pid=351894

dlin wrote:

Hi, I'm trying the netcfg v2.0.6-1 today.
I wish it could auto-detect my ethernet settings.
In my office A, it is static ip 192.168.1.123
In my office B, it is static ip 192.168.3.124
In my home, it is dhcp.
In coffee shop, it is wireless auto-detect.

Is there any good example to let it work?

I'v tried put
NETWORKS=(office_a office_b ethernet auto_wireless wlan0).
But, it said I put the duplicate eth0. in office_a and office_b.

So, if it possible to add a ping gateway method to auto-detect which static ethernet is connected?


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages

Offline

#117 2008-04-08 16:32:54

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

Re: netcfg v2.0.6

Ok, now wireless works pretty ok. Found a madwifi driver that i compiled and put into kernel, but I presume there is something with /etc/rc.d/net-profiles. Running /etc/rc.d/net-profiles home fails, but running netcfg2 home it works. So the best is probably to hash all net-profiles in rc.conf and become superuser after boot up and start wireless with 'netcfg2 home'. Same with my wep setup. Works only with 'netcfg2 wep'.

I wonder if my /etc/rc.d/net-profiles is correct.

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
    start)
        if ! ck_daemon net-profiles; then
            echo "net-profiles has already been started.  Try '/etc/rc.d/net-pr$
            exit
        fi

        # Ensure any device renaming has occurred as intended
        for daemon in "${DAEMONS[@]}"; do
            if [ "$daemon" = "${daemon#!}" -a "$daemon" = "net-rename" ]; then
                if ck_daemon net-rename; then
                    /etc/rc.d/net-rename start
                fi
          fi
        done

        # $NET env var is passed from the kernel boot line
        [ ! "$NETWORKS_MENU_TIMEOUT" ] && NETWORKS_MENU_TIMEOUT=5

        if [[ "$NET" = "menu" ]]; then
                /usr/bin/netcfg-menu $NETWORKS_MENU_TIMEOUT
        elif [[ "$NET" ]]; then
                /usr/bin/netcfg2 -c $NET
        else
            # No NET= passed at boot, go to NETWORKS=()
            for network in ${NETWORKS[@]}; do
                case $network in
                    menu) # Pull up menu of networks
                        /usr/bin/netcfg-menu $NETWORKS_MENU_TIMEOUT
                        ;;
                    auto-*) # Automatic configuration, store type and get inter$
                        auto=$network
                        ;;
                    *) # Either interface or profile
                        if [[ "$auto" ]]; then # Auto set, so interface
                            /usr/bin/netcfg-$auto $network
                            unset auto
                        elif [ "$network" = "${network#!}" ]; then # otherwise $
                            /usr/bin/netcfg2 -c $network
                        fi
                        ;;
                esac
            done
        fi

        add_daemon net-profiles
        ;;
    stop)
        # shutdown any profiles started by netcfg (or from NET_PROFILES in rc.c$
        /usr/bin/netcfg2 -a
        rm_daemon net-profiles
        ;;
    restart)
        $0 stop; sleep 1; $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
esac

# vim: set ts=4 et sw=4:

Offline

#118 2008-04-09 01:13:28

mflash
Member
From: Brazil
Registered: 2008-04-09
Posts: 3

Re: netcfg v2.0.6

Hello guys,

Sorry but I still don't get it: how NETWORKS_EXCLUSIVE is supposed to work, as it's not checked anywhere in
/etc/rc.d/net-profiles ? The only reference to it is in /usr/lib/network/network.subr, but as far as I understood
the script, that only runs IF netcfg2 is executed first. So if I replace NETWORKS with NETWORKS_EXCLUSIVE
on rc.conf, no network connection is ever attempted...

Could someone correct me if I missed something ?

Nevertheless, netcfg2 is a big step up. Keep up the great work!

Offline

#119 2008-04-09 08:47:18

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

Re: netcfg v2.0.6

Doesn't work for me either. Neither does NETWORKS=()

Only thing that works is doing netcfg2 PROFILE

I have net-profiles in the daemons array, but all NETWORKS profiles in rc.conf hashed (#). Main thing it works, but i agree netcfg2 information is sparsely planted - hehe.

Offline

#120 2008-04-12 11:52:33

mini
Member
Registered: 2006-12-18
Posts: 132

Re: netcfg v2.0.6

I have used autowifi on my laptop HP6910p, and it worked correctly.
Today I installed netcfg and it starts on boot, but when i try reboot my linux freezes. My wireless device is:

Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection

Offline

#121 2008-04-12 15:58:36

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: netcfg v2.0.6

linfan: when you added net-profiles to the daemons array, did you remove the old network(s?) from the same array?

Offline

#122 2008-04-13 07:17:31

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

Re: netcfg v2.0.6

Yes, Sir, I sure did smile

I think I got it working now. (Knock, knock....) Added the TIMEOUT from 20 to 40 in the profile.

Offline

#123 2008-05-02 14:54:02

b9anders
Member
Registered: 2007-11-07
Posts: 691

Re: netcfg v2.0.6

That is what I would like, a setup where it first checks for a wired connection, then for my pre-configured wireless and if not then scan for any open networks around and connect to that. Three obstacles to this setup for me though:

Problem #1: Making profiles exclusive

I have this in my rc.conf:

#NETWORKS_EXCLUSIVE=(wired 2a auto-wireless wlan0)
NETWORKS=(wired 2a auto-wireless wlan0)

When I try the NETWORKS_EXCLUSIVE, nothing happens. The daemon starts, but there's no connection.
with 'NETWORKS', it checks them in the order given, but it does not respect the

EXCLUSIVE=yes

line I've added to the 'wired' profile.

Is this a bug or am I doing something wrong here?

Problem # 2: Wpa doesn't work

When I try to connect to the 2a network, I get this:

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

the profile looks like this (hidden essid btw):

CONNECTION="wireless"
DESCRIPTION="wireless på 2a"
INTERFACE=wlan0
SCAN="no"
SECURITY="wpa"
ESSID="RHK2A"
KEY="I could tell you, but then I'd have to... nevermind"
IP="dhcp"
TIMEOUT=20

and I am using the iwlwifi-3945-ucode driver. Any clues as to what to do here?

Problem 3: Connecting to any given unprotected network

Zenlord wrote:

zenlord wrote:

The auto-wireless script will try all profiles that are bound to the interface you specified. Nothing more, nothing less. If you configure a global wireless profile (f.e. one without WEP or WPA(2), with DHCP="YES" and with SCAN="yes"), then the auto-wireless script will try all profiles (alphabetically?), including this one.

About the global profile, could I put something in ESSID to make it choose whatever is available (or simply comment it out)? What about the KEY field when security is set to 'none'? I have guesstimated it to look something like this but I don't know if it's right (can't test it right now)

CONNECTION="wireless"
DESCRIPTION="Connects to any unprotected network"
INTERFACE=wlan0
SCAN="yes"
SECURITY="none"
#ESSID=""
#KEY=""
IP="dhcp"
TIMEOUT=20

Offline

#124 2008-05-11 04:39:23

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: netcfg v2.0.6

Can you do bonding with netcfg2? http://www.linux.com/feature/133849

Offline

#125 2008-05-11 08:17:09

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: netcfg v2.0.6

Haven't done it, but a quick glance at your link suggests that you could put the necessary ifenslave etc stuff in PREUP, and then use bond0 in your profile.

Offline

Board footer

Powered by FluxBB