思科交换机实用配置步骤详解
cisco交换机配置简单教程
![cisco交换机配置简单教程](https://img.taocdn.com/s3/m/e03f8544b0717fd5370cdca2.png)
文档一、标识交换机二、设置口令及用户三、配置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 外所有网段。
思科模拟器交换机的使用教程详解
![思科模拟器交换机的使用教程详解](https://img.taocdn.com/s3/m/d5d4f2c90975f46527d3e162.png)
思科模拟器交换机的使用教程详解
思科模拟器是网络工程师经常使用的网络实验模拟软件,它可以很快捷的模拟网络中的各种设备(交换机、路由器、台式电脑、笔记本电脑、服务器、网络云),搭建各种网络环境,模拟网络拓扑结构等。
下面是小编整理的思科模拟器交换机使用教程,供您参考。
思科模拟器交换机使用教程
打开Cisco Packet Tracer,点击【交换机】,选择2960交换机,按住鼠标左键拖动到工作区。
这里有很多类型的交换机,其它类型的天使以后慢慢和大家讲解。
用同样的方法,拖动几台主机到工作区,如图所示,具体操作方法不再赘述
选择直通线,连接电脑和交换机的快速以太网端口
同理,依次连接电脑和交换机,刚连接交换机一侧节点是橘红色的,表示不通,稍等片刻,加载线缆之后就会变为绿色
直接点击主机名字,修改主机名字直接为IP地址。
这是一个很好的习惯,以后网络环境越来越复杂,像这样做可以更加清晰知道计算机所处状态
直接双击主机,依次设置每台主机的IP地址,这里都将它们设置在同一个网段
打开任意主机的【任务提示符】输入:ping 192.168.1.2,测试网络联通情况,发现无需其它配置网络已经可以互相通讯了
不落泪的天使1原创整理,请尊重小编的辛苦耕耘。
思科交换机的相关文章:
1.cisco交换机设置
2.cisco交换机时间设置时间
3.思科cisco怎么配置WEB网管
4.Cisco常用的路由器交换机配置命令。
CISCO交换机配置操作学习教程
![CISCO交换机配置操作学习教程](https://img.taocdn.com/s3/m/4d88ca6d5fbfc77da369b115.png)
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交换机配置手册配置教程](https://img.taocdn.com/s3/m/a0476586f424ccbff121dd36a32d7375a417c6d1.png)
思科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](https://img.taocdn.com/s3/m/bdad0bb8763231126fdb1116.png)
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交换机设置](https://img.taocdn.com/s3/m/2529acdfbb4cf7ec4afed033.png)
交换机设置步骤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交换机基本配置和使用概述](https://img.taocdn.com/s3/m/9c29330e30126edb6f1aff00bed5b9f3f90f720c.png)
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交换机配置教程](https://img.taocdn.com/s3/m/738a7975366baf1ffc4ffe4733687e21af45ffc5.png)
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等网络 模拟器可以在个人计算机 上搭建虚拟实验环境,进 行交换机配置的实践操作 。
思科交换机配置命令详解
![思科交换机配置命令详解](https://img.taocdn.com/s3/m/66d724c68bd63186bcebbc10.png)
用户模式主要是用于交换机的基本信息。在用户模式下,只能运行少数的命令。从配置端口进入交换机时,首ห้องสมุดไป่ตู้要进入一般用户模式,一般用户模式下默认的交换机提示符:switch〉
如果交换机的名字,则交换机提示符为:交换机的名字〉
用logout 命令退出。
2、特权模式
在默认模式下,特权模式可以使用一般用户模式下多得多的命令。特权模式用于察看各种状态,包括配置,管理及调试。从配置端口进入交换机时,默认的地特权状况为:switch#
如:switch#cloc?
如不知道命令行后面的参数应为为什么,可以在该命令的关键字后面的空一个格,键入“?”,交换机即会提示用户与”?“对应的位置参数是什么。
如:copy ?或copy run?
2、配置主机名及口令
配置主机名和设置加密口令是新交换机配置的第一项工作。为了分辨多个交换机配置主机名。设置加密口令可以防止他人非法修改路由器的配置。
(1)进入特级模式
Switch>enable
Password:******
注明:在初次进入交换机时不会要求输入password,因为还没有对password配置。
Switch#
(2)进入全局配置模式
Switch#configgure terminal(也可以简写为config t)
(7)定义交换端口
下面通过在模拟器上做一个小实验来实验来练习一下这些基本的命令。
实验设想:用一台cisco2950的两个快速以太网接口分别与两台网络号不同的pc机相连,通过一些基本的设置,使两台计算机能相互通信。
该模拟器有cisco系列的路由器(800,1000,1600,1700,2500,2600,3600,4500系列)和交换机(1900,2900,3500系列)。在这里我们选择2950系列的交换机把它拖到右边的界面里。
Cisco思科光纤交换机配置说明.doc
![Cisco思科光纤交换机配置说明.doc](https://img.taocdn.com/s3/m/bdad0bb8763231126fdb1116.png)
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交换机配置实例教程(2024)
![cisco交换机配置实例教程(2024)](https://img.taocdn.com/s3/m/e1db6f45854769eae009581b6bd97f192279bf03.png)
2024/1/29
堆叠交换机
允许多个交换机堆叠成一个逻辑单元,简化管理和提高可扩展性。
11
不同场景下的选型建议
01
接入层交换机
02
汇聚层交换机
03
核心层交换机
用于连接用户设备,如PC、打印 机等,通常选择固定配置或堆叠 交换机。
实现接入层交换机之间的汇聚, 需要具备较高性能和端口密度, 常选择模块化交换机。
进入全局配置模式
配置静态路由基本步骤
01
2024/1/29
03 02
26
静态路由协议配置教程
2024/1/29
01
指定目标网络和下一跳地址或出口接口
02
静态路由配置示例
03
配置静态路由到达远程网络
27
静态路由协议配置教程
配置默认路由指向上级路 由器
2024/1/29
优点:简单、稳定、低开 销
静态路由优缺点分析
2024/1/29
17
04
端口配置与VLAN划分实例
2024/1/29
18
端口类型及配置方法
以太网端口(Ethernet Port)
用于连接计算机、服务器等终端设备。
汇聚端口(Trunk Port)
用于交换机之间的连接,可以传输多个VLAN的数据。
2024/1/29
19
端口类型及配置方法
• 访问端口(Access Port):用于连接属于 某个VLAN的终端设备。
2024/1/29
20
端口类型及配置方法
进入端口配置模式
设置端口类型
配置VLAN
通过命令`interface <端口号>` 进入端口配置模式。
思科交换机的常用配置
![思科交换机的常用配置](https://img.taocdn.com/s3/m/b1482625ccbff121dd3683f5.png)
思科交换机的常用配置思科交换机的常用配置1、交换机的端口2、端口:以太网端口(e0、e1)、快速以太网端口(fast0、fast0/1[第一个模块的第一端口、fast1、fast1/1)、光纤接口(Tx、Rx)2、交换机的配置方法a、通过CONSOLE端口利用配置第一次安装使用交换机时,只能通过配置口(Console)进行配置。
配置电缆连接第一步:将配置电缆的DB-9(或DB-25)孔式插头接到要对交换机进行配置的微机或终端的串口上。
第二步:将配置电缆的RJ-45一端连到交换机器的配置口(Console)上。
设置微机或终端的参数第一步:打开微机或终端。
如果使用微机进行配置,需要在微机上运行终端仿真程序,如Windows 3.1的Terminal、Windows95/Windows98/Windows NT的超级终端。
第二步:设置终端参数。
参数要求:设置波特率为9600,数据位为8,奇偶校验为无,停止位为1,流量控制为无,Windows98超级终端参数设置方法如下:(1) 在图5-2所示的超级终端窗口中,单击其[属性]按钮,出现图5-3所示的超级终端属性对话框。
(2) 在超级终端属性对话框中[连接时使用]一栏选择连接的串口。
(3) 在串口的属性对话框中设置波特率为9600,数据位为8,奇偶校验为无,停止位为1,流量控制为无。
单击[确定]按钮交换机上电确认交换机与配置终端的连接正确,确认已经完成配置终端参数的设置后,即可对交换机上电。
随后交换机出现自检内容。
启动完毕,回车,超级终端里显示字样(旧命令行提示的是router>)。
即可进行下一步的配置。
备注要进行配置,具体配置情况以后再讲b、命令输入时的技巧?、TAB、↑、CTrl+d(删除光标所在位置的字附)、CTRL+C的使用。
3、交换的日常维护A、交换机的几种工作状态a、用户命令状态(switch>)b、特权状态(switch #)在用户命令状态下输入enablec、全局配置状态[switch (config)#]在特权状态下输入config命令B、查看交换机的版本(show version)C、查看交换机正在运行的文件(show run)D、查看交换机的备份文件(show star)E、设置交换机的密码F、查看闪存内的信息(show flash 显示的是交换机的IOS软件信息)G、exit返回到上一步2950常用配置a、设置从用户命令状态到特权状态的密码switch (config)#enable password abc(密码设为abc)switch (config)#enable secret abc(密码设为abc,但密码已被加密)switch (config)#hostname ipkh(将交换机的名字改为ipkh)switch#reload(重新启动交换机)b、置利用TELNET进行远程登录router>enablerouter#config trouter(config)#enable password abc(设置一个密码)router(config)#line vty 0 4(设置4条虚拟线路)router(config-line)#login(让路由器显示输入口令的提示)router(config-line)#password 123router(config-line)#exit(返回一步)备注:如果不设置密码,远程用户无法进行TELNET登录siwtchVlan1Vlan2Vlan3交换机的VLAN配置Switch#conf tSwitch(config)#inter vlan1Switch(config-if)#ip add 192.168.1.1 255.255.255.0(VLAN1是用来管理交换机的,VLAN1的地址也就是交换机的地址)Switch(config)#no shutdownSwitch(config)#ip default-gateway 192.168.1.2(设置交换机的缺省网关)Switch(config-if)#exitSwitch(config)#exitSwitch#vlan dataSwitch(vlan)#vlan 2 name cwSwitch(vlan)#vlan 3 name rsSwitch(vlan)#exitSwitch#conf tSwitch(config)#int range fa0/1 –3Switch(config-if)# switchport mode access(将此端口设置为访问模式,属于默认方式)Switch(config-if)#switchport access vlan 1Switch(config)#int range fa0/4 –6Switch(config-if)# switchport access vlan 2Switch(config)#int range fa0/7 –10Switch(config-if)#switchport access vlan 3Switch(config)#int fa0/11Switch(config-if)#switchport mode trunkSwitch(config-if)#duplex fullSwitch(config-if)#speed 1002950Aserver2950BclientVlan1Vlan2Vlan1Vlan2主干道配置2950ASwitch#conf tSwitch(config)#inter vlan1Switch(config-if)#ip add 192.168.1.1 255.255.255.0(VLAN1是用来管理交换机的,VLAN1的地址也就是交换机的地址)Switch(config)#no shutdownSwitch(config)#ip default-gateway 192.168.1.2(设置交换机的缺省网关)Switch(config-if)#exitSwitch(config)#exitSwitch#vlan dataSwitch(vlan)# vtp serverSwitch(vlan)#vtp domain ipkhSwitch(vlan)#vlan 2 name cwSwitch(vlan)#vlan 3 name rsSwitch(vlan)#exitSwitch#conf tSwitch(config)#int range fa0/1 –3Switch(config-if)# switchport mode accessSwitch(config-if)#switchport access vlan 1Switch(config)#int range fa0/4 –6Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 2Switch(config)#int range fa0/7 –10Switch(config-if)#switchport access vlan 3Switch(config-if)# switchport mode accessSwitch(config)#int fa0/11Switch(config-if)#switchport mode trunkSwitch(config-if)#duplex fullSwitch(config-if)#speed 1002950BSwitch#conf tSwitch(config)#inter vlan1Switch(config-if)#ip add 192.168.1.1 255.255.255.0(VLAN1是用来管理交换机的,VLAN1的地址也就是交换机的地址,必须与2950A相同)Switch(config)#no shutdownSwitch(config-if)#exitSwitch(config)#exitSwitch#vlan dataSwitch(vlan)# vtp clientSwitch(vlan)#vtp domain ipkhSwitch(vlan)#exitSwitch#conf tSwitch(config)#int range fa0/1 –3Switch(config-if)# switchport mode accessSwitch(config-if)#switchport access vlan 1Switch(config)#int range fa0/4 –6Switch(config-if)#switchport mode accessSwitch(config-if)# switchport access vlan 2Switch(config)#int range fa0/7 –10Switch(config-if)# switchport mode accessSwitch(config-if)#switchport access vlan 3Switch(config)#int fa0/11Switch(config-if)#switchport mode trunkSwitch(config-if)#duplex fullSwitch(config-if)#speed 100单臂路由器与交换机之间的合作组网(路由器的以太网口必须为快速以太网接口):实现1、各VLAN间相互通信,2、局域网内部的各计算机能与INTERNET 通信fa0RswitchVlan1Vlan2fa1E0:192.168.1.1E1:192.168.2.1R的配置Router(config)#int fa0/1Router(config-if)#ip add 192.168.2.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#ip nat outsideRouter(config)#access-list 1 permit anyRouter(config)#ip route 0.0.0.0 0.0.0.0 fa0/1Router(config)#ip nat inside source list 1 interface fa0/1 overloadRouter(config-if)#exitRouter(config)#int fa0/0Router(config-if)#duplex fullRouter(config-if)#speed 100Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#int fa0/0.1(vlan 1的子接口)Router(config-subif)# encap isl 1/encap dot1q 1(路由器与交换机之间的互联协议为ISL/802.1q)Router(config-subif)#ip add 192.168.1.1 255.255.255.0Router(config-subif)#ip nat inside(此接口作为NAT内接口)Router(config)#int fa0/0.2(vlan 2的子接口)Router(config-subif)# encap isl 1(路由器与交换机之间的互联协议为ISL)Router(config-subif)#ip add 192.168.2.1 255.255.255.0Router(config-subif)#ip nat insideRouter(config)#int fa0/0.3(vlan 2的子接口)Router(config-subif)# encap isl 1(路由器与交换机之间的互联协议为ISL)Router(config-subif)#ip add 192.168.3.1 255.255.255.0Router(config-subif)#ip nat insideSwitch的配置Switch(config)#int fa0/0Switch(config-if)#switch mode trunkSwitch(config-if)#switch trunk encap isl/dot1q(要与路由器保持一致)Switch(config-if)#speed 100Switch(config-if)#duplex fullSwitch(config)#int vlan1Switch(config-if)#ip add 192.168.1.2 255.255.255.0Switch(config-if)#exitSwitch(config)#ip default-gateway 192.168.1.1Switch(config)#exitSwitch#vlan dataSwitch(vlan)#vlan 2 name cwSwitch(vlan)#vlan 3 name rsSwitch(vlan)#vtp serverSwitch(vlan)#vtp domain ipkhSwitch(vlan)#exitSwitch#conf tSwitch(config)#int range fa0/1 –3Switch(config-if)#switchprot access vlan 1Switch(config-if)spanning-tree portfastSwitch(config)#int range fa0/4 –7Switch(config-if)#switchprot access vlan 2Switch(config-if)spanning-tree portfastSwitch(config)#int range fa0/8 –10Switch(config-if)#switchprot access vlan 3Switch(config-if)spanning-tree portfastCisco6509交换机设置DHCP实例一位客户想把DHCP SERVER迁移到6509交换机的MSFC上,要求还挺复杂:1.同时为多个VLAN的客户机分配地址2.VLAN内有部分地址采用手工分配的方式3.为客户指定网关、Wins服务器等4.VLAN 2的地址租用有效期限为1天,其它为3天5.按MAC地址为特定用户分配指定的IP地址最终配置如下:ip dhcp excluded-address 10.1.1.1 10.1.1.19 //不用于动态地址分配的地址ip dhcp excluded-address 10.1.1.240 10.1.1.254ip dhcp excluded-address 10.1.2.1 10.1.2.19!ip dhcp pool global //global是pool name,由用户指定network 10.1.0.0 255.255.0.0 //动态分配的地址段domain-name //为客户机配置域后缀dns-server 10.1.1.1 10.1.1.2 //为客户机配置dns服务器netbios-name-server 10.1.1.5 10.1.1.6 //为客户机配置wins服务器netbios-node-type h-node //为客户机配置节点模式(影响名称解释的顺利,如h-node=先通过wins服务器解释...)lease 3 //地址租用期限: 3天ip dhcp pool vlan1network 10.1.1.0 255.255.255.0 //本pool是global的子pool, 将从global pool继承domain-name等optiondefault-router 10.1.1.100 10.1.1.101 //为客户机配置默认网关!ip dhcp pool vlan2 //为另一VLAN配置的poolnetwork 10.1.2.0 255.255.255.0default-router 10.1.2.100 10.1.2.101lease 1!ip dhcp pool vlan1_john //总是为MAC地址为...的机器分配...地址host 10.1.1.21 255.255.255.0client-identifier 010050.bade.6384 //client-identifier=01加上客户机网卡地址!ip dhcp pool vlan1_tomhost 10.1.1.50 255.255.255.0client-identifier 010010.3ab1.eac8相关的DHCP调试命令:no service dhcp //停止DHCP服务[默认为启用DHCP服务sh ip dhcp binding //显示地址分配情况show ip dhcp conflict //显示地址冲突情况debug ip dhcp server {events | packets | linkage} //观察DHCP服务器工作情况如果DHCP客户机分配不到IP地址,常见的原因有两个。
思科交换机配置教程
![思科交换机配置教程](https://img.taocdn.com/s3/m/e4562615fc4ffe473368ab4d.png)
• 在PC2上 ping 192.168.1.1
给VLAN配置IP
interfacesw VLAN 10 IP addsress 192.168.1.254 255.255.255.0 ex interfacesw VLAN 20 IP addsress 192.168.2.254 255.255.255.0 ex ip routing
给电脑配置IP
杨毅pcpc1pc2pc1ip19216812542552552550pc2ip19216822542552552550首先把交换机与电脑相连把pc1连在switcha的01端口pc2连在switcha的02端口注意
思科交换机配置教程
制作人:杨毅
简单三层交换机配置
配置条件和要求
• • • • • 三层交换机一台(switchA) pc两台pc1, pc2 直通线两根 pc1 ip 192.168.1.254 255.255.255.0 pc2 ip 192.168.2.254 255.255.255.0
第一步
• 首先把交换机与电脑相连 把pc1连 在 switchA的 0/1端口,pc2连在switchA 的0/2端口 • 注意:电脑与交换机相连用直通线
第二步
机
• 在交换机switchA上面配置~(步骤如下 • • • • • 1、创建VLAN10 20 2、把端口分给VLAN 3、给我VLAN划分IP 4、激活端口 5、完成
• • • • • • PC1 上 IP :192.168.1.1 子网:255.255.255.0 网关:192.168.1.254 PC2 上 IP :192.168.2.1 子网:255.255.255.0 网关:192.168.2.254
思科交换机实用配置步骤详解
![思科交换机实用配置步骤详解](https://img.taocdn.com/s3/m/33a5c3caa76e58fafbb00334.png)
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 ; 设置登录口令xxswitch#exit ; 返回命令精选文库vla n switch#vla n database ;switch(vla n)#vla n 2 ;switch(vla n)#no via n 2 ;switch(co nfig)# int fO/1 ;进入VLAN设置建VLAN 2删vlan 2进入端口 1switch(co nfig-if)#switch portaccess vla n 2 ;switch(co nfig-if)#switch port mode trunk ;switch(co nfig-if)#switch port trunk allowed vla n 1switch(c on fig-if)#switch port trunk encap dot1q ;switch(co nfig)#vt p domai n ;switch(c on fig)#vt p p assword ;switch(c on fig)#vt p mode server ;switch(co nfig)#vt p mode clie nt ;交换机设置IP地址:switch(co nfig)#i nterface vla n 1 ;switch(c on fig-if)# ip address ;switch(c on fig)# ip default-gateway ;当前端口加入vlan 2设置为干线设置发vtp域名设置发vtp密码设置发vtp模式设置发vtp模式进入vlan 1设置IP地址设置默认网关,2;设置允许的设置vlan中继交换机VLAN设置:精选文库switch#dir flash:; 查看闪存交换机显示命令:switch#write ; 保存配置信息switch#show vtp ; 查看vtp配置信息switch#show run ; 查看当前配置信息switch#show via n ; 查看vian配置信息switch#show in terface ; 查看端口信息switch#show int fO/0 ; 查看指定端口信息2.路由器支持的命令:路由器显示命令:router#show run ; 显示配置信息router#show in terface ; 显示接口信息router#show ip route ; 显示路由信息router#showcd p nei ; 显示邻居信息router#reload ;重新起动路由器口令设置:router>e nable ; 进入特权模式router#c onfig term inal ; 进入全局配置模式router(c on fig)#host name ; 设置交换机的主机名router(c on fig)#e nable secret xxx ; 设置特权加密口令router(c on fig)#e nable p assword xxb ; 设置特权非密口令router(c on fig)#li ne con sole 0 ; 进入控制台口router(c on fig-li ne)#li ne vty 0 4 ; 进入虚拟终端router(c on fig-li ne)#logi n ; 要求口令验证router(c on fig-li ne)# password xx ; 设置登录口令xxrouter(c on fig)#(Ctrl+z); 返回特权模式router#exit ; 返回命令路由器配置:router(c on fig)#i nt sO/0 ; 进入Serail接口router(c on fig-if)# no shutdow n ; 激活当前接口router(co nfig-if)#clock rate 64000 ; 设置同步时钟router(c on fig-if)# ip address ; 设置IP地址router(c on fig-if)#i p address sec ond ; 设置第二个IP router(co nfig-if)#i nt f0/0.1 ; 进入子接口router(c on fig-subif.1)# ip address ; 设置子接口IProuter(c on fig-subif.1)#e neap sulati on dotlq ; 绑定vian中继协议router(c on fig)#c on fig-register 0x2142 ; 跳过配置文件router(c on fig)#c on fig-register 0x2102 ; 正常使用配置文件router#reload ; 重新引导路由器文件操作:router#c opy runnin g-c onfig start up-config ; 保存配置router#c opy runnin g-c onfig tftp ; 保存配置到tftprouter#c opy start up-config tftp ; 开机配置存到tftprouter#c opy tftp flash:; 下传文件到flashrouter#c opy tftp start up-config; 下载配置文件ROM状态:Ctrl+Break ; 进入ROM监控状态rommon>confreg 0x2142 ; 跳过配置文件rommon>confreg 0x2102 ; 恢复配置文件rommon> reset ;重新引导rommon>copy xmodem: flash:;从con sole传输文件rommo n>IP_ADDRESS=10.65.1.2 ; 设置路由器IPrommo n>IP_SUBNET_MASK=255.255.0.0 ; 设置路由器掩码rommon> TFT P_SERVER=10.65.1.1 ; 指定TFTP服务器IP rommo n>TFT P_FILE=c2600.bin ; 指定下载的文件rommon>tftpdnld ; 从tftp 下载rommon> dir flash:; 查看闪存内容rommon>boot ; 弓丨导IOS。
cisco3560思科交换机常用配置教程与实例
![cisco3560思科交换机常用配置教程与实例](https://img.taocdn.com/s3/m/d1518ca9d1f34693daef3ec7.png)
1.1路由器的几个操作模式Router>//用户模式Router>enable//用户模式敲入enable进入特权模式Router#configure terminal//特权模式敲入configure terminal进入全局配置模式Router(config)#interface ethernet 0//配置模式敲入interface+接口类型+接口编号,进入接口配置模式(如:interface serial 0 或是interface serial 0/1 ,interface fast1/1,接口编号是多少具体要看是哪个型号的设备)Router (config)#interface range fa 0/2 – 5//利用range可以一次操作多个端口Router(config-if)#exit //从接口模式退出到配置模式Router(config)#exit//从配置模式退出到特权模式注意:任何时候按Ctrl-z或是end都会退出到特权模式1.2命名主机名Router(config)#hostname 主机名//路由默认主机名为Router,交换机为switch如:Router(config)#hostname Wisdom//设置主机名是WisdomWisdom(config)#1.3给路由器设置时间Wisdom(config)#clock set 23:46:50 sep 4 2006Wisdom#show clock//用show clock 命令查看时间1.8.利用TELNET来管理网络首先通CONSOLE口控制R1,控制R1后通过TELNET到R2,R3,对R2,R3进行管理.在R1上实验:R1#telnet 12.1.1.2//从R1 TELNET到R2R2>按<Ctrl-Shift-6>x 切换回R1R1#telnet 13.1.1.3//从R1 TELNET到R3R3>按<Ctrl-Shift-6>x 切换回R1R1#show sessions//在R1上查看打开了多少个TELNET的会话Conn Host Address Byte Idle Conn Name1 12.1.1.2 12.1.1.2 0 0 12.1.1.2* 2 13.1.1.3 13.1.1.3 0 0 13.1.1.3R1#resume 2//重新连接到R3R3>按<Ctrl-Shift-6>x 切换回R1R1#R1#disconnect 1//从R1是主动断开到R2的连接(断开一个TELNET的会话)在R2上实验:R2#show users//在R2上查看有谁登录到路由器Line User Host(s) Idle Location* 0 con 0 idle 00:00:002 vty 0 idle 00:01:52 12.1.1.1R2#clear line 2//发现有人TELNET过来,把他清除R2#show usersLine User Host(s) Idle Location* 0 con 0 idle 00:00:00注意:Show session和show user的区别Disconnect 和Clear line的区别Ctrl+shift+6 x 和resume1.9 PING、TraceRoute、Debug、Sysloga.使用PING命令R1#ping 12.1.1.2如果ping的结果是!!!!!则表明网络正常.如果ping的结果是…..则表明网络不通.如果ping的结果是U.U.U则表明下一跳不可达.b.使用traceroute命令, 在网络层上追踪源到目的地址所经过的路由器.(或是数据包经过的路径)例:R2#traceroute 33.1.1.3Tracing the route to 33.1.1.31 12.1.1.1 4 msec 4 msec 4 msec2 13.1.1.34 msec 4 msec *//从以上可以看出从R2 到达33.1.1.3经过了12.1.1.1和13.1.1.3两个路由器例:………………………………………………………………………………………………………………….3.3使用串口管理交换机。
配置思科交换机
![配置思科交换机](https://img.taocdn.com/s3/m/3a44419dc0c708a1284ac850ad02de80d4d8063d.png)
交换机集群可以提高网络的性能和可管理性,同时简化网络管 理和配置。
THANKS FOR WATCHING
感谢您的观看
配置登录验证方式
在全局配置模式下输入 "login authentication < 用户名>"命令配置登录验 证方式。
02 VLAN配置
创建VLAN
总结词
在思科交换机上创建VLAN,需要进入特权执行模式,并使用`vlan`命令。
详细描述
首先,通过控制台或SSH连接到交换机,然后输入`enable`进入特权执行模式。接下来,使用`vlan`命令创建 VLAN,并为其分配一个ID。例如,要创建一个ID为10的VLAN,可以输入`vlan 10`。
配置思科交换机
目 录
• 交换机基本配置 • VLAN配置 • 交换机安全配置 • 交换机高级配置
01 交换机基本配置
登录交换机
连接交换机
通过控制台线或Telnet 连接到交换机。
登录提示
进入特权模式
在登录提示符下输入用 户名和密码进行登录。
输入"enable"命令进入 特权模式。
配置模式
在特权模式下输入 "configure terminal" 命令进入配置模式。
配置VLAN间通信
总结词
为了实现VLAN之间的通信,需要配置 VLAN间路由和三层交换。
VS
详细描述
在配置了VLAN间路由之后,还需要启用三 层交换来允许VLAN之间的通信。使用`ip routing`命令启用IP路由,然后使用 `interface vlan`命令进入VLAN接口配置模 式。在每个VLAN接口上配置IP地址和其他 相关的网络参数,以便在该VLAN之间进行 通信。例如,要为VLAN 10配置IP地址为 192.168.10.1的IP地址,可以输入 `interface vlan 10`,然后`ip address 192.168.10.1 255.255.255.0`。
Cisco交换机配置教程
![Cisco交换机配置教程](https://img.taocdn.com/s3/m/b39ba47c5fbfc77da369b134.png)
C i s c o交换机配置教程 IMB standardization office【IMB 5AB- IMBK 08- IMB 2C】C i s c o交换机配置教程Cisco交换机在网络届处于绝对领先地位,高端冗余设备(如:冗余超级引擎,冗余负载均衡电源,冗余风扇,冗余系统时钟,冗余上连,冗余的交换背板),高背板带宽,高多层交换速率等都为企业网络系统的高速稳定运行提供良好解决方案。
这就是为什么大型企业都选择Cisco交换机做核心层和分布层等主要网络设备。
被过滤广告Cisco分为高中低端交换机,分别面向不同层次。
但是多数Cisco交换机都基于Cisco自家的IOS(InternetOperatingSystem)系统。
所以设置都是大同小异。
让我们从零开始,一步一步教大家学会用Cisco交换机。
第一步:利用电脑超级终端与交换机建立连接可进行网络管理的交换机上有一个“Console”端口,它是专门用于对交换机进行配置和管理的。
可以通过Console端口连接和配置交换机。
用Cisco自带的Console线,RJ-45端接入Cisco交换机Console口,Com口端接入电脑Com1或Com2口,必须注意的是要记清楚接入的是那个Com口。
按照步骤开启超级终端:开始-程序-附件-通讯-超级终端(图2)(图2)点击文件-新建连接(图3)(图3)?输入超级终端名称,选择数据线所连端口(注意选择Com口时候要对应Console线接入电脑的Com口):图4?(图4)确定-点击还原为默认值(图5)(图5)?确定后开启交换机此时交换机开始载入IOS,可以从载入IOS界面上看到诸如IOS版本号,交换机型号,内存大小等数据当屏幕显示PressRETURNtogetstarted的时候按回车就能直接进入交换机第二步:学习交换机的一些初级命令首先我们要知道Cisco配置界面分两种,一种是基于CLI(Command-lineInterface命令行界面),一种是基于IOS(InternetworkOpertingSystem互联网操作系统)。
思科交换机配置方法
![思科交换机配置方法](https://img.taocdn.com/s3/m/e337bc9aed3a87c24028915f804d2b160b4e860b.png)
思科交换机配置方法(一)使能口令(enable password),口令以明文显示使能密码(enbale secret),口令以密文显示Switch.> /*用户直行模式提示符Switch.>enable /*进入特权模式Switch.# /*特权模式(进入前要输入密文)Switch.#config terminal /*进入全局配置模式Switch.(config)# /*配置模式提示符Switch.(config)# hostname Pconline /*设置主机名Pconline Pconline(config)# enable password cisco3560 /*设置使能口令为pconlinePconline(config)# enable secret cisco3560 /*设置使能密码为networkPconline(config)# line vty 0 15 /*设置虚拟终端线Pconline(config-line)# login /*设置登陆验证Pconline(config-line)# password cisco3560 /*设置虚拟终端登陆密码二、交换机VLAN设置Switch.> /*用户直行模式提示符Switch.>enable /*进入特权模式switch#vlan database ;进入VLAN设置switch(vlan)# vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入网络端口1switch(config)#int giga0/1 ; 进入汇聚千兆口1switch(config-if)# duplex {auto | full | half} 设置端口为---自动/全双工/半双工switch(config-if)#switchport mode trunk ;当前端口设置为汇聚口switch(config-if)#switchport mode access ;当前端口设置为接入模式switch(config-if)#switchport trunk allowed vlan 1,2 ;设置1,2号口允许的vlan组switch(config-if)#switchport trunk vlan 2 ;设置1号口允许的vlanswitch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继cisco网络中,交换机在局域网中最终稳定状态的接口类型主要有四种:access/ trunk/ multi/ dot1q-tunnel。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 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。