CISCO三层交换机配置实例_第1页
CISCO三层交换机配置实例_第2页
CISCO三层交换机配置实例_第3页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、比拟全面的三层交换机配置实例 带命令解释哟 !En able / 进入私有模式Con figure termi nal / 进入全局模式service password-e ncrypti on 对密码进行加密host name Catalyst 3550-12T1 给三层交换机定义名称en able password 123456. en abl 密码En able secret 654321 en abl 的加密密码应该是乱码而不是 654321 这样Ip sub net-zero / 允许使用全 0 子网默认都是翻开的Ip name-server 172.16.8.1 172.16.8.

2、2 三层交换机名字 Catalyst 3550-12! 对应的 IP 地址是 Service dhcp / 提供 DHCP 艮务ip routing / 启用三层交换机上的路由模块ExitVtp mode server / 定义 VTPX 作模式为 sever 模式Vtp domain centervtp / 定义 VTF 域的名称为 centervtpVlan 2 name vlan2 定义 vlan 并给 vlan 取名如果不取名的话, vian2 的名字应该是 vlan002 Vla n 3 n ame vla n3Vla n 4 n ame vla n4Via n 5 n ame vi

3、a n5Via n 6 n ame via n6Via n 7 n ame via n7Via n 8 n ame via n8Via n 9 n ame via n9Exitin terface Port-cha nnel 1 / 进入虚拟的以太通道组 1switchport trunk encapsulation dot1q 给这个接口的 trunk 圭寸装为 802.1Q 的帧格式switchport mode trunk / 定义这个接口的工作模式为 trunkswitchport trunk allowed vlan all / 在这个 trunk 上允许所有的 vlan 通过In

4、terface gigabitethernet 0/1 / 进入模块 0 上的吉比特以太口 1switchport trunk encapsulation dotlq / 给这个接口的 trunk 圭寸装为 802.1C 的帧格式switchport mode trunk / 定义这个接口的工作模式为 trunkswitchport trunk allowed vlan all / 在这个 trunk 上允许所有的 vlan 通过cha nn el-group 1 mode on / 把这个接口放到快速以太通道组 1 中In terface gigabitether net 0/2 / 同上s

5、witchport mode trunk switchport trunk allowed vian all cha nn el-group 1 mode onport-channel load-balanee sre-dst-ip 定义快速以太通道组的负载均衡方式依*源和目的 IP 的方式in terface gigabitethernet 0/3 / 进入模块 0 上的吉比特以太口 3switchport trunk encapsulation dotlq / 给 trunk 圭寸装为 802.1Qswitchport mode trunk / 定义这个接口的工作模式为 trunk swi

6、tchport trunk allowed vlan all / 允许所有 vlan 信 息通过in terface gigabitether net 0/4 / 同上 switchport trunk en capsulati on dotlq switchport mode trunk switchportswitchport mode trunk switchport trunk allowed vian all in terface gigbitether net 0/6 / 同上 switchport trunk encapsulation dotlq switchport mode

7、 trunk switchprot trunk allowed vla n all in terface gigbitethernet 0/7 / 进入模块 0 上的吉比特以太口 7Switchport mode access定义这个接口的工作模式为访问模式switchport access vlan 9定义这个接口可以访问哪个 vlan 实际就是分配这个接口到 novla nshutdow nspa nnin g-tree vlan 6-9 cost 1000 在 生成树中, via n6-9 的开销定义为 10000 in terface rangegigabitethernet 0/8-

8、10 /进入模块 0 上的吉比特以太口 8,9,10 switchport access vlan 8 把 这些接口都分配到vian8 中no shutdow n spanning-tree portfast 在这些接口上使用 portfast 使用 portfast 以后,在生成树的时候不参加运算,直 接成为转发状态in terface gigabitethernet 0/11 / 进入模块 0 上的吉比特以太口 11 switchport trunk encapsulation dotlq / 给这个接口圭寸装为 802.1Q switchport mode trunk / 定义这个接口的

9、工作模式为 trunk switchport trunk allowed vlan all / 允许所有 vlan 信息通过in terface gigabitethernet 0/12 / 同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allin terface vlan 1 进入 vla n1 的逻辑接口不是物理接口,用来给 vlan 做路由用ip address 172.16.1.7 255.255.255.0 配置 IP 地址和子网掩码standby 1

10、ip 172.16.1.9 开启了冗余热备份 HSRP , 冗余热备份组 1,虚拟路由器的 IP 地址为 172.16.1.9 standby 1 priority 110 preempt 定义这个三层交换机在冗余热备份组 1 中的优先级为 110 preempt 是用来 开启抢占模式in terface via n 2 / 同上ip address no shutdow nstan dby 2 ip sta ndby 2 priority 110 preempt101ip access-group 101 in 在入方向上使用扩展的访问控制列表in terface via n 3 / 同上i

11、p address no shutdow nstan dby 3 ip sta ndby 3 priority 110 preempt ip access-group 101 inin terface via n 4 / 同上ip address 172.164252 255.255.255.0 no shutdow n stan dby 4 ip sta ndby 4 priority 110 preemptip access-group 101 inin terface vla n 5ip address 172.16.5.252 255.255.255.0 no shutdow nsta

12、n dby 5 ip sta ndby 5 priority 110 preemptip access-group 101 inin terface vla n 6ip address sta ndby 6 priority 100 preemptin terface via n 7ip address no shutdow nstan dby 7 ip sta ndby 7 priority 100 preemptin terface via n 8ip address no shutdow nstan dby 8 ip sta ndby 8 priority 100 preemptin t

13、erface via n 9ip address sta ndby 9 priority 100 preempt101access-list 101 deny ip any 172.16.7.0 0.0.0.25 扩展的访问控制列表access-list 101 permit ip any anyIn terface vlan 1 进入 via n1 这个逻辑接口Ip helper-address 172.16.8.1 可以转发播送 helper address 的作用就是把播送转化为单播,然后发向In terface vla n 2Ip helper-address In terface vla n 3ip helper-address in terface vla n 4ip helper-address in terface vla n 5ip helper-address in terface vla n 6in terface via n 7ip helper-address in terface vla n 9ip helper-address router rip / 启用路由协议 RI

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论