LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 10: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, 12: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, 09:40 PM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

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


Reply



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 12:49 PM
Auto switching from wired to wireless networking and back? ronaldv Linux - Wireless Networking 2 06-26-2005 03:27 PM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
Switching Back... ImAnFnNub Linux - Hardware 2 08-17-2004 05:59 AM
switching back to xwin Jerry78 Linux - Newbie 7 07-16-2003 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 06:24 PM.

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
Open Source Consulting | Domain Registration