LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2003, 10:38 AM   #1
thas
Member
 
Registered: Jan 2003
Location: Canada
Distribution: Mandrake
Posts: 30

Rep: Reputation: 15
Using multiple network profiles?


Hello all,

I've been using a "cut-and-paste off the web" + home brew script to switch my network settings every time I connect at home or at work. This is mainly because I use static IP's at both the locations. Lately, I also tend to use a WIFI card at home (which needs WEP encryption keys etc to be setup).
So my basic script allows me to choose between: home+wired or home+wifi or work+wired

Is there a more eligant way to do this? Can I use the PROFILE switch of kernel boot parameter to do this trick? If so, how can I go about it. I could not google much about this parameter. My recent install of Mandrake 9.1 appears to use 'prof=' boot parameter as well. How can I make use of this parameter?
I clearly don't want to start linuxconf every time and do the switch using it.

Any suggestions would be much appreciated.

-Thas
 
Old 03-31-2003, 11:22 AM   #2
bahamat
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 158

Rep: Reputation: 30
What distro are you using?

Debian has several packages designed to switch network settings at boot time.

Something else you could do, is use one of your user defined runlevels to switch settings.

Say you've got 2 networks that you'll call A and B, and your default runlevel is 5. Set up runlevel 5 to copy the network settings from a network-settings-b file and reload the network. Then set runlevel 4 to do the same thing with A.

Another alternative, would be using DHCP for everything. If you have DHCP servers available on every network you connect to you only have to set it up once. Then all you have to do is take the interface down, plug into the new network and bring it back up.

Hmm, I could go on and on and on. Somebody turn me off, I'm coming up with too many solutions to your problem.
 
Old 03-31-2003, 11:02 PM   #3
thas
Member
 
Registered: Jan 2003
Location: Canada
Distribution: Mandrake
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bahamat
What distro are you using?
I'm using Mandrake 9.1

Quote:
Debian has several packages designed to switch network settings at boot time.
Could you kindly list some? I'll see if there are mandrake equivalent ones (or I could rebuild them from source)

Something else you could do, is use one of your user defined runlevels to switch settings.

Quote:
Say you've got 2 networks that you'll call A and B, and your default runlevel is 5. Set up runlevel 5 to copy the network settings from a network-settings-b file and reload the network. Then set runlevel 4 to do the same thing with A.
I shall experiment with this approach.

Quote:
Another alternative, would be using DHCP for everything. If you have DHCP servers available on every network you connect to you only have to set it up once. Then all you have to do is take the interface down, plug into the new network and bring it back up.
This is not an immediate solution for me since I need static IP's at work and at home. I'm using an older version of OpenMosix at work and this requires static IP's. I use portforwarding through my firewall at home and this requires another static IP at home. Ofcourse, name server entries and gateways are completely are different at the two locations.
 
  


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
Multiple browser profiles during multiple xsessions. Necessary? digorykirke Linux - Software 2 03-20-2005 05:31 PM
Multiple Network Profiles on a Laptop Bill Fox Linux - Laptop and Netbook 3 12-16-2004 07:22 PM
Network Profiles & Printing Thrasis Linux - Networking 2 11-22-2004 06:13 PM
Network User profiles KHAAAN Linux - Networking 1 07-30-2004 04:34 PM
Multiple Network Profiles vrillusions Linux - Networking 4 09-01-2003 06:27 PM

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

All times are GMT -5. The time now is 05:46 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
Open Source Consulting | Domain Registration