当前位置:文档之家› CCNA基本命令手册

CCNA基本命令手册

CCNA基本命令手册
CCNA基本命令手册

思科认证网络工程师

CCNA (640-801)

爱科-新世界

2005年3月

一、IOS基础

1、用户EXEC模式

Router> 用户模式

Router> enable输入命令enable,此时进入特权模式

2、特权EXEC模式

Router#

Router# disable退出特权模式

Router> 返回到用户模式

3、退出设备

Router# logout退出设备

Router# exit退出设备

4、命令的简写

Router>en进入特权模式虽然设备支持简写,但我们不建

议,因为考试时模拟器不支持,而很有可能因为这

样,你会面临再一次的考试。

Router#sho

5、上下文敏感帮助

Router>? 当你在一个模式下面,你想知道可执行哪些命令,你可以通过?来帮助你

Exec commands:

show Show running system information enable Turn on privileged commands

exit Exit from the EXEC

help Description of the interactive help system disable Turn off privileged commands

disconnect Disconnect an existing network connection logout Exit from the EXEC

ping Send echo messages

………..

Router# 如果你只记得命令的第一个开头字母,而忘记了其后

面的字母,也可以通过?来进行帮助,它会告诉你

以e开头的命令有哪几个

Router#e?

erase elog exit

6、通过?实现配置的一个实例

第一步

Router#config terminal 从终端开始配置

Enter configuration commands, one per line. End with CNTL/Z.

第二步

Router(config)#interface ser? 对广域网口进行配置

Serial

第三步

Router(config)#interface serial ?查看有几个广域网口

<0-2>

第四步

Router(config)#interface serial 0进入广域网0口进行配置

第五步

Router(config-if)#?查看当前模式下的合法命令

ip Interface Internet Protocol config commands

interface Select an interface to configure encapsulation Set encapsulation type for an interface

第六步

Router(config-if)#ip adderss 192.168.0.1 ?配置IP地址

A.b.c.d IP subnet mask

第七步

Router(config-if)#ip adderss 192.168.0.1 255.255.255.0 ?配置子网掩码

7、一般错误命令的提示

%Invalid input detected at …^?表示你输入的命令有误,^符号表示出错的位置。

?%Ambiguous comm.and:“show I”表示你输入的命令不是唯一的,

这条命令有多个参数。

?%Incomplete command. 表示你输入的命令不完整。

?%Unknown command or computer name, or unenable to find

computer adderss 表示你输入的命令设备不知道。

对于不完整的命令,可以通过?来得到帮助,参数不唯一也可以在命令后加?,查看当前模式下的合法命令或参数,对于输入错误的命令,在当前模式下通过?查看是否确有此命令,或是模式错误引起的。

8、命令的输入(常用命令)

Router# show history显示曾输入的历史命令

Router#clock set 15:23:17 28 May 2005设置系统时间和日期

Router#show clock 查看系统时间

Router#show running-config显示当前模式下的配置文件

Router#show startup-config显示已经保存在非易失内存中的配置文件

Router#show interface 显示所有的接口信息

Router#show interface serial 显示串口信息

Router#show interface Ethernet显示以太网的接口信息

Router#show interface Ethernet 0/1显示以太网接口第一个插槽的第一个接中的信息

Router#copy startup-config running-config 将保存在非易失内存

(NVRAM)中的配置覆盖当前运行环境配置

Router#copy running-config startup-config将当前的配置保存在非易失内存(NVRAM)中

Router#show ip router 显示路由表的信息

Router#show ip protocol

Router#show vlan 2 显示2号虚拟局域网的信息

设置主机名

第一步

Router>enable

第二步

Router#config terminal

第三步

Router(config)#hostname Router_2514

配置虚拟终端

第一步

Router>enable从用户模式进入特权模式

第二步

Router#config terminal从终端开始配置

第三步

Router(config)#line vty 0 4配置虚拟终端

第四步

Router(config-line)#password 123设置虚拟终端密码

Router(config-line)#login必须登录输入密码,如果输入no login 就不需要输入密码,直接登录

配置控制口

第一步

Router>enable从用户模式进入特权模式

第二步

Router#config terminal从终端开始配置

第三步

Router(config)#line console 0 配置控制口

第四步

Router(config-line)#password 123设置控制口密码

第五步

Router(config-line)#login必须登录输入密码,如果输入no login 就不需要输入密码,直接登录

配置aux口

第一步

Router>enable从用户模式进入特权模式

第二步

Router#config terminal从终端开始配置

Router(config)#line aux 0配置AUX口

第四步

Router(config-line)#password 123设置虚拟终端密码

第五步

Router(config-line)#login必须登录输入密码,如果输入no login 就不需要输入密码,直接登录

IOS设备上的子配置模式

9、Router#setup 初始化配置,括号[]中包括的信息是默认的,

只敲ENTER,则使用括号中的值。如果错了,无法回

到先前的问题,而只能用ctrl-c中断这一过程。

--- System Configuration Dialog ---

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

Continue with configuration dialog? [yes/no]:

10、交换机的配置

第一步

Switch_2900> 用户模式

第二步

Switch_2900>enable进入特权模式

第三步

Switch_2900#vlan database创建VLAN数据库

第四步

Switch_2900(vlan)#vlan 2 name xq创建VLAN并且命名为xq VLAN 2 added:

Name:xq

第五步

Switch_2900(vlan)#exit

APPLY completed.

Exiting....

第六步

Switch_2900#config terminal

Enter configuration commands, one per line. End with CNTL/Z. 第七步

Switch_2900(config) #

第八步

Switch_2900 (config)#interface vlan2

第九步

Switch_2900(config-subif)#ip address 192.168.0.1 255.255.255.0对vlan配置管理性的IP地址

第十步

Switch_2900(config-subif)#no shutdown 激活端口

第十一步

Switch_2900#show vlan验证配置文件

V ALAN Name Status Ports

--------- ------------------------------------- -------------------- ------------------------------------------

1 default active Fa0/1,Fa0/2,Fa0/3Fa0/4

Fa0/5,

Fa0/6, Fa0/7, Fa0/8

Fa0/9,

Fa0/10, Fa0/11, Fa0/12

2 xq active

Switch_2900#show interface vlan 2

给VLAN封装中继协议ISL(思科专用)或802.1q(国际标准)

第一步

Switch_2900#config terminal

第二步

Switch_2900(config)#interface fastethernet 0/1进入需要配置的接口

第三步

Switch_2900(config-if)#switchport trunk encapsulation dot1q封装802.1q

将接口设置为强制全双工的模式

第一步

Switch_2900#config terminal

第二步

Switch_2900(config)#interface fastethernet 0/1

第三步

Switch_2900(config-if)#duplex full将接口设置为全双工Duplex will not be set until speed is set to non-auto value

设置VTP的三种模式服务器客户透明

第一步

Switch_2900>enable

第二步

Switch_2900#config terminal

第三步

Switch_2900(config)#vtp mode server将VTP设置为服务器模式

第一步

Switch_2900>enable

第二步

Switch_2900#config terminal

第三步

Switch_2900(config)#vtp mode client将VTP设置为客户端模式第一步

Switch_2900>enable

第二步

Switch_2900#config terminal

第三步

Switch_2900(config)#vtp mode transparent将VTP设置为透明模式

设置VTP(虚拟局域网中继协议)的域

第一步

Switch_2900>enable

第二步

Switch_2900#config terminal

第三步

Switch(config)#vtp domain xq

Changing VTP domain from NULL to xq

将MAC地址与VLAN进行绑定

第一步

Switch_2900>enable

第二步

Switch_2900#config terminal

第三步

switch_2900(config)#mac-address-table static 00e0.4cff.7225 vlan 2 MAC地址与VLAN绑定

1900系列交换机MAC地址与端口绑定全过程

第一步

switch_1900>enable

第二步

switch_1900#config terminal

第三步

switch_1900(config)#interface Ethernet0/2

第四步

switch_1900(config-if)#port secure max-mac-count 1

第五步

switch_1900(config-if)#exit

第六步

switch_1900(config)#mac-address-table restricted static 1234.25ew.2526 ethernet 0/2命令设置对于E0/2端口的静态MAC地址为1234.25ew.2526,其限制性端口为E0/2,即只有E0/2端口才可以转发以太网帧给这个MAC地址

switch_1900(config)#mac-address-table permanent 1234.4567.8899 ethernet 0/2 设置永久的MAC地址与端口绑定

1900系列交换机,给VLAN分配交换机端口

第一步

switch_1900>enable

第二步

switch_1900#config terminal

第三步

switch_1900(config)#vlan 2 name xq

第四步

switch_1900(config)#vlan-membership static 2

第五步

switch_1900(config)#interface ethernet 0/2

第六步

switch_1900(config-if)#vlan-membership static 2 将接口2配到VLAN2

第七步

switch_1900#show vlan-membership 查看VLAN成员关系Port VLAN Membership Type Port VLAN Membership Type

----------------------------- -----------------------------

1 10 Static

2 1 Static

3 1 Static

4 1 Static

5 1 Static

6 1 Static

7 1 Static

8 1 Static

9 1 Static

10 1 Static

11 1 Static

第八步

switch_1900#show vtp查看虚拟局域网中继协议

VTP version: 1

Configuration revision: 0

Maximum VLANs supported locally: 1005

Number of existing VLANs: 6

VTP domain name : xq

VTP Password :

VTP operating mode : Transparent

VTP pruning mode : Enabled

VTP traps generation : Enabled

Configuration last modified by: 0.0.0.0 at 00-00-0000 00:00:00 11、RIP的配置

第一步

Router>

第二步

Router>enable

第三步

Router#config terminal

第四步

Router(config)#router rip启用路由协议

第五步

Router(config-router)#network 10.0.0.0

Router(config-router)#network 172.16.0.0

Router(config-router)#network 192.168.1.0

12、IGRP的配置

第一步

Router>

第二步

Router>enable

第三步

Router#config terminal

第四步

Router(config)#router igrp 100启用路由协议,这里的100是自治系统号

第五步

Router(config-router)#network 10.0.0.0

Router(config-router)#network 172.16.0.0

Router(config-router)#network 192.168.1.0

13、EIGRP 配置

第一步

Router>

第二步

Router>enable

第三步

Router#config terminal

第四步

Router(config)#router eigrp 100 这里设的100为自治系统号第五步

Router(config-router)#network 10.0.0.0

Router(config-router)#network 172.16.0.0

Router(config-router)#network 192.168.1.0

14、OSPF的配置

第一步

Router>

第二步

Router>enable

第三步

Router#config terminal

第四步

Router(config)#router ospf 100 这里设的100是进程号

第五步

Router(config-router)#network 10.0.0.00.0.0.255 area 1 Router(config-router)#network 172.16.0.0 0.0.0.255 area 1 Router(config-router)#network 192.168.1.0 0.0.0.255 area 1第六步

Router#show ip protocol 对所配置的协议进行验证

第七步

Router#show ip route查看路由表,了解接口与协议的详细信息

15、HDLC的配置

第一步

Router>

第二步

Router>enable

第三步

Router#config terminal

第四步

Router(config)#interface serial 0

第五步

Router(config-if)#ip address 192.168.0.2 255.255.255.254 给接口配置地址和子网掩码

第六步

Router(config-if)#encapsulation hdlc 封装HDLC协议

第七步

Router(config-if)#no shutdown激活端口

第七步

Router#show interface serial 0验证你的配置

16、PPP 的配置

第一步

Router>

第二步

Router>enable

第三步

Router#config terminal

第四步

Router(config)#interface serial 0

第五步

Router (config-if)#ip address 192.168.0.2 255.255.255.254

第六步

Router (config-if)#encapsulation ppp 封装PPP协议

第七步

Router (config-if)#no shutdown

第八步

Router (config-if)#ppp authentication pap进行PPP的验证pap明文验证协议

第九步

Router#show interface serial 0查看你的配置

思科交换机命令大全

思科交换机命令大全集团文件发布号:(9816-UATWW-MWUB-WUNN-INNUL-DQQTY-

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询: 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr

查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal 主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号) root primary 例如: Switch(config)#spanning-tree vlan 1 root primary

Cisco设备的基本配置命令

switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)#

Cisco IOS 基本命令

Cisco IOS 基本命令一、基本路由器的检验命令 show version show processes show protocols show mem show ip route show startup-config show running-config show flash show interfaces 二、基本路由配置命令 进入:config terminal/memory/network 配置网络时常采用的命令:copy和load 1.标识:hostname 标识名 2.启动标识:banner 启动标识 3.接口:interface 端口号 4.密码:line 0 6 login passwd 口令 enable password/secret 口令 5.接口:

1)配置端口 interface 端口号 clock rate 时钟速率(64000)/* 在串口中配置*/ bandwidth 带宽(缺省56)/* 在串口中配置*/ media-type 介质类型/* 在以太网口上*/ early-token release /* 在令牌环网口上*/ ring-speed 16 /* 在令牌环网口上*/ no shutdown write memory 2)检验端口 show interfaces show controllers 6.配置环境 1)引导方式 boot system flash IOS-filename boot system tftp IOS-filename tftp-address boot system rom 2)配置Register值 config-register 0x2102 7.查看邻居路由 show cdp interface show cdp neighbors [detail]

1-cisco路由器基本配置及远程登录

实训目的: (1)学习和掌握科路由器的配置方式和要求。 (2)学习和掌握科路由器的工作模式分类、提示符、进入方式。1、路由器的配置方式 ①超级终端方式。该方式主要用于路由器的初始配置,路由器不需要IP地址。基本方法是:计算机通过COM1/COM2口和路由器的Console口连接,在计算机上启用“超级终端”程序,设置“波特率:9600 ,数据位:8,停止位:1,奇偶校验: 无,校验:无”即可。常用 ②Telnet方式。该方式配置要求路由器必须配置了IP地址。基本方法是:计算机通过网卡和路由器的以太网接口相连,计算机的网卡和路由器的以太网接口的IP地址必须在同一网段。常用 ③其他方式:AUX口接MODEM,通过电话线与远方运行终端仿真软件的微机;通过Ethernet上的TFTP服务器;通过Ethernet上的SNMP网管工作站。 2、路由器的工作模式 在命令行状态下,主要有以下几种工作模式: ①一般用户模式。主要用于查看路由器的基本信息,只能执行少数命令,不能对路由 器进行配置。提示符为:Router>;进入方式为:Telnet或Console ②使能(特权)模式。主要用于查看、测试、检查路由器或网络,不能对接口、路由 协议进行配置。提示符为:Router#;进入方式为:Router>enable。 ③全局配置模式。主要用于配置路由器的全局性参数。提示符为:Router(config)#; 进入方式为:Router#config ter。 ④全局模式下的子模式。包括:接口、路由协议、线路等。其进入方式和提示符如下: Router(config)#ineterface e0 //进入接口模式 Router(config-if)#//接口模式提示符 Router(config)#rip //进入路由协议模式 Router(config-router)# //路由协议模式 Router(config)#line con 0 //进入线路模式

思科交换机命令大全

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询:? 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr 查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal

主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary 例如: Switch(config)#spanning-tree vlan 1 root primary 需要注意的是:设置根交换机是基于VLAN的 关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号) 例如: Switch(config)#no spanning-tree vlan 1 1.3 接口配置模式 进入接口配置模式:Switch(config)#interface 端口名称(可选参数) 启用端口:Switch(config-if)#no shutdown 停用端口:Switch(config-if)#shutdown 进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5 进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2

思科基本配置命令详解

思科交换机基本配置实例讲解

目录 1、基本概念介绍............................................... 2、密码、登陆等基本配置....................................... 3、CISCO设备端口配置详解...................................... 4、VLAN的规划及配置........................................... 4.1核心交换机的相关配置..................................... 4.2接入交换机的相关配置..................................... 5、配置交换机的路由功能....................................... 6、配置交换机的DHCP功能...................................... 7、常用排错命令...............................................

1、基本概念介绍 IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统VLAN: 虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL:访问控制列表 三层交换机:具有三层路由转发能力的交换机 本教程中“#”后的蓝色文字为注释内容。 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 Cisco 3640 (R4700) processor (revision 0xFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1.2

思科路由器基本配置与常用配置命令

思科路由器基本配置与常用配置命令(simple for CCNA) 启动接口,分配IP地址: router> router> enable router# router# configure terminal router(config)# router(config)# interface Type Port router(config-if)# no shutdown router(config-if)# ip address IP-Address Subnet-Mask router(config-if)# ^z 配置RIP路由协议:30秒更新一次 router(config)# router rip router(config-if)# network Network-Number router(config-if)# ^z 配置IGRP路由协议:90秒更新一次 router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# ^z配置Novell IPX路由协议:Novell RIP 60秒更新一次 router(config)# ipx routing [node address] router(config)# ipx maximum-paths Paths router(config)# interface Type Port router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] router(config-if)# ^z配置DDR: router(config)# dialer-list Group-Number protocol Protocol-Type permit [list ACL-Number] router(config)# interface bri 0 router(config-if)# dialer-group Group-Number router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number router(config-if)# ^z配置ISDN: router(config)# isdn swith-type Swith-Type router(config-if)# ^z 配置Frame Relay: router(config-if)# encapsulation frame-relay [cisco | ietf ] router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] router(config-if)# bandwidth kilobits router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ] router(config-if)# ^z配置标准ACL: router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] router(config)# interface Type Port router(config-if)# ip access-group Access-List-Number [ in | out ] router(config-if)# ^z配置扩展ACL: router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]

思科交换机配置常用命令(精编文档).doc

【最新整理,下载后即可编辑】 Cisco三层交换机配置命令及解释 (2011-07-11 08:54:50) 分类:IT资讯 标签: cisco 杂谈 基本配置 S> enable 进入特权模式 S# configure terminal 进入全局配置模式 S(config)# hostname name 改变交换机名称 S(config)# enable password level level_# password 设置用户口令(level_#=1)或特权口令(level_#=15) S(config)# line console 0 进入控制台接口 S(config-line)# password console_password 接上一条命令,设置控制台口令 S(config)# line vty 0 15 进入虚拟终端 S(config-line)# password telnet_password 接上一条命令,设置Telnet口令 S(config-line)# login 允许Telnet登录 S(config)# enable password|secret privilege_password 配置特权口令(加密或不加密) S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式 S(config-if)# [no] shutdown 关闭或启用该接口(默认启用) S(config)# ip address IP_address sunbet_mask 指定IP地址 S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认网关 S# show running-config 查看当前的配置 S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM中

CISCO 常用命令解释

视图模式介绍: 普通视图 router> 特权视图 router# /在普通模式下输入enable 全局视图 router(config)# /在特权模式下输入config t 接口视图 router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图 router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式 serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码router(config-if)#enca hdlc/ppp 捆绑链路协议 hdlc 或者 ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段 router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口 在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口 3、路由配置: (1)静态路由 router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由 (2)动态路由 rip协议 router(config)#router rip /启动rip协议 router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段 router(config-router)#version 2 转换为rip 2版本 router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用 router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口

Cisco交换机常用配置命令

Cisco交换机常用配置命令 CISCO交换机基本配置 switch>ena 進入特权模式 switch#erasenvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname>; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname cisco ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置 switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write;保存配置信息 switch#showvtp;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#showvlan;查看vlan配置信息 switch#showvlan name vlan2 switch#show interface ;查看端口信息

CISCO基本命令

端口速度:设置端口速度为:100Mbps/s 半双工模式 Switch# configure terminal Switch(config)# interface range gigabitethernet0/1 - 2 Switch(config-if-range)# speed 100 Switch(config-if)# duplex half 定义端口聚合并存储到NVRAM:定义名称为enet_list的端口组。 Switch# configure terminal Switch(config)# define interface-range enet_list gigabitethernet0/1 - 2 Switch(config)# end Switch# show running-config | include define Switch# define interface-range enet_list gigabitethernet0/1 – 2 Switch# configure terminal Switch(config)# no define interface-range enet_list Switch(config)# end Switch# show run | include define Switch# 设置端口类型: Switch(config-if)media-type auto-select | rj45 | sfp Switch#show interfaces interface-id transceiver properties

Cisco常用命令

路由器实验: router> enable 从用户模式进入特权模式 router# disable or exit 从特权模式退出到用户模式 router# show sessions 查看本机上的TELNET会话router# disconnect 关闭所有的TELNET会话 router# show users 查看本机上的用户 router# erase startupconfig 删除NVRAM中的配置 router# reload 重启路由器 router# config terminal 从用户模式进入特权模式 router(config)# hostname rl 配置用户名为rl router(config)# #banner welcome# 配置开机话语

router# show controllers serial0 查看串口0的物理层信息(主要是查看DTE/DCE)router# show ip interface 查看端口的IP配置信息 router# show hosts 查看主机表 end or ctrl+z 从各种配置模式退到特权模式 rl(config)# no ipdomainlookup 关闭动态域名解析 rl(config)# ipdomainlookup 打开动态域名解析 rl(config)# ipnameserver 202.106.0.20 打开动态域名解析之后便可以指定DNS服务rl(config)# interface serial 0 进入serial 0的接口配置模式 rl(configif)# no shutdown 路由器出厂默认所有端口关闭,使用此命令使它们打开rl(configif)# encapsulation ppp 封装ppp rl(configif)# clockrate 64000 如果是DCE使需要设置时钟速率,如果是DTE使不必设置

思科路由器常用配置命令大全

思科路由器常用配置命令大全 本文按字母顺序列举了思科路由器常用配置命令,适合思科路由器操作人员随时查看 Access-enable允许路由器在动态访问列表中创建临时访问列表入口 Access-group把访问控制列表(ACL)应用到接口上 Access-list定义一个标准的IP ACL Access-template在连接的路由器上手动替换临时访问列表入口 Appn向APPN子系统发送命令 Atmsig 执行ATM信令命令 B 手动引导操作系统 Bandwidth 设置接口的带宽 Banner motd 指定日期信息标语 Bfe 设置突发事件手册模式 Boot system 指定路由器启动时加载的系统映像 Calendar 设置硬件日历 Cd 更改路径 Cdp enable 允许接口运行CDP协议 Clear 复位功能 Clear counters 清除接口计数器 Clear interface 重新启动接口上的件逻辑 Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率 Cmt 开启/关闭FDDI连接管理功能 Config-register 修改配置寄存器设置 Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息 Configure memory 从NVRAM加载配置信息 Configure terminal 从终端进行手动配置 Connect 打开一个终端连接 Copy 复制配置或映像数据 Copy flash tftp 备份系统映像文件到TFTP服务器 Copy running-config startup-config 将RAM中的当前配置存储到NVRAM Copy running-config tftp 将RAM中的当前配置存储到网络TFTP服务器上 Copy tftp flash 从TFTP服务器上下载新映像到Flash Copy tftp running-config 从TFTP服务器上下载配置文件 Debug 使用调试功能 Debug dialer 显示接口在拨什么号及诸如此类的信息 Debug ip rip 显示RIP路由选择更新数据 Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息 Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息 Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程 Debug ppp 显示在实施PPP中发生的业务和交换信息 Delete 删除文件 Deny 为一个已命名的IP ACL设置条件 Dialer idle-timeout 规定线路断开前的空闲时间的长度 Dialer map 设置一个串行接口来呼叫一个或多个地点 Dialer wait-for-carrier-time 规定花多长时间等待一个载体 Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制 Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控

Cisco Pix日常维护常用命令

一、Cisco Pix日常维护常用命令 1、Pix模式介绍 “>”用户模式 firewall>enable 由用户模式进入到特权模式 password: “#”特权模式 firewall#config t 由特权模式进入全局配置模式 “(config)#”全局配置模式 firewall(config)# 防火墙的配置只要在全局模式下完成就可以了。 1、 基本配置介绍 1、端口命名、设备命名、IP地址配置及端口激活 nameif ethernet0 outside security0 端口命名 nameif gb-ethernet0 inside security100 定义端口的名字以及安全级别,“outside”的安全级别默认为0,“inside”安全级别默认为100,及高安全级别的可以访问低安全级别的,但低安全级别不能主动地到高安全级别。firewall(config)#hostname firewall 设备名称 firewall(config)#ip address outside 1.1.1.1 255.255.255.0 内外口地址设置 firewall(config)#ip address inside 172.16.1.1 255.255.255.0 firewall(config)# interface ethernet0 100full 激活外端口 firewall(config)# interface gb-ethernet0 1000auto 激活内端口 2、telnet、ssh、web登陆配置及密码配置 防火墙默认是不允许内/外网用户通过远程登陆或WEB访问的,需要相应得开启功能。firewall(config)#telnet 192.168.10.0 255.255.255.0 inside 允许内网此网断内的机器Telnet 到防火墙 配置从外网远程登陆到防火墙 Firewall(config)#domain-name https://www.doczj.com/doc/ee8960227.html, firewall(config)# crypto key generate rsa firewall(config)#ssh 0.0.0.0 0.0.0.0 outside 允许外网所有地址可以远程登录防火墙,也可以定义一格具体的地址可以从外网登陆到防火墙上,如: firewall(config)#ssh 218.240.6.81 255.255.255.255 outside firewall(config)#enable password cisco 由用户模式进入特权模式的口令 firewall(config)#passrd cisco ssh远程登陆时用的口令

cisco路由器基础配置命令

实验 1: Cisco路由器基础配置 1. 路由器的运行模式: Router> 用户模式,通常用来查看统计信息,但不能修改路由器的设置。 Router# 特许模式,可以查看并修改路由器的配置,通常在这里运行 show 命令。Router(config)# 全局模式,在这里修改当前运行配置中的内容。 Router(config-if)# 接口模式,用来配置路由器的物理接口和环回接口。 Router(config-subif)# 子接口模式,用来配置在路由器中创建的逻辑接口。 Router(config-line)# 控置台接口模式,通常用来配置用户模式口令。 Router(config-router)# 路由协议接口模式,在这里配置路由协议,如 RIP、IGRP 等。 2. 登录路由器的必要配置: Router>logout //退出控制台操作 Router>enable //从用户模式进特权模式 Router#disable //从特权模式返回用户模式 Router#configure terminal //进入全局模式 Router(config)#no ip domain lookup //关闭动态的域名解析。 Router(config)#line console 0 //配置console口 Router(config-line)#exec-timeout 0 0 //关闭控置台的会话超时,no exec-timeout亦可。Router(config-line)#logging synchronous //日志同步,阻止控置台的一些提示信息。Router(config-line)#exit Router(config)# 3. 路由器基本配置 Router(config)#hostname R1 //修改路由器的标识 R1#clock set 15:05:33 25 February 2006 //配置时钟 R1(config)#banner motd # This is Cisco Router 2620. //配置日期信息标志区(MOTD),登录到路由器时显示 # R1(config)# R1(config)#int s1/0 R1(config-if)# ip add 12.1.1.1 255.255.255.0 //配置接口的IP地址 R1(config-if)#clock rate 64000 //配置DCE端的时钟 R1(config-if)#no shutdown R1(config)#ip host R2 12.1.1.2 //添加域名记录 R1#telnet 12.1.1.2 R1#12.1.1.2 or R2 //以上两种方式可中断登陆R2

思科交换机基本配置(非常详细)

cisco交换机基本配置 1.Cisco IOS简介 Cisco Catalyst系列交换机所使用的操作系统是IOS(Internetwork Operating System,互联网际操作系统)或COS(Catalyst Operating System),其中以IOS使用最为广泛,该操作系统和路由器所使用的操作系统都基于相同的内核和shell。 IOS的优点在于命令体系比较易用。利用操作系统所提供的命令,可实现对交换机的配置和管理。Cisco IOS操作系统具有以下特点: (1)支持通过命令行(Command-Line Interface,简称CLI)或Web界面,来对交换机进行配置和管理。 (2)支持通过交换机的控制端口(Console)或Telnet会话来登录连接访问交换机。 (3)提供有用户模式(user level)和特权模式(privileged level)两种命令执行级别,并提供有全局配置、接口配置、子接口配置和vlan数据库配置等多种级别的配置模式,以允许用户对交换机的资源进行配置。 (4)在用户模式,仅能运行少数的命令,允许查看当前配置信息,但不能对交换机进行配置。特权模式允许运行提供的所有命令。 (5)IOS命令不区分大小写。 (6)在不引起混淆的情况下,支持命令简写。比如enable通常可简约表达为en。 (7)可随时使用?来获得命令行帮助,支持命令行编辑功能,并可将执行过的命令保存下来,供进行历史命令查询。 1.搭建交换机配置环境 在对交换机进行配置之前,首先应登录连接到交换机,这可通过交换机的控制端口(Console)连接或通过Telnet登录来实现。 (1)通过Console口连接交换机 对于首次配置交换机,必须采用该方式。对交换机设置管理IP地址后,就可采用Telnet登录方式来配置交换机。 对于可管理的交换机一般都提供有一个名为Console的控制台端口(或称配置口),该端口采用RJ-45接口,是一个符合EIA/TIA-232异步串行规范的配置口,通过该控制端口,可实现对交换机的本地配置。 交换机一般都随机配送了一根控制线,它的一端是RJ-45水晶头,用于连接交换机的控制台端口,另一端提供了DB-9(针)和DB-25(针)串行接口插头,用于连接PC机的COM1或COM2串行接口。Cisco的控制线两端均是RJ-45水晶头接口,但配送有RJ-45到DB-9和RJ-45到DB-25的转接头。 通过该控制线将交换机与PC机相连,并在PC上运行超级终端仿真程序,即可实现将PC机仿真成交换机的一个终端,从而实现对交换机的访问和配置。 Windows系统一般都默认安装了超级终端程序,对于Windows 2000 Server系统,该程序位于【开始】菜单下【程序】中【附件】的【通讯】群组下面,若没有,可利用控制面板中的【添加/删除程序】来安装。单击【通讯】群组下面的【超级终端】,即可启动超级终端。 首次启动超级终端时,会要求输入所在地区的电话区号,输入后将显示下图所示的连接创建对话框,在【名称】输入框中输入该连接的名称,并选择所使用的示意图标,然后单击确定按钮。 图9-2 超级终端连接创建对话框

思科交换机的配置模式和命令

9.Cisco交换机的基本配置命令 一.实训目的 1.理解交换机基本配置的步骤和命令。 2.掌握配置交换机的常用命令。 二.实训器材及环境 1.安装Windows 2000系统的主机一台; 2.安装模拟软件Boson Netsim 5.31; 3.模拟环境如下: 图9-1 实验环境结构图 三.实训理论基础 1.Cisco IOS简介 Cisco Catalyst系列交换机所使用的操作系统是IOS(Internetwork Operating System,互联网际操作系统)或COS(Catalyst Operating System),其中以IOS使用最为广泛,该操作系统和路由器所使用的操作系统都基于相同的内核和shell。 IOS的优点在于命令体系比较易用。利用操作系统所提供的命令,可实现对交换机的配置和管理。Cisco IOS操作系统具有以下特点: (1)支持通过命令行(Command-Line Interface,简称CLI)或Web界面,来对交换机进行配置和管理。 (2)支持通过交换机的控制端口(Console)或Telnet会话来登录连接访问交换机。 (3)提供有用户模式(user level)和特权模式(privileged level)两种命令执行级别,并提供有全局配置、接口配置、子接口配置和vlan数据库配置等多种级别的配置模式,以允许用户对交换机的资源进行配置。 (4)在用户模式,仅能运行少数的命令,允许查看当前配置信息,但不能对交换机进行配置。特权模式允许运行提供的所有命令。 (5)IOS命令不区分大小写。 (6)在不引起混淆的情况下,支持命令简写。比如enable通常可简约表达为en。 (7)可随时使用?来获得命令行帮助,支持命令行编辑功能,并可将执行过的命令保存下来,供进行历史命令查询。 四.实训内容 1.搭建交换机实验环境; 2.设置交换机的基本参数。 五.实训步骤 1.搭建交换机配置环境 在对交换机进行配置之前,首先应登录连接到交换机,这可通过交换机的控制端口(Console)连接或通过Telnet登录来实现。

相关主题
文本预览
相关文档 最新文档