Cisco交換機基礎命令 + Win Server08 R2 多網卡配置鏈路聚合


最近搗鼓服務器鏈路集合需要配置交換機…

以前沒弄過交換機,現學現賣…

 

一般交換機是支持telnet的,配置好ip可以直接telnet,當然如果沒配的話就要用串口了,串口要選擇Serial…

還好我們萬能的 putty 都支持,用一個工具就OK了,當然你也可以選擇 Secure CRT…

 

登錄后輸入密碼,然后就需要第一個命令:

enable     //進入特權模式

 

補充下密碼的修改,來自:http://zhumeng8337797.blog.163.com/blog/static/1007689142012630103131956/

特權模式密碼修改:

Route>enable
Route#config terminal
Route(config)#enable secret CISCO ----設置加密密碼為"CISCO"(若把"secret"改為"password"則為文明顯示,在show running-config中可以清楚的看出兩者的區別)
Route(config)#exit

刪除特權模式密碼:

Route>enable
Route#config terminal
Route(config)#no enable secret CISCO
Route(config)#exit

 

修改登錄密碼:

Console口:(這個是設置進入路由器的密碼)
            Route>enable
            Route#config terminal
            Route(config)#line console 0 ----進入console口模式
            Route(config-line)#password CISCO ----設置密碼為"CISCO"(若要加密密碼可在之前:service pass-encryption啟用路由器密碼保護-但是在Boson Netsim環境下沒有找到這個命令大家知道的可以討論下)
            Route(config-line)#login ---- 登入時加密
            Route(config-line)#exit
 
aux口:
            Route>enable
            Route#config terminal
            Route(config)#line aux 0 ----進入aux口模式
            Route(config-line)#password CISCO ----設置密碼為"CISCO"(若要加密密碼可在之前:service pass-encryption啟用路由器密碼保護)
            Route(config-line)#login ---- 登入時加密
            Route(config-line)#exit
 
vty(telnet遠程登陸口):
            Route>enable
            Route#config terminal
            Route(config)#line vty 0 4 ----進入telnet遠程登陸口模式 (0 4 允許5個用戶)
            Route(config-line)#password CISCO ----設置密碼為"CISCO"(若要加密密碼可在之前:service pass-encryption啟用路由器密碼保護)
            Route(config-line)#login ---- 登入時加密
            Route(config-line)#exit

 

繼續接着上面進入特權模式,進入特權模式后就能干什么東西了,不過一般應該先看下交換機的信息:

show run      //show running-config

 

如果我們需要看端口的配置信息,那么需要:

show run inter 端口名  //show run interface  端口名

image

 

要看某個端口的當前狀態信息是:

show inter 端口名          //show interface 端口名   

比如我這里是 show interfaces gigabitEthernet1/0/45,簡寫成show inter g1/0/45 就可以(我是多個交換機堆疊,所以要交換機名+端口)

image

 

在這里我們可以看到這個端口的工作方式是全雙工

我們可以修改端口的工作方式(全雙工、半雙工、自動)

Switch#conf t
Switch(config)#inter g1/0/45
Switch(config-if)#deluplex auto       full/half/auto

修改后:

image

 

如果需要關閉某端口:

Switch#conf t
Switch(config)#inter g1/0/45
Switch(config-if)#shutdown

image

開啟的話是

Switch(config-if)#no shutdown

 

 

設定端口的vlan:

Switch#conf t
Switch(config)#inter g1/0/45
Switch(config-if)#switchport access vlan 999

設置vlan為999

image

 

 

下面還是回歸這次的正題,做鏈路集合

首先,我們需要在交換機上建port-channel(注意port-channel貌似最大只允許48,另外不能重復…)

Switch#conf t 
Switch(config)#inter port-channel 21
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 123
Switch(config-if)#description test port channel

看下設置結果:

image

 

然后我們需要設置端口的channel-group,把端口加到port-channel中

Switch#conf t
Switch(config)#inter g1/0/43
Switch(config-if)#channel-group 21 mode on
Switch(config-if)#description test group

然后依次把端口加進來,結果(我測試只加了兩個):

image

 

最后別忘了用 wr 寫入配置文件,不然重啟就失效了…

image

dir下看看文件日期是否正確

image

 

然后交換機的設置就完成了,下面就需要設置服務器,我在用的是server08 r2,聯想的服務器用的網卡是Inter I350

先更新網卡驅動,就可以看到選項卡里有了“分組”

image

 

我們新建分組,選擇網卡

image

 

支持多種類型,根據需要進行選擇

image

 

然后把兩個網卡插上網線插好,搞定收工…

image

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM