一,

二,MAC地址绑定

3550-1#conf t
3550-1(config)#int f0/1
3550-1(config-if)#switchport mode access /指定端口模式。
3550-1(config-if)#switchport port-security mac-address 0090.F510.79C1 /配置MAC地址。
3550-1(config-if)#switchport port-security maximum 1 /限制此端口允许通过的MAC地址数为1。
3550-1(config-if)#switchport port-security violation shutdown(protect(不转发不报警)/restrict(不转发报警)) /当发现与上述配置不符时,端口down或者拒绝收发。

三.MAC地址过滤

3550-1(config)#mac-address-table static 0090.F510.79C1 vlan 2 drop /在相应的Vlan丢弃流量。

3550-1(config)#mac-address-table static 0090.F510.79C1 vlan 2 int f0/1 /在相应的接口丢弃流量。


四.清除安全的MAC地址

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

Maximum is less than number of currently secured mac-addresses.//报错

可以清除

Switch#clear port-security ?

all Clear all secure MAC addresses

configured Clear all configured secure MAC addresses

dynamic Clear all secure MAC address auto-learned by hardware

sticky Clear all secure MAC address either auto-learned or configured

清除mac-address-table

clear mac-address-table dynamic

Switch#show mac-address-table

Mac Address Table

-------------------------------------------

Vlan Mac Address Type Ports

---- ----------- -------- -----

1 0001.42dd.8aee DYNAMIC Fa0/3

1 0050.0f99.ce16 DYNAMIC Fa0/2

1 0060.3e47.29da STATIC Fa0/1

五.查看安全保护的MAC地址

Switch#show port-security int f0/1

Port Security : Enabled

Port Status : Secure-up

Violation Mode : Protect

Aging Time : 0 mins  (0表示禁止老化)

Aging Type : Absolute(absolute:从上一次学习到算起,inactivity:从上一次收到来自该mac地址的包算起)

SecureStatic Address Aging : Disabled

Maximum MAC Addresses : 1

Total MAC Addresses : 1

Configured MAC Addresses : 0

Sticky MAC Addresses : 1

Last Source Address:Vlan : 00D0.BAD0.4703:1

Security Violation Count : 0

Switch# show port-security address

Secure Mac Address Table

-------------------------------------------------------------------------------

Vlan Mac Address Type Ports Remaining Age

(mins)

---- ----------- ---- ----- -------------

1 0060.3E47.29DA SecureSticky FastEthernet0/1 -

------------------------------------------------------------------------------

Total Addresses in System (excluding one mac per port) : 0

Max Addresses limit in System (excluding one mac per port) : 102

CCNA实验1.port-security的更多相关文章

  1. Packet Tracer 5.0 构建CCNA实验(2)—— 配置VLAN

    Packet Tracer 5.0 构建CCNA实验(2)—— 配置VLAN Vlan(Virtual Local Area Network) 即虚拟局域网.VLAN可以把同一个物理网络划分为多个逻辑 ...

  2. CCNA实验4:HDLC和PPP

    一.HDLC封装 router9和11上分别配置s0/0如下 conf t int s0/0 encapsulation hdlc do show int s0/0 ip address x.x.x. ...

  3. CCNA实验2.VLAN

    一. 二.配置主VTP上的信息 sw2上配置为domain server,sw1上配置为domain client,sw2上增加vlan并命名和添加描述 conf t vtp domain corp ...

  4. CCNA实验(1) -- 基本配置

    Ctrl+A: 到行首(Ahead)Ctrl+E: 到行尾(End)Esc+B: 回退一个单词(Back)Esc+F: 前进一个单词(Forward) 1.三种配置模式2.时间时区配置3.设置超时时间 ...

  5. CCNA实验(2) -- Static Route

    1.静态路由R1:ip route 22.1.1.0 255.255.255.0 12.1.1.2 2.静态汇总路由R1:ip route 22.1.0.0 255.255.0.0 12.1.1.2 ...

  6. CCNA实验(5) -- OSPF

    enableconf tno ip do loenable pass ciscoline con 0logg syncexec-t 0 0line vty 0 4pass ciscologg sync ...

  7. CCNA实验(4) -- EIGRP

    enableconf tno ip do loenable pass ciscoline con 0logg syncexec-t 0 0line vty 0 4pass ciscologg sync ...

  8. CCNA实验(3) -- RIP

    RIP协议分为版本1和版本2,均具备以下特征:1.是距离向量路由协议2.使用跳数(Hop Count)作为度量值3.默认路由更新周期为30秒4.管理距离(AD)为1205.支持触发更新6.最大跳数为1 ...

  9. CCNA实验(10) -- Access List

    使用包过滤技术在路由器上读取三层及四层报头的信息如源地址.目的地址.源端口.目的端口根据预先定义好的规则对包进行过滤 三种类型:1.标准ACL:表号范围1-99或1300-1999.仅对源IP地址进行 ...

随机推荐

  1. JS调用BHO

    // BHO 中添加下面的函数,设置UIHandler// BHO 包含如下成员变量: // CDocDispatch m_docDispatch;// CComPtr<IDocHostUIHa ...

  2. 5、清理mac缓存和关闭后台运行程序

    一.清理mac 缓存  1.用鼠标点击桌面,然后按快捷键Command+Shift+G前往文件夹 2.输入路径:~/Library/Caches/ 3.清除所有的数据,把所有的Caches文件夹得都行 ...

  3. php安装gearman扩展实现异步分步式任务

    参考: 1.小喵爱你的博客 2.PHP Manual 依赖 1.gcc44 2.boost >=1.39 3.libevent 4.php5.3+ 5.update ld.so.conf 安装依 ...

  4. centos的安装,网络的调试

    因业务需要,我今天尝试为公司服务器安装centos,选择的版本是6.7 第一步,下载:http://isoredirect.centos.org/centos/6/isos/x86_64/

  5. Jquery DOM元素的方法

    jQuery DOM 元素方法 函数 描述 .get() 获得由选择器指定的 DOM 元素. .index() 返回指定元素相对于其他指定元素的 index 位置. .size() 返回被 jQuer ...

  6. WordPaster-Chrome浏览器控件安装方法

    将WordPaster.crx拖到Chrome扩展面板中安装

  7. ubuntu 安装pyqt4 eric

    tar xvf eric4-4.5.7.tar.gztar xvf eric4-i18n-zh_CN.GB2312-4.5.7.tar.gzcd eric4-4.5.7/python install. ...

  8. Android--持久化技术

    1.Android中的持久化技术主要有三种: 1)文件存储: 2)SharedPreference存储: 3)数据库存储(SQLite);2.文件存储: 1)Context 类中提供了一个 openF ...

  9. UILabel和UIButton

    一.UILabel 1.UILabel:标签,主要用来显示文字. 创建步骤: (1)开辟空间并初始化(如果本类有初始化方法,使用自己的,否则,使用负父类的).   UILabel *textLabel ...

  10. [ASE][Daily Scrum]11.19

    Sprint2已经开始了~今天晚上有课所以今天的plan比较少~ View Shilin Liu 能够看见其他玩家发射出来的子弹 能够看见其他玩家的子弹消失         Client Jiafan ...