搜档网
当前位置:搜档网 › 思科路由器命令大全

思科路由器命令大全

思科路由器命令大全
思科路由器命令大全

思科路由器命令大全

2009年03月16日星期一下午 08:02

思科路由器命令大全

2007年08月24日星期五下午 02:51

最近在学习路由器的配置把这个发上来方便以后学习和查阅

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)#

8:查看命令 show

switch> enable

switch# show version 察看系统中的所有版本信息

show interface vlan 1 查看交换机有关ip 协议的配置信息

show running-configure 查看交换机当前起作用的配置信息

show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表

show mac-address-table aging-time 查看mac地址表自动老化时间

9:交换机恢复出厂默认恢复命令

switch> enable

switch# erase startup-configure

switch# reload

10:双工模式设置

switch> enable

switch#c onfigure terminal

switch2950(conf)#hostname aptch-2950

aptech2950(conf)# interface fastehernet 0/17 以17端口为例

aptech2950(conf-if)#duplex full/half/auto 有

full , half, auto 三个可选项

11:cdp相关命令

switch> enable

switch# show cdp 查看设备的cdp全局配置信息

show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息

show cdp nerghbors 列出与设备相连的cisco设备

12:csico2950的密码恢复

拔下交换机电源线。

用手按着交换机的MODE键,插上电源线

在switch:后执行flash_ini命令:switch: flash_ini

查看flash中的文件: switch: dir flash:

把“config.text”文件改名为“config.old”: switch: rename flash: config.text flash: config.old

执行boot: switch: boot

交换机进入是否进入配置的对话,执行no :

进入特权模式察看flash里的文件: show flash :

把“config.old”文件改名为“config.text”: switch: rename flash: config.old flash: config.text

把“config.text”拷入系统的“running-configure”: copy flash: config.text system : running-configure

把配置模式重新设置密码存盘,密码恢复成功。

13:交换机telnet远程登录设置:

switch>en

switch#c onfigure terminal

switch(conf)#hostname aptech-2950

aptech2950(conf)#enable password cisco 以cisco为特权模式密码

aptech2950(conf)#interface fastethernet 0/1 以17端口为telnet 远程登录端口

aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0

aptech2950(conf-if)#no shut

aptech2950(conf-if)#exit

aptech2950(conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆

aptech2950(conf-line)#login

aptech2950(conf-line)#password edge 以edge为远程登录的用户密码

主机设置:

ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段

netmask 255.255.255.0

gate-way 192.168.1.1 网关地址是交换机端口地址

运行:

telnet 192.168.1.1

进入telnet远程登录界面

password : edge

aptech2950>en

password: cisco

aptech#

14:交换机配置的重新载入和保存

设置完成交换机的配置后:

aptech2950(conf)#reload

是否保存(y/n) y: 保存设置信息 n:不保存设置信息

路由器命令

router> 用户模式

1:进入特权模式 enable

router > enable

router #

2:进入全局配置模式 configure terminal

router > enable

router #c onfigure terminal

router (conf)#

3:交换机命名 hostname routera 以routerA为例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routera (conf)#

4:配置使能口令 enable password cisco 以cisco为例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# enable password cisco

5:配置使能密码 enable secret ciscolab 以cicsolab为例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# enable secret ciscolab

6:进入路由器某一端口 interface fastehernet 0/17 以17端口为例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# interface fastehernet 0/17

routerA (conf-if)#

进入路由器的某一子端口 interface fastethernet 0/17.1 以17端口

的1子端口为例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# interface fastehernet 0/17.1

7:设置端口ip地址信息

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA(conf)# interface fastehernet 0/17 以17端口为例

routerA (conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码

routerA (conf-if)#no shut 是配置处于运行中

routerA (conf-if)#exit

8:查看命令 show

router > enable

router # show version 察看系统中的所有版本信息

show interface vlan 1 查看交换机有关ip 协议的配置信息

show running-configure 查看交换机当前起作用的配置信息

show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表

show mac-address-table aging-time 查看mac地址表自动老化时间

show controllers serial + 编号查看串口类型

show ip router 查看路由器的路由表

9:cdp相关命令

router > enable

router # show cdp 查看设备的cdp全局配置信息

show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息

show cdp nerghbors 列出与设备相连的cisco设备

10:csico2600的密码恢复

重新启动路由器,在启动过程中按下win+break键,使路由器进入rom monitor 在提示符下输入命令修改配置寄存器的值,然后重新启动路由器

remmon1>confreg 0x2142

remmon2>reset

重新启动路由器后进入setup模式,选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变把startup-config中配置保存到running-config中,然后重新设置enable密

码,并把配置寄存器改回0x2102:

router>enable

router#copy startup-config running-config

router#c onfigure terminal

router(conf)#enable password cisco

router(conf)#c onfig-register 0x2102

保存当前配置到startup-config , 重新启动路由器。

router #copy running-config startup-config

router #reload

11:路由器telnet远程登录设置:

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA (conf)#enable password cisco 以cisco为特权模式密码routerA (conf)#interface fastethernet 0/1 以17端口为telnet 远程登录端口

routerA (conf-if)#ip address 192.168.1.1 255.255.255.0

routerA (conf-if)#no shut

routerA (conf-if)#exit

routerA (conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆

routerA (conf-line)#login

routerA (conf-line)#password edge 以edge为远程登录的用户密码

主机设置:

ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段

netmask 255.255.255.0

gate-way 192.168.1.1 网关地址是交换机端口地址

运行:

telnet 192.168.1.1

进入telnet远程登录界面

password : edge

routera>en

password: cisco

routera#

12:配置路由器的标识banner $……………$

在全局配置的模式下利用“banner”命令可以配置路由器的提示信息,所有连接到路由器的终端都会收到。

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#banner motd $This is aptech company’ router ! Please don’t change the configuration without permission!$

13:配置接口标识description ………

接口标识用于区分路由器的各个接口。

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#interface fastethernet 0/1 以0/1 接口为例

routerA(conf-if)# description this is a fast Ethernet port used to connecting the company’s intranet!

14:配置超时

超时适用于设置在多长时间没有对console进行配置,自动返回exec会话时间。默认为10分钟。

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#line console 0

routerA(conf-if)#e xec-timeout 0 0 第一个“0”代表分钟,第二个“0”代表秒

15:配置串口参数

两台路由器通过串口连接需要一个做为DTE,一个做为DCE。DCE设备要向DTE 设备提供时钟频率和带宽。

DCE配置:

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#interface serial 0/0

routerA(conf_if)#clock rate 64000 提供时钟频率为64000 routerA(conf_if)#bandwidth 64 提供带宽为64

DTE配置:路由器串口配置ip地址

router>en

router #c onfigure terminal

router (conf)#hostname routerB

routerB(conf)#interface serial 0/0

routerB(conf_if)#ip address 192.168.1.1 255.255.255.0

16:静态路由的配置

配置路由器A的主机名和接口参数

router>enable

router#c onfigure terminal

router(conf)#hostname routerA

routerA(conf)#interface fastethernet 0/1 路由器A的1端口为两路由器的连接端口

routerA(conf-if)#ip address 192.168.2.1 255.255.255.0

routerA(conf-if)#no shutdown

routerA(conf-if)#exit

routerA(conf)# interface fastethernet 0/0 路由器A的0端口为与主机的连接端口

routerA(conf-if)#ip address 192.168.1.2 255.255.255.0

routerA(conf-if)#no shutdown

主机A的ip地址为 192.168.1.1

255.255.255.0

192.168.1.2

配置路由器B的主机名和接口参数

router>enable

router#c onfigure terminal

router(conf)#hostname routerB

routerB(conf)#interface fastethernet 0/0 路由器B的0端口为两路由器的连接端口

routerB(conf-if)#ip address 192.168.2.2 255.255.255.0

routerB(conf-if)#no shutdown

routerB (conf-if)#exit

routerB(conf)# interface fastethernet 0/1 路由器B的1端口为与主机的连接端口

routerB(conf-if)#ip address 192.168.3.1 255.255.255.0

主机B的ip地址为 192.168.3.2

255.255.255.0

192.168.3.1

配置路由器A的静态路由表

routerA(conf)#ip router 192.168.3.0 255.255.255.0 192.168.2.2 配置路由器B的静态路由表

routerA(conf)#ip router 192.168.1.0 255.255.255.0 192.168.2.1

在routerA和routerB上配置默认路由

routerA(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.2

routerA(conf)#ip classless

routerB(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.1

routerB(conf)#ip classless

在routerA和routerB上配置动态路由(RIP)

routerA(conf)#router rip

routerA(conf)#network 192.168.1.0

routerA(conf)#network 192.168.2.0

routerB(conf)# router rip

routerB(conf)#network 192.168.2.0 routerB(conf)#network 192.168.3.0

路由器常用命令

cisco路由器常用命令 1:三大模式 router> 用户模式 router > enable 进入特权模式 router # router > enable 进入全局配置模式 router #configure terminal router (conf)# 2:其它模式 Router(config)#interface f1/0 进入接口配置模式Router(config-if)# Router(config)#interface f1/0.1 进入子接口配置模式Router(config-subif)# Router(config)#line console 0 进入line模式Router(config-line)# Router(config)#router rip 进入路由模式Router(config-router)# 3:路由器命名 hostname routera,以routerA为例 router > enable router #configure terminal router(conf)#hostname routerA routera (conf)# 4:配置各类密码 配置特权模式密码(使能口令) enable password cisco,以cisco为例 router > enable router #configure terminal router(conf)#hostname routerA routerA (conf)# enable password cisco 设置VTY(虚拟终端接口)密码 Router(config)#line vty 0 1

思科交换机实用配置步骤详解

1.交换机支持的命令: 交换机基本状态: switch: ;ROM状态,路由器是rommon> hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态交换机口令设置: 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 ;允许登录 switch(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)#switchportaccess vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线 switch(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)#interface vlan 1 ;进入vlan 1 switch(config-if)#ipaddress ;设置IP地址 switch(config)#ip default-gateway ;设置默认网关

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)#

(完整版)思科路由器查看配置命令.doc

思科路由器查看配置命令 show run// 看运行状况 show ip route// 看路由表 show int// 看断口 * show ip int br// 看端口 ip 地址 show cdp nei// 察看 cdp 邻居 show ip pro// 察看 ip 协议 查看配置信息用 show 命令,该命令可以在用户模式和特权模式下执行,且在特权模式下看 到的信息比用户模式多。 show 命令很多,常用的有: 1、查看运行配置文件: Router#show running-config 运行配置文件 running-config 位于路由器的 RAM 中,存放的是路由器当前使用的配置信息。 2、查看启动配置文件: Router#show startup-config 启动配置文件 startup-config 位于路由器的 NVRAM 中,可以长期保存。它在启动路由器时装入 RAM ,成为 running-config 。 3、查看路由器的版本信息: Router#show version' 4、查看路由器的接口状态: Router#show ip interface brief 如果接口状态标识为“ Down ”,表示此接口未激活,如果标识为“ Up”,表示此接口已经激活。 5、查看路由表:

Router#show ip route 通过路由表可以看出该路由器已经识别的网络。 6、查看 NAT 翻译情况: Router#show ip nat translation 应该先进行内网与外网的通讯(如:用 ping 命令 ),然后再查看,才能看到翻译情况。

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: 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 ;允许登录 switch(config-line)#password xx ;设置登录口令 xxswitch#exit ;返回命令 交换机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(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 client ;设置发vtp模式 交换机设置IP地址: 交换机显示命令:

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 //进入线路模式

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

思科路由器基本配置与常用配置命令(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 ]

思科路由器命令大全详解

一 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 配置交换机端口ip和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 设置网关地址 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)# 8:查看命令show switch> enable

思科交换机命令大全 + Cisco IOS 基本命令

思科交换机命令大全 (一) 序号/类别基于ios的交换机命令基于CLI的交换机命令 1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) set system name name-string 2.设置登录口令switch(config)# enable password level 1 password switch(enable) set password switch(enable) set enalbepass 3.设置远程访问switch(config)# inte***ce vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-address switch(enable) set inte***ce sc0 vlan switch(enable) set ip route default gateway 4.启用和浏览CDP信息switch(config-if)# cdp enable switch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module/port 5.查看Cisco邻接设备的CDP通告switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述switch(config-if)#description escription-string switch(enable)set port name module/number description-string 7.设置端口速度switch(config-if)# speed{10|100|auto} switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half 9.配置静态VLAN switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)#inte***ce inte***ce module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end switch(enable) set vlan vlan-num [name name] switch(enable) set vlan vlan-num mod-num/port-list 10.配置VLAN中继线switch(config)# inte***ce inte***ce mod/port switch(config-if)# switchport mode trunk switch(config-if)#switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 11.配置VTP管理域switch# vlan database

CISCO路由器简要配置手册

CISCO路由器简要配置手册 编者: 审核: 中兴通讯网络事业部南京用服部

修订记录

目录 第1章路由器配置基础 (1) 1.1IP地址概览 (1) 1.1.1 IP地址的类别 (1) 1.1.2 子网掩码 (2) 1.2路由器基本知识介绍 (2) 1.2.1 路由器物理端口介绍 (2) 1.2.2 路由器型号 (2) 1.2.3 内存体系结构介绍 (3) 1.3基本设置方式 (4) 1.4命令状态 (5) 1.5设置对话过程 (5) 1.6常用命令 (9) 1.7配置IP寻址 (11) 1.8配置静态路由 (14) 第2章广域网协议设置 (16) 2.1HDLC (16) 2.2PPP (21) 2.3 X.25 (23) 2.4F RAME R ELAY (29) 2.5ISDN (34) 2.6PSTN (47) 第3章路由协议设置 (68) 3.1RIP协议 (68) 3.2IGRP协议 (69) 3.3OSPF协议 (70) 3.4重新分配路由 (76) 3.5IPX协议设置 (79) 第4章访问控制 (83) 4.1标准IP访问列表 (83) 4.2扩展IP访问列表 (87) 第5章配置举例 (89)

5.1组网描述 (89) 5.2路由器配置举例 (89)

第1章路由器配置基础 摘要: 路由器是处于网络层的设备,它负责把IP数据包从一个网络中的主机转发到另一个网络上的主机(中间可能用到多个路由器的转发)。路由器可以有多个接口连接局域网络和广域网络。 它有两个基本的功能:路径判断和交换。交换功能让路由器从一个接口接收数据包并转发到其它的接口。路径判断功能使得路由器能选择最合适的接口来转发数据包,即选择最佳的路径到达目的网络。下图中蓝线表示两台计算机IP数据包的传输最佳路径。 1.1 IP地址概览 1.1.1 IP地址的类别 为了同时容纳大型网络和小型网络,网络信息中心(NIC)将32比特IP地址分为A类、B类、C类、D类和E类。每种地址类别分别允许在其网络中有某一数量的网络地址和某一数量的主机地址。 类别地址范围网络数主机数 A类 1.0.0.0到126.0.0.0128(27)16777214 B类128.0.0.0 到191.255.0.016386(214)65532 C类192.0.0.0 到 223.255.255.0大约200万(221)254 D类224.0.0.0 到 239.255.255.254为多组播地址保留 E类240.0.0.0 到 254.255.255.255为研究保留

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 接口名 /启动本路由器的那个接口为被动接口

思科路由器配置命令和方法

第一章:路由器配置基础 一、基本设置方式 一般来说,可以用5种方式来设置路由器: 1.Console口接终端或运行终端仿真软件的微机; 2.AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;3.通过Ethernet上的TFTP服务器; 4.通过Ethernet上的TELNET程序; 5.通过Ethernet上的SNMP网管工作站。 但路由器的第一次设置必须通过第一种方式进行,此时终端的硬件设置如下: 波特率:9600 数据位:8 停止位:1 奇偶校验: 无 二、命令状态 1. router> 路由器处于用户命令状态,这时用户可以看路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。 2. router# 在router>提示符下键入enable,路由器进入特权命令状态router#,这时不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。 3. router(config)# 在router#提示符下键入configure terminal,出现提示符router(config)#,此时路由器处于全局设置状态,这时可以设置路由器的全局参数。 4. router(config-if)#; router(config-line)#; router(config-router)#;… 路由器处于局部设置状态,这时可以设置路由器某个局部的参数。 5. > 路由器处于RXBOOT状态,在开机后60秒内按ctrl-break可进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。 设置对话状态 这是一台新路由器开机时自动进入的状态,在特权命令状态使用SETUP命令也可进入此状态,这时可通过对话方式对路由器进行设置。 三、设置对话过程 显示提示信息 全局参数的设置 接口参数的设置 显示结果 利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。 进入设置对话过程后,路由器首先会显示一些提示信息: --- 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 '[]'. 这是告诉你在设置对话过程中的任何地方都可以键入“?”得到系统的帮助,按ctrl-c可以退

CISCO 路由交换命令大全

思科交换机路由器命令大全 交换机命令: switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab aptech2950(conf)#no ip domain-lookup -----设置禁用IP地址解析特性 aptech2950(conf)#logging synchronous -----设置启用消息同步特性 aptech2950(conf)#interface range fastethernet0/1-20 aptech2950(conf-if-range)#spanning-tree portfast -----设置快速端口

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

思科路由器常用配置命令大全 本文按字母顺序列举了思科路由器常用配置命令,适合思科路由器操作人员随时查看 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命令全集-思科命令汇总 各个视图模式介绍: 普通视图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槽位上的第一个接口)

图解思科路由器配置教程

cisco路由器配置教程 手把手教你配置cisco路由器 经过几十年的发展,从最初的只有四个节点的ARPANET发展到现今无处不在的Internet,计算机网络已经深入到了我们生活当中。随着计算机网络规模的爆炸性增长,作为连接设备的路由器也变得更加重要。 公司在构建网络时,如何对路由器进行合理的配置管理成为网络管理者的重要任务之一。本专题就为读者从最简单的配置开始为大家介绍如何配置cisco路由器。 很多读者都对路由器的概念非常模糊,其实在很多文献中都提到,路由器就是一种具有多个网络接口的计算机。这种特殊的计算机内部也有CPU、内存、系统总线、输入输出接口等等和PC相似的硬件,只不过它所提供的功能与普通计算机不同而已。 和普通计算机一样,路由器也需要一个软件操作系统,在cisco 路由器中,这个操作系统叫做互联网络操作系统,这就是我们最常听到的IOS 软件了。下面就请读者跟着我们来一步步的学习最基本的路由器配置方法。 cisco路由器基本配置: √ cisco IOS软件简介: 大家其实没必要把路由器想的那么复杂,其实路由器就是一个具有多个端口的计算机,只不过它在网络中起到的作用与一般的PC不同而已。和普通计算机一样,路由器也需要一个操作系统,cisco把这个操作系统叫作cisco互联网络操作系统,也就是我们知道的IOS,所有cisco路由器的IOS都是一个嵌入式软件体系结构。

cisco IOS软件提供以下网络服务: 基本的路由和交换功能。 可靠和安全的访问网络资源。 可扩展的网络结构。 cisco命令行界面(CLI)用一个分等级的结构,这个结构需要在不同的模式下来完成特定的任务。例如配置一个路由器的接口,用户就必须进入到路由器的接口配置模式下,所有的配置都只会应用到这个接口上。每一个不同的配置模式都会有特定的命令提示符。EXEC为IOS软件提供一个命令解释服务,当每一个命令键入后EXEC便会执行该命令。 √第一次配置Cisco路由器: 在第一次配置cisco路由器的时候,我们需要从console端口来进行配置。以下,我们就为大家介绍如何连接到控制端口及设置虚拟终端程序。 1、使用rollover线和一个RJ45和DB9或者DB25的转换适配器连接路由器控制端口和终端计算机。

相关主题