Contenu

Introduction

Ce document décrit comment configurer une session ERSPAN (Remote Switched Port Analyzer) encapsulée sur un commutateur de la gamme Nexus 5000 qui transporte le trafic mis en miroir sur un réseau IP, ce qui assure une surveillance à distance sur votre réseau.

Conditions préalables

Conditions requises

Assurez-vous que vous répondez à ces exigences avant d'essayer cette configuration :

Components Used

Les informations contenues dans ce document sont basées sur les versions de matériel et de logiciel suivantes :

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

Pour plus d'informations sur les conventions utilisées dans ce document, reportez-vous à Conventions relatives aux conseils techniques Cisco.

Informations générales

Sources ERSPAN

Destinations ERSPAN

Configuration

Cette section vous fournit des informations pour configurer les fonctionnalités décrites dans ce document.

Remarque : utilisez l'outil de recherche de commandes (clients enregistrés uniquement) pour obtenir plus d'informations sur les commandes utilisées dans cette section.

Diagramme du réseau

Ce document utilise la configuration réseau suivante :

nexus5000-erspan-config-01.gif

Configurations

Ce document utilise les configurations suivantes :

Commutateur Nexus 5000
Nexus 5000#configure terminal


!--- Configures an ERSPAN source session

Nexus 5000(config)#monitor session 3 type erspan-source

!--- Configure the sources and traffic direction

Nexus 5000(config-erspan-src)#source interface Ethernet1/10 both

!--- Configure the destination IP address in the ERSPAN session

Nexus 5000(config-erspan-src)#destination ip 10.23.21.8

!--- Configure the ERSPAN ID

Nexus 5000(config-erspan-src)#erspan-id 903

!--- Configure the VRF

Nexus 5000(config-erspan-src)#vrf default

!--- Enable the ERSPAN source session (by default the session is in shutdown state)

Nexus 5000(config-erspan-src)#no shut
Nexus 5000(config-erspan-src)#exit


!--- Configure the ERSPAN global origin IP address

Nexus 5000(config)#monitor erspan origin ip-address 10.254.254.30 global



!--- Configure the IP address for loopback interface, which is used as source of the ERSPAN traffic

Nexus 5000(config)#interface loopback1
Nexus 5000(config-if)#ip address 10.254.254.30/32
Nexus 5000(config-if)#exit

Nexus 5000(config)#interface Ethernet1/1
Nexus 5000(config-if)#switchport
Nexus 5000(config-if)#switchport mode trunk
Nexus 5000(config-if)#no shutdown

Nexus 5000(config)#feature interface-vlan
Nexus 5000(config)#interface Vlan 12
Nexus 5000(config-if)#ip address 10.23.21.7/29
Nexus 5000(config-if)#no ip redirects
Nexus 5000(config-if)#no shutdown
Nexus 5000(config-if)#exit


!--- Save the configurations in the device.

switch(config)#copy running-config startup-config
Switch(config)#exit

Commutateur Nexus 7000
Nexus 7000#configure terminal


!--- Configures an ERSPAN destination session

Nexus 7000(config)#monitor session 4 type erspan-destination

!--- Configures the source IP address

Nexus 7000(config-erspan-src)#source ip 10.23.21.8

!--- Configures a destination for copied source packets

Nexus 7000(config-erspan-src)#destination interface Ethernet1/24

!--- Configure the ERSPAN ID

Nexus 7000(config-erspan-src)#erspan-id 903

!--- Configure the VRF

Nexus 7000(config-erspan-src)#vrf default

!--- Enable the ERSPAN destination session (by default the session is in shutdown state)

Nexus 7000(config-erspan-src)#no shutdown
Nexus 7000(config-erspan-src)#exit

Nexus 7000(config)#interface Ethernet1/24
Nexus 7000(config-if)#switchport monitor
Nexus 7000(config-if)#exit

Nexus 7000(config)#feature interface-vlan
Nexus 7000(config)#interface Vlan 12
Nexus 7000(config-if)#ip address 10.23.21.8/29
Nexus 7000(config-if)#no ip redirects
Nexus 7000(config-if)#no shutdown
Nexus 7000(config-if)#exit

Nexus 7000(config)#interface Ethernet1/1
Nexus 7000(config-if)#switchport
Nexus 7000(config-if)#switchport mode trunk
Nexus 7000(config-if)#no shutdown
Nexus 7000(config-if)#exit


!--- Save the configurations in the device.

Nexus 7000(config)#copy running-config startup-config
Nexus 7000(config)#exit

Vérification

Référez-vous à cette section pour vous assurer du bon fonctionnement de votre configuration.

L'Outil Interpréteur de sortie (clients enregistrés uniquement) (OIT) prend en charge certaines commandes show. Utilisez l'OIT pour afficher une analyse de la sortie de la commande show .

Commutateur Nexus 5000 :

Utilisez la commande show monitor afin d'afficher l'état des sessions ERSPAN.

Nexus 5000# show monitor
Session  State        Reason                  Description
-------  -----------  ----------------------  --------------------------------
3        up           The session is up

Utilisez la commande show monitor session [session_number] afin d'afficher la configuration de session ERSPAN.

Nexus 5000# show monitor session 3
   session 3
---------------
type              : erspan-source
state             : up
erspan-id         : 903
vrf-name          : default
destination-ip    : 10.23.21.8
ip-ttl            : 255
ip-dscp           : 0
origin-ip         : 10.254.254.30 (global)
source intf       :
    rx            : Eth1/10
    tx            : Eth1/10
    both          : Eth1/10
source VLANs      :
    rx            :

Utilisez la commande show running-config monitor afin d'afficher la configuration ERSPAN en cours.

Nexus 5000# show running-config monitor

!Command: show running-config monitor
!Time: Thu Apr 19 09:32:27 2012

version 5.1(3)N1(1)
monitor session 3 type erspan-source
  erspan-id 903
  vrf default
  destination ip 10.23.21.8
  source interface Ethernet1/10 both
  no shut

monitor erspan origin ip-address 10.254.254.30 global

Commutateur Nexus 7000 :

Utilisez la commande show monitor afin d'afficher l'état des sessions ERSPAN.

Nexus 7000# show monitor
Session  State        Reason                  Description
-------  -----------  ----------------------  --------------------------------
4        up           The session is up

Utilisez la commande show monitor session [session_number] afin d'afficher la configuration de session ERSPAN.

Nexus 7000# show monitor session 4
   session 4
---------------
type              : erspan-destination
state             : up
erspan-id         : 903
vrf-name          : default
source-ip         : 10.23.21.8
destination ports : Eth1/24

Legend: f = forwarding enabled, l = learning enabled

Utilisez la commande show running-config monitor afin d'afficher la configuration ERSPAN en cours.

Nexus 7000# show running-config monitor

!Command: show running-config monitor
!Time: Thu Apr 19 11:13:28 2012

version 5.1(3)
monitor session 4 type erspan-destination
  erspan-id 903
  vrf default
  source ip 10.23.21.8
  destination interface Ethernet1/24
  no shut

Dépannage

Il n'existe actuellement aucune information de dépannage spécifique pour cette configuration.

Informations connexes