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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

cisco路由交换命令配置详解.docx

1、cisco路由交换命令配置详解路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动 路由器口令设置:routerenable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)

2、#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xxrouter(config)#(Ctrl+z) ; 返回特权模式router#exit ;返回命令 路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdow

3、n ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address ;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address ;设置子接口IProuter(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议router(config)#config-register 0x2142

4、;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导 路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Br

5、eak ;进入ROM监控状态rommonconfreg 0x2142 ;跳过配置文件rommonconfreg 0x2102 ;恢复配置文件rommonreset ;重新引导rommoncopy xmodem: flash: ;从console传输文件rommonIP_ADDRESS=10.65.1.2 ;设置路由器IPrommonIP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommonTFTP_SERVER=10.65.1.1 ;指定TFTP服务器IPrommonTFTP_FILE=c2600.bin ;指定下载的文件rommontftpdnld ;从tftp下载r

6、ommondir flash: ;查看闪存内容rommonboot ;引导IOS 静态路由:ip route ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例 动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。router(config-router)#network ;设置发布路由router(config-r

7、outer)#negihbor ;点对点帧中继用。帧中继命令:router(config)#frame-relay switching ;使能帧中继交换router(config-s0)#encapsulation frame-relay ;使能帧中继router(config-s0)#fram-relay lmi-type cisco ;设置管理类型router(config-s0)#frame-relay intf-type DCE ;设置为DCErouter(config-s0)#frame-relay dlci 16 ;router(config-s0)#frame-relay loc

8、al-dlci 20 ;设置虚电路号router(config-s0)#frame-relay interface-dlci 16 ;router(config)#log-adjacency-changes ;记录邻接变化router(config)#int s0/0.1 point-to-point ;设置子接口点对点router#show frame pvc ;显示永久虚电路router#show frame map ;显示映射 基本访问控制列表:router(config)#access-list permit|deny router(config)#interface ;default

9、:deny anyrouter(config-if)#ip access-group in|out ;default:out例1:router(config)#access-list 4 permit 10.8.1.1router(config)#access-list 4 deny 10.8.1.0 0.0.0.255router(config)#access-list 4 permit 10.8.0.0 0.0.255.255router(config)#access-list 4 deny 10.0.0.0 0.255.255.255router(config)#access-list

10、4 permit anyrouter(config)#int f0/0router(config-if)#ip access-group 4 in 扩展访问控制列表: access-list permit|deny icmp typeaccess-list permit|deny tcp port例3:router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter(config)#access-list 101 permit ip any anyrouter(config)#int s0/0router(con

11、fig-if)#ip access-group 101 in例3:router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80router(config)#access-list 102 permit ip any anyrouter(config)#interface s0/1router(config-if)#ip access-group 102 out 删除访问控制例表:router(config)#no access-list 102router(config-if)#no ip access-group 10

12、1 in路由器的nat配置Router(config-if)#ip nat inside ;当前接口指定为内部接口Router(config-if)#ip nat outside ;当前接口指定为外部接口Router(config)#ip nat inside source static p portRouter(config)#ip nat inside source static 10.65.1.2 60.1.1.1Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80Router(config)#ip

13、 nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0Router(config)#ip nat inside source list 1 pool p1Router(config)#ip nat inside destination list 2 pool p2Router(config)#ip nat inside source list 2 interface s0/0 overloadRouter(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotaryRouter#sh

14、ow ip nat translationrotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。overload参数用于PAT 将内部IP映射到一个公网IP不同的端口上。 外部网关协议配置:routerA(config)#router bgp 100routerA(config-router)#network 19.0.0.0routerA(config-router)#neighbor 8.1.1.2 remote-as 200 配置PPP验证:RouterA(config)#username password RouterA(config)#int s0RouterA(

15、config-if)#ppp authentication chap|pap 3PIX防火墙命令Pix525(config)#nameif ethernet0 outside security0 ;命名接口和级别Pix525(config)#interface ethernet0 auto ;设置接口方式Pix525(config)#interface ethernet1 100full ;设置接口方式Pix525(config)#interface ethernet1 100full shutdownPix525(config)#ip address inside 192.168.0.1 2

16、55.255.255.0Pix525(config)#ip address outside 133.0.0.1 255.255.255.252Pix525(config)#global (if_name) natid ip-ip ;定义公网IP区间Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句Pix525(config)#global (outside) 1 133.0.0.1 ;例句Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉设置Pix525(config)#nat (if_

17、name) nat_id local_ip netmarkPix525(config)#nat (inside) 1 0 0内网所有主机(0代表0.0.0.0)可以访问global 1指定的外网。Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0内网172.16.5.0/16网段的主机可以访问global 1指定的外网。Pix525(config)#route if_name 0 0 gateway_ip metric ;命令格式Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句Pix525(c

18、onfig)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8表示内部ip地址192.168.0.8,访问外部时被翻译成133.0.0.1全局地址。Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8中间区域ip地址172.16.0.8,访问外部时被翻译成133.0.0.1全局地址。CISCO交换机配置讲解交换机工作在OSI 模型的第二层(数据链路层)作用:可以将原

19、有的网络划分成多个段,能够扩展网络的传输距离并支持更多的网络节点。划分网络段有效隔离广播,减少冲突。交换机的每个端口是独立的冲突域中,所有的端口都是在同一个广播域中关于交换机的一点配置笔记(cisco) CISCO交换机配置讲解交换机工作在OSI 模型的第二层(数据链路层)作用:可以将原有的网络划分成多个段,能够扩展网络的传输距离并支持更多的网络节点。划分网络段有效隔离广播,减少冲突。交换机的每个端口是独立的冲突域中,所有的端口都是在同一个广播域中关于交换机的一点配置笔记(cisco)交换机基本状态: switch: ;ROM状态, 路由器是rommonhostname ;用户模式hostna

20、me# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态 交换机口令设置: switchenable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#l

21、ine vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令 交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch

22、(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode clien

23、t ;设置发vtp模式 交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address ;设置IP地址switch(config)#ip default-gateway ;设置默认网关switch#dir flash: ;查看闪存 交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息

24、switch#show int f0/0 ;查看指定端口信息 交换机的功能地址学习:最开始交换机的MAC表是空的,它是通过学习源地址来得到每个连接端口连接的设备的MAC地址。当它收到一个帧时,它学习到这个帧的源 MAC 地址,并保存到MAC表中,然后查看MAC表,如果MAC表中没有目的MAC时,它就洪泛(洪泛就是向每个端口发送这个帧)如果 有就发到对应的端口。转发过滤:收到一个帧时,会查看MAC地址表,决定把帧转发到那个端口。消除循环:当网络中有冗余回路时,会用生成树阻止冗作路径中传输相同帧。进入交换机时有如下三种选择键入M 进入菜单模式键入K进入命令行模式键入I进入IP配置模式我们要进入的是

25、命令行。其于IOS的交换机:有三种模式,“”用户模式,“#”特权模式,“(CONFIG)#”全局模式。在用户模式输入enable进入特权模式,在特权模式下输入disable回到用户模式。在特权模式下输入configure terminal进入全局模式。在特权模式下输入DISABLE回到特权模式下show version 查看系统硬件的配置,软件版本号等。Show running-config 查看当前正在运行的配置信息show interfaces Ethernet 0/1 查看E0/1口的信息show ip 查看交换机的IP地址设置交换机名:hostname交换机名如:hostname sw

26、itch1设置交换机的IP地址:ip address ip address netmask 如ip address 172.16.0.1 255.255.0.0设置交换机的缺省网关:ip default-gatway ip address 如:ip default-gatway 172.16.0.1设置密码enable password level 1-15 passwork1-15 表示级别,1表示设置登录时的密码,15设置进入全局模式的密码。如:设置登录是的密码为123456 ,进入全局的密码是1234567enable password level 1 123456enable pass

27、word level 15 1234567破解交换机密码:启动交换机时,长按MODE键。Show interface 查看所有端口的配置信息Show interface e0/1 查看e0/1端口的配置信息。设置端口全双工/半双工interface e0/1进入e0/1端口duplex auto(自动),full(全双工),half(半双工) 设置端口是全双工/半双工生成树当网络中有回路时会发生:广播风暴,多帧复制(多次收到相同帧),MAC地址不稳定。可以使用生成树来消除回路。生成树协议:STP(spanning tree protocol)目的是维持一个无回路的网络,如果设备在拓扑中发现了一

28、个回路它将阴塞一个或多个冗余的端口,生成树的工作原理:三个规则一:首先选择一个根桥,且每个网络只能有一个根桥,根桥上的每个端口都是指定端口,根桥的选择方法,先比较交换机的优先级(priority),优先级低的做根桥,如果优先级一样,就比较交换机的MAC地址,MAC地址小的做根桥,改变交换机的优先级命令:spantree-template 1-4 priority 0-655351-4 表示模式板,0-65535 表示优先级。二:选择根端口,每一个回路只有一个根端口,根端口是在非根桥上的,根端口是到达极桥的路径代价最低的(cost值),根端口的选择方法:比较端口对根桥来说路径代价(cost值)最

29、低的那个做根端口,如果路径代价(cost值)一样就比较端口的MAC地址,MAC小的做根端口。改变COST值命令:先进入端口,spantree cost 1-653351-65535表示COST 值。三:指定端口,根桥上的端口都是指定端口,非指定端口是处于被阻塞状态的,生成树的交换机与其它交换机通过网桥协议数据单元(BPDU)的数据包定期交换信息。生成树的端口状态:阻塞(blocking)-监听(listening)-学习(learning)-转发(forwarding)交换机帧的转发方法:有三种直连转发:一收到帧的目的地址就转发这个帧存储转发:等整个帧接收完然后进行CRC校验,如果没错才转发帧

30、,否则丢弃。混合转发:收到帧的前64个字节后才转发,由于网络中冲突通常是在每个帧的前64位发生改变帧的转发命令是: switching-mode查看当前帧的转发方式:show port system管理MAC地址表查看MAC地址表 show mac-address-table设置永久MAC地址:mac-addess-table permanent mac地址 端口号设置受限的静态MAC地址:mac-address-table restricted static MAC地址 端口1 端口2注:要到端口1只能从端口2进入。配置端口安全性:port secure max-mac-count 1-13

31、21-132 表示可以学到几个MAC地址。注:设置端口可以学到的MAC地址的数量。Port secure 把端口安全性击活。管理配置文件把配置文件上传到TFTP服务器上copy nvram tftp:/IP地址/文件名.cfg注:配置文件的后缀名是cfg的把配置文件从TFTP中下载copy tftp:/IP地址/文件名.cfg nvramVLANVlan (virtual local area network) 即虚拟局域网,是一种通过将局域网内的设备逻辑地而不是物理地划分成一个个广播域。VLAN是为解决以太网的广播问题和安全性而提出的一种协议,它在以太网帧的基础上增加了VLAN ID,用VLAN

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

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