network profiles - do they work for you? they are broken for me!

John DeDourek dedourek at unb.ca
Thu May 24 23:31:17 UTC 2007


Valent Turkovic wrote:
> Can you please look at my youtube video and then respond if I use
> system-config-network how it is not supposed to be used or if
> system-config-network is broken?
>
> http://www.youtube.com/watch?v=Zoy9k5euZRQ
>
> On 5/17/07, John DeDourek <dedourek at unb.ca> wrote:
>> Valent Turkovic wrote:
>> > Hi,
>> > I tried using network profiles on my Fedora Core 6 and Fedora 7
>> > systems and they don't work for me.
>> >
>> > Can you tell me if you use network profiles build into
>> > system-config-network and system-control-network tools?
>> >
>> > When I use gui system-config-network to setup network profiles no
>> > matter which one I choose and edit I end up with all the profiles with
>> > the same settings!
>> >
>> > I can't setup two different profiles!
>> >
>> > Can you please explain how do you use network profiles via
>> > system-config-network ?
>> >
>> > Thank you.
>> >
>> First, I am doing this from home, from memory, so I can't
>> give you exact wordings of menu items, nor exact location
>> of menus.  But this general procedure works for FC5.  I can't
>> at the moment verify it for FC6 or FC7.
>>
>> I use the following procedure.
>> --I leave the configuration of all the interfaces as installed
>> --I leave the contents of the default profile as installed
>>
>> When I want a new profile, say for my home lan, using the
>> GUI:
>> -- Make a "copy" of the appropriate lan interface
>> -- Edit the copy of the lan interface (leaving the original
>>    alone);  I usually change the name of the interface from
>>    the "Copy of eth0" to something like "HomeLan"; I also edit
>>    whatever other features I want to select for the home LAN,
>>    e.g. static or dynamic IP, etc.
>> -- Create a new profile, say HomeLan; it doesn't bother me
>>    to have a profile and interface named the same; however
>>    if you find that confusing, name the interface "HomeLanIface"
>>    and name the profile "HomeLanProfile"
>> -- Make sure only the appropriate interface (e.g. HomeLan" is
>>    now checked from the profile (HomeLan)
>> -- Save it; (I think File->Save
>> You're done
>>
>> What is hapening behind the scenes:
>>
>> Each of those interfaces is a script file containing bash
>> variable assignments.  You need a separate file for the LAN
>> interface for each profile, because they need to have different
>> values assigned to the variables.  When you say that all the
>> profiles are the same, I am presuming that you are not making
>> a separate copy of the interface for each profile.  So of course,
>> you are always essentially constantly changing the values in
>> the one and only interface file.  These files are kept somewhere
>> like /etc/sysconfig/networking/devices/
>>
>> Each of the profiles is a directory, I think under
>> /etc/sysconfig/networking/profiles/   In that directory is
>> a symbolic link to each of the "device" files that is
>> configured for that interface.
>>
>> When you switch profiles, the "device" files (which are
>> named something like "ifcfg-HomeLanIface") for the old
>> profile are deleted from /etc/sysconfig/network-scripts/ and
>> the "device" files for the new profile are copied in.
>> Actually, I think that's wrong; the scripts are probably not
>> copied, but links are created.  I seem to recall that they
>> are hard links rather than symbolic links.
>>
>> BTW, if you use the commands /sbin/ifup and /sbin/ifdown rather
>> than the GUI to bring the interfaces up and down, use the
>> device name (interface name) that you created in the GUI,
>> not the Linux interface name as you would use it in
>> /sbin/ifconfig.  That is, use
>>     /sbin/ifup HomeLanIface
>>     /sbin/ifdown HomeLanIface
>>
>> Hope this is useful to you.
>>
>> -- 
>> fedora-list mailing list
>> fedora-list at redhat.com
>> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>>
>
>
An important point:  I am describing the situation for FC5; hopefully it has
not changed in your fedora.

You omitted the first step in what I described.  You need to
have two separate copies of the DEVICE.  I see only one device,
called eth0.  Make a copy of the DEVICE.  You click on it and click
the "Copy" button.  The second device will be by default called
"Copy of eth0".

You configure one DEVICE for your home network.  You configure
the other DEVICE for your work network.  Click on the device
and click the edit button.  Note that while editing the DEVICE,
you can change it's name.  "Copy of eth0" isn't very informative.
Don't put any dashes or other special characters in it; you might
confuse the "parser". Why not call them homeeth0 and worketh0?

Understand that the
decisions made by the designer of the system were poor (in
my opinion) because he called these "devices"; they should
really be called device configurations. 

So you will have two DEVICES (device configurations).  Now proceed
with what you are doing to make two profiles.  Make one of the DEVICES
included in the first profile and the other excluded. You "select"
the devices that are included in a profile by turning the "check
mark" on; exclude by turning the check mark off.  Then select the
other profile and reverse the interfaces that are included.

I think that if you make the two copies of the DEVICE (i.e.
device configuration) you will find everything works as you
wish.

As it is, you have only one device configuration (DEVICE) that
is included in both profiles.  Therefore when you edit the
configuration (of the one DEVICE) it is changed in both profiles.

Yes.  I agree.  It is not intuitive and I didn't find the
documentation for it.  (Perhaps I just didn't know where to
look).  But because I need to
use profiles to precisely control networking for my network
research, I don't want to use network manager; it does things
automatically and I need to control the network manually,
when doing network analysis and measurement.
So I spent a day and a half figuring out how it works.

The only bug in FC5 is that sometimes when you make a new profile,
it does a non-expected selection of the devices in the profile.
Once you set them though, (and remember to select "File->save" just
like you were using a word processor) everything is fine.

Let me know how it works out.




More information about the fedora-list mailing list