Click to See Complete Forum and Search --> : Connecting to Various LANs With a Laptop
JSimmons
09-10-2002, 07:21 AM
I read the thread "Moving my LINUX between office and home" and have some additional questions.
I have a laptop with Redhat 7.3 on it, and would like to boot with one of THREE possible network configurations:
1) Not connected to a network
2) Connecting to my LAN at home (static IP connecting to the net through a router).
3) Connecting to the LAN at work (DHCP).
What I want to do is be able to do one of the three following things (listed in order of preference):
A) When I log in as a regular user (as opposed to "root"), I want the boot process to determine what kind of network I'm connected to and start the eth0 device with appropriate settings.
B) When I log in as a regular user, have three icons on the desktop (or in the menu) that allows me to manually select the configuration to use.
C) Configure three users for me to log in as - one for home, one for work, and one for no network at all.
jumpedintothefire
09-10-2002, 07:30 AM
You want to be able to set the interface while booting, after you log in or both??
JSimmons
09-10-2002, 09:08 AM
I don't want to be bothered, prompted, probed, poked at, or pecked on during bootup.
I would prefer that the system "just know" what to do and do it. I acknoledge the possibility that this would be the most technically challenging (maybe even impossible to achieve?) method.
Failing that, I wouldn't mind having the ability to select which network configuration to use from the desktop. Let me log in and put me at the desktop, and then let me just click on the appropriate icon, and have it reset itself automatically. This option would only work if you could shutdown and then restart the networking services (which I believe can be done). I recognize that the best default setting would be no network at all (and eth0 would not be "up"), as this would probably be a common situation in ewhich a laptop is used, and it would also not make incorrect assumptions about it's networking environment.
As a last resort, I would accept having to log in differently for each type of network, and while a little less convenient, would actually be a logical way to approach it, because then, I could remove the network stuiff from the no-network user and have slightly less cluttered menus.
Now, I read the previous thread from the guy that wants to do pretty much the same thing, but I don't think all of the settings are being modified according to what he needs. If he's using a static IP at work, he's probably got to need to specify a gateway IP, as well as at least one DNS server IP before he can get on the internet through his network. However, no mention was made of these settings in his thread. Lastly, wouldn't a dhcp client also need to know these things?
I'm real new to this Linux stuff as far as day-to-day use is concerned, and even newer where it pertains to laptops, so go slow and don't assume I have anything more than rudimentary reading or comprehension skills. :)
I'm working on a Compaq Presario 1505 with Redhat 7.3 installed.
jumpedintothefire
09-10-2002, 09:28 AM
--quote---
I would prefer that the system "just know" what to do and do it. I acknoledge the possibility that this would be the most technically challenging (maybe even impossible to achieve?) method.
----------
you don't ask for much.....
Set your network not to start on boot...
Then figure out a script that will do what you want....
I'm not going to do it for you...
jumpedintothefire
09-10-2002, 10:11 AM
But for some hints... For a user to be able to access the custom config files, they must be stored somewhere other than /root.
In the config files use
ONBOOT=no
USERCTL=true
dhcp will set the /etc/resolv.conf for you. For static you'll need to copy your own over....
how about 1 icon with choices that come up?
Or just click and go...
JSimmons
09-10-2002, 05:59 PM
I found a way to do it without any scripts. :)
Redhat has a network config and a network device control app.
All I had to do was (using the Network Configuration app) add the eth0 adapter once and configure it to use DHCP, and add it *again* and configure the 2nd one to use a static IP.
Then, using the Network Device Control app, I merely activate the one I need to use.
jumpedintothefire
09-10-2002, 06:18 PM
Ahh, that is what /etc/sysconfig/networking/devices directory is for... The GUI tool holds the configs there..... I see (with out the aid of X) I'm more of a CLI type, old habits die hard..
I guess that app runs a script for you ;)
You never get away from scripting, it just gets hidden.....