思科交换机实用配置步骤详解

合集下载

cisco交换机配置简单教程

cisco交换机配置简单教程

文档一、标识交换机二、设置口令及用户三、配置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 外所有网段。

思科模拟器交换机的使用教程详解

思科模拟器交换机的使用教程详解

思科模拟器交换机的使用教程详解
思科模拟器是网络工程师经常使用的网络实验模拟软件,它可以很快捷的模拟网络中的各种设备(交换机、路由器、台式电脑、笔记本电脑、服务器、网络云),搭建各种网络环境,模拟网络拓扑结构等。

下面是小编整理的思科模拟器交换机使用教程,供您参考。

思科模拟器交换机使用教程
打开Cisco Packet Tracer,点击【交换机】,选择2960交换机,按住鼠标左键拖动到工作区。

这里有很多类型的交换机,其它类型的天使以后慢慢和大家讲解。

用同样的方法,拖动几台主机到工作区,如图所示,具体操作方法不再赘述
选择直通线,连接电脑和交换机的快速以太网端口
同理,依次连接电脑和交换机,刚连接交换机一侧节点是橘红色的,表示不通,稍等片刻,加载线缆之后就会变为绿色
直接点击主机名字,修改主机名字直接为IP地址。

这是一个很好的习惯,以后网络环境越来越复杂,像这样做可以更加清晰知道计算机所处状态
直接双击主机,依次设置每台主机的IP地址,这里都将它们设置在同一个网段
打开任意主机的【任务提示符】输入:ping 192.168.1.2,测试网络联通情况,发现无需其它配置网络已经可以互相通讯了
不落泪的天使1原创整理,请尊重小编的辛苦耕耘。

思科交换机的相关文章:
1.cisco交换机设置
2.cisco交换机时间设置时间
3.思科cisco怎么配置WEB网管
4.Cisco常用的路由器交换机配置命令。

CISCO交换机配置操作学习教程

CISCO交换机配置操作学习教程

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交换机配置手册配置教程配置接口特性这一章详细说明交换机上的接口和描述怎么配置他们。

这章有以下这些内容:●理解接口类型●使用接口命令●配置二层接口●监控和维护第二层接口●配置第三从接口注意:需要完整的有关该章的语法和应用信息,请参考Catalyst 3550 Multilayer Switch Command Reference和Cisco IOS Interface Command Referencefor Release 12.1.理解接口类型这个部分描述了不同的接口类型,以及其它章节所包括的详细配置这些接口的一些参考内容。

其他章节描述了物理接口特性的配置过程。

这部分包括:基于端口的VLAN (Port-Based VLANs)交换端口(Switch Ports)以太网通道端口组(EtherChannel Port Groups)交换虚拟接口(Switch Virtual Interfaces)被路由端口(Routed Ports)连接接口(Connecting Interfaces)基于端口的VLAN (Port-based Vlans)一个Vlan是一个按功能、组、或者应用被逻辑分段的交换网络,并不考虑使用者的物理位置。

要更多关于Vlan的信息请看“Configuring VLANS”。

一个端口上接受到的包被发往属于同一个Vlan的接收端口。

没有一个第三层的设备路由Vlan间的流量,不同Vlan的网络设备无法通讯。

为了配置普通范围(Normal-range) Vlan(Vlan IDs 1-1005),使用命令:config-vlan模式(global) vlan vlan-id或vlan-configuration模式(exec) vlan database针对Vlan ID 1-1005的vlan-configration模式被保存在vlan数据库中。

为配置扩展范围(extended-range)Vlans (Vlan ID 1006-4094),你必须使用config-vlan模式,并把VTP的模式设为transparent透明模式。

Cisco思科光纤交换机配置说明.doc

Cisco思科光纤交换机配置说明.doc

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交换机设置

CISCO交换机设置

交换机设置步骤1.上电-除电源线外,其它任何线缆都不要插在交换机上2.自检完成- system led绿色,其它除XPS以外的LED常亮3.按住MODE按钮不放(持续3s)4.插上网线,连接电脑(电脑端口设置为自动获取IP地址)5.进入配置页面:10.0.0.1---用户名及密码都是cisco交换机密码:cisco1 talent密码:wisdri6.电脑需要安装USB驱动7.启用talent登录输入交换机密码cisco1Switch>enable Password:Using driver version 4 for meSwitch>show vlanVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3Gi1/0/4, Gi1/0/5, Gi1/0/6Gi1/0/7, Gi1/0/8, Gi1/0/9Gi1/0/10, Gi1/0/11, Gi1/0/12Gi1/0/13, Gi1/0/14, Gi1/0/15Gi1/0/16, Gi1/0/17, Gi1/0/18Gi1/0/19, Gi1/0/20, Gi1/0/21Gi1/0/22, Gi1/0/23, Gi1/0/24Gi1/1/1, Gi1/1/2, Gi1/1/3Gi1/1/41002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0 1004 fdnet 101004 1500 - - - ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0Remote SPAN VLANs------------------------------------------------------------------------------Primary Secondary Type Ports------- --------- ----------------- ------------------------------------------Switch>Switch>Switch>Switch>enablePassword:Password:Password:% Bad secretsSwitch>cisco1Translating "cisco1"...domain server (255.255.255.255)% Unknown command or computer name, or unable to find computer address Switch>Switch>Switch>Switch>Switch>Switch>Switch>Switch>Switch>Switch>Switch>enablePassword:Password:Password:% Bad secretsSwitch>enablePassword:Password:Switch#Switch#Switch#Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#name plcSwitch(config-vlan)#endSwitch#Mar 29 02:33:57.955: %SYS-5-CONFIG_I: Configured from console by console Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 3Switch(config-vlan)#name levelSwitch(config-vlan)#endSwitch#Mar 29 02:36:58.747: %SYS-5-CONFIG_I: Configured from console by console Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface gigabitethernet1/0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan2^% Invalid input detected at '^' marker.Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#interface gigabitethernet1/0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 2Switch(config-if)#endSwitch#Mar 29 02:48:26.503: %SYS-5-CONFIG_I: Configured from console by consoleSwitch#show ip interface briefInterface IP-Address OK? Method Status Protocol Vlan1 191.167.0.2 YES TFTP up down FastEthernet0 unassigned YES other down down GigabitEthernet1/0/1 unassigned YES unset down down GigabitEthernet1/0/2 unassigned YES unset down down GigabitEthernet1/0/3 unassigned YES unset down down GigabitEthernet1/0/4 unassigned YES unset down down GigabitEthernet1/0/5 unassigned YES unset down down GigabitEthernet1/0/6 unassigned YES unset down down GigabitEthernet1/0/7 unassigned YES unset down down GigabitEthernet1/0/8 unassigned YES unset down down GigabitEthernet1/0/9 unassigned YES unset down down GigabitEthernet1/0/10 unassigned YES unset down down GigabitEthernet1/0/11 unassigned YES unset down down GigabitEthernet1/0/12 unassigned YES unset down downGigabitEthernet1/0/13 unassigned YES unset down downGigabitEthernet1/0/14 unassigned YES unset down down GigabitEthernet1/0/15 unassigned YES unset down down GigabitEthernet1/0/16 unassigned YES unset down down GigabitEthernet1/0/17 unassigned YES unset down down GigabitEthernet1/0/18 unassigned YES unset down down GigabitEthernet1/0/19 unassigned YES unset down down GigabitEthernet1/0/20 unassigned YES unset down down GigabitEthernet1/0/21 unassigned YES unset down down GigabitEthernet1/0/22 unassigned YES unset down down GigabitEthernet1/0/23 unassigned YES unset down down GigabitEthernet1/0/24 unassigned YES unset down down GigabitEthernet1/1/1 unassigned YES unset down down GigabitEthernet1/1/2 unassigned YES unset down down GigabitEthernet1/1/3 unassigned YES unset down down GigabitEthernet1/1/4 unassigned YES unset down down Te1/1/1 unassigned YES unset down down Te1/1/2 unassigned YES unset down downSwitch#Switch#Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface vlan 2Switch(config-if)#Mar 29 02:52:06.646: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, chan ged state to downSwitch(config-if)#ip address 10.52.40.254 255.255.255.0Switch(config-if)#endSwitch#Mar 29 02:53:30.171: %SYS-5-CONFIG_I: Configured from console by consoleSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface vlan 3Switch(config-if)#Mar 29 02:54:00.672: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3, chan ged state to downSwitch(config-if)#ip address 10.52.41.254 255.255.255.0Switch(config-if)#endSwitch#Mar 29 02:54:28.765: %SYS-5-CONFIG_I: Configured from console by consoleSwitch#show ip interface briefInterface IP-Address OK? Method Status Protocol Vlan1 191.167.0.2 YES TFTP up down Vlan2 10.52.40.254 YES manual up down Vlan3 10.52.41.254 YES manual up down FastEthernet0 unassigned YES other down down GigabitEthernet1/0/1 unassigned YES unset down down GigabitEthernet1/0/2 unassigned YES unset down down GigabitEthernet1/0/3 unassigned YES unset down down GigabitEthernet1/0/4 unassigned YES unset down down GigabitEthernet1/0/5 unassigned YES unset down down GigabitEthernet1/0/6 unassigned YES unset down down GigabitEthernet1/0/7 unassigned YES unset down down GigabitEthernet1/0/8 unassigned YES unset down down GigabitEthernet1/0/9 unassigned YES unset down down GigabitEthernet1/0/10 unassigned YES unset down downGigabitEthernet1/0/11 unassigned YES unset down downGigabitEthernet1/0/12 unassigned YES unset down down GigabitEthernet1/0/13 unassigned YES unset down down GigabitEthernet1/0/14 unassigned YES unset down down GigabitEthernet1/0/15 unassigned YES unset down down GigabitEthernet1/0/16 unassigned YES unset down down GigabitEthernet1/0/17 unassigned YES unset down down GigabitEthernet1/0/18 unassigned YES unset down down GigabitEthernet1/0/19 unassigned YES unset down down GigabitEthernet1/0/20 unassigned YES unset down down GigabitEthernet1/0/21 unassigned YES unset down down GigabitEthernet1/0/22 unassigned YES unset down down GigabitEthernet1/0/23 unassigned YES unset down down GigabitEthernet1/0/24 unassigned YES unset down down GigabitEthernet1/1/1 unassigned YES unset down down GigabitEthernet1/1/2 unassigned YES unset down down GigabitEthernet1/1/3 unassigned YES unset down down GigabitEthernet1/1/4 unassigned YES unset down down Te1/1/1 unassigned YES unset down down Te1/1/2 unassigned YES unset down downSwitch#Switch#Switch#show vlan briefVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Gi1/0/3, Gi1/0/4, Gi1/0/5Gi1/0/6, Gi1/0/7, Gi1/0/8Gi1/0/9, Gi1/0/10, Gi1/0/11Gi1/0/12, Gi1/0/13, Gi1/0/14Gi1/0/15, Gi1/0/16, Gi1/0/17Gi1/0/18, Gi1/0/19, Gi1/0/20Gi1/0/21, Gi1/0/22, Gi1/0/23Gi1/0/24, Gi1/1/1, Gi1/1/2Gi1/1/3, Gi1/1/42 plc active Gi1/0/1, Gi1/0/23 level active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface range gigabitethernet1/0/3 - 20Switch(config-if-range)#switch mode accessSwitch(config-if-range)#switch access vlan 2Switch(config-if-range)#endSwitch#Mar 29 02:59:22.333: %SYS-5-CONFIG_I: Configured from console by consoleSwitch#show vlan briefVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Gi1/0/21, Gi1/0/22, Gi1/0/23Gi1/0/24, Gi1/1/1, Gi1/1/2Gi1/1/3, Gi1/1/42 plc active Gi1/0/1, Gi1/0/2, Gi1/0/3Gi1/0/4, Gi1/0/5, Gi1/0/6Gi1/0/7, Gi1/0/8, Gi1/0/9Gi1/0/10, Gi1/0/11, Gi1/0/12Gi1/0/13, Gi1/0/14, Gi1/0/15Gi1/0/16, Gi1/0/17, Gi1/0/18Gi1/0/19, Gi1/0/203 level active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface range gigabitethernet1/0/21 - 24Switch(config-if-range)#switch mode accessSwitch(config-if-range)#switch access vlan 3Switch(config-if-range)#endSwitch#Mar 29 03:01:19.388: %SYS-5-CONFIG_I: Configured from console by consoleSwitch#show vlan briefVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Gi1/1/1, Gi1/1/2, Gi1/1/3Gi1/1/42 plc active Gi1/0/1, Gi1/0/2, Gi1/0/3Gi1/0/4, Gi1/0/5, Gi1/0/6Gi1/0/7, Gi1/0/8, Gi1/0/9Gi1/0/10, Gi1/0/11, Gi1/0/12Gi1/0/13, Gi1/0/14, Gi1/0/15Gi1/0/16, Gi1/0/17, Gi1/0/18Gi1/0/19, Gi1/0/203 level active Gi1/0/21, Gi1/0/22, Gi1/0/23Gi1/0/241002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface range gigabitethernet1/1/1 - 4Switch(config-if-range)#switch mode accessSwitch(config-if-range)#switch access vlan 3Switch(config-if-range)#endSwitch#Mar 29 03:05:44.921: %SYS-5-CONFIG_I: Configured from console by consoles% Type "show ?" for a list of subcommandsSwitch#show vlan briefVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active2 plc active Gi1/0/1, Gi1/0/2, Gi1/0/3Gi1/0/4, Gi1/0/5, Gi1/0/6Gi1/0/7, Gi1/0/8, Gi1/0/9Gi1/0/10, Gi1/0/11, Gi1/0/12Gi1/0/13, Gi1/0/14, Gi1/0/15Gi1/0/16, Gi1/0/17, Gi1/0/18Gi1/0/19, Gi1/0/203 level active Gi1/0/21, Gi1/0/22, Gi1/0/23Gi1/0/24, Gi1/1/1, Gi1/1/2Gi1/1/3, Gi1/1/41002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupSwitch#ip routing^% Invalid input detected at '^' marker.Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#ip routingSwitch(config)#endSwitch#Mar 29 03:09:23.922: %SYS-5-CONFIG_I: Configured from console by consoleSwitch#show ip ospfSwitch#copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK]0 bytes copied in 1.217 secs (0 bytes/sec)Switch#Switch#Switch#Switch#Switch#Switch#。

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。

2024年度Cisco交换机配置教程

2024年度Cisco交换机配置教程
交换机可以通过控制台线连接计算机进行配置,也可以通过 Telnet或SSH远程登录进行配置。
VLAN可以将交换机上的端口划分成不同的虚拟局域网,实现广 播域的隔离和不同部门之间的安全通信。
通过配置访问控制列表(ACL)、端口安全等功能,可以提高交 换机的安全性,防止未经授权的访问和网络攻击。
33
拓展学习资源推荐(书籍、网站等)
4
交换机工作原理
交换机根据收到数据帧中的源 MAC地址建立该地址同交换机 端口的映射,并将其写入MAC
地址表中。
交换机将数据帧中的目的MAC 地址同已建立的MAC地址表进 行比较,以决定由哪个端口进
行转发。
2024/3/23
如数据帧中的目的MAC地址不 在MAC地址表中,则向所有端 口转发。这一过程称为泛洪( Flood)。
2024/3/23
查看MAC地址表
使用“show mac-address-table” 命令查看交换机的MAC地址表,包 括MAC地址、接口、VLAN等信息。
查看路由表
如果交换机配置了路由功能,可使用 “show ip route”命令查看路由表 信息。
14
04
端口配置与VLAN划分
Chapter
01
02
03
04
书籍推荐
《Cisco交换机配置与管 理》、《网络工程师必读 ——交换机/路由器配置 与管理》等。
网站推荐
Cisco官方网站、华为企 业网络学院、网络技术论 坛等。
在线课程推荐
Coursera、网易云课堂 、51CTO学院等在线教 育平台上提供的相关课程 。
实验环境推荐
GNS3、EVE-NG等网络 模拟器可以在个人计算机 上搭建虚拟实验环境,进 行交换机配置的实践操作 。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.交换机支持的命令:
交换机基本状态:
switch: ;ROM状态,路由器是rommon>
hostname> ;用户模式
hostname# ;特权模式
hostname(config)# ;全局配置模式
hostname(config-if)# ;接口状态交换机口令设置:
switch>enable ;进入特权模式
switch#config terminal ;进入全局配置模式
switch(config)#hostname ;设置交换机的主机名
switch(config)#enable secret xxx ;设置特权加密口令
switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4 ;进入虚拟终端
switch(config-line)#login ;允许登录
switch(config-line)#password xx ;设置登录口令xx
switch#exit ;返回命令
交换机VLAN设置:
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchportaccess vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp mode server ;设置发vtp模式
switch(config)#vtp mode client ;设置发vtp模式
交换机设置IP地址:
switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ipaddress ;设置IP地址
switch(config)#ip default-gateway ;设置默认网关
switch#dir flash: ;查看闪存
交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息2. 路由器支持的命令:
路由器显示命令:
router#show run ;显示配置信息
router#show interface ;显示接口信息router#show ip route ;显示路由信息router#showcdp nei ;显示邻居信息router#reload ;重新起动
路由器口令设置:
router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口
router(config-line)#line vty 0 4 ;进入虚拟终端
router(config-line)#login ;要求口令验证
router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ; 返回特权模式
router#exit ;返回命令
路由器配置:
router(config)#int s0/0 ;进入Serail接口
router(config-if)#no shutdown ;激活当前接口
router(config-if)#clock rate 64000 ;设置同步时钟
router(config-if)#ip address ;设置IP地址
router(config-if)#ip address second ;设置第二个IP router(config-if)#int f0/0.1 ;进入子接口
router(config-subif.1)#ip address ;设置子接口IP
router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引导
路由器文件操作:
router#copy running-config startup-config ;保存配置
router#copy running-config tftp ;保存配置到tftp
router#copy startup-config tftp ;开机配置存到tftp
router#copy t: ;下传文件到flash
router#copy t;下载配置文件
ROM状态:
Ctrl+Break ;进入ROM监控状态
rommon>confreg 0x2142 ;跳过配置文件
rommon>confreg 0x2102 ;恢复配置文件
rommon>reset;重新引导
rommon>copy xmodem: flash: ;从console传输文件
rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>T ;指定T服务器IP
rommon>T ;指定下载的文件
rommon>t ;从tftp下载
rommon>dir flash: ;查看闪存内容
rommon>boot ;引导IOS。

相关文档
最新文档