华为三层交换机配置命令
三层交换机的配置命令

三层交换机的图,如图所示:一.交换机的配置:S2的配置命令:EnableConf terminalHostname S2Switch(config)#vlan 10Switch(config-vlan)#name stu10Switch(config-vlan)#vlan 20Switch(config-vlan)#name stu20Switch(config)#interface f0/1Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10Switch(config)#interface f0/2Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20Switch(config)#inte f0/24Switch(config-if)#switchport mode trunkS3的配置命令:EnableConf terminalHostname S3Switch(config)#vlan 10Switch(config-vlan)#name stu10Switch(config-vlan)#vlan 20Switch(config-vlan)#name stu20Switch(config)#interface f0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config)#interface f0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 20Switch(config)#inte f0/24Switch(config-if)#switchport mode trunk二.三层交换机的配置命令EnableConf terminalSwitch(config)#vlan 10Switch(config-vlan)#vlan 20Switch(config)#interface f0/1Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunkSwitch(config)#interface f0/2Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunkSwitch(config)#interface vlan 10Switch(config-if)#ip address 192.168.10.254 255.255.255.0 Switch(config-if)#no shutdownSwitch(config)#interface vlan 20Switch(config-if)#ip address 192.168.20.254 255.255.255.0 Switch(config-if)#no shutdownSwitch(config)#ip routing。
华为三层交换机配置教程

华为三层交换机配置教程按照网络OSI七层模型来划分,可以将交换机划分为二层交换机、三层交换机、多层交换机。
下面是店铺收集整理的华为三层交换机配置教程,希望对大家有帮助~~华为三层交换机配置教程工具/原料s3600三层交换机PC机交换机console线一根方法/步骤language-modechinese//切换到中文模式system-view//进入系统视图[H3C]displaycurrent-configuration//显示当前配置三层交换配置三层交换机第一步:划分VLAN,并描述vlan1description local-s3600//本交换机使用#vlan2description link-to-jilincentre//吉林省中心#vlan3description link-to-shangjiecentre//商界分中心内部使用#vlan4description link-to-chaoyangsuo//朝阳所#vlan5description link-to-nanguansuo//南关所配置三层交换机第二步:给VLAN划网关interfaceVlan-interface2description linktojilincentreipaddress 10.61.242.110 255.255.255.252//省中心指定广域网关、子网掩码#interfaceVlan-interface3description linktoshangjiecentreipaddress 10.161.134.65255.255.255.192//商界分中心局域网关、子网掩码#interfaceVlan-interface4description linktochaoyangsuoipaddress 10.61.242.113255.255.255.252//朝阳所广域网关、子网掩码#interfaceVlan-interface5description linktonanguansuoipaddress 10.61.242.117255.255.255.252//南关所广域网关、子网掩码配置三层交换机第三步:给VLAN指定端口#interfaceEthernet1/0/2//将交换机的端口2指定给省中心使用description linktojilincentreport access vlan2#interfaceEthernet1/0/15-24//将交换机的端口15-24指定给分中心内部使用description linktoshangjiecentreport access vlan3interfaceEthernet1/0/3//将交换机的端口3指定给朝阳所使用description linktochaoyangsuoport access vlan4#interfaceEthernet1/0/4//将交换机的端口4指定给南关所使用description linktonanguansuoportaccessvlan5配置三层交换机第四步:配置路由协议//配静态路由(只用对远端设备配一条路由即可,本地自通)iproute 0.0.0.0 0.0.0.0 10.61.242.109//指定所有网段到朝阳所的路由//配置三层交换机朝阳所的反向路由iproute 10.161.134.0 255.255.255.0 10.61.242.114iproute 10.161.135.0 255.255.255.0 10.61.242.114//配置三层交换机南关所的反向路由iproute 10.161.135.0 255.255.255.0 10.61.242.118iproute 10.161.136.0 255.255.255.0 10.61.242.118//省中心配置三层交换机:iproute 10.61.242.0 255.255.255.0 10.61.242.110//朝阳所242.114和南关所242.118共属的242.0指向分中心网关iproute 10.161.134.0 255.255.255.0 10.61.242.110//分中心内部网段指向分中心网关//iproute 10.161.134.0 255.255.255.0 10.61.242.110//iproute 10.161.135.0 255.255.255.0 10.61.242.110//iproute 10.161.136.0 255.255.255.0 10.61.242.110。
华为三层交换机配置命令

华为三层交换机配置命令华为三层交换机配置命令你的三层交换机是不是经常让你机器不好使,看看下面的三层交换机配置文章,一切问题都能解决。
yjbys详细介绍实例讲解:全面的三层交换机配置比较全面的三层交换机配置实例,带命令解释哟!快来get吧!三层交换机配置: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 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1Service dhcp //提供DHCP服务ip routing //启用三层交换机上的路由模块Exit三层交换机配置:Vtp 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 vlan9Exit三层交换机配置:interface Port-channel 1 //进入虚拟的`以太通道组1switchport trunk encapsulation dot1q //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1 switchport 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 mode trunkswitchport trunk allowed vlan allchannel-group 1 mode on三层交换机配置:port-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依*源和目的IP的方式)interface gigabitethernet 0/3 //进入模块0上的吉比特以太口3 switchport trunk encapsulation dotlq //给trunk封装为802.1Qswitchport mode trunk //定义这个接口的工作模式为trunkswitchport 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 gigbitethernet 0/6 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchprot trunk allowed vlan all三层交换机配置:interface gigbitethernet 0/7 //进入模块0上的吉比特以太口7 Switchport mode access //定义这个接口的工作模式为访问模式switchport access vlan 9 //定义这个接口可以访问哪个vlan(实际就是分配这个接口到vlan)no shutdownspanning-tree vlan 6-9 cost 1000 //在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 – 10 //进入模块0上的吉比特以太口8,9,10switchport mode access //定义这些接口的工作模式为访问模式switchport access vlan 8 //把这些接口都分配到vlan8中no shutdown三层交换机配置:spanning-tree portfast //在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11switchport trunk encapsulation dotlq //给这个接口封装为802.1Qswitchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //允许所有vlan信息通过interface gigabitethernet 0/12 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface vlan 1 //进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)ip address 172.16.1.7 255.255.255.0 //配置IP地址和子网掩码no shutdown三层交换机配置:standby 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.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in //在入方向上使用扩展的访问控制列表101interface vlan 3 //同上ip address 172.16.3.252 255.255.255.0no shutdown三层交换机配置:standby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 //同上ip address 172.16.4.252 255.255.255.0 no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip 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 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0 no shutdown三层交换机配置:standby 6 ip 172.16.6.254standby 6 priority 100 preempt interface vlan 7ip address 172.16.7.252 255.255.255.0 no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preempt interface vlan 8ip address 172.16.8.252 255.255.255.0 no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0no shutdown三层交换机配置:standby 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 的作用就是把广播转化为单播,然后发向172.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1interface vlan 4ip helper-address 172.16.8.1interface vlan 5ip helper-address 172.16.8.1interface vlan 6ip helper-address 172.16.8.1interface vlan 7ip helper-address 172.16.8.1interface vlan 9ip helper-address 172.16.8.1router rip //启用路由协议RIPversion 2 //使用的是RIPv2,如果没有这句,则是使用RIPv1network 172.16.0.0 //宣告直连的网段exit三层交换机配置:ip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line con 0line aux 0line vty 0 15 //telnet线路(路由器只有5个,是0-4)password 12345678 //login密码loginendcopy running-config startup-config 保存配置【华为三层交换机配置命令】。
华为三层交换机配置总结

一、基本命令: (1)保存当前配置:save [ configuration-file ] (1)清除当前配置:<core s9303-1>reset saved-configuration (1)重启当前设备:<core s9303-1>reboot (1)取消单条配置:undo +要取消的配置命令 (1)[SwitchA-Ethernet0/3]undo port link-type trunk (1)显示命令: (2)配置静态路由:ip route-static 目标网段子网掩码下一跳地址 (2)设置trunk: (2)telnet登陆设置: (2)二、配置实例 (3)1.实例说明 (3)2拓扑图如下: (4)交换机名为zuo的配置:(华为5328设置) (4)9300的配置: (8)交换机you的设置:(华为5328设置) (9)4.测试 (12)(1)vrrp正常状态下测试 (12)(2)只断a,查看俩个交换机vrrp状态并测试pc1如何到pc2 (13)(3)只断c,查看vrrp状态并测试pc1如何到pc2 (16)一、基本命令:保存当前配置:save [ configuration-file ]清除当前配置:<core s9303-1>reset saved-configuration重启当前设备:<core s9303-1>reboot取消单条配置:undo +要取消的配置命令例:[SwitchA-Ethernet0/3]port link-type trunk[SwitchA-Ethernet0/3]undo port link-type trunk显示命令:display interface brief ;查看端口状态display current-configuration ;显示当前设备的所有配置信息配置静态路由:ip route-static 目标网段子网掩码下一跳地址例:ip route-static 192.168.1.0 255.255.255.0 192.168.1.2例:ip route-static 0.0.0.0 0.0.0.0 172.16.1.2设置trunk:[core s9303-1]interface GigabitEthernet 1/0/5[core s9303-1-GigabitEthernet1/0/5]combo copper ;9300端口默认是光模式,改为电模式[core s9303-1-GigabitEthernet1/0/5]port link-type trunk---------------------------------------------------------------------------------------[huawei5328]interface GigabitEthernet 0/0/2[huawei5328-GigabitEthernet0/0/2]undo port default vlan[huawei5328-GigabitEthernet0/0/2]port link-type trunk[huawei5328-GigabitEthernet0/0/2]port trunk allow-pass vlan all; 允许所有的vlan 从g 0/0/2端口透传通过,也可以指定具体的vlan值telnet登陆设置:1.<S9300-A> system-view2.[S9300-A] vlan 603.[S9300-A-vlan2] quit4.[S9300-A] interface GigabitEthernet 1/0/15.[S9300-A-GigabitEthernet1/0/1] combo copper6.[S9300-A-GigabitEthernet1/0/1] port link-type access7.[S9303-A-GigabitEthernet1/0/1]port default vlan 608.[S9300-A-GigabitEthernet1/0/1] quit9.[S9300-A] interface vlanif 6010.[S9300-A-Vlanif60] ip address 10.10.10.8 255.255.255.011.[S9300-A-Vlanif60] quit12.[S9300-A]13. [S9300-A] user-interface vty 0 414.[S9300-A-ui-vty0-4] authentication-mode password15.[S9300-A-ui-vty0-4] set authentication password simple 12345616.[S9300-A-ui-vty0-4] quit17.[S9300-A]二、配置实例1.实例说明此实例测试华为三层交换机vrrp以及rip路由协议的启用,2拓扑图如下:Pc1Ip Ip 组组3.配置命令交换机名为zuo 的配置:(华为5328设置)<Quidway>system-view[Quidway]sysname zuo ;给设备命名[zuo]vlan 20 ;创建vlan[zuo-vlan20]port GigabitEthernet 0/0/20 ;进入端口模式[zuo-vlan20]quit[zuo]interface Vlanif 20 ;进入vlanif接口模式[zuo-Vlanif20]ip address 20.20.20.1 24 ;添加ip[zuo-Vlanif20]quit[zuo]display ip int brief ;显示接口i p配置[zuo]interface Vlanif 1[zuo-Vlanif1]ip address 10.10.10.1 24[zuo-Vlanif1]quit[zuo]vlan 60[zuo-vlan60]port GigabitEthernet 0/0/6 ;把端口加到vlan中[zuo-vlan60]quit[zuo]interface Vlanif 60[zuo-Vlanif60]ip address 60.60.60.1 24[zuo-Vlanif60]quit[zuo]interface Vlanif 1[zuo-Vlanif1]vrrp vrid 1 virtual-ip 10.10.10.111[zuo-Vlanif1]vrrp vrid 1 priority 120 ;设置vrrp组1的优先级[zuo-Vlanif1]vrrp vrid 1 preempt-mode timer delay 20 ;[zuo-Vlanif1]vrrp vrid 2 virtual-ip 10.10.10.112[zuo-Vlanif1]display vrrp ;显示vrrp配置状态[zuo]rip ;启用rip动态路由协议[zuo-rip-1] version 2[zuo-rip-1]network 10.0.0.0[zuo-rip-1]network 20.0.0.0[zuo-rip-1]network 60.0.0.0[zuo-rip-1]quit[zuo-Vlanif1]display ip routing-table ;查看路由表Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: PublicDestinations : 10 Routes : 12Destination/Mask Proto Pre Cost Flags NextHop Interface10.10.10.0/24 Direct 0 0 D 10.10.10.1 Vlanif110.10.10.1/32 Direct 0 0 D 127.0.0.1 InLoopBack020.20.20.0/24 Direct 0 0 D 20.20.20.1 Vlanif2020.20.20.1/32 Direct 0 0 D 127.0.0.1 InLoopBack050.50.50.0/24 RIP 100 1 D 20.20.20.2 Vlanif20RIP 100 1 D 10.10.10.2 Vlanif1RIP 100 1 D 60.60.60.2 Vlanif6060.60.60.0/24 Direct 0 0 D 60.60.60.1 Vlanif6060.60.60.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0100.100.100.0/24 RIP 100 1 D 60.60.60.2 Vlanif60 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0<zuo>display vrrp;显示vrrp状态Vlanif1 | Virtual Router 1state : MasterVirtual IP : 10.10.10.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120Preempt : YES Delay Time : 20 Accept_mode : NOV2v3interop : NOTimer : 1Master adver Timer : 1Auth Type : NONECheck TTL : YESVlanif1 | Virtual Router 2state : BackupVirtual IP : 10.10.10.112 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120Preempt : YES Delay Time : 0 Accept_mode : NOV2v3interop : NOTimer : 1Master adver Timer : 1Auth Type : NONECheck TTL : YES9300的配置:<core s9303-1>system-view[core s9303-1]vlan 60[core s9303-1-vlan60]quit[core s9303-1]vlan 50[core s9303-1-vlan50]quit[core s9303-1]interface GigabitEthernet 1/0/6[core s9303-1-GigabitEthernet1/0/6]combo copper ;9300端口默认是光模式,改成电模式[core s9303-1-GigabitEthernet1/0/6]port link-type access ;设接口类型为接入模式[core s9303-1-GigabitEthernet1/0/6]port default vlan 60 ;把端口添加到vlan60中[core s9303-1-GigabitEthernet1/0/6]quit[core s9303-1]display vlan 60 ;查看vlan60的配置[core s9303-1]interface GigabitEthernet 1/0/5[core s9303-1-GigabitEthernet1/0/5]combo copper[core s9303-1-GigabitEthernet1/0/5]port default vlan 50[core s9303-1-GigabitEthernet1/0/5]quit[core s9303-1]interface Vlanif 50[core s9303-1-Vlanif50]ip address 50.50.50.2 24[core s9303-1-Vlanif50]quit[core s9303-1]interface Vlanif 60[core s9303-1-Vlanif60]ip address 60.60.60.2 24[core s9303-1-Vlanif60]quit[core s9303-1]display vlan 50VLAN ID Type Status MAC Learning Broadcast/Multicast/Unicast Property--------------------------------------------------------------------------------50 common enable enable forward forward forwarddefault----------------Untagged Port: GigabitEthernet1/0/5----------------Tagged Port: GigabitEthernet1/0/1----------------Interface PhysicalGigabitEthernet1/0/1 DOWNGigabitEthernet1/0/5 UP[core s9303-1]interface GigabitEthernet 1/0/0[core s9303-1-GigabitEthernet1/0/0]port default vlan 100[core s9303-1-GigabitEthernet1/0/0]quit[core s9303-1]rip[core s9303-1-rip-1]network 50.0.0.0[core s9303-1-rip-1]network 60.0.0.0[core s9303-1-rip-1]network 100.0.0.0------------------------------------------------------------------------------------------------------- 交换机you的设置:(华为5328设置)<you>system-view[you]vlan 20[you-vlan20]port GigabitEthernet 0/0/20 ;把端口加到vlan中[you-vlan20]quit[you]interface Vlanif 20[you-Vlanif20]ip address 20.20.20.2 24[you-Vlanif20]quit[you]vlan 50[you-vlan50]port GigabitEthernet 0/0/5[you-vlan50]quit[you]interface Vlanif 50[you-Vlanif50]ip address 50.50.50.1 24[you-Vlanif50]quit[you]interface Vlanif 1[you-Vlanif1]ip address 10.10.10.2 24[you-Vlanif1]vrrp vrid 1 virtual-ip 10.10.10.111 [you-Vlanif1]vrrp vrid 2 virtual-ip 10.10.10.112 [you-Vlanif1]vrrp vrid 2 priority 120[you-Vlanif1]vrrp vrid 2 preempt-mode timer delay 20 [you-Vlanif1]quit[you]rip ;启用rip[you-rip-1] version 2 ;用rip版本2[you-rip-1] network 10.0.0.0 ;公布网段[you-rip-1]network 20.0.0.0[you-rip-1]network 50.0.0.0[you-rip-1]quit<you>display vrrp ;查看vrrpVlanif1 | Virtual Router 1state : BackupVirtual IP : 10.10.10.111PriorityRun : 100PriorityConfig : 100MasterPriority : 120Preempt : YES Delay Time : 0Accept_mode : NOV2v3interop : NOTimer : 1Master adver Timer : 1Auth Type : NONECheck TTL : YESVlanif1 | Virtual Router 2state : MasterVirtual IP : 10.10.10.112PriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YES Delay Time : 20Accept_mode : NOV2v3interop : NOTimer : 1Master adver Timer : 1Auth Type : NONECheck TTL : YES<you>you>display ip routing-table ;查看路由表Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: PublicDestinations : 10 Routes : 12Destination/Mask Proto Pre Cost Flags NextHop Interface10.10.10.0/24 Direct 0 0 D 10.10.10.2 Vlanif110.10.10.2/32 Direct 0 0 D 127.0.0.1 InLoopBack020.20.20.0/24 Direct 0 0 D 20.20.20.2 Vlanif2020.20.20.2/32 Direct 0 0 D 127.0.0.1 InLoopBack050.50.50.0/24 Direct 0 0 D 50.50.50.1 Vlanif5050.50.50.1/32 Direct 0 0 D 127.0.0.1 InLoopBack060.60.60.0/24 RIP 100 1 D 20.20.20.1 Vlanif20RIP 100 1 D 10.10.10.1 Vlanif1RIP 100 1 D 50.50.50.2 Vlanif50 100.100.100.0/24 RIP 100 1 D 50.50.50.2 Vlanif50 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0<you>4.测试+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ (1)vrrp正常状态下测试pc1网关设置:10.10.10.10.111C:\Users\0173>tracert 100.100.100.2通过最多30 个跃点跟踪到LJ-2400 [100.100.100.2] 的路由:1 3 ms 1 ms 7 ms 10.10.10.12 2 ms 2 ms 2 ms 60.60.60.23 <1 毫秒<1 毫秒 1 ms LJ-2400 [100.100.100.2]跟踪完成。
华为3层交换基本命令

华为3层交换基本命令system-view 进入配置模式quit 退出至上一级模式sysname LanShanJiaoYu 更改交换机名称(配置模式下)display clock 显示交换机时间dis current-configuration 查看当前交换机配置display interface Vlanif 查看三层vlan接口配置信息display interface Ethernet0/0/0 查看Ethernet0/0/0端口状态display interface GigabitEthernet 1/0/1 查看GE 1/0/1端口状态display logbuffer 查看log日志display trapbuffer 查看告警日志display vlan 查看vlandisplay ip routing-table 查看路由vlan 10 创建vlan(或者进入vlan)(配置模式下)vlan batch 10 to 100 批量创建vlan 10-100 (配置模式下)interface Ethernet0/0/0 进入Ethernet0/0/0 (配置模式下)interface GigabitEthernet 1/0/1 进入GigabitEthernet 1/0/1 (配置模式下)interface Vlanif 100 进入三层vlan接口(配置模式下)user-interface vty 0 14 进入虚拟终端接口(配置模式下)description 4lou 描述(注释)(接口配置模式下)ip address 10.18.14.1 255.255.255.128 配置ip地址(vlan接口配置模式下)undo ip address 10.18.14.1 255.255.255.128 删除ip地址(vlan接口配置模式下)ip route-static 0.0.0.0 0.0.0.0 10.17.254.141 配置缺省路由(配置模式下)undo ip route-static 0.0.0.0 0.0.0.0 10.17.254.141 删除缺省路由(配置模式下)undo port hybrid tagged vlan 1023 删除hybrid tagged vlan 1023(接口配置模式下)port link-type trunk 设置端口类型为trunk(接口配置模式下)port link-type access 设置端口类型为access(接口配置模式下)port trunk allow-pass vlan 12 236 允许vlan 12 236两个vlan 通过(接口配置模式下)undo port trunk allow-pass vlan 12 236 删除(禁止)vlan 12 236通过(接口配置模式下)port default vlan 1000 将端口设置到vlan 1000内(接口配置模式下)undo port default vlan 删除端口vlan(接口配置模式下)aaa 进入AAA模式(配置模式下)local-user lsjy password cipher lsjy 创建本地用户lsjy,密码为密文local-user lsjy privilege level 3 设置用户操作权限local-user lsjy service-type telnet 设置用户登录类型为telnet端口和mac地址的绑定配置命令:mac-address static 00e0-fc22-f8d3 GigabitEthernet1/0/1 vlan 211终端mac地址的查看:通过cmd窗口输入ipconfig /all通过交换机的端口查看学习上来的mac:display mac-address dynamic GigabitEthernet1/0/1IP地址和mac地址的绑定配置命令:在配置模式下,输入arp static 10.1.1.2 00e0-fc22-f8d3完成对PC机的IP地址和MAC地址的全局绑定。
华为三层交换机S5700-28C-EI配置文档

华为三层交换机S5700-28C-EI配置文档华为三层交换机S5700-28C-SI配置文档温馨提示:新买的设备默认情况设备是没有任何地址。
连接方式:用超级终端连接相关属性将线和ETH口连接好之后关掉电源重新上电,等进入到to continue press ENTER,按ENTER键回车。
输入原始密码admin进入正式配置界面第一步:设置METH口管理地址system-view 进入系统调试模式[quidway]interface METH 0/0/1 进入到管理接口[quidway-METH 0/0/1]ip address 192.168.1.1 255.255.255.0 配置IP地址[quidway]quit第二步:由于设备本身支持web但是没有加载文件,需加载web 文件dir 显示当前路径和相及web等相关文件在dir下面信息找到xxxxxx.web.zipsystem-view[quidway]http server load xxxxxx.web.zip 加载系统本身自带的web文件加载成功后开启web服务[quidway]http server enable 开启http服务第三步:新建web用户登录用户名和密码及赋予权限system-view[quidway]aaa[quidway-aaa]local-user xxx password cipher|simper xxx 设置用户名和密码[quidway-aaa]local-user xxx server-type http 给xxx用户设置http登录模式[quidway-aaa]local-user xxx priviledge level 3-15 给xxx用户设置http登录等级否则只有ping和Tracert功能[quidway-aaa]quit即可第四步:保存命令以保证断电后配置不会丢失进入到模式输入save然后按Y等待一会即可设置完成之后既可以登陆电脑指定IP地址如192.168.1.100/255.255.255.0Ping 192.168.1.1是否通如果通打开浏览器输入192.168.1.1输入第三步创建或者修改的用户名和密码登陆即可附:查看相关版本命令:display cur-configuation查看接口对于的IP地址display arp将设备恢复出厂设置reset saved-configuation查看端口位置:display interface brief查看光模块display transc eiver interace 端口verbose //查看光模块光信息。
华为三层交换机配置教程

华为三层交换机配置教程华为三层交换机是一种高性能的网络设备,用于构建大型企业网络。
配置这种交换机需要一定的技术知识和经验。
下面是一个简单的华为三层交换机配置教程,帮助您快速入门。
第一步:连接交换机首先,将交换机与电源连接,并使用网线将交换机与计算机连接。
确保连接正常后,打开计算机的网卡设置界面,将IP地址设置为和交换机同一网段的地址。
第二步:登录交换机打开计算机上的终端软件,比如SecureCRT等,通过网线连接的方式登录交换机。
在终端软件中输入交换机的IP地址,选择正确的端口,并设置登录协议为SSH。
第三步:配置基本信息成功登录交换机后,需要进行一些基本配置。
首先,设置交换机的主机名,可以使用命令“sysname [主机名]”来进行设置。
然后,设置管理接口的IP地址和子网掩码,可以使用命令“interface Vlanif1”和“ip address [IP地址] [子网掩码]”来进行配置。
第四步:配置VLAN配置VLAN是三层交换机的重要功能。
通过VLAN,可以将网络划分为几个独立的虚拟局域网。
首先,创建VLAN,使用命令“vlan [VLAN编号]”创建一个新的VLAN。
然后,将端口加入到VLAN中,使用命令“port-group [端口组号]”将端口加入到指定的VLAN中。
第五步:配置路由三层交换机可以进行路由功能的配置,实现不同子网之间的通信。
首先,创建一个静态路由表,使用命令“ip route-static [目的网络] [子网掩码] [下一跳地址]”将目的网络、子网掩码和下一跳地址添加到路由表中。
然后,启用路由功能,使用命令“ip routing”来开启路由功能。
第六步:配置接口配置接口是三层交换机的另一个重要功能。
通过配置接口,可以对接口进行管理和控制。
使用命令“interface [接口名称]”进入指定接口的配置模式。
然后,可以配置接口的IP地址、子网掩码、MTU等属性,使用命令“ip address [IP地址] [子网掩码]”、“mtu [MTU值]”来进行配置。
华三交换机-路由器配置命令

H3C交换机配置命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华为三层交换机配置命令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 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.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 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上的吉比特以太口3在线代理|网页代理|代理网页|interface 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 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.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in //在入方向上使用扩展的访问控制列表101interface vlan 3 //同上ip address 172.16.3.252 255.255.255.0no shutdownstandby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 //同上ip address 172.16.4.252 255.255.255.0在线代理|网页代理|代理网页|no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0no shutdownstandby 6 ip 172.16.6.254standby 6 priority 100 preemptinterface vlan 7ip address 172.16.7.252 255.255.255.0no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0no shutdownstandby 9 ip 172.16.9.254standby 9 priority 100 preemptaccess-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101 在线代理|网页代理|代理网页|access-list 101 permit ip any anyInterface vlan 1 //进入vlan1这个逻辑接口Ip helper-address 172.16.8.1 //可以转发广播(helper-address的作用就是把广播转化为单播,然后发向172.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1interface vlan 4ip helper-address 172.16.8.1interface vlan 5ip helper-address 172.16.8.1interface vlan 6ip helper-address 172.16.8.1interface vlan 7ip helper-address 172.16.8.1interface vlan 9ip helper-address 172.16.8.1router rip //启用路由协议RIPversion 2 //使用的是RIPv2,如果没有这句,则是使用RIPv1network 172.16.0.0 //宣告直连的网段exitip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line con 0line aux 0line vty 0 15 //telnet线路(路由器只有5个,是0-4)password 12345678 //login密码loginendcopy running-config startup-config 保存配置cisco 3550在线代理|网页代理|代理网页|Switch# configure terminalSwitch(config)#vtp mode transparentSwitch(config)#vlan 10Switch(config-vlan)# name vlan10Switch(config)#exitSwitch(config)#vlan 11Switch(config-vlan)name vlan11Switch(config-vlan)endSwitch#configure terminalSwitch(config)#interface fastethernet0/9Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/10Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/11Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface fastethernet0/12Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface vlan10Switch(config-if)#ip address 192.168.0.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#interface vlan11Switch(config-if)#ip address 192.168.1.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config)#ip forward-protocol udpSwitch(config)#inter vlan 10ip helper 172.16.11.255 //这个命令又是什么意思?是不是转发整个网段的UDP协议?为什么用到了172.16.11.255这个地址?Switch(config)#exitSwitch(config)#inter vlan 11在线代理|网页代理|代理网页|Switch(config-if)#ip helper 172.16.10.255 //同上?Switch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 Vlan10Switch(config)#ip route 0.0.0.0 0.0.0.0 Vlan11Switch(config)#conf tSwitch(config)#access-list 103 permit ip 172.16.11.0 0.0.0.255 172.16.10.0 0.0.0.255 Switch(config)#access-list 103 permit udp any any eq bootpcSwitch(config)#access-list 103 permit udp any any eq tftpSwitch(config)#access-list 103 permit udp any eq bootpc anySwitch(config)#access-list 103 permit udp any eq tftp anySwitch(config)#inter vlan 10Switch(config-if)#ip directed-broadcast 103 //请解释一下这个的具体含义,本人不是太明白,懂一点意思(直接广播这个列表?是不是)Switch(config-if)#exitSwitch(config)#access-list 104 permit ip 172.16.10.0 0.0.0.255 172.16.11.0 0.0.0.255 Switch(config)#access-list 104 permit udp any any eq bootpcSwitch(config)#access-list 104 permit udp any any eq tftpSwitch(config)#access-list 104 permit udp any eq bootpc anySwitch(config)#access-list 104 permit udp any eq tftp anySwitch(config)#inter vlan 11Switch(config-if)#ip directed-broadcast 104 //同上Switch(config)#endSwitch#copy run star在线代理|网页代理|代理网页|。