• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學習啦 > 學習電腦 > 電腦入門 > 思科2960交換機的配置命令

    思科2960交換機的配置命令

    時間: 志藝942 分享

    思科2960交換機的配置命令

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

      思科2960交換機的配置命令的方法

      交換機基本狀態:

      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 ;查看指定端口信息

      交換機命令總結

      基本配置命令

      Switch >enable 進入特權模式

      Switch #config terminal 進入全局配置模式

      Switch (config)#hostname 設置交換機的主機名

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

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

      Switch(config)#ip default-gateway 配置交換機網關

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

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

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

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

      使用Telnet遠程式管理

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

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

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

      控制臺口令

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

      switch(config-line)# password xx

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

      Cisco發現協議(CDP)

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

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

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

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

      恢復出廠配置

      Switch(config)#erase startup-config

      Switch(config)delete vlan.dat

      配置接口標識 接口標識用于區分路由器的各個接口。

      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 設置vtp域名

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

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

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

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

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

      Vlan基本配置

      Switch#vlan database 進去vlan配置模式

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

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

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

      Switch#show vlan 查看\驗證

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

      叫NO 刪除VLAN

      VLAN 中添加 刪除端口

      Switch#config terminal 進入全局配置

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

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

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

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

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

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

      查看vlan信息 Switch#show vlan id 某個vlan信息

      注:Switch#show int trunk 查看trunk協議

      注:可以使用default interface interface-id 還原接口到默認配置狀態

      Trunk

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

      關閉(off) ——將端口設置為永久非中繼模式, 并且將鏈路轉變為非中繼鏈路

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

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

      配置接口為動態協商模式

      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 指定根交換機(基于vlan)

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

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

      Switch(config)#no spanning-tree vlan priority 將交換機的優先級恢復默認值(基于vlan)

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

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

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

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

      注:在配置上行速端口前要先將基于vlan上的網橋優先級,網橋成本恢復默認值。起用了該命令后在進行優先級更改,

      注:vlan為可選參數,當沒有該參數時將修改所有vlan網橋的優先級\及所有的vlan端口成本

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

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

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

      以太網通道配置

      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 查看通道信息

      交換機顯示命令:

      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 cdp cisco設備發現協議 (可以查看聆接設備)

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

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

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

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

      配置接口標識 接口標識用于區分路由器的各個接口。

      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 設置vtp域名

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

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

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

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

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

      Vlan基本配置

      Switch#vlan database 進去vlan配置模式

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

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

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

      Switch#show vlan 查看\驗證

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

      叫NO 刪除VLAN

      VLAN 中添加 刪除端口

      Switch#config terminal 進入全局配置

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

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

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

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

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

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

      查看vlan信息 Switch#show vlan id 某個vlan信息

      注:Switch#show int trunk 查看trunk協議

      注:可以使用default interface interface-id 還原接口到默認配置狀態

      Trunk

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

      關閉(off) ——將端口設置為永久非中繼模式, 并且將鏈路轉變為非中繼鏈路

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

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

      配置接口為動態協商模式

      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 指定根交換機(基于vlan)

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

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

      Switch(config)#no spanning-tree vlan priority 將交換機的優先級恢復默認值(基于vlan)

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

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

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

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

      注:在配置上行速端口前要先將基于vlan上的網橋優先級,網橋成本恢復默認值。起用了該命令后在進行優先級更改,

      注:vlan為可選參數,當沒有該參數時將修改所有vlan網橋的優先級\及所有的vlan端口成本

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

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

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

      以太網通道配置

      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 查看通道信息

      交換機顯示命令:

      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 cdp cisco設備發現協議 (可以查看聆接設備)

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

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

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

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

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

    1.cisco2960交換機安裝配置基礎詳解

    2.思科交換機配置命令 交換機VLAN設置方法

    3.思科交換機配置教程詳解

    4.Cisco 2960交換機的基礎安裝配置教程

    5.思科交換機基本配置實例講解

    6.思科2960系列交換機限速命令

    2743394 主站蜘蛛池模板: 成人妇女免费播放久久久| 波多野吉衣中文字幕| 夫妇交换性2国语在线观看| 亚洲系列国产精品制服丝袜第| 99久久人妻无码精品系列| 欧美亚洲精品suv| 国产免费久久精品丫丫| 两个人看的www在线视频| 特级精品毛片免费观看| 国产精品一区二区久久沈樵| 久久国产加勒比精品无码| 精品视频午夜一区二区| 在线中文字幕播放| 九九久久国产精品免费热6| 老师那里好大又粗h男男| 天堂资源最新在线| 亚洲av永久青草无码精品| 药店打针1_标清| 大香伊蕉日本一区二区| 亚洲一级毛片免费看| 股间白浊失禁跪趴老师| 夜夜揉揉日日人人青青| 亚洲一区二区三区播放在线| 色天天综合色天天碰| 天天干天天射天天爽| 亚洲av无码片在线观看| 美国一级毛片免费视频观看| 国模极品一区二区三区| 久久国产精品免费一区二区三区| 精品国偷自产在线| 国产精品吹潮香蕉在线观看| 久久久久亚洲av无码专区蜜芽 | AV无码小缝喷白浆在线观看| 欧美亚洲综合另类在线观看| 国产chinesehd精品酒店| 99久久99久久精品免费观看| 日韩电影免费在线观看网站 | 狠狠色伊人亚洲综合成人| 国产成人综合在线视频| 一个人看的片免费高清大全| 欧美jizz18性欧美|