當前位置:編程學習大全網 - 腳本源碼 - 思科交換機詳細配置方法和命令

思科交換機詳細配置方法和命令

思科交換機的基本配置命令學習

壹、交換機口令設置:

switch>enable ;進入特權模式

switch#config terminal ;進入全局配置模式

switch(config)#hostname csico ;設置交換機的主機名

switch(config)#enable secret

csico1 ;設置特權加密口令

switch(config)#enable password csico8 ;設置特權非密口令

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

switch(config-line)#line vty 0 4

;進入虛擬終端

switch(config-line)#login ;虛擬終端允許登錄

switch(config-line)#password

csico6 ;設置虛擬終端登錄口令csico6

switch#exit ;返回命令

二、交換機顯示命令:

switch#write ;保存配置信息

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

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

switch#show

vlan ;查看vlan配置信息

switch#show interface ;查看端口信息

switch#show int f0/0

;查看指定端口信息

switch#show int f0/0 status;查看指定端口狀態

switch#dir flash: ;查看閃存

Cisco路由器配置命令大全網絡 2010-06-26 06:43:44 閱讀657 評論0 字號:大中小 訂閱 .

(1)模式轉換命令

用戶模式----特權模式,使用命令"enable"

特權模式----全局配置模式,使用命令"config

t"

全局配置模式----接口模式,使用命令"interface+接口類型+接口號"

全局配置模式----線控模式,使用命令"line+接口類型+接口號"

註:

用戶模式:查看初始化的信息.

特權模式:查看所有信息、調試、保存配置信息

全局模式:配置所有信息、針對整個路由器或交換機的所有接口

接口模式:針對某壹個接口的配置

線控模式:對路由器進行控制的接口配置

(2)配置命令

show running config 顯示所有的配置

show

versin 顯示版本號和寄存器值

shut down 關閉接口

no shutdown 打開接口

ip add +ip地址

配置IP地址

secondary+IP地址 為接口配置第二個IP地址

show interface+接口類型+接口號 查看接口管理性

show controllers interface 查看接口是否有DCE電纜

show history 查看歷史記錄

show

terminal 查看終端記錄大小

hostname+主機名 配置路由器或交換機的標識

config memory

修改保存在NVRAM中的啟動配置

exec timeout 0 0 設置控制臺會話超時為0

service password-encryptin

手工加密所有密碼

enable password +密碼 配置明文密碼

ena sec +密碼 配置密文密碼

line vty 0

4/15 進入telnet接口

password +密碼 配置telnet密碼

line aux 0 進入AUX接口

password

+密碼 配置密碼

line con 0 進入CON接口

password +密碼 配置密碼

bandwidth+數字 配置帶寬

no ip address 刪除已配置的IP地址

show startup config 查看NVRAM中的配置信息

copy

run-config atartup config 保存信息到NVRAM

write 保存信息到NVRAM

erase

startup-config 清除NVRAM中的配置信息

show ip interface brief 查看接口的謫要信息

banner

motd # +信息 + # 配置路由器或交換機的描素信息

description+信息 配置接口聽描素信息

vlan database

進入VLAN數據庫模式

vlan +vlan號+ 名稱 創建VLAN

switchport access vlan +vlan號

為VLAN為配接口

interface vlan +vlan號 進入VLAN接口模式

ip add +ip地址 為VLAN配置管理IP地址

vtp+service/tracsparent/client 配置SW的VTP工作模式

vtp +domain+域名 配置SW的VTP域名

vtp +password +密碼 配置SW的密碼

switchport mode trunk 啟用中繼

no vlan +vlan號

刪除VLAN

show spamming-tree vlan +vlan號 查看VLA怕生成樹議

三. 路由器配置命令

ip

route+非直連網段+子網掩碼+下壹跳地址 配置靜態/默認路由

show ip route 查看路由表

show protocols

顯示出所有的被動路由協議和接口上哪些協議被設置

show ip protocols 顯示了被配置在路由器上的路由選擇協議,同時給出了在路由選擇協議中使用

的定時器

等信息

router rip 激活RIP協議

network +直連網段 發布直連網段

interface lookback 0 激活邏輯接口

passive-interface +接口類型+接口號 配置接口為被動模式

debug ip +協議 動態查看路由更新信息

undebug all 關閉所有DEBUG信息

router eigrp +as號

激活EIGRP路由協議

network +網段+子網掩碼 發布直連網段

show ip eigrp neighbors 查看鄰居表

show ip eigrp topology 查看拓撲表

show ip eigrp traffic 查看發送包數量

router

ospf +process-ID 激活OSPF協議

network+直連網段+area+區域號 發布直連網段

show ip ospf

顯示OSPF的進程號和ROUTER-ID

encapsulation+封裝格式 更改封裝格式

no ip admain-lookup

關閉路由器的域名查找

ip routing 在三層交換機上啟用路由功能

show user 查看SW的在線用戶

clear line

+線路號 清除線路

四. 三層交換機配置命令

配置壹組二層端口

configure terminal 進入配置狀態

nterface range {port-range} 進入組配置狀態

配置三層端口

configure terminal 進入配置狀態

interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} |

{port-

channel port-channel-number} 進入端口配置狀態

no switchport

把物理端口變成三層口

ip address ip_address subnet_mask 配置IP地址和掩碼

no shutdown 激活端口

例:

Switch(config)# interface gigabitethernet0/2

Switch(config-if)#

no switchport

Switch(config-if)# ip address 192.20.135.21 255.255.255.0

Switch(config-if)# no shutdown

配置VLAN

configure terminal 進入配置狀態

vlan vlan-id 輸入壹個VLAN號, 然後進入vlan配態,可以輸入壹個新的VLAN號或舊的來進行修改

  • 上一篇:芊羽這個名字出自哪裏
  • 下一篇:大家推薦壹下好書
  • copyright 2024編程學習大全網