You are not logged in.

#1 2008-08-22 14:25:22

Hy Ginsberg
Member
From: Massachusetts
Registered: 2008-08-22
Posts: 74
Website

laptop usage and network timeouts

Hi,

I just got Arch installed on my laptop.  I have both wired and wireless adapters -- eth0 and eth1, respectively, both working.  I use the laptop in two situations, home and school; at home I use wireless, at school wired.  What I am looking for is a timeout to set somewhere so that I don't have to wait, at startup, for my wired adapter to fail.  (I haven't given it a whirl at school yet -- probably I'll have the analogous issue there -- impatience while my wireless fails).

I realize I can set up profiles with netcfg (or netcfg2?) and choose manually, but if possible I'd rather have Arch take a stab at both at startup and give up quickly.

Many thanks.

- Hy

Offline

#2 2008-08-22 14:33:21

filou.linux
Member
From: Zurich
Registered: 2008-04-17
Posts: 87

Re: laptop usage and network timeouts

Just background the network (net-profiles respectively) daemon in your rc.conf. You can do so by adding a "@" before the daemon string, so it looks like:

DAEMONS=(syslog-ng @network ... crond)

Consider the Wiki-article: http://wiki.archlinux.org/index.php/Rc.conf
Hope this helps

Offline

#3 2008-08-22 14:50:47

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: laptop usage and network timeouts

Offline

#4 2008-08-22 15:37:50

Hy Ginsberg
Member
From: Massachusetts
Registered: 2008-08-22
Posts: 74
Website

Re: laptop usage and network timeouts

Okay, cool.  I background'ed the network daemon, and that worked nicely -- thanks.

I would like to give ifplugd a try, since that's such a slick solution.  I think my rc.conf file should look like this:

eth0="dhcp"
eth1="dhcp"
wlan_eth1="eth1 essid <myessid> key <mykey>"
INTERFACES=(eth1)

# 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=(main)

# -----------------------------------------------------------------------
# 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 ifplugd netfs crond)

where I have removed eth0 from INTERFACES and added ifplugd to DAEMONS.  I think I still need network (and may as well still start it in the background?) in INTERFACES to start my wireless adapter.  Look good?

- Hy

Offline

#5 2008-08-22 15:47:09

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: laptop usage and network timeouts

I don't actually use ifplugd, all wireless here, but here are some good links that can serve as reference:
http://bbs.archlinux.org/viewtopic.php?pid=376561
http://freenet-homepage.de/obauer/ (scroll down to Network section)
http://tilos.csl.mech.ntua.gr/~apoikos/s7020.html(General networking tips)

Offline

#6 2008-08-22 16:09:28

filou.linux
Member
From: Zurich
Registered: 2008-04-17
Posts: 87

Re: laptop usage and network timeouts

I think it looks good. You could background the ifplugd as well. I use it too, but it didnt work out of the box here. I had to adjust the /etc/ifplugd/ifplugd.action to make it work properly.

Just pull the cable out and run ifconfig (it'll wait 10secs by default), and put it back in (and ifconfig) to see if it works. If it doesnt, run

sudo ifplugd -na

and analyze the output. If you cant figure it out yourself, post the messages you get so we are to help you.

hope this helps.

Offline

#7 2008-08-22 18:06:16

Hy Ginsberg
Member
From: Massachusetts
Registered: 2008-08-22
Posts: 74
Website

Re: laptop usage and network timeouts

Hmm, bizarre.  ifconfig lists my wired device as "UP" whether the cable is plugged in or not.  But after disabling my wireless card (by a switch on my laptop) unplugging the ethernet cable and plugging it back in, I couldn't access the network (ping -c 3 www.google.com failed).  ifconfig output (cable in):

eth0      Link encap:Ethernet  HWaddr 00:0D:9D:91:F5:43  
          inet6 addr: fe80::20d:9dff:fe91:f543/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3983 (3.8 Kb)  TX bytes:492 (492.0 b)
          Interrupt:10

ifconfig (cable out):

eth0      Link encap:Ethernet  HWaddr 00:0D:9D:91:F5:43  
          UP 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)
          Interrupt:10

The "sudo ifplugd -na" you suggested results in "Sorry, there is already an instance of ifplugd for eth0 running" (so polite).  If the ifconfig output doesn't provide any clues I can remove ifplugd from rc.conf and give it a try by hand, as you suggested.

Thanks.

- Hy

Offline

#8 2008-08-22 18:22:29

trx
Member
Registered: 2007-02-15
Posts: 38
Website

Re: laptop usage and network timeouts

you could also try using wicd.

Offline

Board footer

Powered by FluxBB