路由交换命令大全_第1页
路由交换命令大全_第2页
路由交换命令大全_第3页
路由交换命令大全_第4页
路由交换命令大全_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、窗体顶端开荒者BlogJava   首页   新随笔 联系   聚合   管理 随笔-20  评论-40  文章-11  trackbacks-0   交换机/路由器/防火墙支持的命令 1. 交换机支持的命令: 交换机基本状态: switch: ;ROM状态, 路由器是rommon> hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设

2、置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口令 switch(config)#enable password xxa ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switc

3、h(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令 交换机VLAN设置: switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线 switch(

4、config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(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 client ;设置发vtp模式 交换机设置IP地址: switch(config)#inte

5、rface vlan 1 ;进入vlan 1 switch(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 ;查看端口信息 switch#show int f0/0 ;查看指定端口信息 2

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

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

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

9、g)#config-register 0x2142 ;跳过配置文件 router(config)#config-register 0x2102 ;正常使用配置文件 router#reload ;重新引导 路由器文件操作: router#copy running-config startup-config ;保存配置 router#copy running-config tftp ;保存配置到tftp router#copy startup-config tftp ;开机配置存到tftp router#copy tftp flash: ;下传文件到flash router#copy tftp s

10、tartup-config;下载配置文件 ROM状态: Ctrl+Break ;进入ROM监控状态 rommon>confreg 0x2142 ;跳过配置文件 rommon>confreg 0x2102 ;恢复配置文件 rommon>reset ;重新引导 rommon>copy xmodem: flash: ;从console传输文件 rommon>IP_ADDRESS= ;设置路由器IP rommon>IP_SUBNET_MASK= ;设置路由器掩码 rommon>TFTP_SERVER=

11、;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件 rommon>tftpdnld ;从tftp下载 rommon>dir flash: ;查看闪存内容 rommon>boot ;引导IOS 静态路由: ip route ;命令格式 router(config)#ip route ;静态路由举例 router(config)#ip route ;默认路由举例 动态路由: router(config)#ip routing ;启

12、动路由转发 router(config)#router rip ;启动RIP路由协议。 router(config-router)#network ;设置发布路由 router(config-router)#negihbor ;点对点帧中继用。 帧中继命令: router(config)#frame-relay switching ;使能帧中继交换 router(config-s0)#encapsulation frame-relay ;使能帧中继 router(config-s0)#fram-relay lmi-type cisco ;设置管理类型 router(config-s0)#fra

13、me-relay intf-type DCE ;设置为DCE router(config-s0)#frame-relay dlci 16 ; router(config-s0)#frame-relay local-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 ;显示永久虚电路

14、router#show frame map ;显示映射 基本访问控制列表: router(config)#access-list permit|deny router(config)#interface ;default:deny any router(config-if)#ip access-group in|out ;default:ut 例1: router(config)#access-list 4 permit router(config)#access-list 4 deny 55 router(config)#access-lis

15、t 4 permit 55 router(config)#access-list 4 deny 55 router(config)#access-list 4 permit any router(config)#int f0/0 router(config-if)#ip access-group 4 in 扩展访问控制列表: access-list permit|deny icmp wild>type access-list permit|deny tcp wild>port 例3: router(conf

16、ig)#access-list 101 deny icmp any echo router(config)#access-list 101 permit ip any anyrouter(config)#int s0/0 router(config-if)#ip access-group 101 in 例3: router(config)#access-list 102 deny tcp any eq 80 router(config)#access-list 102 permit ip any any router(co

17、nfig)#interface s0/1 router(config-if)#ip access-group 102 out 协议 路由协议 路由器配置 交换机配置 加密 上一页 1 2 QQ 推出Windows2003教程 win2003安装介绍 win2003网络优化 win2003使用技巧 win2003系统故障 服务器配置 专家答疑 帧中继命令: router(config)#frame-relay switching ;使能帧中继交换router(config-s0)#encapsulation frame-relay ;使能帧中继router(config-s0)#fram-rel

18、ay lmi-type cisco ;设置管理类型router(config-s0)#frame-relay intf-type DCE ;设置为DCErouter(config-s0)#frame-relay dlci 16 ;router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号router(config-s0)#frame-relay interface-dlci 16 ;router(config)#log-adjacency-changes ;记录邻接变化router(config)#int s0/0.1 point-to-point

19、;设置子接口点对点router#show frame pvc ;显示永久虚电路router#show frame map ;显示映射 基本访问控制列表: router(config)#access-list permit|deny router(config)#interface ;default:deny anyrouter(config-if)#ip access-group in|out ;default:ut 例1: router(config)#access-list 4 permit router(config)#access-list 4 deny 10.8.1

20、.0 55 router(config)#access-list 4 permit 55 router(config)#access-list 4 deny 55 router(config)#access-list 4 permit any router(config)#int f0/0 router(config-if)#ip access-group 4 in 扩展访问控制列表: access-list permit|deny icmp wild>typeaccess-list permit|

21、deny tcp wild>port例3:router(config)#access-list 101 deny icmp any echorouter(config)#access-list 101 permit ip any anyrouter(config)#int s0/0router(config-if)#ip access-group 101 in例3:router(config)#access-list 102 deny tcp any eq 80router(config)#access-list 1

22、02 permit ip any anyrouter(config)#interface s0/1router(config-if)#ip access-group 102 out 删除访问控制例表: router(config)#no access-list 102 router(config-if)#no ip access-group 101 in 路由器的nat配置 Router(config-if)#ip nat inside ;当前接口指定为内部接口 Router(config-if)#ip nat outside ;当前接口指定为外部接口 Router(config)#ip na

23、t inside source static p <私有IP><公网IP> port Router(config)#ip nat inside source static Router(config)#ip nat inside source static tcp 80 80 Router(config)#ip nat pool p1 0 Router(config)#ip nat inside source list 1 pool

24、p1 Router(config)#ip nat inside destination list 2 pool p2 Router(config)#ip nat inside source list 2 interface s0/0 overload Router(config)#ip nat pool p2 type rotary Router#show ip nat translationrotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。overload参数用于PAT 将内部IP映射到一个公网IP不

25、同的端口上。 外部网关协议配置: routerA(config)#router bgp 100 routerA(config-router)#network routerA(config-router)#neighbor remote-as 200 配置PPP验证: RouterA(config)#username password RouterA(config)#int s0 RouterA(config-if)#ppp authentication chap|pap 3PIX防火墙命令 Pix525(config)#nameif ethernet0 out

26、side security0 ;命名接口和级别 Pix525(config)#interface ethernet0 auto ;设置接口方式 Pix525(config)#interface ethernet1 100full ;设置接口方式 Pix525(config)#interface ethernet1 100full shutdown Pix525(config)#ip address inside Pix525(config)#ip address outside 52 Pix525

27、(config)#global (if_name) natid ip-ip ;定义公网IP区间 Pix525(config)#global (outside) 1 -5 ;例句 Pix525(config)#global (outside) 1 ;例句 Pix525(config)#no global (outside) 1 ;去掉设置 Pix525(config)#nat (if_name) nat_id local_ip netmark Pix525(config)#nat (inside) 1 0 0内网所有主机(0代表

28、)可以访问global 1指定的外网。 Pix525(config)#nat (inside) 1 内网/16网段的主机可以访问global 1指定的外网。 Pix525(config)#route if_name 0 0 gateway_ip metric ;命令格式 Pix525(config)#route outside 0 0 1 ;例句 Pix525(config)#route inside 1 ;例句 Pix525(confi

29、g)#static (inside, outside) 表示内部ip地址,访问外部时被翻译成全局地址。 Pix525(config)#static (dmz, outside) 中间区域ip地址,访问外部时被翻译成全局地址。 posted 2008-06-28 18:30 wahaha 阅读(95) | 评论 (0) | 编辑 收藏Cisco 中符号标志      &

30、#160;    !-字符代表交换机收到一个回应应答;          .   -请求超时;          U -目的地不能达到;          ?-不可知的数据包类型;      

31、0;   & -数据包超出生存时间;          C -接收的数据包经历了拥塞;          I  -用户中断测试;posted 2008-05-30 09:29 wahaha 阅读(100) | 评论 (0) | 编辑 收藏Cisco 交换机操作初步学习  在接触交换机伊始,我是从了解交换机的命令开始的。&

32、#160;   1. Cisco Catalyst    所有交换机都是用以下参数建立到控制台的连接。                                      2

33、. 用户模式与特权模式的切换。           用户模式-提供了对命令的监控(show)的有限访问,不允许执行任何配置命令。           特权模式(启用模式)-提供所有配置、管理和监控的完全访问。               switch

34、>enable   3. 验证系统配置                show version 显示硬件和软件版本及其他信息/show module 显示基于底板的硬件模块信息。   4. 配置系统标识       Cisic IOS        配置工作在配置

35、模式中进行enable->配置模式又必须进入特权模式privileged mode->特权模式下的基本配置模式被称为全局配置模式(global configuration mode)->全局模式必须在特权模式中使用configure terminal命令进入。        完成以上操作后,交换机显示提示为:switch(config)#         配置主机名:hostname &#

36、160;Switch-A           注意:将运行配置文件保存到启动配置文件中:copy  running-config startup-config                   显示内存中保存的当前配置命令:show running-config   

37、  查看启动配置文件: show startup-config                        CatOS         在CatOS中,所有配置都在特权访问模式中完成。几乎所有配置命令都从关键字set开始,用clear来重置一些配置

38、参数。         配置主机名:set system name  Switch-B                注意:不用保存,可以用show config命令来验证配置              

39、60;               posted 2008-05-30 09:21 wahaha 阅读(74) | 评论 (0) | 编辑 收藏HTML语言基础篇 元素的开始 /元素的结束/ 元素的功能 <!-注释的内容> <!> 注释标记 <A> </A> 锚元素,定义超文本连接点 <ADDRESS> </ADDRESS> 地址信息起止点 <B> &l

40、t;/B> 字体颜色加深 <BASE> 基本属性,如基本连接,打开方式等 <BLINK> </BLINK> 字体闪烁 <BLOCKQUOTE> </BLOCKQUOTE> 块引用 <BODY> </BODY> 超文本的正文主体的起止 <BR> 回车换行 <CAPTION> </CAPTION> 标题,多用与表格 <CENTER> </CENTER> 元素间的内容居中 <CITE> </CITE> 表明其间的内容是引文或者列

41、证 <CODE> </CODE> 代码 <DD> 文字缩格 <DL> 线缩格 <DT> 回车换行,但不缩格 <EM> </EM> 强调,斜体且颜色加重 <FONT> </FONT> 变化字体大小和颜色 <form> </form> 交互项元素的起止 <Frame> </Frame> 展示页的版面的分割 <HEAD> </HEAD> 超文本件头的起止 <HEADER> <HEADER> 与<

42、;head>和</head>等价 <HR> 面水平线的隔线 <Hn> </Hn> 定义标题字体大小,n值为1-6 <HTML> </HTML> 超文本的开始和结束 <I> </I> 字体为斜体 <IMG> (</IMG>) 插入图形图象文件 <INPUT> 输入信息元素 <LI> 清单条目,多用语目录列表 <LIST> </LIST> 显示文本内容,但不执行标记命令 <MARQUEE> </MARQUEE

43、> 字符移动方式控制 <META> 资料说明 <NEXTD> 下一个标识 <OL> </OL> 用序号显示一级标题 <P> </P> 段落的起止,也可以加空行 <PRE> </PER> 按原文格式 <S> </S> 中化线 <SMALL> </SMALL> 用小号字显示 <STRONG> </STRONG> 字体颜色加重 <SUB> </SUB> 下角标 <SUP> </SUP&g

44、t; 上角标 <TABLE> </TABLE> 表格的起止,图文混排时也使用 <TD> </TD> 表格中一栏内容的起止 <TEXTAREA> </TEXTAREA> 用文本区输入信息 <TH> </TH> 表头的起止 <TITLE> </TITLE> 超文本标题起止 <TR> </TR> 表中一行的起止 <TT> </TT> 固定宽度 <U> </U> 下划线 <UL> </UL>

45、; 同一级标题的限定,无序号 <VAR> </VAR> 变量 <XMP> </XMP> 功能<LIST>字体略小 posted 2007-11-26 11:09 wahaha 阅读(56) | 评论 (0) | 编辑 收藏SQL 语言操作记录 在实现电话号码查询功能的程序中,为了改变xxx表一列中的某些值,我如是实现:                

46、0;   idusernamepassword001name1没有002name2是003name3没有                   update xxx set password='无' where password='没有' posted 2007-11-20 23:49 wahaha 阅读(131) | 评论 (0) | 编辑

47、60;收藏Oracle 10g ORA-12154: TNS: could not resolve the connect identifier specified 问题解决!     今天,从上周就捆饶我的问题终于在下班前被我搞定!小得意了一下.    我的电脑上之前安装了Oracle 10g database,配置完变量用PL/SQL操作一切OK .当又安装完Oracle 10g client后,问题出现了,用PL/SQL登陆时反复提示:ORA-12154: TNS: could not resolve the

48、 connect identifier specified    对于初学者,我反复的在"Oracle - OraDb10g_home3"下的"配置和移植工具"中的"Net Manager"中查找问题所在.请教高手,也没有召见问题的原因.我郁闷了,随后自己决定来搞定这个问题.    我做了大量的反复的资料查看和自我检查,灵感在下班的时候出现,我突然意识到我的"环境变量"一直被忽视.打开后我发现我当前的环境变量这样设置的:path  = 

49、 E:oraclient_2;E:oracleoradatabin;E:oraclebin;E:Program FilesJavajdk1.5.0_04bin;E:Tomcat5028bin;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem问题出现了.随后我该成如下:path  =  E:oracle;E:oracleoradatabin;E:oraclebin;E:Program FilesJavajdk1.5.0_04bin;E:Tomcat5028bin;%SystemRoot%system32;%S

50、ystemRoot%;%SystemRoot%System32WbemOK ! 问题在最后的关头被我解决了!不错.这就是: "不抛弃 不放弃" posted 2007-11-19 17:59 wahaha 阅读(27834) | 评论 (32) | 编辑 收藏Oracle ORA-12154: TNS: could not resolve the connect identifier specified 问题解决中,遇到的优秀帖子! 上下文:机器上安装了一个Oracle817服务器,但是都是最小安装,然后想通过这台机器的SqlPlus连接其他机器 的Or

51、acle8i服务器现象:通过Net8 Assistant可以测试通过,但是使用SqlPlus则不行,报ORA-12154的错误解决方式:检查$Oracle_Homenetworkadmintnsname.ora文件,看看配置的TNS在不在检查$Oracle_Homenetworkadminsqlnet.ora,看看NAMES.DIRECTORY_PATH这个常量的值。需要设置为:NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)然后就打开SqlPlus就Ok了原因:估计是NAMES.DIRECTORY_PATH常量是查询服务的方式。我没有修改这

52、个之前NAMES.DIRECTORY_PATH= (HOSTNAME)是这个样子的,所以可能他仅仅查询本机器的服务。加上TNSAMES 可能就是增加解析TNS的功能。NND,也许是吧 posted 2007-11-19 17:17 wahaha 阅读(5078) | 评论 (1) | 编辑 收藏Oracle 10g 数据库安装后登陆途径!       在安装完Oracle 10g后 ,有两种登陆方式进入Oracle 10g 页面,揭开它神秘的面纱。      在We

53、b浏览器中输入:                                                

54、0;        (1 )    http/localhost:5500/em                                 &#

55、160;                       (2 )    http:/Ip地址:5500/em             引出内容:       &#

56、160;                       tomcat安装完成后在浏览器中输入:                        

57、                                 (1 )    http/localhost:8080(我的修改端口后9090)       

58、                                                  (2 )&

59、#160;   http:/Ip地址:8080(我的修改端口后9090)      (备注: 创建全局数据库名:orcl                   数据库口令:orcl            

60、0;     用户名:sys   口令:orcl   连接身份: sysdba Enterprise Manager Database Control URL - (orcl) :http:/XXGS09:1158/em数据库配置文件已经安装到f:oracleproduct10.2.0,同时其他选定的安装组件也已经安装到 f:oracleproduct10.2.0db_1。iSQL*Plus URL 为:http:/XXGS09:5560/isqlplusiSQL*Plus DBA URL 为:http:

61、/XXGS09:5560/isqlplus/dba                                             创建数据库名:emp

62、用户名:sys   口令:sys   连接身份: sysdba用户名:sysman   口令:sysman   连接身份: normal                          http:/XXGS09:5500/em  

63、0;           )                   参考文章:                    &#

64、160;                  posted 2007-11-13 15:04 wahaha 阅读(1240) | 评论 (0) | 编辑 收藏今天我开始写我的博客!        今天学习Oracle 的过程中,在网上查相关资料的过程中,看了好多别人在Blog中写的资料。突然感觉自己也应该把自己的学习中的一些经历记录下来! 

65、     记录的目的有二:               首先: 我想把我出现疑问的地方给自己做出记录,帮自己以后注意这些问题。               其次:  我感觉自学东西,如果有一点点东西你走入误区,因为你初学,那将给你学习的进度带来非常大的阻力。所以我想让我的记录能帮助后来的其他人。                                希望我写的东西够出彩!      posted 2007-11-13 12

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论