H3C S5500-SI 02-组播VLAN命令
- 格式:pdf
- 大小:88.19 KB
- 文档页数:5
h3c交换机vlan配置命令
在交换机技术中,VLAN的配置是一个重要环节。
以下小编将介绍h3c交换机vlan配置命令,不会的小主们赶紧上车!
h3c交换机vlan配置命令
工具/原料
H3C交换机
方法/步骤
首先电脑上远程telnet交换机,在命令行下输入"telnet 192.168.10.1",这里192.168.10.1是H3C交换机的远程管理地址,如图所示:
连接后,输入用户名和密码,进入到““,即用户视图模式,如图所示:
输入“sys",进入系统视图模式,如图所示:
在系统视图模式下,建立VLAN,输入”vlan 220“,并回车,如图所示:
输入”quit ",返回到系统视图模式,然后输入“interface vlan-interface 220",进入VLAN接口,并配置VLAN接口的IP地址,输入”ip address 192.168.220.1 255.255.255.0",如图所示:。
H3C华三交换机基本配置命令大全,别到用的时候找不到了!本期我们一起来学习一下H3C最详细的基础命令。
一、不知道密码,如何恢复出厂设置1、开机启动,Ctrl+B进入bootrom菜单,选择恢复出厂设置。
2、用com线连上电脑,用超级终端进入,然后重启电脑,看提示按ctrl+b 进入bootrom模式,然后按照菜单提示删除flash中的.cfg文件,然后重启就可以了。
二、将Trunk端口添加到vlan中Trunk端口可以允许多个VLAN通过,也就是可以加入多个VLAN,所以Trunk 端口的VLAN加入不可能是一个一个地加,而是采取批量添加的方式进行。
但只能在以太网端口视图下进行配置,配置步骤如表7-11所示。
【示例1】使用port trunk permit vlan命令将中继端口Ethernet2/0/1加入到2、6、10、50~100 VLAN中。
1. <H3C> system-view2. System View: return to User View with Ctrl+Z.3. [H3C] interface Ethernet2/0/14. [H3C-Ethernet2/0/1] port trunk permit vlan 2 6 10 50 to 100【示例2】使用undo port trunk permit vlan命令将中继端口Ethernet2/0/1从VLAN 1中删除。
三、H3C交换机基础配置说明1、以太网端口的链路类型Access link:只能允许某一个vlan的untagged数据流通过。
Trunk link:允许多个vlan的tagged数据流和某一个vlan的untagged数据流通过。
Hybrid link:允许多个vlan的tagged数据流和多个vlan的untagged数据流通过。
hybrid link端口可以允许多个vlan的报文发送时不携带标签,而Trunk端口只允许缺省vlan的报文发送时不携带标签。
H3C路由器配置命令H3C路由器是一种高性能的企业级路由器,它提供了丰富的配置命令,方便管理员对网络进行管理和优化。
本文将介绍如何使用H3C路由器的配置命令进行基本的网络配置。
登录路由器在配置H3C路由器之前,我们首先需要通过以下步骤登录路由器:1.首先,打开SSH客户端,如PuTTY。
2.输入路由器的IP地址和端口号。
3.输入用户名和密码,进行身份验证。
4.成功登录后,我们将进入路由器的命令行界面。
基本配置命令配置主机名在H3C路由器上配置主机名可以方便我们标识和管理设备。
使用以下命令可以配置主机名:[Router]system-view[Router]interface vlan-interface 1[Router-Vlan-interface1]description Management VL AN[Router-Vlan-interface1]ip address 192.168.0.1 25 5.255.255.0[Router-Vlan-interface1]quit[Router]quit配置路由配置路由是H3C路由器的核心功能之一。
使用以下命令可以配置静态路由:[Router]system-view[Router]interface gigabitethernet 0/0/1[Router-GigabitEthernet0/0/1]ip address 192.168.1.1 255.255.255.0[Router-GigabitEthernet0/0/1]quit[Router]ip route-static 0.0.0.0 0.0.0.0 192.168.1. 254配置接口H3C路由器支持多种接口类型,如以太网接口、VLAN接口等。
以下是配置以太网接口的示例命令:[Router]system-view[Router]interface gigabitethernet 0/0/1[Router-GigabitEthernet0/0/1]port link-type acces s[Router-GigabitEthernet0/0/1]port default vlan 10 [Router-GigabitEthernet0/0/1]quit配置ACL配置访问控制列表(Access Control List,ACL)可以限制网络流量。
H3C S5500基本配置思路及实用命令1.总体配置思路:1)添加VLAN1,并将相应端口添加到该VLAN。
(在VLAN状态下才可一次将多个端口加入相应VLAN,interfacee1/0/1toe1/0/24)2)添加VLAN2,并将其置为管理VLAN(在#状态下management-vlan 2),才可设置其VLAN的IP地址。
3)添加静态路由。
4)配置端口TRUNK模式。
5)配置远程登录VTY认证。
6)配置本地用户。
2.进入特权模式System View<H3C> System ViewSystem View:return to User View with Ctrl+Z.[H3C]dis[H3C]display cur3.配置交换机主机名sysnamesysname H3C4.添加VLANvlan 1或在此状态下直接将相应端口加入该VLAN (否则只能一个口的添加)Interface e 1/0/1 to e 1/0/245.配置管理VLAN-- management-vlanmanagement-vlan 26.给管理VLAN添加IP地址interface Vlan-interface1 ip address10."10."40."176255."255."255."07.添加端口到VLAN:port access vlan 1port access vlan 18.远程登录配置及3A认证模式user-interface vty 0 4authentication-mode scheme9.配置3A认证本地用户及属性local-user testpassword simple testpwdauthorization-attribute level 3可能的配置local-user testpassword simple test level 310."将端口配置为Trunk口port link-type trunkport trunk permit vlan all 11."添加静态路由ip route-static0."0.0."00."0.0."010."10."40."112."查看路由表display ip routing-table[H3C]display ip routing-tableRouting Tables:PublicDestinations :7 Routes :7Destination/Mask Proto Pre Cost NextHop Interface0.0."0.0/0 Static 60 010."10."40."1 Vlan210."10."40."0/24 Direct 0 010."10."40."180 Vlan210."40."180/32 Direct 0 0 127."0.0."1 InLoop0127."0.0."0/8 Direct 0 0 127."0.0."1 InLoop0127."0.0."1/32 Direct 0 0 127."0.0."1 InLoop019168."76."0/24 Direct 0 0192."168."76."3 Vlan76192."168."76."3/32 Direct 0 0127."0.0."1 InLoop013."显示当前配置display current-configuration[H3C]display current-configuration14."查看端口及VLAN的up/down状态display brief interface[H3C]display brief interfaceThe brief information of interface(s) under route mode:Interface Link Protocol-link Protocol type Main IPNULL0 UP UP(spoofing) NULL --Vlan1 UP UP ETHERNET192."168."76."3Vlan2 UP UP ETHERNET10."10."40."180The brief information of interface(s) under bridge mode:Interface Link Speed Duplex Link-type PVIDGE1/0/1 UP 1G(a) full(a) access 1GE1/0/2 DOWN auto auto access 1GE1/0/3 DOWN auto auto access 1The brief information of interface(s) under bridge mode:Interface Link Speed Duplex Link-type PVIDGE1/0/1 UP 1G(a) full(a) access 1display brief interface Vlan-interface 1[H3C]display brief interface Vlan-interface 1The brief information of interface(s) under route mode:Interface Link Protocol-link Protocol type Main IPVlan1 UP UP ETHERNET192."168."76."315."查看MAC地址缓存表display mac-address[H3C]display mac-address16."查看某一端口的MAC地址缓存表17."查看ARP缓存表display arp[H3C]display arpType:S-Static D-DynamicIP Address MAC Address VLAN ID Interface Aging Type192."168."76."56 0016-eca2-d69d 1 GE1/0/1 20 D192."168."76."131 0016-3642-e888 1 GE1/0/1 19 D192."168."76."171 0024-1d6e-6fbe 1 GE1/0/1 13 D10."10."40."1 0018-742d-4fc0 2 GE1/0/19 14 D192."168."76."1 0018-742d-4fc0 1 GE1/0/19 10 D18."Tftp备份配置1)查看配置文件名及所在文件夹-dir配置文件名可能为startup.cfg或config.cfg配置文件可能在flash:/或unit1>flash:/目录下<jyzx-px-zhongxin>dir flash:/Directory of flash:/0 -rw- Aug 11 2010 16:27:52 s5500tpsi-cmw520-r2202p11."bin1 -rw- 2365 Apr 26 2000 12:13:58startup.cfg(配置文件名)31496 KB total (23460 KB free)<jyzx-bg-3-d>dirDirectory of unit1>flash:/1 -rw- 3146 Jan 01 2004 00:00:00 config.def2 (*) -rw- Mar 25 2011 16:51:52 s31si_e-cmw310-r2211p07."bin3 (*) -rw- 886025 Jan 01 2004 00:00:00 h3c-http3."1.9-0019."web4 (*) -rw- 2834 Apr 03 2000 01:20:33config.cfg(配置文件名)7239 KB total (2739 KB free)(*) -with main attribute (b) -with backup attribute(*b) -with both main and backup attribute<jyzx-bg-4-x>tftp172."16."8.91 put unit1>flash:/config.cfg10."10."40."185."txtFile will be transferred in binary mode.Sending file to remote tftp server. Please wait... |TFTP:2979 bytes sent in 0 second(s).File uploaded successfully.<jyzx-bg-4-x>dirDirectory ofunit1>flash:/1 -rw- 3146 Jan 01 2004 00:00:00 config.def2 (*) -rw- Mar 25 2011 16:51:52 s31si_e-cmw310-r2211p07."bin3 (*) -rw- 886025 Jan 01 2004 00:00:00 h3c-http3."1.9-0019."web4 (*) -rw- 2979 Apr 02 2000 07:17:02config.cfg7239 KB total (2739 KB free)(*) -with main attribute (b) -with backup attribute(*b) -with both main and backup attribute2)配置可以使用tftp的ACLacl number 2000rule permit source172."16."8.91 0[jyzx-px-zhongxin]acl number 2000[jyzx-px-zhongxin-acl-basic-2000]rule permit source172."18.91 ?0 Wildcard bits :0."0.0."0 ( a host )X.X.X.X Wildcard of source[jyzx-px-zhongxin-acl-basic-2000]rule permit source172."16."8.91 03)配置tftp服务器- tftp-server acl 2000tftp-server acl 2000[jyzx-px-zhongxin]tftp-server acl 2000The ACL number does not exist or contains no rule. Continue? [Y/N]:y(如果还没有配置ACL,则会有此提示)[jyzx-px-zhongxin]tftp client source ip172."16."8.914)备份配置文件到tftp软件所在目录下(在用户视图下,即“>”状态下)172."16."8.91 put flash:/startup.cfg (无目标文件名则表示与源文件名同名)tftp172."16."8.91 put flash:/startup.cfg startup.txt(将配置文件保存为txt文件)<jyzx-px-zhongxin>tftp 172."16."8.91 put flash:/startup.cfgFile will be transferred in binary modeSending file to remote TFTP server. Please wait... \TFTP:2365 bytes sent in 0 second(s).File uploaded successfully.<jyzx-px-zhongxin>tftp172."16."8.91 put flash:/startup.cfg10."10."40."177."txtFile will be transferred in binary modeSending file to remote TFTP server. Please wait... \ TFTP:2365 bytes sent in 0 second(s).File uploaded successfully.5)小结过程在特权状态下配置ACL和Tftp-server信息acl number 2000rule permit source172."16."8.91 0quittftp-server acl 2000save在用户视图下备份配置tftp172."16."8.91 put flash:/startup.cfg10."10."40."177."txt19."关闭实时信息-undo info-center enable[jyzx-bg-4-x]undo info-center enable% Information center is disabled20."21."问题1:无法用system-view命令进入特权模式问题2:无法配置VLAN的IP地址原因:因为local-user中用户认证属性设置不对,level 3必须设置。
H3C S5500基本配置思路及实用命令1.总体配置思路:1)添加VLAN1,并将相应端口添加到该VLAN。
(在VLAN状态下才可一次将多个端口加入相应VLAN,interface e 1/0/1 to e 1/0/24)2)添加VLAN2,并将其置为管理VLAN(在#状态下management-vlan 2),才可设置其VLAN的IP地址。
3)添加静态路由。
4)配置端口TRUNK模式。
5)配置远程登录VTY认证。
6)配置本地用户。
2.进入特权模式System View<H3C> System ViewSystem View: return to User View with Ctrl+Z.[H3C]dis[H3C]display cur3.配置交换机主机名sysnamesysname H3C4.添加VLANvlan 1或在此状态下直接将相应端口加入该VLAN (否则只能一个口一个口的添加)Interface e 1/0/1 to e 1/0/245.配置管理VLAN-- management-vlanmanagement-vlan 26.给管理VLAN添加IP地址interface Vlan-interface1ip address 10.10.40.176 255.255.255.07.添加端口到VLAN:port access vlan 1interface GigabitEthernet1/0/2port access vlan 18.远程登录配置及3A认证模式user-interface vty 0 4authentication-mode scheme9.配置3A认证本地用户及属性local-user testpassword simple testpwdauthorization-attribute level 3service-type telnet可能的配置local-user testpassword simple testservice-type telnetlevel 310.将端口配置为Trunk口interface GigabitEthernet1/0/20port link-type trunkport trunk permit vlan all11.添加静态路由ip route-static 0.0.0.0 0.0.0.0 10.10.40.112.查看路由表display ip routing-table[H3C]display ip routing-tableRouting Tables: PublicDestinations : 7 Routes : 7Destination/Mask Proto Pre Cost NextHop Interface0.0.0.0/0 Static 60 0 10.10.40.1 Vlan210.10.40.0/24 Direct 0 0 10.10.40.180Vlan210.10.40.180/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.76.0/24 Direct 0 0 192.168.76.3Vlan76192.168.76.3/32 Direct 0 0 127.0.0.1 InLoop013.显示当前配置display current-configuration[H3C]display current-configuration14.查看端口及VLAN的up/down状态display brief interface[H3C]display brief interfaceThe brief information of interface(s) under route mode:Interface Link Protocol-link Protocol type Main IPNULL0 UP UP(spoofing) NULL --Vlan1 UP UP ETHERNET 192.168.76.3Vlan2 UP UP ETHERNET 10.10.40.180The brief information of interface(s) under bridge mode:Interface Link Speed Duplex Link-typePVIDGE1/0/1 UP 1G(a) full(a) access1GE1/0/2 DOWN auto auto access1GE1/0/3 DOWN auto auto access1GE1/0/9 DOWN auto auto access1GE1/0/10 DOWN auto auto access1display brief interface GigabitEthernet 1/0/1[H3C]display brief interface GigabitEthernet 1/0/1The brief information of interface(s) under bridge mode:Interface Link Speed Duplex Link-typePVIDGE1/0/1 UP 1G(a) full(a) access1display brief interface Vlan-interface 1[H3C]display brief interface Vlan-interface 1The brief information of interface(s) under route mode:Interface Link Protocol-link Protocol type Main IPVlan1 UP UP ETHERNET 192.168.76.315.查看MAC地址缓存表display mac-address[H3C]display mac-addressMAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)0000-e7a7-2374 1 Learned GigabitEthernet1/0/19 AGING0000-e8f1-6952 1 Learned GigabitEthernet1/0/19 AGING0001-6c41-9cee 1 Learned GigabitEthernet1/0/19 AGING000c-2919-0d6c 1 Learned GigabitEthernet1/0/19 AGING000c-2961-d8ea 1 Learned GigabitEthernet1/0/19 AGING16.查看某一端口的MAC地址缓存表display mac-address interface GigabitEthernet 1/0/1[H3C]display mac-address interface GigabitEthernet 1/0/1MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)0016-3642-e888 1 Learned GigabitEthernet1/0/1 AGING0016-eca2-d69d 1 Learned GigabitEthernet1/0/1AGING001c-25d8-77b6 1 Learned GigabitEthernet1/0/1 AGING0024-1d6e-6fbe 1 Learned GigabitEthernet1/0/1 AGING17.查看ARP缓存表display arp[H3C]display arpType: S-Static D-DynamicIP Address MAC Address VLAN ID Interface Aging Type192.168.76.56 0016-eca2-d69d 1 GE1/0/1 20D192.168.76.131 0016-3642-e888 1 GE1/0/1 19D192.168.76.171 0024-1d6e-6fbe 1 GE1/0/1 13D10.10.40.1 0018-742d-4fc0 2 GE1/0/19 14D192.168.76.1 0018-742d-4fc0 1 GE1/0/19 10D18.Tftp备份配置1)查看配置文件名及所在文件夹-dir配置文件名可能为startup.cfg或config.cfg配置文件可能在flash:/或unit1>flash:/目录下<jyzx-px-zhongxin>dir flash:/Directory of flash:/0 -rw- 8221183 Aug 11 2010 16:27:52s5500tpsi-cmw520-r2202p11.bin1 -rw- 2365 Apr 26 2000 12:13:58 startup.cfg(配置文件名)31496 KB total (23460 KB free)<jyzx-bg-3-d>dirDirectory of unit1>flash:/1 -rw- 3146 Jan 01 2004 00:00:00 config.def2 (*) -rw- 3711222 Mar 25 2011 16:51:52s31si_e-cmw310-r2211p07.bin3 (*) -rw- 886025 Jan 01 2004 00:00:00h3c-http3.1.9-0019.web4 (*) -rw- 2834 Apr 03 2000 01:20:33 config.cfg(配置文件名)7239 KB total (2739 KB free)(*) -with main attribute (b) -with backup attribute(*b) -with both main and backup attribute<jyzx-bg-4-x>tftp 172.16.8.91 put unit1>flash:/config.cfg 10.10.40.185.txtFile will be transferred in binary mode.Sending file to remote tftp server. Please wait... |TFTP: 2979 bytes sent in 0 second(s).File uploaded successfully.<jyzx-bg-4-x>dirDirectory of unit1>flash:/1 -rw- 3146 Jan 01 2004 00:00:00 config.def2 (*) -rw- 3711222 Mar 25 2011 16:51:52 s31si_e-cmw310-r2211p07.bin3 (*) -rw- 886025 Jan 01 2004 00:00:00 h3c-http3.1.9-0019.web4 (*) -rw- 2979 Apr 02 2000 07:17:02 config.cfg7239 KB total (2739 KB free)(*) -with main attribute (b) -with backup attribute(*b) -with both main and backup attribute2)配置可以使用tftp的ACLacl number 2000rule permit source 172.16.8.91 0[jyzx-px-zhongxin]acl number 2000[jyzx-px-zhongxin-acl-basic-2000]rule permit source 172.16.8.91 ?0 Wildcard bits : 0.0.0.0 ( a host )X.X.X.X Wildcard of source[jyzx-px-zhongxin-acl-basic-2000]rule permit source 172.16.8.91 03)配置tftp服务器- tftp-server acl 2000tftp-server acl 2000[jyzx-px-zhongxin]tftp-server acl 2000The ACL number does not exist or contains no rule. Continue? [Y/N]:y(如果还没有配置ACL,则会有此提示)[jyzx-px-zhongxin]tftp client source ip 172.16.8.914)备份配置文件到tftp软件所在目录下(在用户视图下,即“>”状态下)tftp 172.16.8.91 put flash:/startup.cfg (无目标文件名则表示与源文件名同名)tftp 172.16.8.91 put flash:/startup.cfg startup.txt(将配置文件保存为txt文件)<jyzx-px-zhongxin>tftp 172.16.8.91 put flash:/startup.cfgFile will be transferred in binary modeSending file to remote TFTP server. Please wait... \TFTP: 2365 bytes sent in 0 second(s).File uploaded successfully.<jyzx-px-zhongxin>tftp 172.16.8.91 put flash:/startup.cfg 10.10.40.177.txtFile will be transferred in binary modeSending file to remote TFTP server. Please wait... \TFTP: 2365 bytes sent in 0 second(s).File uploaded successfully.5)小结过程在特权状态下配置ACL和Tftp-server信息acl number 2000rule permit source 172.16.8.91 0quittftp-server acl 2000save在用户视图下备份配置tftp 172.16.8.91 put flash:/startup.cfg 10.10.40.177.txt19.关闭实时信息- undo info-center enable[jyzx-bg-4-x]undo info-center enable% Information center is disabled20.问题1:无法用system-view命令进入特权模式原因:因为local-user中用户认证属性设置不对,level 3必须设置。
1:配制系统名Sysname + 名字2:进入接口interface GigabitEthernet1/0/23:配置接口IP地址作用:给接口一个网络上唯一的区分符Interface vlan 1Ip address 168.10.2.1 255.255.255.04:查看交换机信息显示版本------display version显示当前配置信息---------display current显示NVRAM的配置-------display saved-config显示接口信息---------display interface显示路由信息-------display ip routing-table显示启动引导文件------display boot-loader显示系统时间-------------------display clock修改系统时间-------------------clock datetime 10:20:25 月/日/年查看设备版本及运行时间-------------------display version查看vlan接口相关信息----------------------------display ip interface vlan-interface 20 5:VLAN配制创建VLAN---------vlan 10(1-4094)删除VLAN--------undo vlan 10(1-4094)在VLAN中增加端口------port Ethernet 1/0/1在VLAN中删除端口--------undo port Ethernet 1/0/1将端口加入VLAN----------port access vlan 10(1-4094)将端口脱离VLAN-----------undo port access vlan 10(1-4094)显示VLAN信息---------------display vlan 10(1-4094)6:Tunk配制定义端口属性为Trunk--------port link-type trunk删除端口Trunk属性-----------undo port link-type定义端口可以传输的VLAN--------port trunk permit vlan 10在VLAN中删除端口---------------undo port trunk permit vlan 107:Link Aggregation作用:将几条物理链路聚合在一起,当作一条逻辑链路来使用,分为静态聚合和动态聚合。