Cisco交换机配置新手篇
- 格式:docx
- 大小:65.04 KB
- 文档页数:6
文档一、标识交换机二、设置口令及用户三、配置VTP (Vlan 中继协议)四、配置中继线(Trunk )五、创建、描述Vlan 及设置Vlan IP六、划分、描述及设置Vlan 端口七、配置STP(生成树协议)八、启用Vlan 间Router九、配置ACL 十、配置DHCP 中继代理十一、配置DHCP 服务器十二、配置HSRP (热备路由协议)十三、保存配置附1:命令行编辑键附2:SHOW 命令附7:ACL 例子一、标识交换机Switch#configure terminal 进入配置状态Switch(config)#hostname “ hostname” 设置Switch 名称Switch (config)#no hostname 取消Switch 名称Switch(config)#end 结束本次配置二、设置口令及用户Switch#configure terminal 进入配置状态Switch(config)#enable secret “ password” 设置特权模式口令及口令Switch(config)#no username “ username” 删除本地用户Switch(config)#service password-encryption 加密所有明文口令Switch(config)#no password-encryption 拒绝加密所有明文口令S w i t c h(c o n f i g)#e n d结束本次配置1、配置console 用户用口令Switch#configure terminal 进入配置状态Switch(config)#line console 0 进入console 口配置状态Switch(config-line)#login local 设置登录模式为本地用户验证模式Switch(config-line)#no login local 取消本地用户验证模式Switch(config-line)#end 结束本次配置或Switch#configure terminal 进入配置状态Switch(config)#line console 0 进入console 口配置状态文档Switch(config-line)#login 设置登录模式为线性登录模式Switch(config-line)#password “ password” 设置线性登录模式口令Switch(config-line)#no login 取消线性登录模式Switch(config-line)#end 结束本次配置2、配置tenlnet(vty) 用户及口令Switch#configure terminal 进入配置状态Switch(config)#line vty 0 15 进入vty 配置状态Switch(config-line)#login local 设置登录模式为本地用户验证模式Switch(config-line)#no login local 取消本地用户验证模式三、配置VTP (Vlan 中继协议)Switch#vlan database 进入vlan 数据库配置状态Switch(vlan)#vtp domain “ domainname” 设置vtp 域Switch(vlan)#vtp server|client| transparent 设置模式Switch(vlan)#vtp password “ password” 设置vtpSwitch(vlan)#no vtp password 取消vtp 口令Switch(vlan)#exit 退出vlan 数据库配置状态Switch(config)#interface range “ interface mod/port -port ” 进入端口组配置状态Switch(config-if-range)#switchport trunk encapsulation dot1q|isl| negotiate 设置干道封装模式Switch(config-if-range)#switchport mode trunk 设置端口为干道模式Switch(config-if-range)#no shutdown 启用端口Switch(config-if-range)#end 结束本次配置五、创建、描述Vlan 及设置Vlan IPSwitch#vlan database 进入vlan 数据库配置状态文档Switch(vlan)#vlan “ vlan-num ” name “ vlan-name” 建立vlan 及名称Switch(vlan)#no vlan “ vlan-num ” 删除vlanSwitch(vlan)#exit 退出vlan 数据库配置状态Switch(config-if)#description “ description ” 描述vlanSwitch(config-if)#no description 取消描述Switch(config-if)#ip address “ ip-address subnet-mask” 设置vlan 网关的ip 地址Switch(config-if)#no shutdown 启用vlanSwitch(config-if)#end 结束本次配置六、划分、描述及设置Vlan 端口Switch#configure terminal 进入配置状态Switch(config)#interface “ interface mod/port ” 进入端口配置状态Switch(config-if)#switchport mode access 设置端口为访问模式Switch(config-if)#switchport access vlan “ vlan-num ” 设置端口所属VlanSwitch(config-if)#no shutdown 启用端口Switch(config-if)#end 结束本次配置或Switch#configure terminal 进入配置状态Switch(config)#interface range “ interface mod/port -port ” 进入端口组配置状态Switch(config-if-range)#description “ description ” 描述端口Switch(config-if-range)#speed auto|100|10 设置端口速率模式Switch(config-if-range)#duplex auto|full|half 设置端口双工模式Switch(config-if-range)#switchport mode access 设置端口为访问模式Switch(config-if-range)#switchport access vlan “ vlan-num ” 设置端口所属Vlan Switch(config-if-range)#no shutdown 启用端口Switch(config-if-range)#end 结束本次配置七、配置STP(生成树协议)Switch#configure terminal 进入配置状态Switch(config)#spanning-tree portfast default 设置所有访问端口为快速模式Switch(config)#no spanning-tree portfast default 取消所有访问端口为快速模式Switch(config)#spanning-tree uplinkfast 设置上行端口为快速模式Switch(config)#no spanning-tree uplinkfast 取消上行端口为快速模式Switch(config)#end 结束本次配置或Switch#configure terminal 进入配置状态Switch(config)#interface “ interfacemod/port ” 进入端口配置状态Switch(config-if)#spanning-tree portfast 设置端口为快速模式文档Switch(config-if)#no shutdown 启用端口Switch(config-if)#end 结束本次配置或Switch#configure terminal 进入配置状态Switch(config)#interface range “ interface mod/port -port ” 进入端口组配置状态Switch(config-if-range)# spanning-tree portfast 设置端口为快速模式Switch(config-if-range)#no shutdown 启用端口Switch(config-if-range)#end 结束本次配置八、启用 Vlan 间 RouterSwitch#configure terminal 进入配置状态Switch(config)#ip routing 启用 ip 路由Switch(config)#ip route “ Destination-prefix Destination-prefix-mask Forwarding-router 's-address ” Switch(config)#end 结束本次配置九、配置 ACLSwitch#configure terminal 进入配置状态Switch(config)#interface vlan “ vlan-num ” 进入 vlan 配置状态 Switch(config-if)#ip access-group “ acl-num ” in|out 应用 acl 到 vlan Switch(config-if)#end 结束本次配置 Switch#configure terminal 进入配置状态Switch(config)#line vty 0 15 进入 vty 配置状态Switch(config-line)#access-class “ acl-num ” in|out 应用 acl 到 vtySwitch(config-if)#end 结束本次配置例:Switch(config)#access-list 101 deny ip host 192.168.2.11 host 192.168.10.21 Switch(config)#access-list 102 deny ip host 192.168.2.13 192.168.10.0 0.0.0.255 Switch(config)#access-list 103 deny ip 192.168.2.0 0.0.0.255 192.168.10.0 0.0.0.255 Switch(config)# access-list 104 deny ip 192.168.2.0 0.0.0.255 host 192.168.10.25十、配置 DHCP 中继代理Switch#configure terminal 进入配置状态Switch(config)#service dhcp 启用 dhcp 服务Switch(config)#ip dhcp relay information option 启用 dhcp 代理服务Switch(config)#interface vlan “ vlan-num ” 进入 vlan 配置状态Switch(config-if)#ip helper-address “ ip-address ” 启用 dhcp 代理服务器 ip 地Switch(config-if)#end 结束本次配置文档十一、配置 DHCP 服务器Switch#configure terminal进入配置状态Switch (config)#ip dhcp pool “ Pool-name ” 设置 dhcp 地址池名称Switch (dhcp-config)#network “ Network-num Network-mask ” 设置 dhcp 地址池 ip 围 Switch (dhcp-config)# dns-server “ ip-address ” 为客户机分配 DNS 服务器 ip 地址 Switch (dhcp-config)#netbios-name-server “ ip-address ” 为客户机分配 WINS 服务器 ip 地址Switch#configure terminal 进入配置状态Switch(config)#service dhcp 启用dhcp 服务wyz(config)#ip dhcp excluded-address “ Low-ip-address High-ip-address ” 设置保留ip 地址Switch(config-if)#end 结束本次配置十二、配置HSRP (热备路由协议)Switch#configure terminal 进入配置状态Switch(config)#interface vlan “ vlan-num ” 进入vlan 配置状态Switch(config-if)#ip address “ ip-address subnet-mask” 设置vlan 物理ip 地址Switch(config-if)#standby “ group-num ” ip “virtual-ip-address ” 设置vlan 虚拟ip 地址Switch(config-if)#standby priority “ Priority-value ” 设置路由器优先等级Switch(config-if)#standby preempt 设置hsrp 抢占功能Switch(config-if)#standby timers “ Hello-interval-in-seconds Hold-time-in-seconds ”设置hello 信息Switch(config-if)#end 结束本次配置十三、保存配置Switch#write memory或Switch#copy running-config startup-config 附1:命令行编辑键TAB 补全命令?查看可用命令Ctrl + P 粘贴历史命令Ctrl + E 将光标移至命令末尾Ctrl + F 将光标向前移动Ctrl + B 将光标向后移动Ctrl + Z 返回#命令模式Ctrl + U Clear Line and Put in BufferCtrl + W Delete Word Backwards and Put in Buffer文档Ctrl + Y Paste Buffer ContentsCtrl + X Clear Line to the Left and Put in BufferCtrl + T Flip Last 2 CharactersCtrl + J ReturnCtrl + L Refresh LineCtrl + I Refresh Line and Goto EndCtrl + K Delete everything on the Right of cursorCtrl + V Allows to type control characterCtrl + M ReturnCtrl + H Backspace Character to the LeftCtrl + R 刷新行附2:SHOW 命令Switch#show version 显示版本信息Switch #show arp | include “ ip-address” 显示ip 地址对应的mac 地址信息Switch#show mac-address-table 显示mac 地址信息Switch#show mac-address-table | include “ mac-address” 格式:xxxx.xxxx.xxxx.xxxx Switch #show mac-address-table dynamic address “ mac-address” 显示mac 地址对应的端口信息Switch#show mac-address-table dynamic interface “ interface mod/port ” 显示端口对应的mac 地址信息Switch#show tech-support 显示技术支持信息Switch#show interfaces 显示接口信息Switch#show vlan 显示vlan 信息Switch#show startup-config 显示启用配置文件Switch#show running-config 显示运行配置文件Switch#show ip route 显示ip 路由状态Switch#clear counters interface “ interface mod/port ” 清除端口计数器Switch(config)#default interface “ interface mod/port ” 恢复端口出厂设置Switch#clear interface “ interface mod/port ” 重置端口的硬件逻辑keyada#show cdp neighbors “ interface mod/port ” detail 附7:ACL 例子VLAN1 需实现以下效果:1、VLAN1 主机192.168.1.240 可以访问所有网段;2、VLAN1 其余主机可以访问除VLAN2 、VLAN3 及VLAN4 外所有网段。
思科交换机配置教程首先,我们需要登录到交换机的控制台界面。
可以通过串口连接,或者通过网络连接,例如通过SSH协议进行连接。
登录后,我们进入到交换机的命令行界面。
接下来,我们需要进行基本的配置。
思科交换机的配置是通过命令行界面进行的,配置的命令是不同的,但是有一些通用的配置信息,我们可以先进行配置。
首先,我们要为交换机设置一个主机名。
可以使用如下命令进行配置:```Switch(config)# hostname Switch1```这样就为交换机设置了一个名字为"Switch1"的主机名。
接下来,我们可以配置交换机的管理IP地址。
可以使用如下命令进行配置:```Switch(config)# interface vlan 1Switch(config-if)# ip address 192.168.1.1 255.255.255.0Switch(config-if)# no shutdown```这样就为交换机的VLAN1接口配置了一个IP地址为192.168.1.1,子网掩码为255.255.255.0,并且启用了这个接口。
除了基本配置信息,我们还需要进行一些其他的配置,例如VLAN的配置。
VLAN是虚拟局域网的意思,可以将交换机的端口划分到不同的VLAN中,实现不同VLAN之间的隔离。
可以使用如下命令进行VLAN的配置:```Switch(config)# vlan 10Switch(config-vlan)# name VLAN10Switch(config-vlan)# exitSwitch(config)# interface fastEthernet 0/1Switch(config-if)# switchport access vlan 10Switch(config-if)# exit```这样就创建了一个编号为10的VLAN,名称为"VLAN10"。
1、进入用户模式,像这样有个大于符号的2、输入enable进入特权模式,像这样有个#号的3、输入configure terminal进入全局配置模式4、在全局配置模式下可以先设置特权密码,输入enablepassword 1235、接下来对vlan1的接口进行配置。
首先进入接口配置模式,输入interface vlan 16、现在开始配置vlan 1 的管理ip 和子网掩码。
输入ipaddress 192.168.1.1 255.255.255.07、将vlan1 设置为活跃状态。
输入no shut8、退出当前模式进入全局配置模式。
输入exit9、接下来是设置远程登录密码。
首先进入line配置模式,输入line vty 0 4(PS:这里VTY(Virtual Type Terminal)是虚拟终端的意思,line vty 0 4表示设置0到4号5个端口为远程登录端口,设置为0 3,0 2,0 1完全是可以的)10、然后设置密码。
输入password jfb11、输入了密码当然要保存!在上一步的基础上输入login12、然后输入end返回特权模式,再输入show running查看我们对交换机的配置情况13、设置正确。
14、现在就是对pc配置ip 和子网掩码(192.168.1.2255.255.255.0)15、连接一根直通双绞线。
16、接下来激动人心的时刻到来了,在命令提示符中输入ping192.168.1.1,是不是通了,如果没有可多试几次!17、更激动人心的时刻是在下面。
输入telnet 192.168.1.118、输入远程登录密码jfb,看看是不是远程登录成功了19、输入enable ,提示输入密码,该密码为特权密码,前面设置的123看看是不是进入特权模式了!20、现在你就可以对交换机进行配置了MY GOD``````。
实训十三、Cisco交换机的基本配置实训十三、Cisco 交换机的基本配置【实训目的】1、掌握访问交换机的常用几种方式;2、掌握采用Console 线缆配置交换机的方法;3、熟悉Cisco 交换机不同的命令行操作模式以及各种模式之间的切换;4、掌握Cisco 交换机的基本配置命令。
【实训条件】准备一台Cisco 交换机、PC 机一台、安装有Windows XP 操作系统及超级终端程序、Console 线缆1条、直通型双绞线网线两条。
或者使用Bonson Netsim 模拟器软件。
【实训任务】一、实训背景假设你是某公司新来的网管,公司要求你熟悉Cisco 网络设备,首先要求你登录交换机,了解、掌握交换机的命令行操作,掌握Cisco 交换机的基本配置命令。
二、实训拓扑图提示:为了保证实训室内计算机名和IP 地址设置不冲突,实训室中每台计算机必须设置不同的计算机名和IP 地址,建议可以分组设置。
如IP 地址与组名分别对应设置如下:01组对应192.168.1.X ;02组对应192.168.2.X ;03组对应图13-1 拓扑图 S2950:192.168.0.11/24PC :192.168.0.2/24192.168.3.X……。
内网保留IP地址设置可参考如下:C类IP地址范围:192.168.1.1-192.168.255.254/24;B类IP地址范围:172.16.0.1-172.31.255.254/16。
三、实训步骤1)、根据图13-1所示连接网络,并通过PC机登录到Cisco交换机上;2)、设置交换机名称为 S2950;3)、设置交换机的控制台口令为aaa;4)、设置交换机的远程登录口令为bbb;5)、设置交换机的特权口令为 test1,特权密码为 test2;6)、配置交换机的管理IP为 192.168.0.11/24;7)、配置交换机的默认网关为 192.168.0.1;8)、保存配置结果;9)、配置PC机的IP地址为192.168.0.2/24,默认网关为192.168.0.11;10)、验证配置结果:(1)、注销会话,重新登录交换机,验证控制台密码;(2)、由用户模式进入特权模式,验证特权密码;(3)、使用show running-config命令查看交换机配置信息;(4)、使用ping命令检查PC机与交换机的是否能通信;(5)、在PC机DOS下使用telnet验证能否登录到交换机;(6)、完成全部实训后清除所有的配置命令。
CISCO交换机配置操作学习教程1.注意事项1.交换机启动需要大约4-5分钟;2.网线插入交换机接口从黄变为绿需要大约1-2分钟,即进入正常工作模式;3.建议使用XP系统进行操作,2003默认没有安装超级终端,需要使用安装光盘添加该工具才有;4.请严格按照以下步骤进行,背景灰色字体为交换机显示信息,蓝色字体为配置命令。
2.准备工作先保持交换机断电状态;使用调试串口线连接笔记本电脑的串口与交换机背面的CONSOLE 接口;打开超级终端:开始-所有程序-附件-超级终端;配置超级终端:名称-cisco选择com1或com2(请依照实际情况进行选择)修改每秒位数为9600应用-确定-回车;3.初始配置给交换机通电;片刻后会看到交换机的启动信息,直到出现以下配置选项:Wouldyouliketoterminateautoinstall?[yes]:noWouldyouliketoentertheinitialconfigurationdialog?[yes/no ]:noWouldyouliketoterminateautoinstall?[yes]:no4.出现命令窗口Switch>5.备份出厂配置Switch>en进入特权模式Switch#copyrunning-configsfbak-configDestinationfilename[sfbak-config]?回车片刻后会出现:1204bytescopiedin0.529secs(2276bytes/sec)表示文件备份成功。
6.配置账号密码Switch#configureterminal进入配置子模式Switch(config)#enablepasswordcisco设置PASSWORD密码为ciscoSwitch(config)#enablesecretcisco设置SECRET密码为ciscoSwitch(config)#exit片刻后会出现:00:11:26:%SYS-5-CONFIG_I:Configuredfromconsolebyconsole表示将配置保存到了内存中,在后面的配置过程中会出现类似的信息,属于正常现象。
Cisco交换机配置新手篇:正确连接和初级配置Cisco交换机在网络设备中处于绝对领先地位,高端冗余设备(如:冗余超级引擎,冗余负载均衡电源,冗余风扇,冗余系统时钟,冗余上连,冗余的交换背板),高背板带宽,高多层交换速率等都为企业网络系统的高速稳定运行提供良好解决方案。
这就是为什么大型企业都选择Cisco交换机做核心层和分布层等主要网络设备。
Cisco分为高中低端交换机,分别面向不同层次。
但是多数Cisco交换机都基于Cisco 自家的IOS( Internet Operating System )系统。
所以设置都是大同小异。
让我们从零开始,一步一步教大家学会用Cisco交换机。
第一步:利用电脑超级终端与交换机建立连接可进行网络管理的交换机上都有一个“Console”端口,它是专门用于对交换机进行配置和管理的。
可以通过Console端口连接和配置交换机。
用Cisco自带的Console线R45端接入Cisco交换机Console口,Com口端接入电脑Com1或Com2口,必须注意的是要记清楚接入的是那个Com口。
按照步骤开启超级终端:开始-程序-附件-通讯-超级终端(图2)(图2)点击文件-新建连接(图3)(图3)输入超级终端名称,选择数据线所连端口(注意选择Com口时候要对应Console线接入电脑的Com口)确定-点击还原为默认值(图4)(图4)确定后开启交换机此时交换机开始载入IOS,可以从载入IOS界面上看到诸如IOS版本号,交换机型号,内存大小等数据当屏幕显示Press RETURN to get started的时候按回车就能直接进入交换机。
第二步:学习交换机的一些初级命令首先我们要知道Cisco有分两种系统,一种是基于CLI,一种是基于IOS。
暂时我们先探讨基于IOS的Cisco交换机。
基于IOS的交换机有三种模式,“>”用户模式,“#”特权模式,“(CONFIG)#”全局模式,在用户模式输入enable进入特权模式,在特权模式下输入disable回到用户模式,在特权模式下输入configure terminal进入全局模式。
思科交换机的基本配置随着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交换机是一种常用的网络设备,用于构建局域网(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. 初始化信息首次设置,必须通过console进行连接(需要U口转DB9针的接口线,专门卖接口线的有卖大约30元),然后进行初始化设计,以后设定IP后可通过LAN进行登陆具体步骤:(红色字体部分着重注意,需要进行设置,大部分按照默认设置即可,而且设置的部分进入管理工具软件可以更改) ---- System Admin Account Setup ----Enter the password for admin : passwordConfirm the password for admin : password--- Basic System Configuration Dialog ---This setup utility will guide you through the basic configuration of the system. Setup configures only enough connectivity for management of the system.Press Enter at any time to skip any dialog. Use ctrl-c at anytime to skip the remaining dialogs.Would you like to enter the basic configuration dialog (yes/no): y Create another login account (yes/no) [n]:Configure read-only SNMP community string (yes/no) [n]: Configure read-write SNMP community string (yes/no) [n]:Enter the switch name: Pxx-MDS-x (where xx is your pod number and x is the switch number; for example:P01-MDS-1)Continue with Out-of-band (mgmt0) management configuration? (yes/no) [y]:Mgmt0 IPv4 address : 10.0.x.y (where x is your pod number and y is 5 for MDS-1 and 3 for MDS-2)(客户)0.16Mgmt0 IPv4 netmask : 255.255.255.0Configure the default gateway? (yes/no) [y]:IPv4 address of the default gateway : 10.0.x.254 (where x is your pod number)Configure advanced IP options? (yes/no) [n]:Enable the telnet service? (yes/no) [y]:Enable the ssh service? (yes/no) [n]:Configure the ntp server? (yes/no) [n]:Configure default switchport interface state (shut/noshut) [shut]: (注意一下)noshutConfigure default switchport trunk mode (on/off/auto) [on]:Configure default zone policy (permit/deny) [deny]:Enable full zoneset distribution (yes/no) [n]:NOTE:初始设定的配置对新的VSAN起作用,即原始VSAN1无这些配置解决办法:1 zone default-zone permit VSAN2 新建NEW VSAN2 将port转移VSAN2里面。
Cisco交换机配置新手篇之端口配置上回跟大家介绍了如何正确连接交换机,今天用一些配置片段给大家介绍一下端口的配置。
鉴于网上大多数配置事例都是show-run出来的结果。
不利于新手对命令配置过程的了解,所以笔者将配置片段和注意的地方都注明了一下,希望能帮助新手尽快了解如何正确配置交换机。
在IOS输入命令时只要缩写的程度不会引起混淆,使用配置命令的时候都可以使用缩写的形式。
比如:Switch>enable,在用户模式下以en开头的命令就只有enable,所以可以缩写成Switch>en。
也可以用TAB键把命令自动补全,如Switch>en,按键盘TAB后自动补全为Switch>enable。
快捷键:1.Ctrl+A:把光标快速移动到整行的最开始2.Ctrl+E:把光标快速移动到整行的最末尾3.Esc+B:后退1个单词4.Ctrl+B:后退1个字符5.Esc+F:前进1个单词6.Ctrl+F:前进1个字符7.Ctrl+D:删除单独1个字符8.Backspace:删除单独1个字符9.Ctrl+R:重新显示1行10.Ctrl+U:擦除1整行11.Ctrl+W:删除1个单词12. Ctrl+Z从全局模式退出到特权模式13.Up arrow或者Ctrl+P:显示之前最后输入过的命令14.Down arrow或者Ctrl+N:显示之前刚刚输入过的命令配置enable口令以及主机名字,交换机中可以配置两种口令(一)使能口令(enable password),口令以明文显示(二)使能密码(enbale secret),口令以密文显示两者一般只需要配置其中一个,如果两者同时配置时,只有使能密码生效.Switch.> /*用户直行模式提示符Switch.>enable /*进入特权模式Switch.# /*特权模式提示符Switch.# config terminal /*进入配置模式Switch.(config)# /*配置模式提示符Switch.(config)# hostname Pconline /*设置主机名PconlinePconline(config)# enable password pconline /*设置使能口令为pconlinePconline(config)# enable secret network /*设置使能密码为networkPconline(config)# line vty 0 15 /*设置虚拟终端线Pconline(config-line)# login /*设置登陆验证Pconline(config-line)# password skill /*设置虚拟终端登陆密码注意:默认情况下如果没有设置虚拟终端密码是无法从远端进行telnet的,远端进行telnet 时候会提示设置login密码。
Cisco交换机配置新手篇:正确连接和初级配置
Cisco交换机在网络届处于绝对领先地位,高端冗余设备(如:冗余超级引擎,冗余负载均衡电源,冗余风扇,冗余系统时钟,冗余上连,冗余的交换背板),高背板带宽,高多层交换速率等都为企业网络系统的高速稳定运行提供良好解决方案。
这就是为什么大型企业都选择Cisco交换机做核心层和分布层等主要网络设备。
Cisco分为高中低端交换机,分别面向不同层次。
但是多数Cisco交换机都基于Cisco自家的IOS( Internet Operating System )系统。
所以设置都是大同小异。
让我们从零开始,一步一步教大家学会用Cisco交换机。
第一步:利用电脑超级终端与交换机建立连接
可进行网络管理的交换机上有一个“Console”端口,它是专门用于对交换机进行配置和管理的。
可以通过Console端口连接和配置交换机。
用Cisco自带的Console线,RJ-45端接入Cisco交换机Console 口,Com口端接入电脑Com1或Com2口,必须注意的是要记清楚接入的是那个Com口。
按照步骤开启超级终端:开始-程序-附件-通讯-超级终端(图2)
(图2)
点击文件-新建连接(图3)
(图3)
输入超级终端名称,选择数据线所连端口(注意选择Com口时候要对应Console线接入电脑的Com口):图4。