📄 第一章 系统基本命令.htm
字号:
<LI><FONT color=#333300>Dialer</FONT>
<LI><FONT color=#333300>Virtual-template</FONT> </LI></UL>
<P><FONT
color=#333300>其中,Ethernet、Serial和Bri属于物理接口,而Dialer、Virtual-template为逻辑接口;串口又包括异步串口、同异步串口、CE1/PRI通道接口(channel-group和pri-group)等,部分物理接口又支持子接口。</FONT></P>
<P><FONT
color=#333300>(2)接口编号<I>interface-number</I></FONT></P>
<P><FONT color=#333300>上述五类接口分别编号,每类接口的编号从0开始:</FONT>
<UL type=disc>
<LI><FONT
color=#333300>在不同型号的路由器上,物理接口都有各自的编号,对于channel-group类CE1/PRI通道接口,其编号为e1-interface-number
: channel-group-number;</FONT>
<LI><FONT
color=#333300>对于pri-group类CE1/PRI通道接口,其编号为e1-interface-number
: 15;</FONT>
<LI><FONT
color=#333300>对于其它逻辑接口如Dialer或Virtual-template,根据其创建先后顺序编号;</FONT>
<LI><FONT color=#333300>对于子接口,其编号为physical-interface-number
. sub-interface-number。</FONT> </LI></UL>
<P><FONT color=#333300>(3)接口名<I>interface-name</I></FONT></P>
<P><FONT
color=#333300>在了解接口编号规则之后,即可知道接口的命名,接口名为接口类型+接口编号。如Ethernet0表示编号为0的以太网口,Serial0.1表示接口Serial0的第1个子接口,Serial3:2表示编号为3的CE1/PRI接口的第2个channel-group。</FONT></P>
<P><FONT
color=#333300>为了方便用户输入,接口名中接口类型可以简写(只取前几个字母,与其它接口类型不冲突即可),如Ethernet0可以简写为e0,Serial0.1可以简写为s0.1。</FONT></P>
<P><FONT color=#333300>(4)<B>no</B></FONT></P>
<P><FONT color=#333300><B>no
interface</B>命令可以删除部分用户定义的逻辑接口(如Dialer、Virtual-template等)和子接口。</FONT></P>
<P><FONT color=#333300 size=3>【命令模式】</FONT></P>
<P><FONT
color=#333300>全局配置模式、路由协议配置模式、接口配置模式、逻辑通道配置模式、虚拟接口配置模式和VPDN组配置模式等。</FONT></P>
<P><FONT color=#333300 size=3>【使用指南】</FONT></P>
<P><FONT
color=#333300>执行<B>interface</B>命令不仅可以进入物理接口的配置模式,也可以根据用户需要创建逻辑接口。在与接口配置模式同一级别的全部配置模式下都可以执行<B>interface</B>命令而切换到相应的接口配置模式。</FONT></P>
<P><FONT color=#333300 size=3>【举例】</FONT></P>
<P><FONT color=#333300>例1:从全局配置模式进入到以太网口配置模式。</FONT></P>
<P><FONT color=#333300>Quidway(config)#interface ethernet
0</FONT></P>
<P><FONT
color=#333300>Quidway(config-if-Ethernet0)#</FONT></P>
<P><FONT
color=#333300>从接口Ethernet0配置模式切换到子接口Serial0.1配置模式。</FONT></P>
<P><FONT color=#333300>Quidway(config-if-Ethernet0)#interface
serial0.1</FONT></P>
<P><FONT
color=#333300>Quidway(config-if-Serial0.1)#</FONT></P>
<P><FONT color=#333300 size=3>【相关命令】</FONT></P>
<P><FONT color=#333300><B>exit</B></FONT></P>
<H4><FONT color=#333300><A
name="1.1.8 language"><BIG>1.1.8
language</BIG></A></FONT></H4>
<P><FONT
color=#333300>用户使用<B>language</B>命令可以切换命令行接口的语言模式。</FONT></P>
<P><FONT color=#333300><B>language</B></FONT></P>
<P><FONT color=#333300 size=3>【缺省情况】</FONT></P>
<P><FONT color=#333300>缺省为英文模式</FONT></P>
<P><FONT color=#333300 size=3>【命令模式】</FONT></P>
<P><FONT color=#333300>特权用户模式</FONT></P>
<P><FONT color=#333300 size=3>【使用指南】</FONT></P>
<P><FONT color=#333300>为了方便国内广大用户,Quidway<SUP>(R)</SUP>
系列路由器的命令行接口除支持英文模式外还支持中文模式。</FONT></P>
<P><FONT color=#333300 size=3>【举例】</FONT></P>
<P><FONT color=#333300>将英文模式切换为中文模式。</FONT></P>
<P><FONT color=#333300>Quidway(config)#language</FONT></P>
<P><FONT color=#333300>Current Language : ENGLISH</FONT></P>
<P><FONT color=#333300>Will You switch language mode
?(Y/N)y</FONT></P>
<P><FONT color=#333300>You have changed the language mode
.</FONT></P>
<H4><FONT color=#333300><A
name="1.1.9 logic-channel"><BIG>1.1.9
logic-channel</BIG></A></FONT></H4>
<P><FONT
color=#333300>用户使用<B>logic-channel</B>命令进入相关的逻辑通道配置模式。</FONT></P>
<P><FONT color=#333300><B>logic-channel</B>
<I>logic-channel-number</I></FONT></P>
<P><FONT color=#333300 size=3>【参数说明】</FONT></P>
<P><FONT
color=#333300><I>logic-channel-number</I>为逻辑通道编号,范围1~255。</FONT></P>
<P><FONT color=#333300 size=3>【命令模式】</FONT></P>
<P><FONT
color=#333300>全局配置模式、路由协议配置模式、接口配置模式、逻辑通道配置模式、虚拟接口配置模式和VPDN组配置模式等</FONT></P>
<P><FONT color=#333300 size=3>【使用指南】</FONT></P>
<P><FONT color=#333300>逻辑通道主要用于备份中心,Quidway<SUP>(R)</SUP>
系列路由器的备份中心中的逻辑通道包括X.25、帧中继的虚电路,甚至包括拨号口的一条Dialer
Map。逻辑通道既可以作为备份中心的主接口,也可作为备份接口使用。</FONT></P>
<P><FONT color=#333300 size=3>【举例】</FONT></P>
<P><FONT color=#333300>进入逻辑接口0配置模式。</FONT></P>
<P><FONT color=#333300>Quidway(config)#logic-channel
0</FONT></P>
<P><FONT
color=#333300>Quidway(config-logic-channel0)#</FONT></P>
<P><FONT color=#333300 size=3>【相关命令】</FONT></P>
<P><FONT color=#333300><B>exit</B>,<B>dialer</B>
<B>map</B>,<B>x25 map</B>,<B>frame-relay map</B></FONT></P>
<H4><FONT color=#333300><A
name="1.1.10 router"><BIG>1.1.10
router</BIG></A></FONT></H4>
<P><FONT
color=#333300>用户使用<B>router</B>命令进入相应的路由协议配置模式。</FONT></P>
<P><FONT color=#333300><B>router</B> <B>ospf</B> [
<B>enable</B> ]</FONT></P>
<P><FONT color=#333300><B>no router ospf enable</B></FONT></P>
<P><FONT color=#333300>[ <B>no</B> ] <B>router
rip</B></FONT></P>
<P><FONT color=#333300>[ <B>no</B> ] <B>router
igrp</B></FONT></P>
<P><FONT color=#333300><B>router bgp</B>
<I>as-number</I></FONT></P>
<P><FONT color=#333300><B>no router bgp</B></FONT></P>
<P><FONT color=#333300 size=3>【参数说明】</FONT></P>
<P><FONT color=#333300>执行 <B>router</B> <B>ospf</B>
命令只进入OSPF协议配置模式,而执行<B>router</B> <B>ospf</B> <B>enable</B>
命令则在激活OSPF运行的同时,进入OSPF协议配置模式。</FONT></P>
<P><FONT color=#333300><B>no</B> 表示停止该路由协议的运行。</FONT></P>
<P><FONT color=#333300><I>as-number</I>
表示自治区域号,范围0~65535。</FONT></P>
<P><FONT color=#333300 size=3>【缺省情况】</FONT></P>
<P><FONT color=#333300>缺省为不运行任何动态路由协议。</FONT></P>
<P><FONT color=#333300 size=3>【命令模式】</FONT></P>
<P><FONT
color=#333300>全局配置模式、路由协议配置模式、接口配置模式、逻辑通道配置模式、虚拟接口配置模式和VPDN组配置模式等</FONT></P>
<P><FONT color=#333300 size=3>【使用指南】</FONT></P>
<P><FONT
color=#333300>在多个动态路由协议同时运行的情况下,请注意系统的路由管理策略。</FONT></P>
<P><FONT color=#333300 size=3>【举例】</FONT></P>
<P><FONT color=#333300>在全局配置模式下进入OSPF协议配置模式。</FONT></P>
<P><FONT color=#333300>Quidway(config)#router ospf</FONT></P>
<P><FONT color=#333300>Quidway(config-router-ospf)#</FONT></P>
<P><FONT color=#333300 size=3>【相关命令】</FONT></P>
<P><FONT color=#333300><B>exit</B></FONT></P>
<H4><FONT color=#333300><A
name="1.1.11 show history"><BIG>1.1.11 show
history</BIG></A></FONT></H4>
<P><FONT color=#333300>显示当前用户曾键入的历史命令。</FONT></P>
<P><FONT color=#333300><B>show</B> <B>history</B></FONT></P>
<P><FONT color=#333300 size=3>【命令模式】</FONT></P>
<P><FONT color=#333300>普通用户模式、特权用户模式</FONT></P>
<P><FONT color=#333300 size=3>【使用指南】</FONT></P>
<P><FONT color=#333300>Quidway<SUP>(R)</SUP>
系列路由器最多保存10条用户键入的历史命令,用户在输入命令时可以用上下光标键来访问历史命令。</FONT></P>
<P><FONT color=#333300 size=3>【举例】</FONT></P>
<P><FONT color=#333300>显示当前用户历史的历史命令。</FONT></P>
<P><FONT color=#333300>Quidway#show history</FONT></P>
<P><FONT color=#333300>enable</FONT></P>
<P><FONT color=#333300>configure</FONT></P>
<P><FONT color=#333300>interface serial 0</FONT></P>
<P><FONT color=#333300>ip address 129.102.0.1
255.255.0.0</FONT></P>
<P><FONT color=#333300>exit</FONT></P>
<P><FONT color=#333300>exit</FONT></P>
<H4><FONT color=#333300><A
name="1.1.12 vpdn-group"><BIG>1.1.12
vpdn-group</BIG></A></FONT></H4>
<P><FONT color=#333300>创建并进入VPDN组配置模式。</FONT></P>
<P><FONT color=#333300>[<B> no </B>]<B> vpdn-group</B>
<I>group-number</I></FONT></P>
<P><FONT color=#333300 size=3>【参数说明】</FONT></P>
<P><FONT
color=#333300><I>group-number</I>为VPDN组编号,范围1~3000。</FONT></P>
<P><FONT color=#333300><B>no</B> 表示删除相应的VPDN组。</FONT></P>
<P><FONT color=#333300 size=3>【缺省情况】</FONT></P>
<P><FONT color=#333300>系统缺省不创建任何VPDN组。</FONT></P>
<P><FONT color=#333300 size=3>【命令模式】</FONT></P>
<P><FONT
color=#333300>全局配置模式、路由协议配置模式、接口配置模式、逻辑通道配置模式、虚拟接口配置模式和VPDN组配置模式等</FONT></P>
<P><FONT color=#333300 size=3>【使用指南】</FONT></P>
<P><FONT
color=#333300>VPDN组用于VPN和L2TP配置,在该模式中可以配置L2TP协议的Tunnel工作参数。</FONT></P>
<P><FONT color=#333300 size=3>【举例】</FONT></P>
<P><FONT color=#333300>创建并进入VPDN组1的配置模式。</FONT></P>
<P><FONT color=#333300>Quidway(config)#vpdn-group 1</FONT></P>
<P><FONT color=#333300>Quidway(config-vpdn-group1)#</FONT></P>
<P><FONT color=#333300 size=3>【相关命令】</FONT></P>
<P><FONT color=#333300><B>exit</B></FONT></P>
<H3><FONT color=#333300>1.2 配置文件管理命令</FONT></H3>
<P><FONT color=#333300>配置文件管理命令包括:</FONT>
<UL type=disc>
<LI><FONT color=#333300>download config</FONT>
<LI><FONT color=#333300>erase</FONT>
<LI><FONT color=#333300>show running-config</FONT>
<LI><FONT color=#333300>show startup-config</FONT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -