• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

ifup startet kein dhcp

maettes

Newbie
Hallo,

habe SUSE9.3 Upgrade auf 10.0 und einen Realtek-USB-Wlan-Stick RTL8187 an einer Fritz-Box. Unter yast-Netzwerkgeraete ist wlan0 konfiguriert. Unter init.d lade ich einige RTL-Module beim Start mit insmod.

Ohne Aenderung am System liefert mir neuerdings ifup bzw. KInternet keine Internet-Verbindung. Starte ich nach einem ifup wlan0 "dhcpcd wlan0" manuell ist die Verbindung aber instabil bzw. wird immer langsamer. Ein route dauert teilweise sehr lange und loest manchmal auch die IP-Adresse/Name des default-gw nicht auf. ifconfig liefert ipv4-Adressen erst nach o.g. manuellem dhcpcd wlan0.

Irgendwas scheint in der Einbindung von dhcp im ifup und dem Routing nicht zu funtionieren. Aber wo und wie ist das zu loesen. (Vielleicht hat Suse auch beim Upgrade etwas uebles mitbekommen - mein Openoffice hats z.B. beim Excel-Pendent leicht erwischt ... )

ifup wlan0:
iwlist scan:
wlan0 Scan completed :
Cell 01 - Address: 00:15:0C:46:6A:6D
ESSID:"widde"
Protocol:IEEE 802.11bg
Mode:Master
Channel:6
Encryption key:eek:n
Bit Rate:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 24 36 48 54
Quality:16 Signal level:0 Noise level:61
Extra: Last beacon: 366ms ago

uhura:~ #

Hier das syslog:
uhura:~ # tail -f /var/log/messages
Jul 31 23:41:42 uhura ifup-route: Configuration line: 192.168.178.0 0.0.0.0 255.255.255.0 wlan0
Jul 31 23:41:42 uhura ifup-route: Error while executing:
Jul 31 23:41:42 uhura ifup-route: Command 'ip route replace to default via 192.168.178.1 dev wlan0' returned:
Jul 31 23:41:42 uhura ifup-route: RTNETLINK answers: Network is unreachable
Jul 31 23:41:42 uhura ifup-route: Configuration line: default 192.168.178.1 - wlan0
Jul 31 23:41:42 uhura SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6 support disabled.
Jul 31 23:41:42 uhura SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
Jul 31 23:41:42 uhura SuSEfirewall2: batch committing...
Jul 31 23:41:42 uhura SuSEfirewall2: Firewall rules successfully set
Jul 31 23:41:53 uhura kernel: wlan0: no IPv6 routers present

ifconfig:
wlan0 Link encap:Ethernet HWaddr 00:0E:2E:A7:4E:89
inet6 addr: fe80::20e:2eff:fea7:4e89/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:506 errors:2 dropped:534 overruns:0 frame:0
TX packets:576 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:316838 (309.4 Kb) TX bytes:123588 (120.6 Kb)

route: => ohne Ergebnis fuer wlan0

uhura:~ # dhcpcd wlan0
**** dhcpcd: already running
**** dhcpcd: if not then delete /var/run//dhcpcd-wlan0.pid file
uhura:~ # rm /var/run//dhcpcd-wlan0.pid
uhura:~ # dhcpcd wlan0
Reload service Lightweight resolver daemon ..done
ifconfig:
wlan0 Link encap:Ethernet HWaddr 00:0E:2E:A7:4E:89
inet addr:192.168.178.20 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::20e:2eff:fea7:4e89/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:514 errors:2 dropped:544 overruns:0 frame:0
TX packets:587 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:318999 (311.5 Kb) TX bytes:126430 (123.4 Kb)

uhura:~ #

uhura:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
default fritz.fonwlan.b 0.0.0.0 UG 0 0 0 wlan0
uhura:~ #

meine ifcfg-wlan0:
DEVICE=wlan0
BOOTPROTO=dhcp
# BROADCAST='192.168.178.255'
BROADCAST=''
IPADDR=''
MTU=''
NAME='REALTEK WLAN0'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='onboot'
USERCONTROL='yes'
# WIRELESS='yes'
WIRELESS_AP=''
WIRELESS_AUTH_MODE='sharedkey'
WIRELESS_BITRATE='auto'
WIRELESS_CA_CERT=''
WIRELESS_CHANNEL=''
WIRELESS_CLIENT_CERT=''
WIRELESS_DEFAULT_KEY='0'
WIRELESS_ESSID='widde'
WIRELESS_FREQUENCY=''
WIRELESS_KEY=''
WIRELESS_KEY_0='s:nixda'
WIRELESS_KEY_1=''
WIRELESS_KEY_2=''
WIRELESS_KEY_3=''
WIRELESS_KEY_LENGTH='128'
WIRELESS_MODE='Managed'
WIRELESS_NICK=''
WIRELESS_NWID=''
# WIRELESS_POWER='yes'
WIRELESS_WPA_IDENTITY=''
WIRELESS_WPA_PASSWORD=''
WIRELESS_WPA_PSK=''
DHCLIENT_PRIMARY_DEVICE=yes
DHCLIENT_SLEEP='5'
PREFER_WPA_SUPPLICANT=no

mein dhcp:uhura:/etc/sysconfig/network # more dhcp
## Path: Network/DHCP/DHCP client
## Description: DHCP configuration tweaking
#
# Note:
# To configure one or more interfaces for DHCP configuration, you have to
# change the BOOTPROTO variable in /etc/sysconfig/network/ifcfg-<interface> to
# 'dhcp' (and possibly set STARTMODE='onboot').
#
# Most of these options are used only by dhcpcd, not by the ISC dhclient (which
# uses a config file).
#
# Most of the options can be overridden by setting them in the ifcfg-* files,
# too.

## Type: string
## Default: ""
## ServiceRestart: network
#
# Which DHCP client should be used?
# If empty, dhcpcd is tried, then dhclient
# Other possible values:
# dhcpcd (DHCP client daemon)
# dhclient (ISC dhclient)
DHCLIENT_BIN="dhcpcd"

## Type: yesno
## Default: no
#
# Start in debug mode? (yes|no)
# (debug info will be logged to /var/log/messages for dhcpcd, or to
# /var/log/dhclient-script for ISC dhclient)
#
DHCLIENT_DEBUG="no"

## Type: yesno
## Default: no
#
# Should the DHCP client set the hostname? (yes|no)
#
# When it is likely that this would occur during a running X session,
# your DISPLAY variable could be screwed up and you won't be able to open
# new windows anymore, then this should be "no".
#
# If it happens during booting it won't be a problem and you can
# safely say "yes" here. For a roaming notebook with X kept running, "no"
# makes more sense.
#
DHCLIENT_SET_HOSTNAME="no"

## Type: yesno
## Default: yes
#
# Should the DHCP client modify /etc/resolv.conf at all?
# If not, set this to "no". (The default is "yes")
#
# resolv.conf will also stay untouched when MODIFY_RESOLV_CONF_DYNAMICALLY
# in /etc/sysconfig/network/config is set to "no".
#
DHCLIENT_MODIFY_RESOLV_CONF="yes"

## Type: yesno
## Default: yes
#
# Should the DHCP client set a default route (default Gateway) (yes|no)
#
# When multiple copies of dhcpcd run, it would make sense that only one
# of them does it.
#
DHCLIENT_SET_DEFAULT_ROUTE="yes"

## Type: yesno
## Default: no
#
# Should the DHCP client modify the NTP configuration? (yes|no)
#
# If set to yes, /etc/ntp.conf is rewritten (and restored upon exit).
# If you don't want this, set this variable to "no". (The default is "no")
#
DHCLIENT_MODIFY_NTP_CONF="no"

## Type: yesno
## Default: no
#
# Should the DHCP client modify the NIS configuration? (yes|no)
#
# If set to yes, /etc/yp.conf is rewritten (and restored upon exit).
# If you don't want this, set this variable to "no". (The default is "no")
#
DHCLIENT_MODIFY_NIS_CONF="no"

## Type: yesno
## Default: yes
#
# Should the DHCP client set the NIS domainname? (yes|no)
# (if the server supplies the nis-domain option)
#
DHCLIENT_SET_DOMAINNAME="no"

## Type: yesno
## Default: yes
#
# When writing a new /etc/resolv.conf, should the DHCP client take an
# existing searchlist and add it to the one derived from the DHCP server?
#
DHCLIENT_KEEP_SEARCHLIST="no"

## Type: integer
## Default: ""
#
# Lease time to request ( -l option)
#
# Specifies (in seconds) the lease that is suggested to the server.
# The default is infinite. For a mobile computer you probably want to
# set this to a lower value.
#
DHCLIENT_LEASE_TIME=""

## Type: integer
## Default: 999999
#
# (only dhcpcd does use this setting)
#
# You can set the timeout (dhcpcd will terminate after this time when it
# does not get a reply from the server).
#
# The default timeout of dhcpcd is 60 seconds. However, we'll set it to a
# much longer time. dhcpcd will then run as a daemon in the background and
# broadcast a DHCPDISCOVER once in a while, trying to get a lease.
#
DHCLIENT_TIMEOUT="999999"

## Type: integer
## Default: ""
#
# (only dhcpcd does use this setting)
#
# INIT-REBOOT timeout ( -z option)
#
# This timeout is specifically to control how long dhcpcd tries to reacquire
# a previous lease (init-reboot state), before it starts getting a new one.
# Default: 10
#
DHCLIENT_REBOOT_TIMEOUT="10"

## Type: string
## Default: AUTO
#
# specify a hostname to send ( -h option)
#
# specifies a string used for the hostname option field when dhcpcd sends DHCP
# messages. Some DHCP servers will update nameserver entries (dynamic DNS).
# Also, some DHCP servers, notably those used by @Home Networks, require the
# hostname option field containing a specific string in the DHCP messages from
# clients.
#
# By default the current hostname is sent ("AUTO"), if one is defined in
# /etc/HOSTNAME.
# Use this variable to override this with another hostname, or leave empty
# to not send a hostname.
#
DHCLIENT_HOSTNAME_OPTION="AUTO"

## Type: string
## Default: ""
#
# specify a client ID ( -I option)
#
# Specifies a client identifier string. By default the hardware address of the
# network interface is sent as client identifier string, if none is specified
# here.
#
# Note that dhcpcd will prepend a zero to what it sends to the server. In the
# server configuration, you need to write the following to match on it:
# option dhcp-client-identifier "\0foo";
#
DHCLIENT_CLIENT_ID=""

## Type: string("dhcpcd dhclient")
## Default: ""
#
# specify a vendor class ID ( -i option)
#
# Specifies the vendor class identifier string. dhcpcd uses the default vendor
# class identifier string (system name, system release, and machine type) if it
# is not specified.
#
DHCLIENT_VENDOR_CLASS_ID=""

## Type: yesno
## Default: no
#
# Send a DHCPRELEASE to the server (sign off the address)? (yes|no)
# This may lead to getting a different address/hostname next time an address
# is requested. But some servers require it.
#
DHCLIENT_RELEASE_BEFORE_QUIT="yes"

## Type: string
## Default: ""
#
# Run this script when the interface is brought up, down, or the IP address
# changes ( -c option)
#
# per default, /etc/sysconfig/network/scripts/dhcpcd-hook is run
#
DHCLIENT_SCRIPT_EXE=""

## Type: yesno
## Default yes
#
# Force dhcpcd to calculate UDP checksum on received packets. (yes|no)
# This corresponds to dhcpcd's -C option.
#
DHCLIENT_UDP_CHECKSUM="yes"

## Type: string
## Default: ""
#
# additional options, e.g. "-B"
#
DHCLIENT_ADDITIONAL_OPTIONS=" "

## Type: integer
## Default: 0
#
# Some interfaces need time to initialize. Add the latency time in seconds
# so these can be handled properly. Should probably set per interface rather tha
n here.
#
DHCLIENT_SLEEP="0"

## Type: integer
## Default: 5
#
# When the DHCP client is started at boot time, the boot process will stop
# until the interface is successfully configured, but at most for
# DHCLIENT_WAIT_AT_BOOT seconds.
#
DHCLIENT_WAIT_AT_BOOT="5"
## Type: yesno
## Default: yes
#
# Should the DHCP client modify /etc/samba/dhcp.conf?
#
DHCLIENT_MODIFY_SMB_CONF="yes"
uhura:/etc/sysconfig/network #

die routes:
uhura:/etc/sysconfig/network # more routes
default 192.168.178.1 - -
uhura:/etc/sysconfig/network #

mein Start-Script aus init.d: (Module gehen bestimmt schoener einzubinden?! - hier viel rumprobiert)
### END INIT INFO
. /etc/rc.status
rc_reset

case "$1" in
start)
# iwconfig wlan1 essid 'widde'
# iwconfig wlan1 key s:nixda

insmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt-rtl.ko
insmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt_wep-rtl.ko
insmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt_tkip-rtl.ko
insmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt_ccmp-rtl.ko
insmod /lib/modules/2.6.13-15-default/extra/ieee80211-rtl.ko
insmod /lib/modules/2.6.13-15-default/extra/r8187.ko
ifconfig wlan0 up
ifup wlan0
# dhcpcd wlan0

# ifconfig wlan0 192.168.178.21 netmask 255.255.255.0 up
# iwconfig wlan0 essid 'widde'
# iwconfig wlan0 key s:nixda
# route add default gw 192.168.178.1
;;
stop)
# ifconfig wlan0 down
rmmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt-rtl.ko
rmmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt_wep-rtl.ko
rmmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt_tkip-rtl.ko
rmmod /lib/modules/2.6.13-15-default/extra/ieee80211_crypt_ccmp-rtl.ko
rmmod /lib/modules/2.6.13-15-default/extra/ieee80211-rtl.ko
rmmod /lib/modules/2.6.13-15-default/extra/r8187.ko

# killall dhcpcd
# rm /var/run/dhcpcd-wlan1.pid
;;
esac
rc_exit
uhura:/etc/sysconfig/network #
 

Leviathan

Hacker
Probier mal:

ifup-dhcp --help

Usage: if{up,down,status}-dhcp [<config>] <hwdesc> [-o <options>]
hwdesc may be the interface name or any valid description
of the corresponding device, for details see ifup(8).
Options are: boot : we are currently booting
hotplug : we are handling a hotplug event
debug : be verbose
rc : indicates that we are called from rcnetwork
All other or wrong options are silently ignored.


Also z.B. ifup-dhcp wlan0
 
OP
M

maettes

Newbie
Hallo,

wie geht das denn ... es klappt - stutz??? Danke fuer den Tipp!

Habe jetzt folgendes in das init.d-Start-Script reingeschrieben:
ifconfig wlan0 up
ifup wlan0
ifup-dhcp wlan0

Habe es auch ohne infconfig und ifup vorweg probiert: das fuehrte aber nur auf so etwas wie "keine IP-Adresse ... backgrounding ...".

Irgendwie steckt da doch noch der Wurm drin:
Warum geht ifup allein bei mir nicht?
Warum geht ifup-dhcp nicht ohne ifup etc. vorweg?
Wie kann man Kinternet dazu bewegen "ifup-dhcp wlan0" zu starten und nicht ifup?

... irgendwie ist das Routing noch recht lahm. O.g. Massnahme klemmt also auch noch. Es ist aber schon besser als vorher!

Hat jemand Tipps, was hier falsch laeuft/verbessert werden koennte?!

irgendwie komme ich nicht weiter. Wie bekomme ich
KInternet dazu, ifcfg-wlan0 mit ifup richtig zu starten???

So ist das System doch noch etwas unperformant - machmal macht das Routing macken - wird langsam und haengt ganz. Ausserdem ist der Start kanns der Start im init-Start-Script doch nicht sein ...

Ifup-dhcp klappt ja einigermassen, aber warum klappt das ifup nicht richtig? Ich meine, die ifcfg-wlan0-Datei zeigt doch, dass alles richtig konfiguriert sein sollte ... oder??? Tippe auf ipv6-Probleme. Wie bekommt man die Module (s. init-Start-Script) ins KInternet (da steht doch was mit Modulen drin, ausserdem kann man irgendwie/was in die hardware-Config einbauen)?

Wer hat Tipps?

Gruss
Matthias
 
Oben