You are not logged in.

#76 2008-03-21 13:09:56

schimpfj
Member
From: Frankfurt, Germany
Registered: 2007-08-15
Posts: 53

Re: netcfg v2.0.6

Apology

Offline

#77 2008-03-21 13:24:09

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

Re: netcfg v2.0.6

The setup is really simple:
a/ install netcfg2 via pacman

b/ rc.conf:
1. comment out everything that is related to your network (interfaces, gateway, network in MODULES etc)
2. add: NETWORKS=(wired auto-wireless eth1)
3. add in MODULES=(): 'net-profiles'

c/ Then, add profiles in /etc/network.d/ (at least one called 'wired' because that profile will be loaded because of step b/2).
To do this, you can look up the examples in that folder, change them to your needs and then save them.

Reboot and behold.

Zl.

Last edited by zenlord (2008-03-21 13:25:40)

Offline

#78 2008-03-21 17:33:40

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

Re: netcfg v2.0.6

I have a question about the ntcfg2 concerning the gateway that i seem to get problems...If i keep the network daemon to load my ethernet connection and have set a default gateway netcfg2 fails  for my wireless and says "Adding gateway 10.10.10.1 failed "

Now if i comment the line GATEWAY from my wireless profile in /etc/network.d/ it loads correctly but when i want to use the wireless connection i have to add manually the gateway so my wireless connection can reach the router .... Any idea ? (it is the same gateway for both ethernet and wireless connection by the way)

Of course if i use netcfg2 for both connections i get again the same problem for the second profile that loads in the (NETWORKS)=(eth0 wlan0)

:: wpa up                                                                                    [BUSY] SIOCADDRT: File exists
           - Adding gateway 10.10.10.1 failed                                                [FAIL]

So wlan0 still does not get up ...

Any help ?


zenlord wrote:

The setup is really simple:
a/ install netcfg2 via pacman

b/ rc.conf:
1. comment out everything that is related to your network (interfaces, gateway, network in MODULES etc)
2. add: NETWORKS=(wired auto-wireless eth1)
3. add in MODULES=(): 'net-profiles'

c/ Then, add profiles in /etc/network.d/ (at least one called 'wired' because that profile will be loaded because of step b/2).
To do this, you can look up the examples in that folder, change them to your needs and then save them.

Reboot and behold.

Zl.

A small correction if someone read what you posted ...The bold one should be DAEMONS=

Last edited by Xerion (2008-03-21 17:37:29)

Offline

#79 2008-03-25 14:36:15

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

Re: netcfg v2.0.6

I have a wifi card WL-107G (chipset RaLink RT2500). Few months ago I've modified the script netcfg from the old package initscripts by adding the line

eval $PRE_UP || return 1

just before the line

if [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ]; then

Here is my network profile from /etc/network-profiles:

DESCRIPTION="Wireless Network Profile"
INTERFACE=ra0
HOSTNAME=turtle
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
ESSID=pointer
IWOPTS="mode managed essid $ESSID"
WIFI_WAIT=5
USEWPA="no"
PRE_UP="/usr/local/bin/pointer"

and the script 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

The modified script netcfg connects to my router without any troubles. Unfortunately, I cannot connect
by using the new script netcfg2. Here is my new 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
IWOPTS="mode managed essid $ESSID"
SCAN="yes"
SECURITY="none"
PRE_UP="/usr/local/bin/pointer"
TIMEOUT=20

May be someone could help with this problem?

Offline

#80 2008-03-26 09:29:33

catwell
Member
From: Bretagne, France
Registered: 2008-02-20
Posts: 207
Website

Re: netcfg v2.0.6

Nice tool. I still get this when using it with a wpa_supplicant network :

ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: no IPv6 routers present
wlan0: deauthenticate(reason=3)

but I think this is me who misconfigured something (I'm using iwlwifi).

Just a little detail though, the colors of the output are strange on a white background (see this), I think it should use standard foreground / background colors instead of white and black.

Offline

#81 2008-03-27 15:35:14

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

Re: netcfg v2.0.6

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

#82 2008-03-27 16:30:44

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

Re: netcfg v2.0.6

maybe as a temporary solution, you can add the menu, to select the proper connection smile

Offline

#83 2008-03-27 20:22:34

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

Re: netcfg v2.0.6

Hi!

Thanks for the many tips in here. The wiki was too hard for me to follow smile It is too general, it should be more propedeutic. Something like - 1) pacman Sy netcfg, 2) cp file from examples..., 3. Edit rc.conf remove network from daemons or put ! in front of it and add net-profiles etc... 4) add NETWORKS=() to rc.conf...

But now to my questions:

1) NETWORKS=("auto-wireless <interface>" ipw0 ethernet)? Why are the quotes there?
2) What does auto-wireless mean? Is it a third profile from /etc/network.d/examples?
3) Does it matter where the auto-wireless is placed.

My rc.conf looks like this: NETWORKS=(wlan0 ethernet)

If I were to add this mysterious auto-wireless what would it do? And where should it be put? And how should it be layouted?

NETWORKS=("auto-wireless wlan0" ethernet) or NETWORKS=(auto-wireless eth0 ethernet) or NETWORKS=(wlan0 auto-wireless ethernet) or NETWORKS=(wlan0 "auto-wireless ethernet") .... the combinations are endless.

Thankful for some clarification that a person who is not studying computer sciences would be able to follow.

Regards,

linfan

Offline

#84 2008-03-27 20:59:38

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

Re: netcfg v2.0.6

I think at first I had the same problem as you smile This thread helped me.
So:
First:
AFAIK quotes are unnecessary. At least in my configuration.
Second:
auto-wireless scans for networks that were defined in the /etc/networks.d/ directory. Take a look at the example files. There is a key called SSID or so, which is what auto-wireless is going to try to match. auto-wireless is non functional if you don't have a profile set in that directory.
So let's assume you have created a profile in /etc/network.d/, e.g. /etc/network.d/work
Then you put into your rc.conf:

NETWORKS=(auto-wireless wlan0)  #according to you post

Now what auto-wireless tries to do is match a scan of the network SSIDs against the ones you put into your /etc/network.d/work profile. If you are NOT at work, it will fail of course.
Now to get your ethernet working, you create another profile in /etc/network.d/, e.g. /etc/network.d/ethernet
Then you will put into your rc.conf:

NETWORKS=(auto-wireless wlan0 ethernet)  #according to you post

Then netcfg2 will try to start you wireless (with auto-wireless) AND the ethernet stuff.

You can put as many wireless profiles in /etc/network.d/ as you want, e.g. one for home, internetcafe etc.. netcfg2 will parse them and try to match at least one of them (and then stop). The fun thing is that you only need that one last line above in your rc.conf, and everything will be good.

Hope that helps.
Blind

Offline

#85 2008-03-27 21:05:53

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

Re: netcfg v2.0.6

Come to think of something, iphitus.
Why not try to do something like:
NETWORKS = (auto wlan0 eth0)
That would be the ultimate solution, no?
Have all the profiles you need in /etc/network.d for both wireless and ethernet...

[edit]
Mmh. Maybe not. I was a little too enthusiastic here big_smile
[/edit]

Last edited by Blind (2008-03-27 21:07:34)

Offline

#86 2008-03-28 01:42:58

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

Re: netcfg v2.0.6

Stoffi wrote:

maybe as a temporary solution, you can add the menu, to select the proper connection smile

Thanks that is my currently method to solve this problem.

But, is there any plan to do that auto detect?


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

Offline

#87 2008-03-28 06:37:07

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

Re: netcfg v2.0.6

Thanks Blind, but it doesn't seem to work here. Maybe the quotes have some function after all. I only get it up if I have one profile in networks. So I will try to do it like this:

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

Then I can edit rc.conf depending on which profile I need.

Offline

#88 2008-03-28 07:29:12

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

Re: netcfg v2.0.6

my networks line is like this:
NETWORKS=(think-net kabel)
if you don't need auto wireless, then you can just ignore it.
I think it's placement matters, but you could try this:
NETWORKS=("auto-wireless wlan0" ethernet)
where wlan0 is your wireless interface.

also, it says in the wiki, that if you add SCAN="yes" in the wireless profile,
you don't need the auto-wireless. this could explain why you can't get it
to work with more than one profile in the line.

@dlin: you have to ask iphitus about that.

Last edited by Stoffi (2008-03-28 07:30:01)

Offline

#89 2008-03-28 08:53:17

schimpfj
Member
From: Frankfurt, Germany
Registered: 2007-08-15
Posts: 53

Re: netcfg v2.0.6

I have to second the dhcp issue - upon startup wlan0 does not get an ip address from my wlan router (timeout) but once the system has fully started and I have logged on (KDE) I can do a

sudo /etc/rc.d/net-profile stop
sudo /etc/rc.d/net-profile start

and an ip address is allocated almost immediately.
What is really weired: It used to work ok right after I had configured netcfg and my wlan router. Since two or three days it has ceased working and only works upon manual start. I am not 100% sure anymore, but I believe there was a pacman system update in between, possibly removing some net init scripts, but I might be wrong on this...

Offline

#90 2008-03-28 09:22:28

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

Re: netcfg v2.0.6

Thanx Stoffi smile That explains a lot. I have SCAN=yes in my profiles, so I will not add auto-wireless to rc.conf.

But it would be nice to get a little essay about the use of quotes wink

If auto-wireless just replaces SCAN="yes", why not just call it autoscan or auto-networkscan or something similar?

Offline

#91 2008-03-28 10:03:26

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

Re: netcfg v2.0.6

linfan,

inside NETWORKS(), you ONLY put name(s) of the profiles you placed inside /etc/network.d/ - with the exception of:
- menu (gives a menu to chose 1 profile)
- auto-wireless (which has to be followed by the interface you want to automate)

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.

The order in which you define NETWORKS=() is not important, because all specified profiles will be used, unless you use the EXCLUSIVE-option. If you use it inside rc.conf, then netcfg2 will stop trying profiles if 1 connection is successfully set. If you use the option inside one or more profile(s), than netcfg2 will stop trying profiles after one of the exclusive profiles is connected successfully.

I hope this sheds some light smile

Zl.

Offline

#92 2008-03-28 10:17:38

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

Re: netcfg v2.0.6

make an addition to the wiki please, if only a small one smile

Offline

#93 2008-03-28 14:15:21

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

Re: netcfg v2.0.6

- menu (gives a menu to chose 1 profile)

do you mean

NETWORKS=(menu wlan0 wep ethernet)

will I be prompted during bootup to choose either or?

I am lousy at applying theory to practice - lol

It would help a lot if all theoretical hints would be exemplified.

Offline

#94 2008-03-28 14:37:37

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

Re: netcfg v2.0.6

Well, that's where you have to take the jump. Just try it out and if you messed up, the only problem is your network won't work. So reverting back to the old settings is enough to take another look in the wiki or this thread smile

NETWORKS=(menu) is enough to get to choose between all profiles in your folder. Or you can just type 'netcfg-menu' (according to the wiki...)

Zl.

Offline

#95 2008-03-28 14:50:21

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

Re: netcfg v2.0.6

What magnificient wiki are you all talking about? I can only find a lousy wiki called Network Profiles that contains none of the things discussed in here.

But thanks any way - will immediately try with only NETWORKS=(menu)

Offline

#96 2008-03-28 14:58:47

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

Re: netcfg v2.0.6

that is the correct wiki-page, yes. the menu part is written at the bottom, under FAQ.
some of the things discussed here is missing from the wiki, true, but that is why I asked
zenlord to make an addition to the wiki with what he(?) just wrote here wink

Offline

#97 2008-03-28 15:32:47

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

Re: netcfg v2.0.6

Hehe smile

Ok, I think we do need good documentation. For example this "SCAN" thing. I am confused now.
If I want to use auto-wireless, do I put SCAN="yes" or SCAN="no"?

For me, my home profile worked with SCAN="yes" - was that a mistake? Then again, my work wireless never really worked (I blamed it on our admin), but I didn't care because I have an ethernet cable that works...

Cheers,
Blind

Offline

#98 2008-03-28 15:42:40

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

Re: netcfg v2.0.6

I think that if you use auto wireless, then the SCAN= value doesn't matter, but that is a pure guess.

Offline

#99 2008-03-28 16:14:21

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

Re: netcfg v2.0.6

Ok, nice smile I guess I am starting to get a hunch of the netcfg2 little by little.

So now I succeeded in getting menu to work during bootup.

Maybe the auto-wireless is similar, maybe that hyphenated word is all you need:

NETWORKS=(auto-wireless)

and then it will go thru /etc/network.d/ and check if there might be any profile to connect to.

Offline

#100 2008-03-28 21:18:35

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

Re: netcfg v2.0.6

Nope, that was definitely wrong. I do not understand the auto-wireless.

I am now in a third geographic location with the laptop and there is something that gets screwed up. It looks like some lease failure on the routers. I have to restart net-profiles endless times and restart routers etc. before I get connected. Don't know where to look for errors. Over all it works, but almost never with first try or on fresh reboot.

/var/log/messages.log gives

--------
Mar 28 21:50:31 sawerlap dhcpcd[5281]: eth0: checking 192.168.0.100 is available
on attached networks
Mar 28 21:50:32 sawerlap dhcpcd[5281]: eth0: leased 192.168.0.100 for 604800 sec
onds
Mar 28 21:50:32 sawerlap dhcpcd[5281]: eth0: adding IP address 192.168.0.100/24
Mar 28 21:50:32 sawerlap dhcpcd[5281]: eth0: adding default route via 192.168.0.1 metric 0
Mar 28 21:50:32 sawerlap dhcpcd[5281]: eth0: exiting
Mar 28 21:50:33 sawerlap Clocksource tsc unstable (delta = -151910504 ns)
Mar 28 21:51:32 sawerlap dhcpcd[5282]: eth0: renewing lease of 192.168.0.100
Mar 28 21:51:32 sawerlap dhcpcd[5282]: eth0: leased 192.168.0.100 for 604800 seconds
---------------

Offline

Board footer

Powered by FluxBB