Multiple Locations

Hi

I’ve struggled for some time to get my static IP configuration correct - it now works! My problem is that, as soon as I take my laptop home to my dynamic home network, I need to change all the settings and lose all the static ones. Of course, when I return to work, I need to put them all in again…

I know that there’s a way of setting up an alternative profile - but I’ve tried the YaSt SCPM manager and don’t understand it. Similarly, I can’t see how to ste up an alternative in NetworkManager.

Can anyone help? I’m fairly new to openSuse and it’s working OK - this is a bugbear just now, and any help would be greatly appreciated.

On Thu, 21 Aug 2008 10:16:02 GMT
aescott <aescott@no-mx.forums.opensuse.org> wrote:

>
> Hi
>
> I’ve struggled for some time to get my static IP configuration correct
> - it now works! My problem is that, as soon as I take my laptop home to
> my dynamic home network, I need to change all the settings and lose all
> the static ones. Of course, when I return to work, I need to put them
> all in again…
>
> I know that there’s a way of setting up an alternative profile - but
> I’ve tried the YaSt SCPM manager and don’t understand it. Similarly, I
> can’t see how to ste up an alternative in NetworkManager.
>
> Can anyone help? I’m fairly new to openSuse and it’s working OK - this
> is a bugbear just now, and any help would be greatly appreciated.
>
>

Is there a reason you need a static IP at work? Do they not supply dynamic
IP’s through DHCP?

Try using DHCP at work.

Most (most) companies IT division use DHCP since it’s easier on them. you
MIGHT need to request an IP address and provide the MAC from your laptop so
they’ll ‘authorize’ its use on their lan.

Loni


L R Nix
lornix@lornix.com

All machines at work (a University) must have static IPs for the wired network. There is a wireless dynamic network but it is sloooww…

On Fri, 22 Aug 2008 06:16:01 GMT
aescott <aescott@no-mx.forums.opensuse.org> wrote:

>
> All machines at work (a University) must have static IPs for the wired
> network. There is a wireless dynamic network but it is sloooww…
>
>

Well DRAT! Well, if you’re not adverse to doing a little typing, you could
‘swap’ the config files as necessary to set up either dhcp or static as
needed.

Assuming your wired nic is ‘eth0’ in your laptop, then the DHCP setup is
stored at:

/etc/sysconfig/network/ifcfg-eth0

and when you’re at work, the STATIC setup is stored at:

/etc/sysconfig/network/ifcfg-eth0

{Grin} Same file! (it’s the contents that matter)

So if you were to make copies of that file during each ‘connection’, and just
drop the appropriate one in there and restart the network system… you’d be
just peachy without all the ‘reconfig’ heartache.

(you’ll need to be root for this)

Set up the system for DHCP access. Now copy the ifcfg-eth0 file to
dhcp-ifcfg-eth0 in the same subdir. (the system keys off of ‘ifcfg-eth0’ part,
so has to be in front)

Now, set up system as you require for STATIC access, and then copy the new
‘ifcfg-eth0’ file to ‘static-ifcfg-eth0’.

So now we have TWO files, one representing the STATIC setup, and one
representing the DHCP setup.

Now create two tiny scripts, one to copy the static version of ifcfg-eth0
into place and restart the network, and the other to copy the dhcp version
and restart.

Yes, the SCPM is supposed to do this, but it’s annoyingly painful to work
with. So we do this:

(the ‘\cp’ lines wrap due to the forum, it’s all one line)

First file: ‘setup-static’

#!/bin/bash

\cp /etc/sysconfig/network/static-ifcfg-eth0
/etc/sysconfig/network/ifcfg-eth0

rcnetwork restart

And second file: ‘setup-dhcp’

#!/bin/bash

\cp /etc/sysconfig/network/dhcp-ifcfg-eth0
/etc/sysconfig/network/ifcfg-eth0

rcnetwork restart

You’ll need to make them executable, so:

chmod +x setup-static setup-dhcp

and then need to put them into your path:

mv setup-static setup-dhcp /usr/local/bin

and to use them as your user:

sudo setup-static
–or–
sudo setup-dhcp

Did that make sense?

You would get to work, turn on laptop, log in, type ‘sudo setup-static’ and
the laptop would come up with the proper static IP. (you could create an
icon for this too!)

Get home, do the same, ‘sudo setup-dhcp’ (and again, an icon is easy!)

To use in an icon, use “kdesu setup-xxx” instead of sudo.

Hope this helps

Loni


L R Nix
lornix@lornix.com

Thanks - it looks a bit more sensible than playing IP ping pong with NetworkManager.

I’ll give it a go when I’m back on site. Thanks again.

On Fri, 22 Aug 2008 10:36:02 GMT
aescott <aescott@no-mx.forums.opensuse.org> wrote:

>
> Thanks - it looks a bit more sensible than playing IP ping pong with
> NetworkManager.
>
> I’ll give it a go when I’m back on site. Thanks again.
>
>

My personal opinion of Network Manager isn’t really complimentary… I’d
REALLY recommend using Traditional mode. Much more reliable.

Loni


L R Nix
lornix@lornix.com
Is it up? Are you sure? Really?

What do you mean? I’m still a noob, so I’m not clear what traditional methods are.

On Fri, 22 Aug 2008 11:36:01 GMT
aescott <aescott@no-mx.forums.opensuse.org> wrote:

>
> What do you mean? I’m still a noob, so I’m not clear what traditional
> methods are.
>
>

oh! I’m sorry.

If you bring up the Yast Network Devices module, you’ll see your ethernet
devices listed… if you’ll click on the leftmost tab (Global Options),
you’ll see where you can enable/disable IPv6 (seems to help speed on some
people’s systems), some other stuff, and the choice between “Network-Manager
mode” and “Traditional Mode”.

Again, this is a personal opinion, but I find “Network-Manager” (ie,
Knetworkmanager) mode to be slightly buggy still, and sometimes unreliable.

Traditional mode doesn’t give you the pretty GUI control, but when it’s ON…
it’s ON. Considering you’re dealing with two wired connections (static and
dhcp), you want the connection to be set up and going when you choose it, not
waiting for Knetworkmanager to think about it.

Using NM mode for wireless is ok I suppose, but again, I can change my
wireless setup faster using the method I described to you faster than
Knetworkmanager can decide to connect or not. And for places I frequent, I
use exactly the system I described to you… ‘sudo setup-home’, ‘sudo
setup-ted’, ‘sudo setup-mike’… for where-ever I might be. And once you
figure out the internal structure of the config file, you can create a new
file for a new place rather quickly too. {Sigh} I’m such a geek!

Hope this helps

Loni


L R Nix
lornix@lornix.com
I want my Network connection now!

Ahh…traditional mode was cunningly disguised as “ifup with traditional mode”…I can see how I was fooled…

You’ll have to excuse me - I’m trying to wean myself off Winwoes, but I’m too used to plug’n’play…Linux is much more for grown-ups. I’ve also recently switched from Fedora (too many little irritations) to openSuse, which has 99% worked out of the box.

My IT degree avoided Linux completely (at one of Scotland’s leading universities) and I’m trying to make up for that woeful gap by forcing myself to use Linux. I do like it, but I think it’ll take a while before I’m fully au fait with it. However, I was the same with DOS and 3.1, so that shows how old I am.

Anyway, thanks again for the time you’ve taken in helping me with this problem. Your solution looks workable (i.e. I mean I can understand it) and I’ll give it a go Monday.

On Fri, 22 Aug 2008 12:26:01 GMT
aescott <aescott@no-mx.forums.opensuse.org> wrote:

>
> Ahh…traditional mode was cunningly disguised as “ifup with traditional
> mode”…I can see how I was fooled…
>
> You’ll have to excuse me - I’m trying to wean myself off Winwoes, but
> I’m too used to plug’n’play…Linux is much more for grown-ups. I’ve
> also recently switched from Fedora (too many little irritations) to
> openSuse, which has 99% worked out of the box.
>
> My IT degree avoided Linux completely (at one of Scotland’s leading
> universities) and I’m trying to make up for that woeful gap by forcing
> myself to use Linux. I do like it, but I think it’ll take a while before
> I’m fully au fait with it. However, I was the same with DOS and 3.1, so
> that shows how old I am.
>
> Anyway, thanks again for the time you’ve taken in helping me with this
> problem. Your solution looks workable (i.e. I mean I can understand it)
> and I’ll give it a go Monday.
>
>

No worries! I’m pleased to hear you’re trying linux and working towards a
full windows weening. (eek!) (defenestration! yes!) (look it up!)

If you’ll keep at it, you’ll do fine. 99% of converting to linux really seems
to be the mindset that needs to change. Yes, this is a slightly more ‘adult’
Operating System. It’s got “slightly” more power. (ha!) And you’ve got
more control of almost everything it does.

Everyone touts the fact that “if you don’t like it, you can fix it”… well,
that’s all great if you can program and want to invest the time… but we all
seem to have lives that need living and jobs that need jobbing…

One of my favorite bits about linux is the fact that since the people who
really WROTE it, actually USE it… the software is generally pretty
intuitive to use, makes sense and just works. I’ve always had visions of
Windows Programmers using OS/2 Warp to write Windows, and wondering why no
one likes the layout, the colors, how it works… etc. Eat your own Dog Food
they say. And linux does it well.

Pop in once in a while and let us know how things are going… ask any
questions you’ve got. There’s some very experienced gurus and wizards here,
all willing to help. (no, I’m not one myself, at least I don’t think so)

Loni


L R Nix
lornix@lornix.com
Depane! Boss, Depane!

Hi

Still finding it frustrating! Why is there no automatic facility like there is in Windows? I like Linux and I’m sticking with it, but I find that I can get about 95% of it working (networking, printing, multimedia and so on), whereas it all works in Windows.

I know that I shouldn’t expect two different OSes to do the same things - but Linux is better than Windows, so should perform better!!!

Anyway, I’ll peresvere - thanks again for the advice.

BTW - do you know if there is a site for a Linux wishlist? There are a few things I’d like to see (like the network thingy!!!)

Might have something to do with the annual income: 17,681 million

Probably can afford a bit of R&D from that

aescott schrieb:
> I like Linux and I’m sticking with it, but I find
> that I can get about 95% of it working (networking, printing, multimedia
> and so on), whereas it all works in Windows.

That last half-sentence is not true.

I know that, and I’m grateful for it, because I make a substantial
part of my living from things not working in Windows. :slight_smile:

SCNR
T.


Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany

Tilman

All I meant was that Windows generally works by downloading a .exe file - there is little or no config for most apps. Also, the change between static and dynamic network addresses is handled seamlessly. I know because that is exactly what my laptop does when I’m running Windows.

However, I have managed to get a solution: I have switched to KDE and it seems to allow me to tell the laptp which network I want it to use. So I’m happy.

Thanks for all the posts and help.