Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6878508
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类:

2012-06-26 21:36:25

原文地址:cisco 2960 标准配置 作者:quanshengaa

http://hi.baidu.com/ernst_f/blog/item/23f6cb3d725575c87c1e7129.html

1 , 設置交換機名稱
(config)#hostname hostname
2,設置log存放路徑
(config)#logging 10.7.68.68 //將log檔文件存在10.7.68.68
(config)#spanning-tree mode rapid-pvst // 设定 spanning-tree 的模式是 rapid-pvst
3,設置errdisable
(config)#errdisable recovery cause all //開啟errdiable 恢復的原因
(config)#errdisable recovery interval 300 //errdisable后300秒恢復
4,設置snmp-server
(config)#snmp-server community askeymis RO //設置簡單網絡管理協議字符串為只讀
5, 設置vtp
(config)#vtp domain askey // 设定VTP domain 名称
(config)vtp mode transparent // 设定 VTP 模式为透明模式


Vlan
1,創建Vlan
(config)#vlan 180 //創建Vlan ID號為180
(config-vlan)#name askey //Vlan 名稱為askey
2,刪除Vlan
(config)#no vlan 180
#show vlan brief //查看交換機當前Vlan 號及Vlan 下有哪些端口
3,配置管理IP
(config)#int vlan 180
(config-if)#ip address 192.168.1.251 255.255.255.0 //設置管理IP地址
(config)#ip default-gateway 192.168.1.254 //設置默認路由﹐供其他網段訪問
4,將端口划至Vlan 180
4.1單一端口划分
(config)#int f0/1 //進入端口f0/1
(config-if)#sw mode access //設置訪問模式
(cofnig-if)#sw ac vlan 180 //將其端口划入Vlan 180
4.2多端口划分
(config)#int range f0/1 – 24 //端口范圍為1-24
(config-if-range)#sw mode access
(config-if-range)#sw ac vlan 180
端口配置
1,端口配置
(cofnig)#interface FastEthernet0/1
(config-if)#switchport access vlan 33 // 划分VLAN
(config-if)# switchport mode access
(config-if)# switchport port-security maximum 2 //设定端口只允许接入2个PC
(config-if)# switchport port-security // 启用端口安全
(config-if)# switchport port-security violation restrict // 发生违例 端口进errdisable,并记录
(config-if)# storm-control broadcast level 0.80 //控制广播包的突发百分比
(config-if)# storm-control action shutdown //暴风控制的违例时端口进入errdisable
(config-if)# storm-control action trap //产生snmp trap(抑制)消息来通告发生过量流量的情况
(config-if)# spanning-tree portfast // 配置接口为portfast模式
(config-if)# spanning-tree bpduguard enable // 启用bpuguard 防护
(config-if)# spanning-tree guard root // 启用根桥防护
設置時間與同步
1 , 開啟debug與log記錄時間的服務
(config)#Service timestamps debug datetime localtime //開啟debug記錄時顯示的時間
(config)#Service timestamps log datetime localtime //開啟log記錄時顯示的時間
2,設置時間與時區
(config)# Clock timezone TAIWAN 8 //設置時區
(config)# Clock set 12:16:50 nov 27 2008 //設置時間(月﹐日﹐年)
#Show clock //查看交換機當前的時間
3﹐設置ntp server 實現時間同步
(config)# ntp server 10.1.71.249 //設置交換機與ntp server 實現時間同步
#show ntp stauts //查看交換機是否同步
Clock is synchronized, stratum 3, reference is 10.1.71.249(同步)
nominal freq is 119.2092 Hz, actual freq is 119.2093 Hz, precision is 2**17
reference time is CCD89F21.ECA0C247 (12:22:57.924 TAIWAN Thu Nov 27 2008)
clock offset is 8.4785 msec, root delay is 399.51 msec
root dispersion is 937.29 msec, peer dispersion is 885.30 msec
Password
1,開啟明文密碼加密服務
(config)#service password-encryption //將明文密碼加密
2,設置控制台密碼
(config)#line consloe 0 //進入控制台
(config-line)#login //登錄
(config-line)#password cisco //設置密碼
3,設置enable密碼
(config)#enable password cisco
(config)#enable secret password cisco //給密碼加密碼 ﹐優先級高于enable password
4,設置Telnet 密碼
(config)#line vty 0 4 //進入vty模式
(config-line)#login
(config-line)#password cisco //設置密碼
(config-line)#exec-timeout 5 0 //telnet 5分鐘超時
Show
1,開啟明文密碼加密服務
1,show run //查看交換機配置
2,show ip int brief //查看所有端口狀況
3, show int des //查看所有端口的描述
4,show int f0/1 //查看f0/1接口狀態
5,show run int f0/1 //查看f0/1配置狀況
6,show run int valn 180 //查看Vlan 的配置狀態
7,show vtp stauts //查看vtp 的狀態
8,show clock //查看交換機當前的時間
9,show ntp stauts //查看ntp 是否同步

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