[ltp] IP address with wlan and eth
zongliang li
linux-thinkpad@linux-thinkpad.org
Thu, 9 Jan 2003 10:3:6 -0800
you may try to change all things on change netmedia
#!/bin/bash
#change ether to wlan
ifconfig eth0 down
rmmod e100
modprobe hostap_pci
ifconfig wlan0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
ifconfig wlan0 up
#!/bin/bash
#change wlan to ether
ifconfig wlan0 down
rmmod hostap_pci
modprobe e100
ifconfig eth0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
ifconfig eth0 up
>Hi,
>
>I have a T30 with wireless. I switch from cable to wireless and back
>several times a day. I would like to use the same IP address with eth0
>and wlan0 interface where only one is up at a time.
>
>I use following scripts to start and stop wlan:
>
>----------------------------------------
>#!/bin/bash
>
># start the wlan
>
>ifdown eth0
>ifconfig eth0 down
>
>modprobe hostap_pci
>ifup wlan0
>----------------------------------------
>#!/bin/bash
>
># stop wlan
>ifdown wlan0
>
>ifconfig wlan0 down
>rmmod hostap_pci
>
>ifup eth0
>------------------------------------------
>
>If I use different IP adresses for the two network interfaces, it works
>fine. But if I use the same IP address it doesn't work, although only
>one is up at a time. After starting wlan0 I can't get eth0 back to work
>either.
>
>I can use the same IP adress for both interfaces with Windows XP.
>
>Thanks,
>Gregor
>
>--
>The linux-thinkpad mailing list home page is at:
>http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
>
>.