Analyse du réseau local

Documents pareils
Analyse du réseau local

FILTRAGE de PAQUETS NetFilter

Capture, Filtrage et Analyse de trames ETHERNET avec le logiciel Wireshark. Etape 1 : Lancement des machines virtuelles VMWARE et de Wireshark

Internet Protocol. «La couche IP du réseau Internet»

Administration Système

Outils d'analyse de la sécurité des réseaux. HADJALI Anis VESA Vlad

ETHEREAL. Introduction. 1. Qu'est-ce qu'ethereal Historique Le statut d'ethereal

Plan. Programmation Internet Cours 3. Organismes de standardisation

Table des matières GNU/Linux Services Serveurs Éléments de cours sur TCP/IP Fichiers de configuration et commandes de base ...

TP Wireshark. Première approche de Wireshark. 1 ) Lancer Wireshark (double clic sur l icône sur le bureau). La fenêtre

La supervision des services dans le réseau RENATER

ALLARD 3ème année Christophe Licence informatique RAPPORT DE STAGE. Association Tetaneutral.net. Stage du 15 avril au 7 juin

2. MAQUETTAGE DES SOLUTIONS CONSTRUCTIVES. 2.2 Architecture fonctionnelle d un système communicant.

Introduction. Adresses

Les firewalls libres : netfilter, IP Filter et Packet Filter

LINUX REDHAT, SERVICES RÉSEAUX/INTERNET

TP SECU NAT ARS IRT ( CORRECTION )

Introduction à l'analyse réseau Philippe Latu philippe.latu(at)linux-france.org

FTP-SSH-RSYNC-SCREEN au plus simple

COMMANDES RÉSEAUX TCP/IP WINDOWS.

Fonctionnement de Iptables. Exercices sécurité. Exercice 1

1. Fonctionnement de l Internet 2. Protocoles applicatifs 3. Programmation réseau

Systèmes et Réseaux (ASR 2) - Notes de cours Cours 14

Programme formation pfsense Mars 2011 Cript Bretagne

U.E. ARES - TD+TME n 1

Imprimantes et partage réseau sous Samba avec authentification Active Directory

Couche application. La couche application est la plus élevée du modèle de référence.

1. Warm up Activity: Single Node

Année Universitaire session 1 d automne Parcours : CSB5 Licence 3 STS Informatique

TP Analyse de flux et outils Netflow : Nfdump et Nfsen

TP DHCP et DNS. Université Pierre Mendès France U.F.R. Sciences de l Homme et de la Société Master IC²A

Formation Iptables : Correction TP

Réalisation d un portail captif d accès authentifié à Internet

Administration UNIX. Le réseau

Configuration réseau Basique

Connexion à un réseau local: Configuration et dépannage

Sendmail milter/greylisting

Netfilter & Iptables. Théorie Firewall. Autoriser le trafic entrant d'une connexion déjà établie. Permettre le trafic entrant sur un port spécifique

IPv6 et EGEE: Migration d un système d information complexe vers IPv6, glite

Chapitre I. La couche réseau. 1. Couche réseau 1. Historique de l Internet

Chapitre IX : Virtualisation

Université Pierre Mendès France U.F.R. Sciences de l Homme et de la Société Master IC²A. TP réseau firewall

Licence 3 Systèmes et Réseaux II. Chapitre V : Filtrage

Introduction aux Technologies de l Internet

EPREUVE PRATIQUE DES TECHNIQUES INFORMATIQUES ACTIVITE N 1. Thème de l activité : Configuration d un firewall

Internet Group Management Protocol (IGMP) Multicast Listener Discovery ( MLD ) RFC 2710 (MLD version 1) RFC 3810 (MLD version 2)

Règles et paramètres d'exploitation de Caparmor 2 au 11/12/2009. Pôle de Calcul Intensif pour la mer, 11 Decembre 2009

Résolution des problèmes de performances de bout en bout

7.3 : Ce qu IPv6 peut faire pour moi

Guide d'installation et de configuration de Pervasive.SQL 7 dans un environnement réseau Microsoft Windows NT

Administration Système & Réseau. Domain Name System Historique & Concepts Fonctionnalités & Hiérarchie Requêtes & Base de donnée DNS

TP2 - Conguration réseau et commandes utiles. 1 Généralités. 2 Conguration de la machine. 2.1 Commande hostname

Devoir Surveillé de Sécurité des Réseaux

SSH, le shell sécurisé

Packet Tracer : configuration des listes de contrôle d'accès étendues, scénario 1

Figure 1a. Réseau intranet avec pare feu et NAT.

pare - feu généralités et iptables

Installation de la plate-forme Liberacces 2.0 «Intégrale» avec LiberInstall

Répartition des charges avec HaProxy CONTEXTE MFC JULIEN HUBERT

Sécuriser son réseau. Sécuriser son réseau Philippe Weill (IPSL/LATMOS) Frédéric Bongat (SSI/GOUV/FR)

Filtrage IP MacOS X, Windows NT/2000/XP et Unix

Iptables. Table of Contents

Administration de systèmes UNIX Formation ARS

Sauvegardes par Internet avec Rsync

IP & Co. 1. Service DHCP. L'objectif de ce TP est de voir l'ensemble des services élémentaires mis en oeuvre dans les réseaux IP.

Agrégation de liens xdsl sur un réseau radio

TP Linux : Firewall. Conditions de réalisation : travail en binôme. Fonctionnement du parefeu Netfilter. I Qu est ce qu'un firewall?

FIREWALL ET SÉCURITÉ D UN RÉSEAU PERSONNEL SOUS LINUX

Présentation du modèle OSI(Open Systems Interconnection)

Outils et applications multicast

LAB : Schéma. Compagnie C / /24 NETASQ

TP7. DHCP. 1 Comportement en présence d un serveur unique

Comment Créer une Base de Données Ab Initio

Pharmed. gestion de pharmacie hospitalière. Installation / déploiement

Fonctionnement Kiwi Syslog + WhatsUP Gold

Squid. Olivier Aubert 1/19

Tunnels et VPN. 22/01/2009 Formation Permanente Paris6 86

Surveillance du réseau et de gestion Introduction à SNMP

Security and privacy in network - TP

Module 8. Protection des postes de travail Windows 7

Environnements informatiques

Les systèmes pare-feu (firewall)

Mise en place d'un Réseau Privé Virtuel

Métrologie des réseaux IP

DIFF AVANCÉE. Samy.

Sécurité et Firewall

TutoJRES MétrologieM Mesures passives

Intérêt du NAT (Network Address Translation) Administration Réseau Niveau routage. Exemple d Intranet. Principe NAT

Construction d un fichier de zone Déboguage et dépannage

Le Tunneling DNS. P.Bienaimé X.Delot P.Mazon K.Tagourti A.Yahi A.Zerrouki. Université de Rouen - M2SSI. 24 février 2011

Linux Firewalling - IPTABLES

HAUTE DISPONIBILITÉ DE MACHINE VIRTUELLE AVEC HYPER-V 2012 R2 PARTIE CONFIGURATION OPENVPN SUR PFSENSE

UDP/TCP - Protocoles transport

Formation Technicien Supérieur de Support en Informatique T2SI. Le module LINUX. Session J04 Version 01

ISTIA INNOVATION. 62, Ave ND du Lac F Angers

IPFIX (Internet Protocol Information export)

Surveillance de Scripts LUA et de réception d EVENT. avec LoriotPro Extended & Broadcast Edition

Project 1 Experimenting with Simple Network Management Tools. ping, traceout, and Wireshark (formerly Ethereal)

Rapport du projet Qualité de Service

TP réseaux Translation d adresse, firewalls, zonage

Transcription:

Atelier des Opérations Avancées des Registres Analyse du réseau local These materials are licensed under the Creative Commons Attribution-Noncommercial 3. Unported license (http://creativecommons.org/licenses/by-nc/3./) as part of the ICANN, ISOC and NSRC Registry Operations Curriculum.

Local Analysis Analyse Réseau Comme nous le savons Avant d'accuser le réseau, nous devons vérifier si le problème ne vient pas de nous Qu'est-ce qui peut etre fautif localement Problèmes matériel Charge excessive (CPU, mémoire, I/O) Qu'est qui est considéré normal? Utiliser fréquemment les outils d'analyse Familiarisez-vous avec les valeurs et états normaux de votre machine ( établissement des références ). Il est important de maintenir l'historique Agents SNMP et base de données

Linux Performance Analyses Locales Analysis Trois grandes catégories: Processus Mémoires Processus en cours d'exécution (actif) Processus en attente (inactif) Attendant leur tour bloqués Réelles Virtuelles I/O (Input/Output) Stockage Réseau

Indicateurs clés CPU insuffisant Nombre de processus attendant detre exécutés est souvant élévé Utilisation élévée du CPU (charge moyenne) Mémoire insuffisante Très peu de mémoire disponible Beaucoup d'activités SWAP (swap in, swap out) I/O lents Beaucoup de processus bloqués Nombre de transferts bloqués élévé

Analyses Locales Heureusement, sous Unix, il y a une douzaine d'outils utiles qui nous donne beaucoup d'informations sur notre machine Parmi les plus connus: vmstat top lsof netstat - dump - wireshark (ethereal) - iptraf - iperf

vmstat Montre des résumés périodiques d'information à propos des processus, mémoires, paging, I/O, état du CPU, etc vmstat <-options> <delay> <count> # vmstat 2 # vmstat 2 procs -----------ory------------swap-- -----io---- --system-- ----cpu---- rprocs b -----------ory---------swpd free buff cache ---swap-si so -----io---bi bo --system-in cs us----cpu---sy id wa r b swpd free buff cache si so bi bo in cs us sy 73 id wa 2 29648 25552 571332 284876 3 4 3 3 15 11 2 29648 25552 571332 284876 3 4 3 3 15 11 2 29648 2468 571332 2849 444 273 79356 16 16 6873 29648 25216 2468571336 57133228494 2849 444 439 27346735 7935616161167468 1 2 29648 6 1234 29648 25212 25216571336 57133628494 28494 4391282 46735 17 16 21 1 62 74 1 1 29648 6 1234 22 159 1 29648 25212 571336 28494 22 159 1282 17 21 2 29648 25196 571348 284912 5 27 82455 14 18 68 62 29648 25192 25196571348 571348284912 284912 5 243 277748 82455161415186968 1 2 29648 272 1 29648 25192 571348 284912 272 243 7748161614156969 2 29648 2588 57136 284916 444 255 83619 2 29648 2588 57136 284916 444 255 83619161618146669 2 29648 25872 57136 28492 178 22 9521 2 29648 25872 57136 28492 178 22 9521 16 18 66

top Outil de base de performance pour les environnements for Unix/Linux Montre périodiquement une liste de statistiques de performance système: Utilisation CPU Utilisation RAM et SWAP Charges moyennes (Utilisation du CPU) Information par processus

top suite. Information par processus (les colonnes les plus intéressantes): PID: ID du processus USER: Processus utilisateurs (propriétaires) %CPU: Percentage du CPU utilisé par le processus depuis le dernier échantillon %MEM: Percentage de mémoire physique (RAM) utilisée par le processus TIME: Temps total du CPU utilisé par le processus used depuis son démarrage

Charges moyennes Nombre moyen de processus qctifs dans les dernières 1, 5 and 15 minutes Une mesure pas très utile En fonction de la machine, les valeurs considérées normales peuvent varier: Les machines Multi-processeur peuvent gérer plus de processus actifs par unité de temps (Qu'une machine Mono-processeur)

top Quelques commandes clavier interactives pour top f : Ajout ou suppression de colonnes F : Specifier par quelle colonne trier <, > : Déplacer la colonne dans laquelle nous trions u : Specifier un utilisateur k : Specifier un processus à arreter d, s : Change l'intervalle de mise à jour de l'affichage

netstat Nous montre des informations: Connexions réseau Tables de routage Statistiques des interfaces (NIC) Membres de groupes Multicast

netstat Quelques options utiles -n: Montre adresses, ports et userids en format numérique -r: Table de routage -s: Statistiques par protocole -i: Status des interfaces -l: Sockets à l'écoute --, --udp: Specifie le protocole -A: Famille d'adresse [inet inet6 unix etc.] -p: Montre le nom de chaque processus pour chaque port -c: Montre sorties/résultats continuellement

netstat Exemples (suivre le long de): # netstat -anr # netstat -anr table Kernel IP routing Kernel IP routing table Destination Gateway Destination Gateway 192.168.5.128... 192.168.5.128 192.168.5.129......... 192.168.5.129 Genmask Flags Genmask 255.255.255.128 U Flags 255.255.255.128UGU...... UG MSS Window irtt Iface MSS Iface Window irtt eth eth eth eth # netstat -o -t # netstat -o connections -t Active Internet (w/o servers) Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Proto Recv-Q Local Address Send-Q 192.168.5.135:ssh 192.168.5.135:ssh keepalive (6754.95//) keepalive (6754.95//) Foreign Address Foreign Address 192.168.3.124:34155 192.168.3.124:34155 State Timer State ESTABLISHED Timer ESTABLISHED # netstat -atv # netstat -atv Active Internet connections (servers and established) Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address Proto Recv-Q Send-Q Local Address Foreign Address *:ssh *:ssh 192.168.5.135:ssh 192.168.3.124:34155 192.168.5.135:ssh 192.168.3.124:34155 6 [::]:ssh 6 [::]:ssh State State ESTABLISHED ESTABLISHED

netstat Exemples: # netstat -n -- -c # netstat -n -- -cservers) Active Internet connections (w/o Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Proto Recv-Q Send-Q Local Address 272 ::ffff:192.188.51.4:22 272 ::ffff:192.188.51.4:22 ::ffff:192.188.51.4:22 ::ffff:192.188.51.4:22 Foreign Address State Foreign Address State ::ffff:128.223.6.27:6968 ESTABLISHED ::ffff:128.223.6.27:6968 ESTABLISHED ESTABLISHED ::ffff:128.223.6.27:53219 ::ffff:128.223.6.27:53219 ESTABLISHED # netstat -lnp -- # netstat -lnp -- Active Internet connections (only servers) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Proto Recv-Q Send-Q Local Address...:199...:199...:336...:336 Foreign Address Foreign Address...:*...:*...:*...:* State State PID/Program name PID/Program name 11645/snmpd 11645/snmpd 1997/mysqld 1997/mysqld # netstat -ic # netstat -ic table Kernel Interface Kernel Interface Iface MTU MettableRX-OK RX-ERR RX-DRP RX-OVR Iface MTU Met RX-OK RX-ERR eth 15 215591 RX-DRP RX-OVR 15 215591 loeth 16436 182 lo 16436 182 eth 15 215595 15 215595 loeth 16436 182 lo 16436 182 eth 15 215597 eth 15 215597 lo 16436 182 lo 16436 215591 182 eth 15 eth 15 215591 lo 16436 182 lo 16436 2155913 182 eth 15 eth 15 2155913 TX-OK TX-ERR TX-DRP TX-OVR Flg TX-OK TX-ERR Flg 339116 TX-DRP TX-OVR BMRU 339116 BMRU 182 LRU 182 LRU 339117 BMRU 339117 BMRU 182 LRU 182 LRU 33912 BMRU 33912 BMRU 182 LRU 182 LRU 339122 BMRU 339122 BMRU 182 LRU 182 LRU 339124 BMRU 339124 BMRU

netstat suite. Exemples: # netstat listening --program # netstat listening --program Active Internet connections (only servers) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Proto Recv-Q Send-Q Local Address *:51 *:51 localhost:mysql localhost:mysql *:www *:www t6-2.local:domain t6-2.local:domain t6-2.local:domain t6-2.local:domain t6-2.local:domain t6-2.local:domain localhost:domain localhost:domain localhost:ipp localhost:ipp localhost:smtp localhost:smtp localhost:953 localhost:953 *:https *:https 6 [::]:ftp 6 [::]:ftp 6 [::]:domain 6 [::]:domain 6 [::]:ssh 6 [::]:ssh 6 [::]:3 6 [::]:3 6 ip6-localhost:953 6 ip6-localhost:953 6 [::]:35 6 [::]:35 Foreign Address Foreign Address State State PID/Program name PID/Program name 13598/iperf 13598/iperf 5586/mysqld 5586/mysqld 7246/apache2 7246/apache2 5378/named 5378/named 5378/named 5378/named 5378/named 5378/named 5378/named 5378/named 5522/cupsd 5522/cupsd 6772/exim4 6772/exim4 5378/named 5378/named 7246/apache2 7246/apache2 7185/proftpd 7185/proftpd 5378/named 5378/named 5427/ 5427/ 17644/ntop 17644/ntop 5378/named 5378/named 17644/ntop 17644/ntop

netstat suite. $ sudo netstat -atup $ sudo netstat -atup Active Internet connections (servers and established) (if run as PID/Program name is included) Active Internet connections (servers and established) (if run as PID/Program name is included) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name *:35586 254/ekpd *:35586 254/ekpd localhost:mysql 2776/mysqld localhost:mysql 2776/mysqld *:www 14743/apache2 *:www 14743/apache2 d229-231.uoregon:domain 2616/named d229-231.uoregon:domain 2616/named *:ftp 348/vsftpd *:ftp 348/vsftpd localhost:domain 2616/named localhost:domain 2616/named *:ssh 2675/ *:ssh 2675/ localhost:ipp 3853/cupsd localhost:ipp 3853/cupsd localhost:smtp 3225/exim4 localhost:smtp 3225/exim4 localhost:953 2616/named localhost:953 2616/named *:https 14743/apache2 *:https 14743/apache2 6 [::]:domain 2616/named 6 [::]:domain 2616/named 6 [::]:ssh 2675/ 6 [::]:ssh 2675/ 6 ip6-localhost:953 2616/named 6 ip6-localhost:953 2616/named udp *:5842 3828/avahi-daemon: udp *:5842 3828/avahi-daemon: udp localhost:snmp 3368/snmpd udp localhost:snmp 3368/snmpd udp d229-231.uoregon:domain 2616/named udp d229-231.uoregon:domain 2616/named udp localhost:domain 2616/named udp localhost:domain 2616/named udp *:bootpc 13237/dhclient udp *:bootpc 13237/dhclient udp *:mdns 3828/avahi-daemon: udp *:mdns 3828/avahi-daemon: udp d229-231.uoregon.ed:ntp 3555/ntpd udp d229-231.uoregon.ed:ntp 3555/ntpd udp localhost:ntp 3555/ntpd udp localhost:ntp 3555/ntpd udp *:ntp 3555/ntpd udp *:ntp 3555/ntpd udp6 [::]:domain 2616/named udp6 [::]:domain 2616/named udp6 fe8::213:2ff:fe1f::ntp 3555/ntpd udp6 fe8::213:2ff:fe1f::ntp 3555/ntpd udp6 ip6-localhost:ntp 3555/ntpd udp6 ip6-localhost:ntp 3555/ntpd udp6 [::]:ntp 3555/ntpd udp6 [::]:ntp 3555/ntpd

lsof (LiSt of Open Files) lsof est particulièrement utile parce que sous Unix, tout est fichier : sockets unix, ip sockets ip, répertoires, etc. Vous permet d'associer les fichiers ouverts par: -p: PID ( ID Processus) -i : Une adresse réseau (protocole:port) -u: Un utilisateur

lsof Exemple: D'abord, netstat -ln determine que le port 61 est ouvert et attend une connexion () ##netstat -ln -- netstat -ln -- Active Internet connections (only servers) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Proto Recv-Q Send-Q Local Address Foreign Address Foreign Address State State 127...1:61 127...1:61...:*...:* 127...1:611 127...1:611...:*...:*

lsof Determine quel processus a le port (61) ouvert et quelles autres ressources sont utilisées: # lsof -i :61 # lsof PID -i :61 COMMAND USER FD COMMAND 131 PID USER 131 131 131 # lsof -p 131 # lsof -p COMMAND PID131 USER COMMAND131 PID USER 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131...... TYPE DEVICE SIZE NODE NAME FD TYPE 5363 DEVICE SIZETCP NODE NAME 6u IPv4 localhost.localdomain:x11-ssh-offset () IPv4 5364 5363 7u6u IPv6 7u IPv6 5364 FD cwdfd cwd rtd rtd txt txt TYPE TYPE DIR DIR DIR DIR TCP[::1]:x11-ssh-offset localhost.localdomain:x11-ssh-offset () TCP () TCP [::1]:x11-ssh-offset () DEVICE SIZE NODE NAME DEVICE SIZE NODE 496 2 / NAME 496 496 2 2/ / 37972 4961422643 2/usr/sbin/ / 37972 1422643 /usr/sbin/ 32724 1437533 /usr/lib/libwrap.so..7.6 32724 1437533 /usr/lib/libwrap.so..7.6 1588 38329 /lib/libutil-2.4.so 75632 1588141493 38329/usr/lib/libz.so.1.2.3 /lib/libutil-2.4.so 75632 141493 /usr/lib/libz.so.1.2.3 964 3829 /lib/libnsl-2.4.so 128 9641414578 3829/usr/lib/libgssapi_krb5.so.2.2 /lib/libnsl-2.4.so 128 1414578 /usr/lib/libgssapi_krb5.so.2.2 11684 141445 /usr/lib/libkrb5support.so.. 11684 141445 /usr/lib/libkrb5support.so.. 1368 38358 /lib/libsetrans.so. 136838231 38358/lib/libcom_err.so.2.1 /lib/libsetrans.so. 7972 7972 38231 /lib/libcom_err.so.2.1 314 142233 /usr/lib/libcrack.so.2.8. 11168 31438399 142233/lib/security/pam_succeed_if.so /usr/lib/libcrack.so.2.8. 11168 38399 /lib/security/pam_succeed_if.so

lsof suite. Quels services réseau tournent pour moi? # lsof -i # lsof -ipid COMMAND USER FD COMMAND PID USER 5u FD firefox 4429 hervey firefox 4429 hervey >128.223.6.21:www (ESTABLISHED 5u >128.223.6.21:www (ESTABLISHED named 5378 bind 2u named 5378 bind 21u 2u named 5378 bind named 5378 bind 21u 5427 3u 5427 cupsd 5522 3u3u cupsd 5522 mysqld 5586 mysql 1u3u mysqld 5586 mysql 1u snmpd 6477 snmp 8u snmpd 6477Debian-exim snmp exim4 6772 3u8u exim4 6772 Debian-exim ntpd 6859 ntp 16u3u ntpd 6859 ntp 16u ntpd 6859 ntp 17u ntpd 6859 ntp 17u ntpd 6859 ntp 18u ntpd 6859 ntp 19u 18u ntpd 6859 ntp ntpd 6859 ntp 19u proftpd 7185 proftpd 1u proftpd 7185 proftpd apache2 7246 www-data 3u1u apache2 7246 www-data apache2 7246 www-data 4u3u apache2 7246 www-data 4u...... iperf 13598 3u iperf 13598 apache2 2788 www-data 3u3u apache2 2788 2788 www-data apache2 www-data 4u3u apache2 2788 www-data 4u TYPE DEVICE SIZE NODE NAME TYPE1875852 DEVICE SIZE TCP NODE192.168.179.139:5689NAME IPv4 IPv4 1875852 TCP 192.168.179.139:5689IPv6 13264 IPv6 13267 13264 IPv4 IPv4 13267 IPv6 1332 IPv61983466 1332 IPv4 IPv4 1983466 IPv4 13548 IPv4 14633 13548 IPv4 IPv4 14675 14633 IPv4 IPv4 14675 IPv4 14743 IPv4 14743 IPv6 14744 IPv6 14744 IPv6 14746 IPv6 14747 14746 IPv6 IPv6 14747 IPv6 15718 IPv6 15718 IPv4 15915 IPv4 15917 15915 IPv4 IPv4 15917 TCP *:domain () TCPlocalhost:domain *:domain () TCP () TCP localhost:domain () TCP *:ssh () TCPlocalhost:ipp *:ssh () TCP () TCP localhost:ipp () TCP localhost:mysql () TCPlocalhost:snmp localhost:mysql () UDP UDPlocalhost:smtp localhost:snmp() TCP TCP localhost:smtp () UDP *:ntp UDP *:ntp UDP *:ntp UDP *:ntp UDP [fe8::25:56ff:fec:8]:ntp UDPip6-localhost:ntp [fe8::25:56ff:fec:8]:ntp UDP UDP ip6-localhost:ntp TCP *:ftp () TCP *:ftp() () TCP *:www TCP*:https *:www () TCP () TCP *:https () IPv4 199653 IPv4 199653 IPv4 15915 IPv4 15917 15915 IPv4 IPv4 15917 TCP *:51 () TCP*:www *:51 () TCP () TCP*:https *:www () TCP () TCP *:https ()

dump Montre les en-tetes des paquets recu par une interface donnée. Par option, filtrer avec les expressions. Vous permet d'envoyer des informations à un fichier pour analyses ultérieures. Demande des privilèges d' administrateur () puisque vous devez configurer des interface en mode promiscuous.

dump Quelques options utiles: -i : Specifier une interface (ex: -i eth) -l : Mettre la sortie standard en buffer (voir au fur et à mesure que vous capturez) -v, -vv, -vvv: Afficiche plus d'information -n : Pas de conversion adresses/noms (pas de DNS) -nn : Pas de traduction des numeros de ports -w : Ecrire les paquets dans un fichier -r : Lire les paquets d'un fichier créé avec '-w'

dump Expressions booléenne : Utilisant les opérateurs 'AND', 'OR', 'NOT' Les expressions consistent en une ou plusieurs primitives, qui consistent en un qualificatif et un ID (Nom ou numéro): Expression ::= [NOT] <primitive> [ AND OR NOT <primitive>...] <primitive> ::= <qualifier> <name number> <qualifier> ::= <type> <address> <protocol> <type> ::= host net port port range <address> ::= src dst <protocol> ::= ether fddi tr wlan ip ip6 arp rarp decnet udp

dump Exemples: Montre tout le trafic HTTP initié à partir de 192.168.1.1 # dump -lnxvvv port 8 and src host 192.168.1.1 # dump -lnxvvv port 8 and src host 192.168.1.1 - Montre tout le trafic initié de 192.168.1.1 excepté SSH # dump -lnxvvv src host 192.168.1.1 and not port 22 # dump -lnxvvv src host 192.168.1.1 and not port 22

Wireshark Wireshark est un analyseur de paquets graphique basé sur libpcap, la e librairie que dump utilise pour capturer et stocker des paquets L'interface graphique a certains avantages incluant: Visualisation hiérarchique par protocole (drill-down) Suivre une conversation TCP (Follow TCP Stream) Couleurs pour distinguer les types de trafic Plein de statistiques, graphes, etc.

Wireshark Wireshark est le successeur de Ethereal: La combination de dump et wireshark peut etre très puissant. Par exemple: # dump -i eth1 -A -s15 -w dump.log port 21 $ sudo wireshark -r dump.log

Wireshark

iptraf Plusieurs statistiques et fonctions mesurables Par protocole/port Par taille de paquet Génère des logs Utilise le DNS pour traduire les adresses Avantages Simplicité Par Menu (utilise curses ) Configuration flexible

iptraf Vous pouvez le lancer periodiquement en background (-B) Il vous permet par exemple, de lancer comme tache programmée pour periodiquement analyser les logs. Générer des alarmes Sauvegarder dans une base de données A un grand nom.. Interactive Colorful IP LAN Monitor etc... Example: iptraf -i eth1

iptraf i eth Exemplaire de sortie de iptraf de la commande ci-dessus:

iperf Pour measurer le débit réseau entre deux points iperf a deux modes, serveur et client Facile à utiliser Très utile pour determiner les paramètres TCP optimum Taille de fenetre TCP (socket buffer) Taille maximale de segment MTU Voir man iperf pour plus

iperf En utilisant UDP, vous pouvez générer des rapports sur les paquets perdus et les instabilités (jitter) Vous pouvez lancer plusieurs sessions parallèles en utilisant les threads Supporte IPv6

iperf parameters Usage: iperf [-s -c host] [options] Usage: iperf [-s -c[-v --version] host] [options] iperf [-h --help] iperf [-h --help] [-v --version] Client/Server: Client/Server: -f, --format [kmkm] format to report: Kbits, Mbits, KBytes, MBytes --format# [kmkm] format to report: Mbits, KBytes, MBytes -i, -f, --interval seconds between periodickbits, bandwidth reports --interval # seconds between periodic bandwidth -l, -i, --len #[KM] length of buffer to read or write (defaultreports 8 KB) -l,--print_mss --len #[KM] length of buffer to readsegment or write (default 8 KB) -m, print TCP maximum size (MTU - TCP/IP header) --print_mss TCP maximum segment size (MTU - TCP/IP header) -p,-m, --port # serverprint port to listen on/connect to --port # use server to listen to -u,-p, --udp UDPport rather thanon/connect TCP --udp UDPwindow rather than -w,-u, --window #[KM]useTCP size TCP (socket buffer size) --window #[KM] TCP window size (socket buffer size) -B,-w, --bind <host> bind to <host>, an interface or multicast address --bind <host>forbind to <host>, an interface multicast address -C,-B, --compatibility use with older versions doesornot sent extra msgs --compatibility usemaximum with oldersegment versions does not sent extra msgs -M,-C, --mss # setfor TCP size (MTU - 4 bytes) --mss # setset TCP segment sizealgorithm (MTU - 4 bytes) -N,-M, --nodelay TCP nomaximum delay, disabling Nagle's --nodelay set TCP no delay,todisabling Nagle's Algorithm -V,-N, --IPv6Version Set the domain IPv6 -V, --IPv6Version Set the domain to IPv6 Server specific: Server specific: -s, --server run in server mode --server run in insingle serverthreaded mode UDP mode -U,-s, --single_udp run --single_udp runrun singleas threaded UDP mode -D,-U, --daemon theinserver a daemon -D, --daemon run the server as a daemon Client specific: Client specific: #[KM] for UDP, bandwidth to send at in bits/sec -b, --bandwidth -b, --bandwidth #[KM]1 Mbit/sec, for UDP, implies bandwidth (default -u) to send at in bits/sec (default implies -u) -c, --client <host> run 1 inmbit/sec, client mode, connecting to <host> --client <host> in client mode, connecting to <host> -d,-c, --dualtest Do arun bidirectional test simultaneously --dualtest Do a bidirectional test simultaneously -n,-d, --num #[KM] number of bytes to transmit (instead of -t) --num #[KM] number of bytes transmit (instead of -t) -r, -n, --tradeoff Do a bidirectional test to individually --tradeoff Do in a bidirectional individually -t,-r, --time # time seconds to test transmit for (default 1 secs) --time <name> # time in the seconds for (default 1 secs) -F,-t, --fileinput input data totobetransmit transmitted from a file --fileinput <name> data to be transmitted from a file -I, -F, --stdin input theinput datathe to be transmitted from stdin --stdin input the data tobidirectional be transmitted stdin -L,-I,--listenport # port to recieve testsfrom back on --listenport port to of recieve bidirectional tests back on -P,-L, --parallel # # number parallel client threads to run #time-to-live, number parallel (default client threads to run -T,-P, --ttl--parallel # forofmulticast 1) -T, --ttl # time-to-live, for multicast (default 1)

iperf - TCP $ iperf -s $ iperf -s ----------------------------------------------------------------------------------------------------------------------Server listening on TCP port 51 Server listening on TCP port 51 TCP window size: 85.3 KByte (default) TCP window size: 85.3 KByte (default) ----------------------------------------------------------------------------------------------------------------------[ 4] local 128.223.157.19 port 51 connected with 21.249.17.39 port 3961 [ 4] local 128.223.157.19 port 51 connected with 21.249.17.39 port 3961 [ 4].-11.9 sec 68 KBytes 419 Kbits/sec [ 4].-11.9 sec 68 KBytes 419 Kbits/sec ----------------------------------------------------------------------------------------------------------------------# iperf -c nsrc.org # iperf -c nsrc.org ----------------------------------------------------------------------------------------------------------------------Client connecting to nsrc.org, TCP port 51 Client connecting to nsrc.org, TCP port 51 TCP window size: 16. KByte (default) TCP window size: 16. KByte (default) ----------------------------------------------------------------------------------------------------------------------[ 3] local 192.168.1.17 port 3961 connected with 128.223.157.19 port 51 [ 3] local 192.168.1.17 port 3961 connected with 128.223.157.19 port 51 [ 3].-1.3 sec 68 KBytes 485 Kbits/sec [ 3].-1.3 sec 68 KBytes 485 Kbits/sec

iperf - UDP # iperf -c host1 -u -b1m # iperf -c host1 -u -b1m ------------------------------------------------------------ -----------------------------------------------------------Client connecting to nsdb, UDP port 51 Client connecting to nsdb, UDP port 51 Sending 147 byte datagrams Sending 147 byte datagrams UDP buffer size: 16 KByte (default) UDP buffer size: 16 KByte (default) -----------------------------------------------------------[ -----------------------------------------------------------3] local 128.223.6.27 port 3966 connected with 128.223.25.135 port 51 [ 3].-1. local 128.223.6.27 port 3966 connected with 128.223.25.135 port 51 [ 3] sec 114 MBytes 95.7 Mbits/sec 3]Sent.-1. sec 114 MBytes 95.7 Mbits/sec [ [ 3] 81377 datagrams 3]Server Sent 81377 datagrams [ [ 3] Report: [ 3] Server Report: [ 3].-1. sec 114 MBytes 95.7 Mbits/sec.184 ms 1/81378 (.12%) [ 3].-1. sec 114 MBytes 95.7 Mbits/sec.184 ms 1/81378 (.12%) $ iperf -s -u -i 1 $ iperf -s -u -i 1 ------------------------------------------------------------ -----------------------------------------------------------Server listening on UDP port 51 Server listening ondatagrams UDP port 51 Receiving 147 byte Receiving 147 byte datagrams UDP buffer size: 18 KByte (default) UDP buffer size: 18 KByte (default) -----------------------------------------------------------[ -----------------------------------------------------------3] local 128.223.25.135 port 51 connected with 128.223.6.27 port 3966 [ 3].local1. 128.223.25.135 port 95.4 51 Mbits/sec connected with 128.223.6.27 port 3966 [ 3] sec 11.4 MBytes.184 ms / 8112 (%) 3] 1..-2. 1.sec sec 11.4 11.4MBytes MBytes 95.7 95.4Mbits/sec Mbits/sec.177.184ms ms /8141 8112(%) (%) [ [ 3] / [ 3] 1.2. sec 11.4 MBytes 95.7 Mbits/sec.177 ms / 8141 (%) [ 3] 2.- 3. sec 11.4 MBytes 95.6 Mbits/sec.182 ms / 8133 (%) [ 3] 2.- 3. sec 11.4 MBytes 95.6 Mbits/sec.182 ms / 8133 (%)... [... 3] 8.- 9. sec 11.4 MBytes 95.7 Mbits/sec.177 ms / 8139 (%) [ 3] 8.9. sec 11.4 MBytes 95.7 Mbits/sec.177 ms /8137 8139(%) (%) [ 3] 9.-1. sec 11.4 MBytes 95.7 Mbits/sec.18 ms / [ 3] 9.-1. sec 11.4 MBytes 95.7 Mbits/sec.18 ms / 8137 (%) [ 3].-1. sec 114 MBytes 95.7 Mbits/sec.184 ms 1/81378 (.12%) [ 3].-1. sec 114 MBytes 95.7 Mbits/sec.184 ms 1/81378 (.12%)

Bibliographie Monitoring Virtual Memory with vmstat http://www.linuxjournal.com/article/8178 How to use TCPDump http://www.erg.abdn.ac.uk/users/alastair/dump.html linux command dump example http://smartproteam.com/linux-tutorials/linux-command-dump/ simple usage of dump http://linux.byexamples.com/archives/283/simple-usage-of-dump/ TCPDUMP Command man page with examples http://www.cyberciti.biz/howto/question/man/dump-man-page-with-examples.php TCPDump Tutorial http://inst.eecs.berkeley.edu/~ee122/fa6/projects/dump-6up.pdf