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

Discussion in 'Linux Networking' started by Rohit, Jun 11, 2007.

  1. Rohit

    Rohit Guest

    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, Jun 11, 2007
    1. Advertisements

  2. BTW, please don't multipost, crosspost instead - I just replied to this in


    Tim Southerwood, Jun 11, 2007
    1. Advertisements

  3. Rohit

    Rohit Guest

    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
    Rohit, Jun 11, 2007
  4. 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

    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.


    Tim Southerwood, Jun 11, 2007
  5. Rohit

    Rohit Guest

    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 .

    -- Rohit
    Rohit, Jun 12, 2007
  6. Rohit

    David Brown Guest

    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. :)


    David Brown, Jun 12, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.