首页 > 其他分享 >SPAN

SPAN

时间:2024-08-13 22:49:14浏览次数:5  
标签:enable SPAN vlan session router config any

SPAN

抓包方式:

1.集线器

2.network tap

3.span/rspan

4.vacl

idsm:可以span/rspan,vacls

nm-cids:可以router backup

杂合模式:抵达接口所有包都接收

做span考虑

1.源端口那些流量

2.源端口那个方向的流量

3.目的端口是哪

4.sensor接收不接收数据

interface:基于接口抓包

vlan:基于vlan抓包只支持rx

remote:远端设备抓包

能做几个senssion的span,2950支持1个,3550支持2个,4000/4500支持5个.

目的接口支持不支持802.1q封装

目的接口支持不支持ingress接收reset包.

show monitor session all查看所有的span

monitor session 1 source int f0/1 both(进出都抓)

monitor session 1 destination int f0/17 encapsulation dot1q ingress vlan 1

基于vlan抓包

monitor session 1 source vlan 2 , vlan 3 , vlan 4 rx

monitor session 1 destination int f0/1

reset特殊vlan

monitor session 1 source vlan  2 vlan 3 , vlan 4 rx

monitor session 1 destination int f0/1 ingress vlan 3(只reset vlan3)

reset所有vlan

monitor session 1 source vlan  2 vlan 3 , vlan 4 rx

monitor session 1 destination int f0/1 encapsulation dot1q ingress vlan 1(vlan随便敲一个存在的vlan,都可以把所有vlan reset)

虽然有dot1q和isl但是只有dot1q有效,因为ids只支持dot1q.

如果要删除span,应该no monitor session 1不能单独删除会出现问题,不是每次配置span都有效,如果无效no掉重新配置.

rspan:把远端交换机流量导入到本地

rspan需要考虑

1.源那些端口那些vlan

2.目的是哪个交换机哪个接口

3.穿越交换设备,中间穿越交换机都需要支持rspan

iso rspan限制

交换机是否支持rspan

2950:支持1个rspan

3550:支持2个rspan

只有源到目的交换机有sesson限制,中间交换机没有sesson限制,只要支持rspan.

rspan配置

swa(config)#vlan 100

swa(config-vlan)#remote-span(在vtp server创建remote-span vlan)

swa(config-vlan)#end

swa#shwo vlan remote-span

swb(config)#vlan 100

swb(config-vlan)#remote-span

swc(config)#vlan 100

swc(config-vlan)#remote-span

在所有中间设备起trunk

swa(config)#int f0/3

swa(config-if)#sw trunk en dot1q

swa(config-if)#sw mode trunk

swb(config)#int f0/1

swb(config-if)#sw trunk en dot1q

swb(config-if)#sw mode trunk

远端源rspan配置

swa(config)#monitor session 1 source int f0/2 both

swa(config)#monitor session 1 destination remote vlan 100 reflector-port f0/24(本地根本就没有用的端口作为反射,可以接senson)

swa#show monitorswc(config)#monitor session 1 source remote vlan 100

swc(config)#monitor session 1 destination int f0/2 ingress vlan 1

混合span配置

monitor session 1 source vlan 100 , 2 , 3 rx

monitor session 1 destination  int f0/17

vacl好处

1.把特定希望抓的流量抓上的

2.session 有限制,vacl没有限制

catos做span

console>(enable)set span 2/1-2 3/7 rx inpkts enable create

vacl在catos配置

console>(enable)set security acl ip test permit tcp any any eq 80 capture(capture抓包)

console>(enable)set security acl ip test permit tcp any any eq 25 capture

console>(enable)set security acl ip test permit ip

console>(enable)commit security acl test

console>(enable)set security acl map test 200(应用到相应vlan)

console>(enable)set security acl capture-ports 3/7(定义那个接口是抓包接口,默认3/7,3/7已经设置为capture接口)

vack在ios配置

router(config)#ip access-list extended web_ftp

router(config-ext-macl)#permit any any eq www

router(config-ext-macl)#permit any any eq ftp

router(config-ext-macl)#permit any any eq ftp-data

router(config)#vlan access-map ids 10

router(config-access-map)#action forward capture

router(config-access-map)#exit

router(config)#vlan access-map ids 20

router(config-access-map)#action forward

router(config)#vlan filter ids vlan-list 100,200-205

router(config)#intrusion-detection module 4 data-port 1 capture

router(config)#intrusion-detection module 4 data-port 1 capture

router(config)#ip access-list extended web_mail

router(config-ext-nacl)#permit any any eq www

router(config-ext-nacl)#permit any any eq smtp

router(config)#vlan access-map capture_web_mail 10

router(config-access-map)#match ip address web_mail

router(config-access-map)#action forward capture

router(config)#vlan access-map capture_web_mail 20

router(config-access-map)#action forward

router(config)#vlan filter capture_web_mail vlan-list 200

router(config)#intrusion-detection module 3 data-port 1 capture

catos

console>(enable)session 15

msfc>enable

msfc#conf t

msfc(config)#ip access-list extended web_mail

msfc(config-ext-nacl)#permit any any eq www

msfc(config-ext-nacl)#permit any any eq smtp

msfc(config)#interface vlan 100

msfc(config-if)#mls ip ids web_mail

console>(enable)set security acl capture 3/7

ios

router(config)#ip access-list extended web_mail

router(config-ext-nacl)#permit any any eq www

router(config-ext-nacl)#permit any any eq smtp

router(config)#int f2/1

router(config-if)#no switchport

router(config-if)#ip add 10.1.1.1 255.255.255.0

router(config-if)#mls ip ids web_mail

router(config)#intrusion-detection module 3 data-port 1 capture

catos分vlan抓包

console>(enable)clear trunk 2/7 1-1024

console>(enable)console>(enable)clear trunk 3/7 1-1024

console>(enable)set trunk 2/7 100,100

console>(enable)set trunk 3/7 300,400

ios分vlan抓包

router(config)#int g2/7

router(config-if)#switchport trunk allowed vlan 100,200

router(config)#int g3/7

router(config-if)#switchport trunk allowed vlan 300,400

command-and-control vlan on catos

console>(enable)set vlan 100 3/2

command-and-control vlan on cisco ios

router(config)#intrusion-detection module 3 management-port access-vlan 100

nm-cids模块

做span

router(config)#int f0/1

router(config-if)#ids-service-module monitoring

标签:enable,SPAN,vlan,session,router,config,any
From: https://www.cnblogs.com/smoke520/p/18357880

相关文章

  • CSS中span元素垂直居中【解决span元素内基线对齐问题】
    CSS中span元素垂直居中【解决span元素内基线对齐问题】在样式的书写中,我们常常使用以下方式实现垂直居中,若span元素内例外,解决办法看文章最后<divclass="parent"><spanclass="child">text</span></div>1.flex布局方式垂直居中.parent{display:flex;align-ite......
  • element-plus el-table spanMethod 行合并通用方法 可实现数据的自动整理
    importtype{TableColumnCtx}from'element-plus'interfaceSpanMethodProps<T>{row:T&Record<string,any>column:TableColumnCtx<T>rowIndex:numbercolumnIndex:number}/***el-table行合并方法*@par......
  • 深入了解 C# Span:高性能内存操作的利器
    深入了解C#Span:高性能内存操作的利器在C#7.2中引入的Span<T>类型为我们提供了一种高效且安全地对内存进行操作的方式。Span<T>是一个轻量级的结构体,用于表示一段连续的内存区域,可以避免不必要的内存分配和拷贝,提高代码的性能和效率。什么是Span?Span<T>是一个用于表......
  • spanner,mit6.824论文解读
    为什么选择这篇论文(GoogleSpanner,OSDI2012)?宽域分布式事务的罕见示例。非常理想。但是二阶段提交被视为太慢并且容易阻塞。宽域同步复制的罕见示例。巧妙的想法:通过Paxos进行的两阶段提交。同步时间用于快速只读事务。在Google内部广泛使用。动机用例是什么?......
  • div,span使用展示\n字符串是换行而不是空格
    当前接口返回值有时候包含‘\n’时,我们想让它展示成换行,但是经常展示成空格 处理方法:1,使用split(‘\n’)分割当前字符串,然后使用数组渲染,(麻烦)2,使用css属性 (方便)文档white-space:pre-line ......
  • WPF CollectionViewSource GroupDescriptions GroupStyle ItemsPanelTemplate
    <Windowx:Class="WpfApp83.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.......
  • spannerlib优雅的go异常处理
    蹩脚的go异常处理一般写go的人,如果他不是写算法,正常写业务代码的话,可能都会为优雅的异常处理而烦恼,因为脑子抽筋的go设计者们,总是感觉语法糖是一种很低级的东西。但是在我们大多数公司的业务逻辑中,没有语法糖让代码非常丑陋,不易于维护。如何让go代码更具有可读性,哪么就要给go......
  • element-ui 合并行或列 table :span-method(行合并)
    element-ui官网案例:table合并行或列 element-ui官网中关于行合并的例子是根据行号进行合并的,这显然不符合我们日常开发需求,因为通常我们table中的数据都是动态生成的,所以需要做一些修改。我们首先解读一下官网实例中的各参数的意义:objectSpanMethod({row,column,rowInde......
  • FastAPI: 测试lifespan特性(转)
    addbyzhj:实践出真知,文章写得真不错,自己测试这些条件原文:FastAPI:experimentlifespanfeatureInitInFastAPI,oneofwayscreatingasharedresourceandlivingaslongasapplicationisupisusing lifespan featureinFastAPI.Thislifespanfeaturecandoc......
  • 鸿蒙HarmonyOS实战-ArkUI组件(Text/Span)
    ......