Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eth0 und wlan zeitgleich ?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
rennreh
n00b
n00b


Joined: 08 Dec 2005
Posts: 9

PostPosted: Sat Aug 30, 2008 4:12 pm    Post subject: eth0 und wlan zeitgleich ? Reply with quote

Hallo,
Mein Notebook möchte ja eigentlich nur mit Wlan betreiben. Wenn ich mal was größeres über das Netzwerk schreiben möchte bin ich mit Ethernet natürlich besser drann. Leider funktioniert das WLAN aber nur, wenn ich eth0 explizit ausgeschalten habe.

Das witzige an der Sache ist; wenn ich rc-update sage das nur WLAN gestartet werden soll (nach dem booten), steht trotzdem mein aktiviertes eth0 interface bei ifconfig o_0.

so aber nun die Konfigurationsdateien:



/etc/conf.d/net:
config_eth0=("192.168.178.50")

#config_eth0=( "dhcp" )
routes_eth0=("default via 192.168.178.1")
modules=("wpa_supplicant" "dhcpcd")
wpa_supplicant_ra0="-Dwext"
wpa_timeout_ra0=60
#config_ra0=("dhcp")
config_ra0=("192.168.178.49")
routes_ra0=("default via 192.168.178.1")


Dann habe ich die beiden Devices angelegt:
ln -s /etc/conf.d/net.lo /etc/conf.d/net.eth0
ln -s /etc/conf.d/net.lo /etc/conf.d/net.ra0

Dann habe ich die beiden Devices zum default Linux start erklärt:
rc-update add net.eth0 default
rc-update add net.ra0 default

Die Ausgabe für diese
für eth0:
 * Starting eth0
 *   Loading networking modules for eth0
 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4
 *       wpa_supplicant provides wireless
 *       ifconfig provides interface
 *       dhcpcd provides dhcp
 *   Configuring eth0 for MAC address 00:0A:E4:CD:CF:11 ...                                                             [ ok ]
 *   wpa_supplicant_eth0 does not define a driver
 *   wpa_supplicant only works on wireless interfaces
 *   unless the -D wired option is specified
 *   Bringing up eth0
 *     192.168.178.50                                                                                                   [ ok ]
 *   Adding routes
 *     default via 192.168.178.1 ...                                                                                    [ ok ]


für ra0:
 * Starting ra0
 *   Loading networking modules for ra0
 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4
 *       wpa_supplicant provides wireless
 *       ifconfig provides interface
 *       dhcpcd provides dhcp
 *   Configuring ra0 for MAC address 00:15:AF:BA:F7:DA ...                                                              [ ok ]
 *   Starting wpa_supplicant on ra0 ...
ioctl[SIOCSIWAUTH]: Operation not supported                                                                                    [ ok ]th param 4 value 0x0 -
 *   Starting wpa_cli on ra0 ...                                                                                        [ ok ]
 *     Waiting for association                                                                                          [ ok ]
 *     Backgrounding ...


genau jetzt, wo beide geräte aktiv sind, funktioniert das WLAN nicht aber dafür das ethernet. deaktiviere ich das ethernet funktioniert WLAN :)
Hat jemand eine Idee, woarn es liegen kann ?

mfg
Back to top
View user's profile Send private message
celsion
n00b
n00b


Joined: 16 Aug 2005
Posts: 7

PostPosted: Sun Aug 31, 2008 9:04 am    Post subject: Re: eth0 und wlan zeitgleich ? Reply with quote

In der /etc/conf.d/rc folgendes setzen:

RC_PLUG_SERVICES="!net.eth0"

Dann sollte eth0 beim Start nicht gestartet werden.
Falls du eth0 dann doch brauchen solltest kannst du es ja mit "/etc/init.d/net.eth0 start" wieder starten.
Und dann kannst du dir ja auch noch "ifplugd" ankucken und damit eth0 überwachen und automatisch starten lassen.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3369
Location: de

PostPosted: Sun Aug 31, 2008 4:30 pm    Post subject: Reply with quote

Ich bekomme bei mir das Internet auch über das WLAN. Gleichzeitig ist zumindest bei mir auch das Ethernet installiert. Dabei tritt auch folgendes auf: Wenn über WLAN aus irgendwelchen unerfindlichen Gründen mal keine IP bezogen werden kann, versucht das System über eth0 eine IP zu beziehen, obwohl ich diesem Device eine feste IP zugewiesen hab.

Ideen zu Abhilfe:
1. Überprüf mal, über welches Device das Netz geroutet werden soll. Sieht bei mir so aus.
Code:
routes_ath0="default via 192.168.100.1"

2. Weis dem Ethernet eine fixe IP zu.
3. Überprüf, ob das WLAN-Device einen guten Empfang hat. (iwlist ra0 scan sollte mindestens 30 oder darüber haben.)

Die Devices können sogar im gleichen Subnetz sein, das funktioniert bei mir.

Ach ja, jetzt wo ich Deine /etc/conf.d/net anguck, fällt mir auf, dass du da einige Denkfehler drin hast. In der einfachen Konfiguration kannst du den Netzzugang nur über ein Device beziehen. D.h. sowohl eth0 als auch ra0 zusammen geht nicht. Falls du das doch willst, solltest du Dich mal mit dem Thema Bonding beschäftigen.

Ich poste Dir mal meine Konfiguration
/etc/conf.d/net:
modules="wpa_supplicant"
wpa_supplicant_ath0="-Dmadwifi"

config_ath0="192.168.100.102/24"
routes_ath0="default via 192.168.100.1"
dns_servers_ath0="192.168.100.102"
config_eth0="192.168.100.103/24"


Das WLAN-Device kannst du auch per DHCP zuweisen lassen. Ich hab da 'ne feste IP vergeben. Wichtig ist aber, dass du nur bei einem von beiden Devices eine Route angibst und die Daten per DHCP zuweisen lässt.
Back to top
View user's profile Send private message
a.b.
Apprentice
Apprentice


Joined: 23 Mar 2008
Posts: 218
Location: Anus Mundi, Germany

PostPosted: Sun Aug 31, 2008 7:40 pm    Post subject: Reply with quote

Ürf solche sachen wurde der Networkmanager gemacht.
Back to top
View user's profile Send private message
mrsteven
Veteran
Veteran


Joined: 04 Jul 2003
Posts: 1939

PostPosted: Sun Aug 31, 2008 11:43 pm    Post subject: Reply with quote

Im Prinzip mache ich das gleiche. Der Networkmanager ist natürlich eine Möglichkeit, ich persönlich mag ihn jedoch nicht sonderlich. Auf meinem Notebook habe ich nur das WLAN-Interface zum default-Runlevel hinzugefügt und mir für den Fall, dass das Ding doch am Kabel hängt ein paar Einträge in meine sudo-Konfiguration eingetragen:
Code:
%wheel ALL = NOPASSWD: /etc/init.d/net.eth0 start
%wheel ALL = NOPASSWD: /etc/init.d/net.eth0 stop
%wheel ALL = NOPASSWD: /etc/init.d/net.ath0 start
%wheel ALL = NOPASSWD: /etc/init.d/net.ath0 stop

(Namen der Interfaces bitte anpassen!)

Für die sudo-Aufrufe kann man sich natürlich auch noch ein paar Skripte basteln. :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum