交换机的MAC地址学习情况:

1.从一个接口收到数据帧,根据数据帧的原mac地址查找交换机的mac地址表,如果没有找到,将会添加数据帧的原mac地址和收到数据帧接口的对应条目,放进交换机的mac地址表里(在MAC有空间的情况下,如果没有空间将不放入,也不替换原有条目)。

2.从一个接口收到数据帧,根据数据帧的原mac地址查找交换机的mac地址表,如果有,检查原有条目中的接口是否和当前收到数据帧的接口一致,如果不一致,将替换原有接口,如果一致,将不做修改。

交换机转发情况:

1.从一个接口收到数据帧,根据数据帧的目的mac地址查找交换机的mac地址表,如果没有找到,将此数据帧复制多份向除了进来的接口以外的所有接口泛洪。

2. 从一个接口收到数据帧,根据数据帧的目的mac地址查找交换机的mac地址表,如果找到,将此数据帧只从mac地址表对应的接口转发出去。

路由器的密码破解:

提前:原有路由器需要保持配置

在设备重启过程中按 CTRL+C

进入rom系统:

rommon 2 > confreg 0x2142  //修改register编码为0x2142,目的跳过把nvram中的startup-config 加载到 rom中变为runing-config

rommon 3 > reset    //重启

路由器进入空配置:

Router#

Router#copy startup-config running-config   //手动的把原来保持的配置,加载成当前配置,原有配置将恢复

Destination filename [running-config]?

%SYS-5-CONFIG_I: Configured from console by console

495 bytes copied in 0.416 secs (1189 bytes/sec)

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#enable password 123  //修改为新密码

Router(config)#config-register 0x2102  //把register编码改回0x2102,实现再次重启加载nvram中的startup-config

Router(config)#end

Router#

%SYS-5-CONFIG_I: Configured from console by console

Router#wr   //  保持修改过后的配置

Building configuration...

[OK]

交换机的密码恢复:

  1. 断电 再 加点
  2. 启动15s内 按 mode ,保持15s system指示灯由绿色变成橙色 ,松开mode
  3. 进入rom 系统提示:   flash_init

load_helper

boot

  1. switch: flash_init
  2. switch: load_helper
  3. switch: rename flash:config.text flash:config.text.old
  4. switch: boot              //重启
  5. Switch> enable
  6. Switch# rename flash:config.text.old flash:config.text
  7. Switch# copy flash:config.text system:running-config
  8. Switch# configure terminal
  9. Switch (config)# enable secret xxxx
  10. Switch (config)# exit
  11. Switch#write

开启交换机VTY远程管理线路:

Switch>en

Switch#conf t

Switch(config)#

Switch(config)#int vlan 1   // 进入二层交换机用来管理设备的接口

Switch(config-if)#ip add 1.1.1.1 255.255.255.0

Switch(config-if)#no sh

Switch(config-if)#exit

Switch(config)#line vty 0 4

Switch(config-line)#password 111

Switch(config-line)#login

Switch(config-line)#end

Vty远程管理线路采用本地用户名、密码的方式登录:

Router>en

Router#conf t

Router(config)#username aa password aa  //定义本地用户数据库

Router(config)#line vty 0 4

Router(config-line)#login local   //设置vty登录模式为本地用户、密码模式登录

Router(config-line)#end

交换机端口安全

Switch>en

Switch#conf t

Switch(config)#int f0/1

Switch(config-if)#switchport mode access  //接口设置为access 模式

Switch(config-if)#switchport port-security     //开启端口安全功能

Switch(config-if)#switchport port-security mac-address 00E0.A394.C22E //绑定一个固定的mac地址

Switch(config-if)#switchport port-security maximum 3  //最大允许访问的mac数量,默认1

Switch(config-if)#switchport port-security violation ?  //如果非法的数据帧到达将采取的行为,默认行为shutdown

protect   Security violation protect mode       默默丢弃该数据帧

restrict  Security violation restrict mode                     丢弃该数据帧,并记录

shutdown  Security violation shutdown mode           关闭接口

 

DHCP服务的配置

Router>en

Router#conf t

Router(config)#service dhcp  //开启DHCP服务

Router(config)#ip dhcp excluded-address 1.1.1.1 1.1.1.10  //排除某些地址

Router(config)#ip dhcp pool A  //定义分配给客户端的地址池

Router(dhcp-config)#network 1.1.1.0 255.255.255.0   //地址池的IP地址范围,及掩码

Router(dhcp-config)#default-router 1.1.1.10                    //客户端收到的默认网关

Router(dhcp-config)#dns-server 12.23.34.45             //客户端收到的dns服务器地址

Router(dhcp-config)#end

最新文章

  1. mciSendString 的两个小坑
  2. 详解Javascript 函数声明和函数表达式的区别
  3. 手把手教你使用Git
  4. SQL Server 分页
  5. hdu1853 km算法
  6. PhoneGap+jQuery Mobile+Rest 访问远程数据
  7. AngularJS 的那些内置九种过滤器
  8. [POJ 2019] Cornfields
  9. Android应用程序中Activity的生命周期
  10. RSA非对称加密Java实现
  11. jQuery遍历-后代
  12. Django中下划线的用法介绍(一)
  13. 消息中间件:rabbitmq安装
  14. 使用kbmmw smarthttpservice 简单返回数据库结果
  15. Android 架构 -- Room
  16. [杂谈]杂谈章3 JAVA中如何用自动注入
  17. pushpin Server-sent events && openresty 集成试用
  18. SpringMVC的页面几种返回方式
  19. Centos 7(Linux)环境下安装PHP(编译添加)相应动态扩展模块so(以openssl.so为例)
  20. NO 18---- webpack 4.x 使用遇到的问题以及开发配置

热门文章

  1. iOS学习笔记(十二)——iOS国际化
  2. getTrim(strMz)-我的JavaScript函数库-mazey.js
  3. Unix/Linux中Cron的用法
  4. 扩展运算符和rest运算符
  5. ReentrantLock VS synchronized
  6. ABAP f4帮助输入多个值
  7. F110操作手册-自动付款
  8. solr-6.4.2安装+分词器配置
  9. Django进阶项目
  10. This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in问题