You are not logged in.

#1 2009-01-24 18:10:07

jai134
Member
Registered: 2008-11-26
Posts: 234

netcfg

Hello. I'm trying to use netcfg to connect to the internet. When using iwconfig it's fine.With netcfg I have to do it twice to connect. Why can't netcfg connect the first time. I have had a problem about WIRELESS_TIMEOUT before and if it is that, where can I find the file to correct this?
Jan

Offline

#2 2009-01-24 18:45:52

Duologic
Member
From: Belgium
Registered: 2007-11-11
Posts: 249

Re: netcfg

Maybe post some configuration files so we can see what you are trying to do?

A little tip: install Archassistant from AUR, this made networking easy for me. (It uses netcfg)
When you fix your problem, post the solution too!

Offline

#3 2009-01-24 19:57:42

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: netcfg

Also, please use descriptive thread titles. You're not the only one reading this.

Offline

#4 2009-01-25 08:47:26

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: netcfg

I have an unsecure network. This is rc.conf:
# Wireless: See network profiles below
#
INTERFACES=(wlan0 !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 required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
NETWORKS=(menu)

And this /etc/network.d
CONNECTION="wireless"
DESCRIPTION="Hemnätverket"
INTERFACE=wlan0
SCAN="yes"
SECURITY=""
ESSID="XXXX"
KEY=""
IP="dhcp"
Is that what you need. I have ath5k loaded at boot and net-profiles after network.
I get this errormessage: DHCP IP lease attempt failed. First time I use it from command-prompt. Second time it connects whithout any problem

Offline

#5 2009-01-25 09:01:47

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: netcfg

I think  network is not needed if you are using net-profiles


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#6 2009-01-25 10:53:28

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: netcfg

It made some difference. Now it connected the first time from command-prompt but not during bootup with dialog. This is my modules and daemons array:
MODULES=(mii r8169 ath5k snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd !snd-pcsp snd-hda-intel soundcore)
DAEMONS=(syslog-ng !network net-profiles netfs crond hal fam alsa)

Offline

#7 2009-01-25 12:08:25

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

Re: netcfg

Read the wiki:
http://wiki.archlinux.org/index.php/Net … o_I_do_.3F

it is essential you provide ALL output and config files relevant otherwise the issue cannot be diagnosed.

"it doesnt work" means absolutely nothing.

Last edited by iphitus (2009-01-25 12:09:25)

Offline

#8 2009-01-25 12:20:05

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: netcfg

what is the error you get ? i hope you have dialog installed....and increasing  the timeout value a bit may help


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#9 2009-01-25 18:39:32

ghaad
Member
From: Czech Republic, EU
Registered: 2009-01-23
Posts: 21

Re: netcfg

Hi everybody,
this is my first question in this forum cool

I'm new to archlinux, I think it's the distro I've been looking for (I like configuring everything in text files, simple and straight solutions), BUT I have already some problems.

I'm using madwifi (modules: ath_pci, ath_hal, wlan) and DHCP for connecting to the internet (so I am connecting to my provider over wifi network),

I also get "DHCP IP lease attempt failed" and can't find any solution.

I have this in my "rc.conf" file:

NETWORKS=(mywifi)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
DAEMONS=(syslog-ng network net-profiles netfs crond alsa hal)

(I didn't define INTERFACES, I hope this is OK)

And this in my "mywifi" file (under /etc/network.d/)

CONNECTION="wireless"
DESCRIPTION="My wifi connection"
INTERFACE=ath0
SCAN=no
ESSID=xxxxxxxxxx
DHCLIENT=no
IP="dhcp"
TIMEOUT=25
DHCP_TIMEOUT=25
QUIRKS=(preessid postsleep)

I have already tried another QUIRKS modes, removing DHCLIENT, SCAN=yes, ... nothing helps.

But now comes the interesting thing: although I get the error message at bootup "ath0: timed out, DHCP IP lease attempt failed" I can then log in as root and simply execute "dhcpcd ath0" and some seconds later the connection is up and running.

Can anyone help?


GNUniverse - May the source be with you...

Offline

#10 2009-01-25 19:41:23

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: netcfg

Same for me. Tried to increase timeout but no success. After login it is no problem to connect as root. Can it be a problem with permissions? I will post the output from the link.
Jan

Last edited by jai134 (2009-01-25 19:51:17)

Offline

#11 2009-01-25 19:48:01

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: netcfg

ghaad wrote:

Hi everybody,
this is my first question in this forum cool

I'm new to archlinux, I think it's the distro I've been looking for (I like configuring everything in text files, simple and straight solutions), BUT I have already some problems.

I'm using madwifi (modules: ath_pci, ath_hal, wlan) and DHCP for connecting to the internet (so I am connecting to my provider over wifi network),

I also get "DHCP IP lease attempt failed" and can't find any solution.

I have this in my "rc.conf" file:

NETWORKS=(mywifi)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
DAEMONS=(syslog-ng network net-profiles netfs crond alsa hal)

(I didn't define INTERFACES, I hope this is OK)

And this in my "mywifi" file (under /etc/network.d/)

CONNECTION="wireless"
DESCRIPTION="My wifi connection"
INTERFACE=ath0
SCAN=no
ESSID=xxxxxxxxxx
DHCLIENT=no
IP="dhcp"
TIMEOUT=25
DHCP_TIMEOUT=25
QUIRKS=(preessid postsleep)

I have already tried another QUIRKS modes, removing DHCLIENT, SCAN=yes, ... nothing helps.

But now comes the interesting thing: although I get the error message at bootup "ath0: timed out, DHCP IP lease attempt failed" I can then log in as root and simply execute "dhcpcd ath0" and some seconds later the connection is up and running.

Can anyone help?

Welcome to the forums ghaad. Please don't hi-jack threads. This is about netcfg configuration.

--EDIT--

Maybe it's not any more.

Offline

#12 2009-01-25 20:22:56

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: netcfg

wlan0     Link encap:Ethernet  HWaddr my:hardware:adress
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
iwconfig before connection
wlan0     IEEE 802.11bg  ESSID:"" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   
          Tx-Power=0 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
iwconfig after:
wlan0     IEEE 802.11bg  ESSID:"myessid" 
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1E:52:7B:E0:6B   
          Bit Rate=2 Mb/s   Tx-Power=27 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   
          Encryption key:off
          Power Management:off
          Link Quality=81/100  Signal level:-43 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
output from lsmod-command:
Module                  Size  Used by
ipv6                  260212  10
i915                   58500  2
drm                    83752  3 i915
joydev                 11712  0
uvcvideo               57736  0
compat_ioctl32          3072  1 uvcvideo
videodev               34176  1 uvcvideo
v4l1_compat            15364  2 uvcvideo,videodev
mmc_block              11012  0
psmouse                55828  0
pcspkr                  4352  0
i2c_i801               10896  0
i2c_core               22804  1 i2c_i801
serio_raw               7172  0
sg                     26804  0
video                  18576  0
output                  4608  1 video
uhci_hcd               24592  0
ehci_hcd               36876  0
iTCO_wdt               12836  0
jmb38x_ms              11396  0
iTCO_vendor_support     4996  1 iTCO_wdt
memstick               10652  1 jmb38x_ms
sdhci_pci               9088  0
sdhci                  17028  1 sdhci_pci
usbcore               136976  4 uvcvideo,uhci_hcd,ehci_hcd
mmc_core               46876  2 mmc_block,sdhci
intel_agp              27580  1
agpgart                31572  3 drm,intel_agp
acer_wmi               16320  0
rfkill                 11724  2 acer_wmi
wmi                     7848  1 acer_wmi
thermal                17180  0
evdev                  11296  8
processor              41388  3 thermal
snd_seq_oss            31872  0
fan                     6276  0
snd_seq_midi_event      8192  1 snd_seq_oss
snd_seq                49968  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          8332  2 snd_seq_oss,snd_seq
button                  7824  0
battery                12036  0
ac                      6020  0
snd_hda_intel         411956  0
snd_hwdep               9092  1 snd_hda_intel
snd_pcm_oss            40320  0
snd_pcm                70020  2 snd_hda_intel,snd_pcm_oss
snd_timer              21384  2 snd_seq,snd_pcm
snd_page_alloc         10120  2 snd_hda_intel,snd_pcm
snd_mixer_oss          16512  1 snd_pcm_oss
snd                    50852  9 snd_seq_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_hwdep,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
soundcore               8160  1 snd
arc4                    3712  2
ecb                     4608  2
ath5k                 100864  0
mac80211              161184  1 ath5k
led_class               5508  2 acer_wmi,ath5k
cfg80211               31760  2 ath5k,mac80211
r8169                  33924  0
mii                     6528  1 r8169
rtc_cmos               12332  0
rtc_core               17564  1 rtc_cmos
rtc_lib                 4480  1 rtc_core
ext2                   66184  1
mbcache                 8708  1 ext2
uvesafb                28388  1
cn                      9120  2 uvesafb
sd_mod                 26904  2
ata_piix               23300  1
ata_generic             6788  0
pata_acpi               6016  0
libata                158240  3 ata_piix,ata_generic,pata_acpi
scsi_mod              102036  3 sg,sd_mod,libata
[jan@acerone ~]$

Thats my configs and outputs with rc.conf and network-profile in previous post.
Jan

Offline

#13 2009-01-25 21:36:05

ghaad
Member
From: Czech Republic, EU
Registered: 2009-01-23
Posts: 21

Re: netcfg

Welcome to the forums ghaad. Please don't hi-jack threads. This is about netcfg configuration.

--EDIT--

Maybe it's not any more.

My problem is solved! Yeah! But I really have no idea what happened, I just tried to reboot several times (because I also play around with another config files), and suddenly there is no connection problem any more.


GNUniverse - May the source be with you...

Offline

#14 2009-01-26 08:29:17

ghaad
Member
From: Czech Republic, EU
Registered: 2009-01-23
Posts: 21

Re: netcfg

@jai134

Try to use madwifi instead of ath5k (if madwifi supports your card). Madwifi consists of modules ath_pci, ath_hal and wlan. Then disable ath5k (add a ! in front of it in the MODULES array in rc.conf). Take a look at my config, this now works for me. And maybe I know why I had these strange problems: maybe it doesn't make sense, but I enabled "PCI BusMaster" (or PCI MasterBus) in my BIOS. It was disabled, so I just tried to enable it. But I'm not sure if that was the problem, because I did a reboot several times then.

@skottish

I just thought it would be better to join a running topic instead of creating a new one with the same problem.


GNUniverse - May the source be with you...

Offline

#15 2009-01-26 20:38:31

ghaad
Member
From: Czech Republic, EU
Registered: 2009-01-23
Posts: 21

Re: netcfg

I'm getting mad yikes
I came home from work, started linux, and ... no internet connection. The same problem again. I tried for several hours to solve it (different parameters, own scripts, etc.), without success. Sometimes I even can't connect after bootup, "dhcpcd ath0" always says "time out", no matter what I'm giving in the --timeout parameter (35 seconds should be enough, but it isn't). When using netcfg there is still the same problem, but when I try to connect twice, it works (mostly), so I really have the same problem as jai134.

I have one idea which _might_ work for me and for jai134, but I don't know how to configure it: when using NETWORKS in /etc/rc.conf the connection fails (time out), BUT I am able to simply run "dhcpcd ath0" as root after startup and the connection is up and running. Soooo, where can I put this command - so it executes automatically (as root, of course) before the login shell appears?
Thanks in advance.


GNUniverse - May the source be with you...

Offline

#16 2009-01-27 11:57:47

ghaad
Member
From: Czech Republic, EU
Registered: 2009-01-23
Posts: 21

Re: netcfg

This slowly becomes a monologue smile But maybe it will help someone.
I found out that the file rc.local is exactly what I was looking for. So I will try to run "hdcpcd ath0" from there.


GNUniverse - May the source be with you...

Offline

#17 2009-01-27 13:23:17

mrmaikel
Member
From: Germany
Registered: 2008-11-07
Posts: 10

Re: netcfg

I have the same problem with an unsecured network.
I can connect manually, that means:

ifconfig wlan0 up
iwconfig wlan0 ESSID "***"
dhcpcd wlan0

With netcfg it won't function!

Last edited by mrmaikel (2009-01-27 13:24:09)


Regards
mrmaikel

Offline

#18 2009-01-27 13:52:26

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

Re: netcfg

mrmaikel: What do you mean by "it won't function" - please post the output of netcfg when it "doesnt work" and your profile. Your driver helps too.

ghaad: I've seen that problem before, it's pretty annoying. Try editing /usr/lib/network/wireless.subr and changing the line:

quirk "postsleep" && sleep 1

to

quirk "postsleep" && sleep 10

If that works reliably, then you can tweak the 10 down gradually.


jai: You missed the most important output. What exactly does netcfg say when it doesnt work. It might only be one or two words, but it's the most essential thing I need to help debug your problem.

Offline

#19 2009-01-27 20:19:12

ghaad
Member
From: Czech Republic, EU
Registered: 2009-01-23
Posts: 21

Re: netcfg

This is soooo weird... It must be some kind of black magic hmm

Netcfg caused quite a nice system crash (it killed some process which shouldn't be killed, it happened in /usr/lib/networks/wireless.subr - I forgot the line, it was > 100, but there is only one line with a "kill" command). It happened after booting (no network), so I just tried "netcfg mywifi" to call my mywifi config file again with netcfg and then it crashed. I wasn't even able to reboot then (weird numbers everywhere, I guess memory addresses). A hard reset was the only way.

Thanks for this

quirk "postsleep" && sleep 10

advice. Unfortunately it doesn't help, but at least now I know where to change some configuration.

I was now able to solve it (maybe just for today?) with the following trick:

I edited /etc/rc.local

echo Checking DHCP again...
sleep 1
dhcpcd ath0 --timeout 15
sleep 2

I guess it's not necessary to make the system sleep, but I wanted to make it more readable (else it would disappear too quickly).

In /etc/network.d/myfiwi I have the following

CONNECTION="wireless"
DESCRIPTION="My wifi connection"
INTERFACE=ath0
ESSID=xxxxxxxxxxxxxxx
SECURITY=none
SCAN=yes
QUIRKS=(predown postsleep)
DHCLIENT=no
IP="dhcp"
TIMEOUT=10
DHCP_TIMEOUT=10

And of course NETWORKS=(myfiwi) is in my /etc/rc.conf

The even more weird thing is that it FAILS while booting and "dhcpcd ath0" (in rc.local) says that it is already running - but the connection is there when I log in.

If this won't work again (tomorrow), I will definitely stop using netcfg and try some own script using iwconfig etc. (in rc.local for connecting and rc.local.shutdown for disconnecting). BTW maybe I didn't mention that I have the following wifi card / chip: Atheros Communications Inc. AR2413 802.11bg NIC (rev 01)


GNUniverse - May the source be with you...

Offline

#20 2009-01-28 17:16:49

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: netcfg

It says "DHCP IP lease attempt failed". Is there a netconfig logfile?
Jan

Offline

Board footer

Powered by FluxBB