You are not logged in.
I've read the arch wiki article "Wireless setup" ('Manual setup' section, 3/4 down page) and it shows how to set a network up using the dhcpcd command. I'm trying to streamline and use less cpu/memory. Is it possible to run the net without dhcpcd? It's very slow during startup and adds about 5-10 seconds to my startup time. Perhaps even just running it in the background somehow could be a compromise.
Current setup:
/etc/rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
# Run wpa_supplicant as a daemon:
# wpa_supplicant -Dwext -i wlan0 -c/etc/wpa_supplicant.conf -B
wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
dhcpcd wlan0/etc/rc.conf
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
# startup and during the boot process. If set to 'no', the C locale is used.
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
# in the hardware clock being left untouched (useful for virtualization)
# Note: Using "localtime" is discouraged.
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
# VERBOSE: Verbose level (from 1 to 8). man 3 syslog for level info
#
LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="UTC"
TIMEZONE="America/Toronto"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
VERBOSE="3"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
# Replace every !module by an entry as on the following line in a file in
# /etc/modprobe.d:
# blacklist module
# See "man modprobe.conf" for details.
#
MODULES=(ath9k)
# Udev settle timeout (default to 30)
UDEV_TIMEOUT=30
# Scan for FakeRAID (dmraid) Volumes at startup
USEDMRAID="no"
# Scan for BTRFS volumes at startup
USEBTRFS="no"
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"
# Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
#
# Wired network setup
# - interface: name of device (required)
# - address: IP address (leave blank for DHCP)
# - netmask: subnet mask (ignored for DHCP)
# - gateway: default route (ignored for DHCP)
#
# Static IP example
# interface=eth0
# address=192.168.0.2
# netmask=255.255.255.0
# gateway=192.168.0.1
#
# DHCP example
# interface=eth0
# address=
# netmask=
# gateway=
interface=eth0
address=
netmask=
gateway=
eth0="dhcp"
wlan0="dhcp"
INTERFACES=(eth0 wlan0)
# Setting this to "yes" will skip network shutdown.
# This is required if your root device is on NFS.
NETWORK_PERSIST="no"
# Enable these netcfg profiles at boot-up. These are useful if you happen to
# need more advanced network features than the simple network service
# supports, such as 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 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
#
# If something other takes care of your hardware clock (ntpd, dual-boot...)
# you should disable 'hwclock' here.
#
DAEMONS=(syslog-ng hwclock rfkill alsa dbus netfs crond)Offline
You can set a static IP address instead of using dhcp.
Last edited by tomk (2011-07-09 20:53:12)
Offline
It's possible if you use a static address, but it's possible you have to need wireless tools.
Offline
Thank you both for your quick replies.
It's possible if you use a static address, but it's possible you have to need wireless tools.
Do I for sure need wireless_tools?
I'm going to try the static address setup and report back.
Offline
You can't configure wireless without wireless_tools.
Offline
Wireless_tools is strictly for wireless, as its name implies. It just handles the networking layer, you still need to obtain an IP (through DHCP), or set one yourself. That's no different for either wireless or wired, it's still TCP/IP on top of the physical connection.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Thank you both. I've installed wireless_tools.
I edited the /etc/rc.conf for static ip though something must be incorrect because I get the depreciated error:
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
# startup and during the boot process. If set to 'no', the C locale is used.
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
# in the hardware clock being left untouched (useful for virtualization)
# Note: Using "localtime" is discouraged.
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
# VERBOSE: Verbose level (from 1 to 8). man 3 syslog for level info
#
LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="UTC"
TIMEZONE="America/Toronto"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
VERBOSE="3"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
# Replace every !module by an entry as on the following line in a file in
# /etc/modprobe.d:
# blacklist module
# See "man modprobe.conf" for details.
#
MODULES=(ath9k)
# Udev settle timeout (default to 30)
UDEV_TIMEOUT=30
# Scan for FakeRAID (dmraid) Volumes at startup
USEDMRAID="no"
# Scan for BTRFS volumes at startup
USEBTRFS="no"
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"
# Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
#
# Wired network setup
# - interface: name of device (required)
# - address: IP address (leave blank for DHCP)
# - netmask: subnet mask (ignored for DHCP)
# - gateway: default route (ignored for DHCP)
#
# Static IP example
# interface=eth0
# address=192.168.0.2
# netmask=255.255.255.0
# gateway=192.168.0.1
#
# DHCP example
# interface=eth0
# address=
# netmask=
# gateway=
#eth0="dhcp"
#wlan0="dhcp"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(eth0 wlan0)
gateway="default gw 192.168.0.1"
ROUTES=(gateway)
# Setting this to "yes" will skip network shutdown.
# This is required if your root device is on NFS.
NETWORK_PERSIST="no"
# Enable these netcfg profiles at boot-up. These are useful if you happen to
# need more advanced network features than the simple network service
# supports, such as 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 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
#
# If something other takes care of your hardware clock (ntpd, dual-boot...)
# you should disable 'hwclock' here.
#
DAEMONS=(syslog-ng hwclock rfkill alsa dbus netfs crond)Here's what I get so far:
[user@myhost ~]$ su
Password:
[root@myhost user]# ifconfig wlan0 up
[root@myhost user]# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
[root@myhost user]# iwconfig wlan0
wlan0 IEEE 802.11bgn ESSID:"dlink"
Mode:Managed Frequency:2.422 GHz Access Point: 00:18:E7:F2:5B:D2
Bit Rate=65 Mb/s Tx-Power=9 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-26 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[root@myhost user]# ifconfig wlan0 192.168.0.2
[root@myhost user]# route add default gw 192.168.0.1
[root@myhost user]# iwconfig wlan0 channel auto
[root@myhost user]# /etc/rc.d/network restart
Warning: This functionality is deprecated.
Please refer to /etc/rc.conf on how to define a single wired
connection, or use a utility such as netcfg.
:: Stopping Network [DONE]
Warning: This functionality is deprecated.
Please refer to /etc/rc.conf on how to define a single wired
connection, or use a utility such as netcfg.
:: Starting Network [BUSY] up: error fetching interface information: Device not found
eth0 Link encap:Ethernet HWaddr F4:6D:04:0B:EA:BF
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
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:46 Base address:0xa000
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:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2712 (2.6 Kb) TX bytes:2712 (2.6 Kb)
[DONE]
[root@myhost user]# ping -c 3 www.google.ca
ping: unknown host www.google.ca
[root@myhost user]# dhcpcd wlan0
dhcpcd[1216]: version 5.2.12 starting
dhcpcd[1216]: wlan0: waiting for carrier
dhcpcd[1216]: wlan0: carrier acquired
dhcpcd[1216]: wlan0: rebinding lease of 192.168.0.191
dhcpcd[1216]: wlan0: acknowledged 192.168.0.191 from 192.168.0.1
dhcpcd[1216]: wlan0: checking for 192.168.0.191
dhcpcd[1216]: wlan0: leased 192.168.0.191 for 86400 seconds
dhcpcd[1216]: forked to background, child pid 1243
[root@myhost user]# The last command is my using the dhcpcd to activate the net because I couldn't get static to work.
Any ideas?
Offline
Why are you running the network initscipt? I thought you wanted to do this manually.
The configuration you have in rc.conf assigns 192.168.0.2 to eth0 when you run /etc/rc.d/network - the same address that you have just assigned to wlan0 manually. ![]()
Why is eth0 there at all? I've re-read the thread and you didn't ask about wired config, only wireless.
And finally - 'iwconfig wlan0 channel auto' is superfluous, as the channel has already been assigned by the router during the wpa_supplicant procedure.
Offline
Why are you running the network initscipt? I thought you wanted to do this manually.
The configuration you have in rc.conf assigns 192.168.0.2 to eth0 when you run /etc/rc.d/network - the same address that you have just assigned to wlan0 manually.
Why is eth0 there at all? I've re-read the thread and you didn't ask about wired config, only wireless.
And finally - 'iwconfig wlan0 channel auto' is superfluous, as the channel has already been assigned by the router during the wpa_supplicant procedure.
It's obvious I'm not cut out for this. I've spent hours reading the wikipedia and still haven't got it working. I won't bug you guys about it.
Offline
OK....
My advice: don't just give up, do more reading and experimenting. You're not bugging anybody, nobody is forced to read your posts, let alone respond to them. Getting to know the manual "nuts and bolts" is a very useful exercise, even if you ultimately end up using some automated utililty like netcfg/wicd/etc.
Offline