organize and document scripts collection
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 26 Oct 2007 16:22:23 +0000 (16:22 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 26 Oct 2007 16:22:23 +0000 (16:22 +0000)
git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@125 836a5e1a-633d-0410-964b-294494ad4392

net.sh [deleted file]
scripts/README [new file with mode: 0644]
scripts/change-ip.txt [new file with mode: 0644]
scripts/net.sh [new file with mode: 0755]
scripts/reboot.txt [new file with mode: 0644]
scripts/tcli.pl
scripts/thompson-cwmp.txt

diff --git a/net.sh b/net.sh
deleted file mode 100755 (executable)
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 (file)
index 0000000..5544d9d
--- /dev/null
@@ -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 (file)
index 0000000..609aa87
--- /dev/null
@@ -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 (executable)
index 0000000..bec0efc
--- /dev/null
@@ -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 (file)
index 0000000..7e226a2
--- /dev/null
@@ -0,0 +1 @@
+:system reboot
index 162a4b4..e3786c3 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 use Expect;
 use Net::Telnet;
 
 use Expect;
 use Net::Telnet;
 
-my $modem = '192.168.1.254';
+my $modem = '10.0.0.138';
 my @commands = (
 ':system config led=flash',
 );
 my @commands = (
 ':system config led=flash',
 );
index 02d7736..dfb8283 100644 (file)
@@ -1,7 +1,7 @@
 # just a comment
 :cwmp config state=disabled
 :cwmp debug traceconfig level=1
 # 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
 
 
 :cwmp config state=enabled mode=full periodicInform=enabled periodicInfInt=15