技术栈

技术栈

思科交换机常用命令

8年前 (2016-10-27) 热度:1459 ℃

1、查看所有端口状态:show ip interface brief

2、查看邻居:show cdp neighbors        show cdp en * pro        show cdp neighbors detail

3、无en密码 查看配置: show startup-config

4、通过mac地址查看端口:show mac address-table address  C08C.6027.2D75

5、通过ip查找mac: show arp | include 172.22.32.200

6、查看交换机端口所包含的mac : Show mac address-table

7、端口自动学到mac地址并绑定:

Switch(config)# Interface fastethernet 0/7 #进入具体端口配置模式 

Switch(config-if)#Switchport port-security  #配置端口安全模式 

Switch(config-if )switchport port-security mac-address 0020.6ba9.dbee MAC(主机的MAC地址) #配置该端口要绑定的主机的MAC地址 

8、一个端口只允许一个连接数 一个MAC通过:

interface range fastEthernet 0/1

switchport port-security 

switchport port-security maximum 1

switchport port-security violation shutdown

9、通过mac查ip地址:show ip arp | include 40e3.d6c2.2b6e   

10、查看某vlan下的mac地址及所属端口:show mac address-table vlan 15

11、批量设置端口下信息:interface  range gigabitEthernet 0/1 - 47

思科 查看所有端口状态:show ip interface brief思科 查看邻居show cdp neighbors   show cdp en * pro

show cdp neighbors detail 

show startup-config

思科 无en密码 查看配置

思科


show mac address-table address  A857.4EFD.82CB show mac address-table addressA857.4EFD.82CA

show arp | include 172.22.32.200通过ip查找mac 

show ip arp | inc 192.168.3

Switch(config)# Interface fastethernet 0/7 #进入具体端口配置模式 

  Switch(config-if)#Switchport port-security  #配置端口安全模式 

  Switch(config-if )switchport port-security mac-address 0020.6ba9.dbee MAC(主机的MAC地址) 

  #配置该端口要绑定的主机的MAC地址 

查看端口mac  Show mac address-table  dis mac-address

A857.4EFD.82CB

一个端口只允许一个连接数 一个MAC通过

interface range fastEthernet 0/1

switchport port-security 

switchport port-security maximum 1

switchport port-security violation shutdown


show ip arp | include 40e3.d6c2.2b6e   查ip地址

show mac address-table vlan 15

 


interface  range gigabitEthernet 0/1 - 47

no switchport port-security

 no switchport port-security violation protect

no switchport port-security mac-address sticky

 switchport port-security

 switchport port-security violation protect

 switchport port-security mac-address sticky


打赏
TAGS: 交换机

相关文章

Wireshark使用教程(界面说明、捕获过滤器表达式、显示过滤器表达式)

Wireshark使用教程(界面说明、捕获过滤器表达式、显示过滤器表达式)

一、说明1.1 背景说明对于大多数刚开始接触wireshark的使用者而言,经常是开始的时候时候看到wireshark能把所有数据包都拦截下来觉得强无敌,但是面对一大堆的数据包要问有什么用或者说想要找...

思科cisco批量配置python脚本

思科cisco批量配置python脚本

paramiko time getpass username = input() password = getpass.getpass() f...

删除无法右键删除的顽固文件

删除无法右键删除的顽固文件

新建一个文本文件输入DEL /F /A /Q \\?\%1 RD /S /Q \\?\%1然后将文本文档保存为.bat格式的。将无法删除的文件拖至.bat文件上就会自动删除了...

iTop二次开发教程-iTop内置账号角色权限说明

iTop二次开发教程-iTop内置账号角色权限说明

下表为iTop内置角色权限说明,内置了1个管理员权限和12个功能角色权限。管理员账户暂时不公开。其它登陆账户如下。角色 描述Administrator 具有最高权限,能绕过任何控制Change App...

常用命令-查找端口对应的进程

常用命令-查找端口对应的进程

常用命令-查找端口对应的进程    netstat -nao    tasklist | findstr "8081"   &nb...

cacti系统服务器异常关机后不显示图形的解决方案

cacti系统服务器异常关机后不显示图形的解决方案

       由于部门使用的Cacti系统添加交换机到了1900多台,图形数量更是达到了59738个,数据源也到了60644个,各位大神,国内罕见吧! ...