- Faire / mettre un looking glass avec commandes basiques
- mettre un tacacs
- mettre un syslog
- interface web aux logs tacacs accounting
- reporting tacacs auth failure
- interface web syslog

service unsupported-transceiver
no errdisable detect cause gbic-invalid

ou sur asr :
service unsupported-transceiver
interface\ set transceiver permit pid all


127.0.0.1 www.facebook.com
::1 www.facebook.com

+ serveur web en local et regarder tail /var/log/www/access.log

carte 3g novatel : setserial /dev/ttyS0 spd_warp low_latency


avoir l'adresse ip publique : 
$ dig +short @208.67.222.220 myip.opendns.com
$ dig TXT o-o.myaddr.l.google.com

switch1(config-if)#switchport tr encapsulation dot1q
Command rejected: Et0/0 not a switching port.

switch1(config-if)#switchport <<< \o/

$ type bgproute
bgproute est une fonction
bgproute () 
{ 
    ip=$1;
    if [ -z "$1" ]; then
        ip=$(dig +short @208.67.222.220 myip.opendns.com);
        echo "Using IP: $ip";
    fi;
    dig +short TXT $(echo $ip | awk -F. '{print $4 "." $3 "." $2 "." $1 ".aspath.routeviews.org" }') @asnums.routeviews.org | awk -F\" '{print "AS path: " $2 "\nRoute: " $4 "/" $6 }'
}

$ bgproute 8.8.8.8
AS path: 2905 15169
Route: 8.8.8.0/24

$ type get_routes_from_as 
get_routes_from_as est une fonction
get_routes_from_as () 
{ 
  AS=$1;
  if [ -z "$1" ]; then
    AS=$(whois -h asn.shadowserver.org origin $(dig +short @208.67.222.220 myip.opendns.com) | awk -F" " '{print $1}');
  fi;
  whois -h asn.shadowserver.org prefix $AS
}


$ dig +short TXT 1.0.0.3.5.0.8.7.0.0.4.0.5.4.1.0.0.a.2.origin6.asn.cymru.com 
"15169 | 2a00:1450::/32 | IE | ripencc | 2009-10-05"


$ echo 2a00:1450:4007:805::1003 | rev | sed 's/://g' | sed 's/.\{1\}/&./g' | echo "$(cat - )origin6.asn.cymru.com"
3.0.0.1.5.0.8.7.0.0.4.0.5.4.1.0.0.a.2.origin6.asn.cymru.com


$ dig +short TXT $(echo 2a00:1450:4007:805::1003 | rev | sed 's/://g' | sed 's/.\{1\}/&./g' | echo "$(cat - )origin6.asn.cymru.com") | sed 's/\"//g' | awk -F\| '{print "Origin: " $1 "\nRoute: " $2 }'
Origin: 15169 
Route:  2a00:1450::/32 

% curl -s https://api.iptoasn.com/v1/as/ip/89.234.186.1 | jq
{
  "announced": true,
  "as_country_code": "FR",
  "as_description": "GRIFON",
  "as_number": 204092,
  "first_ip": "89.234.186.0",
  "last_ip": "89.234.186.255"
}
% curl -s https://api.iptoasn.com/v1/as/ip/2a00:5884::1 | jq  
{
  "announced": true,
  "as_country_code": "FR",
  "as_description": "GRIFON",
  "as_number": 204092,
  "first_ip": "2a00:5884::",
  "last_ip": "2a00:5884:ffff:ffff:ffff:ffff:ffff:ffff"
}