思科交換機的基本配置

General 更新 2024年11月22日

  隨著Internet的高速發展,網路規模不斷膨脹,對於從事網路專業的學生熟練掌握路由器和交換機的配置已顯得十分重要。接下來是小編為大家收集的方法,希望能幫到大家。

  的方法

  一、交換機的基本配置

  Author:chenchao in ZJNU

  從本篇文章開始,將連載大概8-9篇自己學習交換與路由的實驗報告,但是怕自己能力不行,會出現錯誤,所以,先載兩篇文章,依次為:交換機的基本配置;路由器基本配置。本篇為交換機的基本配置,使用的模擬軟體是Cisco的一款免費軟體:Cisco Packet Tracer。想學習的可以在百度自行下載。

  下面開始附上實驗過程:

  實驗環境:

  Cisco 2950交換機1臺,Console電纜1根,PC機一臺,網線1根。連線如下圖所示:

  實驗步驟:

  一、 交換機的帶外配置;

  1、 在使用者模式、特權模式、全域性模式、介面模式之間轉換;

  Switch>enable

  Switch#configure terminal

  Enter configuration commands, one perline. End with CNTL/Z.

  Switchconfig#interface FastEthernet 0/1

  Switchconfig-if#exit

  Switchconfig#exit

  Switch#

  %SYS-5-CONFIG_I: Configured from console byconsole

  Switch#exit

  Switch con0 is now available

  Press RETURN to get started.

  Switch>

  2、將交換機的名稱改為“student”;

  Switchconfig#hostname student

  studentconfig#

  3、 為交換機各個模式設定密碼“cisco”;

  特權模式下的密碼保護

  student#enable

  student#configure t

  Enter configuration commands, one perline. End with CNTL/Z.

  studentconfig#enable password cisco

  studentconfig#enable secret cisco1

  遠端登入口令設定

  student#configure t

  Enter configuration commands, one perline. End with CNTL/Z.

  studentconfig#line console 0

  studentconfig-line#line vty 0 4

  studentconfig-line#password cisco2

  studentconfig-line#login

  studentconfig-line#

  student#

  4、為交換機制定一個IP地址10.10.10.X/24;

  student#config

  Configuring from terminal, memory, ornetwork [terminal]?

  Enter configuration commands, one perline. End with CNTL/Z.

  studentconfig#interface vlan 1

  studentconfig-if#ip address 10.10.10.1255.0.0.0

  5、開啟交換機的Telnet服務功能,建立Telnet使用者admin,口令cisco,並制定只能從10.10.10.y/24登入Telnet伺服器;

  student#

  student#configure t

  Enter configuration commands, one perline. End with CNTL/Z.

  studentconfig#user admin password 0 cisco

  studentconfig#

  6、 檢視配置情況;

  student>enable

  Password:

  student#show running-c

  Building configuration...

  hostname student

  !

  enable secret 5$1$mERr$q.MA2tj.WFptzvbifq/1i.

  enable password cisco

  !

  !

  username admin password 0 cisco

  interface Vlan1

  ipaddress 10.10.10.1 255.0.0.0

  !

  !

  line con 0

  !

  line vty 0 4

  password cisco2

  login

  line vty 5 15

  login

  !

  !

  End

  二、交換機的埠配置:

  1、 配置介面的描述、關閉藉口、啟動介面、配置介面的速度為100Mbps、配置介面工作模式為全雙工、配置介面的流程控制;

  student#configure terminal

  Enter configuration commands, one perline. End with CNTL/Z.

  studentconfig#interface FastEthernet0/1

  studentconfig-if#shutdown

  %LINK-5-CHANGED: Interface FastEthernet0/1,changed state to administratively down

  %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to down

  %LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to down

  studentconfig-if#

  studentconfig-if#exit

  studentconfig#interface FastEthernet0/1

  studentconfig-if#no shutdown

  %LINK-5-CHANGED: Interface FastEthernet0/1,changed state to up

  %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to up

  %LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to up

  studentconfig-if#speed 100

  studentconfig-if#duplex full

  %LINK-5-CHANGED: Interface FastEthernet0/1,changed state to down

  %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to down

  %LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to down

  studentconfig-if#

  2、 配置介面FastEthernet0/10為Access口;

  student#

  student#configure terminal

  Enter configuration commands, one perline. End with CNTL/Z.

  studentconfig#interface FastEthernet0/10

  studentconfig-if#switchport mode access

  studentconfig-if#

  3、 配置介面FastEthernet0/12為Trunk口;

  student#

  student#configure t

  Enter configuration commands, one perline. End with CNTL/Z.

  studentconfig#interface fastethernet0/12

  studentconfig-if#switchport mode Trunk

  studentconfig-if#end

  4、 檢視配置情況;

  !

  interface FastEthernet0/1

  duplex full

  speed100

  !

  interface FastEthernet0/2

  !

  interface FastEthernet0/9

  !

  interface FastEthernet0/10

  switchport mode access

  !

  interface FastEthernet0/11

  !

  interface FastEthernet0/12

  switchport mode trunk

  !

  student#show running-c

  Building configuration...

  Current configuration : 1275 bytes

  !

  version 12.1

  no service timestamps log datetime msec

  no service timestamps debug datetime msec

  no service password-encryption

  !

  hostname student

  !

  enable secret 5$1$mERr$q.MA2tj.WFptzvbifq/1i.

  enable password cisco

  !

  !

  username admin password 0 cisco

  !

  !

  interface FastEthernet0/1

  duplex full

  speed 100

  !

  interface FastEthernet0/2

  !

  interface FastEthernet0/3

  !

  interface FastEthernet0/4

  !

  interface FastEthernet0/5

  !

  interface FastEthernet0/6

  !

  interface FastEthernet0/7

  !

  interface FastEthernet0/8

  !

  interface FastEthernet0/9

  !

  interface FastEthernet0/10

  switchport mode access

  !

  interface FastEthernet0/11

  !

  interface FastEthernet0/12

  switchport mode trunk

  !

  interface FastEthernet0/13

  !

  interface FastEthernet0/14

  !

  interface FastEthernet0/15

  !

  interface FastEthernet0/16

  !

  interface FastEthernet0/17

  !

  interface FastEthernet0/18

  !

  interface FastEthernet0/19

  !

  interface FastEthernet0/20

  !

  interface FastEthernet0/21

  !

  interface FastEthernet0/22

  !

  interface FastEthernet0/23

  !

  interface FastEthernet0/24

  !

  interface GigabitEthernet1/1

  !

  interface GigabitEthernet1/2

  !

  interface Vlan1

  ipaddress 10.10.10.1 255.0.0.0

  !

  !

  line con 0

  !

  line vty 0 4

  password cisco2

  login

  line vty 5 15

  login

  !

  !

  end

交換機基本配置實驗報告
二層交換機基本配置詳解
相關知識
思科交換機的基本配置
思科交換機的基本配置詳解
思科模擬器交換機的基本配置方法
在思科模擬器上進行交換機的基本配置
交換機的基本配置檢視命令
交換機的基本配置
怎麼進行交換機的基本配置
思科交換機的映象配置例項介紹
交換機的基本配置如何檢視命令
思科交換機的配置命令