Cisco交换机设备配置镜像端口
查看交换机端口的基本情况,输入命令 show ip int bri,可以查看端口状态
FastEthernet表示百兆以太网端口,GigabitEthernet表示千兆以太网端口。
进入全局模式
设置源镜像口,设置1到20口为源端口镜像
1 | Switch(config) #monitor session 1 source interface gigabitEthernet 1/0/1- 20 both |
这条命令的最后-与20之间有空格的。20后面的参数both,表示监听双向数据,20后面加上rx只监听接收数据,20后面加tx只监听发送数据。如果只镜像一个口的数据,直接写某个口
配置目的镜像口
1 | Switch(config) #monitor session 1 destination interface gigabitEthernet 1/0/22 |
配置1/0/22口为目的镜像口
查看配置情况
1 2 3 4 5 6 7 8 9 | Switch #show monitor Session 1 --------- Type : Local Session Source Ports : Both : Gi1 /0/1-20 Destination Ports : Gi1 /0/22 Encapsulation : Native Ingress : Disabled |
删除镜像端口
1 2 3 4 | Switch(config) #no monitor session 1 Switch(config) #end Switch #show monitor No SPAN configuration is present in the system. |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步