Two network configurations
Hi.
I have a little question. I've a laptop with slackware 10.2 on it. At work I have a network configuration with DHCP. In another office I have to set manually a static IP to connect the laptop to the LAN. So the question is: it is possible to have two network configurations and switch between them in a simple way? Now I've made to version of all files having network informations. All times I connect my laptop I have to rename some of those files and reboot. :confused: :scratch: Thanks a lot |
I've recently been supporting a friends effort to get onto Linux, and she had a similar problem with her wireless network. Obviously she needs to store one setup for home and one setup for uni.
As far as I am aware, there is no "network profile" or equivalent in Slackware. At least, if there is, it's so obfuscated that you'd never think to try it ;) The solution I came up with for her was to mess with some of the /etc/rc.d scripts. I did the wireless equivalent of the following: Code:
################# Or if you have more than one physical card: Code:
~# /etc/rc.d/rc.inet1 stop Good luck! - Piete Edit: I forgot to mention, if you hadn't already worked it out, you can now flip between home/work by changing the variable NETSWITCH in your file and rerunning the script as above. Seems simple enough to me, but, I like to make sure there are no misunderstandings! |
Thanks for your reply.
I'll try immediately. Cheers |
Another alternative which I use on my laptop is to replace /etc/rc.d/rc.inet1.conf with a symlink that points to another file (e.g. /etc/rc.d/rc.inet1.conf.home)
I then have another bash script called 'chnet' which takes the rc.inet1.conf extension (e.g. home), then switches the rc.inet1.conf symlink to the profile/ rc.inet1.conf.* I want to use and restarts rc.inet1 However, since I'm having trouble getting the network scripts to play nice with wpa_supplicant at the best of times, for now it's so-so (more useful for switching between wired networks for the moment). |
All times are GMT -5. The time now is 08:51 PM. |