
#!/bin/sh
# File	: test_routes.sh
# By	: Maarten.deBoer@Atos.net, 260922
# Subject	: Script to test networks and set route to the networks
#
#
#sh ./network-check_ping-nslookup.sh
#Usage: network-check_ping-nslookup <options>
#  Version: 0.24
#  options         :
#    -c|--chkssh   : Chk hostname with SSH (hostname) (254)
#    -e|--end      : End of network (254)
#    -f|--file     : use netw(ork)File (/home/nl19471/data/techlab-netw-check.netw)
#    -h|--help     : this Help
#    -l|--nslookup : with nsLookup
#    -m|--mail     : do send Mail
#    -n|--netw     : Netw (part) (192.168.1)
#    -p|--pel      : PrintEmptyLines
#    -r|--rpt      : RePorT (exceptions)
#    -w|--webupd   : Update Web page (/var/www/html/techlab/netw/index.html)
#    -V            : show Version
#    -x            : set -x
#    --mailto      : change MAILTO address & do send mail (maarten.deboer@atos.
#
#CDE-Violet
#161.89.112.192/26 (255.255.255.64)
#
#10.120.198.0/23 (255.255.254.0)
#10.216.60.0/23 (255.255.254.0)
#10.192.177.0/24 (255.255.255.0)
#10.192.110.128/25 (255.255.255.128)
#
#10.120.213.0/24 (255.255.255.0)
#10.6.191.0/24 (255.255.255.0)
PGM=`basename $0|cut -d\. -f1`
VER="0.1"

# Set routes
# mss:ssn4:fed2
#10.120.198.0/23 (255.255.254.0)
sudo route add -net 10.120.198.0 gw 10.192.109.1 netmask 255.255.254.0
$HOME/scripts/network-check_ping-nslookup --nslookup --mail --netw 10.120.198 -e 254
$HOME/scripts/network-check_ping-nslookup --nslookup --mail --netw 10.120.199 -e 254
#
# mss:ssn4:fed3
#10.216.60.0/23 (255.255.254.0)
sudo route add -net 10.216.60.0 gw 10.192.109.1 netmask 255.255.254.0
$HOME/scripts/network-check_ping-nslookup --nslookup --mail --netw 10.216.60 -e 254
$HOME/scripts/network-check_ping-nslookup --nslookup --mail --netw 10.216.61 -e 254
# mss:ssn4:fed4
#10.192.177.0/24 (255.255.255.0)
sudo route add -net 10.192.177.0 gw 10.192.109.1 netmask 255.255.255.0
$HOME/scripts/network-check_ping-nslookup --nslookup --mail --netw 10.192.177 -e 254
# mss:ssn4:fed5
#10.192.110.128/25 (255.255.255.128)
sudo route add -net 10.192.110.128 gw 10.192.109.1 netmask 255.255.255.128
$HOME/scripts/network-check_ping-nslookup --nslookup --mail --netw 10.192.110 -e 254



exit 0

