# Laptop Networking

## Shrek

Hi,

I have a Dell Latitude D820 laptop with a built in Ethernet card as well as built in Intel wireless.  The problem I'm having is getting everything to behave how I want it to behave!   :Smile: 

Individually each of the components works, that is when I start the laptop with an Ethernet cable it acquires a DHCP address fine and works just fine.  If there is no wired connection the wireless seems to come up but never acquires an address.  If, however, I stop and restart the net.wlan0 service it does then negotiate a DHCP address and work just fine.

Essentially all I want is for this process to be much smoother so I don't need to stop and restart the service when I am using wireless (and there is a network available).  I might have my settings in a half configured state after following everything I could find.

What should I look at and where should I go from here - what do you need to help.

Many thanks,

G.

----------

## audiodef

Could you post your emerge --info, please?

----------

## Shrek

Certainly:

```
godzilla ~ # emerge --info

Portage 2.1.6.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r8 i686)

=================================================================

System uname: Linux-2.6.27-gentoo-r8-i686-Genuine_Intel-R-_CPU_T2400_@_1.83GHz-with-glibc2.0

Timestamp of tree: Sun, 25 Jan 2009 11:15:01 +0000

app-shells/bash:     3.2_p39

dev-java/java-config: 1.3.7-r1, 2.1.6-r1

dev-lang/python:     2.4.4-r13, 2.5.2-r7

dev-python/pycrypto: 2.0.1-r6

dev-util/cmake:      2.4.8

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi aften alsa amazon bashcompletion berkdb bluetooth branding bzip2 cairo cdparanoia cdr cli cracklib crypt css cups dbus dri dvb dvd dvdr dvdread eds emboss encode esd evo fam fbcon ffmpeg firefox flac fortran ftp fuse gdbm gif gimp gnutls gphoto2 gpm gstreamer gtk hal hddtemp iconv ieee1394 imap ipod ipv6 isdnlog java java6 javascript jpeg lame ldap libnotify lm_sensors mad matroska midi mikmod mime mmap mp3 mpeg mplayer mudflap ncurses networkmanager nls nntp nptl nptlonly offensive ogg opengl openmp oracle pam pcmcia pcre pdf perl png ppds pppd python qt3support quicktime raw rdesktop readline reflection rss samba scanner sdl session sharedmem slp smp sox spell spl sse2 ssl startup-notification svg symlink sysfs tcpd threads tidy tiff truetype unicode usb vim-syntax vnc vorbis wavpack wifi win32codecs x264 x86 xine xml xorg xsl xulrunner xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

I hope that helps...

----------

## audiodef

I see you're still on baselayout 1. Adding net.wlan0 to the default run level doesn't help?

----------

## Shrek

Sorry for being vague on this... I believe I added net.wlan0 to the default run level using (I think) rc-update and I can see it try and start as the machine boots.  It's just for some reason it doesn't acquire the IP address via DHCP.  Literally all I have to do is stop and restart it.

You say I am still on baselayout 1, should I be on a higher version?  I recently did and update world.

Thanks in advance for all your help.

----------

## Leon_UK

You would only be on baselayout 2 if you unmaksed it via keywords or are running an unstable/testing gentoo (~arch)

Not sure about your problem. what are you using to manage your wireless? i.e wpa_supplicant or something alike?

Could you post 

```
cat /etc/conf.d/net
```

----------

## Shrek

Hi, thanks - thought I might have missed an important update somehow.

Anyway I am using wpa_supplicant as my network uses WPA2.  The output of the command is:

```
godzilla ~ # cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"

# Wireless setup

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

```

----------

## audiodef

Are you using Networkmanager (knetworkmanager for KDE)? This might be very useful for you on a laptop where you need to switch connections frequently.

----------

## Leon_UK

yea i have no idea what is causing the problem, your /etc/conf.d/net looks fine and your wpa_supplicant.conf must be correct or it would'nt connect at all

mine looked like this:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

  ssid="myssid"

  psk="mypassphrase"

  priority=5

}

```

i was only using wpa-psk

have you got a priority set? maybe a higher priority will help, the higher the priority the sooner the network is matched that works with ap_scan=1 (ap_scan=1 lets wpa_supplicant take care of the scanning instead of the driver)

----------

## Shrek

Thanks for continuing to look at this...

My wap_supplicant.conf reads:

```
godzilla ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf 

# The below line not to be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

network={

   key_mgmt=NONE

   priority=-9999999

}

network={

   ssid="MySID"

   scan_ssid=1

   key_mgmt=WPA-PSK

   proto=RSN

   pairwise=CCMP TKIP

   group=CCMP TKIP

   psk=xxxxMyKeyInHexxxx

   priority=5

   scan_ssid=1

   auth_alg=OPEN

}

network={

   ssid="AnotherSID"

   scan_ssid=1

   key_mgmt=WPA-PSK

   proto=WPA

   pairwise=CCMP TKIP

   group=CCMP TKIP

   psk="password"

   priority=5

   scan_ssid=1

   auth_alg=OPEN

}

```

The SIDs have obviously been changed around (as well as passwords).  Also, in case it helps, this is what happens when booting:

```
 * Device initiated services: net.wlan0 udev-postmount

 * Setting hostname to godzilla ...                                   [ ok ]

 * Loading key mappings ...                                           [ ok ]

 * Setting terminal encoding to UTF-8 ...                             [ ok ]

 * Setting user font ...                                              [ ok ]

 * Starting lo

 *   Bringing up lo

 *     127.0.0.1/8                                                    [ ok ]

 *   Adding routes

 *     127.0.0.0/8 ...                                                [ ok ]

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...

ioctl[SIOCSIWAUTH]: Operation not supported

 [ ok ]th param 4 value 0x0 -

 *   Starting wpa_cli on wlan0 ...                                    [ ok ]

 *     Backgrounding ...

 * Initializing random number generator ...                           [ ok ]

 INIT: Entering runlevel: 3

 * Starting syslog-ng ...                                             [ ok ]

 * Starting D-BUS system messagebus ...                               [ ok ]

 * WARNING:  dhcdbd is scheduled to start when net.wlan0 has started.

 * Starting Hardware Abstraction Layer daemon ...                     [ ok ]

 * WARNING:  NetworkManager is scheduled to start when dhcdbd has started.

 * Starting gpm ...                                                   [ ok ]

 * Loading lm_sensors modules...

 *   Loading coretemp ...                                             [ ok ]

 * Initializing sensors ...                                           [ ok ]

 * WARNING:  netmount is scheduled to start when net.wlan0 has started.

 * WARNING:  ntp-client is scheduled to start when net.wlan0 has started.

 * WARNING:  sshd is scheduled to start when net.wlan0 has started.

 * Starting vixie-cron ...                                            [ ok ]

 * Setting up slim ...                                                [ ok ]

 * Starting local ...                                                 [ ok ] 

```

Regards,

Gareth.

----------

## das bletch

I could be wrong, but isn't your net init scripts suppose to run at level 3? It looks like they were trying to run early, which is what generated the error.

check the handbook and re-run rc-update commands for your networking. that might do it.

----------

## Shrek

I would have run the following from the handbook

```
rc-update add net.eth0 default
```

Is this what I should have done?  I've just noticed later in the documentation it talks about ifplugd which I don't currently have installed.  Should I remove net.wlan0 and net.eth0 via rc-update and rely on these instead?

Also these are the contents of the directories in /etc/runlevels:

```
boot:

bootmisc  checkfs  checkroot  clock  consolefont  hostname  keymaps  localmount  modules  net.lo  rmnologin  urandom

default:

NetworkManager  dbus  gpm  hald  lm_sensors  local  netmount  ntp-client  sshd  syslog-ng  vixie-cron  xdm

nonetwork:

local

single:

```

Thanks again.

----------

## das bletch

do you recall doing anything like this:

```
ln /etc/init.d/net.lo -> /etc/init.d/net.wlan0
```

?

I could have written it backwards, just trying to recall. If you made a link between your loopback and your net.wlan0 file, that maybe causing your networking to load in the wrong order.

But I am just guessing. I am no expert.

----------

## Leon_UK

can you post 

```
rc-update show
```

I ask for this out of curiosity, judging by what you posted you seem to be missing  a fair bit from your run levels. for example I'm pretty sure if you ran the  'top' command it would say you have 0k swap total.

having it start prior to run level 3 will cause problems

----------

## Shrek

Thanks both apologies for the delay in replying.

Das bletch, I did do something like that, i.e. I linked net.wlan0 to net.lo, as you can see from:

```
godzilla ~ # ls -l /etc/init.d/net.wlan0 

lrwxrwxrwx 1 root root 6 2009-02-01 15:37 /etc/init.d/net.wlan0 -> net.lo
```

I'm fairly sure this is mentioned in one of the guides I read. The output of rc-update is:

```
godzilla ~ # rc-update show

      NetworkManager |      default                  

            bootmisc | boot                          

             checkfs | boot                          

           checkroot | boot                          

               clock | boot                          

         consolefont | boot                          

                dbus |      default                  

                 gpm |      default                  

                hald |      default                  

            hostname | boot                          

             keymaps | boot                          

          lm_sensors |      default                  

               local |      default nonetwork        

          localmount | boot                          

             modules | boot                          

              net.lo | boot                          

            netmount |      default                  

          ntp-client |      default                  

           rmnologin | boot                          

                sshd |      default                  

           syslog-ng |      default                  

             urandom | boot                          

          vixie-cron |      default                  

                 xdm |      default                  

```

By the looks of it swap is mounted in the localmount script, you can see from the following line of top's output that swap gets mounted:

```
Swap:  1004052k total,        0k used,  1004052k free,   115848k cached
```

I hope that helps you to help me!  :Smile: 

Thanks again,

Gareth.

----------

## Leon_UK

Ok swap is mounted that's good, must be baselayout2 that does not mount swap unless it's called from a runlevel.

any reason why net.wlan0 is not in your default run level 

```
rc-update add net.wlan0 default
```

if there is a reason then what is RC_NET_STRICT_CHECKING= set to in /etc/conf.d/rc (I'm pretty sure that is where rc lives, it has been a while since i used bselayout1) If it is set to no, try changing it to yes that should make sure things start in the right order.

```
RC_NET_STRICT_CHECKING=yes
```

----------

## Shrek

Hi,

Thanks for the response, not sure why net.wlan0 wasn't in the default run level, it is now.  That didn't change anything.  Also I tried changing the strict checking parameter and this had no effect either.

Any ideas?  It's bloomin' annoying!  :Smile: 

Cheers,

G.

----------

## pappy_mcfae

Post your kernel .config, the results of lspci -n and cat /proc/cpuinfo as well as your /etc/fstab file and your /usr/src/linux/.config file. You seem to have a few problems here. The best place to start is with the kernel. Please use pastebin.com to post your .config file. Just follow the link in my sig.

Blessed be!

Pappy

----------

## Shrek

Ok, kernel config here, got it via zcat /proc/config.gz to ensure that it refelcts the running kernel.

```
godzilla ~ # lspci -n

00:00.0 0600: 8086:27a0 (rev 03)

00:02.0 0300: 8086:27a2 (rev 03)

00:02.1 0380: 8086:27a6 (rev 03)

00:1b.0 0403: 8086:27d8 (rev 01)

00:1c.0 0604: 8086:27d0 (rev 01)

00:1c.1 0604: 8086:27d2 (rev 01)

00:1c.2 0604: 8086:27d4 (rev 01)

00:1c.3 0604: 8086:27d6 (rev 01)

00:1d.0 0c03: 8086:27c8 (rev 01)

00:1d.1 0c03: 8086:27c9 (rev 01)

00:1d.2 0c03: 8086:27ca (rev 01)

00:1d.3 0c03: 8086:27cb (rev 01)

00:1d.7 0c03: 8086:27cc (rev 01)

00:1e.0 0604: 8086:2448 (rev e1)

00:1f.0 0601: 8086:27b9 (rev 01)

00:1f.2 0101: 8086:27c4 (rev 01)

00:1f.3 0c05: 8086:27da (rev 01)

03:01.0 0607: 1217:7135 (rev 21)

03:01.4 0c00: 1217:00f7 (rev 02)

09:00.0 0200: 14e4:1600 (rev 02)

0c:00.0 0280: 8086:4222 (rev 02)

godzilla ~ # cat /proc/cpuinfo 

processor   : 0

vendor_id   : GenuineIntel

cpu family   : 6

model      : 14

model name   : Genuine Intel(R) CPU           T2400  @ 1.83GHz

stepping   : 8

cpu MHz      : 1830.853

cache size   : 2048 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 2

apicid      : 0

initial apicid   : 0

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts pni monitor vmx est tm2 xtpr

bogomips   : 3661.70

clflush size   : 64

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 6

model      : 14

model name   : Genuine Intel(R) CPU           T2400  @ 1.83GHz

stepping   : 8

cpu MHz      : 1830.853

cache size   : 2048 KB

physical id   : 0

siblings   : 2

core id      : 1

cpu cores   : 2

apicid      : 1

initial apicid   : 1

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts pni monitor vmx est tm2 xtpr

bogomips   : 3661.58

clflush size   : 64

power management:

godzilla ~ # cat /etc/fstab 

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda1      /boot      ext2      noauto,noatime   1 2

/dev/hda3      /      ext3      noatime      0 1

/dev/hda2      none      swap      sw      0 0

/dev/cdrom      /mnt/cdrom   auto      noauto,user   0 0

#/dev/fd0      /mnt/floppy   auto      noauto      0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0
```

----------

## pappy_mcfae

This is the start of the test to find out what's up with your wireless. Do not expect things to magically work. There's still some things that need to be done. I want to make that clear up front. 

Also, I don't know how your machine ran at all, considering it uses a SATA interface, and that means that drives should be labeled sd(x) instead of hd(x). With this .config, that is a must. To save you the time, just copy your /etc/fstab to some other filename, and copy this one:

```
/dev/sda1      /boot      ext2      noauto,noatime   1 2

/dev/sda3      /      ext3      noatime      0 1

/dev/sda2      none      swap      sw      0 0

#/dev/cdrom      /mnt/cdrom   auto      noauto,user   0 0 

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0
```

into your /etc directory.

Click here for your new .config. Compile as is.

For the best results, please do the following:

1) Move your .config file out of your kernel source directory (/usr/src/linux-2.6.27-gentoo-r8  ).

2) Issue the command make mrproper. This is a destructive step. It returns the source to pristine condition. Unmoved .config files will be deleted!

3) Copy my .config into your source directory.

4) Issue the command make && make modules_install.

5) Install the kernel as you normally would, and reboot.

6) Once it boots, please post /var/log/dmesg so I can see how things loaded.

This last step is most important. I need to know what's happening when, so I know which route to take to get you going.

Blessed be!

Pappy

----------

## Shrek

Bizarre... it now works on using sda prefix...

Anyway /var/log/dmesg is at the URL below...

http://pastebin.com/m70125aeb

Same symptom, it boots interface appears to come up but until I do a stop/start on the net.wlan0 service it doesn't get an IP address.

Thanks for the help.. where next?

Cheers,

G.

----------

## pappy_mcfae

Ok it is being started by the kernel. Now that we've established that, post the results of iwconfig and ifconfig -a. Also post your /etc/conf.d/net file, and emerge --info.

Blessed be!

Pappy

----------

## Shrek

This is the output of iwconfig immediately after boot

```

lo        no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

wmaster0  no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:""  

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:18:4D:F1:C8:88   

          Bit Rate=54 Mb/s   Tx-Power=15 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key:off

          Power Management:off

          Link Quality=80/100  Signal level:-54 dBm  Noise level=-127 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

And this is the output of ifconfig -a, also immediately after boot:

```

dummy0    Link encap:Ethernet  HWaddr 5e:d5:4a:3b:cf:13  

          BROADCAST NOARP  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:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:15:c5:1d:ef:f4  

          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:18 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  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:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  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:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:13:02:88:51:42  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:7 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1535 (1.4 KiB)  TX bytes:1830 (1.7 KiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-13-02-88-51-42-6C-6F-00-00-00-00-00-00-00-00  

          UP BROADCAST RUNNING 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)

```

The following is after stopping and re-starting net.wlan0:

```

godzilla ~ # /etc/init.d/net.wlan0 stop

 * Stopping NetworkManager ...                                                                                                                                                [ ok ]

 * Stopping dhcdbd ...                                                                                                                                                        [ ok ]

 * Unmounting network filesystems ...                                                                                                                                         [ ok ]

 * Stopping sshd ...                                                                                                                                                          [ ok ]

 * Stopping wlan0

 *   Bringing down wlan0

 *     Stopping dhcpcd on wlan0 ...                                                                                                                                           [ ok ]

 *     Shutting down wlan0 ...                                                                                                                                                [ ok ]

 *     Stopping wpa_cli on wlan0 ...                                                                                                                                          [ ok ]

 *     Stopping wpa_supplicant on wlan0 ...                                                                                                                                   [ ok ]

godzilla ~ # /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...

ioctl[SIOCSIWAUTH]: Operation not supported                                                                                                                                          [ ok ]th param 4 value 0x0 - 

 *   Starting wpa_cli on wlan0 ...                                                                                                                                            [ ok ]

 *     Backgrounding ...

godzilla ~ # iwconfig 

lo        no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:"MySSID"  

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:18:4D:F1:C8:88   

          Bit Rate=54 Mb/s   Tx-Power=15 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key:03CC-75C6-EDBF-6423-46FE-A9D8-68B2-844A [3]   Security mode:open

          Power Management:off

          Link Quality=84/100  Signal level:-50 dBm  Noise level=-127 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

eth0      no wireless extensions.

godzilla ~ # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr 5e:d5:4a:3b:cf:13  

          BROADCAST NOARP  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:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:15:c5:1d:ef:f4  

          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:18 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:16 errors:0 dropped:0 overruns:0 frame:0

          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:1232 (1.2 KiB)  TX bytes:1232 (1.2 KiB)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  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:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:13:02:88:51:42  

          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::213:2ff:fe88:5142/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:196 errors:0 dropped:0 overruns:0 frame:0

          TX packets:176 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:209381 (204.4 KiB)  TX bytes:32621 (31.8 KiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-13-02-88-51-42-6C-6F-00-00-00-00-00-00-00-00  

          UP BROADCAST RUNNING 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)

```

Finally the contents of /etc/conf.d/net and emerge --info:

```

godzilla ~ # cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"

# Wireless setup

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

godzilla ~ # emerge --info      

Portage 2.1.6.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r8 i686)

=================================================================

System uname: Linux-2.6.27-gentoo-r8-i686-Genuine_Intel-R-_CPU_T2400_@_1.83GHz-with-glibc2.0

Timestamp of tree: Sun, 25 Jan 2009 11:15:01 +0000

app-shells/bash:     3.2_p39

dev-java/java-config: 1.3.7-r1, 2.1.6-r1

dev-lang/python:     2.4.4-r13, 2.5.2-r7

dev-python/pycrypto: 2.0.1-r6

dev-util/cmake:      2.4.8

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo"

LANG="en_GB.ISO-8859-1"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi aften alsa amazon bashcompletion berkdb bluetooth branding bzip2 cairo cdparanoia cdr cli cracklib crypt css cups dbus dri dvb dvd dvdr dvdread eds emboss encode esd evo fam fbcon ffmpeg firefox flac fortran ftp fuse gdbm gif gimp gnutls gphoto2 gpm gstreamer gtk hal hddtemp iconv ieee1394 imap ipod ipv6 isdnlog java java6 javascript jpeg lame ldap libnotify lm_sensors mad matroska midi mikmod mime mmap mp3 mpeg mplayer mudflap ncurses networkmanager nls nntp nptl nptlonly offensive ogg opengl openmp oracle pam pcmcia pcre pdf perl png ppds pppd python qt3support quicktime raw rdesktop readline reflection rss samba scanner sdl session sharedmem slp smp sox spell spl sse2 ssl startup-notification svg symlink sysfs tcpd threads tidy tiff truetype unicode usb vim-syntax vnc vorbis wavpack wifi win32codecs x264 x86 xine xml xorg xsl xulrunner xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

Many thanks,

G.

----------

## pappy_mcfae

Are you wanting the wireless to pick up it's own dhcp IP address, different from the wired network? If so, you need to add 

```
config_wlan0=( "dhcp" )
```

 to /etc/conf.d/net. That way, you'll have wlan0 right off the bat.

Personally, I use a scripting setup to automatically select wireless or not depending on whether or not the net line is plugged in at boot time. It works quite nicely, as long as you have baselayout-1.x, as you do. However, the set up is a bit on the complex side, and you need to know about about Linux scripting to make it work.

Blessed be!

Pappy

----------

## Shrek

Hi,

Yes it should pick up it's address via DHCP, and also the scripting setup you describe is essentially what I'm after.  Anyway I made the change but still the same problem, the interface comes up but doesn't attach to the network.  Stopping and starting the service sorts this as usual, any ideas?

I'm generally fairly comfortable with Linux/Unix although (as my shocking attempt at kernel config showed) a little out of practice so I'd be interested to see the script.

With regards to the networking this has never been an issue with other distributions (e.g. Fedora), it's pretty much "just worked" using the config tools provided.  I understand that Gentoo isn't supposed to be that hand-holdy but it is annoying that networking is being a pain - it's not a massive problem, but it is irritating.  :Smile: 

Cheers,

G.

----------

## pappy_mcfae

I'll have to get it all together and I'll send you what I have via private message. The setup I have only works with baselayout-1.x. 

Blessed be!

Pappy

----------

