Cisco交换机的基本配置解读

合集下载

Cisco交换机的基本配置解读

Cisco交换机的基本配置解读

flashfs[1]: Bytes used: 3971584 ——已用flash flashfs[1]: Bytes available: 3769856 ——可用flash flashfs[1]: flashfs fsck took 6 seconds. flashfs[1]: Initialization complete. ——初始化flash完成 Done initializing flashfs. POST: System Board Test : Passed ——系统板自检通过 POST: Ethernet Controller Test : Passed ——以太网控制器自检通过 ASIC Initialization Passed ——专用芯片自检通过 POST: FRONT-END LOOPBACK TEST : Passed ——环路测试通过 cisco WS-C2950G-24-EI (RC32300) processor (revision A0) with 21299K bytes of memory. ——CPU型号和RAM大小 Pocessor board ID FOC0620X0J4 Last reset from system-reset 24 FastEthernet/IEEE 802.3 interface(s) ——24个快速以太口 2 Gigabit Ethernet/IEEE 802.3 interface(s) ——2个千兆以太口 32K bytes of flash-simulated non-volatile configuration memory. ——NVRAM大小 Base ethernet MAC Address: 00:09:B7:92:29:80 Motherboard assembly number: 73-7280-04 Power supply part number: 34-0965-01 Motherboard serial number: FOC06170J3N Power supply serial number: DAB06203PFQ Model revision number: A0 Motherboard revision number: A0 Model number: WS-C2950G-24-EI System serial number: FOC0620X0J4 Press RETURN to get started! -----按回车键后进入特权模式

思科交换机的基本配置

思科交换机的基本配置

思科交换机的基本配置随着Internet的高速发展,网络规模不断膨胀,对于从事网络专业的学生熟练掌握路由器和交换机的配置已显得十分重要。

接下来是小编为大家收集的思科交换机的基本配置方法,希望能帮到大家。

思科交换机的基本配置的方法一、交换机的基本配置Author:chenchao in ZJNU从本篇文章开始,将连载大概8-9篇自己学习交换与路由的实验报告,但是怕自己能力不行,会出现错误,所以,先载两篇文章,依次为:交换机的基本配置;路由器基本配置。

本篇为交换机的基本配置,使用的仿真软件是Cisco的一款免费软件:Cisco Packet Tracer。

想学习的可以在百度自行下载。

下面开始附上实验过程:实验环境:Cisco 2950交换机1台,Console电缆1根,PC机一台,网线1根。

连接如下图所示:实验步骤:一、交换机的带外配置;1、在用户模式、特权模式、全局模式、接口模式之间转换;Switch>enableSwitch#configure terminalEnter configuration commands, one perline. End with CNTL/Z.Switch(config)#interface FastEthernet 0/1Switch(config-if)#exitSwitch(config)#exitSwitch#%SYS-5-CONFIG_I: Configured from console byconsoleSwitch#exitSwitch con0 is now availablePress RETURN to get started.Switch>2、将交换机的名称改为“student”;Switch(config)#hostname studentstudent(config)#3、为交换机各个模式设置密码“cisco”;特权模式下的密码保护student#enablestudent#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#enable password ciscostudent(config)#enable secret cisco1远程登录口令设置student#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#line console 0student(config-line)#line vty 0 4student(config-line)#password cisco2student(config-line)#loginstudent(config-line)#student#4、为交换机制定一个IP地址10.10.10.X/24;student#configConfiguring from terminal, memory, ornetwork [terminal]?Enter configuration commands, one perline. End with CNTL/Z.student(config)#interface vlan 1student(config-if)#ip address 10.10.10.1255.0.0.05、开启交换机的Telnet服务功能,建立Telnet用户admin,口令cisco,并制定只能从10.10.10.y/24登录Telnet服务器;student#student#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#user admin password 0 ciscostudent(config)#6、查看配置情况;student>enablePassword:student#show running-cBuilding configuration...hostname student!enable secret 5$1$mERr$q.MA2tj.WFptzvbifq/1i.enable password cisco!!username admin password 0 ciscointerface Vlan1ipaddress 10.10.10.1 255.0.0.0!!line con 0!line vty 0 4password cisco2loginline vty 5 15login!!End二、交换机的端口配置:1、配置接口的描述、关闭借口、启动接口、配置接口的速度为100Mbps、配置接口工作模式为全双工、配置接口的流程控制;student#configure terminalEnter configuration commands, one perline. End with CNTL/Z.student(config)#interface FastEthernet0/1student(config-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 downstudent(config-if)#student(config-if)#exitstudent(config)#interface FastEthernet0/1student(config-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 upstudent(config-if)#speed 100student(config-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 downstudent(config-if)#2、配置接口FastEthernet0/10为Access口;student#student#configure terminalEnter configuration commands, one perline. End with CNTL/Z.student(config)#interface FastEthernet0/10student(config-if)#switchport mode accessstudent(config-if)#3、配置接口FastEthernet0/12为Trunk口;student#student#configure tEnter configuration commands, one perline. End with CNTL/Z.student(config)#interface fastethernet0/12student(config-if)#switchport mode Trunkstudent(config-if)#end4、查看配置情况;!interface FastEthernet0/1duplex fullspeed100!!interface FastEthernet0/9!interface FastEthernet0/10switchport mode access!interface FastEthernet0/11!interface FastEthernet0/12switchport mode trunk!student#show running-cBuilding configuration...Current configuration : 1275 bytes!version 12.1no service timestamps log datetime msecno 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!!duplex fullspeed 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/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 Vlan1ipaddress 10.10.10.1 255.0.0.0 !!line con 0!line vty 0 4password cisco2loginline vty 5 15login!!end看了“思科交换机的基本配置”还想看:。

CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述CISCO交换机是一种常用的网络设备,用于构建局域网(Local Area Network,LAN)。

它可以通过物理线路的连接,将多台计算机或其他网络设备连接到同一个网络中,实现数据的传输和共享。

CISCO交换机的基本配置包括IP地址的配置、VLAN的配置、端口配置、安全性配置等。

接下来,我们将对这些配置进行详细说明。

首先,IP地址的配置是CISCO交换机的基本操作之一。

通过配置IP地址,我们可以对交换机进行管理和监控。

具体的配置步骤如下:1. 进入交换机的配置模式。

在命令行界面输入"enable"命令,进入特权模式。

2. 进入全局配置模式。

在特权模式下输入"configure terminal"命令,进入全局配置模式。

3. 配置交换机的IP地址。

在全局配置模式下输入"interfacevlan 1"命令,进入虚拟局域网1的接口配置模式。

然后输入"ip address 192.168.1.1 255.255.255.0"命令,配置交换机的IP地址和子网掩码。

4. 保存配置并退出。

在接口配置模式下输入"exit"命令,返回到全局配置模式。

然后输入"exit"命令,返回到特权模式。

最后输入"copy running-config startup-config"命令,保存配置到闪存中。

其次,VLAN的配置是CISCO交换机的关键配置之一。

通过配置VLAN,我们可以将交换机的端口划分为不同的虚拟局域网,实现数据的隔离和安全。

1. 进入交换机的配置模式。

同样,在特权模式下输入"configure terminal"命令,进入全局配置模式。

2. 创建VLAN。

在全局配置模式下输入"vlan 10"命令,创建一个编号为10的VLAN。

Cisco交换机的基本配置

Cisco交换机的基本配置

交换机的基本配置一、实验目的1、熟悉Cisco IOS的基本配置方式2、掌握交换机的基本配置命令二、相关知识IOS(Internetworking Operating System-Cisco,缩写IOS),CISCO网络配置系统,大多数Cisco设备中安装有此操作系统。

要配置好Cisco设备必需要熟悉IOS命令及相关的知识。

本实验以交换机为对象,其他设备的配置与此类似。

(一)交换机的初始配置为了配置或检查交换机,需要将一台计算机连接到交换机上,并建立双方之间的通信。

使用一根反接线连接交换机背面的“console port”和计算机背面的串口”com port”。

如图,用反接线一端通过RJ-45到DB-9连接器与计算机的串行口(如COM1口)相连,另一端与交换机的CONSOLE端口相连。

所谓交换机的初始配置是指第一次进行交换机的配置。

第一次配置主要包括交换机的主机名、密码和管理IP地址的配置。

启动计算机的“超级终端(HyperTerminal)”程序,会显示一个如图所示的对话窗口。

第一次建立交换机和超级终端的连接时,首先要为这一连接命名。

在下拉菜单中选择连接交换机所使用的COM端口,点击确定按钮,如图所示。

第二个对话窗口出现,点击“还原为默认值”后,点击确定按钮。

在交换机完成启动与超级终端建立连接之后,会出现关于系统配置对话的提示。

此时就可以对交换机进行手工配置。

注:交换机启动时,首先运行ROM中的程序,进行系统自检及引导,然后加载FLASH 中的IOS到RAM中运行,并在NVRAM中寻找交换机的配置文件,将其装入RAM中。

(二)几种常见配置命令模式交换机各种配置必须在不同的配置方式下才能完成,CISCO交换机提供了六种主要配置模式,分别为:(1)普通用户模式交换机初始化完成后,首先要进入一般用户模式,在一般用户模式下,用户只能运行少数的命令,而且不能对交换机进行配置。

在没有进行任何配置的情况下,缺省的交换机提示符为:Switch>在用户配置模式下键入“?”则可以查看该模式下所提供的所有命令集及其功能,出现的“--More—”表示屏幕命令还未显示完,此时可按“回车键(Enter)”或者“空格键”显示余下的命令。

思科交换机的基本配置命令

思科交换机的基本配置命令

思科交换机的基本配置命令网络技术知识其实也是弱电里面的一个难点,这个一般是在大学课程里面才能详细的学习,今天小编带来的是交换机的基本配置命令。

一、基本配置命令switch>用户模式1:进入特权模式enableswitch>enableswitch#2:进入全局配置模式configureterminalswitch>enableswitch#configureterminalswitch(conf)#3:交换机命名hostnameaptech2950以aptech2950为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch-2950aptech2950(conf)#4:配置使能口令enablepasswordcisco以cisco为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablepasswordcisco5:配置使能密码enablesecretciscolab以cicsolab为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablesecretciscolab6:设置虚拟局域网vlan1interfacevlan1switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#interfacevlan1aptech2950(conf-if)#ipaddress192.168.1.1255.255.255.0配置交换机端口ip和子网掩码aptech2950(conf-if)#noshut是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ipdefault-gateway192.168.254设置网关地址7:进入交换机某一端口interfacefasteher0/17以17端口为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#interfacefasteher0/17aptech2950(conf-if)#8:查看命令showswitch>enableswitch#showversion察看系统中的所有版本信息showinterfacevlan1查看交换机有关ip协议的配置信息showrunning-configure查看交换机当前起作用的配置信息showinterfacefastether0/1察看交换机1接口具体配置和统计信息showmac-address-table查看mac地址表showmac-address-tableaging-time查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch>enableswitch#erasestartup-configureswitch#reload10:双工模式设置switch>enableswitch#configureterminalswitch2950(conf)#hostnameaptch-2950aptech2950(conf)#interfacefasteher0/17以17端口为例aptech2950(conf-if)#duplexfull/half/auto有full,half,auto三个可选项11:cdp相关命令switch>enableswitch#showcdp查看设备的cdp全局配置信息showcdpinterfacefastether0/17查看17端口的cdp配置信息showcdptraffic查看有关cdp包的统计信息showcdpnerghbors列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。

思科交换机简单配置(通用教程)

思科交换机简单配置(通用教程)

• 双工模式: Switch(config-if)#duplex ? auto Enable AUTO duplex configuration full Force full duplex operation half Force half-duplex operation
Switch(config-if)#duplex auto Switch(config-if)# • 端口描述 Switch(config-if)#description vlan 10 trunk Switch(config-if)#
配置ip地址的命令格式: ip address {ip-address} {netmask}
测试常用端口类型Acce来自s / trunk将此端口设置为vlan10 的access口 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)# 将此端口设置为vlan10 的trunk口 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk allowed vlan 10
Vlan设置
• Vlan设置范围:1---4094 • 在全局模式下配置vlan Switch#conf t Switch(config)#vlan 10 Switch(config-vlan)#name vlan10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#name vlan20 Vlan名称可以自行定义

2024版思科网络交换机配置命令详细总结归纳

2024版思科网络交换机配置命令详细总结归纳
使用`interface`命令进入接口配置模式, 如`interface FastEthernet 0/1`进入 FastEthernet 0/1接口。
VLAN间路由配置
01 02 03 04
使用`interface`命令进入三层接口配置模式,如`interface vlan 10`进入 VLAN 10的三层接口。
源端口和目的端口散列
同时考虑数据包的源端口和目的端口进行负载均衡。
配置负载均衡策略
在全局配置模式下使用`port-channel load-balance`命令进行配置。
端口聚合故障排除技巧
01
检查物理连接
确保所有参与聚合的物理端口都已 正确连接。
03
检查交换机配置
确认交换机的配置是否正确,包括 聚合模式、聚合组号等。
限制登录用户
指定允许通过SSH远程登录的用户或用户组。
交换机日志与审计功能启用
启用日志功能
将交换机操作记录到日志文件中,方便后续 审计和分析。
远程日志服务器
将日志文件发送到远程日志服务器进行集中 存储和管理。
配置日志级别
根据需要设置日志记录的详细程度(如信息、 警告、错误等)。
审计功能
启用审计功能,对特定操作进行实时监控和 记录。
思科网络交换机配置命令详细 总结归纳
目 录
• 交换机基本配置 • VLAN配置与管理 • 生成树协议(STP)配置与优化 • 端口聚合(EtherChannel)配置与应用 • 交换机安全性设置与加固 • 交换机性能监控与故障排除
01
交换机基本配置
交换机登录与访问控制
1 2
通过控制台端口登录 使用终端仿真软件通过控制台端口连接到交换机, 输入用户名和密码进行登录。

CISCO交换机基本配置和使用概述jvi

CISCO交换机基本配置和使用概述jvi
– 操作步骤 我们可以通过不同的途径来访问和配置路由器和交换机, 但是第一次配置Cisco设备时,必须首先通过控制台端口 (CONSOLE口)直接与之建立连接,进行初始配置 • 步骤一 完成硬件连接并给路由器(或交换机)加电 • 步骤二 在PC机上创建超级终端,进入PC机Windows XP操作系 统,点击“开始/程序/附件/通讯/超级终端”,则进入图如下 界面
Send echo messages
ppp
Start IETF Point-to-Point Protocol (PPP)
--More
键入一字符串,其后紧接“?”,列出以该字符串开头的所有命令
Router# d?
debug delete dir disable disconnect
11
– 3. 上下文相关帮助
Interface
IP-Address OK? Method Status
接口的IP地址好吗?法状态协议
Protocol
3
Vlan1
unassigned NO unset up
up
FastEthernet0/1 unassigned YES unset down
down
FastEthernet0/2 unassigned YES unset down
access-enable Create a temporary Access-List entry
access-profile Apply user-profile to interface
clear
Reset functions

pad
Open a X.29 PAD connection
ping
Enter enable secret: mysecret使能的秘诀是用来保护访问密码 特权和配置模式。此密码后, 进入,成为在配置加密。 输入enable秘密:mysecret
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

...done initializing flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4 Loading ——解压缩IOS文件 "flash:c2950-i6q4l2-mz.121-6.EA2a.bin"... ##################################################### ################# File "flash:c2950-i6q4l2-mz.121-6.EA2a.bin" uncompressed and installed, entry point: 0x80010000 executing... Restricted Rights Legend ——宣告版权信息 Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software – Restricted Rights clause at FAR sec. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134-1706 Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(6)EA2a, RELEASE SOFTWARE (fc1) ——IOS版本 Copyright (c) 1986-2001 by cisco Systems, Inc. Compiled Thu 27-Dec-01 15:01 by antonino Image text-base: 0x80010000, data-base: 0x8042A000 Initializing flashfs... ——再次初始化flash flashfs[1]: 16 files, 2 directories ——flash中文件及目录数 flashfs[1]: 0 orphaned files, 0 orphaned directories flashfs[1]: Total bytes: 7741440 ——flash总量
1、通过交换机的Console(控制) 口连接到一台运行终端仿真软件的微 机或一台终端设备; 2、通过交换机的AUX端口连接MODEM, 再通过电话线与远方的终端或运行终 端仿真软件的微机相连; 3、通过Telnet程序远程访问,不过 交换机应事先配置好管理IP地址; 终端仿真设备 4、通过浏览器方式访问,不过交换 机要内置WEB用户界面; 5、通过S •了解访问交换机的几种方式; •掌握通过Console端口配置交换机的方法; •掌握Cisco交换机不同的命令行操作模式以及 各种模式之间的切换; •掌握Cisco交换机的基本配置命令。
一、访问交换机的几种方式
对交换机进行配置,首先要访问交换机,通常有以下五种方式访问交换 机,如果是首次配置就必须采用下面的第一种方式。
flashfs[1]: Bytes used: 3971584 ——已用flash flashfs[1]: Bytes available: 3769856 ——可用flash flashfs[1]: flashfs fsck took 6 seconds. flashfs[1]: Initialization complete. ——初始化flash完成 Done initializing flashfs. POST: System Board Test : Passed ——系统板自检通过 POST: Ethernet Controller Test : Passed ——以太网控制器自检通过 ASIC Initialization Passed ——专用芯片自检通过 POST: FRONT-END LOOPBACK TEST : Passed ——环路测试通过 cisco WS-C2950G-24-EI (RC32300) processor (revision A0) with 21299K bytes of memory. ——CPU型号和RAM大小 Pocessor board ID FOC0620X0J4 Last reset from system-reset 24 FastEthernet/IEEE 802.3 interface(s) ——24个快速以太口 2 Gigabit Ethernet/IEEE 802.3 interface(s) ——2个千兆以太口 32K bytes of flash-simulated non-volatile configuration memory. ——NVRAM大小 Base ethernet MAC Address: 00:09:B7:92:29:80 Motherboard assembly number: 73-7280-04 Power supply part number: 34-0965-01 Motherboard serial number: FOC06170J3N Power supply serial number: DAB06203PFQ Model revision number: A0 Motherboard revision number: A0 Model number: WS-C2950G-24-EI System serial number: FOC0620X0J4 Press RETURN to get started! -----按回车键后进入特权模式
SNMP网管工作站
Telnet TFTP服务器
Console
AUX Modem
终端仿真设备
图12-2五种方式访问交换机
二、交换机的启动信息
交换机首先执行ROM中存放的加电自检代码,对设备部件的硬件进行 自检,接着执行ROM中的启动引导代码,即查找并载入Flash中的ISO 镜像到RAM并执行,交换机启动时的参数配置会从NVRAM中的配置文件 Startup-config调出,此后交换机进入正常工作 ,具体显示内容通常有: 基本的MAC地址、初始化Flash、解压缩IOS(网际操作系统)、执行IOS、系 统板自检、以太网控制器自检、专用芯片自检、显示软件版本号、端口信息 等内容。 下面为Cisco2950交换机的启动信息。
C2950 Boot Loader (CALHOUN-HBOOT-M) Version 12.1(0.0.34)EA2, CISCO DEVELOPMENT TEST VERSION Compiled Wed 07-Nov-01 20:59 by antonino WS-C2950G-24 starting... ——硬件平台 Base ethernet MAC Address: 00:09:b7:92:29:80 ——交换机MAC地址 Xmodem file system is available. Initializing Flash... ——以下初始化flash flashfs[0]: 16 files, 2 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440 flashfs[0]: Bytes used: 3971584 flashfs[0]: Bytes available: 3769856 flashfs[0]: flashfs fsck took 6 seconds.
相关文档
最新文档