You are not logged in.

#26 2008-02-21 10:43:43

Preacher
Member
From: UK
Registered: 2006-09-26
Posts: 46

Re: netcfg v2.0.6

Was not a believer of this tool a couple months ago...  Now I believe!


To be a preacher requires two apparently contradictory qualities: confidence and humility.

Offline

#27 2008-02-23 16:11:29

pebo
Member
Registered: 2007-09-13
Posts: 15

Re: netcfg v2.0.6

--- netcfg2.orig    2008-02-23 17:01:22.000000000 +0100
+++ netcfg2    2008-02-23 17:03:35.000000000 +0100
@@ -30,6 +30,7 @@
     echo "      Other functions:            netcfg argument profile"
     echo "Arguments:"
     echo "-c, check-iface    Do not start profile if interface is already up"
+    echo "-r, reload         Reload specified profile"
     echo "-d, down           Take specified profile down"
     echo "-a, all-down       Take all active profiles down"
     echo "-i, iface-down     Take down profile active on specified interface"
@@ -58,6 +59,10 @@
         killall wpa_supplicant
         killall dhcpcd
         ;;    
+    -r|reload) 
+        profile_down $2
+        profile_up $2
+        ;;
     -d|down) 
         profile_down $2;;
     -i|iface-down)

This was useful to me while testing new profiles.

The dns-settings specified in the profile do not override the dns-settings received from the dhcp server, correct?
Is it possible to configure multiple interfaces within a profile?

Offline

#28 2008-02-23 20:35:41

kozzi
Member
Registered: 2006-06-24
Posts: 16

Re: netcfg v2.0.6

I see netcfg uses net-tools. it isn`t goog idea. ifconfig is obsolete. I thing It`d be rather use iputils?


Linux je jako mušketýři "jeden za všechny, všichni za jednoho"

Offline

#29 2008-02-24 20:46:40

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: netcfg v2.0.6

zenlord wrote:

I guess it is possible. You should just make 4 profiles with the correct settings and put all the profiles in NETWORKS() in rc.conf. Upon startup, netcfg2 will search for all profiles and connect to the one(s) that is/are available. If you can connect to more than one network on one location, than you should look into the EXCLUSIVE-option, new in version 2.0.6.
One thing that is not yet possible is to automatically make arch switch profiles when changing locations, but that is only a 'problem' ($ su / # netcfg <profile>) if you are on the move and change locations without shutting down arch. But Iphitus has made a TO-DO out of the documentation of a possible netcfg-menu, which should allow a list of networks to chose from in the line of wicd/networkmanager (but far superior of course wink)
Zl.

i sort i have it half working. I can connect wireless and wired manually through the "netcfg2 <profile>" command but for the life of me i cannot get it working at boot time. I have tried enabling disabling interfaces but it doesnt help. If I have eth0 enabled at boot time i have a 45 second timeout when connected wireless and neither setting starts wireless at boottime.

What should be the correct setting  in the rc.conf to have this working properly, ie connecting the profile I am currently at automatically but without big delays. Should network be enabled? should the interfaces? Is it correct that the default setting NETWORK_PROFILES=() should be changed to NETWORKS=()?

<code>
eth0="dhcp"
INTERFACES=(!eth0)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
#
NETWORKS=(auto-wireless wireless_dhcp wired_dhcp)
</code>

thanks a lot for any assistance you can give me,
stefan


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#30 2008-02-25 09:08:26

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

Re: netcfg v2.0.6

stefan1975 wrote:

<code>
eth0="dhcp"
INTERFACES=(!eth0)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
#
NETWORKS=(auto-wireless wireless_dhcp wired_dhcp)
</code>

In your NETWORKS(), you didn't specify the interface for the auto-wireless script. If you use the aut-script, you have to pass it the interface. I assume 'wireless_dhcp' and 'wired_dhcp' are your profiles.

It should be (if I'm not mistaken - at work now):

#eth0="dhcp"
#INTERFACES=(!eth0)
#gateway="default gw 192.168.0.1"
#ROUTES=(!gateway)

NETWORKS=(auto-wireless eth0 wireless_dhcp wired_dhcp) # assuming 'eth0' is your wireless interface and you can also remove 'wireless_dhcp' because the auto-script will use the wireless interface automatically

DAEMONS=(... net_profiles ...) # so no 'network' anymore

HTH

Zl.

Offline

#31 2008-02-25 11:41:36

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: netcfg v2.0.6

Hi,

thanks for the quick reply. i am a step further now. the network now starts at boottime (although it is net-profiles and nod net_profiles i noticed).

I did notice however that it now tries to start ALL networks mentioned in NETWORKS=(). Even when it succesfully connects wired it still scans for wireless networks (which eventually fails at my wired location). I would prefer it that it tries connecting to just one network and then stops since it nearly doubles my startup time.

Further I noticed that connecting a wired dhcp connection this way takes (much) longer then "the old way" with eth0="dhcp" .... is there a reason for this?

thanks again,
stefan

Last edited by stefan1975 (2008-02-25 11:42:04)


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#32 2008-02-25 11:49:35

Venator85
Member
From: Italy
Registered: 2007-10-18
Posts: 62

Re: netcfg v2.0.6

stefan1975 wrote:

I did notice however that it now tries to start ALL networks mentioned in NETWORKS=(). Even when it succesfully connects wired it still scans for wireless networks (which eventually fails at my wired location). I would prefer it that it tries connecting to just one network and then stops since it nearly doubles my startup time.

You may want to try the patch I wrote (here)
Personally I use NETWORKS=(wired-dhcp auto-wireless wlan0)
so it tries the wired first, and on failure tries wlan. I don't need as well to be connected with both wired and wlan.
Bye wink

Offline

#33 2008-02-25 15:03:08

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

Re: netcfg v2.0.6

stefan1975 wrote:

I did notice however that it now tries to start ALL networks mentioned in NETWORKS=(). Even when it succesfully connects wired it still scans for wireless networks (which eventually fails at my wired location). I would prefer it that it tries connecting to just one network and then stops since it nearly doubles my startup time.

If you don't want to use the patch by Venator85: Iphitus seems to be looking for another way to accomplish this, but in the mean time you can easily use NETWORKS_EXCLUSIVE() instead of NETWORKS()

Zl.
PS: I noticed a short delay in the startup-sequence, but is not that big a deal. You can put an '@' before net-profiles to make it a background process and not hinder the rest of your startup-sequence...

Offline

#34 2008-02-26 12:17:58

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

Re: netcfg v2.0.6

I am thinking that Wicd can be the complementary GUI to netcfg2 because it uses ifconfig. It has few dependencies satisfying the Arch Way. It does not require changes to rc.conf ( !eth0 !eth1 ) like NetworkManager. It can coexist. If I use netcfg2 to up/down a profile, Wicd detects it and adjust the GUI accordingly. If I use Wicd to disconnect, netcfg2 does not detect it. It still thinks the profile is up. A test needs to be written for netcfg2 to check if the profile is truly up. If I turn off wifi via the laptop button, the profile is not up. Wicd also has the ability to run scripts before connection, at connection, at disconnection. It can inform netcfg2 that it connected, and netcfg2 can adjust which profile is up/down.

Last edited by SpookyET (2008-02-26 12:20:48)

Offline

#35 2008-02-26 19:18:03

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: netcfg v2.0.6

well it still isnt working perfectly over here. By adding auto-wireless wlan0 to my rc.conf it now at least attempts to start wireless and my wired starts fine when connected. I have accepted (for now) the wireless timeout when connected wired.

however somehow my wireless network (unprotected) will not connect at boottime, when i start it manually later however is connects fine. this is really odd.

root /etc/network.d #  netcfg2 steflan
:: steflan up                                                                                                                         [BUSY] err, wlan0: timed out
               - DHCP IP lease attempt failed                                                                                         [FAIL] 
root /etc/network.d #  netcfg2 steflan
:: steflan up                                                                                                                         [DONE] 
root /etc/network.d #

stefan


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#36 2008-02-26 23:11:12

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: netcfg v2.0.6

I have been having a similar problem... my wireless fails with the same error.
It boots and then after a while the wireless fails with a timeout - DHCP IP lease attempt failed

If I try 6 or 7 times then it will connect and stay connected just fine but the next time I boot ... same story.

It was working fine for awhile so I'm not sure where the problem is.

R.

Offline

#37 2008-02-28 00:52:02

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: netcfg v2.0.6

OK, I had an interesting break through last night... I'm shearing here so may be some of the people that are having similar problems may benefit.
I also, out of this experience, have now some suspicions that the time-out and DHCP IP lease attempt failed we are experiencing may in actual fact be related to netcfg2.

Background:

I have had problems getting an IP lease for the last while. Prior to the last update of netcfg2 it used to be a struggle too but I would get a connection if I extended the TIMEOUT from 10 to 40 or 50.

After the last upgrade I consistently got the dreaded "DHCP IP least attempt failed" message. Even if I extended the TIMEOUT up to 120!! However, if I kept on insisting I would eventually (after 7 or 8 attempts -- that's almost 10 min! to log in --) get a connection.
The connection would be 100% stable after I got the IP lease.
In a couple of occasions, after I connected, the link was broken but the wireless re-connected in under 3 secs. and that got me thinking ... AFTER I gained an IP the system was very responsive to keeping it, so I decided to make the IP of my machine static.

Outcomes

I altered my configuration as follows:
1.  Set my DHCP server for Static DHCP, so when the server "sees" a certain hardware address it automatically assigns a specific IP to it.

2. Changed my profile as shown below:

CONNECTION="wireless"
INTERFACE="wlan0"

# Use Static IP
IP="static"
IFOPTS="192.168.1.22 netmask 255.255.255.0 broadcast 192.168.1.255"
GATEWAY=192.168.1.1

# Standard wireless settings
ESSID="ITTwo-wifi"
SECURITY="wpa"
KEY="2W+igMir@D^of**"
IWOPTS="mode managed essid $ESSID key restricted $KEY"

#Scan network before connecting
SCAN="YES"
TIMEOUT="20"

Then rebooted the laptop, just to have a real "cold boot" test and ... it connected in about 3 secs!!  I thought it was a luck shot, so I did it again and it did its magic as before, so I can confirm that it works.

Conclusion

The negotiation of an IP seems to be the  problem, if the IP is readily available (DHCP server setup  for Static DHCP) there is no struggle and the connection is almost instantaneous. If the other forum members can solve their time-out/IP lease problems whit these changes we could safely conclude that netcfg2 takes too long to negotiate for the IP and therefore we get a time-out and the lease fails.

iphitus, any way we can test if that is in fact the case?

Thank you all. I hope this information will be of help.

Ricardo

Offline

#38 2008-03-01 10:53:33

stavrosg
Member
From: Rhodes, Greece
Registered: 2005-05-01
Posts: 330
Website

Re: netcfg v2.0.6

I finally got to install it today.
Finally, my rt73usb comes up without manual intervention!
Thanks iphitus! big_smile

Offline

#39 2008-03-02 08:10:40

NoOneImportant
Member
From: Deep Southern California
Registered: 2007-02-13
Posts: 178

Re: netcfg v2.0.6

Hi, I'm new to netcfg2 and I have a question.

I know that IWOPTS allows you to set parameters with iwconfig, but is there something I can use so that I can enter parameters with iwpriv? Perhaps an IWPOPTS?

[edit]I ask since, for some reason, my wlan device only allows iwpriv for setting the essid. scanning, etc (although viewing stats with iwconfig is supported).

Last edited by NoOneImportant (2008-03-02 08:15:10)

Offline

#40 2008-03-02 09:50:01

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

Re: netcfg v2.0.6

Sorry if I've given you a canned response below, I've just added them to the wiki, so I didn't expect you to find them.

To those who had success, thanks smile It's really good to hear.

And if I missed anyone -- oops, sorry.

Blind: There's nothing in this release that should cause that. Probably a kernel issue. If the drivers aren't ready, have netcfg run later.
The output you show me looks like you've got a broken config. Check for mismatching quotes and things, but I'll take a look.

quad3d@work: there's a TIMEOUT= option available so you don't need to edit the sleep there.

ralvez: For wireless association failed: http://wiki.archlinux.org/index.php/Net … ion_failed
For DHCP IP lease attempt fail... that's odd. I hate that error, because there's rarely a clear reason. Given you're also getting association errors, It's probably range or driver fault.

It isnt the last update that caused it... there's no changes that I can see that could cause it.


SpookyET,n8schichtA menu of available networks would be _really_ easy to do, though I have no interest in doing it. Look at netcfg-menu, and the reusable code in /usr/lib/network/wireless.subr

iggy Regarding those two profiles... that's odd. Not sure what could be causing that, i'll have a look.

stefan1975Sure. It can be done. Install it, read the documentation and look at the example configs. netcfg shouldnt give you long timeouts on ethernet connections as it checks for a cable first

blixawillbargeld:

pebo Thanks for the patch, will add next version. DNS settings in profile override the DHCP dns settings. No, not presently possible to do multiple interaces in a profile, but I welcome anyone that wants to try and set it up.

kozziNo. ifconfig isn't obsolete and isnt going anywhere in a hurry. Besides, netcfg2 isnt an ideal solution, "netconf" is. http://linux.conf.au/programme/detail?TalkID=72

NoOneImportantYou got one of those realtek cards and using the old driver? I have no intention of supporting those ever seeing as the driver will be replaced by rt2x00. Although, as a workarund you could do all of the association in a shell script and refer to it in PRE_UP.

Offline

#41 2008-03-02 10:18:31

NoOneImportant
Member
From: Deep Southern California
Registered: 2007-02-13
Posts: 178

Re: netcfg v2.0.6

iphitus wrote:

NoOneImportantYou got one of those realtek cards and using the old driver? I have no intention of supporting those ever seeing as the driver will be replaced by rt2x00. Although, as a workarund you could do all of the association in a shell script and refer to it in PRE_UP.

Nah, it's a card that uses rt2870 (not yet supported by rt2x00). I was finally able to compile a native version. Although it's still in active development, the devs at ralink seem prefer using iwpriv for settings (there's even a iwpriv usage document that comes with the driver source).

I'll check out PRE_UP though.

Offline

#42 2008-03-02 12:23:43

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

Re: netcfg v2.0.6

Oops. Ralink smile That was the one I meant though.

Offline

#43 2008-03-02 16:10:01

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: netcfg v2.0.6

@iphitus,

Thanks for the answer, appreciate it.
I did try what is indicated in that thread already. It may be driver related, I have considered that too, but if it is; it surely is very selective as to how to fail because if I give my pc a static address it connects via wifi in under 3 secs.
See my point?  The association only fails *if* I let DHCP handle the whole transaction otherwise it behaves as expected.
That's why I thought that if there is a way for me to track the transaction (I'm totally new to the wifi thing ;-) ) I can try to determine where the problem is. Then again may be there is no such tool ....

Ricardo

Offline

#44 2008-03-04 23:53:50

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

Re: netcfg v2.0.6

ralvez wrote:

@iphitus,

Thanks for the answer, appreciate it.
I did try what is indicated in that thread already. It may be driver related, I have considered that too, but if it is; it surely is very selective as to how to fail because if I give my pc a static address it connects via wifi in under 3 secs.
See my point?  The association only fails *if* I let DHCP handle the whole transaction otherwise it behaves as expected.
That's why I thought that if there is a way for me to track the transaction (I'm totally new to the wifi thing ;-) ) I can try to determine where the problem is. Then again may be there is no such tool ....

Ricardo

That's bizarre.

There's nothing at the association stage that even cares whether the IP is static or dhcp, that runs from an entirely different script. Further... the router/driver can't know which you're going to use at the association stage. (unles you're changing a setting on the router as well?)

So it might be a netcfg bug. I'll put some more debug stuff in the next release to see what I can find.

Offline

#45 2008-03-04 23:59:09

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: netcfg v2.0.6

@iphitus,

I'll be happy to do testing if you have any tips I can follow.

R.

Offline

#46 2008-03-05 02:57:24

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: netcfg v2.0.6

i can backup what ralvez is seeing.  upon first connect with netcfg2, i usually receive the "dhcp ip lease attempt failed".  after the first attempt though i am usually able to connect without issue.  i'm seeing this on multiple networks, encrypted and non encrypted, with the iwl3945 driver built into the kernel if that helps at all.  i too will help in any way i can.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#47 2008-03-05 05:36:42

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

Re: netcfg v2.0.6

Do you still receive this error with previous versions of netcfg2? Try what you can, just change the version in the PKGBUILD if you dont have the packages.

Offline

#48 2008-03-07 20:16:59

thejinx0r
Member
Registered: 2008-02-18
Posts: 7

Re: netcfg v2.0.6

Hi,

I'm new to Arch Linux.

netcfg2 at boot didn't work for me originally.
But then I tried somethings around here and it just started working.

What I did was place NETWORKS= right berfore the Daemons= and put a @ infront of net-profiles.
I'm sure it has to do with NETWORKS= because I had it placed after the INTERFACE= and now it works. I still get that error about the IP thing, but when I get in to kde, it works.

[edit] Nevermind, that error I was sayaing was associated with "networks" daemon. When I disabled, that error is gone. So, I think placing "NETWORKS=" at the proper place makes all the difference.



Hope that's going to help someone,
smile

Last edited by thejinx0r (2008-03-07 20:22:19)

Offline

#49 2008-03-08 19:55:54

thejinx0r
Member
Registered: 2008-02-18
Posts: 7

Re: netcfg v2.0.6

Just making sure,
if I have scan=yes in my config file called home,
then I go to work and it has an open wifi,
netcfg2(home) should connect to the wifi network at my workplace then right?

Offline

#50 2008-03-09 12:46:29

Linuturk
Member
From: Panama City, Florida
Registered: 2008-03-04
Posts: 3
Website

Re: netcfg v2.0.6

iphitus:

Sorry about the post in the other thread.

I'm using the madwifi driver. I can connect to my network manually using this command:

# iwconfig ath0 essid "Fleet Command" enc 1234567890
# dhcpcd ath0

I can also iwlist the networks.

Here is my config file for this network:

CONNECTION="wireless"
DESCRIPTION="Fleet Command at home"
INTERFACE=ath0
SCAN="yes"
SECURITY="wep"
ESSID="Fleet Command"
KEY="1234567890"
IP="dhcp"

When I run the following:

#  netcfg2 Fleet_Command
:: Fleet_Command up  - Wireless association failed.                      [FAIL]

This config file, excepting for the interface name, is exactly the same as it was on my last machine. Please let me know about any further information you need.


- Linuturk

Offline

Board footer

Powered by FluxBB