当前位置:文档之家› 思科路由器交换机常用配置命令

思科路由器交换机常用配置命令

思科路由器交换机常用配置命令
思科路由器交换机常用配置命令

1、进入SETUP模式Router#setup

2、时间设置router#clock set hh:mm:ss date moth year

3、router>show history

Router>terminal history size lines

4、router#show version

5、router#show running-config

6、router#show starup-config

7、router(config)#hostname name主机命名

8、router(config)#banner motd # message #开机时的固定显示信息

9、router(config)#enable password password 特权模式明文密码

10、router(config)#no enable password

11、router(config)#enable secret password 特权模式加密密码

12、router(config)#no enable secret

13、router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解

14、router(config)#line console控制台密码

15、router(config-line)#login

16、router(config-line)#password password

17、router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出

18、router(config-line)#logging synchronous重显被打乱的控制台输入

router(config)#no ip domain-lookup 禁止域名解析

19、router(config)#line vty 0 4虚拟终端密码

20、router(config-line)#login

21、router(config-line)#password password

22、router(config)#interface type number(slot/port)端口设置

23、router(config-if)#ip address ip summast

24、router(config-if)#clock rate 64000(时钟频率单位为bps,只在DCE端设置)

25、router(config-if)#bandwith 64(带宽设置,单位为KB)

26、router(config-if)#no shutdown(shutdown)

27、router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型

28、router(config-if )#ctrl+z保存退出到特权模式

29、router#

30、router>用户模式enable进入

router#特权模式config terminal进入

router(config)#全局配置模式

31、

Interface Router(config-if)#端口设置

Subinterface Router(config-subif)# 子端口设置

Controller Router(config-controller)# 控制口设置

Line Router(config-line)# 虚拟口设置

Router Router(config-router)# 路由设置

IPX router Router(config-ipx-router)#IPX路由设置

32、router#show interface

33、router#show interface Ethernet 0

34、router#show interface serial 0

35、router#show running-config

36、router#show starup-config

37、router#show flash

38、router#show controller

39、router#show controller interface type

40、router#show running-config

router#copy running-config starup-config

router#copy running-config tftp

router#copy starup-config tftp

router#copy flash tftp

router#copy tftp star-config

router#copy tftp flash

端口状态

Serial1 is up, line protocol is up正常工作

Serial1 is up, line protocol is down连接问题

Serial1 is down, line protocol is down端口问题

Serial1 is administratively down, line protocol is down人为关闭

配置寄存器的值

1、关闭路由器的电源重新启动按住ctrl+break键入进

2、>

3、>o/r 0x2142(跳过nvarm启动恢复密码)

4、>I

5、当系统提示是否进入setup模式时,按N

6、router>

7、router>enable

8、router#

9、进入修改后(包括密码、寄存器的值:0x2100为rom monitor启动、0x2101为setup 模式启动、0x2102为

10、router#copy running-config starup-config

11、router#reload

12、也可以在router#setup进入setup模式

静态路由协议设置

router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址)

router(config)#ip route 0.0.0.0 s0(出口端口或下一跳IP地址)

rip设置

router(config)#router rip

router(config-router)#network network-number

router#show ip protocol查看RIP信息

router#show ip route 查看路由表

router#debug ip rip查看RIP更新信息

router(config-router)#passive-interface e0(阻止发出作息)

router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息

igrp设置

router(config)#router igrp as number

router(config-router)#network network number

router#show ip route查看路由表

router#debug ip igrp events查看IGRP路由更新大概信息

router#debug ip igrp transaction查看IGRP路由更新详细信息

Router(config-router)#variance multiplier 控制IGRP load balancing

Router(config-router)#traffic-share {balanced | min}控制load-balanced traffic 的分布

eigrp设置

router(config)#router eigrp as number

router(config-router)#network network number

router(config)#no auto-summry 关闭自动汇总

router(config)# auto-summry 打开自动汇总(默认是打开的)

router#show ip route eigrp 显示当前的路由表里的EIGRP条目

router#show ip protocol 显示活动的路由协议进程的参数和当前的状态

router#show ip eigrp neighbors 显示被EIGRP发现的邻居

router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量

router#show ip eigrp topology 显示IP EIGRP的拓扑表

Router#debug ip eigrpospf设置

1. Router(config)#router ospf process-id

Router(config-router)#network address(可以是网络号也可以是Ip地址mask(通配掩码)area area-id

Router(config-if)# ip ospf priority numbe 配置OSPF的优先级

Router#show ip protocols 验证OSPF的配置

Router#show ip route 显示路由器学到的所有路由

Router#show ip ospf interface type number 显示area-ID 和邻接信息

Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息

Router#debug ip ospf events

Router#debug ip ospf packet

2. Router(config)# interface loopback number(lookback回路配置)

Router(config-if)# ip address ip-address subnet-mask

Router(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值

Router(config-if)# ip ospf authentication-key key 配置明文口令

Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令(keyid和key必须配对一致,两邻居才可以通信)

Router(config-route)# area area-id authentication [message-digest] message-digest为可选项,使用后路由器只传送口令消息的摘要(或散列)配置OSPF 区域的验证:

3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔:

Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔

访问列表

1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定

Router(config)#access-list 10 deny 172.16.40.0 0.0.0.255

Router(config)#access-list 10 permit any

Router(config)#int e1

Router(config-if)#ip access-group 10 out

使用IP标准ACL来控制VTY线路的访问.

Router(config)#access-list 50 permit 172.16.10.3

Router(config)#line vty 0 4

Router(config-line)#access-class 50 in

删除IP标准ACL

Router(config-line)#no ip access-class 50 in

Router(config)#no access-list 50

2.扩展访问列表(extended access lists):它比较源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定

Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 21

Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 23

Router(config)#access-list 110 permit ip any any

Router(config)#int e1

Router(config-if)#ip access-group 110 out

3.虚拟通道访问

router(config)#access-list 12 permit 192.89.55.0 0.0.0.255

router(config)#line vty 0 4

outer(config-line)#access-class 12 in

3.show ip interface:只显示IP访问列表信息

4.show ip interface:显示所有接口的信息和配置的ACL信息

5.show ip interface [接口号]:显示具体某个接口的信息和配置的ACL信息

6.show running-config:显示DRAM信息和ACL信息,以及接口对ACL的应用信息.

交换机配置

交换机上设置登陆口令

Switch(config)# enable password level level password

Switch(config)# no enable password level level password

hostname

1900/2900(config)#hostname hostname

IP Address

1900(config)#ip address {ip address} {mask}

1900(config)#ip address 10.5.5.11 255.255.255.0

2950(config#interface vlan 1

2950(config-if)#ip address {ip_address} {mask}

2950(config)#interface vlan 1

2950(config-if)#ip address 10.5.5.11 255.255.255.0 default gateway

1900/2950(config)#ip default-gateway {ip address}

1900/2950(config)#ip default-gateway 172.20.137.1

查看交换机的IP地址

1900#show ip

IP address: 10.5.5.11

Subnet mask: 255.255.255.0

Default gateway: 10.5.5.3

Management VLAN: 1

2950#show interface vlan 1

Vlan1 is up, line protocol is up

Hardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia

0010.f6a9.9800)

Internet address is 172.16.80.79/24

Broadcast address is 255.255.255.255

设置双工选项

1900(config)#interface e0/1

1900(config-if)#duplex {auto | full |full-flow-control | half}

2950(config)#interface fe0/1

2950(config-if)#duplex {auto | full | half}

设置端口速度:switch(config-if)# speed {10|100|auto}

查勘双工选项

Switch#show interfaces fastethernet0/3

查看MAC地址表

1900/2950#show mac-address-table

配置永久MAC地址

1900(config)#mac-address-table permanent {mac-address type module/port} 1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/3 1900#show mac-address-table

2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]

配置受限静态MAC地址

1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list}

1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/1

1900#show mac-address-table

2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]

2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 1

2950#show mac-address-table

配置端口安全性

1900(config-if)#port secure max-mac-count count

1900(config)#interface e0/4

1900(config-if)#port secure

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

1900(config)#address-violation {suspend | disable | ignore

1900# show mac-address-table security

2950(config-if)#port security max-mac-count count

2950(config)#interface fa0/1

2950(config-if)#port security

2950(config-if)#port security max-mac-count 10

2950(config-if)#port security action {shutdown | trap}

2950#show mac-address-table secure

2950#show port-security

管理配置文件

1900#copy nvram tftp://host/dst_file

1900#copy tftp://host/src_file nvram

1950#copy nvram tftp://10.1.1.1/wgswd.cfg

2950#copy startup-config tftp://host/dst_file

清除NVRAM

1900#delete nvram

2950#erase startup-config

vlan配置

1900 VLAN建立

1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下: >en

#config t

(config)#hostname 1900

1900(config)#vlan 2 name sales

1900(config)#vlan 3 name marketing

1900(config)#vlan 4 name mis

1900(config)#exit

端口分配

1900(config)#int e0/2

1900(config-if)#vlan-membership static 2

1900(config)#int e0/4

1900(config-if)#vlan-membership static 3

1900(config)#int e0/5

1900(config-if)#vlan-membership static 4

1900(config-if)#exit

1900(config)#exit

VLAN验证

1900#sh vlan

2900 VLAN建立

在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database

2950(vlan)#vlan 2 name Marketing

VLAN 2 modified:

Name: Marketing

2950(vlan)#vlan 3 name Accounting

VLAN 3 added:

Name: Accounting

2950(vlan)#apply

APPLY complete

2950(vlan)#Ctrl+C

2950#

端口分配

2950下的端口配置,使用switchport access vlan [vlan#]命令, 2950(config-if)#int f0/2

2950(config-if)#switchport access vlan 2

2950(config-if)#int f0/3

2950(config-if)#switchport access vlan 3

2950(config-if)#int f0/4

2950(config-if)#switchport access vlan 4

2950(config-if)#exit

2950(config)#exit

验证配置信息,如下:

2950#sh vlan

2950#sh vlan brief

trunk配置

1900trunk配置

1900(config)#int f0/26

1900(config-if)#trunk on

2950下在接口配置模式,使用switchport命令,如下:

2950(config)#int f0/12

2950(config-if)#switchport mode trunk

2950(config-if)# switchport trunk encapsulation {isl|dot1q} 2950(config-if)#^Z

将某VLAN从中继中删除

2950(config-if)# switchport trunk allowed vlan remove vlan-list

添加某个VLAN到中继线路

2950(config-if)# switchport trunk allowed vlan add vlan-list Configuring Inter-VLAN Routing

给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下: 2600Router(config)#int f0/0.1

2600Router(config-subif)#encapsulation isl [vlan#]

2600Router(config-subif)#ip add ip add submask

给连接2950的这样配置,如下:

2600Router(config)#int f0/0.1

2600Router(config-subif)#encapsulation dot1q [vlan#]

2600Router(config-subif)#ip add ip add submask

VTP配置

1900(config)#vtp server

1900(config)#vtp domain noco

1900(config)#vtp password noko

在特权模式下使用show vtp命令验证,如下:

1900#sh vtp

VTP version: 1

Configuration revision: 0

Maximum VLANs supported locally: 1005

Number of existing VLANs: 5

VTP domain name: noco

VTP password: noko

VTP operating mode: Server

2950如下:

2950(config)#vtp mode server

2950(config)#vtp domain noco

验证信息,如下:

2950#sh vtp ?

counters VTP statistics

status VTP domain status

2950#sh vtp status

NAT配置

配置静态转换

Router(config)#ip nat inside source static local-ip global-ip

Router(config-if)#ip nat inside

Router(config-if)#ip nat outside

配置动态地址转换

Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}

Router(config)#access-list access-list-number permit source [source-wildcard]

Router(config)#ip nat inside source list

access-list-number pool name

配置Overloading

Router(config)#access-list access-list-number permit

source source-wildcard

Router(config)#ip nat inside source list

access-list-number interface interface overload

清除NAT Translation Table

Router#clear ip nat translation * 清除所有的动态地址转换条目

Router#clear ip nat translation inside global-ip

local-ip [outside local-ip global-ip] 清除一个简单的动态地址转换条目(内、外)Router#clear ip nat translation outside

local-ip global-ip清除一个简单的动态地址转换(外)

Router#clear ip nat translation protocol inside global-ip

global-port local-ip local-port [outside local-ip

local-port global-ip global-port] 清除一个扩展动态地址转换条目

Show命令输出信息

Router#show ip nat translations

1.在基于IOS的交换机上设置主机名/系统名:

switch(config)# hostname hostname

在基于CLI的交换机上设置主机名/系统名:

switch(enable) set system name name-string

2.在基于IOS的交换机上设置登录口令:

switch(config)# enable password level 1 password

在基于CLI的交换机上设置登录口令:

switch(enable) set password

switch(enable) set enalbepass

3.在基于IOS的交换机上设置远程访问:

switch(config)# interface vlan 1

switch(config-if)# ip address ip-address netmask

switch(config-if)# ip default-gateway ip-address

在基于CLI的交换机上设置远程访问:

switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlan

switch(enable) set ip route default gateway

4.在基于IOS的交换机上启用和浏览CDP信息:

switch(config-if)# cdp enable

switch(config-if)# no cdp enable

为了查看Cisco邻接设备的CDP通告信息:

switch# show cdp interface [type modle/port]

switch# show cdp neighbors [type module/port] [detail]

在基于CLI的交换机上启用和浏览CDP信息:

switch(enable) set cdp {enable|disable} module/port

为了查看Cisco邻接设备的CDP通告信息:

switch(enable) show cdp neighbors[module/port]

[vlan|duplex|capabilities|detail]

5.基于IOS的交换机的端口描述:

switch(config-if)# de脚本ion de脚本ion-string

基于CLI的交换机的端口描述:

switch(enable)set port name module/number de脚本ion-string

6.在基于IOS的交换机上设置端口速度:

switch(config-if)# speed{10|100|auto}

在基于CLI的交换机上设置端口速度:

switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto}

7.在基于IOS的交换机上设置以太网的链路模式:

switch(config-if)# duplex {auto|full|half}

在基于CLI的交换机上设置以太网的链路模式:

switch(enable) set port duplex module/number {full|half}

8.在基于IOS的交换机上配置静态VLAN:

CISCO路由器基本配置命令

一、 1.router(config)#router rip 启动rip进程 2.router(conifg-router)#network 172.17.0.0指定rip协议的主网络 3.router(config-router)#passive-interface f0/1把f0/1配置成passive端口 4.router(config-router)#neighbor 172.17.12.67 以单波方式通告rip更新给路由器 5.router(config-if)#ip address 192.168.83.244 255.255.255.0 主ip地址 router(config-if)#ip address 10.33.55.1 255.255.255.0 secondary辅助ip地址二、 1.router(config-router)#version 2将rip配置成版本2 2.router(config-ip)#ip rip send version 1只发rip 1数据包 router(config-ip)#ip rip receive version 2只接收rip 2数据包 3.router(config-router)#no auto-summary 关闭汇总功能 4.router(config-if)#no ip split-horizon关闭水平分割 5.router#show ip ospf database router 192.168.30.10显示路由器LSA通告 router#show ip ospf database network 192.168.17.18显示网络LSA通告 router#show ip ospf database summary 172.16.121.0显示网络汇总LSA通告 router#show ip ospf database asbr-summary显示ASBR汇总LSA通告 router#show ip ospf database external 10.83.10.0显示自主系统外部LSA通告router#show ip ospf database nssa-external显示NSSA外部LSA通告 三、 1.router(config)#router ospf 10配置ospf进程id 2.router(config)#interface loopback0

实验三通过配置路由器或三层交换机实现VLAN间的通信

实验三实现VLAN间的通信 一、通过路由器实现vlan间通信(单臂路由) 实验拓扑图 【准备知识】 在路由器与交换机的端口上配置子接口,每个子接口的IP地址是每个VLAN的网关地址(也可以理解为下一跳地址),并在子接口上封装802.1Q协议。也可以封装ISL协议(cisco专用协议,不兼容802.1Q)。 【实验步骤】 1、交换机配置如下: Switch>en Switch#conf t Switch(config)#vlan 2 Switch(config-vlan)#vlan 3 Switch(config-vlan)#exit Switch(config)#int fa0/2 Switch(config-if)#sw ac vlan 2 //switchport access vlan 2的简写,端口fa0/2划到vlan 2中Switch(config-if)#int fa0/3 Switch(config-if)#sw ac vlan 3 Switch(config-if)#exit Switch(config)#int fa0/1 Switch(config-if)#switchport mode trunk //设置f0/1端口为trunk模式 2、路由器配置如下:

Router>en Router#conf t Router(config)#int fa0/0 Router(config-if)#no shutdown Router(config-if)#exit Router(config)#int f0/0.1 Router(config-subif)#encapsulation dot1q 2 //封装协议802.1Q,2为vlan 2 Router(config-subif)#ip address 192.168.1.1 255.255.255.0 Router(config-subif)#exit Router(config)#int f0/0.2 Router(config-subif)#encapsulation dot1q 3 //封装协议802.1Q,3为vlan 3 Router(config-subif)#ip address 192.168.2.1 255.255.255.0 Router(config-subif)#exit Router(config)# 【检测实验结果】 VLAN 2中的pc1能ping 通VLAN 3中的pc2。 二、通过路由器实现跨交换机vlan间通信 实验拓扑图 【实验步骤】 1、交换机BJ上的配置如下: BJ>en BJ#conf t

cisco路由器配置及维护手册

cisco路由器配置及维护手册 作者:pixfire 一、路由器简单配置 1. 用串行电缆将PC机串口与路由器CONSOLE口连接,用WIN95的超级终端或NETTERM 软件进行配置。PC机串口设置为波特率9600 数据位8 停止位1。 2. 新出厂的路由器启动后会进入自动配置状态。可按提示对相应端口进行配置。 3 . 命令行状态。若不采用自动配置,可在自动配置完成后,题问是否采用以上配置时,回答N。此时进入命令行状态。 4 进入CONFIG模式。在router>键入enable , 进入router # ,再键入config t ,进入 router(config)# 。 5 配置广域端口。在正确连接好与E1端口的电缆线后,在router # 下键入sh controller cbus 。检验端口物理特性,及连线是否正确。之后,进入config模式。 进行以下配置。 int serial <端口号> E1端口号。 ip address <掩码> 广域网地址 bandwidth 2000 传输带宽 clock source line 时钟设定。 6 检验配置。设置完成后,按ctrl Z退出配置状态。键入write mem 保存配置。 用sh conf 检查配置信息。用sh int 检查端口状态。 二、路由器常用命令 2.1 Exec commands: <1-99> 恢复一个会话 bfe 手工应急模式设置 clear 复位功能

clock 管理系统时钟 configure 进入设置模式 connect 打开一个终端 copy 从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上 debug 调试功能 disable 退出优先命令状态 disconnect 断开一个网络连接 enable 进入优先命令状态 erase 擦除快闪内存 exit 退出exce模式 help 交互帮助系统的描述 lat 打开一个本地传输连接 lock 锁定终端 login 以一个用户名登录 logout

路由器常用命令

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

Cisco路由器的基本配置命令

Cisco路由器的基本配置命令 Cisco 路由器的基本配置命令 一(实训目的 1(掌握路由器的连接方式和使用基本规则。 2(掌握路由器的基本配置命令。 二(实训器材及环境 1(安装 Windows 2000 Server 系统的计算机一台。 2(安装模拟软件 Boson Netsim 5.31。 3(模拟环境如下: 图 11-1 实验拓扑环境 三(实训理论基础 1(路由器的基本配置语句 (1)配置路由器名字和特权密码: Router1> enable Router1# conf t Router1(config)# hostname R1 R1(config)# enable secret 123456
b5E2RGbCAP
(2)配置路由器的 Ethernet 端口:
R1(config)# interface e0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 p1EanqFDPw R1(config-if)# no shutdown (3)配置路由器的 Serial 端口(DTE 端):DXDiTa9E3d R1(config)# interface s0 R1(config-if)# ip address 10.0.0.1 255.0.0.0 R1(config-if)# no shutdown (4)配置路由器的 Serial 端口(DCE 端):
RTCrpUDGiT
R2(config)# interface s0 R2(config-if)# ip address 10.0.0.2 255.0.0.0 R2(config-if)# clock rate 64000 R2(config-if)# no shutdown 2(路由器可以有多种类型的端口,用于连接 不同的网络,常用的有以太网端口(Ethernet)、快速以太网端口 (FastEthernet)、高速同步串口(Serial)等。有的端口是固定端口,有的端
5PCzVD7HxA
- 1 -

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

思科交换机路由器命令 大全 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地址: 交换机显示命令:

网络设备模拟器PT教程-交换机路由基础

网络设备模拟器Packet Tracer教程第一章认识Packet Tracer软件 (1) 第二章交换机的基本配置与管理 (2) 第三章交换机的端口配置与管理 (3) 第四章交换机的Telnet远程登陆配置 (5) 第五章交换机的端口聚合配置 (7) 第六章交换机划分Vlan配置 (9) 第七章三层交换机基本配置 (12) 第八章利用三层交换机实现VLAN间路由 (13) 第九章快速生成树配置 (16) 第十章路由器的基本配置 (19) 第十一章路由器单臂路由配置 (21) 第一章认识Packet Tracer软件 Packet Tracher介绍 ●Packet Tracer是Cisco公司针对CCNA认证开发的一个用来设计、配置和故障排 除网络的模拟软件。 ●Packer Tracer模拟器软件比Boson功能强大,比Dynamips操作简单,非常适合 网络设备初学者使用。 学习任务 1、安装Packer Tracer; 2、利用一台型号为2960的交换机将2pc机互连组建一个小型局域网; 3、分别设置pc机的ip地址; 4、验证pc机间可以互通。 实验设备 Switch_2960 1台;PC 2台;直连线 PC1 IP:192.168.1.2 Submask:255.255.255.0 Gateway:192.168.1.1

PC2 IP:192.168.1.3 Submask:255.255.255.0 Gateway:192.168.1.1 PC1 ping PC2 Reply PC2 ping PC1 Reply PC2 ping Gateway Timeout 第二章交换机的基本配置与管理 实验目标 ●掌握交换机基本信息的配置管理。 实验背景 ●某公司新进一批交换机,在投入网络以后要进行初始配置与管理,你作为网络管理 员,对交换机进行基本的配置与管理。 技术原理 ●交换机的管理方式基本分为两种:带内管理和带外管理。 ●通过交换机的Console端口管理交换机属于带外管理;这种管理方式不占用交 换机的网络端口,第一次配置交换机必须利用Console端口进行配置。 ●通过Telnet、拨号等方式属于带内管理。 ●交换机的命令行操作模式主要包括: ●用户模式Switch> ●特权模式Switch# ●全局配置模式Switch(config)# ●端口模式Switch(config-if)# 实验步骤: ●新建Packet Tracer拓扑图 ●了解交换机命令行 ●进入特权模式(en) ●进入全局配置模式(conf t) ●进入交换机端口视图模式(int f0/1) ●返回到上级模式(exit) ●从全局以下模式返回到特权模式(end) ●帮助信息(如? 、co?、copy?) ●命令简写(如 conf t) ●命令自动补全(Tab) ●快捷键(ctrl+c中断测试,ctrl+z退回到特权视图) ●Reload重启。(在特权模式下) ●修改交换机名称(hostname X) 实验设备 Switch_2960 1台;PC 1台;配置线;

CISCO路由器配置手册----帧中继(Frame Relay)配置

CISCO路由器配置手册----Frame Relay 1. 帧中继技术 帧中继是一种高性能的WAN协议,它运行在OSI参考模型的物理层和数据链路层。它是一种数据包交换技术,是X.25的简化版本。它省略了X.25的一些强健功能,如提供窗口技术和数据重发技术,而是依靠高层协议提供纠错功能,这是因为帧中继工作在更好的WAN设备上,这些设备较之X.25的WAN设备具有更可靠的连接服务和更高的可靠性,它严格地对应于OSI参考模型的最低二层,而X.25还提供第三层的服务,所以,帧中继比X.25具有更高的性能和更有效的传输效率。 帧中继广域网的设备分为数据终端设备(DTE)和数据电路终端设备(DCE),Cisco 路由器作为 DTE设备。 帧中继技术提供面向连接的数据链路层的通信,在每对设备之间都存在一条定义好的通信链路,且该链路有一个链路识别码。这种服务通过帧中继虚电路实现,每个帧中继虚电路都以数据链路识别码(DLCI)标识自己。DLCI的值一般由帧中继服务提供商指定。帧中继即支持PVC也支持SVC。 帧中继本地管理接口(LMI)是对基本的帧中继标准的扩展。它是路由器和帧中继交换机之间信令标准,提供帧中继管理机制。它提供了许多管理复杂互联网络的特性,其中包括全局寻址、虚电路状态消息和多目发送等功能。 2. 有关命令: 端口设置 任务命令 设置Frame Relay封装encapsulation frame-relay[ietf] 1 设置Frame Relay LMI类型frame-relay lmi-type {ansi | cisco | q933a}2 设置子接口interface interface-type interface-number.subinterface -number [multipoint|point-to-point] 映射协议地址与DLCI frame-relay map protocol protocol-address dlci

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

思科路由器命令大全详解

一 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

(完整版)思科路由器查看配置命令.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 命令 ),然后再查看,才能看到翻译情况。

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 路由交换命令大全

思科交换机路由器命令大全 交换机命令: 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 -----设置快速端口

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

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 ;设置默认网关

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

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

思科命令全集汇总

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槽位上的第一个接口)

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

思科路由器常用配置命令大全 本文按字母顺序列举了思科路由器常用配置命令,适合思科路由器操作人员随时查看 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与协议的组合来控

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