交換機的基本原理配置(一)

1、配置主機名

在全局模式下輸入hostname 名字 然后回車即可立馬生效(在生產環境交換機必須有自己唯一的名字)
 Switch(config)#hostname jsh-sw1jsh-sw1(config)#

2、顯示系統OS名稱及版本信息

特權模式下,輸入命令 show version
 Switch#show versionCisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)Copyright (c) 1986-2005 by Cisco Systems, Inc.Compiled Wed 12-Oct-05 22:05 by pt_teamROM: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4)System returned to ROM by power-onCisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory.
 24 FastEthernet/IEEE 802.3 interface(s)      ——說明有24個百兆接口2 Gigabit Ethernet/IEEE 802.3 interface(s)   ——說明有 2個千兆接口63488K bytes of flash-simulated non-volatile configuration memory.<u>Base ethernet MAC Address    : 0040.0BE5.7EEE</u>    (MAC地址)Motherboard assembly number     : 73-9832-06Power supply part number        : 341-0097-02<u>Motherboard serial number    : FOC103248MJ</u>       (主板S/N序列號,用于辨別交換機)Power supply serial number      : DCA102133JAModel revision number           : B0Motherboard revision number     : C0Model number                    : WS-C2960-24TTSystem serial number            : FOC1033Z1EY--More--

3、查看交換機的MAC地址表

特權模式下輸入命令 show mac-address-table 顯示靜態MAC地址(手工方式添加,無老化時間,會一直存在)
特權模式下輸入命令 show mac-address-table dynamic 顯示動態MAC地址(通過arp學習到的,有老化時間)

image

 Switch3#show mac-address-table Mac Address Table-------------------------------------------Vlan    Mac Address       Type        Ports----    -----------       --------    -----1    0000.0c0c.7a5a    DYNAMIC     Fa0/24 (其中0000.0c0c.7a5a是MAC地址;類型DYNAMIC表示是動態學習到的;Fa0/24表示該MAC地址對應交換機的端口號)1    0001.9734.c756    DYNAMIC     Fa0/241    0001.c981.6818    DYNAMIC     Fa0/241    0004.9a65.ed19    DYNAMIC     Fa0/11    00e0.f99e.4637    DYNAMIC     Fa0/2

4、指定接口的雙工模式

在接口模式下,輸入命令duplex full 則設置為:全雙工
在接口模式下,輸入命令duplex half 則設置為:辦雙工
在接口模式下,輸入命令duplex auto 則設置為:自動(默認為此模式)

5、指定接口的速率

在接口模式下,輸入命令 speed 10 則設置為10M
在接口模式下,輸入命令 speed 100 則設置為100M
在接口模式下,輸入命令 speed 1000 則設置為1000M
在接口模式下,輸入命令 speed auto 則設置為自動(默認為此速度)
 Switch(config-if)#speed ?10    Force 10 Mbps operation100   Force 100 Mbps operationauto  Enable AUTO speed configurationSwitch(config-if)#speed auto Switch(config-if)#

6、查看接口的雙工模式和速率

在特權模式,使用命令 show interface 端口
Switch#show interfaces fa 0/24
FastEthernet 0/24 is up, line protocol is up (connected)
Hardware is Lance, address is 0005.5eb1.7918 (bia 0005.5eb1.7918)
BW 100000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)  
Full-duplex, 100Mb/s     ——雙工模式及速率

7、設備配置的輔助命令

7.1 命令行界面空閑一段時間,重回初始界面的問題
在全局模式下,輸入命令 line con 0 然后回車換行,輸入命令exec-timeout 0 0 即可設置為永不超時
jingshihai-01>
jingshihai-01>en
jingshihai-01#config ter
jingshihai-01#config terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
jingshihai-01(config)#line con 0
jingshihai-01(config-line)#exec-t
jingshihai-01(config-line)#exec-timeout 0 0
jingshihai-01(config-line)#
7.2 控制臺消息打算輸入的處理
當執行完一個命令,需要輸入另一個命令時,為了保持光標不被返回的消息打擾,可以配置如下命令:在全局模式下,輸入命令 line con 0 然后回車換行,輸入命令logging synchronous(簡寫 logg syn)
jingshihai-01(config)#line con 0
jingshihai-01(config-line)#logging synchronous
7.3 禁用DNS查詢
jingshihai-01#asdadffffffffffffffffffff
Translating "asdadffffffffffffffffffff"...domain server (255.255.255.255)
當遇到如上提示時,一般需要等待很久,此時就要要禁用DNS查詢。
在全局模式下,輸入命令 no ip domain-lookup(簡寫no ip domain-lo)
jingshihai-01#asdadffffffffffffffffffff
Translating "asdadffffffffffffffffffff"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address   (等待很久才會顯示該信息)jingshihai-01#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
jingshihai-01(config)#no ip domain-lookup
jingshihai-01(config)#asdadffffffffffffffffffff
% Invalid input detected at '^' marker.    (直接顯示該信息)jingshihai-01(config)#

8、查看交換機的配置

在特權模式下輸入命令 show running-config(可以用來檢查配置)
jingshihai-01#
jingshihai-01#show running-config 
Building configuration...Current configuration : 1157 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname jingshihai-01  (歷史輸入的命令,可以用來檢查輸入的是否正確)
!
!
!
jingshihai-01#

9、設置進入特權模式的密碼(明文)

在全局模式下輸入命令 enable password 密碼
jingshihai-01#config terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
jingshihai-01(config)#enable password 123456
jingshihai-01(config)#end
jingshihai-01#
jingshihai-01#show running-config 
Building configuration...Current configuration : 1157 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname jingshihai-01
!
enable password 123456
!
!
jingshihai-01#exit
jingshihai-01>enable
Password: 
jingshihai-01#

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389554.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389554.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389554.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

opencv:卷積涉及的基礎概念,Sobel邊緣檢測代碼實現及Same(相同)填充與Vaild(有效)填充

濾波 線性濾波可以說是圖像處理最基本的方法&#xff0c;它可以允許我們對圖像進行處理&#xff0c;產生很多不同的效果。 卷積 卷積的概念&#xff1a; 卷積的原理與濾波類似。但是卷積卻有著細小的差別。 卷積操作也是卷積核與圖像對應位置的乘積和。但是卷積操作在做乘…

機器學習股票_使用概率機器學習來改善您的股票交易

機器學習股票Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seek…

BZOJ 2818 Gcd

傳送門 題解&#xff1a;設p為素數 &#xff0c;則gcd(x/p,y/p)1也就是說求 x&#xff0f;p以及 y&#xff0f;p的歐拉函數。歐拉篩前綴和就可以解決 #include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <map&…

LeetCode387-字符串中的第一個唯一字符(查找,自定義數據結構)

一開始想用HashMap&#xff0c;把每個字符放進去&#xff0c;然后統計出現的次數。 使用LinkedHashMap的話&#xff0c;鍵值對的順序都是不會變的。 LinkedHashMap<Character,Integer> map new LinkedHashMap<>();map.put(i,1111);map.put(j,2222);map.put(k,3333…

r psm傾向性匹配_南瓜香料指標psm如何規劃季節性廣告

r psm傾向性匹配Retail managers have been facing an extraordinary time with the COVID-19 pandemic. But the typical plans to prepare for seasonal sales will be a new challenge. More seasonal products have been introduced over the years, making August the bes…

主成分分析:PCA的思想及鳶尾花實例實現

主成份分析算法PCA 非監督學習算法 PCA的實現&#xff1a; 簡單來說&#xff0c;就是將數據從原始的空間中轉換到新的特征空間中&#xff0c;例如原始的空間是三維的(x,y,z)&#xff0c;x、y、z分別是原始空間的三個基&#xff0c;我們可以通過某種方法&#xff0c;用新的坐…

兩家大型網貸平臺竟在借款人審核問題上“偷懶”?

python信用評分卡&#xff08;附代碼&#xff0c;博主錄制&#xff09; https://study.163.com/course/introduction.htm?courseId1005214003&utm_campaigncommission&utm_sourcecp-400000000398149&utm_mediumshare 放貸流量增加&#xff0c;逾期率也會隨之增加&…

解決 Alfred 每次開機都提示請求通訊錄權限的問題

安裝完 Alfred 以后&#xff0c;每次開機都會提示請求通訊錄權限&#xff0c;把設置里的通訊錄關掉也沒用&#xff0c;每次都提示又非常煩人&#xff0c;這里把解決方法記錄一下。 依次打開 應用程序 - Alfred 3.app - 右鍵顯示包內容 - Contents - Frameworks - Alfred Framew…

【轉】DCOM遠程調用權限設置

原文&#xff1a;https://blog.csdn.net/ervinsas/article/details/36424127 最近幾天被搞得焦頭爛額&#xff0c;由于DCOM客戶端程序是在32位系統下開發的&#xff0c;調試時DCOM服務端也是安裝在同一臺機器上&#xff0c;所有過程一直還算順利。可這次項目實施的時候&#xf…

opencv:邊緣檢測之Laplacian算子思想及實現

Laplacian算子邊緣檢測的來源 在邊緣部分求取一階導數&#xff0c;你會看到極值的出現&#xff1a; 如果在邊緣部分求二階導數會出現什么情況? 從上例中我們可以推論檢測邊緣可以通過定位梯度值大于鄰域的相素的方法找到(或者推廣到大 于一個閥值). 從以上分析中&#xff0c…

使用機器學習預測天氣_如何使用機器學習預測著陸

使用機器學習預測天氣Based on every NFL play from 2009–2017根據2009-2017年每場NFL比賽 Ah, yes. The times, they are changin’. The leaves are beginning to fall, the weather is slowly starting to cool down (unless you’re where I’m at in LA, where it’s on…

laravel 導出插件

轉發&#xff1a;https://blog.csdn.net/gu_wen_jie/article/details/79296470 版本&#xff1a;laravel5 php 5.6 安裝步驟&#xff1a; 一、安裝插件 ①、首先在Laravel項目根目錄下使用Composer安裝依賴&#xff1a; composer require "maatwebsite/excel:~2.1.0"…

國外 廣告牌_廣告牌下一首流行歌曲的分析和預測,第1部分

國外 廣告牌Using Spotify and Billboard’s data to understand what makes a song a hit.使用Spotify和Billboard的數據來了解歌曲的流行。 Thousands of songs are released every year around the world. Some are very successful in the music industry; others less so…

Jmeter測試普通java類說明

概述 Apache JMeter是Apache組織開發的基于Java的壓力測試工具。本文檔主要描述用Jmeter工具對基于Dubbo、Zookeeper框架的Cassandra接口、區塊鏈接口進行壓力測試的一些說明&#xff0c;為以后類似接口的測試提供參考。 環境部署 1、 下載Jmeter工具apache-jmeter-3.3.zip&am…

opencv:Canny邊緣檢測算法思想及實現

Canny邊緣檢測算法背景 求邊緣幅度的算法&#xff1a; 一階導數&#xff1a;sobel、Roberts、prewitt等算子 二階導數&#xff1a;Laplacian、Canny算子 Canny算子效果比其他的都要好&#xff0c;但是實現起來有點麻煩 Canny邊緣檢測算法的優勢&#xff1a; Canny是目前最優…

關于outlook簽名圖片大小的說明

96 dpiwidth576 height114轉載于:https://blog.51cto.com/lch54734/2298115

opencv:畸變矯正:透視變換算法的思想與實現

畸變矯正 注意&#xff1a;雖然能夠成功矯正但是也會損失了部分圖像&#xff01; 透視變換(Perspective Transformation) 概念&#xff1a; 透視變換是將圖片投影到一個新的視平面(Viewing Plane)&#xff0c;也稱作投影映射(Projective Mapping)。 我們常說的仿射變換是透視…

數據多重共線性_多重共線性對您的數據科學項目的影響比您所知道的要多

數據多重共線性Multicollinearity is likely far down on a mental list of things to check for, if it is on a list at all. This does, however, appear almost always in real-life datasets, and it’s important to be aware of how to address it.多重共線性可能根本不…

PHP工廠模式計算面積與周長

<?phpinterface InterfaceShape{ function getArea(); function getCircumference();}/** * 矩形 */class Rectangle implements InterfaceShape{ private $width; private $height; public function __construct($width,$height){ $this->width$…

K-Means聚類算法思想及實現

K-Means聚類概念&#xff1a; K-Means聚類是最常用的聚類算法&#xff0c;最初起源于信號處理&#xff0c;其目標是將數據點劃分為K個類簇&#xff0c; 找到每個簇的中心并使其度量最小化。 該算法的最大優點是簡單、便于理解&#xff0c;運算速度較快&#xff0c;缺點是只能應…