From: Dobrica Pavlinusic Date: Fri, 26 Oct 2007 16:22:23 +0000 (+0000) Subject: organize and document scripts collection X-Git-Url: http://git.rot13.org/?p=perl-cwmp.git;a=commitdiff_plain;h=8d184cf0123d6cf36bde4043bef6c183ec64b33b organize and document scripts collection git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@125 836a5e1a-633d-0410-964b-294494ad4392 --- diff --git a/net.sh b/net.sh deleted file mode 100755 index 4458482..0000000 --- a/net.sh +++ /dev/null @@ -1,11 +0,0 @@ - -if [ -z "$1" ] ; then - eth=eth0 -# eth=ath0:0 -else - eth=$1 -fi - -sudo ifconfig $eth 192.168.1.90 up -sudo route add -host 192.168.1.254 dev $eth -echo "Setup of $eth to 192.168.1.90 ready" diff --git a/scripts/README b/scripts/README new file mode 100644 index 0000000..5544d9d --- /dev/null +++ b/scripts/README @@ -0,0 +1,25 @@ +This is small collection of useful scripts and configuration +to get you started. + +Premise is simple: you have several modems connected to eth0 +and you are using some other device (e.g. wifi, other network card) to +connect to internet. + +We will configure two networks: + +192.168.1.240/28 +10.0.0.0/8 + +First one is to accomodate Thompson's default setting of 192.168.1.254. + +Even if your internet connection uses gateway on 192.168.1.1 it will still +work unless you are using IP addresses over 192.168.1.240. + +Then execute: + +./net.sh + +or with some other network device: + +./net.sh eth1 + diff --git a/scripts/change-ip.txt b/scripts/change-ip.txt new file mode 100644 index 0000000..609aa87 --- /dev/null +++ b/scripts/change-ip.txt @@ -0,0 +1,4 @@ +:ip ipadd intf=LocalNetwork addr=192.168.1.242 +:ip iplist +:ip ipdelete addr=192.168.1.254 +:ip iplist diff --git a/scripts/net.sh b/scripts/net.sh new file mode 100755 index 0000000..bec0efc --- /dev/null +++ b/scripts/net.sh @@ -0,0 +1,16 @@ + +if [ -z "$1" ] ; then + eth=eth0 +# eth=ath0:0 +else + eth=$1 +fi + +# new 192.168.1.240/28 network + +sudo ifconfig $eth down +sudo ifconfig $eth 192.168.1.241 up +# backup network (thompson 10.0.0.138) +sudo ifconfig $eth:10 10.0.0.1 up +sudo route add -net 192.168.1.240/28 dev $eth +echo "Setup of $eth to 192.168.1.90 ready" diff --git a/scripts/reboot.txt b/scripts/reboot.txt new file mode 100644 index 0000000..7e226a2 --- /dev/null +++ b/scripts/reboot.txt @@ -0,0 +1 @@ +:system reboot diff --git a/scripts/tcli.pl b/scripts/tcli.pl index 162a4b4..e3786c3 100755 --- a/scripts/tcli.pl +++ b/scripts/tcli.pl @@ -4,7 +4,7 @@ use strict; use Expect; use Net::Telnet; -my $modem = '192.168.1.254'; +my $modem = '10.0.0.138'; my @commands = ( ':system config led=flash', ); diff --git a/scripts/thompson-cwmp.txt b/scripts/thompson-cwmp.txt index 02d7736..dfb8283 100644 --- a/scripts/thompson-cwmp.txt +++ b/scripts/thompson-cwmp.txt @@ -1,7 +1,7 @@ # just a comment :cwmp config state=disabled :cwmp debug traceconfig level=1 -:cwmp server config url=http://192.168.1.90:3333/ +:cwmp server config url=http://192.168.1.241:3333/ :cwmp config state=enabled mode=full periodicInform=enabled periodicInfInt=15