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用户界面的基本 ...
随机推荐
- api 翻译之AsyncTask
AsyncTask 类的简介: AsyncTask可以使UI线程更合理更简单的使用.这个类允许执行后台操作,而且可以在不使用多线程或handlers的情况下给主线程传输数据. 异步任务 被定义为在后台 ...
- iOS部分其他知识
1.界面切换传值 (1)使用button进行界面切换 //当页面跳转时系统自动调用,segue连线 - (void)prepareForSegue:(UIStoryboardSegue *)segue ...
- Uva 10129 - Play on Words 单词接龙 欧拉道路应用
跟Uva 10054很像,不过这题的单词是不能反向的,所以是有向图,判断欧拉道路. 关于欧拉道路(from Titanium大神): 判断有向图是否有欧拉路 1.判断有向图的基图(即有向图转化为无向图 ...
- SQL Server 2008数据类型
在创建表时,必须为表中的每列指派一种数据类型. 今天在研究二进制存储图片时候竟然不知道image类型就是二进制类型?!所有就搜集了sql中的各种数据类型汇总,成功在于点滴积累. 1. 字符数据类型 数 ...
- oralce之存储过程
一:--循环向表emp中插入数据 declare maxnumber ; v_count number; begin v_count :; ..maxnumber LOOP v_count :; in ...
- ionic项目的一些简单操作
1.首先保证开发环境没问题: 2.下载一个ionic项目:命令ionic start myApp tabs(myApp的项目的名称) 3.在运行项目之前,要先创建平台: ionic platform ...
- IIs站点的建立
控制面板——管理工具——Internet信息服务管理器 首先应设置的文件权限:System 和 admin 程序池:4.0 编辑权限:iis apppool\名称 身份验证:匿名身份——应用程序池标识
- 日期类型的input元素设置默认值为当天
html文件:<input name="" type="date" value="" id="datePicker" ...
- BZOJ 1050
1050: [HAOI2006]旅行comf Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 2593 Solved: 1399[Submit][St ...
- 【CSS3】---元素隐藏(是否占据空间、是否可点击)
在CSS中,让元素隐藏(指屏幕范围内肉眼不可见)的方法很多,有的占据空间,有的不占据空间:有的可以响应点击,有的不能响应点击. { display: none; /* 不占据空间,无法点击 */ } ...