华为三层交换机配置命令.doc_第1页
华为三层交换机配置命令.doc_第2页
华为三层交换机配置命令.doc_第3页
华为三层交换机配置命令.doc_第4页
华为三层交换机配置命令.doc_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

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

文档简介

华为三层交换机配置命令分类:默认栏目2007.6.2 07:28 作者:weiwei2501 | 评论:1 | 阅读:0 Enable /进入私有模式Configure terminal /进入全局模式service password-encryption /对密码进行加密hostname Catalyst 3550-12T1 /给三层交换机定义名称enable password 123456. /enable密码Enable secret 654321 /enable的加密密码(应该是乱码而不是654321这样)Ip subnet-zero /允许使用全0子网(默认都是打开的)Ip name-server /三层交换机名字Catalyst 3550-12T1对应的IP地址是Service 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 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 /进入虚拟的以太通道组1Interface gigabitethernet 0/1 /进入模块0上的吉比特以太口1channel-group 1 mode on /把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 /同上channel-group 1 mode onport-channel load-balance src-dst-ip /定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)interface gigabitethernet 0/3 /进入模块0上的吉比特以太口3interface gigabitethernet 0/4 /同上interface gigbitethernet 0/5 /同上interface gigbitethernet 0/6 /同上interface gigbitethernet 0/7 /进入模块0上的吉比特以太口7no shutdownspanning-tree vlan 6-9 cost 1000 /在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 10 /进入模块0上的吉比特以太口8,9,10no shutdownspanning-tree portfast /在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet 0/11 /进入模块0上的吉比特以太口11interface gigabitethernet 0/12 /同上interface vlan 1 /进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)ip address /配置IP地址和子网掩码no shutdownstandby 1 ip /开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为standby 1 priority 110 preempt /定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interface vlan 2 /同上ip address 52 no shutdownstandby 2 ip 54standby 2 priority 110 preemptip access-group 101 in /在入方向上使用扩展的访问控制列表101interface vlan 3 /同上ip address 52 no shutdownstandby 3 ip 54standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 /同上ip address 52 no shutdownstandby 4 ip 54standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 52 no shutdownstandby 5 ip 54standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 52 no shutdownstandby 6 ip 54standby 6 priority 100 preemptinterface vlan 7ip address 52 no shutdownstandby 7 ip 54standby 7 priority 100 preemptinterface vlan 8ip address 52 no shutdownstandby 8 ip 54standby 8 priority 100 preemptinterface vlan 9ip address 52 no shutdownstandby 9 ip 54standby 9 priority 100 preemptaccess-list 101 deny ip any 55 /扩展的访问控制列表101access-list 101 permit ip any anyInterface vlan 1 /进入vlan1这个逻辑接口Ip helper-address /可以转发广播(helperaddress的作用就是把广播转化为单播,然后发向)Interface vlan 2Ip helper-address Interface vlan 3ip helper-address interface vlan 4ip helper-address interface vlan 5ip helper-address interface vlan 6ip helper-address interface vlan 7ip helper-address interface vlan 9ip helper-address router rip /启用路由协议RIPversion 2 /使用的是RIPv2,如果没有这句,则是使用RIPv1network /宣告直连的网段exitip route 50 /缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为50这个路由器line con 0line aux 0line vty 0 15 /telnet线路(路由器只有5个,是0-4)password 12345678 /login密码loginendcopy running-config startup-config 保存配置cisco 3550Switch# configure terminal Switch(config)#vtp mode transparent Switch(config)#vlan 10 Switch(config-vlan)# name vlan10 Switch(config)#exit Switch(config)#vlan 11 Switch(config-vlan)name vlan11 Switch(config-vlan)end Switch#configure terminal Switch(config)#interface fastethernet0/9 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#interface fastethernet0/10 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#interface fastethernet0/11 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 11 Switch(config-if)#exit Switch(config)#interface fastethernet0/12 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 11 Switch(config-if)#exit Switch(config)#interface vlan10 Switch(config-if)#ip address Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#interface vlan11 Switch(config-if)#ip address Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#ip routing Switch(config)#ip forward-protocol udp Switch(config)#inter vlan 10 ip helper 55 /这个命令又是什么意思?是不是转发整个网段的UDP协议?为什么用到了55这个地址? Switch(config)#exit Switch(config)#inter vlan 11 Switch(config-if)#ip helper 55 /同上? Switch(config-if)#exit Switch(config)#ip route Vlan10 Switch(config)#ip route Vlan11 Switch(config)#conf t Switch(config)#access-list 103 permit ip 55 55 Switch(config)#access-list 103 permit udp any any eq bootpc Switch(config)#access-list 103 permit udp any any eq tftp Switch(config)#access-list 103 permit udp any eq bootpc any Switch(config)#access-list 103 permit udp any eq tftp any Switch(config)#inter vlan 10 Switch(config-if)#ip directed-broadcast 103 /请解释一下这个的具体含义,本人不是太明白,懂一点意思(直接广播这个列表?是不是) Switch(config-if)#exit Switch(config)#access-list 104 permit ip 55 55 Switch(config)#access-list 104 permit udp any any eq

温馨提示

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

评论

0/150

提交评论