導航:首頁 > 程序命令 > 交換機全局命令

交換機全局命令

發布時間:2022-06-05 05:50:19

❶ 誰能告訴我交換機特權模式和全局模式下的命令都有哪些急用…

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 //進入全局模式
aptech2950(conf)# enable password cisco //紅色部分為密碼

5:配置使能密碼 enable secret ciscolab 密碼以cicso01為例
switch> enable //進入特權模式
switch#configure terminal //進入全局模式
aptech2950(conf)# enable secret ciscol01 //紅色部分為加密密碼

6:設置交換機IP 地址
switch> enable //進入特權模式
switch#configure terminal //進入全局模式
aptech2950(conf)# interface vlan 1 //進入vlan1
aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 //配置交換機埠ip和子網掩碼
aptech2950(conf-if)#no shut //開啟vlan1
aptech2950(conf-if)#exit
aptech2950(conf)#ip default-gateway 192.168.254 //設置網關地址

7:進入交換機某一埠,以7埠為例;
switch> enable //進入特權模式
switch#configure terminal //進入全局模式
aptech2950(conf)# interface fastehernet 0/7 //進入第7口
aptech2950(conf-if)#

8:查看命令 show
switch> enable //進入特權模式
switch# show version //察看系統版本信息
show interface vlan 1 //查看交換機有關vlan1的配置信息
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 //出廠默認恢復命令 s
witch# reload //從新啟動

10:雙工模式設置
switch> enable //進入特權模式
switch#configure terminal //進入全局模式
switch(conf)# interface fastehernet 0/7 //以7口為例
Switch(conf)# plex full/half/auto //有half:半雙工,full:全雙工,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#configure 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 #configure terminal
router (conf)#

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

5:配置使能密碼 enable secret ciscolab 以cicsolab為例
router > enable
router #configure terminal
router(conf)#hostname routerA
routerA (conf)# enable secret ciscolab

6:進入路由器某一埠 interface fastehernet 0/17 以17埠為例
router > enable
router #configure terminal
router(conf)#hostname routerA
routerA (conf)# interface fastehernet 0/17
routerA (conf-if)#
進入路由器的某一子埠
interface fastethernet 0/17.1 以17埠的1子埠為例
router > enable
router #configure terminal
router(conf)#hostname routerA
routerA (conf)# interface fastehernet 0/17.1

7:設置埠ip地址信息
router > enable
router #configure 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中: router>enable router# startup-config running-config
然後重新設置enable密碼: router#configure terminal router(conf)#enable password cisco
並把配置寄存器改回0x2102: router(conf)#config-register 0x2102
保存當前配置到startup-config: router # running-config startup-config router
重新啟動路由器: #reload

11:路由器telnet遠程登錄設置:
router>en
router #configure 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 #configure 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 #configure 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 #configure terminal
router (conf)#hostname routerA
routerA(conf)#line console 0
routerA(conf-if)#exec-timeout 0 0 第一個「0」代表分鍾,第二個「0」代表秒

15:配置串口參數
兩台路由器通過串口連接需要一個做為DTE,一個做為DCE。
DCE設備要向DTE設備提供時鍾頻率和帶寬。
DCE配置:
router>en
router #configure 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 #configure 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:

16:靜態路由的配置
配置路由器A的主機名和介面參數
router>enable
router#configure 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#configure 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

❷ 交換機配置命令

1、交換機配置命令,英文名Switchboard Command,是一種計算機語言,用來控制交換機的語言。

❸ 交換機的基本命令是什麼

「Switch>」

❹ 寫出交換機五種命令狀態行和各種命令之間的切換方式

交換機用戶視圖 使用 enable命令進入特權模式,在特權模式下使用 config t 命令進入全局配置模式,在全局配置模式下使用 interface + 介面名 ,進入介面識圖。
使用exit命令退出到上一級識圖,直接使用end命令可以直接退出到特權模式。
華為系列交換機使用 system 進入系統識圖,quit退出識圖返回上一級菜單。

❺ 進入交換機各個模式命令是什麼

enable 進特權模式

特權模式下輸入
configure terminal 進入全局配置模式

全局配置模式輸入
interface E0/1 進介面配置模式 <輸入介面名如:E0/1>

輸入exit返回全局配置模式

任意模式下按CTRL+C鍵返回特權模式

❻ 交換機全部命令和漢語翻譯,高分送上!

交換機配置命令詳解 1. 交換機支持的命令: 交換機基本狀態: switch: ;ROM狀態, 路由器是rommon hostname ;用戶模式 hostname# ;特權模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;介面狀態 交換機口令設置: switchenable ;進入特權模式 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 ;查看指定埠信息

❼ 普通交換機常用配置命令是什麼

第一個回答的那個就挺詳細的,算是普通操作吧。基本上包括第一次進機的配置,密碼配置,創建vlan,對特定埠設定訪問vlan,基本的就這些了,其他的比如show命令,這個有很多選項的,show
running-config之類的查看工作狀態和排錯的也很多也重要。

❽ 在交換機的全局配置模式下鍵入命令,請問能夠查看交換機的什麼信息

一級命令標題及釋義

❾ 華為交換機從特權到全局的命令是什麼 華為交換機幾種模式的切換命令是什麼

華為交換機切換命令如下:



(9)交換機全局命令擴展閱讀:

華為交換機VRP系統配置文件是VRP命令行的集合,用戶可將當前配置保存到配置文件中,以便在交換機重啟後這些配置能夠繼續生效。另外,通過配置文件用戶可以非常方便地查閱配置信息,也可以將配置文件上傳到其它的交換機上,實現交換機的批量配置。

配置文件為文本文件,其規則如下:

1、以命令格式保存。

2、為了節省空間,只保存非預設的參數。

3、以命令視圖為基本框架,同一命令視圖的命令組織在一起,形成一節,節與節之間通常用空行或注釋行隔開(以「#」開始的為注釋行)。空行或注釋行可以是一行或多行。

4、文件中各節的順序安排通常為:全局配置、介面配置、各種協議配置和用戶界面配置。

5、配置文件必須以「.cfg」或「.zip」作為擴展名,而且必須存放在存儲交換機的根目錄下。

❿ 交換機的常用配置命令

a、更改遠程TELNNET密碼
Switch#configure terminal

Switch(config)#line vty 0 4

Switch(config-line)#password qycx123

Switch(config-line)#login

Switch(config-line)#exit

b、更改進入全局配置模式時的密碼

Switch#configure terminal

Switch(config)#enable secret qycx123

思科交換機常用命令——創建並劃分VLAN

a、創建VLAN

Switch#vlan database

Switch(vlan)#vlan 99 name office (創建vlan 99 並命名為office)

b、將埠劃分至vlan

Switch(config)#interface fastEthernet 0/8

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 99 (將8號快速以太口劃分至vlan 99)

思科交換機常用命令——調試命令

a、顯示所有配置命令:Switch#show run

b、顯示所有介面狀態:Switch#show ip int brief

c、顯示所有VLAN的信息:Switch#show vlan brief

cisco交換機還是比較常用的,於是我研究了一下Cisco交換機命令的大總結,在這里拿出來和大家分享一下,希望對大家有用。我所針對的都是Cisco的設備而言的,華為的可以跟據手冊來查,配置都是差不多的,這里華子就不多寫華為的設備了,了解的也不是很多。

Cisco交換機命令之使用Telnet遠程式管理

switch(config)#interface vlan 1 進入vlan 1

switch(config-if)#ip address 設置IP地址

switch(config-if)#ip default-gateway 設置默認網關

switch(config)#line vty 0 4 進入虛擬終端

switch(config-line)#login 允許登錄

switch(config-line)#password xx 設置登錄口令

switch#exit 返回命令

Cisco交換機命令之控制台口令

switch(config)#line console 0 進入控制台口

switch(config-line)#login 允許登錄

switch(config-line)#password xx 設置登錄口令

switch#exit 返回命令

Cisco交換機命令之基本介面配置

switch(config)#interface f0/1 進入f0/1介面

switch(config-if)#plex full 配置全雙工模式

switch(config-if)#speed 100 配置速率

switch(config-if)#description to ***** 介面描述

switch(config)#ip domain-name ***.com 設置或名伺服器

switch(config)#mac-address-table aging-time 設置mac表超時時間

switch#write 保存配置信息

switch# running-config startup-config 保存當前配置nvram

switch#erase startup-config 清除配置文件

Cisco交換機命令之交換機VLAN設置:

switch#vlan database 進入VLAN設置

switch(vlan)#vlan 2 建VLAN 2

switch(vlan)#name 名字 建VLAN 2的名稱

switch(vlan)#no vlan 2 刪vlan 2

注:刪除vlan時原屬於此vlan的埠處於非激活狀態,直到重新分配為止。

switch(config)#int f0/1 進入埠1

switch(config-if)#switchport mode access 當前埠工作莫試

switch(config-if)#switchport access vlan 2 當前埠加入vlan 2

switch(config-if)#switchport mode trunk 設置為干線

switch(config-if)#switchport trunk encapsulation dot1q 設置vlan 中繼協議

switch(config-if)#no switchport mode 或 ( switchport mode access) 禁用干線

switch(config-if)#switchport trunk allowed vlan add 1,2 ; 從Trunk中添加vlans

switch(config-if)#switchport trunk allowed vlan remove 1,2 ;從Trunk中刪除vlans

switch(config-if)#switchport trunk pruning vlan remove 1,2 ;從Trunk中關閉局部修剪

Cisco交換機命令之乙太網通道配置

switch(config)#interface range fasternet0/1 - 2 將fasternet0/1和0/2 口捆綁

switch(config-if)#channel-group 1 mode on 配置以太通道模式

switch(config-if)#port-channel load-balance {dst-mac | src-mac}在鏈路間實現負載均衡

switch#show etherchannel 1 summary 查看通道信息

switch#show etherchannel load-balance 查看通道信息

Cisco交換機命令之vtp配置

switch(config)#vtp domain 設置vtp域名

switch(config)#vtp password 設置vtp密碼

switch(config)#vtp mode server 設置vtp伺服器模式

switch(config)#vtp mode client 設置vtp客戶機模式

switch(config)#vtp mode transparent 設置vtp 透明模式

switch(config)#vtp version 設置vtp版本

switch(config)#vtp pruning 啟用vtp修解

switch(config)#no vtp pruning 關閉vtp修解

注:要想從vtp中減少一台交換機只需將該交換機vtp 名更改

Cisco交換機命令之生成樹stp:

switch(config)#spanning-tree vlan 啟用stp生成樹(基於vlan)

switch(config)#spanning-tree vlan root primary 指定根交換機(基於vlan)

switch(config)#spanning-tree vlan root secondary 指定備用根交換機(基於vlan)

switch(config)#spanning-tree vlan priority 指定交換機優先順序(基於vlan)

switch(config)#no spanning-tree vlan priority 將交換機的優先順序恢復默認值(基於vlan)

switch(config-if)#spanning-tree vlan cost 指定埠成本(起用trunk的埠模式下)

switch(config-if)#spanning-tree vlan port-prioty 指定交換機埠優先順序(基於vlan)

switch(config-if)#spanning-tree portfast 配置速埠(連接終端設備的埠狀態)如pc機

switch(config)#spanning-tree uplinkfast 配置上行速埠

switch(config)#spanning-tree vlan hello-time 配置交換機hello時間(基於vlan)

switch(config)#spanning-tree vlan forward-time 修改轉發延遲計時器(基於vlan)

switch(config)#spanning-tree vlan max-time 修改最大老化時間(基於vlan)

switch#show spanning-tree summery 檢測vlan生成樹配置

switch#show spanning-tree vlan detail 瀏覽詳細生成樹配置信息

switch#show spanning-tree interface detail 瀏覽詳細生成樹埠配置信息

Cisco交換機命令之交換機顯示命令:

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

switch#show running-config 查看當前配置信息

switch#show vlan 查看vlan配置信息

switch#show interface 查看埠信息

switch#show int f0/0 查看指定埠信息

switch#dir flash: 查看快閃記憶體

switch#show version 查看當前版本信息

switch#show mac-address-table aging-time 查看mac超時時間

switch#show cdp cisco設備發現協議 (可以查看聆接設備)

switch#show cdp traffic 杳看接收和發送的cdp包統計信息

switch#show cdp neighbors 查看與該設備相鄰的cisco設備

switch#show interface f0/1 switchport 查看有關switchport的配置

switch#show cdp neighbors 查看與該設備相鄰的cisco設備

閱讀全文

與交換機全局命令相關的資料

熱點內容
單片機游標上下移動 瀏覽:526
數據加密驗證 瀏覽:106
程序員被激怒 瀏覽:889
winxp找不到伺服器dns地址 瀏覽:840
以文本文件的格式保存考生文件夾 瀏覽:39
編譯原理文法分為幾類 瀏覽:568
JAVA基礎學python要多久 瀏覽:72
java流量控制 瀏覽:934
java實現多重繼承 瀏覽:705
票據通加密狗怎麼在新系統上使用 瀏覽:793
航模加密狗連接電腦 瀏覽:471
好用的匯編語言編譯器 瀏覽:861
自己編譯安卓虛擬機 瀏覽:911
中國的古代演算法 瀏覽:654
上層怎麼看程序員 瀏覽:25
程序員便當排骨 瀏覽:853
如何禁用安卓全家桶 瀏覽:259
oa伺服器異常怎麼辦 瀏覽:71
cmd編譯utf8 瀏覽:278
怎麼截取app接受的數據 瀏覽:278