华为三层交换机配置步骤解释
华为交换机配置步骤与一般简单命令注释

1.sys 进入配置模式2.sysname NAME 为交换机配置一个物理场所名字3.Vlan ID 配置一个Vlan4.q 退出当前配置5.【NAME】Interface Ethernet 0/0/1 进入需要配置端口(这条语句是用来为某一个端口绑定ip用的user-bind static ip-address 10.10.31.1 interface Ethernet0/0/1 )6.【NAME-Ethernet 0/0/1】Port link-type access 设置端口链接类型为access型(还有trunk 型)7.【NAME-Ethernet 0/0/1】port default vlan ID 将端口放入所增加的Vlan8.【NAME-Ethernet 0/0/1】q 退出当前配置界面返回前一层8.【NAME】interface vlanif 1 将所配置交换机放入vlanif1 这个是用来进行远程控制的,vlanif1是在核心配置的9.【NAME-vlanif】IP address 10.10.1.34 255.255.255.0 设置一个可以远程登录的IP地址10.【NAME-vlanif】q 退出当前配置界面11.【NAME】IP route-static 0.0.0.0.0.0.0.0 10.10.1.25412.【NAME】aaa13.【NAME】local-user admin service-typ telnet 本地拨号方式14.【NAME-aaa】local-user admin privilege level 15 本地用户分配级别15.【NAME-aaa】q 退出当前状态16.【NAME】user-interface vty 0 417.【NAME-ui-vty0-4】authentication-mode aaa18.【NAME-ui-vty0-4】q 退出当前模式19.【NAME】interface GigabitEthenet 0/0/1 进入G比特网络端口20.【NAME-GigabitEthenet 0/0/1】port link-type trunk21.【NAME-GigabitEthenet 0/0/1】port trunk allow-pass vlan all (或者2to4999)让你想让通过的vlan通过22.<NAME>save 保存所做的设置23.<NAME> q 退出界面。
华为三层交换机配置实例一例

华为三层交换机配置实例一例服务器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路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
例如中英文可切换的配置与调试界面,使中文用户再也不用面对着一大堆的英文专业单词而无从下手了。
另外它的软件升级,远程配置,备份中心,PPP回拨,路由器热备份等,对用户来说均是极有用的功能特性。
在配置方面,华为路由器以前的软件版本(VRP1.0-相当于CISCO的IOS)与CISCO有细微的差别,但目前的版本(VRP1.1)已和CISCO兼容,下面首先介绍VRP软件的升级方法,然后给出配置上的说明。
一、VRP软件升级操作升级前用户应了解自己路由器的硬件配置以及相应的引导软件bootrom的版本,因为这关系到是否可以升级以及升级的方法,否则升级失败会导致路由器不能运行。
在此我们以从VRP1.0升级到VRP1.1为例说明升级的方法。
华为三层交换机配置命令

华为三层交换机配置命令华为三层交换机配置命令你的三层交换机是不是经常让你机器不好使,看看下面的三层交换机配置文章,一切问题都能解决。
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 保存配置【华为三层交换机配置命令】。
华为三层交换机S3900配置

华为三层交换机S3900配置摘要一、视图的转换登录后的视图#这是用户视图<Quidway>#进入了系统视图<Quidway>system-viewSystem View: return to User View with Ctrl+Z.[Quidway] 已经进入了系统视图,按Ctrl+Z.可以返回用户视图<Quidway>二、设置主机名和IP地址在系统视图下操作#添加主机名和IP地址[Quidway]ip host gdkm 192.168.1.1[Quidway]#查看主机名和IP地址[Quidway]display ip hostHost AgeFlags Addressgdkm 0static 192.168.1.1[Quidway]#删除主机名和IP地址[Quidway]undo ip host gdkm[Quidway]三、VLAN接口操作(即VLAN的IP配置)# 进入VLAN接口1[Quidway] interface vlan-interface 1# 配置VLAN接口1(vlan1的IP)的IP地址[Quidway-Vlan-interface1] ip address 129.2.2.1 255.255.255.0#一个VLAN接口可以有5个IP,但只有一个主的,其他的是附加的,而且不能在同一个网段。
[Quidway-Vlan-interface1] ip address 129.2.200.1 255.255.255.0 sub# 显示VLAN接口的(即VLAN的)IP地址[Quidway-Vlan-interface2]display ip interface或者[Quidway]display interface Vlan-interface 2# 删除VLAN接口1(VLAN1的IP)的IP地址[Quidway-Vlan-interface1]undo ip address 129.2.2.1 255.255.255.0四、VLAN操作# 创建VLAN2并进入其视图。
华为三层交换机配置步骤解释资料

华为三层交换机配置步骤解释资料第一步:连接设备首先,将电脑与三层交换机通过网线连接起来。
可以通过一根网线将电脑的网络接口与三层交换机的任意一个接口连接起来。
第二步:登录设备打开浏览器,在浏览器的地址栏输入三层交换机的默认管理地址,例如: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命令或其他方式进行网络连通性测试,确保配置的正确性。
华为三层交换机VLAN间路由怎么设置

华为三层交换机VLAN间路由怎么设置华为三层交换机VLAN间路由怎么设置三层交换机怎么设置VLAN间路由?三层交换机相当于交换机和路由器的结合,可以生鲜不同VLAN的PC之间进行通信,下面我们就来看看三层交换机设置vlan路由的方法,需要的.朋友可以参考下网络设备中三层交换机具有网络层的功能,相当于交换机和路由器的结合,利用三层交换机实现不同VLAN的PC之间进行通信。
1、首先打开思科模拟器软件,找出一台三层交换机和两台PC,如下图所示:2、将三层交换机和两台PC用直通线连接起来,如下图所示:3、在三层交换机上划分VLAN,命令是:复制内容到剪贴板Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int f0/5Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 1Switch(config-if)#int f0/6Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 2 如下图所示:4、开启三层交换机的三层交换路由功能,命令是:ip routing,如下图所示:5、给PC配置IP地址和网关,如下图所示:6、进入三层交换机里面配置VLAN,命令是:复制内容到剪贴板Switch(config)#int vlan 1Switch(config-if)#no shutSwitch(config-if)#ip add 172.16.10.1 255.255.255.0Switch(config-if)#int vlan 2 Switch(config-if)#no shutSwitch(config-if)#ip add 172.16.20.1 255.255.255.0 如下图所示:7、利用ping命令对PC之间进行通信测试,可以ping通的结果如下图所示:注意事项:1、配置PC时一定要让它们处于不同IP和网关。
华为三层交换机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值]”来进行配置。
三层交换机配置教程

三层交换机配置教程三层交换机是一种具有路由功能的交换机,可以实现不同网段之间的互联。
下面是三层交换机配置教程:1. 连接三层交换机:首先,将三层交换机与其他设备(如路由器或防火墙)进行连接,可以使用网线将它们连接起来。
确保连接的端口是正确的并且连接松紧适中。
2. 访问三层交换机:使用终端或电脑连接到三层交换机的管理端口。
通常,可以通过SSH或Telnet协议访问交换机的管理接口。
3. 进入交换机的命令行界面:成功连接到三层交换机后,输入正确的用户名和密码,进入交换机的命令行界面。
用户名和密码通常是事先设置好的。
4. 设置主机名:在交换机命令行界面中,使用命令"hostname [名称]"来设置交换机的主机名。
主机名可以是任何你喜欢的名称,但通常建议使用简洁的描述性名称。
5. 配置IP地址:使用命令"interface [接口号]"进入交换机的接口配置模式。
然后,使用"ip address [IP地址] [子网掩码]"命令为每个接口设置IP地址和子网掩码。
确保IP地址和子网掩码与网络规划一致。
6. 启用接口:为了使接口生效,使用"no shutdown"命令启用每个接口。
这将使接口进入工作状态。
7. 配置路由:三层交换机可以实现不同网段之间的路由功能。
为了配置路由,使用"ip route [目标网络] [目标子网掩码] [下一跳地址]"命令。
这将指定该网络的下一跳地址。
可以添加多个路由以实现完整的路由表。
8. 保存配置:确认完成配置后,使用命令"copy running-config startup-config"保存配置。
这将保存当前正在运行的配置为交换机的启动配置,以便在重新启动后仍然有效。
以上就是三层交换机配置的基本步骤。
根据实际需求,还可以进行更复杂的配置,如VLAN划分、安全设置、负载均衡等。
华为三层交换机与路由器对接上网

华为三层交换机与路由器对接上网华为三层交换机与路由器对接上网一、引言本文档旨在提供一个详细的步骤,指导如何使用华为三层交换机与路由器对接以实现上网功能。
下面将逐步介绍每个步骤。
二、安装与配置三层交换机与路由器1:连接硬件设备a:将三层交换机与路由器通过合适的网线连接起来。
确保连接稳定可靠。
b:确保所有设备通电并正常工作。
2:配置三层交换机与路由器a:打开终端软件,通过串口或SSH连接到三层交换机的管理口。
b:进入特权模式,输入特权密码。
c:配置相应的VLAN并启用三层交换机的IP接口。
d:配置路由器接口并启用相应的路由协议(如OSPF、BGP等)。
三、配置路由器上网功能1:配置NATa:在路由器上配置NAT,将内网IP地址转换为公网IP地址,以便实现上网功能。
b:配置端口映射,允许对外部服务器提供服务。
2:配置防火墙a:在路由器上配置防火墙规则,以保护内网设备免受外部攻击。
b:限制某些特定IP地址或端口的访问权限。
四、测试与验证1:测试网络连通性a:通过ping命令测试内网设备与外部服务器的连通性。
b:检查网络延迟和丢包情况。
2:验证上网功能a:尝试使用内网设备访问外部网站、应用程序或服务器。
b:确保上网功能正常。
五、安全注意事项在配置华为三层交换机与路由器对接上网时,请注意以下安全事项:1:使用复杂的密码a:确保所有设备的密码足够复杂,并定期更改密码。
b:避免使用简单、容易猜测的密码,如生日、姓名等。
2:启用身份验证a:启用设备的身份验证功能,限制访问设备的用户。
3:定期备份配置a:定期备份三层交换机与路由器的配置,以防止意外损失。
4:更新设备固件a:定期检查设备厂商的官方网站,更新设备的固件,以修复已知漏洞。
六、附件本文档附带以下附件:1:配置示例文件2:路由器与交换机连接图七、法律名词及注释1: NAT(Network Address Translation)- 网络地址转换,一种将私有IP地址转换为公网IP地址的技术。
三层交换机 H3C交换机配置(三层交换机配置流程)

登录3100,输入如下命令:System-viewInterface vlan-interface 1 //进入默认的VLAN端口,vlan 1 Ip address 24 //设置本机在VLAN 1 中的IP 地址Quitsave登录5100,输入如下命令:System-viewInterface vlan-interface 1Ip address 24Quitsave登录5600,输入如下命令:System-viewInterface vlan-interface 1Ip address 24Quitsave在3100上输入:PingPing同理在5100上也输入:PingPing同理在5600上也输入:PingPing至此,交换机之间的管理vlan 就可以互相通信。
三、开启TELNET登录3100,输入如下命令:System-viewUser-interface vty 0 4 //进入用户端口Authenticate-mode scheme //设置认证模式Protocol inbound all //允许telnet 和RSH 访问User privilege level 3 //设置访问级别QuitLocal-user iamcat //创建本地用户Password simple xxxxxx //设置密码Service-type telnet //访问服务类型:telnetLevel 3 //设置授权访问级别Save在5100或5600上,即可用telnet 配置3100交换机。
登录5100,输入如下命令:System-viewUser-interface vty 0 4Authenticate-mode schemeProtocol inbound allUser privilege level 3QuitLocal-user iamcatPassword simple xxxxxxService-type telnetLevel 3QuitSave在3100或5600上,即可用telnet 配置5100交换机。
三层交换VLAN路由配置技巧详解

三层交换VLAN路由配置技巧详解三层交换VLAN路由配置技巧详解在华为三层交换机上创建VLAN,端口划分,三层VLAN接口地址配置,静态路由或是RIP协议配置。
跟店铺来学习一下配置过程。
静态路由配置过程:PCA:ip address:10.1.1.2/24 gw:10.1.1.1/24(VLAN2路由接口IP 地址)PCB:ip address:10.1.2.2/24 gw:10.1.2.1/24(VLAN3路由接口IP 地址)PCC:ip address:10.1.3.2/24 gw:10.1.3.1/24(VLAN2路由接口IP 地址)S3526A和S352B之间的`互联网段为10.1.4.0、24分配S3526A VLAN4路由接口IP地址为10.1.4.1/24,S3526B VLAN4路由接口IP地址为10.1.4.2/24三层交换机配置创建VLAN,把PC划到特定VLAN中://创建VLAN[S3526A]vlan 2//把端口划到VLAN中[S3526A-VLAN 2]port ethernet0/9 to ethernet0/12[S3526A-VLAN 2]vlan 3[S3526A-VLAN 2]port ethernet0/13 to ethernet0/16[S3526A-VLAN 2]vlan 4//交换机B的配置:[S3526B]vlan 2[S3526B-VLAN 2]port ethernet0/9 to ethernet0/12[S3526B-VLAN 2]vlan 4配置各台PC的网关地址和交换机之间的网段地址://进入VLAN接口配置模式:[S3526A]interface Vlan-interface 2//配置三层VLAN路由接口地址[S3526A-Vlan-interface2]ip address 10.1.1.1 255.255.255.0 [S3526A-Vlan-interface2] interface Vlan-interface 3[S3526A-Vlan-interface3]ip address 10.1.2.1 255.255.255.0 [S3526A-Vlan-interface3] interface Vlan-interface 4[S3526A-Vlan-interface4]ip address 10.1.4.1 255.255.255.0 [S3526B]interface Vlan-interface 2[S3526B-Vlan-interface2]ip address 10.1.3.1 255.255.255.0 [S3526B-Vlan-interface2] interface Vlan-interface 4[S3526B-Vlan-interface4]ip address 10.1.4.2 255.255.255.0 在二台三层交换机上配置非直连网段静态路由:[S3526A]ip route-static 10.1.3.0 255.255.255.0 10.1.4.2 [S3526B]ip route-static 10.1.1.0 255.255.255.0 10.1.4.1 [S3526B]ip route-static 10.1.2.0 255.255.255.0 10.1.4.1查看路由表,查看网络互通情况:[S3526B]display ip routing-tableRouting Table: public netDestination/Mask Proto Pre Cost Nexthop Interface10.1.1.0/24 STATIC 60 0 10.1.4.1 Vlan-interface410.1.2.0/24 STATIC 60 0 10.1.4.1 Vlan-interface410.1.3.0/24 DIRECT 0 0 10.1.3.1 Vlan-interface210.1.3.1/32 DIREC T 0 0 127.0.0.1 InLoopBack010.1.4.0/24 DIRECT 0 0 10.1.4.2 Vlan-interface40.1.4.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0RlP协议在三层交换机上的配置1.继续上面的,删除前面配置的静态路由。
华为三层交换机配置方法、命令及实例

华为三层交换机配置方法(1)时间:2021.03.05 创作:欧阳理(2008-07-21 11:27:34)分类:工作汇报标签:杂谈本文以河南平临高速所使用的华为华三通信的H3CS3600-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.192interface 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)配静态路由(只用对远华为三层交换机配置命令分类:默认栏目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 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的开销定义为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.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.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 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.00.0.0.255Switch(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.00.0.0.255Switch(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路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
华为三层交换机配置步骤(最新修改版20130517)

华为三层互换机配置步骤一.VLAN配置1. 成立 VLAN<Quidway>sys /进入特权模式[Quidway]vlan 1 /成立 vlan 1[Quidway]ctrl+z /退出 vlan1到一般模式[Quidway]vlan 2 /成立 vlan 2[Quidway]ctrl+z /退出 vlan2到一般模式【注】区分 VLAN,并描绘vlan 1description local-s3600// 本互换机使用vlan 2description link-to-shanxicentre //陕西省中心vlan 3description link-to-shangjiecentre //商界分中心内部使用2.配置端口加入到VLAN[Quidway]vlan 1 /进入vlan 1[Quidway-vlan 1]port Ethernet 0/1 /将端口E0/1加入到vlan1[Quidway-vlan 1] ctrl+z /退出vlan1到一般模式[Quidway]vlan 2 /进入vlan 2[Quidway-vlan 2]port Ethernet 0/2 /将端口E0/2加入到vlan2[Quidway-vlan 2] ctrl+z /退出vlan2到一般模式3. 配置 VLAN的 IP 地点[Quidway]interface vlan 1 /进入接口视图[Quidway-Vlan-interface1]ip address 13.1.1.130 255.255.255.0 /配置VLAN1的IP地点[Quidway-Vlan-interface1]ctrl+z /退出vlan1到一般模式[Quidway]interface vlan 2 /进入接口视图[Quidway-Vlan-interface2]ip address 192.168.2.1 255.255.255.0 /配置VLAN2的IP地点[Quidway-Vlan-interface1]ctrl+z /退出vlan2到一般模式4.配置静态路由/ 静态路由=网关5.配置上行端口为trunk[Quidway -Ethernet0/1]port link-type trunk/实质中间一般将上行端口设置成trunk属性,同意vlan 透传[Quidway -Ethernet0/1]port trunk permit vlan all/同意全部的vlan 从 E0/3 端口透传通过,也能够指定详细的vlan 值5.端口汇聚配置(1)进入端口 E0/1[Quidway]interface Ethernet 0/1(2)汇聚端口一定工作在全双工模式[Quidway -Ethernet0/1]duplex full(3)汇聚的端口速率要求同样,但不可以是自适应[Quidway -Ethernet0/1]speed 100(4)进入端口 E0/2[Quidway]interface Ethernet 0/2(5)汇聚端口一定工作在全双工模式[Quidway -Ethernet0/2]duplex full(6)汇聚的端口速率要求同样,但不可以是自适应[Quidway -Ethernet0/2]speed 100(7)依据源和目的 MAC 进行端口选择汇聚[Quidway]link-aggregation Ethernet 0/1 to Ether【增补说明】(1)同一个汇聚组中成员端口的链路种类与主端口的链路种类保持一致,即假如主端口为Trunk端口,则成员端口也为Trunk端口;如主端口的链路种类改为Access端口,则成员端口的链路种类也变成Access端口。
配置三层交换机4个步骤

配置三层交换机4个步骤步骤一:准备工作在开始配置三层交换机之前,我们需要做一些准备工作。
首先,我们需要了解网络拓扑结构,也就是了解网络中的所有设备和它们之间的连接方式。
其次,我们需要确定每个设备的IP地址和子网掩码。
此外,我们还需要准备一台连接到交换机的电脑,并安装好相应的管理工具。
步骤二:设置管理IP地址在配置三层交换机之前,我们需要先给它分配一个管理IP地址。
通过这个IP地址,我们可以远程管理交换机。
一般情况下,我们会将管理IP地址设置为一个与其他设备不同的IP地址,以避免冲突。
为了设置管理IP地址,我们需要进入交换机的CLI(命令行界面)或Web界面。
在CLI中,我们可以通过命令行操作来设置管理IP地址。
在Web界面中,我们可以通过图形用户界面来设置管理IP地址。
无论使用何种方式,我们都需要确保将设置保存到配置文件中,以便在重启后仍然保持。
步骤三:配置VLAN配置虚拟局域网(VLAN)是三层交换机的重要功能之一、通过配置VLAN,我们可以将交换机的端口根据需要划分为不同的虚拟网络,实现不同子网之间的隔离。
要配置VLAN,我们首先需要创建VLAN,并为每个VLAN分配一个VLAN ID。
然后,我们需要将交换机的端口与相应的VLAN关联起来。
在关联过程中,我们可以选择将端口设置为访问端口(access port)或特定VLAN的成员(VLAN member)。
此外,如果有需要,我们还可以配置VLAN间的互通,以实现不同子网之间的通信。
步骤四:路由配置三层交换机除了具备交换功能,还具备路由功能。
通过配置路由,交换机可以根据不同子网的IP地址转发数据包。
要配置路由,我们需要按照目标子网的IP地址和子网掩码创建静态路由。
在创建路由的过程中,我们需要指定下一跳(next hop)的IP地址和端口。
下一跳是指数据包到达当前子网的最后一跳设备的IP地址。
此外,我们还需要确保交换机上的IP转发功能已启用,以便实现数据包的转发。
华为三层交换机配置教程

华为三层交换机配置教程按照网络OSI七层模型来划分,可以将交换机划分为二层交换机、三层交换机、多层交换机。
下面是小编收集整理的华为三层交换机配置教程,希望对大家有帮助~~华为三层交换机配置教程工具/原料s3600三层交换机PC机交换机console线一根方法/步骤language-modechinese//切换到中文模式system-view//进入系统视图[H3C]displaycurrent-configuration//显示当前配置三层交换配置三层交换机第一步:划分VLAN,并描述vlan1descriptionlocal-s3600//本交换机使用#vlan2descriptionlink-to-jilincentre//吉林省中心#vlan3descriptionlink-to-shangjiecentre//商界分中心内部使用#vlan4descriptionlink-to-chaoyangsuo//朝阳所#vlan5descriptionlink-to-nanguansuo//南关所配置三层交换机第二步:给VLAN划网关#interfaceVlan-interface2descriptionlinktojilincentreipaddress10.61.242.110255.255.255.252//省中心指定广域网关、子网掩码#interfaceVlan-interface3descriptionlinktoshangjiecentreipaddress10.161.134.65255.255.255.192//商界分中心局域网关、子网掩码#interfaceVlan-interface4descriptionlinktochaoyangsuoipaddress10.61.242.113255.255.255.252//朝阳所广域网关、子网掩码#interfaceVlan-interface5descriptionlinktonanguansuoipaddress10.61.242.117255.255.255.252//南关所广域网关、子网掩码配置三层交换机第三步:给VLAN指定端口#interfaceEthernet1/0/2//将交换机的端口2指定给省中心使用descriptionlinktojilincentreportaccessvlan2#interfaceEthernet1/0/15-24//将交换机的端口15-24指定给分中心内部使用descriptionlinktoshangjiecentreportaccessvlan3#interfaceEthernet1/0/3//将交换机的端口3指定给朝阳所使用descriptionlinktochaoyangsuoportaccessvlan4#interfaceEthernet1/0/4//将交换机的端口4指定给南关所使用descriptionlinktonanguansuoportaccessvlan5配置三层交换机第四步:配置路由协议//配静态路由(只用对远端设备配一条路由即可,本地自通)iproute0.0.0.00.0.0.010.61.242.109//指定所有网段到朝阳所的路由//配置三层交换机朝阳所的反向路由iproute10.161.134.0255.255.255.010.61.242.114iproute10.161.135.0255.255.255.010.61.242.114//配置三层交换机南关所的反向路由iproute10.161.135.0255.255.255.010.61.242.118iproute10.161.136.0255.255.255.010.61.242.118//省中心配置三层交换机:iproute10.61.242.0255.255.255.010.61.242.110//朝阳所242.114和南关所242.118共属的242.0指向分中心网关iproute10.161.134.0255.255.255.010.61.242.110//分中心内部网段指向分中心网关//iproute10.161.134.0255.255.255.010.61.242.110//iproute10.161.135.0255.255.255.010.61.242.110//iproute10.161.136.0255.255.255.010.61.242.110 华为三层交换机配置教程相关文章:1.三层交换机配置的实例教程2.华为路由器配置详细教程3.h3c交换机配置步骤教程4.华为交换机如何配置端口镜像5.华为交换机配置命令。
华为三层交换机配置步骤解释

华为三层交换机配置步骤1.给交换机划分VLANVlan是虚拟局域网的意思,它相当于一个局域网工作组。
“vlan几”可以理解成编号为几的vlan,比如vlan 2就是编号为2的vlan,只是一个编号而已,并不是说vlan 2的网段一定要是2网段,vlan 2的IP地址是可以随便设置的。
下面我将三层交换机的第20个端口添加到vlan 10里,步骤如下:A.在交换机里添加VLAN 10system-view (一般用缩写:sys)[Quidway] vlan10 (添加编号为10的vlan)[Quidway-vlan10] quit (一般缩写:q)B.设置vlan 10的IP地址为192.168.66.66 网关为255.255.255.0[Quidway]interface vlanif 10(interface一般可以缩写为:int ;vlanif也可以只写vlan)[Quidway-vlanif10] ip address 192.168.66.66 255.255.255.0 (address缩写add)[Quidway-vlanif10]quitC.设定交换机上第20个端口模式为access(默认为trunk,需在将端口划入VLAN前转为ACCESS)[Quidway]int gigabitethernet 0/0/20(gigabitethernet:千兆以太网口)[Quidway-GigabitEthernet0/0/20]port link-type access (port:端口)[Quidway-GigabitEthernet0/0/20]quitD.将第20个端口加入到vlan 10里[Quidway] vlan 10[Quidway-vlan10] port gigabitethernet 0/0/20(如果是多个连续端口,用XX to XX)[Quidway-Vlan10] quit这样就是成功的将交换机上的第20个端口添加到了编号为10的Vlan 里,划分VLAN就是这4个步骤,2个步骤设置vlan,2个步骤设置端口。
三层交换机配置命令以及中文解释

基本配置S> enable 进入特权模式S# configure terminal 进入全局配置模式S(config)# hostname name 改变交换机名称S(config)# enable password level level_# password 设置用户口令(level_#=1)或特权口令(level_#=15)S(config)# line console 0 进入控制台接口S(config-line)# password console_password 接上一条命令,设置控制台口令S(config)# line vty 0 15 进入虚拟终端S(config-line)# password telnet_password 接上一条命令,设置Telnet口令S(config-line)# login 允许Telnet登录S(config)# enable password|secret privilege_password 配置特权口令(加密或不加密)S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式S(config-if)# [no] shutdown 关闭或启用该接口(默认启用)S(config)# ip address IP_address sunbet_mask 指定IP地址S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认网关S# show running-config 查看当前的配置S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM中S> show interface [type slot_#/port_#] 查看所有或指定接口的信息S> show ip 显示交换机的IP配置(只在1900系列上可用)S> show version 查看设备信息S# show ip interface brief 验证IP配置S(config-if)# speed 10|100|auto 设置接口速率S(config-if)# duplex auto|full|half 设置接口双工模式S> show mac-address-table 查看CAM表S# clear mac-address-table 清除CAM表中的动态条目1900(config)# mac-address-table permanent MAC_address type [slot_#/]port_# 在CAM 表中创建静态条目2950(config)# mac-address-table static MAC_address vlan VLAN_# interface type [slot_#/] port_# 在CAM表中创建静态条目1900(config)# mac-address-table restricted static MAC_address source_port list_of_allowed_interface 设置静态端口安全措施1900(config-if)# port secure 启用粘性学习1900(config-if)# port secure max-mac-count value 设置粘性学习特性能够学到的地址数量(默认132,取值范围是1-132)1900(config)# address-violation suspend|ignore|disable 改变安全选项1900> show mac-address-table security 验证端口安全措施2950(config)# switchport mode access 定义接口为主机端口而不是中继端口2950(config)# switchport port-security 启用端口安全措施2950(config)# switchport port-security maximum value 指定可与此接口相关的设备的最大数量2950(config)# switchport port-security violation protect|restrict|shutdown 指定出现安全违规时应该发生的事2950(config)# switchport port-security mac-address MAC_address 指定允许与此接口相关的确切的MAC地址2950(config)# switchport port-security mac-address sticky 启用粘性学习特性2950(config)# show port interface type [slot_#/] port_# 验证接口配置2950(config-if) description name 设置接口描述信息2950# show buffers 查看系统缓存的大小1900# copy nvram tftp:// IP_address_of_TFTP_server/ file_name 将配置文件备份到TFTP 服务器上1900# copy tftp:// IP_address_of_TFTP_server/ file_name nvram 从TFTP服务器上恢复配置到NVRAM1900# delete nvram 删除配置文件2950# erase startup-config 删除配置文件3550# show tcam qos TCAM_ID statistics 查看TCAM剩余容量4000> enable 进入特权模式4000>(enable) set password 设置用户模式密码4000>(enable) set enablepass 设置授权密码4000>(enable) set interface sc0 IP_address mask 配置IP地址4000>(enable) set port enable|disable slot_#/port_# 启用/禁用接口4000>(enable) show port [slot_#/port_#] 显示接口信息4000>(enable) set port name slot_#/port_# name 设置交换机接口描述信息4000>(enable) set port speed slot_#/port_# 4|10|16|100|auto 设置交换机接口速率4000>(enable) set port duplex slot_#/port_# full|half 设置交换机接口双工模式4000>(enable) clear config all 删除NVRAM中的配置信息4000>(enable) erase all 删除FLASH中的内容4000>(enable) show flash 显示FLASH中的内容4000>(enable) show cam [count] dynamic|static|permanent|system [vlan_#] 显示CAM 表VLAN 1900(config)# vtp domain VTP_domain_name 定义交换机域名1900(config)# vtp server|client|transparent 定义交换机VTP模式(默认服务器)1900(config)# vtp password VTP_password 配置VTP口令1900(config)# vtp pruning enable|disable 启用/禁用修剪(默认启用)1900(config)# vtp trap enable 启用SNMP陷阱(默认启用)1900# show vtp 验证VTP配置2950# vtp database 访问VLAN和VTP配置(以下均是在IOS12.1前用,12.1后全是在全局配置模式下)2950(vlan)# vtp domain VTP_domain_name 定义交换机域名2950(vlan)# vtp server|client|transparent 定义交换机VTP模式(默认服务器)2950(vlan)# vtp password VTP_password 配置VTP口令2950(vlan)# vtp pruning 启用/禁用修剪(默认启用)2950(config)# snmp-server enable traps vtp 启用SNMP陷阱(默认启用)2950# show vtp status 检查VTP配置2950# show vtp counters 显示与VTP消息发送与接收相关的VTP统计信息1900(config-if)# trunk on|off|desirable|auto 指定中继类型1900# show trunk A|B 验证接口中继(A是fa0/26,B是fa0/27)2950(config-if)# switchport mode trunk|dynamic desirable|dynamic auto|nonegotiate 指定中继类型(默认自动协商)2950(config-if)# switchport trunk native|allowed|pruning vlan VLAN_# 配置中继2950(config-if)# switchport trunk pruning vlan remove VLAN_# 清除不希望消减的VLAN 2950# show interfaces [type 0/port_#] switchport|trunk 验证接口中继1900(config)# vlan VLAN_# [name VLAN_name] 创建VLAN1900(config-if)# vlan-membership static VLAN_# 将该接口静态地分配给一个VLAN 1900# show vlan 验证VLAN1900# show vlan-membership 查看VLAN成员关系1900# show spantree [VLAN_#] 查看VLAN的STP信息2950# vlan database 进入VLAN数据库(ISO12.1前用)2950(vlan)# vlan VLAN_# [name VLAN_name] 创建VLAN2950(config)# vlan VLAN_# 进入VLAN数据库(ISO12.1后用)2950(config-vlan)# name VLAN_name 创建VLAN2950(config-if)# switchport mode access 指定连接是接入链路连接2950(config-if)# switchport access vlan VLAN_# 指定VLAN是接入链路连接4000>(enable) set vlan VLAN_# name VLAN_name 配置VLAN4000>(enable) set vlan VLAN_# slot_#/port_#-port_# 为VLAN分配端口4000>(enable) set trunk slot_#/port_# [on|off|desirable|auto|nonegotiate] [VLAN_#] [isl|dot1q|dot10|lane|negotiate] 配置中继4000>(enable) clear trunk slot_#/port_# VLAN_# 删除VLAN4000>(enable) show trunk slot_#/port_# 验证中继端口4000>(enable) set vtp v2 enable 配置VTPv24000>(enable) set vtp [domain name] [mode client|server|transparent] [passwd password] [pruning enable|disable] [v2 enable|disable] 设置VTP4000>(enable) show vtp domain 验证VTP域的信息4000>(enable) show vtp statistics 显示发出或收到的VTP通告信息的摘要内容4000>(enable) set vtp pruneeligible VLAN_# 设置VTP消减4000>(enable) clear vtp pruneeligible VLAN_# 清除不希望消减的VLANSTP 4000>(enable) set spantree enable|disable VLAN_# 启用/禁用STP(默认启用)2950(config)# [no] spanning-tree vlan VLAN_# 启用/禁用STP(默认启用)4000>(enable) show spantree [VLAN_#] 验证STP状态2950# show spanning-tree 验证STP状态4000>(enable) set spantree root [secondary] VLAN_# [dia network_diameter] [hello hello_time] 设置主根节点桥、备份节点桥、最大桥数量(2-7)、持续时间(1-10,默认2)4000>(enable) set spantree portcost slot_#/port_# cost_# 设置端口开销2950(config-if)# spanning-tree cost cost_# 设置端口开销4000>(enable) set spantree portpri slot_#/port_# priority_# 设置端口优先级4000>(enable) set spantree portvlanpri slot_#/port_# priority_# [VLAN_#] 改变VLAN 的优先级设置2950(config-if)# spanning-tree vlan VLAN_# port-priority priority_# 设置端口优先级4000>(enable) set spantree fwddelay delay_# [VLAN_#] 设置从侦听状态到学习状态再到转发状态的时间间隔(默认15秒,取值范围是4-30秒)4000>(enable) set spantree hello interval_time [VLAN_#] 设置根节点交换机发送BPDU 的时间间隔(默认2秒,取值范围是1-10秒)4000>(enable) set spantree maxage agingtime [VLAN_#] 设置交换机持有BPDU的时间(默认20秒,取值范围是6-40秒)2950(config)# spanning-tree vlan VLAN_# forward-time forward_time 设置从侦听状态到学习状态再到转发状态的时间间隔(默认15秒,取值范围是4-30秒)2950(config)# spanning-tree vlan VLAN_# hello-time hello_time 设置根节点交换机发送BPDU的时间间隔(默认2秒,取值范围是1-10秒)2950(config)# spanning-tree vlan VLAN_# max-age maxage 设置交换机持有BPDU的时间(默认20秒,取值范围是6-40秒)4000>(enable) set port channel slot_#/port_# on 建立以太通道集合4000>(enable) show port capabilities slot_#/port_# 查看端口的配置4000>(enable) show port channel 验证以太通道集合的配置2950(config-if)# channel-group group_number mode auto|desirable|on 建立以太通道集合2950# show etherchannel group_number|brief|detail|load-balance|port|port-channel|summary 验证以太通道集合的配置4000>(enable) set spantree portfast slot_#/port_# enable 配置PortFast2950(config-if)# spanning-tree portfast 配置PortFast4000>(enable) set spantree uplinkfast enable|disable [rate station_update_rate] [all-protocols off|on] 启用/禁用UplinkFast4000>(enable) show spantree uplinkfast 验证UplinkFast配置2950(config)# spanning-tree uplinkfast [max_update_rate] 启用/禁用UplinkFast 2950# show spanning-tree uplinkfast 验证UplinkFast配置4000>(enable) set spantree backbonefast enable|disable 启用/禁用BackboneFast 4000>(enable) show spantree backbonefast 验证BackboneFast配置2950(config)# spanning-tree backbonefast 启用BackboneFast虚拟网间路由2600(config)# interface type slot_#/port_#.subint_number 配置子接口2600(config-subif)# encapsulation dot1q|isl|sde|tr-isl VLAN_# 配置封装类型4000>(enable) show module 查看交换机的硬件配置4000>(enable) session module_# 访问L3SML3SM(config-if)# mac-address mac_address 分配MAC地址MLS 2600(config)# mls rp ip 启动MLS2600(config-if)# mls rp vtp-domain domain_name 分配路由器接口到VTP域中2600(config-if)# mls rp vlan-id VLAN_# 向接口分配VLAN2600(config-if)# mls rp management-interface 指定该接口为管理接口2600# show mls rp 提供全局MLS信息2600# show mls rp interface type slot_#/port_# 提供指定接口的MLS信息2600# show mls rp vtp-domain domain_name 提供VTP域的MLS信息6500>(enable) set mls enable 在MLS-SE上启动MLS6500>(enable) set mls include rp_ip_address 告诉交换机哪一个IP地址是正确的6500>(enable) show mls include 显示外部路由处理器的IP地址列表6500>(enable) set mls flow [destination|destination-source|full] 告诉MLS交换机要缓存候选数据包的哪些信息6500>(enable) show mls entry 显示第三层缓存表6500>(enable) set mls agingtime aging_time 改变缓存的衰老时间(默认256秒,取值范围是8-2032秒中的8的倍数值)6500>(enable) set mls agingtime fast fast_aging_time pkt_threshold 改变快速衰老周期和数据包门限值6500>(enable) show mls ip 验证MLS-SE的配置6500>(enable) clear mls entry [destination IP_address] [source IP_address] [flow protocol] [source_port] [destination_port] [all] 删除所有或指定MLS缓存记录3550(config)# ip routing 启动IP路由3550(config)# ip cef 启动CEF3550(config-if)# no switchport 将第二层接口转换为第三层接口3550(config-if)# ip route-cache cef 在接口上启动CEF3550# show ip cef 验证CEF组播3640(config)# ip multicast-routing 启动路由器上的组播服务3640(config-if)# ip pim dense-mode 将接口设置为PIM密集模式3640(config-if)# ip pim sparse-mode 将接口设置为PIM稀疏模式3640(config-if)# ip pim sparsed-dense-mode 将接口设置为PIM稀疏-密集模式3640(config)# ip pim rp-address IP_address group_ACL_# [override] 手工配置RP 3640(config)# ip pim send-rp-announce type slot_#/port_# scope ttl_value group-list ACL_# 通告RP组的分配3640(config)# ip pim send-rp-discovery scope ttl_value 配置RP映射代理3640(config-if)# ip multicast ttl-threshold ttl_value 设置TTL门限值3640(config-if)# ip igmp join-group group_address 加入组播组3640# show ip mroute 查看组播信息3640# ping 验证RP之间或其他组播路由器之间的连接3640# mtrace source_IP_address [destination_IP_address] [group] 组播traceroute 3640(config-if)# ip cgmp 配置CGMP路由器4000>(enable) set cgmp enable 启动CGMP4000>(enable) show cgmp statistics 查看CGMP统计信息4000>(enable) show multicast group cgmp 查看交换机了解到的组播组信息4000>(enable) set cgmp leave enable 检查由客户端产生的IGMPv2的离开信息4000>(enable) set igmp enable 启动IGMP4000>(enable) ip igmp snooping 启动IGMP探听4000>(enable) set igmp fastleave enable 启动快速离开过程4000>(enable) show igmp statistics 显示交换机上IGMP探听的状态信息QoS 2950(config)# wrr-queue cos-map queue_ID cos_value 建立队列2950(config)# wrr-queue bandwidth bandwidth_value 设置队列门限2950(config)# class-maps name 定义对信息传输分类时的匹配标准2950(config-cmap)# match access-group ACL_# 识别被分类的信息传输2950(config)# policy-map name 确定为接入信息传输所设置的分类标准2950(config-pmap)# class name2950(config-pmap-c)# set ip dscp number2950(config-if)# service-policy input name 对该接口应用策略3550(config)# mls qos 启动QoS3550(config-if)# auto qos voip 在接口上启动自动服务质量3550(config)# priority-list priority_queue_# protocol protocol high|medium|normal|low [list ACL_#] 为优先级队列定义信息流3550(config)# priority-list priority_queue_# queue-limit limit_# 定义特定优先级队列的最大队列空间3550(config-if)# priority-group priority_queue_# 向特定输出接口分配优先级队列3550(config)# queue-list queue_list_# interface type slot_#/port_# queue_number 为一个特定的定制队列定义信息流3550(config)# queue-list queue_list_# queue queue_number byte-count size_in_bytes [limit number_of_queue] 为特定的定制队列定义队列的最大空间3550(config-if)# custom-queue-list custom_queue_number 为特定的输出接口分配优先级队列4840(config)# ip slb serverfarm serverfarm_name 配置SLB冗余4840(config-slb-sfarm)# real IP_address [port_#] 指定虚拟IP地址4840(config-slb-sfarm)# inservice 启动服务器4840(config)# virtual IP_address [network_mask] tcp|udp [port_number|wsp|wsp-wtp|wsp-wtls|wsp-wtp-wtls] [service service_name] 建立虚拟服务器IP地址。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华为三层交换机配置步骤1. 给交换机划分VLANVlan 是虚拟局域网的意思,它相当于一个局域网工作组。
“ vlan 几”可以理解成编号为几的vlan ,比如vlan 2 就是编号为 2 的vlan ,只是一个编号而已,并不是说vlan 2 的网段一定要是 2 网段,vlan 2 的IP 地址是可以随便设置的。
下面我将三层交换机的第20个端口添加到vlan 10 里,步骤如下:A. 在交换机里添加VLAN 10system-view (一般用缩写:sys )[Quidway] vlan 10 (添加编号为10 的vlan )[Quidway-vlan10] quit (一般缩写:q)B. 设置vlan 10 的IP地址为192.168.66.66 网关为255.255.255.0[Quidway] interface vlanif 10 (interface 一般可以缩写为:int ;vlanif 也可以只写vlan )[Quidway-vlanif10] ip address 192.168.66.66 255.255.255.0 (address 缩写add)[Quidway-vlanif10]quitC. 设定交换机上第20个端口模式为access (默认为trunk ,需在将端口划入VLAN前转为ACCES)S[Quidway] int gigabitethernet 0/0/20 (gigabitethernet :千兆以太网口)[Quidway-GigabitEthernet0/0/20] port link-type access (port :端口)[Quidway-GigabitEthernet0/0/20]quitD. 将第20个端口加入到vlan 10 里[Quidway] vlan 10[Quidway-vlan10] port gigabitethernet 0/0/20 (如果是多个连续端口,用XX to XX )[Quidway-Vlan10] quit这样就是成功的将交换机上的第20 个端口添加到了编号为10 的Vlan 里,划分VLAN就是这 4 个步骤, 2 个步骤设置vlan ,2 个步骤设置端口。
现在可以用网线把交换机的第20 个端口和电脑网卡连接起来,设置网卡地址为192.168.66.XX ,网关为192.168.66.66 ,在CMD里ping192.168.66.66 可以ping 通。
2. 删除vlanA.在系统视图下,用“ undo int vlan 2 ”命令删除vlan 2 的3层口,这样vlan 2 就没有了,但是划分给vlan 2 的那些端口依然还处于vlan 2 里,这时可以将那些端口释放出来,让他们不再属于任何vlanB.在系统视图下,用“ undo vlan 2 ”命令删除2层口,这个命令可以释放那些原先划分给了vlan 2 的端口,现在它们不属于任何vlan 了。
当然,将交换机上的某个端口更换到某个vlan 里,是可以直接在vlan 视图里添加端口的。
注意:交换机上的某个端口被设置成了access 模式,且加入了一个vlan ,要想将这个端口的模式更改为trunk ,直接在端口视图里打上“ port link-type trunk ”是不行的,会出现Error: Please renew the default configurations. 这时需要先从VLAN里删除这个端口,也就是前面说的让这个端口不属于任何vlan ,才能将这个端口设置为trunk 。
3. 通过端口进行限速现在要对交换机上的第 2 个端口进行限速操作,让通过这个端口的下载速度不超过128KB/S配置命令说明:Inbound:对入端口报文进行限速Outbound:对出端口报文进行限速sys[Quidway] int gigabitethernet 0/0/2[Quidway-GigabitEthernet0/0/2] qos lr outbound cir 1024 cbs 204800 (1024代表1M的带宽,理论下载速度就是128KB/S,204800=1024*200 ,cbs 代表突发信息速率cir 代表承诺信息速率)这个命令执行后,端口 2 的下载速度就被限制在128KB/S以内,实际测速表明,这个限速数值是该端口数据流量稳定后的速度,它的短暂峰值高出128KB/S 很多,这个应该是交换机从侦测端口流量到启动限速需要一个过程,下载速度稳定后是在128KB/S 上下徘徊,效果还是不错的,比路由器限速和限速软件的效果都要好很多,最关键的交换机稳定。
注:取消限速方法[Quidway-GigabitEthernet0/0/2] undo qos lr outbound4. 配置基于地址池的DHCP服务器A.全局启动DHCP服务。
sys[Quidway] dhcp enableB.配置IP 地址池10的属性(地址池范围,dns 地址,出口网关,地址池租期)[Quidway] ip pool 10Info:It's successful to create an IP address pool.[Quidway-ip-pool-10] network 192.168.10.0 mask 255.255.255.0[Quidway-ip-pool-10] dns-list 202.103.24.68[Quidway-ip-pool-10] gateway-list 192.168.10.1[Quidway-ip-pool-10] lease day 10[Quidway-ip-pool-10] qC.将接口GE0/0/1 加入到VLAN 10[Quidway] vlan 10[Quidway-vlan10] port gigabitethernet 0/0/1 (如果是多个连续端口,用XX to XX )[Quidway-Vlan10] quitD. 配置VLANIF10 接口下的客户端从全局地址池中获取IP 地址[Quidway]int vlan 10[Quidway-vlanif10] ip add 192.168.10.1 24[Quidway-vlanif10] dhcp select global[Quidway-vlanif10] q这时,可以用“ dis ip pool ”命令查看IP 地址池配置情况最后可以在电脑上验证是否成功5. telnet 远程登录设置system-view[Quidway] aaa (进入aaa 视图)[Quidway-aaa] local-user tcwq password cipher tcwq (cipher 是暗号的意思,password cipher就是指密码显示出来的是乱码,在用dis cur 命令时,看到的密码是乱码)[Quidway-aaa] local-user tcwq password simple tcwq (simple 是简单的意思,passwor simple :弱口令,可以理解为明文,和cipher是相对的,在用discur 命令时,看到的密码是明文)[Quidway-aaa] local-user tcwq service-type telnet(设置用户tcwq 的登录方式为telnet )[Quidway-aaa] local-user tcwq privilege level 3 (privilege level :权限级别, 3 为最高级别,拥有最高权限)[Quidway-aaa] q[Quidway]user-interface vty0 4( vty :虚拟终端, 0 4 代表有 0 到 4 一共最多 5 个终端可以同时登录到交换机)[Quidway-vty0-4]authentication-mode aaa ( authentication :认证,验证。
验证模式设置为 aaa 模式)[Quidway -ui-vty0-4]q设置完毕,这时可以在 cmd 里 telnet 网关,即可登录到交换机。
下面是 S5324和 S5700成功配置 telnet 后的截图注意:当提示验证失败时,将网卡禁用再启用可以解决问题6. 配置 FTP 服务器建立一个 FTP 服务器,用户名为 tcwq ,密码为 tcwqsys [Quidway] ftp server enable [Quidway] aaa[Quidway-aaa] q命令行里输入 FTP 192.168.1.1 即可进入 FTP 的验证界面,登录到 ftp 后,可以从交换机的 Flash 里下载文件到电脑里 (下载的文件所在位置是登录到 ftp 服务器前的盘符,如上图中是从 F 盘根目录登录到 FTP 的,那么文件都会被下载到 F 盘的根目录里) ,也可以从电脑里选择文件上传到交换机的 Flash 里(速度很快,比串口烧录快多了) ,还可以删除 flash 里文件开启 FTP 服务)[Quidway-aaa] local-user tcwqpassword simple tcwq[Quidway-aaa] local-user tcwq service-type ftp [Quidway-aaa] local-user tcwqftp-directoryflash:/ 配置 FTP 用户的访问路径,如果不配置这一项,登录时会提示“ 530 logged incorrect ”)这时用网线把电脑网卡和交换机的某个端口相连,电脑 IP 设置为和该端口所在 Vlan 的网关同一网段的地址(如 IP :192.168.1.128 ,网关: 192.168.1.1 ),在输入账号 tcwq ,密码 tcwq ,即可登录校园网中 NAT 的综合应用介绍了 NAT 特性在校园网中的应用,包括域间 NAT ,域内 NAT ,内部服务器等。
组网需求如图 1 所示,一个校园网通过 SRG 连接到 Internet 。
校园内部网络分为三个区域:教学区、宿舍区和图书馆区 业务需求如下:ftp>dir( 查看文件 )ftp>get vrpcfg.zip ftp>put f:\S5700\web.zip ftp>delete web.zip7.WEB 网页管理( 下载文件名为“ vrpcfg.zip ”的文件 )(将电脑 F 盘里名字为 S5700的文件夹里的 web.zip 文件上传的交换机的 Flash 里)( 删除文件名为“ web.zip ”的文件 )三层交换机可以进行网页管理, 前提是 HTTP 服务要开启,且交换机 Flash 里有 web 管理文件并被成功加载。