Development issues regarding the cerowrt test router project
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Richard Brown <richard.e.brown@dartware.com>
Cc: "cerowrt-devel@lists.bufferbloat.net"
	<cerowrt-devel@lists.bufferbloat.net>
Subject: Re: [Cerowrt-devel] Scripting CeroWrt config
Date: Fri, 10 Feb 2012 03:32:57 +0100	[thread overview]
Message-ID: <CAA93jw67a2c-9Gi_amXZhb_gTTPe9emiPbZLTJ83vXDYyMXdzA@mail.gmail.com> (raw)
In-Reply-To: <0D836AD4-C37B-4ADD-BF98-6A9E913583C0@intermapper.com>

On Thu, Feb 9, 2012 at 11:25 PM, Richard Brown
<richard.e.brown@dartware.com> wrote:
> Folks,
>
> I make a number of changes to the router each time I install new firmware. Specifically:
>
> - I install the snmpd and fprobe packages
> - I start and enable snmpd
> - I configure fprobe to send data to my InterMapper server for monitoring, and add that command to the startup script
> - At some point, I may want to change from 172.30.42.x addresses to my "normal" network address range (192.168.2.x).

I have a similar need to script things better. The uci interface can
be quite cool.
I would suggest playing with that.

example:

uci show network

There is decent doc on that on the openwrt web site.

>
> What's the best way to script this?

#!/bin/sh

opkg update
opkg install snmpd fprobe
sed -i s/172.30.42/192.168.2/g /etc/config/* /etc/babeld.conf (etc -
the full string is on the wiki)

# etc, etc

# and wip for me...
opkg install ipv6policy
net=`generate-rfc4193-addr se00`
parse_network_somehow
get a string of useful networks
uci set network.se00.ip6addr=whatever/64
uci set network.sw00.ip6addr=whatever/64
stick in dns somehow

etc. the ash shell is quite limited so I'd suggest developing your
script on the box.


>I'm quite content to paste in a set of commands over ssh, but wonder if there's another way... (Would save/restore do all this?)

I'm not, and I agree, this gets very tedious after a while.
I'm very glad I use a routing protocol, because keeping
bloatlab #1 operational without it is nearly impossible.

(as it is, I reflash one box, wait for it to appear anew,
 change everything, reboot it, do another one)

and for all that I've 'lost' 2 of the 8 boxes on that network
(in california) and don't know which ones they are!!

save/restore is unlikely to be a good idea at this point. Too much
stuff changing.

What I do for my much more complex configurations (includes ipv6
and I'd like very much to make it more generic)

i snarf a copy of the default config via scp to my main machine
check all that in git
make the 'perfect' configuration
check all those changes into git

build a new box
snarf it
do diffs...


I'm also working on a generic set of testbed tools for
creating ipv6 ula addresses and getting them into dns.



>
> Thanks!
>
> Rich
> _______________________________________________
> Cerowrt-devel mailing list
> Cerowrt-devel@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cerowrt-devel



-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net

  reply	other threads:[~2012-02-10  2:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.0.1328817602.19893.cerowrt-devel@lists.bufferbloat.net>
2012-02-09 22:09 ` [Cerowrt-devel] bql-37 is out - field report Richard Brown
2012-02-09 22:25 ` [Cerowrt-devel] Scripting CeroWrt config Richard Brown
2012-02-10  2:32   ` Dave Taht [this message]
     [not found] <mailman.2.1328904001.31486.cerowrt-devel@lists.bufferbloat.net>
2012-02-11  3:33 ` Richard Brown

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

  List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA93jw67a2c-9Gi_amXZhb_gTTPe9emiPbZLTJ83vXDYyMXdzA@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=cerowrt-devel@lists.bufferbloat.net \
    --cc=richard.e.brown@dartware.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox