亚洲欧美精品沙发,日韩在线精品视频,亚洲Av每日更新在线观看,亚洲国产另类一区在线5

<pre id="hdphd"></pre>

  • <div id="hdphd"><small id="hdphd"></small></div>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦入門 > 思科2960交換機(jī)的配置命令

      思科2960交換機(jī)的配置命令

      時(shí)間: 志藝942 分享

      思科2960交換機(jī)的配置命令

        你還在為不知道思科2960交換機(jī)的配置命令而煩惱么?接下來是小編為大家收集的思科2960交換機(jī)的配置命令教程,希望能幫到大家。

        思科2960交換機(jī)的配置命令的方法

        交換機(jī)基本狀態(tài):

        switch: ;ROM狀態(tài), 路由器是rommon>

        hostname> ;用戶模式

        hostname# ;特權(quán)模式

        hostname(config)# ;全局配置模式

        hostname(config-if)# ;接口狀態(tài)

        交換機(jī)口令設(shè)置:

        switch>enable ;進(jìn)入特權(quán)模式

        switch#config terminal ;進(jìn)入全局配置模式

        switch(config)#hostname ;設(shè)置交換機(jī)的主機(jī)名

        switch(config)#enable secret xxx ;設(shè)置特權(quán)加密口令

        switch(config)#enable password xxa ;設(shè)置特權(quán)非密口令

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

        switch(config-line)#line vty 0 4 ;進(jìn)入虛擬終端

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

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

        switch#exit ;返回命令

        交換機(jī)VLAN設(shè)置:

        switch#vlan database ;進(jìn)入VLAN設(shè)置

        switch(vlan)#vlan 2 ;建VLAN 2

        switch(vlan)#no vlan 2 ;刪vlan 2

        switch(config)#int f0/1 ;進(jìn)入端口1

        switch(config-if)#switchport access vlan 2 ;當(dāng)前端口加入vlan 2

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

        switch(config-if)#switchport trunk allowed vlan 1,2 ;設(shè)置允許的vlan

        switch(config-if)#switchport trunk encap dot1q ;設(shè)置vlan 中繼

        switch(config)#vtp domain ;設(shè)置發(fā)vtp域名

        switch(config)#vtp password ;設(shè)置發(fā)vtp密碼

        switch(config)#vtp mode server ;設(shè)置發(fā)vtp模式

        switch(config)#vtp mode client ;設(shè)置發(fā)vtp模式

        交換機(jī)設(shè)置IP地址:

        switch(config)#interface vlan 1 ;進(jìn)入vlan 1

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

        switch(config)#ip default-gateway ;設(shè)置默認(rèn)網(wǎng)關(guān)

        switch#dir flash: ;查看閃存

        交換機(jī)顯示命令:

        switch#write ;保存配置信息

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

        switch#show run ;查看當(dāng)前配置信息

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

        switch#show interface ;查看端口信息

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

        交換機(jī)命令總結(jié)

        基本配置命令

        Switch >enable 進(jìn)入特權(quán)模式

        Switch #config terminal 進(jìn)入全局配置模式

        Switch (config)#hostname 設(shè)置交換機(jī)的主機(jī)名

        Switch(config)#enable password 進(jìn)入特權(quán)模式的密碼(明文形式保存)

        Switch(config)#enable secret 加密密碼(加密形式保存) (優(yōu)先)

        Switch(config)#ip default-gateway 配置交換機(jī)網(wǎng)關(guān)

        Switch(config)#show mac-address-table 查看MAC地址

        Switch(config)logging synchronous 阻止控制臺信息覆蓋命令行上的輸入

        Switch(config)no ip domain-lookup 關(guān)閉DNS查找功能

        Switch(config)exec-timeout 0 0 阻止會話退出

        使用Telnet遠(yuǎn)程式管理

        Switch (config)#line vty 0 4 進(jìn)入虛擬終端

        Switch (config-line)# password 設(shè)置登錄口令

        Switch (config-line)# login 要求口令驗(yàn)證

        控制臺口令

        switch(config)#line console 0 進(jìn)入控制臺口

        switch(config-line)# password xx

        switch(config-line)# 設(shè)置登錄口令login 允許登錄

        Cisco發(fā)現(xiàn)協(xié)議(CDP)

        Switch(config)#show cdp 顯示Cisco設(shè)備全局配置信息

        Switch(config)#show cdp interface 端口 查看CDP配置下端口信息

        Switch(config)#show cdp neighbors 顯示直連Cisco設(shè)備信息

        Switch(config)#show cdp neighbors detail 查看鄰居詳細(xì)信息

        恢復(fù)出廠配置

        Switch(config)#erase startup-config

        Switch(config)delete vlan.dat

        配置接口標(biāo)識 接口標(biāo)識用于區(qū)分路由器的各個(gè)接口。

        switch(config)#interface fastethernet 0/1 以0/1 接口為例

        switch(config)# description this is a fast Ethernet port used to connecting the company’s intranet!

        Vtp配置

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

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

        switch(config)#vtp mode server /client/transparent 設(shè)置vtp服務(wù)器模式

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

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

        注:要想從vtp中減少一臺交換機(jī)只需將該交換機(jī)vtp 域名更改

        Vlan基本配置

        Switch#vlan database 進(jìn)去vlan配置模式

        Switch(vlan)#vlan 號碼 name 名稱 創(chuàng)建vlan及vlan名

        Switch(vlan)#vlan號碼 mtu數(shù)值 修改MTU大小

        Switch(vlan)#exit 更新vlan數(shù)據(jù)并推出

        Switch#show vlan 查看\驗(yàn)證

        Switch#copy running-config startup-config 保存配置

        叫NO 刪除VLAN

        VLAN 中添加 刪除端口

        Switch#config terminal 進(jìn)入全局配置

        Switch(config)#interface fastethernet0/1 進(jìn)入要分配的端口

        Switch(config-if)#Switchport mode access 定義二層端口

        Switch(config-if)#Switchport acces vlan 號 把端口分給一個(gè)vlan

        Switch(config-if)#switchport mode trunk 設(shè)置為干線

        Switch(config-if)#switchport trunk encapsulation dot1q 設(shè)置vlan 中繼協(xié)議

        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中刪除vlan

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

        查看vlan信息 Switch#show vlan brief 所有vlan信息

        查看vlan信息 Switch#show vlan id 某個(gè)vlan信息

        注:Switch#show int trunk 查看trunk協(xié)議

        注:可以使用default interface interface-id 還原接口到默認(rèn)配置狀態(tài)

        Trunk

        開啟(no) ——將端口設(shè)置為永久中繼模式

        關(guān)閉(off) ——將端口設(shè)置為永久非中繼模式, 并且將鏈路轉(zhuǎn)變?yōu)榉侵欣^鏈路

        企望(desirable)——讓端口主動試圖將鏈路轉(zhuǎn)換成中繼鏈路

        自動(auto) ——使該端口愿意將鏈路變成中繼鏈路

        配置接口為動態(tài)協(xié)商模式

        Switch(config)#interface 接口號

        Switch(config)#switchport mode dynamic desirable/auto

        生成樹stp:

        Switch(config)#spanning-tree vlan 啟用stp生成樹(基于vlan)

        Switch(config)#spanning-tree vlan root primary 指定根交換機(jī)(基于vlan)

        Switch(config)#spanning-tree vlan root secondary 指定備用根交換機(jī)(基于vlan)

        Switch(config)#spanning-tree vlan priority <0-65535> 指定交換機(jī)優(yōu)先級(基于vlan)

        Switch(config)#no spanning-tree vlan priority 將交換機(jī)的優(yōu)先級恢復(fù)默認(rèn)值(基于vlan)

        Switch(config-if)#spanning-tree vlan cost <0-200000000> 指定端口成本(起用trunk的端口模式下)

        Switch(config-if)#spanning-tree vlan port-prioty <0-255> 指定交換機(jī)端口優(yōu)先級(基于vlan)

        Switch(config-if)#spanning-tree portfast 配置速端口(連接終端設(shè)備的端口狀態(tài))如pc機(jī)

        Switch(config)#spanning-tree uplinkfast 配置上行速端口

        注:在配置上行速端口前要先將基于vlan上的網(wǎng)橋優(yōu)先級,網(wǎng)橋成本恢復(fù)默認(rèn)值。起用了該命令后在進(jìn)行優(yōu)先級更改,

        注:vlan為可選參數(shù),當(dāng)沒有該參數(shù)時(shí)將修改所有vlan網(wǎng)橋的優(yōu)先級\及所有的vlan端口成本

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

        Switch#show spanning-tree vlan detail 瀏覽詳細(xì)生成樹配置信息

        Switch#show spanning-tree interface detail 瀏覽詳細(xì)生成樹端口配置信息

        以太網(wǎng)通道配置

        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}在鏈路間實(shí)現(xiàn)負(fù)載均衡

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

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

        交換機(jī)顯示命令:

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

        switch#show running-config 查看當(dāng)前配置信息

        switch#show vlan 查看vlan配置信息

        switch#show interface 查看端口信息

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

        switch#dir flash: 查看閃存

        switch#show version 查看當(dāng)前版本信息

        switch#show cdp cisco設(shè)備發(fā)現(xiàn)協(xié)議 (可以查看聆接設(shè)備)

        switch#show cdp traffic 杳看接收和發(fā)送的cdp包統(tǒng)計(jì)信息

        switch#show cdp neighbors 查看與該設(shè)備相鄰的cisco設(shè)備

        switch#show interface f0/1 switchport 查看有關(guān)switchport的配置

        switch#show cdp neighbors 查看與該設(shè)備相鄰的cisco設(shè)備

        配置接口標(biāo)識 接口標(biāo)識用于區(qū)分路由器的各個(gè)接口。

        switch(config)#interface fastethernet 0/1 以0/1 接口為例

        switch(config)# description this is a fast Ethernet port used to connecting the company’s intranet!

        Vtp配置

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

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

        switch(config)#vtp mode server /client/transparent 設(shè)置vtp服務(wù)器模式

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

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

        注:要想從vtp中減少一臺交換機(jī)只需將該交換機(jī)vtp 域名更改

        Vlan基本配置

        Switch#vlan database 進(jìn)去vlan配置模式

        Switch(vlan)#vlan 號碼 name 名稱 創(chuàng)建vlan及vlan名

        Switch(vlan)#vlan號碼 mtu數(shù)值 修改MTU大小

        Switch(vlan)#exit 更新vlan數(shù)據(jù)并推出

        Switch#show vlan 查看\驗(yàn)證

        Switch#copy running-config startup-config 保存配置

        叫NO 刪除VLAN

        VLAN 中添加 刪除端口

        Switch#config terminal 進(jìn)入全局配置

        Switch(config)#interface fastethernet0/1 進(jìn)入要分配的端口

        Switch(config-if)#Switchport mode access 定義二層端口

        Switch(config-if)#Switchport acces vlan 號 把端口分給一個(gè)vlan

        Switch(config-if)#switchport mode trunk 設(shè)置為干線

        Switch(config-if)#switchport trunk encapsulation dot1q 設(shè)置vlan 中繼協(xié)議

        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中刪除vlan

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

        查看vlan信息 Switch#show vlan brief 所有vlan信息

        查看vlan信息 Switch#show vlan id 某個(gè)vlan信息

        注:Switch#show int trunk 查看trunk協(xié)議

        注:可以使用default interface interface-id 還原接口到默認(rèn)配置狀態(tài)

        Trunk

        開啟(no) ——將端口設(shè)置為永久中繼模式

        關(guān)閉(off) ——將端口設(shè)置為永久非中繼模式, 并且將鏈路轉(zhuǎn)變?yōu)榉侵欣^鏈路

        企望(desirable)——讓端口主動試圖將鏈路轉(zhuǎn)換成中繼鏈路

        自動(auto) ——使該端口愿意將鏈路變成中繼鏈路

        配置接口為動態(tài)協(xié)商模式

        Switch(config)#interface 接口號

        Switch(config)#switchport mode dynamic desirable/auto

        生成樹stp:

        Switch(config)#spanning-tree vlan 啟用stp生成樹(基于vlan)

        Switch(config)#spanning-tree vlan root primary 指定根交換機(jī)(基于vlan)

        Switch(config)#spanning-tree vlan root secondary 指定備用根交換機(jī)(基于vlan)

        Switch(config)#spanning-tree vlan priority <0-65535> 指定交換機(jī)優(yōu)先級(基于vlan)

        Switch(config)#no spanning-tree vlan priority 將交換機(jī)的優(yōu)先級恢復(fù)默認(rèn)值(基于vlan)

        Switch(config-if)#spanning-tree vlan cost <0-200000000> 指定端口成本(起用trunk的端口模式下)

        Switch(config-if)#spanning-tree vlan port-prioty <0-255> 指定交換機(jī)端口優(yōu)先級(基于vlan)

        Switch(config-if)#spanning-tree portfast 配置速端口(連接終端設(shè)備的端口狀態(tài))如pc機(jī)

        Switch(config)#spanning-tree uplinkfast 配置上行速端口

        注:在配置上行速端口前要先將基于vlan上的網(wǎng)橋優(yōu)先級,網(wǎng)橋成本恢復(fù)默認(rèn)值。起用了該命令后在進(jìn)行優(yōu)先級更改,

        注:vlan為可選參數(shù),當(dāng)沒有該參數(shù)時(shí)將修改所有vlan網(wǎng)橋的優(yōu)先級\及所有的vlan端口成本

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

        Switch#show spanning-tree vlan detail 瀏覽詳細(xì)生成樹配置信息

        Switch#show spanning-tree interface detail 瀏覽詳細(xì)生成樹端口配置信息

        以太網(wǎng)通道配置

        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}在鏈路間實(shí)現(xiàn)負(fù)載均衡

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

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

        交換機(jī)顯示命令:

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

        switch#show running-config 查看當(dāng)前配置信息

        switch#show vlan 查看vlan配置信息

        switch#show interface 查看端口信息

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

        switch#dir flash: 查看閃存

        switch#show version 查看當(dāng)前版本信息

        switch#show cdp cisco設(shè)備發(fā)現(xiàn)協(xié)議 (可以查看聆接設(shè)備)

        switch#show cdp traffic 杳看接收和發(fā)送的cdp包統(tǒng)計(jì)信息

        switch#show cdp neighbors 查看與該設(shè)備相鄰的cisco設(shè)備

        switch#show interface f0/1 switchport 查看有關(guān)switchport的配置

        switch#show cdp neighbors 查看與該設(shè)備相鄰的cisco設(shè)備

      看了“思科2960交換機(jī)的配置命令”還看了:

      1.cisco2960交換機(jī)安裝配置基礎(chǔ)詳解

      2.思科交換機(jī)配置命令 交換機(jī)VLAN設(shè)置方法

      3.思科交換機(jī)配置教程詳解

      4.Cisco 2960交換機(jī)的基礎(chǔ)安裝配置教程

      5.思科交換機(jī)基本配置實(shí)例講解

      6.思科2960系列交換機(jī)限速命令

      2743394