logo资料库

思科3650自学命令配置.pdf

第1页 / 共34页
第2页 / 共34页
第3页 / 共34页
第4页 / 共34页
第5页 / 共34页
第6页 / 共34页
第7页 / 共34页
第8页 / 共34页
资料共34页,剩余部分请下载后查看
369136929 ccieyc@live.cn 作者: 红盟过客 CCIE 理论 RHCE QQ : msn : 籍贯 :湖北宜昌。 有宜昌的朋友可以一起聊聊技术。 杭州 杭州 CCIE 联盟群 40576311 时间: 2008 年七月 地点: 浙江杭州 软件:Visio 2007 CorelDRAW 12 WPS 2005 说明:一般情况下三台路由器。模拟器为原版的 Dynamips i 顺序:R1 的 F0/0 接 R2 的 F0/0 ,R2 的 F1/1 接 R3 的 F1/1。在这里用 lookback 接口来 模拟不同网段。路由器都为最小配置 cisco2501.IOS 是 12.0 以上。提醒一下:现在可以用 Dynamips 软件完全模拟所有的实验。为了使实验更有价值,所写实验均在真实路由器上完 成。 说 明 :设备为思科 3560 交换机。版本为 Version 12.2(40)SE C3560-ADVIPSERVICESK9-M 第一版前言 这份实验笔记是自己很早以前在学习 3560 交换机写的笔记。 里面的一些配置很简单,但是很实用,在考 ccie 时,对 3560 交换机的要求是精通, 在实际工作中更是要求对 35 交换达到非常精通的要求。35 是思科中端交换机的基础,如果 35 不能很好的掌握,那么后面的 45,65,也就很难搞精通。这些实验配置很简单,但是命 令需要花大量时间在上面。所有的命令在 3560 上测试通过。适合 3560 等中型交换机。 说明一下自己对交换机的理解,工作中常常遇到的是 45 65 交换机。其实当上到 45 及 以上的时候,交换机的作用与路由器就没有多大的区别,像 45 有自己的处理器,自己的板 卡。能在上面配置动态路由协议.在 45 上面除了不能配置 isis 以外,基本上能运行所有的路 由协议。当然了,其实只要把最底端的三层 35 学好,所以的命令都是通用的,只不过在 65 上面是比较复杂的是一些模块,只是 65 将所有的功能综合起来,所以显示的比较复杂。 对于交换机的命令,我想说的是,一定要精通,只要有设备,一定要反复的学习命令, 只有这样,就算你没有做过工程,你也不会感觉到心虚。交换机常用的命令也不是很多了, 所以把常用命令透彻理解应当不是很大的问题。 当交换机加电启动之后,它会自动实行 POST 程序来确认交换机运转正常.当交换机开始 POST 检测的时候,端口的 LED 变绿,而系统 LED 闪烁绿光,RPS LED 熄灭;接下来最前两个 端口 LED 熄灭.当 POST 检测完成后,端口 LED 恢复到它所显示的模式的状态,系统 LED 变 绿.如果 POST 检测失败,那么系统 LED 和相关的端口变为暗黄. 这份实验中如果有错误与不当之处,希望朋友指出。 当然,如果有朋友有兴趣加入一些交换的更高级的东东,大家可以联系,一起写一些交 换的实验,让更多喜欢思科交换的朋友学习。 2008 年于杭州
已完工的作品 《2009 mpls vpn 自学命令配置排错》 第一版 《2009 3560 交换机自学命令与配置》 第一版 《2008 vpn 自学命令与配置》 第一版 《2008 ospf 命令与配置手册实验笔记》第二版 《2008 bgp 命令与配置手册实验笔记》第二版 《2009 ISIS 命令与配置手册实验笔记》 第一版 《2008 三层交换与路由综合配置案例》 《RHCE5.0 实验手册》 《华为 3600 交换机实验笔记》 《BGP 设计与实现笔记》 《JUNIPER NETSCREEN 防火墙基础实验》 《杭州某中学断网解决办法》 设置主机名 Switch(config)#ho s3560 设置密码 s3560(config)#en pass cisco s3560(config)#en sec cisco 配置用户名与密码 s3560(config)#username cisco pass cisco 设置交换机命令历史数量 s3560#terminal history size 20 设置线路历史命令数量 s3560(config)#line c 0 s3560(config-line)#history size 20 s3560(config-line)#end 显示所有活动会话 s3560#sh sessions 设置当前会话的屏幕大小 s3560#terminal length 100 s3560#terminal width 100 设置所有的会话屏幕大小 s3560(config)#line c 0 s3560(config-line)#length 100
s3560(config-line)#width 100 s3560(config-line)#end 设置超时时间为 0 s3560(config)#line c 0 s3560(config-line)#no exec-ti s3560(config-line)#line vty 0 4 s3560(config-line)#no exec-t s3560(config-line)#end 全局关闭查询命令 s3560(config)#no ip domain-lo 设置时间 s3560#clock set 13:57:10 26 february 2008 设置 dns 服务器地址 s3560(config)#ip name-server 192.168.1.1 设置解析的主机名与地址 s3560(config)#ip host r2 192.168.1.2 设置只充许 192.168.1.0 网段访问 s3560(config)#access-list 1 per 192.168.1.0 0.0.0.255 s3560(config)#line vty 0 4 s3560(config-line)#access-class 1 in s3560(config-line)#end 只充许本主主机用户名与密码为 cisco 的主机访问 http s3560(config)#int vlan 1 s3560(config-if)#ip add 192.168.1.110 255.255.255.0 s3560(config-if)#access-li 2 per 192.168.1.0 0.0.0.255 s3560(config)#ip http ser s3560(config)#ip http port 3333 s3560(config)#ip http access-cla 2 s3560(config)#ip http authen local s3560(config)#user cisco pass cisco s3560(config)#end
Ssh 配置 s3560(config)#user cisco pass cisco s3560(config)#line vty 0 4 s3560(config-line)#login local s3560(config-line)#transport input telnet s3560(config-line)#end 设置管理 vlan 地址 s3560(config)#int vlan 1 s3560(config-if)#ip add 192.168.1.110 255.255.255.0 设置默认网关 s3560(config)#ip default-gateway 192.168.1.1 配置实例网关与管理地址。 s3560(config)#int vlan 1 s3560(config-if)#ip add 192.168.1.2 255.255.255.0 s3560(config-if)#ip default-g 192.168.1.1 s3560(config)#ip name-ser 192.168.1.254 s3560(config)#no ip http ser s3560(config)#end 恢复交换机 2900/3500xl 2950 3550 交换机密码 1 连接到交换机,并拔出电源 2 按住 mode,然后接上电源,在 led 灯亮二秒后放开 mode 灯。 3 在提示命令下键入命令 flash_init
4 键入命令 load-helper 5 dir flash:列示清单 6 用命令先保存配置 rename flash:config.text flash:config.old 将文件名改为 config.text 7 命令 boot 引导过程 8 对 setup 模式按 n 9 按 enter 进到用户模式,使用 enable 进入到特权模式 10 用命令 copy flash:config.text system:running-config 把配置文件复制 到内存中 11 用 config ter 进到配置模式 12 设置密码重启。 实例 s3560## Base ethernet MAC Address: 00:1e:4a:0a:20:00 Xmodem file system is available. The password-recovery mechanism is enabled. The system has been interrupted prior to initializing the flash filesystem. The following commands will initialize the flash filesystem, and finish loading the operating system software: flash_init load_helper boot s3560: s3560: flash_init Initializing Flash... s3560: flash_init Initializing Flash... flashfs[0]: 6 files, 1 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 32514048 flashfs[0]: Bytes used: 16745984 flashfs[0]: Bytes available: 15768064 flashfs[0]: flashfs fsck took 13 seconds. ...done Initializing Flash. Boot Sector Filesystem (bs) installed, fsid: 3 Setting console baud rate to 9600...
s3560: load_helper s3560: boot Loading "flash:c3560-advipservicesk9-mz.122-40.SE.bin"...@@@ 删除所有的配置文件 s3560#sh flash: Directory of flash:/ 2 -rwx 9860621 Mar 1 1993 00:18:13 +00:00 c3560-advipservicesk9- mz.122-40.SE.bin 3 -rwx 6875865 Mar 1 1993 00:20:43 +00:00 c3560-ipbase-mz.122- 35.SE5.bin 4 -rwx 6 -rwx 7 -rwx 8 -rwx 24 Mar 1 1993 00:11:01 +00:00 private-config.text 1048 Mar 1 1993 00:11:01 +00:00 multiple-fs 616 Mar 1 1993 00:10:30 +00:00 vlan.dat 1422 Mar 1 1993 00:11:01 +00:00 config.text 32514048 bytes total (15771136 bytes free) s3560#del config.text Delete filename [config.text]? config.text Delete flash:config.text? [confirm] s3560#del vlan.dat Delete filename [vlan.dat]? vlan.dat Delete flash:vlan.dat? [confirm] s3560#rel Proceed with reload? [confirm] 查看硬件结构 s3560##sh hardware 访问模块 s3560###session slot s3560##session mod 模块断电 s3560#(config)#no power enable module slot 模块加电 s3560#(config)#power enable module slot 查看系统文件
s3560##sh file systems 查看 mac 地址 s3560#sh lacp sys-id 32768, 001e.4a0a.2000 显示 acl 的设置 ra#sh mac access-group 查看当前路径 s3560#pwd flash: 查看 flash 信息 s3560#show file information flash:? flash:c3560-advipservicesk9-mz.122-40.SE.bin flash:c3560-ipbase-mz.122-35.SE5.bin flash:multiple-fs flash:config.text flash:private- config.text flash:y 将配置文件考贝到引导文件 s3560#copy run startup-config Destination filename [startup-config]? Building configuration... [OK] 从另外一个 ios 启动 s3560#sh flash Directory of flash:/ 2 -rwx 9860621 Mar 1 1993 00:18:13 +00:00 c3560- advipservicesk9-mz.122-40.SE.bin 3 -rwx 6875865 Mar 1 1993 00:20:43 +00:00 c3560-ipbase- mz.122-35.SE5.bin 4 -rwx 5 -rwx 1313 Mar 1 1993 00:25:51 +00:00 config.text 24 Mar 1 1993 00:25:51 +00:00 private- config.text 6 -rwx 3167 Mar 1 1993 00:00:52 +00:00 y
分享到:
收藏