diff options
author | Jonas Lindstad <jonaslindstad@gmail.com> | 2016-05-23 13:56:26 +0200 |
---|---|---|
committer | Jonas Lindstad <jonaslindstad@gmail.com> | 2016-05-23 13:56:26 +0200 |
commit | d7db901796438c811ab239ecbbee0ad0dd49832c (patch) | |
tree | 870021685ed17fbdc14e5b9b24cfe0687eeccf20 /extras/fap/httpd | |
parent | 34cebee827c1fb2410ea8551a5a3c3242084fc07 (diff) |
Added all changes to FAP for TG16 + some documentation
Diffstat (limited to 'extras/fap/httpd')
15 files changed, 555 insertions, 810 deletions
diff --git a/extras/fap/httpd/# DEPRECATED/server_http.py b/extras/fap/httpd/# DEPRECATED/server_http.py deleted file mode 100755 index a9ae74c..0000000 --- a/extras/fap/httpd/# DEPRECATED/server_http.py +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -from http.server import BaseHTTPRequestHandler, HTTPServer -from string import Template -import time -import psycopg2 -import psycopg2.extras -import sys -import os - -def main(): - # - # Settings - # - settings = { - 'db': { - 'user': 'bootstrap', - 'password': 'asdf', - 'dbname': 'bootstrap', - 'host': 'localhost' - }, - 'http': { - 'host': '0.0.0.0', - 'port': 80 - } - } - - # - # Connect to DB - # - try: - connect_params = ("dbname='%s' user='%s' host='%s' password='%s'" % (settings['db']['dbname'], settings['db']['user'], settings['db']['host'], settings['db']['password'])) - conn = psycopg2.connect(connect_params) - cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) - # cur.execute("""SELECT * from switches""") - # rows = cur.fetchall() - # print ("\nSwitches in DB during server_http.py startup:") - # for row in rows: - # print (" --> %s, connected to %s port %s" % (row['hostname'], row['distro_name'], row['distro_phy_port'])) - - except (psycopg2.DatabaseError, psycopg2.OperationalError) as e: - print ('Error: %s' % e) - sys.exit(1) - - except: - print(sys.exc_info()[0]) - sys.exit(1) - - def template_get(model): - return open('fap/httpd/' + model + '.template').read() - - def template_parse(template_src, hostname): - cur.execute("SELECT * FROM switches WHERE hostname = '%s'" % hostname) - if(cur.rowcount == 1): - row = cur.fetchall()[0] - d={ - 'hostname': row['hostname'], - 'distro_name': row['distro_name'], - 'distro_phy_port': row['distro_phy_port'], - 'mgmt_addr': row['mgmt_addr'], - 'mgmt_cidr': row['mgmt_cidr'], - 'mgmt_gw': row['mgmt_gw'], - 'mgmt_vlan': row['mgmt_vlan'], - 'traffic_vlan': row['traffic_vlan'], - 'mgmt_v6_addr': row['mgmt_v6_addr'], - 'mgmt_v6_cidr': row['mgmt_v6_cidr'], - 'mgmt_v6_gw': row['mgmt_v6_gw'] - } - cur.execute("UPDATE switches SET last_config_fetch = '%s' WHERE hostname = '%s'" % (str(time.time()).split('.')[0], hostname)) # updated DB with last config fetch - conn.commit() - return Template(template_src).safe_substitute(d) - else: - return False - - class httpd(BaseHTTPRequestHandler): - def do_GET(self): - print('[%s] [%s] Incoming HTTP GET URI:%s ' % (self.client_address[0], time.asctime(), self.path)) - - # Client asks for the config file - if '/tg-edge/' in self.path: - hostname = self.path.split('/tg-edge/')[1] - if len(hostname) > 0: - print('[%s] --> Hostname "%s" accepted, fetching info from DB' % (self.client_address[0], hostname)) - template_parsed = template_parse(template_get('ex2200'), hostname) - if template_parsed: - print('[%s] --> Template successfully populated' % self.client_address[0]) - print('[%s] --> Sending response to client' % self.client_address[0]) - self.send_response(200) - self.send_header("Content-type", "text/plain") - self.end_headers() - self.wfile.write(bytes(template_parsed, "utf-8")) - print('[%s] --> Success - %s bytes sent to client' % (self.client_address[0], len(template_parsed))) - else: - print('[%s] --> Error - could not find hostname "%s" in DB' % (self.client_address[0], hostname)) - else: - print('[%s] --> Rejected due to missing hostname' % self.client_address[0]) - - # Client asks for a file download - most likely a JunOS file - elif '/files/' in self.path: - # It seems that "http.server" escapes nastiness from the URL - ("/files/../../../root_file" => "/files/root_file") - requested_file = self.path.split('/files/')[1] - files_dir = 'fap/httpd/files/' - print('[%s] --> File request for "%s" in "%s"' % (self.client_address[0], requested_file, files_dir)) - if os.path.isfile(files_dir + requested_file): - print('[%s] --> File found' % self.client_address[0]) - try: - f = open(files_dir + requested_file) - self.send_response(200) - self.send_header('Content-type', 'application/x-gzip') # correct content type for tar.gz - self.end_headers() - print('[%s] --> File transfer started' % self.client_address[0]) - f = open(files_dir + requested_file, 'rb') - self.wfile.write(f.read()) - f.close() - print('[%s] --> File transfer completed' % self.client_address[0]) - return - except IOError: - self.send_error(404,'File Not Found: %s' % self.path) - print('[%s] --> ERROR 404 - File not found' % self.client_address[0]) - pass - except: - print('[%s] --> Generic error during file reading' % self.client_address[0]) - pass - else: - print('[%s] --> File request rejected due to nonexisting file' % self.client_address[0]) - else: - print('[%s] --> rejected due to bad URI' % self.client_address[0]) - # silence stderr from BaseHTTPRequestHandler - # source: http://stackoverflow.com/questions/3389305/how-to-silent-quiet-httpserver-and-basichttprequesthandlers-stderr-output - def log_message(self, format, *args): - return - - httpd_instance = HTTPServer((settings['http']['host'], settings['http']['port']), httpd) - print("\n[%s] Server Starts - %s:%s" % (time.asctime(), settings['http']['host'], settings['http']['port'])) - - try: - httpd_instance.serve_forever() - except KeyboardInterrupt: - pass - - httpd_instance.server_close() - print("\n\n[%s] HTTP Server stopped\n" % time.asctime()) - -if __name__ == "__main__": - main() diff --git a/extras/fap/httpd/# DEPRECATED/terminal.log b/extras/fap/httpd/# DEPRECATED/terminal.log deleted file mode 100755 index bedb829..0000000 --- a/extras/fap/httpd/# DEPRECATED/terminal.log +++ /dev/null @@ -1,14 +0,0 @@ -j@lappie:~/git/tgmanage$ sudo python3 fap/httpd/server_http.py - -[Thu Feb 19 23:15:45 2015] Server Starts - 0.0.0.0:80 -[10.0.200.101] [Fri Feb 20 00:18:25 2015] Incoming HTTP GET URI://tg-edge/e-00-1 -[10.0.200.101] --> Hostname "e-00-1" accepted, fetching info from DB -[10.0.200.101] --> Template successfully populated -[10.0.200.101] --> Sending response to client -[10.0.200.101] --> Success - 1437 bytes sent to client -[10.0.200.101] [Fri Feb 20 00:18:26 2015] Incoming HTTP GET URI://files/jinstall-ex-2200-12.3R6.6-domestic-signed.tgz -[10.0.200.101] --> File request for "jinstall-ex-2200-12.3R6.6-domestic-signed.tgz" in "fap/httpd/files/" -[10.0.200.101] --> File found -[10.0.200.101] --> File transfer started -[10.0.200.101] --> File transfer completed - diff --git a/extras/fap/httpd/README.md b/extras/fap/httpd/README.md index 73c5634..c332965 100755 --- a/extras/fap/httpd/README.md +++ b/extras/fap/httpd/README.md @@ -14,8 +14,7 @@ j@lappie:~/git/tgmanage$ cat /etc/apache2/sites-enabled/000-default.conf <Directory /home/j/git/tgmanage/fap/httpd/httpd_root> Options Indexes FollowSymLinks MultiViews AllowOverride All - Order allow,deny - allow from all + Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log diff --git a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/create_queries.php b/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/create_queries.php deleted file mode 100644 index 8d4bf26..0000000 --- a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/create_queries.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - /* - Used for generating SQL queries for FAP - Jonas Lindstad for TG15 - GPL V2 - */ - - chdir(__DIR__); # sets the executing directory to be the path of this script - necessary for CLI require() usage - header("Content-Type: text/plain"); - - require 'ipcalc_functions.php'; - /* - Load data sources - */ - $patchlist = file('patchlist.txt'); - $switches = file('switches.txt'); - - $dataset = array(); - - foreach($patchlist as $lines){ - $pieces = explode(' ', trim($lines)); - $dataset[$pieces[0]] = array( - 'hostname' => $pieces[0], - 'distro_name' => 'rs1.' . $pieces[1], # prefix with "rs." so we get "rs1.distro0" syntax - 'distro_phy_port' => $pieces[2] - ); - } - - /* - Assign to logical and usable names in array - */ - foreach($switches as $lines){ - $pieces = explode(' ', trim($lines)); - $dataset[$pieces[0]]['mgmt_v4_addr'] = explode('/', $pieces[3])[0]; - $dataset[$pieces[0]]['mgmt_v4_cidr'] = explode('/', $pieces[3])[1]; - $dataset[$pieces[0]]['mgmt_v4_gw'] = net_to_gw($pieces[3]); - $dataset[$pieces[0]]['mgmt_v6_addr'] = explode('/', $pieces[4])[0]; - $dataset[$pieces[0]]['mgmt_v6_cidr'] = explode('/', $pieces[4])[1]; - $dataset[$pieces[0]]['mgmt_v6_gw'] = net_to_gw($pieces[4]); - $dataset[$pieces[0]]['traffic_vlan'] = $pieces[5]; - $dataset[$pieces[0]]['mgmt_vlan'] = '666'; - } - - /* - Prints the query rows - */ - $sql_query = ''; - foreach($dataset as $k => $v){ - $columns = implode(', ', array_keys($v)); - $values = "'" . implode("', '", array_values($v)) . "'"; - $sql_query .= 'INSERT INTO switches (' . $columns . ') VALUES (' . $values . ');' . "\n"; - } - - echo $sql_query; -?> diff --git a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/ipcalc_functions.php b/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/ipcalc_functions.php deleted file mode 100644 index e848ef1..0000000 --- a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/ipcalc_functions.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php - /* - Mainly copied from djamps's work - https://github.com/djamps/php-ipv6-calculator/blob/master/ipcalc.php - Edited by Jonas Lindstad for The Gathering 2015 - Licensed under GPL - */ - - - - // Convert array of short unsigned integers to binary - function _packBytes($array) { - foreach ( $array as $byte ) { - $chars .= pack('C',$byte); - } - return $chars; - } - - - // Convert binary to array of short integers - function _unpackBytes($string) { - return unpack('C*',$string); - } - - - // Add array of short unsigned integers - function _addBytes($array1,$array2) { - $result = array(); - $carry = 0; - foreach ( array_reverse($array1,true) as $value1 ) { - $value2 = array_pop($array2); - if ( empty($result) ) { $value2++; } - $newValue = $value1 + $value2 + $carry; - if ( $newValue > 255 ) { - $newValue = $newValue - 256; - $carry = 1; - } else { - $carry = 0; - } - array_unshift($result,$newValue); - } - return $result; - } - - - /* Useful Functions */ - function _cdr2Bin ($cdrin,$len=4){ - if ( $len > 4 || $cdrin > 32 ) { // Are we ipv6? - return str_pad(str_pad("", $cdrin, "1"), 128, "0"); - } else { - return str_pad(str_pad("", $cdrin, "1"), 32, "0"); - } - } - - - function _bin2Cdr ($binin){ - return strlen(rtrim($binin,"0")); - } - - - function _cdr2Char ($cdrin,$len=4){ - $hex = _bin2Hex(_cdr2Bin($cdrin,$len)); - return _hex2Char($hex); - } - - - function _char2Cdr ($char){ - $bin = _hex2Bin(_char2Hex($char)); - return _bin2Cdr($bin); - } - - - function _hex2Char($hex){ - return pack('H*',$hex); - } - - - function _char2Hex($char){ - $hex = unpack('H*',$char); - return array_pop($hex); - } - - - function _hex2Bin($hex){ - $bin=''; - for($i=0;$i<strlen($hex);$i++) - $bin.=str_pad(decbin(hexdec($hex{$i})),4,'0',STR_PAD_LEFT); - return $bin; - } - - - function _bin2Hex($bin){ - $hex=''; - for($i=strlen($bin)-4;$i>=0;$i-=4) - $hex.=dechex(bindec(substr($bin,$i,4))); - return strrev($hex); - } - - /* - Converts a v4/v6 subnet to the first usable IP - */ - function net_to_gw($net){ - $maxSubNets = '2048'; // Stop memory leak from invalid input or large ranges - $charHost = inet_pton(strtok($net, '/')); - $charMask = _cdr2Char(strtok('/'),strlen($charHost)); - $charHostMask = substr(_cdr2Char(127),-strlen($charHost)); - $charNet = $charHost & $charMask; // Supernet network address - $charHostMin = $charNet | ~$charHostMask; - return inet_ntop($charHostMin); - } - - - - - - - - -/* - - $maxSubNets = '2048'; // Stop memory leak from invalid input or large ranges - $superNet = '2a02:ed02:180a::13/64'; - if (ereg('/',$superNet)){ //if cidr type mask - $charHost = inet_pton(strtok($superNet, '/')); - $charMask = _cdr2Char(strtok('/'),strlen($charHost)); - } - - $charHostMask = substr(_cdr2Char(127),-strlen($charHost)); - $charNet = $charHost & $charMask; // Supernet network address - $charHostMin = $charNet | ~$charHostMask; - echo 'Første brukbare adresse i ' . $superNet . ': '; - echo inet_ntop($charHostMin); -*/ - -?> diff --git a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/patchlist.txt b/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/patchlist.txt deleted file mode 100644 index 7454441..0000000 --- a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/patchlist.txt +++ /dev/null @@ -1,142 +0,0 @@ -e1-3 distro0 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e3-3 distro0 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e3-4 distro0 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e5-2 distro1 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e5-3 distro0 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e5-4 distro0 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e7-2 distro1 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e7-3 distro0 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e7-4 distro0 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e9-2 distro1 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e9-3 distro0 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e9-4 distro0 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e11-1 distro1 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e11-2 distro1 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e11-3 distro0 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e11-4 distro0 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e13-1 distro1 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e13-2 distro1 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e13-3 distro0 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e13-4 distro0 ge-0/0/12 ge-1/0/12 ge-2/0/12 ge-3/0/12 -e15-1 distro1 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e15-2 distro1 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e15-3 distro0 ge-0/0/13 ge-1/0/13 ge-2/0/13 ge-3/0/13 -e15-4 distro0 ge-0/0/14 ge-1/0/14 ge-2/0/14 ge-3/0/14 -e17-1 distro1 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e17-2 distro1 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e17-3 distro2 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e17-4 distro2 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e19-1 distro1 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e19-2 distro1 ge-0/0/12 ge-1/0/12 ge-2/0/12 ge-3/0/12 -e19-3 distro2 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e19-4 distro2 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e21-1 distro1 ge-0/0/13 ge-1/0/13 ge-2/0/13 ge-3/0/13 -e21-2 distro1 ge-0/0/14 ge-1/0/14 ge-2/0/14 ge-3/0/14 -e21-3 distro2 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e21-4 distro2 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e23-1 distro1 ge-0/0/15 ge-1/0/15 ge-2/0/15 ge-3/0/15 -e23-2 distro1 ge-0/0/16 ge-1/0/16 ge-2/0/16 ge-3/0/16 -e23-3 distro2 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e23-4 distro2 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e25-1 distro1 ge-0/0/17 ge-1/0/17 ge-2/0/17 ge-3/0/17 -e25-2 distro1 ge-0/0/18 ge-1/0/18 ge-2/0/18 ge-3/0/18 -e25-3 distro2 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e25-4 distro2 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e27-1 distro1 ge-0/0/19 ge-1/0/19 ge-2/0/19 ge-3/0/19 -e27-2 distro1 ge-0/0/20 ge-1/0/20 ge-2/0/20 ge-3/0/20 -e27-3 distro2 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e27-4 distro2 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e27-1 distro1 ge-0/0/21 ge-1/0/21 ge-2/0/21 ge-3/0/21 -e27-2 distro1 ge-0/0/22 ge-1/0/22 ge-2/0/22 ge-3/0/22 -e29-1 distro3 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e29-2 distro3 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e31-1 distro3 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e31-2 distro3 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e33-1 distro3 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e33-2 distro3 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e35-1 distro3 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e35-2 distro3 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e37-1 distro3 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e37-2 distro3 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e39-1 distro3 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e39-2 distro3 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e41-1 distro3 ge-0/0/12 ge-1/0/12 ge-2/0/12 ge-3/0/12 -e41-2 distro3 ge-0/0/13 ge-1/0/13 ge-2/0/13 ge-3/0/13 -e43-1 distro3 ge-0/0/14 ge-1/0/14 ge-2/0/14 ge-3/0/14 -e43-2 distro3 ge-0/0/15 ge-1/0/15 ge-2/0/15 ge-3/0/15 -e45-1 distro4 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e45-2 distro4 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e45-3 distro5 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e45-4 distro5 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e47-1 distro4 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e47-2 distro4 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e47-3 distro5 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e47-4 distro5 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e49-1 distro4 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e49-2 distro4 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e49-3 distro5 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e49-4 distro5 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e51-1 distro4 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e51-2 distro4 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e51-3 distro5 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e51-4 distro5 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e53-1 distro4 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e53-2 distro4 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e53-3 distro5 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e53-4 distro5 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e55-1 distro4 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e55-2 distro4 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e55-3 distro5 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e55-4 distro5 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e57-1 distro4 ge-0/0/12 ge-1/0/12 ge-2/0/12 ge-3/0/12 -e57-2 distro4 ge-0/0/13 ge-1/0/13 ge-2/0/13 ge-3/0/13 -e57-3 distro5 ge-0/0/12 ge-1/0/12 ge-2/0/12 ge-3/0/12 -e57-4 distro5 ge-0/0/13 ge-1/0/13 ge-2/0/13 ge-3/0/13 -e59-1 distro4 ge-0/0/14 ge-1/0/14 ge-2/0/14 ge-3/0/14 -e59-2 distro4 ge-0/0/15 ge-1/0/15 ge-2/0/15 ge-3/0/15 -e59-3 distro5 ge-0/0/14 ge-1/0/14 ge-2/0/14 ge-3/0/14 -e59-4 distro5 ge-0/0/15 ge-1/0/15 ge-2/0/15 ge-3/0/15 -e61-1 distro4 ge-0/0/16 ge-1/0/16 ge-2/0/16 ge-3/0/16 -e61-2 distro4 ge-0/0/17 ge-1/0/17 ge-2/0/17 ge-3/0/17 -e61-3 distro5 ge-0/0/16 ge-1/0/16 ge-2/0/16 ge-3/0/16 -e61-4 distro5 ge-0/0/17 ge-1/0/17 ge-2/0/17 ge-3/0/17 -e63-1 distro7 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e63-2 distro7 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e63-3 distro6 ge-0/0/0 ge-1/0/0 ge-2/0/0 ge-3/0/0 -e63-4 distro6 ge-0/0/1 ge-1/0/1 ge-2/0/1 ge-3/0/1 -e65-1 distro7 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e65-2 distro7 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e65-3 distro6 ge-0/0/2 ge-1/0/2 ge-2/0/2 ge-3/0/2 -e65-4 distro6 ge-0/0/3 ge-1/0/3 ge-2/0/3 ge-3/0/3 -e67-1 distro7 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e67-2 distro7 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e67-3 distro6 ge-0/0/4 ge-1/0/4 ge-2/0/4 ge-3/0/4 -e67-4 distro6 ge-0/0/5 ge-1/0/5 ge-2/0/5 ge-3/0/5 -e69-1 distro7 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e69-2 distro7 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e69-3 distro6 ge-0/0/6 ge-1/0/6 ge-2/0/6 ge-3/0/6 -e69-4 distro6 ge-0/0/7 ge-1/0/7 ge-2/0/7 ge-3/0/7 -e71-1 distro7 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e71-2 distro7 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e71-3 distro6 ge-0/0/8 ge-1/0/8 ge-2/0/8 ge-3/0/8 -e71-4 distro6 ge-0/0/9 ge-1/0/9 ge-2/0/9 ge-3/0/9 -e73-1 distro7 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e73-2 distro7 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e73-3 distro6 ge-0/0/10 ge-1/0/10 ge-2/0/10 ge-3/0/10 -e73-4 distro6 ge-0/0/11 ge-1/0/11 ge-2/0/11 ge-3/0/11 -e75-1 distro7 ge-0/0/12 ge-1/0/12 ge-2/0/12 ge-3/0/12 -e75-2 distro7 ge-0/0/13 ge-1/0/13 ge-2/0/13 ge-3/0/13 -e75-3 distro6 ge-0/0/12 ge-1/0/12 ge-2/0/12 ge-3/0/12 -e75-4 distro6 ge-0/0/13 ge-1/0/13 ge-2/0/13 ge-3/0/13 -e77-1 distro7 ge-0/0/14 ge-1/0/14 ge-2/0/14 ge-3/0/14 -e77-2 distro7 ge-0/0/15 ge-1/0/15 ge-2/0/15 ge-3/0/15 -e77-3 distro6 ge-0/0/14 ge-1/0/14 ge-2/0/14 ge-3/0/14 -e77-4 distro6 ge-0/0/15 ge-1/0/15 ge-2/0/15 ge-3/0/15 -e79-1 distro7 ge-0/0/16 ge-1/0/16 ge-2/0/16 ge-3/0/16 -e79-2 distro7 ge-0/0/17 ge-1/0/17 ge-2/0/17 ge-3/0/17 -e79-3 distro6 ge-0/0/16 ge-1/0/16 ge-2/0/16 ge-3/0/16 -e79-4 distro6 ge-0/0/17 ge-1/0/17 ge-2/0/17 ge-3/0/17 -e81-1 distro7 ge-0/0/18 ge-1/0/18 ge-2/0/18 ge-3/0/18 -e81-2 distro7 ge-0/0/19 ge-1/0/19 ge-2/0/19 ge-3/0/19 -e83-1 distro7 ge-0/0/20 ge-1/0/20 ge-2/0/20 ge-3/0/20 -e83-2 distro7 ge-0/0/21 ge-1/0/21 ge-2/0/21 ge-3/0/21 diff --git a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/switches.txt b/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/switches.txt deleted file mode 100644 index c9d60d9..0000000 --- a/extras/fap/httpd/httpd_root/# create_queries - DEPRECATED/switches.txt +++ /dev/null @@ -1,142 +0,0 @@ -e1-3 151.216.129.0/26 2a02:ed02:129a::/64 151.216.180.2/26 2a02:ed02:180a::2/64 1013 distro0 -e3-3 151.216.129.64/26 2a02:ed02:129b::/64 151.216.180.3/26 2a02:ed02:180a::3/64 1033 distro0 -e3-4 151.216.129.128/26 2a02:ed02:129c::/64 151.216.180.4/26 2a02:ed02:180a::4/64 1034 distro0 -e5-2 151.216.129.192/26 2a02:ed02:129d::/64 151.216.180.66/26 2a02:ed02:180b::66/64 1052 distro1 -e5-3 151.216.130.0/26 2a02:ed02:130a::/64 151.216.180.5/26 2a02:ed02:180a::5/64 1053 distro0 -e5-4 151.216.130.64/26 2a02:ed02:130b::/64 151.216.180.6/26 2a02:ed02:180a::6/64 1054 distro0 -e7-2 151.216.130.128/26 2a02:ed02:130c::/64 151.216.180.67/26 2a02:ed02:180b::67/64 1072 distro1 -e7-3 151.216.130.192/26 2a02:ed02:130d::/64 151.216.180.7/26 2a02:ed02:180a::7/64 1073 distro0 -e7-4 151.216.131.0/26 2a02:ed02:131a::/64 151.216.180.8/26 2a02:ed02:180a::8/64 1074 distro0 -e9-2 151.216.131.64/26 2a02:ed02:131b::/64 151.216.180.68/26 2a02:ed02:180b::68/64 1092 distro1 -e9-3 151.216.131.128/26 2a02:ed02:131c::/64 151.216.180.9/26 2a02:ed02:180a::9/64 1093 distro0 -e9-4 151.216.131.192/26 2a02:ed02:131d::/64 151.216.180.10/26 2a02:ed02:180a::10/64 1094 distro0 -e11-1 151.216.132.0/26 2a02:ed02:132a::/64 151.216.180.69/26 2a02:ed02:180b::69/64 1111 distro1 -e11-2 151.216.132.64/26 2a02:ed02:132b::/64 151.216.180.70/26 2a02:ed02:180b::70/64 1112 distro1 -e11-3 151.216.132.128/26 2a02:ed02:132c::/64 151.216.180.11/26 2a02:ed02:180a::11/64 1113 distro0 -e11-4 151.216.132.192/26 2a02:ed02:132d::/64 151.216.180.12/26 2a02:ed02:180a::12/64 1114 distro0 -e13-1 151.216.133.0/26 2a02:ed02:133a::/64 151.216.180.71/26 2a02:ed02:180b::71/64 1131 distro1 -e13-2 151.216.133.64/26 2a02:ed02:133b::/64 151.216.180.72/26 2a02:ed02:180b::72/64 1132 distro1 -e13-3 151.216.133.128/26 2a02:ed02:133c::/64 151.216.180.13/26 2a02:ed02:180a::13/64 1133 distro0 -e13-4 151.216.133.192/26 2a02:ed02:133d::/64 151.216.180.14/26 2a02:ed02:180a::14/64 1134 distro0 -e15-1 151.216.134.0/26 2a02:ed02:134a::/64 151.216.180.73/26 2a02:ed02:180b::73/64 1151 distro1 -e15-2 151.216.134.64/26 2a02:ed02:134b::/64 151.216.180.74/26 2a02:ed02:180b::74/64 1152 distro1 -e15-3 151.216.134.128/26 2a02:ed02:134c::/64 151.216.180.15/26 2a02:ed02:180a::15/64 1153 distro0 -e15-4 151.216.134.192/26 2a02:ed02:134d::/64 151.216.180.16/26 2a02:ed02:180a::16/64 1154 distro0 -e17-1 151.216.135.0/26 2a02:ed02:135a::/64 151.216.180.75/26 2a02:ed02:180b::75/64 1171 distro1 -e17-2 151.216.135.64/26 2a02:ed02:135b::/64 151.216.180.76/26 2a02:ed02:180b::76/64 1172 distro1 -e17-3 151.216.135.128/26 2a02:ed02:135c::/64 151.216.180.130/26 2a02:ed02:180c::130/64 1173 distro2 -e17-4 151.216.135.192/26 2a02:ed02:135d::/64 151.216.180.131/26 2a02:ed02:180c::131/64 1174 distro2 -e19-1 151.216.136.0/26 2a02:ed02:136a::/64 151.216.180.77/26 2a02:ed02:180b::77/64 1191 distro1 -e19-2 151.216.136.64/26 2a02:ed02:136b::/64 151.216.180.78/26 2a02:ed02:180b::78/64 1192 distro1 -e19-3 151.216.136.128/26 2a02:ed02:136c::/64 151.216.180.132/26 2a02:ed02:180c::132/64 1193 distro2 -e19-4 151.216.136.192/26 2a02:ed02:136d::/64 151.216.180.133/26 2a02:ed02:180c::133/64 1194 distro2 -e21-1 151.216.137.0/26 2a02:ed02:137a::/64 151.216.180.79/26 2a02:ed02:180b::79/64 1211 distro1 -e21-2 151.216.137.64/26 2a02:ed02:137b::/64 151.216.180.80/26 2a02:ed02:180b::80/64 1212 distro1 -e21-3 151.216.137.128/26 2a02:ed02:137c::/64 151.216.180.134/26 2a02:ed02:180c::134/64 1213 distro2 -e21-4 151.216.137.192/26 2a02:ed02:137d::/64 151.216.180.135/26 2a02:ed02:180c::135/64 1214 distro2 -e23-1 151.216.138.0/26 2a02:ed02:138a::/64 151.216.180.81/26 2a02:ed02:180b::81/64 1231 distro1 -e23-2 151.216.138.64/26 2a02:ed02:138b::/64 151.216.180.82/26 2a02:ed02:180b::82/64 1232 distro1 -e23-3 151.216.138.128/26 2a02:ed02:138c::/64 151.216.180.136/26 2a02:ed02:180c::136/64 1233 distro2 -e23-4 151.216.138.192/26 2a02:ed02:138d::/64 151.216.180.137/26 2a02:ed02:180c::137/64 1234 distro2 -e25-1 151.216.139.0/26 2a02:ed02:139a::/64 151.216.180.83/26 2a02:ed02:180b::83/64 1251 distro1 -e25-2 151.216.139.64/26 2a02:ed02:139b::/64 151.216.180.84/26 2a02:ed02:180b::84/64 1252 distro1 -e25-3 151.216.139.128/26 2a02:ed02:139c::/64 151.216.180.138/26 2a02:ed02:180c::138/64 1253 distro2 -e25-4 151.216.139.192/26 2a02:ed02:139d::/64 151.216.180.139/26 2a02:ed02:180c::139/64 1254 distro2 -e27-1 151.216.140.0/26 2a02:ed02:140a::/64 151.216.180.85/26 2a02:ed02:180b::85/64 1271 distro1 -e27-2 151.216.140.64/26 2a02:ed02:140b::/64 151.216.180.86/26 2a02:ed02:180b::86/64 1272 distro1 -e27-3 151.216.140.128/26 2a02:ed02:140c::/64 151.216.180.140/26 2a02:ed02:180c::140/64 1273 distro2 -e27-4 151.216.140.192/26 2a02:ed02:140d::/64 151.216.180.141/26 2a02:ed02:180c::141/64 1274 distro2 -e27-1 151.216.141.0/26 2a02:ed02:141a::/64 151.216.180.87/26 2a02:ed02:180b::87/64 1271 distro1 -e27-2 151.216.141.64/26 2a02:ed02:141b::/64 151.216.180.88/26 2a02:ed02:180b::88/64 1272 distro1 -e29-1 151.216.141.128/26 2a02:ed02:141c::/64 151.216.180.194/26 2a02:ed02:180d::194/64 1291 distro3 -e29-2 151.216.141.192/26 2a02:ed02:141d::/64 151.216.180.195/26 2a02:ed02:180d::195/64 1292 distro3 -e31-1 151.216.142.0/26 2a02:ed02:142a::/64 151.216.180.196/26 2a02:ed02:180d::196/64 1311 distro3 -e31-2 151.216.142.64/26 2a02:ed02:142b::/64 151.216.180.197/26 2a02:ed02:180d::197/64 1312 distro3 -e33-1 151.216.142.128/26 2a02:ed02:142c::/64 151.216.180.198/26 2a02:ed02:180d::198/64 1331 distro3 -e33-2 151.216.142.192/26 2a02:ed02:142d::/64 151.216.180.199/26 2a02:ed02:180d::199/64 1332 distro3 -e35-1 151.216.143.0/26 2a02:ed02:143a::/64 151.216.180.200/26 2a02:ed02:180d::200/64 1351 distro3 -e35-2 151.216.143.64/26 2a02:ed02:143b::/64 151.216.180.201/26 2a02:ed02:180d::201/64 1352 distro3 -e37-1 151.216.143.128/26 2a02:ed02:143c::/64 151.216.180.202/26 2a02:ed02:180d::202/64 1371 distro3 -e37-2 151.216.143.192/26 2a02:ed02:143d::/64 151.216.180.203/26 2a02:ed02:180d::203/64 1372 distro3 -e39-1 151.216.144.0/26 2a02:ed02:144a::/64 151.216.180.204/26 2a02:ed02:180d::204/64 1391 distro3 -e39-2 151.216.144.64/26 2a02:ed02:144b::/64 151.216.180.205/26 2a02:ed02:180d::205/64 1392 distro3 -e41-1 151.216.144.128/26 2a02:ed02:144c::/64 151.216.180.206/26 2a02:ed02:180d::206/64 1411 distro3 -e41-2 151.216.144.192/26 2a02:ed02:144d::/64 151.216.180.207/26 2a02:ed02:180d::207/64 1412 distro3 -e43-1 151.216.145.0/26 2a02:ed02:145a::/64 151.216.180.208/26 2a02:ed02:180d::208/64 1431 distro3 -e43-2 151.216.145.64/26 2a02:ed02:145b::/64 151.216.180.209/26 2a02:ed02:180d::209/64 1432 distro3 -e45-1 151.216.145.128/26 2a02:ed02:145c::/64 151.216.181.2/26 2a02:ed02:181a::2/64 1451 distro4 -e45-2 151.216.145.192/26 2a02:ed02:145d::/64 151.216.181.3/26 2a02:ed02:181a::3/64 1452 distro4 -e45-3 151.216.146.0/26 2a02:ed02:146a::/64 151.216.181.66/26 2a02:ed02:181b::66/64 1453 distro5 -e45-4 151.216.146.64/26 2a02:ed02:146b::/64 151.216.181.67/26 2a02:ed02:181b::67/64 1454 distro5 -e47-1 151.216.146.128/26 2a02:ed02:146c::/64 151.216.181.4/26 2a02:ed02:181a::4/64 1471 distro4 -e47-2 151.216.146.192/26 2a02:ed02:146d::/64 151.216.181.5/26 2a02:ed02:181a::5/64 1472 distro4 -e47-3 151.216.147.0/26 2a02:ed02:147a::/64 151.216.181.68/26 2a02:ed02:181b::68/64 1473 distro5 -e47-4 151.216.147.64/26 2a02:ed02:147b::/64 151.216.181.69/26 2a02:ed02:181b::69/64 1474 distro5 -e49-1 151.216.147.128/26 2a02:ed02:147c::/64 151.216.181.6/26 2a02:ed02:181a::6/64 1491 distro4 -e49-2 151.216.147.192/26 2a02:ed02:147d::/64 151.216.181.7/26 2a02:ed02:181a::7/64 1492 distro4 -e49-3 151.216.148.0/26 2a02:ed02:148a::/64 151.216.181.70/26 2a02:ed02:181b::70/64 1493 distro5 -e49-4 151.216.148.64/26 2a02:ed02:148b::/64 151.216.181.71/26 2a02:ed02:181b::71/64 1494 distro5 -e51-1 151.216.148.128/26 2a02:ed02:148c::/64 151.216.181.8/26 2a02:ed02:181a::8/64 1511 distro4 -e51-2 151.216.148.192/26 2a02:ed02:148d::/64 151.216.181.9/26 2a02:ed02:181a::9/64 1512 distro4 -e51-3 151.216.149.0/26 2a02:ed02:149a::/64 151.216.181.72/26 2a02:ed02:181b::72/64 1513 distro5 -e51-4 151.216.149.64/26 2a02:ed02:149b::/64 151.216.181.73/26 2a02:ed02:181b::73/64 1514 distro5 -e53-1 151.216.149.128/26 2a02:ed02:149c::/64 151.216.181.10/26 2a02:ed02:181a::10/64 1531 distro4 -e53-2 151.216.149.192/26 2a02:ed02:149d::/64 151.216.181.11/26 2a02:ed02:181a::11/64 1532 distro4 -e53-3 151.216.150.0/26 2a02:ed02:150a::/64 151.216.181.74/26 2a02:ed02:181b::74/64 1533 distro5 -e53-4 151.216.150.64/26 2a02:ed02:150b::/64 151.216.181.75/26 2a02:ed02:181b::75/64 1534 distro5 -e55-1 151.216.150.128/26 2a02:ed02:150c::/64 151.216.181.12/26 2a02:ed02:181a::12/64 1551 distro4 -e55-2 151.216.150.192/26 2a02:ed02:150d::/64 151.216.181.13/26 2a02:ed02:181a::13/64 1552 distro4 -e55-3 151.216.151.0/26 2a02:ed02:151a::/64 151.216.181.76/26 2a02:ed02:181b::76/64 1553 distro5 -e55-4 151.216.151.64/26 2a02:ed02:151b::/64 151.216.181.77/26 2a02:ed02:181b::77/64 1554 distro5 -e57-1 151.216.151.128/26 2a02:ed02:151c::/64 151.216.181.14/26 2a02:ed02:181a::14/64 1571 distro4 -e57-2 151.216.151.192/26 2a02:ed02:151d::/64 151.216.181.15/26 2a02:ed02:181a::15/64 1572 distro4 -e57-3 151.216.152.0/26 2a02:ed02:152a::/64 151.216.181.78/26 2a02:ed02:181b::78/64 1573 distro5 -e57-4 151.216.152.64/26 2a02:ed02:152b::/64 151.216.181.79/26 2a02:ed02:181b::79/64 1574 distro5 -e59-1 151.216.152.128/26 2a02:ed02:152c::/64 151.216.181.16/26 2a02:ed02:181a::16/64 1591 distro4 -e59-2 151.216.152.192/26 2a02:ed02:152d::/64 151.216.181.17/26 2a02:ed02:181a::17/64 1592 distro4 -e59-3 151.216.153.0/26 2a02:ed02:153a::/64 151.216.181.80/26 2a02:ed02:181b::80/64 1593 distro5 -e59-4 151.216.153.64/26 2a02:ed02:153b::/64 151.216.181.81/26 2a02:ed02:181b::81/64 1594 distro5 -e61-1 151.216.153.128/26 2a02:ed02:153c::/64 151.216.181.18/26 2a02:ed02:181a::18/64 1611 distro4 -e61-2 151.216.153.192/26 2a02:ed02:153d::/64 151.216.181.19/26 2a02:ed02:181a::19/64 1612 distro4 -e61-3 151.216.154.0/26 2a02:ed02:154a::/64 151.216.181.82/26 2a02:ed02:181b::82/64 1613 distro5 -e61-4 151.216.154.64/26 2a02:ed02:154b::/64 151.216.181.83/26 2a02:ed02:181b::83/64 1614 distro5 -e63-1 151.216.154.128/26 2a02:ed02:154c::/64 151.216.181.194/26 2a02:ed02:181d::194/64 1631 distro7 -e63-2 151.216.154.192/26 2a02:ed02:154d::/64 151.216.181.195/26 2a02:ed02:181d::195/64 1632 distro7 -e63-3 151.216.155.0/26 2a02:ed02:155a::/64 151.216.181.130/26 2a02:ed02:181c::130/64 1633 distro6 -e63-4 151.216.155.64/26 2a02:ed02:155b::/64 151.216.181.131/26 2a02:ed02:181c::131/64 1634 distro6 -e65-1 151.216.155.128/26 2a02:ed02:155c::/64 151.216.181.196/26 2a02:ed02:181d::196/64 1651 distro7 -e65-2 151.216.155.192/26 2a02:ed02:155d::/64 151.216.181.197/26 2a02:ed02:181d::197/64 1652 distro7 -e65-3 151.216.156.0/26 2a02:ed02:156a::/64 151.216.181.132/26 2a02:ed02:181c::132/64 1653 distro6 -e65-4 151.216.156.64/26 2a02:ed02:156b::/64 151.216.181.133/26 2a02:ed02:181c::133/64 1654 distro6 -e67-1 151.216.156.128/26 2a02:ed02:156c::/64 151.216.181.198/26 2a02:ed02:181d::198/64 1671 distro7 -e67-2 151.216.156.192/26 2a02:ed02:156d::/64 151.216.181.199/26 2a02:ed02:181d::199/64 1672 distro7 -e67-3 151.216.157.0/26 2a02:ed02:157a::/64 151.216.181.134/26 2a02:ed02:181c::134/64 1673 distro6 -e67-4 151.216.157.64/26 2a02:ed02:157b::/64 151.216.181.135/26 2a02:ed02:181c::135/64 1674 distro6 -e69-1 151.216.157.128/26 2a02:ed02:157c::/64 151.216.181.200/26 2a02:ed02:181d::200/64 1691 distro7 -e69-2 151.216.157.192/26 2a02:ed02:157d::/64 151.216.181.201/26 2a02:ed02:181d::201/64 1692 distro7 -e69-3 151.216.158.0/26 2a02:ed02:158a::/64 151.216.181.136/26 2a02:ed02:181c::136/64 1693 distro6 -e69-4 151.216.158.64/26 2a02:ed02:158b::/64 151.216.181.137/26 2a02:ed02:181c::137/64 1694 distro6 -e71-1 151.216.158.128/26 2a02:ed02:158c::/64 151.216.181.202/26 2a02:ed02:181d::202/64 1711 distro7 -e71-2 151.216.158.192/26 2a02:ed02:158d::/64 151.216.181.203/26 2a02:ed02:181d::203/64 1712 distro7 -e71-3 151.216.159.0/26 2a02:ed02:159a::/64 151.216.181.138/26 2a02:ed02:181c::138/64 1713 distro6 -e71-4 151.216.159.64/26 2a02:ed02:159b::/64 151.216.181.139/26 2a02:ed02:181c::139/64 1714 distro6 -e73-1 151.216.159.128/26 2a02:ed02:159c::/64 151.216.181.204/26 2a02:ed02:181d::204/64 1731 distro7 -e73-2 151.216.159.192/26 2a02:ed02:159d::/64 151.216.181.205/26 2a02:ed02:181d::205/64 1732 distro7 -e73-3 151.216.160.0/26 2a02:ed02:160a::/64 151.216.181.140/26 2a02:ed02:181c::140/64 1733 distro6 -e73-4 151.216.160.64/26 2a02:ed02:160b::/64 151.216.181.141/26 2a02:ed02:181c::141/64 1734 distro6 -e75-1 151.216.160.128/26 2a02:ed02:160c::/64 151.216.181.206/26 2a02:ed02:181d::206/64 1751 distro7 -e75-2 151.216.160.192/26 2a02:ed02:160d::/64 151.216.181.207/26 2a02:ed02:181d::207/64 1752 distro7 -e75-3 151.216.161.0/26 2a02:ed02:161a::/64 151.216.181.142/26 2a02:ed02:181c::142/64 1753 distro6 -e75-4 151.216.161.64/26 2a02:ed02:161b::/64 151.216.181.143/26 2a02:ed02:181c::143/64 1754 distro6 -e77-1 151.216.161.128/26 2a02:ed02:161c::/64 151.216.181.208/26 2a02:ed02:181d::208/64 1771 distro7 -e77-2 151.216.161.192/26 2a02:ed02:161d::/64 151.216.181.209/26 2a02:ed02:181d::209/64 1772 distro7 -e77-3 151.216.162.0/26 2a02:ed02:162a::/64 151.216.181.144/26 2a02:ed02:181c::144/64 1773 distro6 -e77-4 151.216.162.64/26 2a02:ed02:162b::/64 151.216.181.145/26 2a02:ed02:181c::145/64 1774 distro6 -e79-1 151.216.162.128/26 2a02:ed02:162c::/64 151.216.181.210/26 2a02:ed02:181d::210/64 1791 distro7 -e79-2 151.216.162.192/26 2a02:ed02:162d::/64 151.216.181.211/26 2a02:ed02:181d::211/64 1792 distro7 -e79-3 151.216.163.0/26 2a02:ed02:163a::/64 151.216.181.146/26 2a02:ed02:181c::146/64 1793 distro6 -e79-4 151.216.163.64/26 2a02:ed02:163b::/64 151.216.181.147/26 2a02:ed02:181c::147/64 1794 distro6 -e81-1 151.216.163.128/26 2a02:ed02:163c::/64 151.216.181.212/26 2a02:ed02:181d::212/64 1811 distro7 -e81-2 151.216.163.192/26 2a02:ed02:163d::/64 151.216.181.213/26 2a02:ed02:181d::213/64 1812 distro7 -e83-1 151.216.164.0/26 2a02:ed02:164a::/64 151.216.181.214/26 2a02:ed02:181d::214/64 1831 distro7 -e83-2 151.216.164.64/26 2a02:ed02:164b::/64 151.216.181.215/26 2a02:ed02:181d::215/64 1832 distro7 diff --git a/extras/fap/httpd/httpd_root/.htaccess b/extras/fap/httpd/httpd_root/.htaccess index 17add11..fc37acb 100755 --- a/extras/fap/httpd/httpd_root/.htaccess +++ b/extras/fap/httpd/httpd_root/.htaccess @@ -1,3 +1,3 @@ RewriteEngine on -RewriteRule ^files/(.+)$ x.php?mode=image&file=$1 [L] -RewriteRule ^tg-edge/(.+)$ x.php?mode=config&hostname=$1 [L] +RewriteRule ^files/(.+)$ index.php?mode=image&file=$1 [L] +RewriteRule ^tg-edge/(.+)$ index.php?mode=config&hostname=$1 [L] diff --git a/extras/fap/httpd/httpd_root/ex2200.template b/extras/fap/httpd/httpd_root/ex2200.template index 7f3bbaf..c8c973a 100755 --- a/extras/fap/httpd/httpd_root/ex2200.template +++ b/extras/fap/httpd/httpd_root/ex2200.template @@ -1,36 +1,58 @@ system { - host-name <?php echo $c['hostname']; ?>; + host-name <?php echo $c['sysname']; ?>; + domain-name infra.gathering.org; auto-snapshot; time-zone Europe/Oslo; - authentication-order [ tacplus password ]; + authentication-order [ tacplus ]; root-authentication { - encrypted-password "<sensored>"; + encrypted-password "<censored>"; ## SECRET-DATA } name-server { - 2a02:ed02:1ee7::66; - 2a02:ed02:1337::2; + 185.110.149.2; + 185.110.148.2; + 2a06:5841:149a::2; + 2a06:5841:1337::2; } + tacplus-server { + <censored> { + secret "<censored>"; ## SECRET-DATA + source-address <?php echo $c['mgmt_v4_addr']; ?>; + } + } login { - user technet { + user <censored> { uid 2000; class super-user; authentication { - encrypted-password "<sensored>"; + encrypted-password "<censored>"; ## SECRET-DATA } } } services { - ssh { + ssh { root-login deny; + no-tcp-forwarding; + client-alive-count-max 2; + client-alive-interval 300; + connection-limit 5; + rate-limit 5; } netconf { - ssh; + ssh { + connection-limit 3; + rate-limit 3; + } } } syslog { user * { any emergency; } + host <censored> { + any info; + authorization info; + port 515; + } file messages { any notice; authorization info; @@ -39,6 +61,17 @@ system { interactive-commands any; } } + + /* Save changes to central site */ + archival { + configuration { + transfer-on-commit; + archive-sites { + "scp://<censored>@<censored>/home/<censored>/configs/" password "<censored>"; ## SECRET-DATA + } + } + } + commit synchronize; ntp { server 2001:700:100:2::6; } @@ -100,70 +133,51 @@ interfaces { filter { input v4-mgmt; } - address <?php echo $c['mgmt_v4_addr'] . '/' . $c['mgmt_v4_cidr']; ?>; + address <?php echo $c['mgmt_v4_addr']; ?>/26; } - family inet6 { + inactive: family inet6 { filter { input v6-mgmt; } - address <?php echo $c['mgmt_v6_addr'] . '/' . $c['mgmt_v6_cidr']; ?>; + address <?php echo $c['mgmt_v6_addr']; ?>/64; } } } } snmp { - community <sensored> { + community <censored> { + authorization read-only; client-list-name mgmt; } + community <censored> { + authorization read-only; + client-list-name mgmt-nms; + } } policy-options { - prefix-list v4-mgmt { - /* nLogic jumpstation */ - <sensored> - /* Harald jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 151.216.254.0/24; - /* Servers */ - 185.12.59.0/26; + prefix-list mgmt-v4 { + <censored> } - prefix-list v6-mgmt { - /* Harald jumpstation */ - <sensored> - /* nLogic jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 2a02:ed02:254::/64; - /* Servers */ - 2a02:ed02:1337::/64; + prefix-list mgmt-v6 { + <censored> } + /* Merged separate v4- og v6-lister */ prefix-list mgmt { - /* nLogic jumpstation */ - <sensored> - /* Harald jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 151.216.254.0/24; - /* Servers */ - 185.12.59.0/26; - /* Harald jumpstation */ - <sensored> - /* nLogic jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 2a02:ed02:254::/64; - /* Servers */ - 2a02:ed02:1337::/64; + <censored> + } + /* NMS boxes - separate list to give full speed to SNMP read */ + prefix-list mgmt-v4-nms { + <censored> + } + /* NMS boxes - separate list to give full speed to SNMP read */ + prefix-list mgmt-v6-nms { + <censored> + } + /* NMS boxes - separate list to give full speed to SNMP read */ + prefix-list mgmt-nms { + <censored> } } firewall { @@ -172,7 +186,7 @@ firewall { term accept-ssh { from { source-prefix-list { - v4-mgmt; + mgmt-v4; } destination-port 22; } @@ -200,7 +214,7 @@ firewall { term accept-ssh { from { source-prefix-list { - v6-mgmt; + mgmt-v6; } destination-port 22; } @@ -232,9 +246,11 @@ protocols { ingress 10000; egress 10000; } - collector <sensored>; interfaces edge-ports; interfaces core-ports; + source-ip <?php echo $c['mgmt_v4_addr']; ?>; + collector <censored>; + collector <censored>; } igmp-snooping { vlan all { @@ -242,12 +258,6 @@ protocols { immediate-leave; } } - mld-snooping { - vlan all { - version 2; - immediate-leave; - } - } rstp { bridge-priority 8k; interface edge-ports { @@ -256,7 +266,8 @@ protocols { } } lldp { - interface ae0.0 + interface ae0.0; + management-address <?php echo $c['mgmt_v4_addr']; ?>; } } @@ -278,11 +289,6 @@ routing-options { } } } - rib inet6.0 { - static { - route ::/0 { - next-hop <?php echo $c['mgmt_v6_gw']; ?>; - } - } - } } + + diff --git a/extras/fap/httpd/httpd_root/ex2200_secure.template b/extras/fap/httpd/httpd_root/ex2200_secure.template index de9bd3b..054e15d 100755 --- a/extras/fap/httpd/httpd_root/ex2200_secure.template +++ b/extras/fap/httpd/httpd_root/ex2200_secure.template @@ -1,36 +1,58 @@ system { - host-name <?php echo $c['hostname']; ?>; + host-name <?php echo $c['sysname']; ?>; + domain-name infra.gathering.org; auto-snapshot; time-zone Europe/Oslo; - authentication-order [ tacplus password ]; + authentication-order [ tacplus ]; root-authentication { - encrypted-password "<sensored>"; + encrypted-password "<censored>"; ## SECRET-DATA } name-server { - 2a02:ed02:1ee7::66; - 2a02:ed02:1337::2; + 185.110.149.2; + 185.110.148.2; + 2a06:5841:149a::2; + 2a06:5841:1337::2; } + tacplus-server { + <censored> { + secret "<censored>"; ## SECRET-DATA + source-address <?php echo $c['mgmt_v4_addr']; ?>; + } + } login { - user technet { + user <censored> { uid 2000; class super-user; authentication { - encrypted-password "<sensored>"; + encrypted-password "<censored>"; ## SECRET-DATA } } } services { - ssh { + ssh { root-login deny; + no-tcp-forwarding; + client-alive-count-max 2; + client-alive-interval 300; + connection-limit 5; + rate-limit 5; } netconf { - ssh; + ssh { + connection-limit 3; + rate-limit 3; + } } } syslog { user * { any emergency; } + host <censored> { + any info; + authorization info; + port 515; + } file messages { any notice; authorization info; @@ -39,6 +61,17 @@ system { interactive-commands any; } } + + /* Save changes to central site */ + archival { + configuration { + transfer-on-commit; + archive-sites { + "scp://<censored>@<censored>/home/<censored>/configs/" password "<censored>"; ## SECRET-DATA + } + } + } + commit synchronize; ntp { server 2001:700:100:2::6; } @@ -100,79 +133,88 @@ interfaces { filter { input v4-mgmt; } - address <?php echo $c['mgmt_v4_addr'] . '/' . $c['mgmt_v4_cidr']; ?>; + address <?php echo $c['mgmt_v4_addr']; ?>/26; } - family inet6 { + inactive: family inet6 { filter { input v6-mgmt; } - address <?php echo $c['mgmt_v6_addr'] . '/' . $c['mgmt_v6_cidr']; ?>; + address <?php echo $c['mgmt_v6_addr']; ?>/64; } } } } snmp { - community <sensored> { + community <censored> { + authorization read-only; client-list-name mgmt; } + community <censored> { + authorization read-only; + client-list-name mgmt-nms; + } } policy-options { - prefix-list v4-mgmt { - /* nLogic jumpstation */ - <sensored> - /* Harald jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 151.216.254.0/24; - /* Servers */ - 185.12.59.0/26; - } - prefix-list v6-mgmt { - /* Harald jumpstation */ - <sensored> - /* nLogic jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 2a02:ed02:254::/64; - /* Servers */ - 2a02:ed02:1337::/64; + prefix-list mgmt-v4 { + <censored> } + prefix-list mgmt-v6 { + <censored> + } + /* Merged separate v4- og v6-lister */ prefix-list mgmt { - /* nLogic jumpstation */ - <sensored> - /* Harald jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 151.216.254.0/24; - /* Servers */ - 185.12.59.0/26; - /* Harald jumpstation */ - <sensored> - /* nLogic jumpstation */ - <sensored> - /* Tech colo-boks */ - <sensored> - /* NOC clients */ - 2a02:ed02:254::/64; - /* Servers */ - 2a02:ed02:1337::/64; + <censored> + } + /* NMS boxes - separate list to give full speed to SNMP read */ + prefix-list mgmt-v4-nms { + <censored> + } + /* NMS boxes - separate list to give full speed to SNMP read */ + prefix-list mgmt-v6-nms { + <censored> + } + /* NMS boxes - separate list to give full speed to SNMP read */ + prefix-list mgmt-nms { + <censored> + } +} + +ethernet-switching-options { + secure-access-port { + interface edge-ports { + no-dhcp-trusted; + } + vlan clients { + arp-inspection; + examine-dhcp; + examine-dhcpv6; + neighbor-discovery-inspection; + ip-source-guard; + ipv6-source-guard; + dhcp-option82; + dhcpv6-option18 { + use-option-82; + } + } + ipv6-source-guard-sessions { + max-number 128; + } + } + storm-control { + interface all; } } + + firewall { family inet { filter v4-mgmt { term accept-ssh { from { source-prefix-list { - v4-mgmt; + mgmt-v4; } destination-port 22; } @@ -200,7 +242,7 @@ firewall { term accept-ssh { from { source-prefix-list { - v6-mgmt; + mgmt-v6; } destination-port 22; } @@ -232,9 +274,11 @@ protocols { ingress 10000; egress 10000; } - collector 91.209.30.12; interfaces edge-ports; interfaces core-ports; + source-ip <?php echo $c['mgmt_v4_addr']; ?>; + collector <censored>; + collector <censored>; } igmp-snooping { vlan all { @@ -242,12 +286,6 @@ protocols { immediate-leave; } } - mld-snooping { - vlan all { - version 2; - immediate-leave; - } - } rstp { bridge-priority 8k; interface edge-ports { @@ -256,34 +294,11 @@ protocols { } } lldp { - interface ae0.0 - } -} -ethernet-switching-options { - secure-access-port { - interface edge-ports { - no-dhcp-trusted; - } - vlan clients { - arp-inspection; - examine-dhcp; - examine-dhcpv6; - neighbor-discovery-inspection; - ip-source-guard; - ipv6-source-guard; - dhcp-option82; - dhcpv6-option18 { - use-option-82; - } - } - ipv6-source-guard-sessions { - max-number 128; - } - } - storm-control { - interface all; + interface ae0.0; + management-address <?php echo $c['mgmt_v4_addr']; ?>; } } + vlans { clients { vlan-id <?php echo $c['traffic_vlan']; ?>; @@ -302,11 +317,6 @@ routing-options { } } } - rib inet6.0 { - static { - route ::/0 { - next-hop <?php echo $c['mgmt_v6_gw']; ?>; - } - } - } } + + diff --git a/extras/fap/httpd/httpd_root/x.php b/extras/fap/httpd/httpd_root/index.php index dda20f2..60173f9 100755 --- a/extras/fap/httpd/httpd_root/x.php +++ b/extras/fap/httpd/httpd_root/index.php @@ -1,4 +1,25 @@ <?php + /* + sysname = hostname + switchtype + last_updated + subnet4 + subnet6 + distro_name + distro_phy_port + mgmt_v4_addr + mgmt_v4_netsize + mgmt_v4_gw + mgmt_v6_addr + mgmt_v6_netsize + mgmt_v6_gw + mgmt_vlan + traffic_vlan + last_config_fetch + current_mac + */ + + if(isset($_GET['mode'])){ function log_to_file($text){ $out = date('c') . ' - ' . $_SERVER['REMOTE_ADDR'] . ' - ' . $text . "\n"; @@ -28,12 +49,12 @@ } } - // Performing SQL query - $query = 'SELECT * FROM switches WHERE hostname = \'' . $_GET['hostname'] . '\''; + $query = 'SELECT sysname, switchtype, distro_name, distro_phy_port, host(mgmt_v4_addr) as mgmt_v4_addr, mgmt_v4_gw, host(mgmt_v6_addr) as mgmt_v6_addr, mgmt_v6_gw, mgmt_vlan, traffic_vlan FROM switches WHERE sysname = \'' . $_GET['hostname'] . '\''; $result = pg_query($query) or die('Query failed: ' . pg_last_error()); if(pg_num_rows($result) == 1){ $c = pg_fetch_assoc($result); + # var_dump($c); include $template; log_to_file('Served ' . $template . ' to client'); }else{ @@ -43,6 +64,7 @@ } }elseif($_GET['mode'] === 'image'){ + # var_dump($_GET['file']) && die(); if(isset($_GET['file']) && is_readable('../files/' . $_GET['file'])){ # SEND IMAGE header('Content-Description: File Transfer'); diff --git a/extras/fap/httpd/httpd_root/pg_connect.php b/extras/fap/httpd/httpd_root/pg_connect.php index 6808cb0..976884d 100644 --- a/extras/fap/httpd/httpd_root/pg_connect.php +++ b/extras/fap/httpd/httpd_root/pg_connect.php @@ -1,5 +1,5 @@ <?php - if(!$dbconn = pg_connect("host=localhost dbname=fap user=fap password=<sensored>")){ + if(!$dbconn = pg_connect("host=<host> dbname=<db> user=<user> password=<password>")){ echo 'Could not connect:' . pg_last_error(); exit(); } diff --git a/extras/fap/httpd/httpd_root/tools/patchlist.txt b/extras/fap/httpd/httpd_root/tools/patchlist.txt new file mode 100644 index 0000000..5b460b5 --- /dev/null +++ b/extras/fap/httpd/httpd_root/tools/patchlist.txt @@ -0,0 +1,131 @@ +e1-3 distro0 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e1-4 distro0 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e3-3 distro0 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e3-4 distro0 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e5-2 distro1 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e5-3 distro0 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e5-4 distro0 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e7-1 distro1 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e7-2 distro1 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e7-3 distro0 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e7-4 distro0 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e9-1 distro1 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e9-2 distro1 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e9-3 distro0 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e9-4 distro0 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e11-1 distro1 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e11-2 distro1 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e11-3 distro0 ge-0/0/10 ge-1/0/10 ge-2/0/10 +e11-4 distro0 ge-0/0/11 ge-1/0/11 ge-2/0/11 +e13-1 distro1 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e13-2 distro1 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e13-3 distro2 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e13-4 distro2 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e15-1 distro1 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e15-2 distro1 ge-0/0/10 ge-1/0/10 ge-2/0/10 +e15-3 distro2 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e15-4 distro2 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e17-1 distro1 ge-0/0/11 ge-1/0/11 ge-2/0/11 +e17-2 distro1 ge-0/0/12 ge-1/0/12 ge-2/0/12 +e17-3 distro2 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e17-4 distro2 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e19-1 distro1 ge-0/0/13 ge-1/0/13 ge-2/0/13 +e19-2 distro1 ge-0/0/14 ge-1/0/14 ge-2/0/14 +e19-3 distro2 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e19-4 distro2 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e21-1 distro1 ge-0/0/15 ge-1/0/15 ge-2/0/15 +e21-2 distro1 ge-0/0/16 ge-1/0/16 ge-2/0/16 +e21-3 distro2 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e21-4 distro2 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e23-1 distro1 ge-0/0/17 ge-1/0/17 ge-2/0/17 +e23-2 distro1 ge-0/0/18 ge-1/0/18 ge-2/0/18 +e23-3 distro2 ge-0/0/10 ge-1/0/10 ge-2/0/10 +e23-4 distro2 ge-0/0/11 ge-1/0/11 ge-2/0/11 +e25-1 distro3 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e25-2 distro3 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e27-1 distro3 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e27-2 distro3 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e29-1 distro3 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e29-2 distro3 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e31-1 distro3 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e31-2 distro3 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e33-1 distro3 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e33-2 distro3 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e35-1 distro3 ge-0/0/10 ge-1/0/10 ge-2/0/10 +e35-2 distro3 ge-0/0/11 ge-1/0/11 ge-2/0/11 +e37-1 distro3 ge-0/0/12 ge-1/0/12 ge-2/0/12 +e37-2 distro3 ge-0/0/13 ge-1/0/13 ge-2/0/13 +e39-1 distro3 ge-0/0/14 ge-1/0/14 ge-2/0/14 +e39-2 distro3 ge-0/0/15 ge-1/0/15 ge-2/0/15 +e41-1 distro4 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e41-2 distro4 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e41-3 distro5 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e41-4 distro5 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e43-1 distro4 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e43-2 distro4 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e43-3 distro5 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e43-4 distro5 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e45-1 distro4 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e45-2 distro4 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e45-3 distro5 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e45-4 distro5 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e47-1 distro4 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e47-2 distro4 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e47-3 distro5 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e47-4 distro5 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e49-1 distro4 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e49-2 distro4 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e49-3 distro5 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e49-4 distro5 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e51-1 distro4 ge-0/0/10 ge-1/0/10 ge-2/0/10 +e51-2 distro4 ge-0/0/11 ge-1/0/11 ge-2/0/11 +e51-3 distro5 ge-0/0/10 ge-1/0/10 ge-2/0/10 +e51-4 distro5 ge-0/0/11 ge-1/0/11 ge-2/0/11 +e53-1 distro4 ge-0/0/12 ge-1/0/12 ge-2/0/12 +e53-2 distro4 ge-0/0/13 ge-1/0/13 ge-2/0/13 +e53-3 distro5 ge-0/0/12 ge-1/0/12 ge-2/0/12 +e53-4 distro5 ge-0/0/13 ge-1/0/13 ge-2/0/13 +e55-1 distro4 ge-0/0/14 ge-1/0/14 ge-2/0/14 +e55-2 distro4 ge-0/0/15 ge-1/0/15 ge-2/0/15 +e55-3 distro5 ge-0/0/14 ge-1/0/14 ge-2/0/14 +e55-4 distro5 ge-0/0/15 ge-1/0/15 ge-2/0/15 +e57-1 distro4 ge-0/0/16 ge-1/0/16 ge-2/0/16 +e57-2 distro4 ge-0/0/17 ge-1/0/17 ge-2/0/17 +e57-3 distro5 ge-0/0/16 ge-1/0/16 ge-2/0/16 +e57-4 distro5 ge-0/0/17 ge-1/0/17 ge-2/0/17 +e59-1 distro7 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e59-2 distro7 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e59-3 distro6 ge-0/0/0 ge-1/0/0 ge-2/0/0 +e59-4 distro6 ge-0/0/1 ge-1/0/1 ge-2/0/1 +e61-1 distro7 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e61-2 distro7 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e61-3 distro6 ge-0/0/2 ge-1/0/2 ge-2/0/2 +e61-4 distro6 ge-0/0/3 ge-1/0/3 ge-2/0/3 +e63-1 distro7 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e63-2 distro7 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e63-3 distro6 ge-0/0/4 ge-1/0/4 ge-2/0/4 +e63-4 distro6 ge-0/0/5 ge-1/0/5 ge-2/0/5 +e65-1 distro7 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e65-2 distro7 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e65-3 distro6 ge-0/0/6 ge-1/0/6 ge-2/0/6 +e65-4 distro6 ge-0/0/7 ge-1/0/7 ge-2/0/7 +e67-1 distro7 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e67-2 distro7 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e67-3 distro6 ge-0/0/8 ge-1/0/8 ge-2/0/8 +e67-4 distro6 ge-0/0/9 ge-1/0/9 ge-2/0/9 +e69-1 distro7 ge-0/0/10 ge-1/0/10 ge-2/0/10 +e69-2 distro7 ge-0/0/11 ge-1/0/11 ge-2/0/11 +e71-1 distro7 ge-0/0/12 ge-1/0/12 ge-2/0/12 +e71-2 distro7 ge-0/0/13 ge-1/0/13 ge-2/0/13 +e73-1 distro7 ge-0/0/14 ge-1/0/14 ge-2/0/14 +e73-2 distro7 ge-0/0/15 ge-1/0/15 ge-2/0/15 +e75-1 distro7 ge-0/0/16 ge-1/0/16 ge-2/0/16 +e75-2 distro7 ge-0/0/17 ge-1/0/17 ge-2/0/17 +e77-1 distro7 ge-0/0/18 ge-1/0/18 ge-2/0/18 +e77-2 distro7 ge-0/0/19 ge-1/0/19 ge-2/0/19 +e79-1 distro7 ge-0/0/20 ge-1/0/20 ge-2/0/20 +e79-2 distro7 ge-0/0/21 ge-1/0/21 ge-2/0/21 +e81-1 distro7 ge-0/0/22 ge-1/0/22 ge-2/0/22 +e81-2 distro7 ge-0/0/23 ge-1/0/23 ge-2/0/23 +e83-2 distro7 ge-0/0/24 ge-1/0/24 ge-2/0/24 +e85-2 distro7 ge-0/0/25 ge-1/0/25 ge-2/0/25 diff --git a/extras/fap/httpd/httpd_root/tools/switches.txt b/extras/fap/httpd/httpd_root/tools/switches.txt new file mode 100644 index 0000000..67b49f4 --- /dev/null +++ b/extras/fap/httpd/httpd_root/tools/switches.txt @@ -0,0 +1,131 @@ +e1-3 88.92.0.0/26 2a06:5840:0a::/64 88.92.54.2/26 2a06:5840:54a::2/64 1013 distro0 +e1-4 88.92.0.64/26 2a06:5840:0b::/64 88.92.54.3/26 2a06:5840:54a::3/64 1014 distro0 +e3-3 88.92.0.128/26 2a06:5840:0c::/64 88.92.54.4/26 2a06:5840:54a::4/64 1033 distro0 +e3-4 88.92.0.192/26 2a06:5840:0d::/64 88.92.54.5/26 2a06:5840:54a::5/64 1034 distro0 +e5-2 88.92.1.0/26 2a06:5840:1a::/64 88.92.54.66/26 2a06:5840:54b::66/64 1052 distro1 +e5-3 88.92.1.64/26 2a06:5840:1b::/64 88.92.54.6/26 2a06:5840:54a::6/64 1053 distro0 +e5-4 88.92.1.128/26 2a06:5840:1c::/64 88.92.54.7/26 2a06:5840:54a::7/64 1054 distro0 +e7-1 88.92.1.192/26 2a06:5840:1d::/64 88.92.54.67/26 2a06:5840:54b::67/64 1071 distro1 +e7-2 88.92.2.0/26 2a06:5840:2a::/64 88.92.54.68/26 2a06:5840:54b::68/64 1072 distro1 +e7-3 88.92.2.64/26 2a06:5840:2b::/64 88.92.54.8/26 2a06:5840:54a::8/64 1073 distro0 +e7-4 88.92.2.128/26 2a06:5840:2c::/64 88.92.54.9/26 2a06:5840:54a::9/64 1074 distro0 +e9-1 88.92.2.192/26 2a06:5840:2d::/64 88.92.54.69/26 2a06:5840:54b::69/64 1091 distro1 +e9-2 88.92.3.0/26 2a06:5840:3a::/64 88.92.54.70/26 2a06:5840:54b::70/64 1092 distro1 +e9-3 88.92.3.64/26 2a06:5840:3b::/64 88.92.54.10/26 2a06:5840:54a::10/64 1093 distro0 +e9-4 88.92.3.128/26 2a06:5840:3c::/64 88.92.54.11/26 2a06:5840:54a::11/64 1094 distro0 +e11-1 88.92.3.192/26 2a06:5840:3d::/64 88.92.54.71/26 2a06:5840:54b::71/64 1111 distro1 +e11-2 88.92.4.0/26 2a06:5840:4a::/64 88.92.54.72/26 2a06:5840:54b::72/64 1112 distro1 +e11-3 88.92.4.64/26 2a06:5840:4b::/64 88.92.54.12/26 2a06:5840:54a::12/64 1113 distro0 +e11-4 88.92.4.128/26 2a06:5840:4c::/64 88.92.54.13/26 2a06:5840:54a::13/64 1114 distro0 +e13-1 88.92.4.192/26 2a06:5840:4d::/64 88.92.54.73/26 2a06:5840:54b::73/64 1131 distro1 +e13-2 88.92.5.0/26 2a06:5840:5a::/64 88.92.54.74/26 2a06:5840:54b::74/64 1132 distro1 +e13-3 88.92.5.64/26 2a06:5840:5b::/64 88.92.54.130/26 2a06:5840:54c::130/64 1133 distro2 +e13-4 88.92.5.128/26 2a06:5840:5c::/64 88.92.54.131/26 2a06:5840:54c::131/64 1134 distro2 +e15-1 88.92.5.192/26 2a06:5840:5d::/64 88.92.54.75/26 2a06:5840:54b::75/64 1151 distro1 +e15-2 88.92.6.0/26 2a06:5840:6a::/64 88.92.54.76/26 2a06:5840:54b::76/64 1152 distro1 +e15-3 88.92.6.64/26 2a06:5840:6b::/64 88.92.54.132/26 2a06:5840:54c::132/64 1153 distro2 +e15-4 88.92.6.128/26 2a06:5840:6c::/64 88.92.54.133/26 2a06:5840:54c::133/64 1154 distro2 +e17-1 88.92.6.192/26 2a06:5840:6d::/64 88.92.54.77/26 2a06:5840:54b::77/64 1171 distro1 +e17-2 88.92.7.0/26 2a06:5840:7a::/64 88.92.54.78/26 2a06:5840:54b::78/64 1172 distro1 +e17-3 88.92.7.64/26 2a06:5840:7b::/64 88.92.54.134/26 2a06:5840:54c::134/64 1173 distro2 +e17-4 88.92.7.128/26 2a06:5840:7c::/64 88.92.54.135/26 2a06:5840:54c::135/64 1174 distro2 +e19-1 88.92.7.192/26 2a06:5840:7d::/64 88.92.54.79/26 2a06:5840:54b::79/64 1191 distro1 +e19-2 88.92.8.0/26 2a06:5840:8a::/64 88.92.54.80/26 2a06:5840:54b::80/64 1192 distro1 +e19-3 88.92.8.64/26 2a06:5840:8b::/64 88.92.54.136/26 2a06:5840:54c::136/64 1193 distro2 +e19-4 88.92.8.128/26 2a06:5840:8c::/64 88.92.54.137/26 2a06:5840:54c::137/64 1194 distro2 +e21-1 88.92.8.192/26 2a06:5840:8d::/64 88.92.54.81/26 2a06:5840:54b::81/64 1211 distro1 +e21-2 88.92.9.0/26 2a06:5840:9a::/64 88.92.54.82/26 2a06:5840:54b::82/64 1212 distro1 +e21-3 88.92.9.64/26 2a06:5840:9b::/64 88.92.54.138/26 2a06:5840:54c::138/64 1213 distro2 +e21-4 88.92.9.128/26 2a06:5840:9c::/64 88.92.54.139/26 2a06:5840:54c::139/64 1214 distro2 +e23-1 88.92.9.192/26 2a06:5840:9d::/64 88.92.54.83/26 2a06:5840:54b::83/64 1231 distro1 +e23-2 88.92.10.0/26 2a06:5840:10a::/64 88.92.54.84/26 2a06:5840:54b::84/64 1232 distro1 +e23-3 88.92.10.64/26 2a06:5840:10b::/64 88.92.54.140/26 2a06:5840:54c::140/64 1233 distro2 +e23-4 88.92.10.128/26 2a06:5840:10c::/64 88.92.54.141/26 2a06:5840:54c::141/64 1234 distro2 +e25-1 88.92.10.192/26 2a06:5840:10d::/64 88.92.54.194/26 2a06:5840:54d::194/64 1251 distro3 +e25-2 88.92.11.0/26 2a06:5840:11a::/64 88.92.54.195/26 2a06:5840:54d::195/64 1252 distro3 +e27-1 88.92.11.64/26 2a06:5840:11b::/64 88.92.54.196/26 2a06:5840:54d::196/64 1271 distro3 +e27-2 88.92.11.128/26 2a06:5840:11c::/64 88.92.54.197/26 2a06:5840:54d::197/64 1272 distro3 +e29-1 88.92.11.192/26 2a06:5840:11d::/64 88.92.54.198/26 2a06:5840:54d::198/64 1291 distro3 +e29-2 88.92.12.0/26 2a06:5840:12a::/64 88.92.54.199/26 2a06:5840:54d::199/64 1292 distro3 +e31-1 88.92.12.64/26 2a06:5840:12b::/64 88.92.54.200/26 2a06:5840:54d::200/64 1311 distro3 +e31-2 88.92.12.128/26 2a06:5840:12c::/64 88.92.54.201/26 2a06:5840:54d::201/64 1312 distro3 +e33-1 88.92.12.192/26 2a06:5840:12d::/64 88.92.54.202/26 2a06:5840:54d::202/64 1331 distro3 +e33-2 88.92.13.0/26 2a06:5840:13a::/64 88.92.54.203/26 2a06:5840:54d::203/64 1332 distro3 +e35-1 88.92.13.64/26 2a06:5840:13b::/64 88.92.54.204/26 2a06:5840:54d::204/64 1351 distro3 +e35-2 88.92.13.128/26 2a06:5840:13c::/64 88.92.54.205/26 2a06:5840:54d::205/64 1352 distro3 +e37-1 88.92.13.192/26 2a06:5840:13d::/64 88.92.54.206/26 2a06:5840:54d::206/64 1371 distro3 +e37-2 88.92.14.0/26 2a06:5840:14a::/64 88.92.54.207/26 2a06:5840:54d::207/64 1372 distro3 +e39-1 88.92.14.64/26 2a06:5840:14b::/64 88.92.54.208/26 2a06:5840:54d::208/64 1391 distro3 +e39-2 88.92.14.128/26 2a06:5840:14c::/64 88.92.54.209/26 2a06:5840:54d::209/64 1392 distro3 +e41-1 88.92.14.192/26 2a06:5840:14d::/64 88.92.55.2/26 2a06:5840:55a::2/64 1411 distro4 +e41-2 88.92.15.0/26 2a06:5840:15a::/64 88.92.55.3/26 2a06:5840:55a::3/64 1412 distro4 +e41-3 88.92.15.64/26 2a06:5840:15b::/64 88.92.55.66/26 2a06:5840:55b::66/64 1413 distro5 +e41-4 88.92.15.128/26 2a06:5840:15c::/64 88.92.55.67/26 2a06:5840:55b::67/64 1414 distro5 +e43-1 88.92.15.192/26 2a06:5840:15d::/64 88.92.55.4/26 2a06:5840:55a::4/64 1431 distro4 +e43-2 88.92.16.0/26 2a06:5840:16a::/64 88.92.55.5/26 2a06:5840:55a::5/64 1432 distro4 +e43-3 88.92.16.64/26 2a06:5840:16b::/64 88.92.55.68/26 2a06:5840:55b::68/64 1433 distro5 +e43-4 88.92.16.128/26 2a06:5840:16c::/64 88.92.55.69/26 2a06:5840:55b::69/64 1434 distro5 +e45-1 88.92.16.192/26 2a06:5840:16d::/64 88.92.55.6/26 2a06:5840:55a::6/64 1451 distro4 +e45-2 88.92.17.0/26 2a06:5840:17a::/64 88.92.55.7/26 2a06:5840:55a::7/64 1452 distro4 +e45-3 88.92.17.64/26 2a06:5840:17b::/64 88.92.55.70/26 2a06:5840:55b::70/64 1453 distro5 +e45-4 88.92.17.128/26 2a06:5840:17c::/64 88.92.55.71/26 2a06:5840:55b::71/64 1454 distro5 +e47-1 88.92.17.192/26 2a06:5840:17d::/64 88.92.55.8/26 2a06:5840:55a::8/64 1471 distro4 +e47-2 88.92.18.0/26 2a06:5840:18a::/64 88.92.55.9/26 2a06:5840:55a::9/64 1472 distro4 +e47-3 88.92.18.64/26 2a06:5840:18b::/64 88.92.55.72/26 2a06:5840:55b::72/64 1473 distro5 +e47-4 88.92.18.128/26 2a06:5840:18c::/64 88.92.55.73/26 2a06:5840:55b::73/64 1474 distro5 +e49-1 88.92.18.192/26 2a06:5840:18d::/64 88.92.55.10/26 2a06:5840:55a::10/64 1491 distro4 +e49-2 88.92.19.0/26 2a06:5840:19a::/64 88.92.55.11/26 2a06:5840:55a::11/64 1492 distro4 +e49-3 88.92.19.64/26 2a06:5840:19b::/64 88.92.55.74/26 2a06:5840:55b::74/64 1493 distro5 +e49-4 88.92.19.128/26 2a06:5840:19c::/64 88.92.55.75/26 2a06:5840:55b::75/64 1494 distro5 +e51-1 88.92.19.192/26 2a06:5840:19d::/64 88.92.55.12/26 2a06:5840:55a::12/64 1511 distro4 +e51-2 88.92.20.0/26 2a06:5840:20a::/64 88.92.55.13/26 2a06:5840:55a::13/64 1512 distro4 +e51-3 88.92.20.64/26 2a06:5840:20b::/64 88.92.55.76/26 2a06:5840:55b::76/64 1513 distro5 +e51-4 88.92.20.128/26 2a06:5840:20c::/64 88.92.55.77/26 2a06:5840:55b::77/64 1514 distro5 +e53-1 88.92.20.192/26 2a06:5840:20d::/64 88.92.55.14/26 2a06:5840:55a::14/64 1531 distro4 +e53-2 88.92.21.0/26 2a06:5840:21a::/64 88.92.55.15/26 2a06:5840:55a::15/64 1532 distro4 +e53-3 88.92.21.64/26 2a06:5840:21b::/64 88.92.55.78/26 2a06:5840:55b::78/64 1533 distro5 +e53-4 88.92.21.128/26 2a06:5840:21c::/64 88.92.55.79/26 2a06:5840:55b::79/64 1534 distro5 +e55-1 88.92.21.192/26 2a06:5840:21d::/64 88.92.55.16/26 2a06:5840:55a::16/64 1551 distro4 +e55-2 88.92.22.0/26 2a06:5840:22a::/64 88.92.55.17/26 2a06:5840:55a::17/64 1552 distro4 +e55-3 88.92.22.64/26 2a06:5840:22b::/64 88.92.55.80/26 2a06:5840:55b::80/64 1553 distro5 +e55-4 88.92.22.128/26 2a06:5840:22c::/64 88.92.55.81/26 2a06:5840:55b::81/64 1554 distro5 +e57-1 88.92.22.192/26 2a06:5840:22d::/64 88.92.55.18/26 2a06:5840:55a::18/64 1571 distro4 +e57-2 88.92.23.0/26 2a06:5840:23a::/64 88.92.55.19/26 2a06:5840:55a::19/64 1572 distro4 +e57-3 88.92.23.64/26 2a06:5840:23b::/64 88.92.55.82/26 2a06:5840:55b::82/64 1573 distro5 +e57-4 88.92.23.128/26 2a06:5840:23c::/64 88.92.55.83/26 2a06:5840:55b::83/64 1574 distro5 +e59-1 88.92.23.192/26 2a06:5840:23d::/64 88.92.55.194/26 2a06:5840:55d::194/64 1591 distro7 +e59-2 88.92.24.0/26 2a06:5840:24a::/64 88.92.55.195/26 2a06:5840:55d::195/64 1592 distro7 +e59-3 88.92.24.64/26 2a06:5840:24b::/64 88.92.55.130/26 2a06:5840:55c::130/64 1593 distro6 +e59-4 88.92.24.128/26 2a06:5840:24c::/64 88.92.55.131/26 2a06:5840:55c::131/64 1594 distro6 +e61-1 88.92.24.192/26 2a06:5840:24d::/64 88.92.55.196/26 2a06:5840:55d::196/64 1611 distro7 +e61-2 88.92.25.0/26 2a06:5840:25a::/64 88.92.55.197/26 2a06:5840:55d::197/64 1612 distro7 +e61-3 88.92.25.64/26 2a06:5840:25b::/64 88.92.55.132/26 2a06:5840:55c::132/64 1613 distro6 +e61-4 88.92.25.128/26 2a06:5840:25c::/64 88.92.55.133/26 2a06:5840:55c::133/64 1614 distro6 +e63-1 88.92.25.192/26 2a06:5840:25d::/64 88.92.55.198/26 2a06:5840:55d::198/64 1631 distro7 +e63-2 88.92.26.0/26 2a06:5840:26a::/64 88.92.55.199/26 2a06:5840:55d::199/64 1632 distro7 +e63-3 88.92.26.64/26 2a06:5840:26b::/64 88.92.55.134/26 2a06:5840:55c::134/64 1633 distro6 +e63-4 88.92.26.128/26 2a06:5840:26c::/64 88.92.55.135/26 2a06:5840:55c::135/64 1634 distro6 +e65-1 88.92.26.192/26 2a06:5840:26d::/64 88.92.55.200/26 2a06:5840:55d::200/64 1651 distro7 +e65-2 88.92.27.0/26 2a06:5840:27a::/64 88.92.55.201/26 2a06:5840:55d::201/64 1652 distro7 +e65-3 88.92.27.64/26 2a06:5840:27b::/64 88.92.55.136/26 2a06:5840:55c::136/64 1653 distro6 +e65-4 88.92.27.128/26 2a06:5840:27c::/64 88.92.55.137/26 2a06:5840:55c::137/64 1654 distro6 +e67-1 88.92.27.192/26 2a06:5840:27d::/64 88.92.55.202/26 2a06:5840:55d::202/64 1671 distro7 +e67-2 88.92.28.0/26 2a06:5840:28a::/64 88.92.55.203/26 2a06:5840:55d::203/64 1672 distro7 +e67-3 88.92.28.64/26 2a06:5840:28b::/64 88.92.55.138/26 2a06:5840:55c::138/64 1673 distro6 +e67-4 88.92.28.128/26 2a06:5840:28c::/64 88.92.55.139/26 2a06:5840:55c::139/64 1674 distro6 +e69-1 88.92.28.192/26 2a06:5840:28d::/64 88.92.55.204/26 2a06:5840:55d::204/64 1691 distro7 +e69-2 88.92.29.0/26 2a06:5840:29a::/64 88.92.55.205/26 2a06:5840:55d::205/64 1692 distro7 +e71-1 88.92.29.64/26 2a06:5840:29b::/64 88.92.55.206/26 2a06:5840:55d::206/64 1711 distro7 +e71-2 88.92.29.128/26 2a06:5840:29c::/64 88.92.55.207/26 2a06:5840:55d::207/64 1712 distro7 +e73-1 88.92.29.192/26 2a06:5840:29d::/64 88.92.55.208/26 2a06:5840:55d::208/64 1731 distro7 +e73-2 88.92.30.0/26 2a06:5840:30a::/64 88.92.55.209/26 2a06:5840:55d::209/64 1732 distro7 +e75-1 88.92.30.64/26 2a06:5840:30b::/64 88.92.55.210/26 2a06:5840:55d::210/64 1751 distro7 +e75-2 88.92.30.128/26 2a06:5840:30c::/64 88.92.55.211/26 2a06:5840:55d::211/64 1752 distro7 +e77-1 88.92.30.192/26 2a06:5840:30d::/64 88.92.55.212/26 2a06:5840:55d::212/64 1771 distro7 +e77-2 88.92.31.0/26 2a06:5840:31a::/64 88.92.55.213/26 2a06:5840:55d::213/64 1772 distro7 +e79-1 88.92.31.64/26 2a06:5840:31b::/64 88.92.55.214/26 2a06:5840:55d::214/64 1791 distro7 +e79-2 88.92.31.128/26 2a06:5840:31c::/64 88.92.55.215/26 2a06:5840:55d::215/64 1792 distro7 +e81-1 88.92.31.192/26 2a06:5840:31d::/64 88.92.55.216/26 2a06:5840:55d::216/64 1811 distro7 +e81-2 88.92.32.0/26 2a06:5840:32a::/64 88.92.55.217/26 2a06:5840:55d::217/64 1812 distro7 +e83-2 88.92.32.64/26 2a06:5840:32b::/64 88.92.55.218/26 2a06:5840:55d::218/64 1832 distro7 +e85-2 88.92.32.128/26 2a06:5840:32c::/64 88.92.55.219/26 2a06:5840:55d::219/64 1852 distro7 diff --git a/extras/fap/httpd/httpd_root/tools/update_psql_from_switches_patchlist.php b/extras/fap/httpd/httpd_root/tools/update_psql_from_switches_patchlist.php new file mode 100644 index 0000000..a787c33 --- /dev/null +++ b/extras/fap/httpd/httpd_root/tools/update_psql_from_switches_patchlist.php @@ -0,0 +1,79 @@ +<?php + + /* + Ugliest implementation of a kind of ipcalc... FULHAX + */ + function find_v4_def_route($subnet){ + $subnet = array_shift(explode('/', $subnet)); + $octets = explode('.', $subnet); + $octets[3]++; + return implode('.', $octets); + } + function find_v6_def_route($subnet){ + $subnet = array_shift(explode('/', $subnet)); + return str_replace('::', '::1', $subnet); + } + + function x($input){ + $parts = explode('.', $input); + if($parts[3] > 192){ + $last = '193'; + }elseif($parts[3] > 128){ + $last = '129'; + }elseif($parts[3] > 64){ + $last = '65'; + }else{ + $last = '1'; + } + + return $parts[0] . '.' . $parts[1] . '.' . $parts[2] . '.' . $last; + } + + + require('../pg_connect.php'); + + $switches_array = file('switches.txt'); + $patchlist_array = file('patchlist.txt'); + + /* + switches.txt: e41-3 88.92.15.64/26 2a06:5840:15b::/64 88.92.55.66/26 2a06:5840:55b::66/64 1413 distro5 + patchlist.txt: e7-2 distro1 ge-0/0/2 ge-1/0/2 ge-2/0/2 + */ + + $d1 = array(); # dataset + foreach($patchlist_array as $line){ + $t = array(); # temp array in this loop + list($switch, $t['distro'], $t['distro_port_0'], $t['distro_port_1'], $t['distro_port_2']) = explode(' ', $line); + $t = array_map('trim', $t); + $d1[$switch] = $t; + } + + $d2 = array(); # dataset + foreach($switches_array as $line){ + $t = array(); # temp array in this loop + list($t['switch'], $t['v4_subnet'], $t['v6_subnet'], $t['mgmt_v4_addr'], $t['mgmt_v6_addr'], $t['vlan']) = explode(' ', $line); + $t = array_map('trim', $t); + $d2[$t['switch']] = $t; + } + $d = array_merge_recursive($d1, $d2); + # var_dump($d); + + foreach($d as $switch => $prop){ + $q = ' + UPDATE switches SET + distro_phy_port = \'' . pg_escape_string($prop['distro_port_0']) . '\', + traffic_vlan = \'' . pg_escape_string($prop['vlan']) . '\', + mgmt_v4_gw = \'' . pg_escape_string(x($prop['mgmt_v4_addr'])) . '\' + WHERE sysname = \'' . pg_escape_string($switch) . '\''; + + # var_dump($q); + + $result = pg_query($dbconn, $q); + if (!$result){ + echo 'NOPE: ' . $q . "\n"; + exit; + } + + } + echo 'done! - no errors'; +?> |