Cisco交换机如何设置?设置步骤有哪些?
1 , 设置交换机名称(config)#hostname hostname2,设置log存放路径(config)#logging 10.7.68.68 //将log档文件存在10.7.68.68(config)#spanning-tree mode rapid-pvst // 设定 spanning-tree 的模式是 rapid-pvst3,设置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 模式为透明模式Vlan1,创建Vlan(config)#vlan 180 //创建Vlan ID号为180(config-vlan)#name askey //Vlan 名称为askey2,删除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 1804.1单一端口划分(config)#int f0/1 //进入端口f0/1(config-if)#sw mode access //设置访问模式(cofnig-if)#sw ac vlan 180 //将其端口划入Vlan 1804.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**17reference time is CCD89F21.ECA0C247 (12:22:57.924 TAIWAN Thu Nov 27 2008)clock offset is 8.4785 msec, root delay is 399.51 msecroot dispersion is 937.29 msec, peer dispersion is 885.30 msecPassword1,开启明文密码加密服务(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 password4,设置Telnet 密码(config)#line vty 0 4 //进入vty模式(config-line)#login(config-line)#password cisco //设置密码(config-line)#exec-timeout 5 0 //telnet 5分钟超时。
思科2960交换机配置命令都有哪些
思科2960交换机配置命令如下:1、access: 主要用来接入终端设备,如PC机、服务器、打印服务器等。 2、trunk: 主要用在连接其它交换机,以便在线路上承载多个vlan。 3、multi: 在一个线路中承载多个vlan,但不像trunk,它不对承载的数据打标签。主要用于接入支持多vlan的服务器或者一些网络分析设备。现在基本不使用此类接口,在cisco的网络设备中,也基本不支持此类接口了。 扩展资料:交换机口令设置:1、switch>enable;进入特权模式、switch#configterminal;进入全局配置模式、switch(config)#hostname;设置交换机的主机名。2、switch(config)#enablesecretxxx;设置特权加密口令、switch(config)#enablepasswordxxa;设置特权非密口令。3、switch(config)#lineconsole0;进入控制台口、switch(config-line)#linevty04;进入虚拟终端。4、switch(config-line)#login;允许登录、switch(config-line)#passwordxx;设置登录口令xx、switch#exit;返回命令。
思科交换机详细配置方法和命令
思科交换机的基本配置命令学习
一、交换机口令设置:
switch>enable ;进入特权模式
switch#config terminal ;进入全局配置模式
switch(config)#hostname csico ;设置交换机的主机名
switch(config)#enable secret
csico1 ;设置特权加密口令
switch(config)#enable password csico8 ;设置特权非密口令
switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4
;进入虚拟终端
switch(config-line)#login ;虚拟终端允许登录
switch(config-line)#password
csico6 ;设置虚拟终端登录口令csico6
switch#exit ;返回命令
二、交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show
vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0
;查看指定端口信息
switch#show int f0/0 status;查看指定端口状态
switch#dir flash: ;查看闪存
Cisco路由器配置命令大全网络 2010-06-26 06:43:44 阅读657 评论0 字号:大中小 订阅 .
(1)模式转换命令
用户模式----特权模式,使用命令"enable"
特权模式----全局配置模式,使用命令"config
t"
全局配置模式----接口模式,使用命令"interface+接口类型+接口号"
全局配置模式----线控模式,使用命令"line+接口类型+接口号"
注:
用户模式:查看初始化的信息.
特权模式:查看所有信息、调试、保存配置信息
全局模式:配置所有信息、针对整个路由器或交换机的所有接口
接口模式:针对某一个接口的配置
线控模式:对路由器进行控制的接口配置
(2)配置命令
show running config 显示所有的配置
show
versin 显示版本号和寄存器值
shut down 关闭接口
no shutdown 打开接口
ip add +ip地址
配置IP地址
secondary+IP地址 为接口配置第二个IP地址
show interface+接口类型+接口号 查看接口管理性
show controllers interface 查看接口是否有DCE电缆
show history 查看历史记录
show
terminal 查看终端记录大小
hostname+主机名 配置路由器或交换机的标识
config memory
修改保存在NVRAM中的启动配置
exec timeout 0 0 设置控制台会话超时为0
service password-encryptin
手工加密所有密码
enable password +密码 配置明文密码
ena sec +密码 配置密文密码
line vty 0
4/15 进入telnet接口
password +密码 配置telnet密码
line aux 0 进入AUX接口
password
+密码 配置密码
line con 0 进入CON接口
password +密码 配置密码
bandwidth+数字 配置带宽
no ip address 删除已配置的IP地址
show startup config 查看NVRAM中的配置信息
copy
run-config atartup config 保存信息到NVRAM
write 保存信息到NVRAM
erase
startup-config 清除NVRAM中的配置信息
show ip interface brief 查看接口的谪要信息
banner
motd # +信息 + # 配置路由器或交换机的描素信息
description+信息 配置接口听描素信息
vlan database
进入VLAN数据库模式
vlan +vlan号+ 名称 创建VLAN
switchport access vlan +vlan号
为VLAN为配接口
interface vlan +vlan号 进入VLAN接口模式
ip add +ip地址 为VLAN配置管理IP地址
vtp+service/tracsparent/client 配置SW的VTP工作模式
vtp +domain+域名 配置SW的VTP域名
vtp +password +密码 配置SW的密码
switchport mode trunk 启用中继
no vlan +vlan号
删除VLAN
show spamming-tree vlan +vlan号 查看VLA怕生成树议
三. 路由器配置命令
ip
route+非直连网段+子网掩码+下一跳地址 配置静态/默认路由
show ip route 查看路由表
show protocols
显示出所有的被动路由协议和接口上哪些协议被设置
show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用
的定时器
等信息
router rip 激活RIP协议
network +直连网段 发布直连网段
interface lookback 0 激活逻辑接口
passive-interface +接口类型+接口号 配置接口为被动模式
debug ip +协议 动态查看路由更新信息
undebug all 关闭所有DEBUG信息
router eigrp +as号
激活EIGRP路由协议
network +网段+子网掩码 发布直连网段
show ip eigrp neighbors 查看邻居表
show ip eigrp topology 查看拓扑表
show ip eigrp traffic 查看发送包数量
router
ospf +process-ID 激活OSPF协议
network+直连网段+area+区域号 发布直连网段
show ip ospf
显示OSPF的进程号和ROUTER-ID
encapsulation+封装格式 更改封装格式
no ip admain-lookup
关闭路由器的域名查找
ip routing 在三层交换机上启用路由功能
show user 查看SW的在线用户
clear line
+线路号 清除线路
四. 三层交换机配置命令
配置一组二层端口
configure terminal 进入配置状态
nterface range {port-range} 进入组配置状态
配置三层端口
configure terminal 进入配置状态
interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} |
{port-
channel port-channel-number} 进入端口配置状态
no switchport
把物理端口变成三层口
ip address ip_address subnet_mask 配置IP地址和掩码
no shutdown 激活端口
例:
Switch(config)# interface gigabitethernet0/2
Switch(config-if)#
no switchport
Switch(config-if)# ip address 192.20.135.21 255.255.255.0
Switch(config-if)# no shutdown
配置VLAN
configure terminal 进入配置状态
vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改