LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-05-2006, 10:25 AM   #1
stubbe
LQ Newbie
 
Registered: Jun 2006
Distribution: Debian 8.0 "Jessie"
Posts: 22

Rep: Reputation: 1
Multiple network configurations


Say, I have this laptop, on office they use DHCP, on my home we use static IP Lan, on my friend's home they use static IP Lan, I go to an internet cafes often and they use either DHCP or static IP is there any easy way to get through all these settings easily on my laptop?

thanks
 
Old 06-05-2006, 03:32 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
That can be tricky. What distro and version are you using? There might be a tool just for that distro. There is many variation in the network segment from distro to distro that I haven't really seen a specfic tool that can handle all distros.

One way is to know where you distro stores the network configuration files and then using scripts to bring down the interface, copy over the needed configuration, and then bring up the nic. Again depends on distro. I mostly know Redhat and the Redhat clone structure.

Brian1
 
Old 06-05-2006, 10:29 PM   #3
stubbe
LQ Newbie
 
Registered: Jun 2006
Distribution: Debian 8.0 "Jessie"
Posts: 22

Original Poster
Rep: Reputation: 1
I'll be using either slax or slackware. Just think there might be a tool for this kind of configuration.
 
Old 06-07-2006, 05:12 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
No a slack user so I don't know of any of the configuration tools that are installed.

Brian1
 
Old 06-08-2006, 01:56 AM   #5
stubbe
LQ Newbie
 
Registered: Jun 2006
Distribution: Debian 8.0 "Jessie"
Posts: 22

Original Poster
Rep: Reputation: 1
anything like standalone software outside packages included in slackware?
 
Old 06-08-2006, 02:17 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you use some sort of a network control applet, it may be able to store configurations.

The wpa_supplicant.conf can have different sections, one for each "ssid". This will help with authentication for different wireless networks.

Check your slackware scripts to see if they source a network device configuration file.
Other distro's use configuration files in /etc/sysconfig/network/ of the form "ifcfg-<device>".

You could have a script that copies over the config for the device, for example, ifcfg.eth0.home -> ifcfg-eth0
ifcfg.eth0.work -> ifcfg-eth0, ifcfg.wlan.coffeeshop1->ifcfg-wlan0, ifcfg.wlan.coffeeshop2->ifcfg-wlan0.

I had a similar situation when we were installing equipment at work. We were replacing equipment in 5 sites, and each had a different network. I had to use ftp to download files that needed transferring onto my laptop, and had to reconfigure the ip settings on the fly. I simply wrote a script the A) copied over the old config with the new one. B) restarted the network service. The process would take only a few seconds and was a lot quicker than it would be in windows. ( And was a lot easier and fool proof. This was important on about 3 hours of sleep a night that week).
 
Old 06-08-2006, 01:40 PM   #7
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
I use SuSE which seems to be recognized as one of the most user-friendly in terms of configuration.

I never ran into problems until I came to college with a brand new LinuxCertified laptop. I have DHCP at home, DHCP in my dorm, and a static on my LAN at work.

There's a Network Chooser applet that comes with SuSE, but it seems to be crap.

I've done a bit of investigation, but haven't been able to come up with anything worthwhile. It's definitely a good idea for a project.

In the time being, here is my idea:
configure each network by hand from the CLI. save all appropriate configuration files with unique names. write a small shell program (call it something like "netchoose") which takes an argument and makes symlinks from your configuration files (where your distro looks for them) to the unique files for each connection/location.

the end result being you will sudo netchoose <networkname>

and it will rotate in the correct configuration files, and run your distro's config scripts.
 
  


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
Two network configurations Groucho Slackware 3 01-17-2006 06:48 AM
Storing and selecting multiple configurations qscomputing Linux - General 2 09-17-2005 03:00 AM
How do I Managing multiple X configurations using GDM AntWarrior Linux - Software 2 04-22-2005 06:41 PM
Multiple networking configurations with RedHat 9? pelakh Linux - Networking 0 05-19-2004 09:22 AM
Multiple network configurations at boot time. HOW? FairyFighter Linux - General 14 03-10-2004 05:04 AM

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

All times are GMT -5. The time now is 12:27 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