public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] net.eth0
@ 2003-03-08 20:46 Frederick Reeve
  2003-03-09  5:16 ` Martin Schlemmer
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Frederick Reeve @ 2003-03-08 20:46 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

Hey guys.

I have made some small changes to the default /etc/inid.d/net.eth0 and
/etc/conf.d/net.  These changes simply add functionality alowing for an
alternate ip config should dhcpcd fail to find a server.  I made these
small changes because I use a labtop and when I would boot away from my
network apache, fam, and other needed daemons would fail causing poblems
for many programs (at least ones I run) and this prevents this.  Anyway
I have included the files.  Please look at them and tell me what you
think.  I have CLEARLY marked what I changed.

I'm very sorry if this is the wrong place to submit this.  I looked for
a good place honest and this is what I ended up with.

Also I have a question to put out.  Does anyone have a good reason not
to add a force option to emerge.  The way I see it the worst that can
happen is the package fails to build.  I have had a couple our users ask
for this in #gentoo irc the last couple of days and I wouldn't mind
seeing it my self.  It wouldn't be hard to do maybe I could 'try' if no
one objects.  It may also be needed to include a note with this function
that states using it could cause conflicks.  I have been editing my
/usr/portage/profiles/package.mask and that get old fast when over
writen every sync.

Well thanks for listening.

Frederick <sabin>



[-- Attachment #2: net-update.tar.gz --]
[-- Type: application/x-gzip, Size: 2309 bytes --]

[-- Attachment #3: Type: text/plain, Size: 37 bytes --]

--
gentoo-dev@gentoo.org mailing list

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [gentoo-dev] net.eth0
@ 2003-03-19 17:16 Wout Mertens
  0 siblings, 0 replies; 16+ messages in thread
From: Wout Mertens @ 2003-03-19 17:16 UTC (permalink / raw
  To: gentoo-dev

Argh, wrong again :(

---------- Forwarded message ----------
Date: Wed, 19 Mar 2003 16:47:07 +0100 (CET)
From: Wout Mertens <wmertens@gentoo.org>
To: gentoo-dev@gentoo.com
Cc: Joseph Carter <knghtbrd@efn.org>,
     Frederick Reeve <frederick@woodland-i.org>,
     Alain Penders <alain@gentoo.org>, Martin Schlemmer <azarah@gentoo.org>
Subject: Re: [gentoo-dev] net.eth0

(People in Cc: Sorry for the repost, I used the wrong email-address)

On Tue, 18 Mar 2003, Martin Schlemmer wrote:
> On Mon, 17 Mar 2003 16:35:30 +0100 (CET)
> Wout Mertens <wmertens@gentoo.org> wrote:
>
> > I guess Azarah could add support for a /etc/net.d/ directory with
> > scripts that are called with the arguments <interface> <state>. Or
> > something along those lines. I know I would like something that
> > reconfigures my wwwoffle for the current network automatically.
>
> I have been thinking about this in the past (think there is a bug
> about ipv6 that I suggested that we make it much more modular),
> but I have been too busy, and I do not want to rush it and do
> an half backed job that have to be redone/bandaged at some stage
> in the future again.

Well, maybe we can kick off a conversation?
Some issues:
- Some people have static networks. It would be nice if there was a set
  way to detect and configure those. They can always hand-roll their own
  network scripts, but those will not be the same quality that we all can
  do.
- Some services bind on specific interfaces, and need to be notified when
  one comes up. (apache, squid, ...)
- Some services only need to know if there is network connectivity or not,
  and they need to be notified when the first interface comes up and the
  last interface goes down (ntp daemons, wwwoffle, ...)
- Some services would like to know when the ip address changes (dynamic
  dns, etc)
- There is currently no fixed way to setup your wireless interfaces. They
  have extra parameters that can be set by iwconfig (wireless-tools),
  which needs to be done before dhcpcd is called. A simple matter of
  adding iwconfig_${IFACE}, I think.
- At my company, we use LEAP authentication for wireless. This is a
  proprietary extension, but it's used by thousands of people. I'm not
  claiming that they are all using gentoo, but it would be cool to have
  support for this. How I do it, I first let dhcpcd fail, then set up the
  card for LEAP, run interactive authentication (xterm for the console
  user), and if it succeeded, run dhcpcd again.
- Some people want to use a different dhcp client
- Some interfaces have media detection. These could be automatically
  brought up when a cable is inserted. (See sys-apps/ifplugd)

So here is a modular approach:
- To bring an interface up, try a list of "activation" scripts that try to
  bring it up and test the outcome. Examples: a list of ips with an ip
  that should be active when up, dhcpcd, pump, leap-auth+dhcp, ... . The
  user chooses the order by setting up a net/activate.d directory, and
  several standard scripts are included (and they get info from
  /etc/conf.d/net). Scripts that just set up interfaces, like iwconfig,
  always fail after doing their stuff.
  These scripts also provide the command that needs to be run to shut down
  the interface again. This could be the script itself with different
  parameters.
- Any time networking parameters change, scripts in a net/event.d get
  called in order. They get the following parameters:
  - interface that changed
  - What happened to it: up, down, ipchange, linkup, linkdown
  - ip address of that interface
  - the "global" networking state: netup, netdown, netsame. This is for
    scripts that only care about the networking state and not about
    interfaces.
  If possible, the dhcp clients should also call these scripts when the
  ip address changed.
  Ifplugd could notify these script that the link went down, but wait a
  little while before actually bringing the interface down. This could be
  used to set wwwoffled or chronyd in offline mode without impacting
  running tcp connections. And when the link goes up again before the
  interface is brought down, this could be used to kick dhcpcd to verify
  the lease (dhcpcd -n).

A similar, and maybe cleaner approach would not use directories but just
strings with functions/scripts to be called, defined in /etc/conf.d/net.
(The rest stays the same)
Something like

activate_eth0="dhcp static"
activate_eth1="iwconfig static dhcp leap"
activate_ppp0="ppp" # Extra parameters in net.ppp0
events_eth0="apache"
events_ppp0="dyndns"
events_global="wwwoffled chronyd"

What do you think? I think this would be able to take all the things I
tried to do over the last few years :)

We could start prototyping something in a separate ebuild,
sys-apps/gentoo-net or something, and when it is stable, merge it back in
baselayout.

Comments?

Wout.

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-03-22  2:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-08 20:46 [gentoo-dev] net.eth0 Frederick Reeve
2003-03-09  5:16 ` Martin Schlemmer
     [not found] ` <20030309070831.GB23088@purematrix.com>
2003-03-09 10:02   ` Frederick Reeve
2003-03-09 22:58     ` Joseph Carter
2003-03-17 15:35       ` Wout Mertens
2003-03-18  3:09         ` Joseph Carter
2003-03-18 18:44         ` Martin Schlemmer
     [not found]           ` <Pine.GSO.4.53.0303191423140.15485@oaktree.cisco.com>
2003-03-21  6:43             ` Martin Schlemmer
2003-03-21 15:42               ` Wout Mertens
2003-03-21 15:44                 ` Paul de Vrieze
2003-03-21 23:03                 ` Martin Schlemmer
2003-03-22  2:07                   ` Nick Matthews
2003-03-09 10:41 ` Sven Vermeulen
2003-03-09  9:58   ` Frederick Reeve
2003-03-10  6:44     ` Sven Vermeulen
  -- strict thread matches above, loose matches on Subject: below --
2003-03-19 17:16 Wout Mertens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox