导航:首页 > 程序命令 > 思科交换机的命令是什么

思科交换机的命令是什么

发布时间:2023-03-27 03:29:16

❶ Cisco常用的路由器交换机配置命令

cisco制造的路由器设备、交换机和其他设备承载了全世界80%的互联网通信,成为硅谷中新经济的传奇,那么你了解Cisco常用的路由器交换机配置命令吗?下面是我整理的一些关于Cisco常用的路由器交换机配置命令的相关资料,供你参考。

Cisco常用的路由器支持的命令:

路由器显示命令:

router#show run ;显示配置信息

router#show interface ;显示接口信息

router#show ip route ;显示路由信息

router#show cdp nei ;显示邻居信息

router#reload ;重新起动

路由器口令设置:

router>enable ;进入特权模式

router#config terminal ;进入全局配置模式

router(config)#hostname ;设置交换机的主机名

router(config)#enable secret xxx ;设置特权加密口令

router(config)#enable password xxb ;设置特权非密口令

router(config)#line console 0 ;进入控制台口

router(config-line)#line vty 0 4 ;进入虚拟终端

router(config-line)#login ;要求口令验证

router(config-line)#password xx ;设置登录口令xx

router(config)#(Ctrl+z) ; 返回特权模式

router#exit ;返回命令

路由器配置:

router(config)#int s0/0 ;进入Serail接口

router(config-if)#no shutdown ;激活当前接口

router(config-if)#clock rate 64000 ;设置同步时钟

router(config-if)#ip address ;设置IP地址

router(config-if)#ip address second ;设置第二个IP

router(config-if)#int f0/0.1 ;进入子接口

router(config-subif.1)#ip address ;设置子接口IP

router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议

router(config)#config-register 0x2142 ;跳过配置文件

router(config)#config-register 0x2102 ;正常使用配置文件

router#reload ;重新引导

路由器文件操作:

router# running-config startup-config ;保存配置

router# running-config tftp ;保存配置到tftp

router# startup-config tftp ;开机配置存到tftp

router# tftp flash: ;下传文件到flash

router# tftp startup-config ;下载配置文件

ROM状态:

Ctrl+Break ;进入ROM监控状态

rommon>confreg 0x2142 ;跳过配置文件

rommon>confreg 0x2102 ;恢复配置文件

rommon>reset ;重新引导

rommon> xmodem: flash: ;从console传输文件

rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP

rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码

rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP

rommon>TFTP_FILE=c2600.bin ;指定下载的文件

rommon>tftpdnld ;从tftp下载

rommon>dir flash: ;查看闪存内容

rommon>boot ;引导IOS

静态路由:

ip route ;命令格式

router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例

router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例

动态路由:

router(config)#ip routing ;启动路由转发

router(config)#router rip ;启动RIP路由协议。

router(config-router)#network ;设置发布路由

router(config-router)#negihbor ;点对点帧中继用。

帧中继命令:

router(config)#frame-relay switching ;使能帧中继交换

router(config-s0)#encapsulation frame-relay ;使能帧中继

router(config-s0)#fram-relay lmi-type cisco ;设置管理类型

router(config-s0)#frame-relay intf-type DCE ;设置为DCE

router(config-s0)#frame-relay dlci 16 ;

router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号

router(config-s0)#frame-relay interface-dlci 16 ;

router(config)#log-adjacency-changes ;记录邻接变化

router(config)#int s0/0.1 point-to-point ;设置子接口点对点

router#show frame pvc ;显示永久虚电路

router#show frame map ;显示映射

基本访问控制列表:

router(config)#access-list permit|deny

router(config)#interface ;default:deny any

router(config-if)#ip access-group in|out ;defaultut

例1:

router(config)#access-list 4 permit 10.8.1.1

router(config)#access-list 4 deny 10.8.1.0 0.0.0.255

router(config)#access-list 4 permit 10.8.0.0 0.0.255.255

router(config)#access-list 4 deny 10.0.0.0 0.255.255.255

router(config)#access-list 4 permit any

router(config)#int f0/0

router(config-if)#ip access-group 4 in

扩展访问控制列表:

access-list permit|deny icmp [type]

access-list permit|deny tcp [port]

例3:

router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo

router(config)#access-list 101 permit ip any any

router(config)#int s0/0

router(config-if)#ip access-group 101 in

例3:

router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80

router(config)#access-list 102 permit ip any any

router(config)#interface s0/1

router(config-if)#ip access-group 102 out

删除访问控制例表:

router(config)#no access-list 102

router(config-if)#no ip access-group 101 in

路由器的nat配置

Router(config-if)#ip nat inside ;当前接口指定为内部接口

Router(config-if)#ip nat outside ;当前接口指定为外部接口

Router(config)#ip nat inside source static [p] [port]

Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1

Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80

Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0

Router(config)#ip nat inside source list 1 pool p1

Router(config)#ip nat inside destination list 2 pool p2

Router(config)#ip nat inside source list 2 interface s0/0 overload

Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary

Router#show ip nat translation

rotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。

overload参数用于PAT 将内部IP映射到一个公网IP不同的端口上。

外部网关协议配置

routerA(config)#router bgp 100

routerA(config-router)#network 19.0.0.0

routerA(config-router)#neighbor 8.1.1.2 remote-as 200

配置PPP验证:

RouterA(config)#username password

RouterA(config)#int s0

RouterA(config-if)#ppp authentication {chap|pap}

3.PIX防火墙命令

Pix525(config)#nameif ethernet0 outside security0 ;命名接口和级别

Pix525(config)#interface ethernet0 auto ;设置接口方式

Pix525(config)#interface ethernet1 100full ;设置接口方式

Pix525(config)#interface ethernet1 100full shutdown

Pix525(config)#ip address inside 192.168.0.1 255.255.255.0

Pix525(config)#ip address outside 133.0.0.1 255.255.255.252

Pix525(config)#global (if_name) natid ip-ip ;定义公网IP区间

Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句

Pix525(config)#global (outside) 1 133.0.0.1 ;例句

Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉设置

Pix525(config)#nat (if_name) nat_id local_ip [netmark]

Pix525(config)#nat (inside) 1 0 0

内网所有主机(0代表0.0.0.0)可以访问global 1指定的外网。

Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0

内网172.16.5.0/16网段的主机可以访问global 1指定的外网。

Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式

Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句

Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句

Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8

表示内部ip地址192.168.0.8,访问外部时被翻译成133.0.0.1全局地址。

Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8

中间区域ip地址172.16.0.8,访问外部时被翻译成133.0.0.1全局地址。

Cisco常用的交换机支持的命令:

交换机基本状态:

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)#switchport access 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)#ip address ;设置IP地址

switch(config)#ip default-gateway ;设置默认网关

switch#dir flash: ;查看闪存

交换机显示命令:

switch#write ;保存配置信息

switch#show vtp ;查看vtp配置信息

switch#show run ;查看当前配置信息

switch#show vlan ;查看vlan配置信息

switch#show interface ;查看端口信息

switch#show int f0/0 ;查看指定端口信息

❷ CISCO交换机的查看配置命令是什么

1、Router#show startup-config //查看启动配置文件

启动配置文件startup-config位于路由器的NVRAM中,可以长期保存。它在启动路由器时装入RAM,成为running-config。

2、Router#show version //查看路由器的版本信息

3、Router#show ip interface brief //查看路由器的接口状态

(2)思科交换机的命令是什么扩展阅读:

工作在数据链路层。交换机拥有一条很高带宽的背部总线和内部交换矩阵。交换机的所有的端口都挂接在这条背部总线上,控制电路收到数据包以后,处理端口会查找内存中的地址对照表以确定目的MAC(网卡的硬件地址)的NIC(网卡)挂接在哪个端口上。

通过内部交换矩阵迅速将数据包传送到目的端口,目的MAC若不存在,广播到所有的端口,接收端口回应后交换机会“学习”新的地址,并把它添加入内部MAC地址表中。使用交换机也可以把网络“分段”,通过对照MAC地址表,交换机只允许必要的网络流量通过交换机。

通过交换机的过滤和转发,可以有效的减少冲突域,但它不能划分网络层广播,即广播域。交换机在同一时刻可进行多个端口对之间的数据传输。每一端口都可视为独立的网段,连接在其上的网络设备独自享有全部的带宽,无须同其他设备竞争使用。当节点A向节点D发送数据时,节点B可同时向节点C发送数据,而且这两个传输都享有网络的全部带宽,都有着自己的虚拟连接。

假使这里使用的是10Mbps的以太网交换机,那么该交换机这时的总流通量就等于2×10Mbps=20Mbps,而使用10Mbps的共享式HUB时,一个HUB的总流通量也不会超出10Mbps。

总之,交换机是一种基于MAC地址识别,能完成封装转发数据包功能的网络设备。交换机可以“学习”MAC地址,并把其存放在内部地址表中,通过在数据帧的始发者和目标接收者之间建立临时的交换路径,使数据帧直接由源地址到达目的地址。

❸ 思科交换机关闭端口命令

思科交换机关闭端口命令是shut down。

思科shutdown是关闭接口,接口状态会变为DOWN,no shutdown是激活接口,状态变为UP。

多数Cisco交换机默认具有处于非连接状态的端口。这表示端口当前没有连接到任何设备,但如果将其连接到其他正常运行的设备,它将可以建立连接。



Cisco的工作模式

Cisco设备有常用模式为:用户模式、特权模式、全局模式、端口模式。它们之间呈现出递进关系:用户模式->特权模式->全局模式->端口模式。

1、用户模式

交换机启动完成后按下Enter键,首先进入的就是用户模式,在些用户模式下用户将受到极大的限制,只能用来查看一些统计信息。

Switch>

2、特权模式

在用户模式下输入enable(可简写为en(命令就可以进入特权模式,用户在该模式下可以查看并修改Cisco设备的配置。

Switch>en

Switch#

3、全局配置模式在特权模式下输入config terminal(可简写conf t)命令即可,用户在该模式下可修改交换机的全局配置。如修改主机名。

Switch#conf t

Switch(config)#

4、接口模式

在全局配置模式下输入interface fastethernet 0/1(可简写int f0/1)就可以进入到接口模式,在这个模式下所做的配置都是针对f0/1这个接口所设定的。如设定IP等

Switch(config)#int f0/1

Switch(config-if)#

退回到上一模式用exit命令

❹ 求:思科3640交换机查看vlan命令和配置命令和配置以太网接口命令.

1、查看vlan命令:

Switch#show vlan#查看vlan数据库,vlan信息和所属接口

2、配置VLAN命令(交换机配置VLAN,并给将端口加入到该VLAN为例):

cisco-sw1(config)#vlan 2

cisco-sw1(config-vlan)#name test

cisco-sw1(config-vlan)#exit

cisco-sw1(config)#interface fastEthernet 0/1

cisco-sw1(config-if)#switchport mode access

cisco-sw1(config-if)#switchport access vlan 2

(4)思科交换机的命令是什么扩展阅读:

思科交换机其他查看和配置命数世令:

1、Switch#show running-config#查看运行配置,可以通过回车键逐行显示,也可通过空格键逐页显示

2、Switch#show version#查看设备软件版本信息

3、Switch#show clock#查看培毕拿系统时钟也可用于查看log日志后对应时钟分析异常log的发起时间

4、Switch#show log#查看日志,如接口异常关闭,链路的通断,主备机切换

5、Switch#show interface#查看接口详细状态,如IP地址、MAC地址、带宽负载及输入输出速率等

6、Switch#show interface description#快速查看接口连接状态与描述

7、Switch#show interface status#快速查看接口状态及配搭所属vlan及速率双工

8、Switch#show cdp neighbor#查看CDP邻居,CDP协议属于思科私有协议,只能用于查看思科设备,可以查看设备的物理链路状态和连接接口管理地址

9、Switch#show mac-addess-table [dynamic]#查看交换机的MAC地址,括号里面是可选项

❺ 思科交换机常用的100个命令

思科交换机常用的100个命令

在思科交换机上的命令有哪些?哪些命令最实用,你知道吗?下面我为大家分享最常用的思科交换机基本命令,希望能帮助到大家!

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)#plex 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 ”: 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:不保存设置信息

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 mole/port] [detail]

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

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

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

switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail]

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

switch(config-if)# description description-string

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

switch(enable)set port name mole/number description-string

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

❻ 思科2960交换机配置命令都有哪些

思科2960交换机配置命令如下:

1、access: 主要用来接入终端设备,如PC机、服务器、打印服务器等。

2、trunk: 主要用在连接其它交换机,以便在线路上承载多个vlan。

3、multi: 在一个线路中承载多个vlan,但不像trunk,它不对承载的数据打标签。主要用于接入支持多vlan的服务器或者一些网络分析设备。现在基本不使用此类接口,在cisco的网络设备中,也基本不支持此类接口了。


(6)思科交换机的命令是什么扩展阅读:

交换机口令设置:

1、switch>enable;进入特权模式、switch#configterminal;进入全局配置模式、switch(config)#hostname;设置交换机的主机名。

2、switch(config)#enablesecretxxx;设置特权加密口令、switch(config)#enablepasswordxxa;设置特权非密口令。

3、switch(config)#lineconsole0;进入控制台口、switch(config-line)#linevty04;进入虚拟终端。

4、switch(config-line)#login;允许登录、switch(config-line)#passwordxx;设置登录口令xx、switch#exit;返回命令。

❼ 思科交换机进特权模式的命令是什么

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# startup-config running-config

router#c onfigure terminal

router(conf)#enable password cisco

router(conf)#c onfig-register 0x2102

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

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

2. 路由器支持的命令:

路由器显示命令:

router#show run ;显示配置信息

router#show interface ;显示接口信息

router#show ip route ;显示路由信息

router#show cdp nei ;显示邻居信息

router#reload ;重新起动

路由器口令设置:

router>enable ;进入特权模式

router#config terminal ;进入全局配置模式

router(config)#hostname ;设置交换机的主机名

router(config)#enable secret xxx ;设置特权加密口令

router(config)#enable password xxb ;设置特权非密口令

router(config)#line console 0 ;进入控制台口

router(config-line)#line vty 0 4 ;进入虚拟终端

router(config-line)#login ;要求口令验证

router(config-line)#password xx ;设置登录口令xx

router(config)#(Ctrl+z) ;

返回特权模式

❽ 思科交换机路由器常规配置命令大全

你还在为不知道而烦恼么?接下来是我为大家收集的教程,希望能帮到大家。

一、 基本路由器的检验命令

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

配置网路时常采用的命令:和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]

show cdp entry routerA

8.IP Address 配置

Ip address 网路地址 掩码

Ip host 主机名 address

Ip name-server 服务器地址1 服务器地址2 。。。

Ip domain-lookup nsap

Show hosts

Ping 主机名/IP地址

Trace 主机名/IP地址

三、IP 路由

1.静态路由

ip routing

ip route 目标网路号 掩码 端口号 [permanent]

2.预设路由

ip default-network 网路号

3.动态路由

1RIP配置

Router rip

Network 网路号

Show ip route

Show ip protocol

Debug ip

2OSPF 配置

Router ospf 程序号

Redistribute 其它路由协议

Network 端口网路 反掩码 area 区域号

Area 区域号 range 网路号 掩码

Area 区域号 default-cost 花销值

Ip ospf priority number

Ip ospf cost 花销值

Show ip ospf database

3BGP 配置

Router bgp 自治域号

Redistribute 其它路由协议

Network 网路号 /* 自治域内 */

Aggregate-address 网路号 掩码 summary-only 汇总网路

Neighbor 相邻网路号 remote-as 自治域号 /* 自治域间的网路 */

四、流量控制

1被动端口

passive interface 端口号

2预设路由

ip default 网路号/端口网路

3静态路由

ip route 目标网路号 掩码 端口号

4ACL过滤表

全域性上 access-list 访问号1 {permitdeny} 反掩码号 [ established]

access-list 访问号2 {permitdeny} IP/TCP协议 源网路 目的网路

操作符 引数

端口上access-group 访问号 inout

distribute-list 访问号 inout 端口号

4Null 0 interface

Ip route address mask null 0

五、广义网配置

1PPP

Ppp pap sent-usename 封装

Ppp chap hostname

Ppp chap password

2X.25

encapsulation x25 [dce]

x25 address

x25 map 协议地址 /*SVC */

x25 pvc pvc号 ip地址 x25地址 /*PVC */

ip switching

x25 route x.121地址 接口 x.121对映地址

3FrameRelay

Frame-relay local-dlci IP网路号

Frame-relay map 协议地址

Frame-relay lmi-type ansi

❾ cisco配置交换机使能加密口令是什么命令是什么

命令为:lineconsole0。

如下参考:

1.首先点击电脑打开思科软件。使用控制台电缆将计算机连接到路由器。

阅读全文

与思科交换机的命令是什么相关的资料

热点内容
电影和电视播放器 浏览:112
樱桃小说by小花喵 浏览:513
英国看片网站叫什么名字 浏览:676
法兰克plc编程软件 浏览:359
怎么看pdf的字体 浏览:634
和李采潭合作的女演员有哪些 浏览:430
日本那部电影病娇男主要当女主的狗是校园电影 浏览:210
抗日战争片400部 浏览:730
编程可以赚钱吗 浏览:729
eclipseandroid建立工程 浏览:732
大胸女友主演 浏览:276
佛教电影《解怨》国语 浏览:474
哪部电影男孩叫安东 浏览:13
有骑木驴的电影叫什么感觉 浏览:265
windows重启mysql命令 浏览:730
单片机输入输出口接收脉冲 浏览:121
控制电脑鼠标的命令 浏览:213
男男强暴电影 浏览:604
便利店送货上门app叫什么 浏览:468
win8怎么打开命令行 浏览:129