华为S3000系列命令手册之03VLAN命令.docx
《华为S3000系列命令手册之03VLAN命令.docx》由会员分享,可在线阅读,更多相关《华为S3000系列命令手册之03VLAN命令.docx(36页珍藏版)》请在冰点文库上搜索。
![华为S3000系列命令手册之03VLAN命令.docx](https://file1.bingdoc.com/fileroot1/2023-8/20/402e4ab1-8257-4362-b930-62f35d2acdce/402e4ab1-8257-4362-b930-62f35d2acdce1.gif)
华为S3000系列命令手册之03VLAN命令
Tags:
华为s3000系列命令vlan命令
QuidwayS3000-EI系列以太网交换机命令手册
VLAN目录
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第1章VLAN配置命令
第1章VLAN配置命令
1.1VLAN配置命令
1.1.1description
命令
descriptionstring
undodescription
视图
VLAN视图
参数
string当前VLAN的描述字符串字符串长度范围为132字符VLAN缺省描述
字符串为该VLAN的VLANID例如VLAN0001
描述
description命令用来为当前VLAN一个描述undodescription命令用来恢复指
定VLAN的描述字符串为缺省描述
相关配置可参考命令displayvlan
举例
#为当前的VLAN指定一个描述字符串RESEARCH
[Quidway-vlan1]descriptionRESEARCH
1.1.2displayvlan
命令
displayvlan[vlan_id|all|static|dynamic]
视图
所有视图
参数
vlan_id显示指定VLAN的相关信息
all显示所有VLAN的相关信息
1-1
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第1章VLAN配置命令
static显示系统静态创建的VLAN
dynamic显示系统动态创建的VLAN
描述
displayvlan命令用来显示VLAN的相关信息
如果指定vlan_id或all则显示指定或所有VLAN的相关信息包括VLANID
VLAN类型动态还是静态VLAN是否启动了路由功能如果启动则显示IP
地址及掩码VLAN的描述信息VLAN包含的端口等
如果不指定参数则显示系统已创建的所有VLAN列表如果选用static或dynamic
参数则显示系统静态或动态创建的VLAN列表
相关配置可参考命令vlan
举例
#显示VLAN2的信息
displayvlan2
VLANID:
3
VLANType:
static
RouteInterface:
notconfigured
Description:
VLAN0003
Name:
VLAN0003
TaggedPorts:
none
UntaggedPorts:
Ethernet0/12Ethernet0/13
表1-1VLAN2端口显示信息描述表
域名解释
VLANIDVLAN标识号
VLANTypeVLAN的配置类型静态配置或动态配置
RouteinterfaceVLAN是否具有路由功能
DescriptionVLAN的描述
NameVLAN的名称
TaggedPorts标识该VLAN报文在哪些端口上需要打Tag标记
UntaggedPorts标识该VLAN报文在哪些端口上不需要打Tag标记
1.1.3name
命令
1-2
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第
1章VLAN配置命令
namestring
undoname
视图
VLAN视图
参数
string表示当前
VLAN名称的字符串长度为
132字符缺省值为该
VLAN的
VLANID
描述
name命令用来为当前的
VLAN命名
undoname命令用来恢复当前
VLAN名称的
缺省值
缺省情况下当前
VLAN的名称为该
VLAN的
VLANID
举例
#将当前的
VLAN2命名为
hello
[Quidway-vlan2]namehello
1.1.4port
命令
portinterface_list
undoportinterface_list
视图
VLAN视图
参数
interface_list需要添加到某个
VLAN中或从某个
VLAN中删除的以太网端口列表
表示方式为
interface_list{{interface_typeinterface_num|interface_name}[to
{interface_typeinterface_num|interface_name
和取值范围请参见本书
}]}&<1-10>其中
interface_type
为端口类型
interface_num为端口号
interface_name为端口名它们各自的含义
端口配置部分的命令参数此处不再赘述关键字
to之
后的端口号要大于或等于
to之前的端口号命令中
&<1-10>表示前面的参数最多可
以重复输入
10次
需要注意的是
Trunk和
Hybrid端口只能通过以太网端口视图下的
port和
undo
port命令加入
VLAN或从
VLAN中删除而不能通过本命令实现
描述
1-3
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第1章VLAN配置命令
port命令用于向VLAN中添加一个或一组端口undoport命令用来从VLAN中删
除一个或一组端口
相关配置可参考命令displayvlan
举例
#向VLAN2中加入从Ethernet0/4到Ethernet0/7Ethernet0/9从Ethernet0/11
到Ethernet0/15的以太网端口命令的参数重复次数是3次
[Quidway-vlan2]portethernet0/4toethernet0/7ethernet0/9ethernet0/11to
ethernet0/15
1.1.5vlan
命令
vlanvlan_id
undovlan{vlan_id[tovlan_id]|all}
视图
系统视图
参数
vlan_id指定要进入的或要创建并进入的VLAN的VLANID其取值范围为1
4094
all删除所有VLAN
描述
vlan命令用来进入VLAN视图如果指定的VLAN不存在则该命令先完成VLAN
的创建然后再进入该VLAN的视图undovlan命令用来删除VLAN
需要注意的是VLAN1为缺省VLAN无法删除
相关配置可参考命令displayvlan
举例
#进入VLAN1的视图
[Quidway]vlan1
[Quidway-vlan1]
1.1.6vlan{enable|disable}
命令
vlan{enable|disable}
1-4
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第1章VLAN配置命令
视图
系统视图
参数
enable开启设备VLAN特性
disable关闭设备VLAN特性
描述
vlanenable命令用来开启设备VLAN特性vlandisable命令用来关闭设备VLAN
特性
相关配置可参考命令displayvlan
举例
#开启设备VLAN特性
[Quidway]vlanenable
1-5
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第2章isolate-user-vlan配置命令
第2章isolate-user-vlan配置命令
2.1isolate-user-vlan配置命令
2.1.1displayisolate-user-vlan
命令
displayisolate-user-vlan[isolate-user-vlan_num]
视图
所有视图
参数
isolate-user-vlan_num已经配置的isolate-user-vlan的VLANID取值范围为1
4094
描述
displayisolate-user-vlan命令用来显示isolate-user-vlan和SecondaryVLAN的
映射关系以及标识isolate-user-vlan和SecondaryVLAN映射关系的端口
相关配置可参考命令isolate-user-vlanenable和isolate-user-vlan
举例
#显示isolate-user-vlan和SecondaryVLAN的映射关系
[Quidway]displayisolate-user-vlan
Isolate-user-VLANVlanID:
3
SecondaryVlanID:
4-5
VlanID:
3
VlanType:
static
Isolate-user-VLANtype:
isolate-user-VLAN
RouteInterface:
notconfigured
Description:
VLAN0003
TaggedPorts:
none
UntaggedPorts:
Ethernet0/4Ethernet0/8Ethernet0/18
VlanID:
4
VlanType:
static
2-1
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第
2章
isolate-user-vlan配置命令
Private-vlanType:
Secondary
RouteInterface:
notconfigured
Description:
VLAN0004
TaggedPorts:
none
UntaggedPorts:
Ethernet0/4Ethernet0/8
VlanID:
5
VlanType:
static
Private-vlanType:
Secondary
RouteInterface:
notconfigured
Description:
VLAN0004
TaggedPorts:
none
UntaggedPorts:
Ethernet0/4Ethernet0/18
2.1.2isolate-user-vlan
命令
isolate-user-vlanisolate-user-vlan_numsecondarysecondary_vlan_numlist[to
secondary_vlan_numlist]
undoisolate-user-vlanisolate-user-vlan_num
secondary_vlan_numlist[tosecondary_vlan_numlist]
[secondary
视图
系统视图
参数
isolate-user-vlan_numisolate-user-vlan的
VLANID取值范围为
14094
secondary_vlan_numlistSecondaryVLAN的
VLANID取值范围为
14094
描述
isolate-user-vlan命令用来将
isolate-user-vlan和
SecondaryVLAN对应起来建
立
isolate-user-vlan和
SecondaryVLAN间的映射关系
undoisolate-user-vlan
用于取消
isolate-user-vlan和
SecondaryVLAN间的映射关系
缺省情况下用户创建的
isolate-user-vlan和
SecondaryVLAN是没有任何对应关
系的
执行
isolate-user-vlan命令前
isolate-user-vlan和
SecondaryVLAN中必须已经
包含了端口执行该命令后将完成
isolate-user-vlan和
SecondaryVLAN之间的
2-2
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第2章isolate-user-vlan配置命令
映射关系
具体操作包括
将isolate-user-vlan中的端口加入到每个Secondary
VLAN中同时把所有SecondaryVLAN中的端口加入到isolate-user-vlan中
执行undoisolate-user-vlan命令会取消isolate-user-vlan和SecondaryVLAN
之间的映射关系具体操作包括将isolate-user-vlan中包含的端口从Secondary
VLAN中删除将SecondaryVLAN中包含的端口从isolate-user-vlan中删除
相关配置可参考命令displayisolate-user-vlan
举例
#将isolate-user-vlan10和Secondaryvlan23459对应起来
[Quidway]isolate-user-vlan10secondary2to59
2.1.3isolate-user-vlanenable
命令
isolate-user-vlanenable
undoisolate-user-vlanenable
视图
VLAN视图
参数
无
描述
isolate-user-vlanenable命令用来设置一个VLAN的类型为isolate-user-vlan
undoisolate-user-vlanenable命令用于取消一个VLAN为isolate-user-vlan类型
的设置
缺省情况下用户创建的VLAN是不带类型的VLAN
isolate-user-vlan可以包含多个端口
包括与其它交换机相连的上行端口
但是
isolate-user-vlan不能和Trunk端口同时配置
即如果以太网交换机上配置了
isolate-user-vlan就不能配置Trunk端口如果配置了Trunk端口就不能配置
isolate-user-vlan
相关配置可参考命令displayisolate-user-vlan
举例
#将VLAN5配置为isolate-user-vlan
[Quidway-vlan5]isolate-user-vlanenable
2-3
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第2章isolate-user-vlan配置命令
2.1.4isolate-user-vlanigspenable
命令
isolate-user-vlanigspenable
undoisolate-user-vlanigspenable
视图
VLAN视图
参数
igsp使系统支持IGSPIGMPSnoopingProtocal协议
描述
isolate-user-vlanigspenable命令用来设置系统向路由接口发送IGMP报文时携
带SecondaryVLAN的IDundoisolate-user-vlanigsp命令用于恢复系统发送
IGMP报文时的缺省VLANID
缺省情况下系统向路由接口发送的IGMP报文携带isolate-user-vlan的ID
举例
#设置VLAN5中系统发送IGMP报文时携带SecondaryVLAN的ID
[Quidway-vlan5]isolate-user-vlanigspenable
2-4
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第3章GARP/GVRP配置命令
第3章GARP/GVRP配置命令
3.1GARP配置命令
3.1.1displaygarpstatistics
命令
displaygarpstatistics[interfaceinterface_list]
视图
所有视图
参数
interface_list需要显示的以太网端口列表表示方式为interface_list
{{interface_typeinterface_num|interface_name}[to{interface_type
interface_num|interface_name}]}&<1-10>其中interface_type为端口类型
interface_num为端口号interface_name为端口名它们各自的含义和取值范围请
参见本书端口配置部分的命令参数此处不再赘述
命令中&<1-10>表示参数可重复次数最小为1最大为10
描述
displaygarpstatistics命令可以显示GARP的统计信息如GVRP/GMRP接收/
发送的报文数和丢弃的报文数
举例
#显示以太网端口Ethernet0/1上GARP的统计信息
displaygarpstatisticsinterfaceethernet0/1
GARPstatisticsonportEthernet0/1
NumberOfGMRPFramesReceived:
0
NumberOfGVRPFramesReceived:
0
NumberOfGMRPFramesTransmitted:
0
NumberOfGVRPFramesTransmitted:
0
NumberOfFramesDiscarded:
0
以上信息表示Ethernet0/1端口GVRP/GMRP接收/发送的报文数及丢弃的报文数
均为0
3-1
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第3章GARP/GVRP配置命令
3.1.2displaygarptimer
命令
displaygarptimer[interfaceinterface_list]
视图
所有视图
参数
interface_list
需要显示的以太网端口列表
表示方式为interface_list
{{interface_typeinterface_num|interface_name}[to{interface_type
interface_num|interface_name}]}&<1-10>其中interface_type为端口类型
interface_num为端口号interface_name为端口名它们各自的含义和取值范围请
参见本书端口配置部分的命令参数此处不再赘述
命令中&<1-10>表示参数可重复次数最小为1最大为10
描述
displaygarptimer命令可以显示GARP定时器的值包括Hold定时器Join定
时器Leave定时器及LeaveAll定时器
相关配置可参考命令garptimergarptimerleaveall
举例
#显示以太网端口Ethernet0/1的GARP定时器的值
displaygarptimerinterfaceethernet0/1
GARPtimersonportEthernet0/1
GARPJoinTime:
20centiseconds
GARPLeaveTime:
60centiseconds
GARPLeaveAllTime:
1000centiseconds
GARPHoldTime:
10centiseconds
以上信息表示Ethernet0/1端口GARP定时器的值分别为Join定时器为20厘秒
Leave定时器为60厘秒LeaveAll定时器为1000厘秒Hold定时器为10厘秒
3.1.3garptimer
命令
garptimer{hold|join|leave}timer_value
undogarptimer{hold|join|leave}
视图
以太网端口视图
3-2
QuidwayS3000-EI系列以太网交换机命令手册
VLAN第3章GARP/GVRP配置命令
参数
holdGARP的Hold定时器当GARP应用实体接收到某注册信息时不立即对
外发送Join消息而是启动Hold定时器当该定时器超时后再对外发送Join消
息以便在Hold定时器时间内收到的所有注册信息可以放在同一帧中发送从而节
省带宽资源
joinGARP的Join定时器GARP应用实体在Join定时器超时后将对外发送Join
消息以使其他GARP应用实体注册自己的信息
leaveGARP的Leave定时器当一个GARP应用实体希望注销某属性信息时
将对外发送Leave消息接收到该消息的GARP应用实体启动Leave定时器如
果在该定时器超时之前没有再次收到Join消息则注销该属性信息
timer_valueGARP的Hold定时器Join定时器Leave定时器的值单位为厘
秒步长为5取值范围遵循如下的规定Join定时器的值应大于等于2倍Hold定
时器的值Leave定时器的值应大于2倍Join定时器的值并小于LeaveAll定时器的
值且Hold定时器的最小值为10厘秒缺省情况下Hold定时器为10厘秒Join
定时器为20厘秒Leave定时器为60厘秒
garptimer命令用来设置端口GARP定时器包括Hold定时器Join定时器Leave
定时器的值undogarptimer命令用来恢复端口GARP定时器的缺省值
相关配置可参考命令displaygarptimer
描述
举例
#设置GARP的Join定时器为300ms
[Quidway-Ethernet0/1]garptimerjoin30
3.1.4garptimerleaveall
命令