Professional Documents
Culture Documents
Lesson Contents
Restrictions
SPAN Configuration
RSPAN Configuration
Cisco Catalyst Switches have a feature called SPAN (Switch Port Analyzer) that lets
you copy all traffic from a source port or source VLAN to a destination interface.
This is very useful for a number of reasons:
The source can be an interface or a VLAN, the destination is an interface. You can
choose if you want to forward transmitted, received or both directions to the
destination interface.
When you use a destination interface on the same switch as your switch we call it
SPAN, when the destination is a remote interface on another switch we call
it RSPAN (Remote SPAN). When using RSPAN you need to use a VLAN for your
RSPAN traffic so that traffic can travel from the source switch to the destination
switch.
When you use RSPAN you need to use a VLAN that carries the traffic that you are
copying. In the picture above you see SW1 which will copy the traffic from the
computer onto a “RSPAN VLAN”. SW2 doesn’t do anything with it while SW3 receives
the traffic and forwards it to a computer that has wireshark running. Make sure the
trunks between the switches allow the RSPAN VLAN.
SPAN and RSPAN are great but there are a couple of things you need to keep in
mind…
Restrictions
Both SPAN and RSPAN have some restrictions, I’ll give you an overview of the most
important ones:
This should give you an idea of what SPAN / RSPAN are capable of. The configuration
is pretty straight-forward so let me give you some examples…
SPAN Configuration
Let’s start with a simple configuration. I will use the example I showed you earlier:
Session 1
---------
Both : Fa0/1
Encapsulation : Native
Ingress : Disabled
As you can see, by default it will copy traffic that is transmitted and received (both)
to the destination port. If you only want the capture the traffic going in one direction
you have to specify it like this:
Just add rx or tx and you are ready to go. If interface FastEthernet 0/1 were a trunk
you could add a filter to select the VLANs you want to forward:
This filter above will only forward VLAN 1 – 100 to the destination. If you don’t want
to use an interface as the source but a VLAN, you can do it like this:
I am unable to use session 1 for this because I am already using source interfaces
for that session. It’s also impossible to use the same destination interface for
another session. This is why I created another session number and picked
FastEthernet 0/3 as a destination.
Configurations
Switch
Want to take a look for yourself? Here you will find the final configuration of each
device.
The idea is to forward traffic from FastEthernet 0/1 on SW1 to FastEthernet 0/1 on
SW2. There are a couple of things we have to configure here:
SW1(config)#vlan 100
SW1(config-vlan)#remote-span
SW2(config)#vlan 100
SW2(config-vlan)#remote-span
First we need to create the VLAN and tell the switches that it’s a RSPAN vlan. This is
something that is easily forgotten. Secondly we will configure the link between the
two switches as a trunk:
SW1(config)#interface fastEthernet 0/24
This selects FastEthernet 0/1 as the source and VLAN 100 as the destination…
And on SW2, we select VLAN 100 as the source and FastEthernet 0/1 as its
destination. Here’s the output of the show monitor session command:
Session 1
---------
Source Ports :
Both : Fa0/1
---------
Encapsulation : Native
Ingress : Disabled
DAI vérifie tous les paquets ARP sur des interfaces non approuvées, il comparera les
informations contenues dans le paquet ARP avec la base de données de surveillance
DHCP et/ou une liste d'accès ARP. Si les informations contenues dans le paquet ARP
n'ont pas d'importance, elles seront abandonnées. Dans cette leçon, je vais vous
montrer comment configurer DAI. Voici la topologie que nous utiliserons :
Ci-dessus, nous avons quatre appareils, le routeur sur le côté gauche appelé "hôte"
sera un client DHCP, le routeur sur le côté droit est notre serveur DHCP et en haut,
nous avons un routeur qui sera utilisé comme attaquant. Le commutateur au milieu
sera configuré pour l'inspection ARP dynamique.
Configuration
Nous allons commencer par le commutateur, nous devons d'abord nous assurer
que toutes les interfaces sont dans le même VLAN :
SW1(config-if-range)#spanning-tree portfast
C'est tout ce dont nous avons besoin, voyons si l'hôte est capable d'obtenir une
adresse IP :
Le commutateur va maintenant vérifier tous les paquets ARP sur les interfaces non
approuvées, toutes les interfaces sont non approuvées par défaut. Voyons si cela
fonctionnera ou non… Je vais configurer l'adresse IP de notre hébergeur sur notre
attaquant :
ATTACK#ping 192.168.1.254
.....
SW1#
%SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Fa0/2, vlan 123.
([0017.5aed.7af0/192.168.1.1/0000.0000.0000/192.168.1.254/01:20:08 UTC Tue Mar 2 1993])
Ci-dessus, vous pouvez voir que toutes les requêtes ARP de notre attaquant sont
abandonnées. Le commutateur vérifie les informations trouvées dans la requête
ARP et les compare avec les informations de la base de données de surveillance
DHCP. Puisqu'il ne correspond pas, ces paquets sont rejetés. Vous pouvez trouver le
nombre de paquets ARP abandonnés avec la commande suivante :
123 0 5 5 0
Vlan DHCP Permits ACL Permits Probe Permits Source MAC Failures
123 0 0 0 0
123 0 0 0
ATTACK(config-if)#shutdown
Laissez-moi vous montrer ce qui se passe lorsque nous essayons d'envoyer un ping
de l'hôte à notre routeur DHCP :
HOST#ping 192.168.1.254
SW1#
HOST#show ip arp
DHCP#show ip arp
Nous créons d'abord une liste d'accès ARP avec une déclaration d'autorisation pour
l'adresse IP et l'adresse MAC du routeur DHCP. Maintenant, nous devons appliquer
ceci à DAI :
Nous utilisons la commande ip arp inspection filter pour cela, mais vous devez
faire attention… si vous utilisez le paramètre « statique », nous disons au
commutateur de ne pas vérifier la base de données de surveillance DHCP. Il ne
vérifiera que notre liste d'accès ARP et lorsqu'il ne trouvera pas d'entrée, le paquet
ARP sera abandonné. Assurez-vous d'ajouter le filtre sans le paramètre statique :
HOST#ping 192.168.1.254
.!!!!
Que pouvons-nous faire d'autre avec DAI ? Il existe des vérifications de sécurité
supplémentaires que vous pouvez activer si vous le souhaitez :
ip Validate IP addresses
Conclusion
C'est tout ce que nous avons pour DAI (Dynamic ARP Inspection). C'est une
fonctionnalité de sécurité intéressante, mais assurez-vous d'avoir des listes d'accès
ARP en place pour tous les appareils avec des adresses IP statiques avant de
l'activer. Vous ne voulez pas bloquer la majeure partie de votre trafic après l'avoir
activé.