LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 02-08-2006, 11:27 AM   #1
FWSquatch
Member
 
Registered: Jan 2006
Location: Fort Worth, TX
Distribution: Ubuntu, DSL
Posts: 47

Rep: Reputation: 15
Switching back and forth between Wireless and Ethernet


I have an HP Omnibook XE3 running Debian Sarge. For the longest time, I would plug into my home and work network with a 25 ft ethernet cable. Well, I finally got my wireless card working and now I can run it on my wireless network at home, but when I go to work, I have to plug into theirs. How do I switch back and forth between my wireless and my network card?
 
Old 02-08-2006, 01:23 PM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
There are hotplug scripts that can detect whether a physical network cable is attached, allowing you to then activate the wired interface, otherwise activate your wireless connection, and wrap all this into your own startup script. Personally, I just bring up my wireless connection automatically on boot, then have a quick shell script that I can run to let me pick an additional network to connect into at work. An example would be:
Code:
#!/bin/bash
depmod -a
modprobe ndiswrapper

ifconfig eth0 down
ifconfig wlan0 down

iwconfig wlan0 essid "youressid"
iwconfig wlan0 key restricted [1] yourkey
ifconfig wlan0 youripaddress netmask yournetmask

route add default gw yourdefaultgw

ifconfig wlan0 up
and something similar for your wired connection. The whole script including the menu system can be found here - http://www.fouldsy.com/?p=157 . Just adjust it to your needs.
 
Old 02-08-2006, 10:40 PM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
You can take a look at ifplugd:
http://www.stud.uni-hamburg.de/users...jects/ifplugd/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why I am considering switching back... guardianfox General 16 12-09-2005 01:49 PM
Auto switching from wired to wireless networking and back? ronaldv Linux - Wireless Networking 2 06-26-2005 04:27 PM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 06:57 PM
Switching Back... ImAnFnNub Linux - Hardware 2 08-17-2004 06:59 AM
switching back to xwin Jerry78 Linux - Newbie 7 07-16-2003 10:14 AM


All times are GMT -5. The time now is 05:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration