eve-ng模拟思科交换机镜像与日志配置实验

用的是eve-ng进行实验的,通过抓包验证命令的正确性
直接上图吧:
eve-ng模拟思科交换机镜像与日志配置实验_第1张图片
交换机命令


Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#monitor session 1 source int e0/0 - 3 ,  e1/0 - 2 bo
Switch(config)#monitor session 1 destination int e1/3

Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#int vlan 20
Switch(config-if)#ip add 30.1.1.1 255.255.255.0
Switch(config-if)#no sh
Switch(config-if)#exit
Switch(config)#int e1/1
Switch(config-if)#sw mo acc
Switch(config-if)#sw acc vlan 20
Switch(config-if)#exit
Switch(config)#logg on
Switch(config)#logging trap debugging
Switch(config)#logging facility syslog
Switch(config)#logging source-interface Vlan20
Switch(config)#logging  30.1.1.2

配置后

Switch#show ru
Building configuration...

Current configuration : 1234 bytes
!
! Last configuration change at 18:04:42 EET Sun May 24 2020
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EET 2 0
!
!
!
!         
!
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
! 
!
!
!
!
!
!
!
!         
!
!
!
!
interface Ethernet0/0
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet1/0
!
interface Ethernet1/1
 switchport access vlan 20
 switchport mode access
!
interface Ethernet1/2
!
interface Ethernet1/3
!
interface Ethernet2/0
!
interface Ethernet2/1
!
interface Ethernet2/2
!
interface Ethernet2/3
!
interface Vlan20
 ip address 30.1.1.1 255.255.255.0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
logging trap debugging
logging facility syslog
logging source-interface Vlan20
logging host 30.1.1.2
!
!         
!
control-plane
!
!
line con 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
monitor session 1 source interface Et0/0 - 6
monitor session 1 destination interface Et1/3
!
end

Switch#  

日志抓包截图
在这里插入图片描述
流量抓包截图
eve-ng模拟思科交换机镜像与日志配置实验_第2张图片

################################################################################################
有个问题,就是配置文件保存后。交换机断电重启,配置的镜像源(monitor session 1 source interface Et0/0 - 6)没了,不知道咋回事。。。。

你可能感兴趣的:(交换机日志syslog,交换机镜像)