目录
一、端口隔离:
实列:客户需求:pc1和pc2可以访问pc3,但pc1和pc2之间不能相互访问
- (1)私有vlan——Pvlan(以后博文之中会详细讲解)
- (2)端口隔离:
解决方案:
1.端口隔离:
int f0/1
switchport protected
exit
int f0/2
switchport protected
exit
两个启用端口隔离的接口无法互相访问,端口隔离也可以应用在隔离二层广播风暴
————————————————————————————————————————————————————————
二、端口镜像:(抓包配置)
(1)思科:
sw1(config)#monitor session 1 source int f0/2 , f0/0 ?
, Specify another range of interfaces
- Specify a range of interfaces
both Monitor received and transmitted traffic ——双向
rx Monitor received traffic only ——接收方向
tx Monitor transmitted traffic only ——发送方向
<cr>
(sw1(config)#monitor session 1 source int f0/2 - 4 both) (从f0/2接口到f0/4接口进出方向)
sw1(config)#monitor session 1 source int f0/2 , f0/0 both ——抓取0/2和0/0进出方向流量
sw1(config)#monitor session 1 destination int f0/3 ——扔给0/3接口
- F0/3接口连接抓包服务器,服务器安装了抓包软件,开启抓包软件(科来)就可以正常抓取F0/2和F0/0接口进入方向的数据包,然后展开流量分析。根据流量分析排查网络故障,进行故障诊断。还可以分析病毒入侵攻击等
————————————————————————————————————————————————————————
(2)华为:
observe-port 1 int F0/5 //抓包PC连接在此接口
int F0/8 //进入被抓包接口
port-mirroring to observe-port 1 inbound //把0/8的入方向流量0/5扔给接口
quit (outbond)