From: Stephen Hemminger <shemminger@vyatta.com>
To: Ambroz Bizjak <ambrop7@gmail.com>
Cc: linux-embedded@vger.kernel.org, linux-hotplug@vger.kernel.org,
netfilter@vger.kernel.org, linux-admin@vger.kernel.org,
torvalds@osdl.org
Subject: Re: NCD, a light scripting language for network configs and much more
Date: Fri, 17 Aug 2012 09:22:53 -0700 [thread overview]
Message-ID: <20120817092253.41ade51b@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAOA3yKKmuAi=CPE=4-hyoGJJ7D7Oa_Bug5G=1Z3xif-5iFGeOw@mail.gmail.com>
On Fri, 17 Aug 2012 12:03:55 +0200
Ambroz Bizjak <ambrop7@gmail.com> wrote:
> Hi. I'm developing a special kind of scripting language which many
> might find useful: http://code.google.com/p/badvpn/wiki/NCD
>
> It was (originally) designed for programming dynamic configuration of
> network interfaces, iptables etc. For example, there are commands that
> observe the presence and link status of network interfaces. Many
> commands are reversible, which makes it very easy to do cleanup
> automatically and implicitly, like removing IP addresses or routes
> when the link goes down on an interface.
>
> The major advantage of this language compared to existing systems like
> NetworkManager and wicd is that it's extremely hackable; you can fine
> tune almost any part of the process. For example, this simple script
> will create a network bridge, ensure that interfaces eth0 and eth1 are
> in the bridge whenever they exist (consider hotplugging USB
> interfaces), and only after eth0 (!) is up and running will it obtain
> an IP address on br0 (!) using DHCP (since we know DHCP server is on
> eth0 not eth1).
>
> process bridge {
> # Choose name of bridge.
> var("br6") bridge_dev;
>
> # Create the bridge (and destroy it on deinit).
> run({"/sbin/brctl", "addbr", bridge_dev},
> {"/sbin/brctl", "delbr", bridge_dev});
>
> # Set bridge up.
> net.up(bridge_dev);
>
> # Wake up ports.
> provide("BRIDGE");
FYI - you can use ip commands now to control bridge.
For all the new features planned, they won't be controllable via brctl.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <shemminger@vyatta.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: NCD, a light scripting language for network configs and much more
Date: Fri, 17 Aug 2012 16:22:53 +0000 [thread overview]
Message-ID: <20120817092253.41ade51b@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAOA3yKKmuAi=CPE=4-hyoGJJ7D7Oa_Bug5G=1Z3xif-5iFGeOw@mail.gmail.com>
On Fri, 17 Aug 2012 12:03:55 +0200
Ambroz Bizjak <ambrop7@gmail.com> wrote:
> Hi. I'm developing a special kind of scripting language which many
> might find useful: http://code.google.com/p/badvpn/wiki/NCD
>
> It was (originally) designed for programming dynamic configuration of
> network interfaces, iptables etc. For example, there are commands that
> observe the presence and link status of network interfaces. Many
> commands are reversible, which makes it very easy to do cleanup
> automatically and implicitly, like removing IP addresses or routes
> when the link goes down on an interface.
>
> The major advantage of this language compared to existing systems like
> NetworkManager and wicd is that it's extremely hackable; you can fine
> tune almost any part of the process. For example, this simple script
> will create a network bridge, ensure that interfaces eth0 and eth1 are
> in the bridge whenever they exist (consider hotplugging USB
> interfaces), and only after eth0 (!) is up and running will it obtain
> an IP address on br0 (!) using DHCP (since we know DHCP server is on
> eth0 not eth1).
>
> process bridge {
> # Choose name of bridge.
> var("br6") bridge_dev;
>
> # Create the bridge (and destroy it on deinit).
> run({"/sbin/brctl", "addbr", bridge_dev},
> {"/sbin/brctl", "delbr", bridge_dev});
>
> # Set bridge up.
> net.up(bridge_dev);
>
> # Wake up ports.
> provide("BRIDGE");
FYI - you can use ip commands now to control bridge.
For all the new features planned, they won't be controllable via brctl.
next prev parent reply other threads:[~2012-08-17 16:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 10:03 NCD, a light scripting language for network configs and much more Ambroz Bizjak
2012-08-17 10:03 ` Ambroz Bizjak
2012-08-17 16:22 ` Stephen Hemminger [this message]
2012-08-17 16:22 ` Stephen Hemminger
2012-08-17 19:04 ` Ambroz Bizjak
2012-08-17 19:07 ` Stephen Hemminger
2012-08-17 19:16 ` Ambroz Bizjak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120817092253.41ade51b@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=ambrop7@gmail.com \
--cc=linux-admin@vger.kernel.org \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-hotplug@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.