思科3560 配置命令.docx
- 文档编号:23349125
- 上传时间:2023-05-16
- 格式:DOCX
- 页数:38
- 大小:56.71KB
思科3560 配置命令.docx
《思科3560 配置命令.docx》由会员分享,可在线阅读,更多相关《思科3560 配置命令.docx(38页珍藏版)》请在冰豆网上搜索。
思科3560配置命令
switch>命令行模式;config#特权模式
一、配置交换机vlan模式;有两种方式
第一种:
config#vlanID这里的ID是需要你个人给要划分的vlan起的编号
config-if#name名字
switch#showvlanbrief查看vlan用来检验是否配置成功
第二种:
switch#vlandatabase交换机的vlan配置状态
switch(vlan)#vlanIDname名字配置vlan并且分配相应的名字
二、3560上开启路由功能配置
switch(config)#iprouting
switch(config)#iprouteipaddressnet-hop配置路由(静态)
switch(config)#ipdefault-gatewayipaddress配置网关
三、开启聚合链路配置
#conft
SW(config)#interfacerangef1/1-2
SW(config-if)#channel-group1modedesirable/on
SW(config-if)#swithport
SW(config-if)#switchportmodetrunk
SW(config-if)#switchporttrunkencapdot1q
四、启动telnet管理模式
switch(config)#linevty04
switch(config-line)#password密码
switch(config-line)#login
五、开启cisco日志功能
switch(config)#loggingon
switch(config)#loggingtrap信息
switch(config)#logginghost你的IP地址
switch(config)#loggingfacility你选着的信息
配置3550作为dhcp服务器
六、配置cisco启动dhcp功能
配置地址池
switch(config)ipdhcppool名字
switch(config-pool)networkmask
switch(config-pool)dns-server
switch(config-pool)default-router网关
设置dhcp保留不分配的地址
switch(config)ipdhcpexcluded-address地址地址
第一步;从起交换机
第二步;配置
1)按下MODE键后给3560加电。
2)在出现的菜单中选择第一项
systemsoftware:
flash_init
load_helper
boot
switch:
flash_init
switch:
load_helper
3)重命名flash:
config.text文件。
switch:
renflash:
config.textflash:
config.old
4)重启交换机
switch:
boot
5)当出现问你是否进行配置时,选择NO(因为它找不到配置文件config.text文件了)
Wouldyouliketoentertheinitialconfigurationdialog?
[yes/no]:
no
6)从用户模式登录特权模式,无需密码。
Switch>en
Switch#
7)恢复刚才重命令的配置文件名.
Switch#renflash:
config.oldflash:
config.text
Destinationfilename[config.text]?
直接回车
8)用老的配置文件替换当前的配置文件。
Switch#copyflash:
config.textsystem:
running-config
Destinationfilename[running-config]?
直接回车
9)修改使用密码。
Switch#conft
10)保存密码
switch(config)#enablepasswordsong
switch#wrorcopyrunning-configstarting-config
OK到这里我们的密码就改好了。
一、交换机五种模式
Swith>(用户模式)
Swith#(特权模式)
Swith(config)#(全局配置模式)
Swith(config-if)#(接口模式)
Swith(config-line)#(线模式)
二、交换机模式切换
Swith>enable//切换到特权
Swith#configt//切换到全局配置模式
Swith(config)#interfacef0/1//进入接口f0/0
Swith(config)#interfacevlan1//进入VLAN1中
Swith(config-if)#ipaddress192.168.1.1255.255.255.0//对VLAN1设置IP地址和子网掩码
Swith(config-if)#noshutdown//激活VLAN1
三、设置交换机的密码
1、用户到特权的密码
Swith(config)#enablepassword123(优先级低)
Swith(config)#enablesecret456(优先级高)//如果两个都设置则456生效
2、控制台console密码设置
Swith(config)#linecon0
Swith(config-line)#login
Swith(config-line)#passwordconsole123//设置console密码为telnet123
3、启用telnet密码
Swith(config)#linevty015//最多有0~15人可以telnet访问swith,合计16人
Swith(config-line)#login
Swith(config-line)#passwordtelnet123//设置telnet密码为telnet123
注:
要想真正生效telnet还要设置特权密码
①交换机命名hostnameBENETSW01
Swith(config)#hostnameBENETSW01//使用hostname命名交换机的名字
四、show命令集
Swith#showversion//显示IOS版本信息
Swith#showvlanid10//简单的显示VLAN10的信息
Swith#showrunning-config//显示正在运行的配置文件
Swith#showstartup-config//显示己经保存的配置文件
Swith#showmac-address-table//显示MAC地址表
Swith#showmac-address-table//显示MAC地址表更新的间隔,默认为5分钟
Swith#showneighbordetail//显示邻居详细信息
Swith#showtraffic//显示CDP流量
Swith#show
五、设置交换机的网关和DNS名称服务器的IP地址
Swith(config)#ipdefault-gateway192.168.10.8//交换机的网关设置为192.168.10.8
Swith(config)#ipdomain-nameserver202.106.0.20//设置DNS名称服务器地址
Swith(config)#noipdomain-lookup//交换机名称服务器的域名查询
六、创建、删除、查看VLAN
Switch#vlandatabase//进入vlan数据库配置模式
Switch(vlan)#vlan2//创建VLAN2命名为vlan0002,也可以使用vlan2namesales
VLAN2added:
Name:
VLAN0002
Switch(vlan)#exit//退出时应用生效
Swith(vlan)#novlan2//删除vlan2
Switch(config)#interfacef0/1
Switch(config-if)#switchportaccessvlan2//将端口加入vlan2中
Switch(config-if)#noswitchportaccessvlan2//将端口从vlan2中删除
Switch(config)#interfacerangef0/1–10//进行F0/1到10端口范围
Switch(config-if-range)#switchportaccessvlan2//将f0/1到f0/10之间的所有端口加入vlan2
Switch#showvlanbrief//查看所有VLAN的摘要信息
Switch#showvlanidvlan-id//查看指定VLAN的信息
七、开启并查看trunk端
Swith(config)#interfacef0/24
Swith(config-if)#swithmodetrunk//将f0/24端口设置为trunk
Switch#showinterfacef0/24switchport//查看f0/24的接口状态
八、从Trunk中添加、删除Vlan
Switch(config-if)#switchporttrunkallowedvlanremove3//从trunk端口删除vlan3通过
Switch(config-if)#switchporttrunkallowedvlanadd3//从trunk端口添加vlan3通过
Switch#showinterfaceinterface-idswitchport//检查中继端口允许VLAN的列表
九、单臂路由配置
Router(config)#interfacef0/0.1
Router(config-subif)#encapsolutiondot1q1//子接口封装dot1q针对的是VLAN1
Router(config-subif)#ipaddress192.168.1.1255.255.255.0//设置VLAN的网关地址
Router(config)#interfacef0/0.2
Router(config-subif)#encapsolutiondot1q2//子接口封装dot1q针对的是vlan2
Router(config-subif)#ipaddress192.168.2.1255.255.255.0//设置vlan2的网关的地址
第一章:
VTP
配置思路:
1>设置VTP域名
2>设置VTP模式
3>创建VLAN
4>配置其它VTP参数
vtpdomian[domianname]//设置vtp域名
vtpmode[server|client|transparent]//设置vtp模式
vtppassword[passdord]//设置vtp口令
vtppruning//配置vtp修剪
vtpversion2//运行vtp版本2
showvtpstatus//查看vtp配置信息
第二章:
STP
配置思路:
1>启用STP协议
2>设置根网桥
3>配置以太通道
4>配置上行链路、速端口
spanning-treevlan[vlan-list]//启用生成树协议
spanning-treevlan[vlan-list]root[primary|secondary]//配置跟网桥
spanning-treevlan[vlan-list]priority[bridge-priority]//修改网桥优先级
spanning-treevlan[vlan-list]cost[cost]//修改端口成本
spanning-treevlan[vlan-list]port-priority[priority]//修改端口优先级
spanning-treeuplinkfast//配置上行链路
spanning-treeportfasr//配置速端口
interfacerangef0/1–2//进入1-2快速以太接口
channel-group1modeon//配置以太通道
showspanning-tree//查看生成树配置
showspanning-treevlan[vlan-id]detail//查看某个vlan的生成树详细信息
showetherchannel1summary//查看以太通道1信息
第三章:
三成交换
配置思路:
1>开启三层交换路由功能
2>配置VLANIP地址
3>关闭路由接口二层交换功能
iprouting//开启路由功能
interfacevlan[vlan-id]//进入指定vlan
ipaddress[ip-addresssubnet-mask]//配置vlanIP地址和子网掩码
noswitchport//配置接口为三层模式
iphelper-address[address]//中继转发DHCP地址
showiproute//查看路由表信息
showipecf//查看FIB表信息
showadjacencydetail//查看邻接关系表信息
第五章:
帧中继(FrameRelay)
配置思路:
1>将路由器交换机转换成帧中继交换机
2>设置帧中继交换机接口的带宽
3>将接口IP地址关闭
4>设置接口封装模式为帧中继
5>设置接口DCE时钟频率
6>配置接口封装协议
7>配置接口成为DCE
8>配置DLCI映射关系
9>将接口开启
外网帧中继
frame-relayswitching//开启帧中继协议
bandwidth[值]//设置接口带宽,反转ARP
noipaddress//将接口IP禁用
encapsulationframe-relay//将接口封装模式为帧中继
clockrate[time]//设置接口DCE时钟频率
frame-relaylmi-type[cisco|ansi]//配置接口封装帧中继协议
frame-relayintf-typr[dce|dte]//配置接口成为DCE或DTE
frame-relayroute[值]interface[接口][值]//配置端口帧中继DLCI映射关系
noipmroute-cache//关闭路由高级缓存
本地帧中继
interfaces0/0//进入同步串行接口
encapsulationframe-relay//配置接口封装方式为帧中继
frame-relayinterface-hdlc[值]//将外网的DLCI对应到帧中继接口上
frame-relaylmi-type[cisco|ansi]//配置接口封装的类型
frame-relaymapip[ipaddress]broadcast//配置DTE静态帧中继映射
第六章:
PPP
配置思路:
1>进入接口将接口封装为PPP协议
2>配置配置接口IP地址
3>配置主认证方PAP或者CHAP认证
4>配置被认证方PAP或者CHAP认证
5>配置IP地址协商
6>配置PPP压缩
PAP
encapsulationppp//配置接口封装方式为PPP协议
ipaddress[ipaddressipmask]//配置接口IP地址和子网掩码
shutdown//将接口关闭
noshutdown//将端口开启
username[username]password0[password]//配置验证用户名和密码"不带0是加密密码
pppauthentication[pap|chap]//配置接口认证方式
ppppapsent-username[username]password0[password]//配置被认证方用户密码"PAP模式下需要填写的是主认证方的用户名和密码
CHAP
主认证方
username[username]password0[password]//配置主认证端用户名和密码
pppencapsulationchap//将端口封装成CHAP认证方式
被认证方
username[username]password0[password]//配置主认证方发送过来的用户名和被认证放自己的密码
pppchappassword0[password]//在接口配置这条命令也可以达到相同的效果
IP协商
peerdefaultipaddress[ipaddress]//在PPP服务器要分配给对方的IP地址
ipaddressnegotiated//在PPP客户端要获取服务器的IP地址
PPP压缩
compress[presictor|stac]//在接口启用PPP压缩"Predictor会消耗大量的内存,Stac会占用大部分的CPU资源
iptcpheader-compression//配置TCP头压缩
debugppppacket//启用调试模式来查看PPP连接状态和协商过程
第八章:
OSPF单域
配置思路:
1>开启OSPF路由协议
2>发布接口所在区域
3>修改OSPF其它参数
interfaceloopback0//进入路由器回环接口
ipaddress[ipaddress]//配置回环接口IP地址多位路由器的RouterID
routerospf[进程号]//启动OSPF路由协议,设置进程号
network[网段地址][反码掩码]area[区域号]//指定OSPF协议接口所运行的区域
ipospfcost[值]//修改接口Cost值
ipospfhello-interval[时间]//修改OSPFHello值时间默认时间10秒
ipospfdead-interval[时间]//修改OSPFDead(失效间隔)时间,默认是Hello的4倍
showipospfneighbor//查看邻居列表
showipospfdetabase//查看链路状态数据库
showipospf//查看OSPF配置
showipospfinterface[接口]//查看OSPF接口状态
showipospfproce-id//显示指定进程信息
第九章:
OSPF多域
配置思想:
1>启用OSPF路由协议
2>发布接口所在区域
area[areaid]stub//将指定区域设置成末梢区域
area[areaid]stubno-summary//将指定区域设置成完全末梢区域
debugipospfadj//查看路由器临界的整个过程
cleariprouter//清空路由表
第十章:
OSPF高级配置
配置思想:
1>启用OSPF路由协议
2>发布接口所在区域
3>配置OSPF辅助地址
4>配置路由重分发
5>配置地址汇总
6>配置徐链路
area[areaid]nssa//将路由器配置成非纯末梢区域
area[areaid]nssano-summary//将在ASBR路由器设置为非纯末梢并不进行路由汇总
ipaddress[ipaddress][netmask]secondary//配置接口辅助地址
area[areaid]range[ipaddress][mask]//在区域间路由器进行路由汇总
summary-address[ipaddress][mask]//在ASBR路由器进行路由汇总
nosummary-address//删除路由汇总
iproute[ipaddress][mask]null0//汇总后的地址当实际地址不存在时候将不会再走默认路由而是丢弃该数据包
redistribute[protocol][protocolid]metric[metric跳数]metric-type[metric-tpye值]|subnets
//路由重分发如:
routerrip//启用RIP路由协议
redistributeospf2metric1//将OSPF路由协议信息注入到RIP路由协议中"OSPF的进程号是2到达RIP路由协议路由器的跳数为1
redistributeripmetric1metric-tpye[1|2]subnets//将RIP路由协议信息注入到OSPF路由协议中"其中metric1是给定一个OSPF代价,metric-tpye1|21是计算整个路径的成本,2是不计算到达ASBR的路径成本,subnets是网络汇总
passive-inerface[接口]//在路由模式下,不管什么协议,只进行接收不发送
area[areaid]virtual-link[对端IP地址]//设置与同个区域内的路由器建立虚链路”虚链路的地址为对端路由器的IP地址
default-informationoriginate//开启FSPF的默认动态路由,告诉下面其他路由学习它的默认路由
第十一章:
HSRP
配置思想:
1>配置HSRP组号虚拟地址
2>配置HSRP优先级
3>配置HSRP占先权
4>配置HSRP端口跟踪
5>配置HSRP其它参数
ipirdpmulticast//在路由器中进行IRDP广播,要让Solaris操作系统兼容需要用此命令
ipirdppreference[number]//设置路由器IRDP优先级"默认是0,值越大优先级越高
stanbdy[groupnumber]ip[hsrpipaddress]//设置热备的组号和热备IP地址
nostandbygroupip//取消一个端口用的热备IP地址
noipredirects//关闭活跃路由器地址,"防止主机知道路由器真是MAC地址
stanbfy[groupnumber]priority[值]//配置接口HSRP优先级
stanbdy[groupnumber]preempt[值]//设置接口HSRP占先权
stanbdy[groupnumber]times[hellotime|holdtime]//配置HSRPHELLO之间和HSRP保持时间,默认HELLO时间是3秒,保持时间是10秒,保持时间最少应该是HELLO时间的3倍
stanbdy[gro
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 思科3560 配置命令 思科 3560 配置 命令
![提示](https://static.bdocx.com/images/bang_tan.gif)