华为三层交换机配置方法、命令及实例
华为三层交换机配置GVRP示例手册

配置GVRP示例组网需求如图1所示,公司A的分公司与总部通过SwitchA和SwitchB互通,公司A的所有交换机配置GVRP功能并配置接口注册模式为Normal,以简化配置。
公司B通过SwitchB和SwitchC与公司A互通,公司B的所有交换机配置GVRP功能并将与公司A相连的接口的注册模式配置为Fixed,以控制只允许公司B配置的VLAN通过。
图1 配置GVRP的组网图配置思路采用如下的思路配置GVRP:1.全局使能GVRP功能。
2.配置接口类型为Trunk类型。
3.使能接口的GVRP功能。
4.配置接口注册模式。
5.数据准备为完成此配置例,需准备如下的数据:在SwitchA、SwitchB和SwitchC上配置接口允许所有VLAN通过。
∙在SwitchA和SwitchB上配置接口的注册模式为Normal。
∙在SwitchC上配置接口GE1/0/1的注册模式为Fixed,配置接口GE1/0/2的注册模式为Normal。
∙在SwitchC上创建属于公司B的VLAN101~VLAN200。
操作步骤1.配置交换机SwitchA# 全局使能GVRP功能。
<SwitchA>system-view[SwitchA] gvrp# 配置接口为Trunk类型,并允许所有VLAN通过。
[SwitchA] interface gigabitethernet 1/0/1[SwitchA-GigabitEthernet1/0/1] port link-type trunk[SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan all[SwitchA-GigabitEthernet1/0/1] quit[SwitchA] interface gigabitethernet 1/0/2[SwitchA-GigabitEthernet1/0/2] port link-type trunk[SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan all[SwitchA-GigabitEthernet1/0/2] quit# 使能接口的GVRP功能,并配置接口注册模式。
华为三层交换机配置-电脑资料

华为三层交换机配置-电脑资料目的:了解三层交换的意义理解三层交换与路由的异同点掌握vlanif的配置方法掌握valn之间实现通讯的配置方法掌握vlanif之间配置OSPF的方法拓扑图:场景:你是公司的网络管理员,。
当前网络中有四个用户。
S3、R1、R3与S4模拟为公司用户。
分属于不同的vlan,定义S3属于vlan3、R1属于vlan4、R3属于vlan6、S4属于vlan7,实现vlan之间的互通。
同时由于S1与S2之间使用三层链路实现互通,所以需要使用路由协议实现路由信息的互相学习。
学习任务步骤一.S1与S2之间的链路配置成eth-trunk链路实验之前,需要关闭部分实验设备接口与,避免影响本次试验。
本次实验需要关闭S3的E0/0/1、E0/0/23接口,另外需要关闭S4的E0/0/14接口。
关闭这些接口。
关闭这些接口后,开始实验配置。
[Huawei]sysname S1[S1]interface eth-trunk 1[S1-Eth-Trunk1]q[S1]interface g0/0/9[S1-GigabitEthernet0/0/9]eth-trunk 1[S1-GigabitEthernet0/0/9]interface g0/0/10[S1-GigabitEthernet0/0/10]eth-trunk 1Info: This operation may take a fewseconds. Please wait for amoment...done.[Huawei]sysname S2[S2]interface eth-trunk 1[S2-Eth-Trunk1]q[S2]interface g0/0/9[S2-GigabitEthernet0/0/9]eth-trunk 1[S2-GigabitEthernet0/0/9]interface g0/0/10[S2-GigabitEthernet0/0/10]eth-trunk 1步骤二.S1、S2配置valn3、4、5、6、7[S1]vlan batch 3 to 7[S2]vlan batch 3 to 7查看vlan的创建情况[S1]dis vlanThe total number of vlans is : 6--------------------------------------------------------------------------------U: Up; D: Down; TG: Tagged; UT: Untagged;MP: Vlan-mapping; ST: Vlan-stacking;#: ProtocolTransparent-vlan; *: Management-vlan;--------------------------------------------------------------------------------VID Type Ports--------------------------------------------------------------------------------1 common UT:GE0/0/1(U) GE0/0/2(D) GE0/0/3(D) G E0/0/4(D)GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)GE0/0/11(D) GE0/0/12(D) GE0/0/13(U) GE0/0/14(D)GE0/0/15(D) GE0/0/16(D) GE0/0/17(D) GE0/0/18(D)GE0/0/19(D) GE0/0/20(D) GE0/0/21(D) GE0/0/22(D)GE0/0/23(D) GE0/0/24(D) Eth-Trunk1(U)3 common4 common5 common6 common7 commonVID Status Property MAC-LRN Statistics Description--------------------------------------------------------------------------------1 enable default enable disable VLAN 00013 enable default enable disable VLAN 00034 enable default enable disable VLAN 00045 enable default enable disable VLAN 00056 enable default enable disable VLAN0006。
华三华为交换机-路由器配置常用命令

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、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
华为三层交换机配置教程

华为三层交换机配置教程按照网络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。
三层交换机详细配置实例(图)

三层交换机与路由器的配置实例(图解)目的:学会使用三层交换与路由器让处于不同网段的网络相互通信实验步骤:一:二层交换机的配置:在三个二层交换机上分别划出两VLAN,并将二层交换机上与三层交换或路由器上的接线设置为trunk接口二:三层交换机的配置:1:首先在三层交换上划出两个VLAN,并进入VLAN为其配置IP,此IP将作为与他相连PC 的网关。
2:将与二层交换机相连的线同样设置为trunk接线,并将三层交换与路由器连接的线设置为路由接口(no switchsport)3:将路由器和下面的交换机进行单臂路由的配置实验最终结果:拓扑图下各个PC均能相互通信交换机的配置命令:SW 0:Switch>Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int f0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#no shutSwitch(config-if)#int f0/3Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#exitSwitch(config)#SW 1:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/2Switch(config-if)#switchport access vlan 2% Access VLAN does not exist. Creating vlan 2Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#SW 2:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/2Switch(config-if)#switchport access vlan 2% Access VLAN does not exist. Creating vlan 2Switch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mode trunkSwitch(config-if)#三层交换的配置命令:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/1Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to downSwitch(config-if)#exitSwitch(config)#int f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int vlan 1Switch(config-if)#no shut%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up Switch(config-if)#ip address 192.168.1.168 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 2%LINK-5-CHANGED: Interface Vlan2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 192.168.2.168 255.255.255.0Switch(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#no switchport%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#Switch(config-if)#ip address 192.168.10.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2Switch(config)#路由器的配置:Router>enRouter#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#int f0/0Router(config-if)#no shutRouter(config-if)#exitRouter(config)#int f0/0.1Router(config-subif)#encapsulation dot1Q 1Router(config-subif)#ip address 192.168.3.168 255.255.255.0Router(config-subif)#exitRouter(config)#int f0/0.2Router(config-subif)#encapsulation dot1Q 2Router(config-subif)#ip addRouter(config-subif)#ip address 192.168.4.168 255.255.255.0Router(config-subif)#exitRouter(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1Router(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleRouter#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/1Router(config-if)#ip addRouter(config-if)#ip address 192.168.10.2 255.255.255.0 Router(config-if)#。
华为三层交换机配置总结

一、基本命令: (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]跟踪完成。
华为三层交换机的配置案例【建筑工程类独家文档首发】

华为三层交换机的配置案例【建筑工程类独家文档首发】配置命令<H3C>system-view //进入系统视图[H3C]display current-configuration //显示当前配置//以下开始配置第一步:划分VLAN,并描述vlan 1description local-S3600vlan 2description link-to-wenquanvlan 3description link-to-ruzhouvlan 4description link-to-xiaotunvlan 5description link-to-baofengvlan 6description link-to-pingxivlan 7description link-to-pingnanvlan 8description Uplink-to-Putianvlan 9description link-to-pingxicentre第二步:给VLAN 划网关interface Vlan-interface2description link to wenquanip address 10.41.77.41 255.255.255.192 interface Vlan-interface3description link to ruzhouip address 10.41.77.105 255.255.255.192 interface Vlan-interface4description link to xiaotunip address 10.41.77.169 255.255.255.192 interface Vlan-interface5description link to baofengip address 10.41.77.233 255.255.255.192 interface Vlan-interface6description link to pingxiip address 10.41.78.41 255.255.255.192 interface Vlan-interface7description link to pingnanip address 10.41.78.105 255.255.255.192 interface Vlan-interface8description uplink to putianip address 10.41.244.102 255.255.255.252interface Vlan-interface9description link to pingxicentreip address 10.41.80.233 255.255.255.192 第三步:给VLAN 指定端口interface Ethernet1/0/2description link to wenquanport access vlan 2interface Ethernet1/0/3description link to ruzhouport access vlan 3interface Ethernet1/0/4description link to xiaotunport access vlan 4interface Ethernet1/0/5description link to baofengport access vlan 5interface Ethernet1/0/6description link to pingxiport access vlan 6interface Ethernet1/0/7description link to pingnanport access vlan 7interface Ethernet1/0/8description uplink to putianport access vlan 8interface Ethernet1/0/9 to Ethernet1/0/24description link to pingxicentreport access vlan 9第四步:配置路由协议//(1)用RIP配动态路由ripnetwork 10.41.77.41network 10.41.77.105network 10.41.77.169network 10.41.77.233network 10.41.78.41network 10.41.78.105network 10.41.80.233network 10.41.244.102//(2)配静态路由(只用对远端设备配一条路由即可,本地自通)---推荐用此协议ip route 0.0.0.0 0.0.0.0 10.41.244.101案例:华为S3600三层交换机配置方法结语:任何一个人,都要必须养成自学的习惯,即使是今天在学校的学生,也要养成自学的习惯,因为迟早总要离开学校的!自学,就是一种独立学习,独立思考的能力。
华为三层交换机配置步骤解释资料

华为三层交换机配置步骤解释资料第一步:连接设备首先,将电脑与三层交换机通过网线连接起来。
可以通过一根网线将电脑的网络接口与三层交换机的任意一个接口连接起来。
第二步:登录设备打开浏览器,在浏览器的地址栏输入三层交换机的默认管理地址,例如:192.168.1.1、按下回车键,会弹出登录页面。
输入正确的用户名和密码,点击登录按钮。
第三步:配置基本信息登录成功后,首先需要进行一些基本的配置。
点击左侧导航栏的“基本设置”,在这里可以修改设备的名称、管理地址、时间等基本信息。
一般来说,建议将管理地址配置为内网地址,同时设定好设备的名称和时区。
第四步:配置VLANVLAN(Virtual Local Area Network)用于将一个大的局域网划分为多个虚拟局域网,每个VLAN可以独立配置。
点击左侧导航栏的“VLAN管理”,在这里可以创建、修改和删除VLAN。
点击“添加”按钮,输入VLAN的ID和名称,点击保存按钮完成VLAN的创建。
第五步:配置接口第六步:配置静态路由静态路由是手动配置的路由信息,用于指定数据包的转发路径。
点击左侧导航栏的“路由管理”,在这里可以配置和管理静态路由。
点击“添加”按钮,输入目的网段的IP地址和子网掩码,以及下一跳的IP地址,点击保存按钮完成静态路由的配置。
第七步:配置ACLACL(Access Control List)是用于控制网络流量的一种策略,可以根据源IP地址、目的IP地址、端口号等条件进行过滤和限制。
点击左侧导航栏的“ACL管理”,在这里可以配置和管理ACL规则。
点击“添加”按钮,输入ACL规则的名称、匹配条件和动作,点击保存按钮完成ACL的配置。
第八步:保存和应用配置在进行完上述配置后,需要点击页面的“保存”按钮将配置保存到设备中。
然后,点击页面的“应用”按钮,设备会自动将新的配置应用到系统中。
完成配置后,可以通过ping命令或其他方式进行网络连通性测试,确保配置的正确性。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华为三层交换机配置方法(1)(2008-07-21 11:27:34)转载标签:分类:工作汇报杂谈本文以河南平临高速所使用的华为华三通信的H3C S3600-28P-SI为例,配置前首先要确定型号后缀是SI还是EI,EI的支持所有协议,SI的不支持OSPS动态协议,因此SI配置路由时可以使用静态协议和RIP协议,具体配置如下:<H3C>system-view //进入系统视图[H3C]display current-configuration //显示当前配置//以下开始配置//第一步:划分VLAN,并描述vlan 1description local-S3600vlan 2description link-to-wenquanvlan 3description link-to-ruzhouvlan 4description link-to-xiaotunvlan 5description link-to-baofengvlan 6description link-to-pingxivlan 7description link-to-pingnanvlan 8description Uplink-to-Putianvlan 9description link-to-pingxicentre//第二步:给VLAN 划网关interface Vlan-interface2description link to wenquanip address 10.41.77.41 255.255.255.192 interface Vlan-interface3description link to ruzhouip address 10.41.77.105 255.255.255.192 interface Vlan-interface4description link to xiaotunip address 10.41.77.169 255.255.255.192 interface Vlan-interface5description link to baofengip address 10.41.77.233 255.255.255.192 interface Vlan-interface6description link to pingxiip address 10.41.78.41 255.255.255.192 interface Vlan-interface7description link to pingnanip address 10.41.78.105 255.255.255.192 interface Vlan-interface8description uplink to putianip address 10.41.244.102 255.255.255.252 interface Vlan-interface9description link to pingxicentreip address 10.41.80.233 255.255.255.192//第三步:给VLAN 指定端口interface Ethernet1/0/2description link to wenquanport access vlan 2interface Ethernet1/0/3description link to ruzhouport access vlan 3interface Ethernet1/0/4description link to xiaotunport access vlan 4interface Ethernet1/0/5description link to baofengport access vlan 5interface Ethernet1/0/6description link to pingxiport access vlan 6interface Ethernet1/0/7description link to pingnanport access vlan 7interface Ethernet1/0/8description uplink to putianport access vlan 8interface Ethernet1/0/9 to Ethernet1/0/24 description link to pingxicentreport access vlan 9//第四步:配置路由协议//(1)用RIP配动态路由ripnetwork 10.41.77.41network 10.41.77.105network 10.41.77.169network 10.41.77.233network 10.41.78.41network 10.41.78.105network 10.41.80.233network 10.41.244.102//(2)配静态路由(只用对远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上的吉比特以太口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的开销定义为10000 interface 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.0no 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.0standby 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 //扩展的访问控制列表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 //宣告直连的网段exitip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line aux 0line vty 0 15 //telnet线路(路由器只有5个,是0-4)password 12345678 //login密码loginendcopy running-config startup-config 保存配置cisco 3550Switch# 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 11Switch(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华为三层交换机配置实例一例网络技术2008-07-25 06:08:28 阅读243 评论0 字号:大中小订阅华为三层交换机配置实例一例服务器1双网卡,内网IP:192.168.0.1,其它计算机通过其代理上网PORT1属于VLAN1PORT2属于VLAN2PORT3属于VLAN3VLAN1的机器可以正常上网配置VLAN2的计算机的网关为:192.168.1.254配置VLAN3的计算机的网关为:192.168.2.254即可实现VLAN间互联如果VLAN2和VLAN3的计算机要通过服务器1上网则需在三层交换机上配置默认路由系统视图下:ip route-static 0.0.0.0 0.0.0.0 192.168.0.1然后再在服务器1上配置回程路由进入命令提示符route add 192.168.1.0 255.255.255.0 192.168.0.254route add 192.168.2.0 255.255.255.0 192.168.0.254这个时候vlan2和vlan3中的计算机就可以通过服务器1访问internet了~~华为路由器与CISCO路由器在配置上的差别"华为路由器与同档次的CISCO路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。