ImageVerifierCode 换一换
格式:DOCX , 页数:32 ,大小:25.46KB ,
资源ID:23955156      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/23955156.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(思科三层交换机配置总结.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

思科三层交换机配置总结.docx

1、思科三层交换机配置总结思科交换机的基本配置命令学习CISCO交换机基本配置:Console端口连接用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;交换机口令设置:switchenable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname csico ;设置交换机的主机名switch(config)#enable secret csico1 ;设置特权加密口令switch(config)#enable password csico8 ;设

2、置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;虚拟终端允许登录switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6switch#exit ;返回命令交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2swit

3、ch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config)#speed ? 查看speed命令的子命令switch(config)#speed 100 设置该端口速率为100mb/s (10/auto)switch(config)#duplex ? 查看duplex的子命令switch(config)#duplex full 设置该端口为全双工(auto/half)switch(config)#description

4、 TO_PC1 这是该端口描述为TO_PC1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain vtpserver ;设置vtp

5、域名相同switch(config)#vtp password ;设置发vtp密码switch(config)#vtp server ;设置vtp服务器模式switch(config)#vtp client ;设置vtp客户机模式交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:switch(config)#interface vlan 1 ;进入vlan 1switch(config)#ip domain-name 设置域名switch(config)#mac-address-table? 查看mac-address-table的子命令switch(config)#ma

6、c-address-table aging-time 100 设置超时时间为100msswitch(config)#endswitch#show mac-address-table 查看整个MAC地址表switch#clear mac-address-table restricted static 清除限制性静态地址交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switc

7、h#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+接口类型+接口号注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:

8、配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(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 查看终端记录大小h

9、ostname+主机名 配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service 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

10、ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息 + # 配置路由器或交换机的描素信息description+信息 配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称 创建VLANswitchport acce

11、ss 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号 删除VLANshow spamming-tree vlan +vlan号 查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址 配

12、置静态/默认路由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路由协

13、议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-IDencapsulation+封装格式 更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用

14、户clear line +线路号 清除线路3. 三层交换机配置命令配置一组二层端口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

15、配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。name vlan-name 可选)输入一个VLAN名,如果没有配置VLAN名,缺省的名字是VLAN号前面用0填满的4位数,如VLAN0004是VLAN4的缺

16、省名字mtu mtu-size (可选) 改变MTU大小例Switch# configure terminalSwitch(config)# vlan 20Switch(config-vlan)# name test20Switch(config-vlan)# end或Switch# vlan databaseSwitch(vlan)# vlan 20 name test20Switch(vlan)# exit将端口分配给一个VLANconfigure terminal 进入配置状态interface interface-id 进入要分配的端口switchport mode access 定义

17、二层口switchport access vlan vlan-id 把端口分配给某一VLAN例Switch# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)# interface fastethernet0/1Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 2Switch(config-if)# endSwitch#配置VLAN trunkc

18、onfigure terminal 进入配置状态interface interface-Id 进入端口配置状态switchport trunk encapsulation isl | dot1q | negotiate配置trunk封装ISL 或 802.1Q 或自动协商switchport mode dynamic auto | desirable | trunk 配置二层trunk模式。dynamic auto自动协商是否成为trunkdynamic desirable把端口设置为trunk如果对方端口是trunk, desirable, 配置Native VLAN(802.1q)或自动模

19、式,trunk设置端口为强制的trunk方式,而不理会对方端口是否为trunkswitchport access vlan vlan-id 可选) 指定一个缺省VLAN, 如果此端口不再是trunkswitchport trunk native vlan vlan-id 指定802.1Q native VLAN号例:Switch# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)# interface fastethernet0/4Switch(config-

20、if)# switchport mode trunkSwitch(config-if)# switchport trunk encapsulation dot1qSwitch(config-if)# end定义TRUNK允许的VLANconfigure terminal子 进入配置状态interface interface-id 进入端口配置switchport mode trunk 配置二层口为trunkswitchport trunk allowed vlan add | all | except | remove vlan-list可选) 配置trunk允许的VLAN.使用add, al

21、l, except, remove关健字no switchport trunk allowed vlan 允许所有VLAN通过例Switch(config)# interface fastethernet0/1Switch(config-if)# switchport trunk allowed vlan remove 2Switch(config-if)# end配置Native VLAN(802.1q)configure terminal 进入配置状态interface interface-id 进入配置成802.1qtrunk的端口switchport trunk native vlan

22、 vlan-Id 配置native VLAN号no switchport trunk native vlan 端口配置命令回到缺省的状态配置基于端口权值的负载均衡configure terminal 进入Switch 1配置状态vtp domain domain-name 配置VTP域vtp mode server 将Switch 1配置成VTP server.show vtp status 验证VTP的配置show vlan 验证VLANconfigure terminal 进入配置状态interface fastethernet 0/1 进入F0/1端口switchport trunk e

23、ncapsulation isl | dot1q | negotiate配置trunk封装switchport mode trunk 配置成trunkshow interfaces fastethernet0/1 switchport 验证VLAN配置按以上步骤对想要负载均衡的接口进行配置在另一个交换机上进行此配置show vlan 当trunk已经起来,在switch2上验证已经学到相的vlan配置configure terminal 在Switch 1上进入配置状态interface fastethernet0/1 进入要配置的端口spanning-tree vlan 8 port-pri

24、ority 10 将端口权值10赋与VLAN 8.spanning-tree vlan 9 port-priority 10 将端口权值10赋与VLAN 9.spanning-tree vlan 10 port-priority 10 将端口权值10赋与VLAN 10.interface fastethernet0/2 进入F0/2spanning-tree vlan 3 port-priority 10 将端口权值10赋与VLAN 3.spanning-tree vlan 4 port-priority 10 将端口权值10赋与VLAN 4spanning-tree vlan 5 port-

25、priority 10 将端口权值10赋与VLAN 5spanning-tree vlan 6 port-priority 10 将端口权值10赋与VLAN 10end 退出show running-config 验证配置copy running-config startup-config 保存配置配置STP路径值的负载均衡Trunk1走VLAN810,Trunk2走VLAN24configure terminal 进入 Switch 1配置状态interface fastethernet 0/1 进入F0/1switchport trunk encapsulation isl | dot1q

26、 | negotiate配置封装switchport mode trunk 配置Trunk,缺省是ISL封装exit 退回在F0/2口上重复24步骤exit 退回show running-config 验证配置show vlan验证switch1 已经学到Vlanconfigure terminal 进入配置状态interface fastethernet 0/1 进入F0/1spanning-tree vlan 2 cost 30 设置Vlan2生成树路径值为30spanning-tree vlan 3 cost 30 设置Vlan3生成树路径值为30spanning-tree vlan 4

27、 cost 30 设置Vlan4生成树路径值为30end 退出在switch1的F0/2上重复911步骤设置VLAN8,9,10生成树路径值为30end 退出show running-config 验证配置copy running-config startup-config 保存配置补充:CISCO命令集路由选择协议及排障*ip route命令Router(config)# ip route 子网掩码 管理距离0255,默认为1(注:静态地址配置)*ip default-network命令Router(config)# ip default-network (注:配合路由协使用,用其中的一个动

28、态路由号作默认路由配置)(注:只有一个公网地址时,在出口路由器上的配置)*内部路由选择协议*使用router和network命令Router(config)# router 自主系统号Router(config-router)# network Router(config-router)# network *路由信息协议RIPRouter(config)# router ripRouter(config-router)# network Router# show ip protocolsRouter# show ip routeRouter# debug ip rip*内部网关路由协议IGRP

29、Router(config)# router igrp Router(config-router)# network Router# show ip interfaceRouter# show ip protocolsRouter# show ip routeRouter# debug ip rip*排除网络故障排除网络故障的一个总体模型Router# ping Router# show ip routeRouter# show interface Router# show run*IP的故故障排除检查可用的路由Router# show ip route 27.4.4 跟踪路由(Tracing

30、 the Route)SUN-A traceroute C:/windows/ winipcfgC:/windows/ ipconfigC:/windows/ ipconfig / allC:/windows/ tracert 使用扩展的ping来跟踪连接性Router# ping*其它可能的故障一个地址解析(ARP)的故障Router# show arpRouter# show interface C:/windows/ arp -aSUN-A arp a验证终端系统的路由表C:/windows/ netstat rnC:/windows/ route f print | add | delete | change destination maskne

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1