Edit: i got the problem solved with some help
You need to create some network-profiles from wich you can choose the settings for your network.
So you can switch from eth0 to wlan0 on the fly. Pretty handy
/etc/rc.conf (WARNING: this are just the changings, not the whole rc.conf)
#
HOSTNAME="***"
#
lo="lo 127.0.0.1"
#!eth0="eth0 192.168.2.101 netmask 255.255.255.0 broadcast 192.168.2.255"
#wlan0="dhcp"
INTERFACES=(lo !eth0 !wlan0)
#
#gateway="default gw 192.168.2.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-profiles
#
NET_PROFILES=(!menu eth0 !eth0-dhcp !wlan0-dhcp)
and now add the profiles in /etc/network-profiles
/etc/network-profiles/eth0-dhcp
#
# Network Profile
#
DESCRIPTION="eth0 dhcp"
# Network Settings
INTERFACE=eth0
HOSTNAME=***
# Interface Settings (use IFOPTS="dhcp" for DHCP)
IFOPTS="dhcp"
for example.
or for static ip you change the IFOPT="dhcp" to
IFOPTS="192.168.2.101 netmask 255.255.255.0 broadcast 192.168.2.255"
GATEWAY=192.168.2.1
shure you can do the same for wlan0
to change the network just edit the /etc/rc.conf and just move the "!" from eth0 to wlan0 in line "NET_PROFILES" and restart the network with
(sudo) /etc/rc.d/network restart
Laptop Toshiba Satellite A135-S2276
Details Changes HD RPM 7200 80GB and 2GB PC 4200 Memorie
I am using Atheros WLan with the Wlan driver madwifi and the madwifi-util 0.9.3-1
My problem is, everytime when I change from "Wlan to Lan" or from "Lan to Wlan" I must reboot the computer for get it work.
When I plug in my network cable to the lan port and turn off the Wlan I must reboot to get Lan working. Same is when I unplug my network cable from the ethernet card and turn on my Wlan card I must reboot for get Wlan working. When I boot up with out going over the router and direct in to cabele modem and my cable modem is turned off, but then turn it on later, I can't get any internet until I reboot the Laptop. The network status applet show it is connected on eth0.
/etc/rc.d/network restart
what do I missing?
]]>