Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Correct way to control alias of a NIC interface from application running as non-root

Reply
 
Thread Tools Display Modes
  #1  
Old 06-11-2007, 10:55 AM
Default Correct way to control alias of a NIC interface from application running as non-root



I am working on some application which requires taking down alias
interface (say eth0:1) on one machine and bring an alias with same IP
on another machine. So far i was running my application as root itself
but now i want to stop that . But the steps remain same.
So what can be the best strategy to control that alias interface
from my application??. I also have a kernel module loaded on the
system.So kernel bases approaches will also be ok. I am just not quite
sure about which strategy is best from security point of view or any
other problems for that matter.

Few of things coming to my mind --

1: create a process as part of module loading, which will be done by
root anyway. My application can talk to this process whenever
something to be done requires root access.

2: Remove and add alias ip from kernel code itself. (I have not yet
figured this out yet though.)

3: "Allow other users to control the alias interface " and do
everything from application itself as normal user.

Any suggestions ??

-- Rohit



Rohit
Reply With Quote
  #2  
Old 06-11-2007, 12:28 PM
Tim Southerwood
Guest
 
Posts: n/a
Default Re: Correct way to control alias of a NIC interface from application running as non-root

Rohit wrote:

> I am working on some application which requires taking down alias
> interface (say eth0:1) on one machine and bring an alias with same IP
> on another machine. So far i was running my application as root itself
> but now i want to stop that . But the steps remain same.


BTW, please don't multipost, crosspost instead - I just replied to this in
c.o.l.development.system

Cheers

Tim
Reply With Quote
  #3  
Old 06-11-2007, 02:00 PM
Rohit
Guest
 
Posts: n/a
Default Re: Correct way to control alias of a NIC interface from application running as non-root

On Jun 11, 4:28 pm, Tim Southerwood <t...@dionic.net> wrote:
> Rohit wrote:
> > I am working on some application which requires taking down alias
> > interface (say eth0:1) on one machine and bring an alias with same IP
> > on another machine. So far i was running my application as root itself
> > but now i want to stop that . But the steps remain same.

>
> BTW, please don't multipost, crosspost instead - I just replied to this in
> c.o.l.development.system
>
> Cheers
>
> Tim



I do not know why you are advocating this as some people may have
subscibed to only one of them and get to see the Q only once. And the
Question i asked seems to be ok to be asked in either of them. Those
who see it twice can just ignore it when they see it second time.
Still if you think this is not good idea , let me know why ??

-- Rohit


Reply With Quote
  #4  
Old 06-11-2007, 02:41 PM
Tim Southerwood
Guest
 
Posts: n/a
Default Re: Correct way to control alias of a NIC interface from application running as non-root

Rohit wrote:

> On Jun 11, 4:28 pm, Tim Southerwood <t...@dionic.net> wrote:
>> Rohit wrote:
>> > I am working on some application which requires taking down alias
>> > interface (say eth0:1) on one machine and bring an alias with same IP
>> > on another machine. So far i was running my application as root itself
>> > but now i want to stop that . But the steps remain same.

>>
>> BTW, please don't multipost, crosspost instead - I just replied to this
>> in c.o.l.development.system
>>
>> Cheers
>>
>> Tim

>
>
> I do not know why you are advocating this as some people may have
> subscibed to only one of them and get to see the Q only once. And the
> Question i asked seems to be ok to be asked in either of them. Those
> who see it twice can just ignore it when they see it second time.
> Still if you think this is not good idea , let me know why ??
>
> -- Rohit


I'm not going to argue or start a flame - it's not a big thing, but I will
explain my argument gladly.

The usual argument in favour of crossposting is less bandwidth and disk
usage on the news-servers and less bandwidth usage to the newreader (some
people still have only dial-up). But there is a further take, which is that
with multiposting:

Someone in group A reponds helpfully, taking 10 minutes to think and type up
a 50 line detailed repsonse.

A while later, person in group B, unaware of person in group A's answer,
spends 10 minutes to come up with an equally helpful and basically similar
answer.

If person in group B had seen the reply in group A via crossposting, they
may have thought "that's a good answer, just what I would have said" and
simply move on with their life.

In other words, it can waste the time of helpful people unnecessarily.

It's not big deal, but I've seen the effect a number of times and it's
easily avoided.

My opinion only, but I think it is rational.

Cheers

Tim
Reply With Quote
  #5  
Old 06-12-2007, 05:38 AM
Rohit
Guest
 
Posts: n/a
Default Re: Correct way to control alias of a NIC interface from application running as non-root

On Jun 11, 6:41 pm, Tim Southerwood <t...@dionic.net> wrote:
> Rohit wrote:
> > On Jun 11, 4:28 pm, Tim Southerwood <t...@dionic.net> wrote:
> >> Rohit wrote:
> >> > I am working on some application which requires taking down alias
> >> > interface (say eth0:1) on one machine and bring an alias with same IP
> >> > on another machine. So far i was running my application as root itself
> >> > but now i want to stop that . But the steps remain same.

>
> >> BTW, please don't multipost, crosspost instead - I just replied to this
> >> in c.o.l.development.system

>
> >> Cheers

>
> >> Tim

>
> > I do not know why you are advocating this as some people may have
> > subscibed to only one of them and get to see the Q only once. And the
> > Question i asked seems to be ok to be asked in either of them. Those
> > who see it twice can just ignore it when they see it second time.
> > Still if you think this is not good idea , let me know why ??

>
> > -- Rohit

>
> I'm not going to argue or start a flame - it's not a big thing, but I will
> explain my argument gladly.
>
> The usual argument in favour of crossposting is less bandwidth and disk
> usage on the news-servers and less bandwidth usage to the newreader (some
> people still have only dial-up). But there is a further take, which is that
> with multiposting:
>
> Someone in group A reponds helpfully, taking 10 minutes to think and type up
> a 50 line detailed repsonse.
>
> A while later, person in group B, unaware of person in group A's answer,
> spends 10 minutes to come up with an equally helpful and basically similar
> answer.
>
> If person in group B had seen the reply in group A via crossposting, they
> may have thought "that's a good answer, just what I would have said" and
> simply move on with their life.
>
> In other words, it can waste the time of helpful people unnecessarily.
>
> It's not big deal, but I've seen the effect a number of times and it's
> easily avoided.
>
> My opinion only, but I think it is rational.
>
> Cheers
>
> Tim


Well then i would change the way i do things here. Here is what i am
going to do. I will post the Q to group A only, wait for sometime (how
much ?? it's relative ).
If i do not get any reply, then only i go to group B (which according
to me is second best candidate for my Q.). I think this addresses
concerns of both of ours.

Anyway thanks for ur reply and suggestions about multiposting. It made
me think more about other view and changed the way i will do things in
future .

Cheers,
-- Rohit

Reply With Quote
  #6  
Old 06-12-2007, 10:18 PM
David Brown
Guest
 
Posts: n/a
Default Re: Correct way to control alias of a NIC interface from applicationrunning as non-root

Rohit wrote:
> On Jun 11, 6:41 pm, Tim Southerwood <t...@dionic.net> wrote:
>> Rohit wrote:
>>> On Jun 11, 4:28 pm, Tim Southerwood <t...@dionic.net> wrote:
>>>> Rohit wrote:
>>>>> I am working on some application which requires taking down alias
>>>>> interface (say eth0:1) on one machine and bring an alias with same IP
>>>>> on another machine. So far i was running my application as root itself
>>>>> but now i want to stop that . But the steps remain same.
>>>> BTW, please don't multipost, crosspost instead - I just replied to this
>>>> in c.o.l.development.system
>>>> Cheers
>>>> Tim
>>> I do not know why you are advocating this as some people may have
>>> subscibed to only one of them and get to see the Q only once. And the
>>> Question i asked seems to be ok to be asked in either of them. Those
>>> who see it twice can just ignore it when they see it second time.
>>> Still if you think this is not good idea , let me know why ??
>>> -- Rohit

>> I'm not going to argue or start a flame - it's not a big thing, but I will
>> explain my argument gladly.
>>
>> The usual argument in favour of crossposting is less bandwidth and disk
>> usage on the news-servers and less bandwidth usage to the newreader (some
>> people still have only dial-up). But there is a further take, which is that
>> with multiposting:
>>
>> Someone in group A reponds helpfully, taking 10 minutes to think and type up
>> a 50 line detailed repsonse.
>>
>> A while later, person in group B, unaware of person in group A's answer,
>> spends 10 minutes to come up with an equally helpful and basically similar
>> answer.
>>
>> If person in group B had seen the reply in group A via crossposting, they
>> may have thought "that's a good answer, just what I would have said" and
>> simply move on with their life.
>>
>> In other words, it can waste the time of helpful people unnecessarily.
>>
>> It's not big deal, but I've seen the effect a number of times and it's
>> easily avoided.
>>
>> My opinion only, but I think it is rational.
>>
>> Cheers
>>
>> Tim

>
> Well then i would change the way i do things here. Here is what i am
> going to do. I will post the Q to group A only, wait for sometime (how
> much ?? it's relative ).
> If i do not get any reply, then only i go to group B (which according
> to me is second best candidate for my Q.). I think this addresses
> concerns of both of ours.
>
> Anyway thanks for ur reply and suggestions about multiposting. It made
> me think more about other view and changed the way i will do things in
> future .
>
> Cheers,
> -- Rohit
>


Just to add my two øre...

With cross-posting, if you post a question in groups A and B, and
someone in group A replies, then people in group B see the answer too.
Assuming the cross-posting was to appropriate groups, this spreads the
knowledge to more interested people. It also means that someone only in
group B will be unable to add to the reply in group A. For example, I
haven't seen Tim's answer to your question, and therefore can't learn
from it or add to it. Remember that Usenet is only partly about getting
answers to a poster's question - it's about sharing information, ideas
and tips with many interested people (as well as being about
entertainment, time-wasting, etc. :-)

mvh.,

David
Reply With Quote
Reply

Tags
alias, application, control, correct, interface, nic, nonroot, running

Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:47 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.