六月丁香五月婷婷,丁香五月婷婷网,欧美激情网站,日本护士xxxx,禁止18岁天天操夜夜操,18岁禁止1000免费,国产福利无码一区色费

學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦入門 > Cisco交換機(jī)基本配置方法

Cisco交換機(jī)基本配置方法

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

Cisco交換機(jī)基本配置方法

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

  Cisco交換機(jī)基本配置方法

  1、 配置設(shè)備特權(quán)模式口令

  telnet *.*.*.*

  Switch > 進(jìn)入用戶模式

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

  Switch # config terminal 從特權(quán)模式進(jìn)入全局配置模式

  Switch # exit 退出所有配置模式

  Switch # end 退出配置模式

  Switch # wr 保存配置

  Switch(config)# enable secret cisco123 ――設(shè)置特權(quán)模式加密口令(機(jī)房使用方法)

  Switch(config)# enable password cisco123――設(shè)置特權(quán)模式不加密口令

  Switch(config)# service password-encryption ――將所有口令進(jìn)行加密

  2、配置虛擬終端線路VTY(Virtual Type Terminal)

  Switch(config)# line vty 0 4

  Switch(config-line)# login      --讓設(shè)備回顯一個(gè)要求輸入口令的提示

  Switch(config-line)# password cisco ――Telnet統(tǒng)一密碼

  Switch(config-line)# exec-timeout 10 0――設(shè)備超時(shí)時(shí)間為10分鐘0秒

  Switch(config)# line vty 0 4

  Switch# (config-line)# login local ――設(shè)置本地認(rèn)證模式

  Switch (config)# username zhangxy password ******

  Switch (config)# no username zhangxy

  3、定義、刪除(恢復(fù)初始)設(shè)備名稱

  Switch(config)# hostname test-2950

  test-2950(config)# no hostname

  4、配置snmp網(wǎng)管串

  Switch(config)# snmp-server community xxxxxx ro (只讀)

  Switch(config)# snmp-server community xxxxxx rw (讀寫)

  5、新建、修改、刪除某個(gè)VLAN,以及對(duì)VLAN命名

  Switch# vlan database

  Switch(vlan)# vlan 100

  Switch(vlan)# vlan 100 name XX (名字一般定義為客戶名稱或者共享網(wǎng)段標(biāo)識(shí))

  Switch(vlan)# no vlan 100

  或者

  Switch# conf t

  Switch(config)#vlan 100

  Switch (config-vlan)#name XX (名字一般定義為客戶名稱或者共享網(wǎng)段標(biāo)識(shí))

  Switch (config)#no vlan 100

  6、將某個(gè)端口或者一組端口,劃分到VLAN

  Switch(config)# interface f0/13     (進(jìn)入單個(gè)端口配置模式)

  Switch(config)# interface range f0/1-5    (進(jìn)入一組端口配置模式)

  Switch(config)# interface range f0/1-5, f0/8-10 (進(jìn)入一組端口配置模式)

  Switch(config-if)# switchport mode access

  Switch(config-if)# switchport access vlan 100

  Switch(config-if)# no shutdown

  Switch(config-if)# no switchport (刪除端口相關(guān)配置)

  7、配置端口工作模式

  Switch(config-if)# duplex full/auto/half[全雙工|自動(dòng)協(xié)商|半雙工]

  8、配置端口速率

  Switch(config-if)# speed 10/100/ auto

  9、配置一個(gè)或多個(gè)VLAN網(wǎng)關(guān)

  Switch(config)# int vlan 100

  Switch(config-subif)# Description 客戶名稱ip=地址 帶寬 操作日期(描述)

  Switch(config-subif)# ip address 192.168.2.130 255.255.255.0

  Switch(config-subif)#ip address 192.168.3.130 255.255.255.0 secondary

  Switch(config-subif)# no shutdown

  10、配置交換機(jī)設(shè)備的管理地址

  配置二層交換機(jī)設(shè)備的管理地址:

  Switch(config)# int vlan 1 (交換機(jī)VLAN1的網(wǎng)關(guān)地址就是設(shè)備的管理地址)

  Switch(config-subif)# ip address 192.168.2.130 255.255.255.0

  Switch(config-subif)# no shutdown

  配置三層交換機(jī)的設(shè)備管理地址:

  Switch(config)# int loopback0 ――loopback接口是一種邏輯接口,可以創(chuàng)建無數(shù)個(gè)

  Switch(config-if)# ip address 192.168.2.130 255.255.255.0

  Switch (config)# no int loopback 0

  11、為某個(gè)端口配置一個(gè)或多個(gè)地址

  Switch(config)# interface f0/13

  Switch(config-if)# ip address 192.168.1.130 255.255.255.0

  Switch(config-if)# ip address 192.168.1.130 255.255.255.0 secondary

  12、將設(shè)備互聯(lián)的端口設(shè)置為trunk,讓其通過vlan信息

  Switch(config)# int range f0/40,f0/48 (range的作用是同時(shí)對(duì)多個(gè)端口進(jìn)行配置)

  Switch(config-if)# switchport trunk encapsulation dot1q

  Switch(config-if)# switchport trunk allowed vlan 1-10,12-4094

  (沒有這句配置,則說明所有VLAN均能通過trunk)

  Switch(config-if)# switchport mode trunk

  (如果要增加vlan 100劃分到truck時(shí),必須把原有的vlan再都寫上)

  Switch(config-if)# switchport trunk allowed vlan 1-10,100,12-4094

  13、新建port-channel,并將多個(gè)端口劃分到該port-channel

  Switch (config)# interface port-channel 1

  Switch(config)# interface f0/1

  Switch (config-if)# channel-group 1 mode on

  Switch(config)# interface f0/2

  Switch (config-if)# channel-group 1 mode on

  14、刪除port-channel,并將該port-channel下的端口刪除

  Switch (config)# interface f0/1

  Switch (config-if)# no channel-group 1

  Switch (config)# no interface port-channel 1

  15、在三層交換機(jī)上配置靜態(tài)路由

  Switch (config)# ip route 172.16.1.0 255.255.255.0 10.1.1.1

  ――ip route 目標(biāo)地址段 下一跳地址

  16、將源端口的流入或流出流量鏡像到目的端口

  將源端口的流入或流出流量鏡像到目的端口以便于在目的端口接上筆記本電腦,利用anylazer軟件抓包,并分析數(shù)據(jù)包是否正常。假設(shè)6509 G4/1作為目的端口,將G4/2作為源端口。實(shí)際應(yīng)用中一般來說,源端口和目的端口速率應(yīng)該一致。

  IDC-BJ02-6509-1(config)#monitor session 2 source interface g4/1 both

  IDC-BJ02-6509-1(config)#monitor session 2 destination interface g4/2

  17、SHOW命令的使用

  # show version 顯示系統(tǒng)硬件配置、軟件版本信息及最近一次啟動(dòng)以來連續(xù)運(yùn)行的時(shí)間等

  # show running-configuration 顯示設(shè)備運(yùn)行配置信息

  # show running-config int f0/13  顯示某個(gè)端口的配置信息

  #show vlan        顯示所有VLAN信息

  # show interface f0/13 顯示設(shè)備所有或指定接口的狀態(tài)信息

  # show int description 顯示所有端口的描述信息

  # show int status 顯示所有端口的狀態(tài)信息

  # show ip int brief 顯示所有端口IP摘要

  # show arp 顯示所有地址解析協(xié)議信息

  # show mac-address-table 顯示MAC地址表內(nèi)容

  # show ip 顯示設(shè)備上配置的IP地址、子網(wǎng)掩碼、網(wǎng)關(guān)地址參數(shù),管理VLAN號(hào)、域名解析服務(wù)器、HTTP信息及路由協(xié)議設(shè)定等(該命令不被路由器支持,只被交換機(jī)支持)

  # show ip router 顯示某個(gè)或所有的路由信息

  # show spanning-tree 顯示STP信息

  # show logging 查看系統(tǒng)當(dāng)前日志設(shè)置和緩沖區(qū)里的日志信息

  # show history 查看命令緩沖區(qū)內(nèi)容

  #show proc cpu | exc 0.00 顯示CPU占用的情況(exc表示除值為0以外的進(jìn)程)

  #show platform cpu packet stat

  #show monitor session1 顯示鏡像端口的流量情況

  下面列舉常用命令:

  6509-1# show interface f0/13 顯示設(shè)備所有或指定接口的狀態(tài)信息

  FastEthernet0/29 is up, line protocol is up (connected)

  下面列出cisco二層、三層交換機(jī)端口不同顯示狀態(tài)的線路連接情況:

  二層交換機(jī)端口狀態(tài):

Status

line protocol

線路連接情況

administratively down

down

管理員手工關(guān)閉端口

down

down (notconnect)

端口己打開,但沒插線(初始態(tài))

up

Up(connect)

端口己打開,并且己插線

  三層交換機(jī)端口狀態(tài):

Status

line protocol

線路連接情況

administratively down

down (disabled)

管理員手工關(guān)閉端口

up

down

端口己打開,但沒插線(初始態(tài))

up

up

端口己打開,并且己插線

  6509-1#sh ip int brief

  Interface IP-Address OK? Method Status Protocol

  Vlan1 unassigned YES NVRAM administratively down down

  Vlan75 211.100.2.113 YES NVRAM up up

  Vlan501 211.100.34.1 YES NVRAM administratively down down

  GigabitEthernet1/1 unassigned YES NVRAM up down

  GigabitEthernet1/2 unassigned YES NVRAM administratively down down

  GigabitEthernet3/1 211.100.2.45 YES NVRAM up up

  FastEthernet5/22 unassigned YES unset up up

  FastEthernet5/23 unassigned YES unset up down

  FastEthernet5/25 unassigned YES unset administratively down down

  6509-1#sh int description

  Interface Status Protocol Description

  Vl10 admin down down

  Vl501 admin down down Share34.1

  Vl583 up up DongFangWangJing1

  Vl701 admin down down ChengHeWang 20041229

  Gi1/2 admin down down

  Gi3/1 up up To M320 G0/2/3

  Gi3/5 up down

  Fa5/5 up up YiFangDa Ip=***** 20060601

  Fa5/11 up down TianYuanKeJi ip=**** 20060525

  Fa5/25 admin down down

  6509-1#sh arp

  Protocol Address Age (min) Hardware Addr Type Interface

  Internet 192.168.10.98 35 0010.db76.8f80 ARPA FastEthernet6/48

  Internet 211.100.28.171 53 0030.4857.353c ARPA Vlan584

  Internet 211.100.21.161 - 00d0.0106.5800 ARPA Vlan755

  Internet 211.100.27.169 0 000f.b587.b194 ARPA Vlan705

  Internet 211.100.21.165 0 Incomplete ARPA

  6509-1#sh int status

  Port Name Status Vlan Duplex Speed Type

  Gi1/1 notconnect routed full 1000 No GBIC

  Gi1/2 disabled routed full 1000 No GBIC

  Gi4/3 disabled 747 full 1000 1000BaseS

  Gi3/1 To M320 G0/2/3 connected routed full 1000 1000BaseSX

  Gi3/3 disabled 1 full 1000

  Fa5/1 To 2950-4 0/1 connected trunk full 100 10/100BaseTX

  cisco7507#sh version

  Cisco Internetwork Operating System Software

  IOS (tm) RSP Software (RSP-PV-M), Version 12.0(17)S, EARLY DEPLOYMENT RELEASE

  ――ISO版本信息

  ROM: System Bootstrap, Version 11.1(8)CA1, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)――ROM版本信息

  cisco7507 uptime is 19 weeks, 3 days, 4 hours, 6 minutes --設(shè)備開機(jī)時(shí)間

  System image file is "slot0:rsp-pv-mz.120-17.S.bin"――Flash中的IOS映像文件名

  cisco RSP4 (R5000) processor with 262144K/2072K bytes of memory.――處理器信息

  1 GEIP controller (1 GigabitEthernet).

  3 VIP2 R5K controllers (4 FastEthernet)(2 Serial)(2 POS).

  4 FastEthernet/IEEE 802.3 interface(s)

  1 GigabitEthernet/IEEE 802.3 interface(s)

  2 Serial network interface(s)

  2 Packet over SONET network interface(s)

  123K bytes of non-volatile configuration memory.――NVRAM值

  Configuration register is 0x2102 ――配置存儲(chǔ)器值

  查看及修改系統(tǒng)當(dāng)前日志設(shè)置和緩沖區(qū)里的日志信息:

  cisco7507#sh logging

  Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)

  Console logging: level debugging, 1957 messages logged ――控制臺(tái)的日志信息

  Monitor logging: level debugging, 73 messages logged――Telnet客戶端發(fā)送的系統(tǒng)日志

  Buffer logging: disabled              ――緩沖區(qū)日志

  Logging Exception size (65536 bytes)

  Trap logging: level informational, 472 message lines logg

  ――向SNMP管理軟件發(fā)送的系統(tǒng)日志

  cisco7507#conf t

  cisco7507(config)#logging buffer

  cisco7507(config)#no logging buffer

  18、限流方法:

  Cisco設(shè)備制定限流策略以及應(yīng)用:

  Switch# conf t

  Switch (config)# access-list 1 permit any

  Switch (config)# class-map match-all c9M

  Switch (config-cmap)# match access-group 1

  Switch (config-cmap)# exit

  Switch(config)# policy-map p9M

  Switch (config-pmap)# class c9M

  Switch (config-pmap-c)# police 9000000 4096 exceed-action drop

  Switch (config-pmap-c)# exit

  Switch# conf t

  Switch(config)# interface f0/13

  Switch(config-if)# service-policy input p9M

  Switch(config-if)# exit

  Switch(config)# interface f0/14

  Switch(config-if)# service-policy input p9M

  Switch(config-if)# exit

  Switch# wr

  19、ACL使用方法

  Switch (config)# access-list access-list-number {permit|deny}{protocol}

  {source source-wildcard|any}{destination destination-wildcard|any}

  例1:允許北京電信IDC內(nèi)部的ip地址telnet到各個(gè)網(wǎng)絡(luò)設(shè)備

  Switch (config)# access-list 101 permit tcp 218.30.26.0 0.0.0.63 any eq telnet

  Switch (config)# access-list 101 permit tcp 218.30.27.0 0.0.0.127 any eq telnet

  Switch (config)# access-list 101 permit tcp 218.30.25.0 0.0.0.255 any eq telnet

  例2:ACL限制對(duì)客戶的192.168.1.119的訪問

  Switch (config)# access-list 130 deny ip host 192.168.1.119 any

  Switch (config)# access-list 130 permit ip any any

  Switch(config)# interface f0/22

  Switch(config-if)# ip access-group 130 in

  例3:172.21.0.0(VLAN 31)、172.22.0.0(VLAN 32)、172.23.0.0(VLAN 33)三個(gè)網(wǎng)段之間不能互相訪問,其他網(wǎng)段均能訪問,配置方法如下:

  SS6509-1#conf t

  SS6509-1(config)# access-list 101 deny ip any 172.22.0.0 0.0.255.255

  SS6509-1(config)# access-list 101 deny ip any 172.23.0.0 0.0.255.255

  SS6509-1(config)# access-list 101 permit ip any any

  SS6509-1(config)# access-list 102 deny ip any 172.21.0.0 0.0.255.255

  SS6509-1(config)# access-list 102 deny ip any 172.23.0.0 0.0.255.255

  SS6509-1(config)# access-list 102 permit ip any any

  SS6509-1(config)# access-list 103 deny ip any 172.21.0.0 0.0.255.255

  SS6509-1(config)# access-list 103 deny ip any 172.22.0.0 0.0.255.255

  SS6509-1(config)# access-list 103 permit ip any any

  SS6509-1(config)#int vlan 31

  SS6509-1(config-if)# ip access-group 101 in

  SS6509-1(config)#int vlan 32

  SS6509-1(config-if)# ip access-group 102 in

  SS6509-1(config)#int vlan 33

  SS6509-1(config-if)# ip access-group 103 in

  20、在兩臺(tái)6509上配置HSRP

  將需要起HSRP的三層端口分別在兩臺(tái)主備6509上進(jìn)行如下配置:

  SS6509-1#vlan database

  SS6509-1 (vlan)#vlan 31 name ****

  SS6509-1 (vlan)#exit

  SS6509-1#conf t

  SS6509-1(config)#int vlan 31

  SS6509-1(config-if)#description **** ****

  SS6509-1(config-if)#ip address 172.21.11.252 255.255.0.0

  SS6509-1(config-if)#standby 100 ip 172.21.11.254 (定義standby組號(hào)及虛IP地址)

  SS6509-1(config-if)#standby 100 priority 120

  (定義該設(shè)備本standby組的優(yōu)先級(jí),優(yōu)先級(jí)的值越大優(yōu)先級(jí)越高)

  SS6509-2#vlan database

  SS6509-2 (vlan)#vlan 31 name ****

  SS6509-2(vlan)#exit

  SS6509-2#conf t

  SS6509-2(config)#int vlan 31

  SS6509-2(config-if)#description **** ****

  SS6509-2(config-if)#ip address 172.21.11.253 255.255.0.0

  SS6509-2(config-if)#standby 100 ip 172.21.11.254 (定義standby組號(hào)及虛IP地址)

  SS6509-2(config-if)#standby 100 priority 100(定義該設(shè)備本standby組的優(yōu)先級(jí))

  21、配置端口MAC梆定

  Switch(config)# mac access-list extended f02

  Switch((config-ext-macl)# permit host 0016.d325.f96a any

  Switch(config)# interface FastEthernet0/2

  Switch(config-if)# mac access-group f02 in

看了“Cisco交換機(jī)基本配置方法”還看了:

1.思科交換機(jī)的基本配置詳解

2.思科模擬器交換機(jī)的基本配置方法

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

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

5.思科常用配置命令及參數(shù)

6.怎么用思科模擬器配置交換機(jī)和配置vlan

2743369