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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

路由器与交换机的配置代码文档格式.docx

1、 Continue? confirmErase of nvram: complete%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram查看R1的cdp邻居R1#show cdp neighbors 关闭R1接口下的cdp R1(config)#interface s0/0/0R1(config-if)#no cdp enable打开R1接口下的cdpR1(config)#interface s0/0/0R1(config-if)#cdp enable ble4)关闭和打开整个路由的cdp 关闭R1整个路由的cdpR1(config)#

2、no cdp run打开R1整个路由的cdpR1(config)#cdp run 关闭R2整个路由的cdpR2(config)#no cdp run打开R2整个路由的cdp R2(config)#cdp run5)在R1和R2上的s0/0上配置IP地址,以及enable密码和vty密码对R1进行配置 R1(config-if)#ip address 192.168.1.1 255.255.255.0Write)4)把IOS从路由器备份到TFTP服务器上。 Router#copy running-config tftp: Address or name of remote host ? 1.1.

3、1.2 Destination filename Router-confg? aa.bak Writing running-config.! OK - 494 bytes2)在各路由器上用rip进行配置R1:Router(config-router)#network 12.12.12.08)使用passive在Lo1接口上禁止rip发送信息 Router(config-router)#passive-interface lo1 Router(config-router)#RIP: received v1 update from 12.12.12.2 on Serial0/0/0 23.0.0.

4、0 in 1 hops2)在各路由器上用ospf进行配置(进程号自定,单区域)R1(config-router)#network 12.12.12.1 0.0.0.255 area 05)查看R1和R2上的f0/1链路谁是DR。在R1上改变router-id,使得R1为DR(要执行clear ip ospf process)。由上图的show ipospf neighbor看出R2的优先级最高,所以R2是DR,R1为BDRR1(config)#router ospf 10R1(config-router)#router-id 10.1.1.1R1#clear ip ospf processRe

5、set ALL OSPF processes? no: yes6)在R2上用ip ospf 的f0/1改变ospf 优先级(ip ospf priority xxx)使得R又成为DR。Router(config)#interface f0/1Router(config-if)#ip ospf priority 200Router#show ip ospf neighbor 7)在R3配置ip route 0.0.0.0 0.0.0.0 3.3.3.254默认路由,模拟连接到Internet上;在R3的ospf进程中用default-information originate命令;在R1、R2上

6、查看是否有默认路由的产生。R3进行配置:Router(config)#ip route 0.0.0.0 0.0.0.0 3.3.3.254Router(config)#rouRouter(config)#router osRouter(config)#router ospf 1Router(config-router)#deRouter(config-router)#default-information originateb)交换机各种密码的配置配置特权执行口令Switch(config)# enable secret ciscoSwitch(config)#配置控制台口令。Switch(c

7、onfig)# line console 0Switch(config-line)# password classSwitch(config-line)# login配置虚拟线路口令 Switch(config-line)# line vty 0 15 Switch(config-line)# password cisco Switch(config-line)# logind)配置文件的保存、删除;查看flash信息、version信息。 文件的保存: Switch#w Building configuration. OK Switch# 文件的删除: Switch#delete ? WOR

8、D File to be deleted flash: File to be deleted4) vlan2和vlan3的创建,按照图中所示,把端口划分在相应的vlan中 Switch(config)#vlan 2Switch(config-vlan)#name cisco1Switch(config-vlan)#exiSwitch(config-vlan)#exit Switch(config)#vlan 3Switch(config-vlan)#name cisco2Switch(config)#intSwitch(config)#interface fa0/5Switch(config-

9、if)#swSwitch(config-if)#switchport moSwitch(config-if)#switchport mode accSwitch(config-if)#switchport mode access Switch(config-if)#switchport accSwitch(config-if)#switchport access vSwitch(config-if)#switchport access vlan 2Switch(config-if)#endSwitch#%SYS-5-CONFIG_I: Configured from console by co

10、nsoleSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fa0/6Switch(config)#interface fa0/7Switch(config-if)#switchport access vlan 3Switch(config-if)#ZSwitch(config)#interface fa0/8Switch(config)#interface vlan 99Switch(config-if)#ip adSwitch(config-if

11、)#ip address 172.17.99.11 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exiSwitch(config-if)#exit Switch(config)#inSwitch(config-if)#switchport mode aSwitch(config-if)#switchport aSwitch(config-if)#switchport access vlan 99% Access VLAN does not exist. Creating vlan 99Switch(config-if)#%LI

12、NK-5-CHANGED: Interface Vlan99, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to upSwitch(config-if)#ip address 192.168.1.11 255.255.255.0Switch(config-if)#ip address 192.168.1.21 255.255.255.0 6)保存配置,假设密码遗忘,进行密码的恢复Switch#wOK2)手工配置交换机之间链路为trunk:S1的配置S1(conf

13、ig)#interface fa0/1S1(config-if)#swS1(config-if)#switchport moS1(config-if)#switchport mode trS1(config-if)#switchport mode trunk S2的配置S2(config)#interface fa0/1S2(config-if)#swS2(config-if)#switchport mS2(config-if)#switchport mode tS2(config-if)#switchport mode trunk S2(config-if)#S2(config-if)#in

14、terface fa0/23)在SW1/SW2/SW3上,配置VTP的名字为VTP-SZPT,密码为cisco。S1(config)#S1(config)#vtp domS1(config)#vtp domain VTP-SZPTChanging VTP domain name from NULL to VTP-SZPTS1(config)#vtp paS1(config)#vtp password ciscoSetting device VLAN database password to cisco4)配置SW1的vtp模式为server;配置SW1的vtp模式为transparent;配置

15、SW1的vtp模式为client。S1(config)#vtp mS1(config)#vtp mode cliS1(config)#vtp mode server Setting device to VTP CLIENT server.S2(config)#vtp mode transparentSetting device to VTP TRANSPARENT mode.S2(config)#S3的配置S3(config)#vtpS3(config)#vtp mS3(config)#vtp mode cliS3(config)#vtp mode client Setting device

16、to VTP CLIENT mode.S3(config)#4)在SW1(3650)上改变桥的优先级小于32768。 S1(config)#spanning-tree v S1(config)#spanning-tree vlan 1 p S1(config)#spanning-tree vlan 1 priority 24576 S1(config)#Z8)配置pvst使得对于VLAN1来说,Sw2的g0/2处于转发状态;对于VLAN2来说,Sw3的f0/2处于转发状态。配置S1S1(config)#spS1(config)#spanning-tree vS1(config)#spannin

17、g-tree vlan 1 pS1(config)#spanning-tree vlan 1 priority 4096S1(config)#vlan 2S1(config-vlan)#配置S1接口S1(config)#interface f0/1S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 1S1(config-if)#ZS1#2)在Switch的f0/9接口上配置trunk,封装为dot1qSwitch(config)#interface fa0/9Switch(config-if)#sw

18、itchport modSwitch(config-if)#switchport mode trSwitch(config-if)#switchport mode trunk Interface FastEthernet0/9, changed state to up Line protocol on Interface FastEthernet0/9, changed state to up3)在R1上配置单臂路由:a) int f0/0.1b) encap dot1q vlan 1c) ip address 1.0.0.254 255.0.0.0d) int f0/0.2e) encap

19、dot1q vlan 2f) ip address 2.0.0.254 255.0.0.0R1(config)#interface f0/0.1R1(config-subif)#enR1(config-subif)#encapsulation doR1(config-subif)#encapsulation dot1Q 1R1(config-subif)#ip aR1(config-subif)#ip addR1(config-subif)#ip address 1.0.0.254 255.0.0.0R1(config-subif)#intR1(config-subif)#interface

20、f0/0.2R1(config-subif)#encapsulation dR1(config-subif)#encapsulation dot1Q 2R1(config-subif)#ip address 2.0.0.254 255.0.0.0 R1(config-subif)#interface f0/0R1(config-if)#no shut7)在3560交换机上配置vlan接口的IP地址:a) int vlan1b) ip address 1.0.0.254 255.0.0.0c) int vlan2d) ip address 2.0.0.254 255.0.0.0Switch(co

21、nfig-if)#interface g0/1Switch(config-if)#switchport acSwitch(config-if)#switchport access vlSwitch(config-if)#switchport access vlan 1Switch(config-if)#interface g0/2Switch(config)#interface vlSwitch(config)#interface vlan 1Switch(config-if)#ip addSwitch(config-if)#ip address 1.0.0.254 255.0.0.0Switch(con

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

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