Cisco IOS Basic CLI Configuration : Switch Port Command
Cisco IOS Basic CLI Configuration : Switch Port Command
1. Basic
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.1.200 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-if)#exit
Switch(config)#ip default-gateway 192.168.1.1
Switch(config)#
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet0/1
Switch(config-if)#duplex auto
Switch(config-if)#speed 10
Switch(config-if)#description PC1 connected
Switch(config-if)#exit
Switch(config)#interface range fastethernet 0/10 - 20
Switch(config-if-range)#description hello world
Switch(config-if-range)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#
2. Port Security
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum 1
Switch(config-if)#switchport port-security mac-address 0060.70e5.cdd1
Switch(config-if)#switchport port-security violation shutdown
Switch(config-if)#exit
Switch(config)#
Switch(config)#int fast0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum 1
Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#switchport port-security violation protect
Switch(config-if)#exit
Switch(config)#
Switch#show port-security interface fastethernet0/2
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Protect
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 1
Configured MAC Addresses : 0
Sticky MAC Addresses : 1
Last Source Address:Vlan : 0004.9A36.D069:1
Security Violation Count : 0
Switch#show port-security interface fastethernet0/1
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 1
Configured MAC Addresses : 1
Sticky MAC Addresses : 0
Last Source Address:Vlan : 0060.70E5.CDD1:1
Security Violation Count : 0
3. Port Security Actions
1.Note that the shutdown option does not actually add the shutdown subcommand to the interface configuration. Instead, IOS puts the interface in an error disabled (err-disabled) state, which makes the switch stop all inbound and outbound frames. To recover from this state, someone must manually disable the interface with the shutdown interface command and then enable the interface with the no shutdown command.
2. Port security does not save the configuration of the sticky addresses, so use the copy running-config startup-config command if desired.
Cisco IOS Basic CLI Configuration : Switch Port Command的更多相关文章
- Cisco IOS Basic CLI Configuration:Access Security 01
1. Telnet Switch Config: Switch>en Switch#conf t Enter configuration commands, one per line. En ...
- Cisco IOS basic system management command reference
absolute : to specify an absolute time for a time-range (in time-range configuration mode) no absolu ...
- Cisco IOS Debug Command Reference I through L
debug iapp through debug ip ftp debug iapp : to begin debugging of IAPP operations(in privileged EXE ...
- Cisco IOS Security command Guide
copy system:running-config nvram:startup-config : to save your configuration changes to the startup ...
- Cisco IOS Debug Command Reference Command E through H
debug eap through debug he-module subslot periodic debug eap : to display information about Extensib ...
- Cisco IOS debug command reference Command A through D
debug aaa accounting through debug auto-config debug aaa accounting : to display information on acco ...
- Cisco IOS Software Activation Command Reference
clear license agent : to clear license agent statistics counters or connection statistics (in privil ...
- Cisco IOS和IOS XE 新漏洞检测与修复
Cisco IOS/IOS XE 新漏洞检测与修复 CVE-2018-0150 Cisco IOS XE 存在默认弱口令 漏洞影响: 默认弱口令可以导致攻击者直远程登录控制Cisco设备.受影响版本, ...
- Cisco IOS
IOS Internetwork Operating System 互联网操作系统(基于UNIX系统) Cisco IOS 软件提供多种网络服务进而支持各种网络应用. Cisco IOS用户界面的基本 ...
随机推荐
- iOS 多线程讲解
//同步操作用途 dispatch_queue_t queue = dispatch_get_global_queue(0, 0); dispatch_sync(queue, ^{ NSLog(@&q ...
- iOS - UI - UIStepper
7.UIStepper //计数器控件 固定宽高 UIStepper * stepper = [[UIStepper alloc] initWithFrame:CGRectMake(100, 10 ...
- JVM 运行时内存结构
1.JVM内存模型 JVM运行时内存=共享内存区+线程内存区 1).共享内存区 共享内存区=持久带+堆 持久带=方法区+其他 堆=Old Space ...
- 网络流sap算法模版
递归版sap: #include<cstdio> #include<iostream> #include<cstring> #include<algorith ...
- python 装 ez_setup.py 出错
python 装 ez_setup.py出错setuptools,pip,install,UnicodeDecodeError: 'ascii' codec can't decode byte.解决: ...
- DNA电荷转移:电阻的计算公式 & Marcus电子转移理论
更新:26 APR 2016 参考文献: [1] Mechanisms for DNA Charge Transport. Chem. Rev. 2010, 110, 3, 1642-1662 [电子 ...
- C# 匿名方法及Lambda表达式
1.匿名方法 定义:匿名方法不能直接在类中定义,而是在给委托变量赋值的时候,需要赋值一个方法,此时可以“现做现卖”,定义一个匿名方法传递给该委托. 举实例说明: 实例一:无参数,无返回值的一个匿名方法 ...
- 北大ACM(POJ1007-DNA Sorting)
Question:http://poj.org/problem?id=1007 问题点:逆序数及快排. Memory: 248K Time: 0MS Language: C++ Result: Acc ...
- Application 统计在线人数
MVC 统计在线人数: protected void Application_Start() { Application[; AreaRegistration.RegisterAllAreas(); ...
- 遇见NodeJS:JavaScript的贵人
在大家的印象中,相当长一段时间里,JavaScript是一门脚本语言,一般不能成为某个项目的担纲主角,作用只是在浏览器里帮忙校验校验输入是不是正确,响应一下鼠标.键盘事件,或者让某个HTML元素动起来 ...