下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、service password-encryption / hostname Catalyst 3550-12T1 enable password 123456. /enable Enable secret 654321 /enable比较全面的三层交换机配置实例(带命令解释哟!)Enable / 进入私有模式Configure terminal / 进入全局模式对密码进行加密给三层交换机定义名称密码的加密密码(应该是乱码而不是654321 这样)Ip subnet-zero / 允许使用全0子网(默认都是打开的)对应的IP地址是Ip name-server 172.16.8.1 172.16
2、.8.2 /三层交换机名字 Catalyst 3550-12T1172.16.8.1Service dhcp / 提供 DHCP 服务ip routing / 启用三层交换机上的路由模块ExitVtp mode server /定义 VTP工作模式为 sever模式Vtp domain centervtp /定义 VTP 域的名称为 centervtpVlan 2 name vlan2 / 定义vlan并给vlan取名(如果不取名的话, vlan2 的名字应该是 vlan002 )Vlan 3 name vlan3Vlan 4 name vlan4Vlan 5 name vlan5Vlan 6
3、 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 /进入虚拟的以太通道组1switchport trunk encapsulation dot1q /给这个接口的 trunk 封装为 802.1Q 的帧格式switchport mode trunk /定义这个接口的工作模式为trunkswitchport trunk allowed vlan all /在这个 trunk 上允许所有的 vlan 通过Interface gigabitethernet 0/1 /进
4、入模块 0上的吉比特以太口1switchport trunk encapsulation dotlq /给这个接 口的 trunk 封装为 802.1Q 的帧格式switchport mode trunk /定义这个接口的工作模式为trunkswitchport trunk allowed vlan all /在这个 trunk 上允许所有的 vlan 通过channel-group 1 mode on /把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 /同上switchport trunk encapsulation dotlqswitchport
5、 mode trunkswitchport trunk allowed vlan allchannel-group 1 mode onport-channel load-balance src-dst-ip /定义快速以太通道组的负载均衡方式(依*源和目的IP的方interface gigabitethernet 0/3 /进入模块 0上的吉比特以太口 3switchport trunk encapsulation dotlq /给 trunk 封装为 802.1Qswitchport mode trunk /定义这个接口的工作模式为 trunk switchport mode trunksw
6、itchport trunk allowed vlan all /允许所有vlan信息通过interface gigabitethernet 0/4 /同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/5 /同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface
7、gigbitethernet 0/6 /同上switchport trunk encapsulation dotlqswitchport mode trunkswitchprot trunk allowed vlan allinterface gigbitethernet 0/7 /Switchport mode access / switchport access vlan 9 /进入模块0上的吉比特以太口7定义这个接口的工作模式为访问模式定义这个接口可以访问哪个vlan (实际就是分配这个接口到vlan )no shutdownspanning-tree vlan 6-9 cost 100
8、0 /在生成中,vlan6-9的开销定义为10000interface range gigabitethernet 0/810 /进入模块0上的吉比特以太口8,9,10switchport mode access / switchport access vlan 8 / no shutdown spanning-tree portfast / 算,直接成为转发状态)定义这些接口的工作模式为访问模式把这些接口都分配到vlan8中在这些接口上使用portfast (使用portfast以后,在生成树的时候不参加运interface gigabitethernet 0/11 /进入模块 0 上的吉比
9、特以太口11switchport trunk encapsulation dotlq /给这个接口 封装为 802.1Qswitchport mode trunk /定义这个接口的工作模式为trunkswitchport trunk allowed vlan all /允许所有 vlan 信息通过interface gigabitethernet 0/12 /同上switchport trunk encapsulation dotlqswitchport trunk allowed vlan allinterface vlan 1 /进入vlanl的逻辑接口(不是物理接口,用来给 vlan做路
10、由用)ip address 172.16.1.7 255.255.255.0 /配置 IP 地址和子网掩码no shutdownstandby 1 ip 172.16.1.9 /开启了冗余热备份(HSRP ),冗余热备份组1 ,虚拟路由器的IP地址为172.16.1.9standby 1 priority 110 preempt /定义这个三层交换机在冗余热备份组1中的优先级为110 ,preempt 是用来开启抢占模式interface vlan 2 / 同上ip address 172.16.2.252 255.255.255.0 no shutdownstandby 2 ip 172.1
11、6.2.254standby 2 priority 110 preemptip access-group 101 in /在入方向上使用扩展的访问控制列表101interface vlan 3 / 同上ip address 172.16.3.252 255.255.255.0 no shutdownstandby 3 ip 172.16.3.254standby 3 priority 110 preempt ip access-group 101 ininterface vlan 4 / 同上ip address 172.16.4.252 255.255.255.0 no shutdownst
12、andby 4 ip 172.16.4.254standby 4 priority 110 preempt ip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0 no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preempt ip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0 no shutdownstandby 6 ip 172
13、.16.6.254standby 6 priority 100 preemptinterface vlan 7ip address 172.16.7.252 255.255.255.0 no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0 no shutdownstandby 8 ip 172.16.8.254 standby 8 priority 100 preemptinterface vlan 9ip a
14、ddress 172.16.9.252 255.255.255.0 no shutdownstandby 9 ip 172.16.9.254standby 9 priority 100 preemptaccess-list 101 deny ip any 172.16.7.0 0.0.0.255 /扩展的访问控制列表101access-list 101 permit ip any anyInterface vlan 1 /进入 vlan1 这个逻辑接口Ip helper-address 172.16.8.1 /可以转发广播(helper address 的作用就是把广播转化为单播,然后发向 1
15、72.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3 ip helper-address 172.16.8.1 interface vlan 4ip helper-address 172.16.8.1interface vlan 5 ip helper-address 172.16.8.1interface vlan 6 ip helper-address 172.16.8.1interface vlan 7 ip helper-address 172.16.8.1interface vlan 9 ip helper-address 172.16.8.1router rip / 启用路由协议 RIPRIPv1version 2 /使用的是RIPv2 ,如果没有这句,则是使用network 172.1
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 吉首市2024湖南湘西吉首市事业单位引进急需紧缺人才35人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 零售业财务管理岗位面试题及答案
- 病理科医生职业资格考试复习资料含答案
- 采矿工程师资格认证考试重点突破含答案
- 盐业集团研发中心主任的面试题集
- 工程造价师考试重点难点解析
- 2025年城市绿地系统规划提升可行性研究报告
- 2025年多功能能源站研发项目可行性研究报告
- 2025年自驾游营地建设项目可行性研究报告
- 2025年环保家居产品设计项目可行性研究报告
- 2025贵州锦麟化工有限责任公司第三次招聘7人考试笔试模拟试题及答案解析
- 2025水发集团有限公司社会招聘269人考试笔试参考题库附答案解析
- 2025公需课《人工智能赋能制造业高质量发展》试题及答案
- JCT890-2017 蒸压加气混凝土墙体专用砂浆
- 深圳亚马逊超级大卖副总制定的亚马逊运营SOP计划表
- 海洋与海洋测绘课件
- 钢筋工程的验收要点
- 康复治疗学Bobath技术
- 上海市九年义务教育阶段写字等级考试(一级)硬笔方格收写纸
- 语料库和知识库的研究现状
- 南部三期污水处理厂扩建工程项目环评报告
评论
0/150
提交评论