Ëæ×ÅÍøÂçµÄ·¢Õ¹£¬¶ÔÍøÂçµÄ¸ß¿ÉÓÃÐÔµÄÒªÇóÈÕÒæÌá¸ß¡£µ±ÍøÂç³öÏÖÒ쳣ʱ£¬±ØÒª¶ÔÍøÂç½Úµã»òÕßÉ豸µÄ¶Ë¿Ú½øÐÐÁËÊý¾ÝÁ÷Á¿·ÖÎöÒÔ±ãÍøÂç¿ÉÄܼ±¾ç¸´ÔÕý³££¬µ«Í¬Ê±ÓÖÒªÇó²»Ó°ÏìÉ豸Êý¾ÝÁ÷Á¿µÄÕý³£×ª·¢¡£
¾µÏñÊǽ«Ö¸¶¨¶Ë¿ÚµÄ±¨Îĸ´Ôìµ½ÁíÒ»¸öÏνÓÓÐÍøÂç¼à²âÉ豸µÄ¶Ë¿ÚµÄÖ°ÄÜ£¬ÊµÏÖÁ˶ԿÉÒɵÄÍøÂç½Úµã»òÕßÉ豸¶Ë¿Ú½øÐÐÊý¾ÝÁ÷Á¿·ÖÎö£¬Í¬Ê±ÓÖ²»Ó°Ïì±»¼à¿ØÉ豸µÄÊý¾Ýת·¢¡£¾µÏñÖ°ÄÜÖØÒªÀûÓÃÔÚÍøÂç¼à¿ØºÍ¹ÊÕÏÅŲéÁ½ÖÖ³¡¾°ÖУ¬ÊµÏÖÁË¼à¿ØÍøÂçÐÅÏ¢°²È«ºÍ½â¾öÍøÂç¹ÊÕϵÄÖ÷ÕÅ¡£
Ô´¶Ë¿ÚÒ²³ÆÎª±»¼à¿Ø¿Ú£¬Ô´¶Ë¿ÚÉϵÄÊý¾ÝÁ÷»á±»¸´ÔìÒ»·Ýµ½Ö÷ÕŶ˿ڣ¬ÓÃÓÚÍøÂç·ÖÎö»ò¹ÊÕÏÅųý¡£
Ö÷ÕŶ˿ÚÒ²³ÆÎªÎª¼à¿Ø¿Ú£¬Óë¼à¿ØÉ豸ÏàÏνӵĶ˿ڣ¬½«½Ó¹Üµ½µÄÔ´¶Ë¿Ú±¨ÎÄת·¢µ½¼à¿ØÉ豸¡£
»á»°ÊÇÒ»¸öÂß¼ÉϵĸÅÏ룬һ¸öÆëÈ«µÄ»á»°ÓÉÔ´¶Ë¿ÚºÍÖ÷ÕŶ˿Ú×é³É¡£
SPAN£¨Switch Port Analyzer£¬»¥»»Ê½¶Ë¿Ú·ÖÎöÆ÷£©Ò²³ÆÎª±¾µØ¶Ë¿Ú¾µÏñ»òÕß±¾µØ¾µÏñ¡£Ö¸Í³Ò»¸ö¾µÏñ»á»°µÄÔ´¶Ë¿ÚÓëÖ÷ÕŶ˿ÚÔÚͳһ̨É豸ÉϵľµÏñ¡£
RSPAN£¨Remote Switch Port Analyzer£¬Ô¶³Ì¶Ë¿Ú¾µÏñ£©ÊÇSPANµÄÀ©´ó£¬Ô´¶Ë¿ÚºÍÖ¸±ê¶Ë¿Ú´¦ÓÚ·ÖÆçµÄÉ豸¡£
ERSPAN£¨Encapsulated Remote Switch Port Analyzer£¬·â×°Ô¶³Ì¶Ë¿Ú¾µÏñ£©ÊÇRSPANµÄÀ©´ó£¬ÊµÏÖÁËÓâÔ½»¥»»»ò·ÓÉÍøÂçµÄ¶ą̀É豸µÄÔ¶³Ì¼à¿Ø²½Öè¡£
Ô¶³Ì¾µÏñVLANÊÇÒ»ÖÖÌØÊâµÄVLAN£¬¸ÃVLANÖ»´«Êä¾µÏñ±¨ÎÄ£¬²»ºÏÕý³£µÄÒµÎñÊý¾Ý½øÐд«Êä¡£
Ô´É豸´ó½«¾µÏñ±¨ÎÄ·¢Ë͵½ÖÐÑëÉ豸»òÕßÖ÷ÕÅÉ豸µÄ¶Ë¿Ú³ÆÎªÊä³ö¶Ë¿Ú¡£
Ô´É豸ÊÇÔ¶³Ì¾µÏñ½Çɫ֮һ£¬Ö¸Ô´¶Ë¿ÚµØµãµÄÉ豸£¬Õƹܽ«Ô´¶Ë¿ÚµÄ±¨Îĸ´ÔìÒ»·Ýµ½Ô´É豸µÄÊä³ö¶Ë¿Ú£¬´«Ê䏸ÖÐÑëÉ豸»òÖ÷ÕÅÉ豸¡£
Ö÷ÕÅÉ豸Զ³Ì¾µÏñ½Çɫ֮һ£¬Ö¸Ô¶³Ì¾µÏñÖ÷ÕŶ˿ڵصãµÄÉ豸£¬Õƹܽ«ÖÐÑëÉ豸»òÕßÔ´É豸½Ó¹Üµ½µÄ¾µÏñ±¨ÎÄת·¢¸ø¼à¿ØÉ豸¡£
ÖÐÑëÉ豸ÊÇÔ¶³Ì¾µÏñ½Çɫ֮һ£¬Ö¸´¦ÓÚÔ´É豸ºÍÖ÷ÕÅÉ豸֮¼äµÄÉ豸£¬Õƹܽ«¾µÏñ±¨ÎÄ´«Ê䏸ÏÂÒ»¸öÖÐÑëÉ豸»òÖ÷ÕÅÉ豸¡£ÈôÊÇÔ´É豸ÓëÖ÷ÕÅÉ豸ֱ½ÓÏàÁ¬£¬Ôò²»´æÔÚÖÐÑëÉ豸¡£
¾µÏñÊý¾ÝÁ÷Ö¸±»¾µÏñµÄÊý¾Ý±¨ÎÄ¡£¾µÏñ»á»°µÄÊý¾ÝÁ÷Ô̺¬ÒÔÏÂÈýÖÖ·½ÏòµÄÊý¾ÝÁ÷£º
l ÊäÈëÊý¾ÝÁ÷
ËùÓÐÔ´¶Ë¿ÚÉϽӹܵ½µÄ±¨Îͼ½«±»¸´ÔìÒ»·Ýµ½Ö÷ÕŶ˿ڡ£ÔÚÒ»¸ö¾µÏñ»á»°ÖУ¬Äܹ»¼à¿ØÒ»¸ö»ò¶à¸öÔ´¶Ë¿ÚµÄÊäÈ뱨ÎÄ¡£
l Êä³öÊý¾ÝÁ÷
ËùÓдÓÔ´¶Ë¿Ú·¢Ë͵ı¨Îͼ½«¸´ÔìÒ»·Ýµ½Ö÷ÕŶ˿ڡ£ÔÚÒ»¸ö¾µÏñ»á»°ÖУ¬Äܹ»¼à¿ØÒ»¸ö»ò¶à¸öÔ´¶Ë¿ÚµÄÊä³ö±¨ÎÄ¡£
l Ë«ÏòÊý¾ÝÁ÷
ͬʱÔ̺¬ÊäÈëÊý¾ÝÁ÷ºÍÊä³öÊý¾ÝÁ÷¡£ÔÚÒ»¸ö¾µÏñ»á»°ÖУ¬¿É¼à¿ØÒ»¸ö»ò¶à¸öÔ´¶Ë¿ÚµÄÊäÈëºÍÊä³ö·½ÏòµÄÊý¾ÝÁ÷¡£
Èçͼ1-6Ëùʾ£¬Í¨¹ýÊʵ±µÄÅäÖã¬ÍøÂç·ÖÎöÒÇ¿ÉÄÜ¼à¿ØDeviceAת·¢¸øDeviceBµÄËùº±¼û¾ÝÁ÷£¬¼à¿ØÀ´×ÔDeviceBµÄÌØ¶¨Êý¾ÝÁ÷£¨ÈçÀ´×ÔPC1ºÍPC2µÄÊý¾ÝÁ÷£©¡£

l ÅäÖÃDeviceAµÄGigabitEthernet 0/1ºÍGigabitEthernet 0/2ÊôÓÚVLAN 1¡£´´½¨SVI 1£¬²¢ÅäÖÃSVI 1µØÖ·Îª10.10.10.10/24¡£
l ÅäÖÃDeviceBµÄGigabitEthernet 0/1ÊôÓÚVLAN 1¡£´´½¨SVI 1£¬²¢ÅäÖÃSVI 1µØÖ·Îª10.10.10.20/24¡£
l ÅäÖÃPC1¡¢PC2µÄµØÖ·±ðÀëΪ10.10.10.1/24ºÍ10.10.10.2/24¡£
l ÅäÖÃDeviceAµÄ±¾µØ¾µÏñ£¬Ö¸¶¨¶Ë¿ÚGigabitEthernet 0/1ºÍGigabitEthernet 0/2±ðÀëΪ¾µÏñµÄÔ´¶Ë¿ÚºÍÖ÷ÕŶ˿ڡ£¼à¿ØDeviceAת·¢¸øDeviceBµÄËùº±¼û¾ÝÁ÷£¬¼à¿ØÀ´×ÔDeviceBµÄÌØ¶¨Êý¾ÝÁ÷¡£
# ÅäÖÃDeviceAµÄGigabitEthernet 0/1ºÍGigabitEthernet 0/2ÊôÓÚVLAN 1¡£
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# vlan 1
DeviceA(config-vlan)# exit
# ÔÚDeviceAÉÏ´´½¨SVI 1£¬²¢ÅäÖÃSVI 1µØÖ·Îª10.10.10.10/24¡£
DeviceA(config)# interface vlan 1
DeviceA(config-if-VLAN 1)# ip address 10.10.10.10 255.255.255.0
DeviceA(config-if-VLAN 1)# exit
# ÅäÖÃDeviceBµÄGigabitEthernet 0/1ÊôÓÚVLAN 1¡£
DeviceB# configure
DeviceB(config)# vlan 1
DeviceB(config-vlan)# exit
# ÔÚDeviceBÉÏ´´½¨SVI 1£¬²¢ÅäÖÃSVI 1µØÖ·Îª10.10.10.20/24¡£
DeviceB (config)# interface vlan 1
DeviceB(config-if-VLAN 1)# ip address 10.10.10.20 255.255.255.0
DeviceB(config-if-VLAN 1)# exit
# ÔÚDeviceAÉÏÅäÖÃACL£¬Æ¥ÅäÔ´µØÖ·Îª10.10.10.20µÄ±¨ÎÄ¡£
DeviceA(config)# access-list 100 permit ip host 10.10.10.20 any
# ÔÚDeviceAÉÏÅäÖö˿ÚGigabitEthernet 0/1Ϊ¾µÏñµÄÔ´¶Ë¿Ú£¬¼à¿ØDeviceAת·¢¸øDeviceBµÄËùº±¼û¾ÝÁ÷£¬¼à¿ØÀ´×ÔDeviceBµÄÌØ¶¨Êý¾ÝÁ÷¡£
DeviceA(config)# monitor session 1 source interface gigabitethernet 0/1 tx
DeviceA(config)# monitor session 1 source interface gigabitethernet 0/1 rx acl 100
# ÔÚDeviceAÉÏÅäÖÃGigabitEthernet 0/2Ϊ¾µÏñµÄÖ÷ÕŶ˿ڡ£
DeviceA(config)# monitor session 1 destination interface gigabitethernet 0/2
# ͨ¹ýshow monitorºÅÁî²é¿´¾µÏñÊÇ·ñÕýÈ·ÅäÖá£
DeviceA# show monitor
sess-num: 1
span-type: LOCAL_SPAN
src-intf:
¡¡GigabitEthernet 0/1¡¡¡¡¡¡¡¡ frame-type TX Only
src-intf:
¡¡GigabitEthernet 0/1¡¡¡¡¡¡¡¡ frame-type RX Only
rx acl id 100
dest-intf:
¡¡GigabitEthernet 0/2
l DeviceAµÄÅäÖÃÎļþ
hostname DeviceA
!
ip access-list extended 100
10 permit ip host 10.10.10.20 any
!
interface VLAN 1
ip address 10.10.10.10 255.255.255.0
!
monitor session 1 destination interface GigabitEthernet 0/2
monitor session 1 source interface GigabitEthernet 0/1 tx
monitor session 1 source interface GigabitEthernet 0/1 rx acl 100
!
end
l DeviceBµÄÅäÖÃÎļþ
hostname DeviceB
!
interface VLAN 1
ip address 10.10.10.20 255.255.255.0
!
end
ÖÒ¸æ
µ±²¿ÊðÒ»¶Ô¶à¶Ë¿Ú¾µÏñʱ£¬±ØÐëʹÓÃswitchport trunk allowed vlan remove vlan-listºÅÁî²Ã¼ôµô¸÷¾µÏñÉ豸ÉÏtrunkÀàÐ͵ĽӿÚÖй㲥µÄVLAN£¬²»È»trunk½Ó¿Ú¿ÉÄܻᱻ¹ã²¥µÄÁ÷Á¿Õ¼Âúµ¼ÖÂÒµÎñÖжϡ£
Èçͼ1-7Ëùʾ£¬ÍøÂç·ÖÎöÒÇÄܹ»Í¨¹ýÔ¶³Ì¾µÏñÖ°ÄÜ£¬Êµ´Ë¿ÌÖ÷ÕÅÉ豸DeviceBºÍDeviceCÉÏ¼à¿ØÔ´É豸DeviceAÉϵÄË«ÏòÊý¾ÝÁ÷¡£ÇÒÉ豸֮¼ä¾ùÄÜÕý³£»¥»»Êý¾Ý¡£
ͼ1-7 »ùÓÚRSPANʵÏÖµÄÒ»¶Ô¶à¾µÏñÖ°ÄÜÍøÍ¼

l ÅäÖÃDeviceAΪԴÉ豸£¬ÅäÖÃÔ¶³Ì¾µÏñVLAN£¬ÅäÖö˿ÚGigabitEthernet 0/1ΪԴ¶Ë¿Ú£¬ÓëÖ÷ÕÅÉ豸ÏàÁ¬µÄ¶Ë¿ÚGigabitEthernet 0/3ºÍGigabitEthernet 0/4ΪÊä³ö¶Ë¿Ú£¬ÅäÖÃGigabitEthernet 0/2½Ó¿ÚΪMAC»Ø»·¿Ú£¬ÓÃÓÚʵÏÖÒ»¶Ô¶à¾µÏñµÄ“·´Éä”Ö°ÄÜ¡£ÅäÖÃÊä³ö¶Ë¿Ú¿É»¥»»Ö°ÄÜ¡£
l DeviceBºÍDeviceCÅäÖÃΪÖ÷ÕÅÉ豸£¬ÅäÖÃÔ¶³Ì¾µÏñVLAN£¬ÓëÔ´É豸ÏàÁ¬µÄ¶Ë¿ÚGigabitEthernet 0/1×÷ΪԴ¶Ë¿Ú£¬ÅäÖÃTrunk¶Ë¿Ú£¬ÓëÍøÂç·ÖÎöÒÇÏàÁ¬µÄ¶Ë¿ÚGigabitEthernet 0/2ÅäÖÃΪ¾µÏñÖ÷ÕŶ˿ڣ¬²¢ÅäÖþµÏñÖ÷ÕŶ˿ڿɻ¥»»Ö°ÄÜ¡£
# ÅäÖÃDeviceAΪԴÉ豸¡£
(1) ÅäÖÃÔ¶³ÌVLAN¡£
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# vlan 7
DeviceA(config-vlan)# remote-span
DeviceA(config-vlan)# exit
(2) ÅäÖÃÔ´¶Ë¿Ú¡£
DeviceA(config)# monitor session 1 remote-source
DeviceA(config)# monitor session 1 source interface gigabitethernet 0/1 both
(3) ÅäÖÃÊä³ö¶Ë¿Ú¡£
DeviceA(config)# monitor session 1 destination remote vlan 7 interface gigabitethernet 0/2 switch
(4) ÅäÖûػ·¿Ú¡£
DeviceA(config)# interface gigabitethernet 0/2
DeviceA(config-if)# mac-loopback
DeviceA(config-if)# switchport access vlan 7
DeviceA(config-if)# exit
DeviceA(config)# interface range gigabitethernet 0/3-4
DeviceA(config-if-range)# switchport mode trunk
# ÅäÖÃDeviceBΪÖ÷ÕÅÉ豸¡£
(1) ÅäÖÃÔ¶³ÌVLAN¡£
DeviceB> enable
DeviceB# configure
DeviceB(config)# vlan 7
DeviceB(config-vlan)# remote-span
DeviceB(config-vlan)# exit
(2) ÅäÖÃÖ÷ÕŶ˿ڡ£
DeviceB(config)# monitor session 1 remote-destination
DeviceB(config)# monitor session 1 destination remote vlan 7 interface gigabitethernet 0/2 switch
DeviceB(config)# interface gigabitethernet 0/1
DeviceB(config-if)# switchport mode trunk
# ÅäÖÃDeviceCΪÖ÷ÕÅÉ豸¡£
(1) ÅäÖÃÔ¶³ÌVLAN¡£
DeviceC> enable
DeviceC# configure
DeviceC(config)# vlan 7
DeviceC(config-vlan)# remote-span
DeviceC(config-vlan)# exit
(2) ÅäÖÃÖ÷ÕŶ˿ڡ£
DeviceC(config)# monitor session 1 remote-destination
DeviceC(config)# monitor session 1 destination remote vlan 7 interface gigabitethernet 0/2 switch
DeviceC(config)# interface gigabitethernet 0/1
DeviceC(config-if)# switchport mode trunk
# ÔÚDeviceAÉÏͨ¹ýshow monitorºÅÁî²é¿´¾µÏñÔ´É豸ÅäÖÃÁ˾֡£
DeviceA# show monitor
sess-num: 1
span-type: SOURCE_SPAN
src-intf:
GigabitEthernet 0/1¡¡¡¡¡¡frame-type Both
dest-intf:
GigabitEthernet¡¡0/2
Remote vlan 7
mtp_switch on
# ÔÚDeviceBºÍDeviceCÖÐͨ¹ýshow monitorºÅÁî²é¿´¾µÏñÖ÷ÕÅÉ豸ÅäÖÃÁ˾֡£ÒÔDeviceBΪÀý×¢Ã÷¡£
DeviceB# show monitor
sess-num: 1
span-type: DEST_SPAN
dest-intf:
GigabitEthernet¡¡0/2
Remote vlan 7
mtp_switch on
l DeviceAµÄÅäÖÃÎļþ
hostname DeviceA
!
vlan 7
!
remote-span
!
interface GigabitEthernet 0/2
mac-loopback
switchport access vlan 7
!
interface GigabitEthernet 0/3
switchport mode trunk
interface GigabitEthernet 0/4
switchport mode trunk
!
monitor session 1 remote-source
monitor session 1 source interface GigabitEthernet 0/1 both
monitor session 1 destination remote vlan 7 interface GigabitEthernet0/2 switch
!
end
l DeviceBµÄÅäÖÃÎļþ
hostname DeviceB
!
vlan 7
remote-span
!
interface GigabitEthernet 0/1
switchport mode trunk
!
monitor session 1 remote-destination
monitor session 1 destination remote vlan 7 interface GigabitEthernet0/2 switch
!
end
l DeviceCµÄÅäÖÃÎļþ
hostname Device
!
vlan 7
remote-span
!
interface GigabitEthernet 0/1
switchport mode trunk
!
monitor session 1 remote-destination
monitor session 1 destination remote vlan 7 interface GigabitEthernet 0/2 switch
!
end
l Ô´É豸¡¢ÖÐÑëÉ豸¡¢Ö÷ÕÅÉ豸¾ùÒªÅäÖÃÔ¶³ÌVLANÇÒVID±ØÐëÒ»Ö¡£
l ´ø¿í´óµÄ¶Ë¿Ú±»¾µÏñµ½´ø¿íÓ׵Ķ˿ڿÉÄÜ»áÔì³É¶ª°ü¡£
Èçͼ1-8ÖÐËùʾ¡£Íø¹Üµ«Ô¸Í¨¹ýÍøÂç·ÖÎöÒǶÔDeviceAºÍDeviceCµÄÁ÷Á¿½øÐÐ¼à¿Ø¡£ÆäÖжÔÓÚDeviceA£¬¼à¿ØË«ÏòÊý¾ÝÁ÷£»¶ÔÓÚDeviceC£¬½ö¼à¿Ø²¿ÃÅ·¢Ë͵½DeviceµÄ±¨ÎÄ¡£ÎªÁ˺ÏÀíÀûÓÃ×ÊÔ´£¬¶Ô¼à¿Ø±¨ÎĽøÐвÉÑù£¬²ÉÑùÂÊΪ1000¡£

l ÅäÖø÷É豸֮¼äÈý²ã·Óɿɴ
l ÅäÖÃDeviceBΪԴÉ豸¡£GigabitEthernet 0/1£¬GigabitEthernet 0/2¾ùΪԴ¶Ë¿Ú£¬¼à¿ØGigabitEthernet 0/1µÄË«ÏòÊý¾Ý±¨ÎÄ£¬¶ÔÓÚGigabitEthernet 0/2µÄ±¨ÎÄ£¬½ö¾µÏñÖ÷ÕÅIPΪ2.1.1.1µÄ±¨ÎÄ£¬GigabitEthernet 0/3Ϊ¾µÏñ±¨Îijö¿Ú¡£
l ÅäÖþµÏñ±¨ÎĵIJÉÑùÂÊΪ1000¡£
# ÅäÖÃDeviceBµÄµØÖ·¡£
DeviceB> enable
DeviceB# configure terminal
DeviceB(config)# interface gigabitethernet 0/1
DeviceB(config-if-GigabitEthernet 0/1)# ip address 1.1.1.1 255.255.255.0
DeviceB(config-if-GigabitEthernet 0/1)# exit
DeviceB(config)# interface gigabitethernet 0/2
DeviceB(config-if-GigabitEthernet 0/1)# ip address 2.1.1.1 255.255.255.0
DeviceB(config-if-GigabitEthernet 0/1)# exit
DeviceB(config)# interface gigabitethernet 0/3
DeviceB(config-if-GigabitEthernet 0/1)# ip address 13.1.1.1 255.255.255.0
DeviceB(config-if-GigabitEthernet 0/1)# exit
# ÅäÖÃDeviceAµÄµØÖ·¡£
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# interface gigabitethernet 0/1
DeviceA(config-if-GigabitEthernet 0/1)# ip address 1.1.1.2 255.255.255.0
DeviceA(config-if-GigabitEthernet 0/1)# exit
# ÅäÖÃDeviceCµØÖ·¡£
DeviceC> enable
DeviceC# configure terminal
DeviceC(config)# interface gigabitethernet 0/1
DeviceC(config-if-GigabitEthernet 0/1)# ip address 2.1.1.2 255.255.255.0
DeviceC(config-if-GigabitEthernet 0/1)# exit
# ÔÚDeviceBÉÏÅäÖÃACL¡£
DeviceB(config)#access-list 1 permit host 1.1.1.1
# ´´½¨ERSPAN Session 1£¬ÉèÖÃΪԴÉ豸£¬²¢ÉèÖö˿ÚGigabitEthernet 0/1ΪԴ¶Ë¿Ú£¬¾µÏñË«ÏòÊý¾ÝÁ÷£¬¶Ë¿ÚGigabitEthernet 0/2ҲΪԴ¶Ë¿Ú£¬½ö½øÐÐÖ÷ÕŵØÖ·Îª1.1.1.1µÄ±¨ÎÄ¡£
DeviceB(config)# monitor session 1 erspan-source
DeviceB(config-mon-erspan-src)# source interface gigabitethernet 0/1 both
DeviceB(config-mon-erspan-src)# source interface gigabitethernet 0/2 rx acl acl1
DeviceB(config-mon-erspan-src)# origin ip address
DeviceB(config-mon-erspan-src)# destination ip address 3.1.1.2
# ¿ªÆô¾µÏñ±¨ÎÄѡȡְÄܲ¢ÅäÖòÉÑùÂÊΪ1000¡£
DeviceB(config-mon-erspan-src)# sample enable
DeviceB(config-mon-erspan-src)# sample rate 1000
# ÑéÖ¤DeviceBÓëDeviceAÖ®¼äÈý²ã¿Éͨ¡£
DeviceB# ping 1.1.1.2
Sending 5, 100-byte ICMP Echoes to 1.1.1.2, timeout is 2 seconds:
¡¡< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/8 ms.
# ÑéÖ¤DeviceBÓëDeviceCÖ®¼äÈý²ã¿Éͨ¡£
DeviceB# ping 2.1.1.2
Sending 5, 100-byte ICMP Echoes to 2.1.1.2, timeout is 2 seconds:
¡¡< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/8 ms.
# ÑéÖ¤DeviceBÓëÍøÂç·ÖÎöÒÇÖ®¼äÈý²ã¿Éͨ¡£
DeviceB# ping 3.1.1.2
Sending 5, 100-byte ICMP Echoes to 3.1.1.2, timeout is 2 seconds:
¡¡< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/8 ms.
# ͨ¹ýshow access-listsºÅÁî²é¿´ACLÅäÖóɹ¦¡£
DeviceB# show access-lists
ip access-list standard 1
10 permit host 1.1.1.1
# ͨ¹ýshow monitorºÅÁî²é¿´ÅäÖÃÁ˾֣¬ERSPAN»á»°´¦ÓÚActive״̬¡£
DeviceB# show monitor
sess-num: 1
span-type: ERSPAN_SOURCE
src-intf:
¡¡GigabitEthernet 0/1¡¡¡¡¡¡¡¡ frame-type: Both¡¡¡¡¡¡¡¡TX status: Active¡¡ RX status: Active¡¡
src-intf:
¡¡GigabitEthernet 0/2¡¡¡¡¡¡¡¡ frame-type: RX Only¡¡¡¡ Rx acl id: 1¡¡¡¡¡¡
status: Active
original ip address: 2.1.1.2
destination ip address: 3.1.1.2
ip ttl: 64
ip dscp: 0
sample rate: 1000
vrf: default
l DeviceAµÄÅäÖÃÎļþ
hostname DeviceA
!
interface GigabitEthernet 0/1
ip address 1.1.1.2 255.255.255.0
!
end
l DeviceCµÄÅäÖÃÎļþ
hostname DeviceC
!
interface GigabitEthernet 0/1
ip address 2.1.1.2 255.255.255.0
!
end
l DeviceBµÄÅäÖÃÎļþ
hostname DeviceB
!
ip access-list standard 1
10 permit host 1.1.1.1
!
interface GigabitEthernet 0/1
ip address 1.1.1.1 255.255.255.0
!
interface GigabitEthernet 0/2
ip address 2.1.1.1 255.255.255.0
!
interface GigabitEthernet 0/3
ip address 3.1.1.1 255.255.255.0
!
monitor session 1 erspan-source
source interface gigabitEthernet 0/1 both
source interface gigabitEthernet 0/2 rx acl acl1
origin ip address 10.1.1.2
destination ip address 3.1.1.2
sample enable
sample rate 1000
!
end
l ÅäÖÃERSPAN¾µÏñµÄ»á»°IDÒѾ±»ÅäÖÃÁËRSPAN»òLOCAL SPAN¡£
l ´ÓÔ´É豸µ½Ö÷ÕÅÉ豸µÄÈý²ã·ÓÉÎÞ·¨»¥Í¨¡£