Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1791588
  • 博文数量: 276
  • 博客积分: 1574
  • 博客等级: 上尉
  • 技术积分: 2894
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-26 23:23
个人简介

生活的美妙在于,不知道一下秒是惊艳还是伤神,时光流转,珍惜现在的拥有的时光

文章分类

全部博文(276)

文章存档

2017年(17)

2016年(131)

2015年(63)

2013年(2)

2012年(32)

2011年(31)

分类: 网络与安全

2015-09-10 00:59:45

 Talen Hao LINUX 学习笔记系列■■■■■

8

第二层交换和生成树协议(STP

系统:cisco


一:打开cisco交换机管理功能(即管理VLAN


进入接口模式vlan 1

Switch>enable

Switch#config t

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

Switch(config)#interface vlan 1

Switch(config-if)#ip address 192.168.0.1 255.255.255.0

Switch(config-if)#no shutdown


Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan1, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

退出到全局模式,设置默认网关:

Switch(config)#ip default-network 192.168.0.254


二:端口安全


Switch#configure terminal

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

为端口设置静态MAC

Switch(config)#interface range f0/1-13

Switch(config-if-range)#switchport port-security maximum 1

Switch(config-if-range)#switchport port-security mac-address sticky

Switch(config-if-range)#switchport port-security violation shutdown


STP扩展特性:

portfast: switch(config-if-range)#spanning-tree portfast

BPDUGuard(禁用启用了portfast的接入层端口):(二选一)

switch(config-if-range)#spanning-tree bpduguard enable

BPDUGuard(收到BPDU的端口禁用portfast)

switch(config-if-range)#spanning-tree bpdufilter enable

uplinkfast: switch(config)#spanning-tree uplinkfast(全局命令)

backbonefast: switch(config)#spanning-tree backbonefast


启用带上面所有特性的802.1w RSTP

switch(config)#spanning-tree mode rapid-pvst

Talen Hao LINUX 学习笔记系列■■■■■

阅读(1273) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~