版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1、switch:用户模式能查看版本信息2960|-24TTSwitchO2、在用户模式下输入enable会进特权模式它能保存、修改、删除这一系列的配置switchenablLswitch# :特权模式,下面有一些命令就在此命令下完成:、删除vlan的文件配置:delete flash:vlan.dat、删除vlan中的配置文件:erase startup-config、查看vlan配置文件是否被删除及vlan的是否创建:show vlan、重新启动交换机:reload、查看当前交换机的配置:show running-config、保存对交换机所配置的内容,即是保存在Nvram:copy ru
2、nning-config startup-config、检查 Nvram 的内容:show startup-config、检查虚拟接口 vlan的特征:show interface vlan 1、查看接口 IP 的属性:show ip interface vlan 1、查看cisco的信息:show version、查看交换机所用快速以太网接口的默认属性:show interface fastethernet 0/18、查看闪存目录中的内容:show flash或dir flash3、在特权模式下输入configure ternina后会进入全局模式,一切的配置必须在此模式中进行配置Switc
3、h#configure terninaHswitchp(config)# :全局模式swin 门h.-门rl-nf i g J:tt:h.口lll-tnalliITIhh. hh -IJii-kl figuITIrLat- lITIw S.IIIlllmll- eli门 1 S.IIIIII hh L n11-rL fig:ttl inm 门 211.11OHIt0 1 门II- n f i g 1 imITI:tt:pLlll址IxnllEli门 ilII门II- 目-(-IJii-kl f i g 1 iTl-E#IIIM iITt -3w&sg+sw_rch(conf_g)#hosmam
4、e+ 冷ssg+ -3wHf3ns国、SM瞟圈【sw_rch(conf 一g)#enab_e password +1 -3wjlttts)4国- sw_rch(conf-g)#enab-e secrer-l-+ 国 4/ 苛冷ssswconsoe 口 !-L nI1-rL f i g J:tt:l inm 门ll-rLlllOHItI|一 hli -门II- n f i g 1 imITI:tt:pLlll址Txrll- Eli门 illl门口 hh _(-IJIi-kl f i g 1 irlITIJ 111二心 in.hh _(nI1-rL fig-11 inm J:ttmHit-HfsB
5、3wn、sHfconso-e 口【sw-rch(conf-g)# -me conso-e 0 -w国(M翠诩邑西脚幽兵国【sw_rch(conf 一 gme)#password + 国 。,膜知-sw_rch(conf-gme)#-ogmS3SS -El 门口m f i g-:ttl irLIIIvty 0 4hlH门口rtf i g- 1 irLIII林 ppllllllmll- e d. lNIlvl4CHEhh. -(n OS fig-1 inm:tt1II- gin.El 门口m fig-1 inIII牯ITIMin , ms3s,,弟-1/1限知sw_rch(conf 一 g)#-m
6、e vty 0 4誓,弟出-膜划 -w国- sw_rch(conf-gme)#password + 国 。,SIM膜知-sw_rchp(conf-gme)#-ogm6,hh ( c on fig) #nc ip dciiLain-1 o okuphli (c on f i g) # s e rvi c e p as st.tfi r d- enc rypt ion对所有密码进行加密:switch(config)#service password-encryption、不解析错误的命令:switch(config)#no ip domain-lookup7、创建vlan( 21001,注vlan
7、 1既不可以创建,也不可以删除)Ewir. ch (r on fig) ftvl ail ZSwit ch ( c on f i g-vl ail) #vl ail 3Swit ch ( c on f i g-vl ai) # e x it、创建vlan : vlan +要创建vlan的值、给vlan取名:switch(config-vlan)#name +名字(此步可以不要)、把PC与交换机相连的端口添加到相应的vlan中:Swit ch I: c on fig) it int f 0 /1ST.iitcl i: conf ig-i f J #switcliport access vlaii
8、 ZEwir. ch i: c on f i g- i f J jS e x itSwit ch I: c on fig) it int f 0 / 3ST.iitcl i: conf ig-i f ) #switchport access vlaii 3a、Switch(config)#interface + 端口b、Switch(config-if)#switchport access vlan + 木相应 vlan 的勺值、需要传递多个vlan信息就要打中继口,即trunk5 wit ch (c on fig) if int f 0./ Z5 wit ch ( c on f ig-i f
9、 if swit clip o rt mo de t ri.uika、switch(config)#interface + 交换机另一端口b、switch(config-if)#switchport mode trunk8、传统vlan的通信(1 )s router 的配置P.cut e r ( c on fig) # int f 0 / 0P.outer (conf ig-i f)口 shut% L INK- 5 - CHAI-J GED : Int er face Fast Ethe r net 0 / 0 . chaiige d st at% LINE P P.O T 0 - S-UPD
10、 OIiJIJ: L ine p rot oc o 1 on Int er face F ast-Ethe o upRouter (config-if J #ip add 19_ 168_ 1_ 1 255_ -5-5_ ESS_ 0P.cuter ( conf ig-i f) jfexitRoute r(c onfig)nint f 0/1Rout er 1J2 on f ig-i f) jfno shut% L TTIK-S -CHAJJGED : Int er face F ast Ethe rnet 0 /1. chaiiged st at e t o up% LINEPP.UTU-5
11、-UPDOTiHJ: Line protocn 1 on Inter f ace FastEthernet0/1, chaiiged state t o upRouter (conf ig-i f :i itip add 19Z- 16S- Z- 1 Z55- Z55- Z55- 0、为接口配置IP地址(该IP是相应vlan的PC网关)、激活端口: no shutdown(2)、switch 的配置Swit ch ( c on fig) fEvl ai ZEwir. ch i; r on f i g-vl ail 】Svl ail 3 Swit ch ( c on f i g-vl ail J
12、 # int f 0 /1 Swit ch ( c on f ig-i f)等三 wit clip o rt Ewir. ch i; r onf ig-i f) S int f 0./ 3 Swit ch ( c on f ig-i f) # 三 Swit ch ( c on fig) fEvl ai ZEwir. ch i; r on f i g-vl ail 】Svl ail 3 Swit ch ( c on f i g-vl ail J # int f 0 /1 Swit ch ( c on f ig-i f)等三 wit clip o rt Ewir. ch i; r onf ig-i
13、 f) S int f 0./ 3 Swit ch ( c on f ig-i f) # 三 wit clip o rt Switch(con f i g-i f)# int f0/Z Swit ch (c on f ig-i f) # 三 wit clip o rt Switch i; r onf ig-i f) #int f 0/4Swit ch ( c on f ig-i f) # 三 wit clip o rtac c: ej三三ac cessaccessac c: ej三三vlaivlaiivlaiivlaii、创建vlan,将PC端口划入相应vlan、将switch与router相
14、连的端口划入相应的vlan、PC的配置:就是给PC配置IP,注PC的默认网关与router的IP相同,网关P ConfigurationDHCPa StaticIP AddressSubnet MaskDefault GatewayDNS Server 2SS.2S5.2S5.0 192.16S.1.1相同9、单臂路由实现vlan的通信(1)router 配置P.outer ( c nf ig) nt f 0/0P.outer (conf ig-i f) jSno shut% L 工 NK- E - CHANGED : I nt er face F ast-Ethe r net 0 / 0 /
15、 chaj% LINE P P.O T 0-5 -UPD OW: L ine p r ot oc o 1 on Int er face o upP.outer (conf ig-i f) ttexitP.out e r ( c on f i g J # int f 0 / 0 - 1专LINK-S-CHANGED: Interface FastEthernetLi./O_ 1, cl% L INE P P.O T 0 - 5-UPD OTiJlJ z L ine p r ct oc o 1 on Int er face t o upP.out e r i; c on f i g-三uh i f
16、) ft enc a dot ZRouter ( ccnf ig-si_it.i f) flip add 19_ 16:3_ 1_ 1 S_ 25SP.out e r (c on f i g-muh i f) ft e x itP.out e r i; c on fig) # int f 0/0 - Z% L TNK-5 一 CHAN GED: Int er face F astEthe met 0/0 - Z r chaiige d st at e t o up% LINE P P.O TO- S-UPI:10W: L ine p r ot oc ol on Int er face F as
17、t Ethe met 0/0 - Z chaiige d st at e t o upRout er ( c on f i g-三 uh i f J it enc a dot 3Router (conf ig-sut-i f) flip add 192.168_1 255 _ 2S5 _ 55.0Rzuter (cijiif ig-三ubi f J fiexitP.out e r (c on fig)# int f 0/0 - 3% LI NIC-S -CHAI-J GED : Int er face F ast-Ethe met 0/0 - 3 才 chaiige d st at 已 t o
18、 up% L INE P P.O T 0 - S - UPI:1 LiTiJl-I: L ine p r ot oc o 1 on Int er face F ast Ethe r net 0/0 - 3 . chaiige d st at e t o upRzuter (cijiif ig-三ubi f J fienca dot 4P.cuter (cc.nfig-si_it.if J trip add 19Z. 16E:_ 3_ 1 ZS5_ ZSS_ ZS5.0、添加子接口: interface f0/0.1(此处有多少个vlan就添加多少个子接口)、将子接口封装到相应的vlan : e
19、ncapsulation dot +相应vlan的值、将子接口配置IP : ip add +ip地址+子网掩码、激活物理接口: no shutdown(2)、switch 的配置、创建vlan,交PC的端口划入到相应vlan、与router相连的端口打trunk(3)、配置PC的IPonfigurationL2JDHCPq StaticIP Address1IP Address192.16S.1.2Subnet Mask25S.25S.25S.0Subnet Mask25S.25S.25S.0Default Gateway192.16S.1.1Default Gateway192.16S.1.
20、1DNS ServerIPConfigurationDHCPq StaticIP Address192.16S.2.2Subnet Mask255.255.255.0Default Gateway192.16S.2.1DNS Server9、三层交换(1)、配置三层交换Swit ch i: c on fig) fivl aii ZSwit ch i: c on f i g-vl ail) #vl aii 3Swit ch i: c on f i g-vl aii)。int vl ai Swir.ch i:conf ig-i f :i #ip add 19E_ 16S_ 1_ 1 ESS_ EE
21、S_ 2SS_ 0Swit ch i: c on f i g- i f J # int vl ail 3Swit ch i: c on f i g- i f :i # ip add 192_ 168_ 2_ 1 ZSS. ZSS. ZSS. 0Swit ch i: c on f i g- i f) # e k itSwit ch i: c on fig) if ip r out ingSuit ch (c on fig) if e x it、启用三层交换:(config)#ip routing、创建vlan:(config)# vlan +要创建vlan的值、把相应的vlan配置IPa、指定一个 vlan:(config)#interface vlan + vlan相应的值c、配置 IP : (config-if)#ip add + ip + 子网掩码Swit ch i: c on fig) ifvl aii Swit ch i: c on f ig-vl an) fivl aii 3Swit ch i: c on f i g-vl ai) if int f 0 /1Switch i: conf ig-i f) #switchpcrt access vlaii Swit ch i: c on f ig-i f) it int f 0/ ZSwit ch i:
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026湖北襄阳市襄州区引进事业单位急需紧缺博士人才8人考试备考题库及答案解析
- 2026年洛阳市市直事业单位公开联考招聘208名笔试备考试题及答案解析
- 2026浙江温州市计量科学研究院招聘1人考试备考试题及答案解析
- 2026西藏昌都市康电清洁能源投资发展集团有限公司(第一批次)招聘11人笔试备考题库及答案解析
- 2026中国北京同仁堂(集团)有限责任公司招聘集团所属二级企业副总经理(主管营销工作)1人笔试备考题库及答案解析
- 2026上半年四川职业技术学院招聘事业编制人员30人考试参考题库及答案解析
- 2026春季中国石油玉门油田分公司高校毕业生招聘5人考试模拟试题及答案解析
- 护理急救护理技术
- 2025年齐齐哈尔市社区工作者招聘考试真题及答案
- 安徽师范大学招聘考试真题2025
- ISO9001:2015培训教材课件
- 2024年犬伤门诊预防接种知识考核试题及答案
- 新生儿早期基本保健指南课件
- 变频器工作原理与及应用
- 工程罚款通知单模版
- 毕业设计(论文)-zpw-2000a型区间移频自动闭塞系统工程毕业设计管理资料
- 污染土壤修复技术课件
- 珍爱生命,远离网瘾-网络安全教育主题班会
- GB/T 20080-2017液压滤芯技术条件
- 浙江英语中考作文范文10篇
- 安全评价机构信息公开表
评论
0/150
提交评论