[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-embedded
Subject:    Re: NCD, a light scripting language for network configs and much more
From:       Stephen Hemminger <shemminger () vyatta ! com>
Date:       2012-08-17 16:22:53
Message-ID: 20120817092253.41ade51b () nehalam ! linuxnetplumber ! net
[Download RAW message or body]

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic