1.1 VLAN
Configuration Commands
Syntax
description text
undo description
View
VLAN view, VLAN interface view
Parameters
text: Case
sensitive character string to describe the current VLAN or VLAN interface.
Special characters and spaces are allowed.
It has:
l
1 to 32 characters for a VLAN description.
l
1 to 80 characters for a VLAN interface
description.
Description
Use the description command to
configure the description of the current VLAN or VLAN interface. You can use
the description to provide information helping identify the devices or network
segment attached to the VLAN or VLAN interface, and so on.
Use the undo description command to restore
the default.
By default, the description of a VLAN is
its VLAN ID, for example VLAN 0001; the description of a VLAN interface
is its name, for example Vlan-interface 1 Interface.
You can display the description of a VLAN
or VLAN interface with the display vlan or display interface
Vlan-interface command.
Examples
# Configure the description of VLAN 10 as connect
to LAB1.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] vlan 10
[Sysname-vlan10] description connect
to LAB1
# Configure the description of VLAN-interface
10 as gateway of LAB1.
[Sysname-vlan10] quit
[Sysname] interface
Vlan-interface 10
[Sysname-Vlan-interface10]
description gateway of LAB1
1.1.2 display interface
Vlan-interface
Syntax
display interface
Vlan-interface [ vlan-id ]
View
Any view
Parameters
vlan-id:
Specifies a VLAN interface number.
Description
Use the display interface
Vlan-interface command to display information about the specified VLAN
interface or all VLAN interfaces already created if no VLAN interface is
specified.
The output of this command shows the state,
IP address, description and other information of a VLAN interface. You can use
the information to troubleshoot network problems.
Related commands: interface
Vlan-interface.
Examples
# Display information about all existing
VLAN interfaces.
<Sysname> display interface
Vlan-interface
Vlan-interface1 current state :UP
Line protocol current state :UP
IP Sending Frames' Format is
PKTFMT_ETHNT_2, Hardware address is 00e0-fc14-000b
Internet Address is 192.168.0.31/24
Primary
Description : Vlan-interface1
Interface
The Maximum Transmit Unit is 1500
Vlan-interface20 current state :DOWN
Line protocol current state :DOWN
IP Sending Frames' Format is
PKTFMT_ETHNT_2, Hardware address is 00e0-fc14-000b
Internet Address is 1.1.1.1/24
Primary
Internet Address is 1.1.2.1/24 Sub
Description : Vlan-interface20
Interface
The Maximum Transmit Unit is 1500
# Display information about VLAN-interface 2.
<Sysname> display interface
Vlan-interface 2
Vlan-interface2 current state :
DOWN
Line protocol current state :
DOWN
IP Sending Frames' Format is
PKTFMT_ETHNT_2, Hardware address is 000f-e207-4101
Internet Address is 10.1.1.1/24
Primary
Description : Vlan-interface2
Interface
The Maximum Transmit Unit is 1500
Table 1-1
Description on the fields of the display
interface Vlan-interface command
|
Field
|
Description
|
|
Vlan-interface2 current state
|
The state of the VLAN interface,
which can be one of the following:
l
Administratively DOWN: This VLAN interface has
been manually disabled with the shutdown command.
l
DOWN: The administrative state of this VLAN
interface is up, but its physical state is down. It indicates that the VLAN
corresponding to this interface does not contain ports in up state (possibly
because the lines have failed).
l
UP: The administrative and physical states of
this VLAN interface are both up.
|
|
Line protocol current state
|
The link layer protocol state of the
VLAN interface, which can be one of the following:
l
DOWN: The protocol state of this VLAN
interface is down, usually because no IP address is configured.
l
UP: The protocol state of this VLAN interface
is up.
|
|
IP Sending Frames' Format is
PKTFMT_ETHNT_2
|
Format of the frames sent from the
VLAN interface. PKTFMT_ETHNT 2 indicates that this VLAN interface sends Ethernet
II frames. Refer to the VLAN configuration part in the accompanied operation
manual for information about frame formats.
|
|
Hardware address
|
MAC address corresponding to the VLAN
interface
|
|
Internet Address
|
IP address corresponding to the VLAN
interface
|
|
10.1.1.1/24 Primary
|
Primary IP address of this VLAN
interface
|
|
1.1.2.1/24 Sub
|
Secondary IP address of this VLAN
interface
|
|
Description
|
Description
string of the VLAN interface
|
|
The
Maximum Transmit Unit
|
Maximum
transmission unit (MTU)
|
For information
about how to configure an IP address for a VLAN interface, refer to the description
on the ip address command in the IP Address and Performance Command
part.
Syntax
display vlan
[ vlan-id1 [ to vlan-id2 ] | all | dynamic |
static ]
View
Any view
Parameters
vlan-id1: Specifies
the ID of a VLAN of which information is to be displayed, in the range of 1 to
4094.
to vlan-id2: In conjunction with vlan-id1, define a VLAN range to
display information about all existing VLANs in the range. The vlan-id2
argument takes a value in the range of 1 to 4094, and must not be less than
that of vlan-id1.
all: Displays
information about all the VLANs.
dynamic:
Displays the number of dynamic VLANs and the ID of each dynamic VLAN. Dynamic
VLANs refer to VLANs that are generated through GVRP or those distributed by a RADIUS
server.
static:
Displays the number of static VLANs and the ID of each static VLAN. Static
VLANs refer to VLANs manually created.
Description
Use the display vlan command to display
information about VLANs. The output shows the ID, type, VLAN interface state
and member ports of a VLAN.
If no keyword or argument is specified, the
command displays the number of existing VLANs in the system and the ID of each
VLAN.
Related commands: vlan.
Examples
# Display information about VLAN 1.
<Sysname>
display vlan 1
VLAN ID: 1
VLAN Type: static
Route Interface: configured
IP Address: 192.168.0.39
Subnet Mask: 255.255.255.0
Description: VLAN 0001
Name: VLAN 0001
Tagged Ports: none
Untagged Ports:
GigabitEthernet1/0/1
GigabitEthernet1/0/2 GigabitEthernet1/0/3
GigabitEthernet1/0/4 GigabitEthernet1/0/5
GigabitEthernet1/0/6
GigabitEthernet1/0/7
GigabitEthernet1/0/8 GigabitEthernet1/0/9
GigabitEthernet1/0/10
GigabitEthernet1/0/11 GigabitEthernet1/0/12
GigabitEthernet1/0/13 GigabitEthernet1/0/14
GigabitEthernet1/0/15
GigabitEthernet1/0/16
GigabitEthernet1/0/17 GigabitEthernet1/0/18
GigabitEthernet1/0/19
GigabitEthernet1/0/20 GigabitEthernet1/0/21
GigabitEthernet1/0/22
GigabitEthernet1/0/23 GigabitEthernet1/0/24
Table 1-2
Description on the fields of the display vlan
command
|
Field
|
Description
|
|
VLAN ID
|
VLAN ID.
|
|
VLAN Type
|
VLAN type (dynamic or static).
|
|
Route Interface
|
Indicates whether the VLAN interface of
the VLAN is configured with an IP address for routing.
|
|
IP Address
|
Primary IP address of the VLAN
interface (available only on a VLAN interface configured with an IP address).
You can use the display interface Vlan-interface command in any view or
the display this command in VLAN interface view to display its
secondary IP address(es), if any.
|
|
Subnet Mask
|
Subnet mask of the IP address of the
VLAN interface.
|
|
Description
|
Description of the VLAN.
|
|
Name
|
VLAN name.
|
|
Tagged Ports
|
Ports out of which packets are sent
tagged.
|
|
Untagged Ports
|
Ports out of which packets are sent
untagged.
|
Syntax
interface Vlan-interface vlan-id
undo interface Vlan-interface vlan-id
View
System view
Parameters
vlan-id: Specifies
the ID of a VLAN interface, in the range of 1 to 4094.
Description
Use the interface Vlan-interface command
to create the VLAN interface for a VLAN and enter VLAN interface view.
Use the undo interface Vlan-interface
command to delete a VLAN interface.
You can create a VLAN interface only for an
existing VLAN and must ensure that the ID of the VLAN interface is the same as
the VLAN ID.
You can use the ip address command
in VLAN interface view (refer to the IP Address and Performance Command
part for the command description) to configure an IP address for this VLAN interface
to enable it to route packets for the devices in the corresponding VLAN.
Related commands: display interface
Vlan-interface.
Examples
# Create the VLAN interface for VLAN 1 and enter
VLAN-interface 1 view.
<Sysname>
system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface
Vlan-interface 1
[Sysname-Vlan-interface1]
Syntax
name text
undo name
View
VLAN view
Parameters
text: VLAN
name, a description of 1 to 32 characters. It can contain special characters
and spaces.
Description
Use the name command to assign a name
to the current VLAN.
Use the undo name command to restore
the default VLAN name.
When 802.1x or MAC address authentication
is configured on the switch, a RADIUS server may be used to deploy VLANs
(either named or numbered) on the ports that have passed authentication. If a
named VLAN is deployed, you must use the name command to associate the
VLAN name with the intended VLAN ID. The name of a VLAN must be unique among
all VLANs.
By default, the name of a VLAN is its VLAN
ID, VLAN 0001 for example.
Examples
# Specify the name of VLAN 2 as test
vlan.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] name test vlan
Syntax
shutdown
undo shutdown
View
VLAN interface view
Parameters
None
Description
Use the shutdown command to administratively
shut down the VLAN interface.
Use the undo shutdown command to bring
up the VLAN interface.
By default, a VLAN interface is administratively
enabled. In this case, the physical state of the VLAN interface is affected by that
of the ports in the VLAN.
l
When all the Ethernet ports in the VLAN are
down, the VLAN interface of the VLAN is down, that is, disabled.
l
When one or more Ethernet ports in the VLAN are
up, the VLAN interface of the VLAN is up, that is, enabled.
If you shut down the VLAN interface
manually, the administrative state of the VLAN interface will always be down,
regardless of the state of the ports in the VLAN.
You can use the undo shutdown
command to enable a VLAN interface when its related parameters and protocols
are configured. When a VLAN interface fails, you can use the shutdown
command to disable the interface, and then use the undo shutdown command
to enable this interface again, which may restore the interface.
Enabling or disabling a VLAN interface does
not influence the state of the Ethernet ports belonging to this VLAN.
Related commands: display interface
Vlan-interface.
Examples
# Disable the VLAN-interface2.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface
Vlan-interface 2
[Sysname-Vlan-interface2]
shutdown
Syntax
vlan { vlan-id1
[ to vlan-id2 ] | all }
undo vlan
{ vlan-id1 [ to vlan-id2 ] | all }
View
System view
Parameters
vlan-id1: Specifies
the ID of the VLAN you want to create or remove, in the range of 1 to 4094.
to vlan-id2:
In conjunction with vlan-id1, specify a VLAN ID range you want to create
or remove. The vlan-id2 argument takes a value in the range of 1 to
4094, and must not be less than that of vlan-id1.
all: Creates
or removes all existing VLANs except those configured with other functions.
Description
Use the vlan command to create VLANs.
If you create only one VLAN, you enter the view of the VLAN upon its creation;
if the specified VLAN already exists, you enter its VLAN view directly.
Use the undo vlan command to remove
VLANs.
By default, only VLAN 1 exists in the
system.
Caution:
l
VLAN 1 is the default VLAN and cannot be
removed.
l
You cannot use the undo vlan command to
directly remove the VLANs reserved by the protocol, voice VLAN, control VLANs for
Smart Link, probe VLANs for remote mirroring, or VLANs used for performing any
other features. To remove them, you must remove the associations of them with
the features.
l
After you use the undo vlan command to remove
a VLAN functioning as the default VLAN of a trunk or a hybrid port, the configuration
of the default VLAN on the trunk port or hybrid port does not change. The port
will continue to use the removed VLAN as its default VLAN.
Examples
# Create VLAN 5 and enter its VLAN view.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] vlan 5
[Sysname-vlan5]
# Remove VLAN 5.
[Sysname-vlan5] quit
[Sysname] undo vlan 5
# Create VLAN 4 through VLAN 100.
[Sysname] vlan 4 to 100
Please wait............. Done.
# Remove VLAN 2 through VLAN 9 in bulk. VLAN
7 is the voice VLAN.
[Sysname] undo vlan 2 to 9
Note:The VLAN kept by protocol,
the voice VLAN, the default VLAN, the management VLAN and the remote probe
VLAN will not be deleted!
Please wait... Done.
[Sysname] display vlan
The following VLANs exist:
1(default), 7
The above output information indicates that
VLAN 7 (the voice VLAN) cannot be removed, while the other VLANs are removed
successfully.
1.2 Port-Based
VLAN Configuration Commands
1.2.1 display port
Syntax
display port
{ hybrid | trunk }
View
Any view
Parameters
hybrid:
Displays hybrid ports.
trunk:
Displays trunk ports.
Description
Use the display port command to display
the existing hybrid or trunk ports, if any.
For information about port type configuration,
refer to the port link-type
command.
Examples
# Display the existing hybrid ports.
<Sysname> display port
hybrid
The following hybrid ports exist:
GigabitEthernet1/0/1 GigabitEthernet1/0/2
The above information shows the current
system has two hybrid ports: GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2.
Syntax
port interface-list
undo port interface-list
View
VLAN view
Parameters
interface-list: List of the Ethernet ports to be added to or removed from the
current VLAN. In this list, you can specify individual ports and port
ranges. An individual port takes the form of interface-type interface-number
and a port range takes the form of interface-type interface-number1 to
interface-type interface-number2, with interface-number2 taking a
value no less than interface-number1. The total number of individual
ports and port ranges defined in the list must not exceed 10.
Description
Use the port command to assign one
or multiple access ports to the current VLAN.
Use the undo port command to remove the
specified access port(s) from the current VLAN.
The command applies to access ports only.
For information about how to assign to or remove from a VLAN trunk or hybrid
ports, refer to the port hybrid vlan command and the port trunk permit vlan command. For port
type configuration, refer to the port link-type command.
Related commands: display vlan.
Examples
# Assign GigabitEthernet1/0/2 through GigabitEthernet1/0/4
to VLAN 2.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] port GigabitEthernet
1/0/2 to GigabitEthernet 1/0/4
Syntax
port access vlan vlan-id
undo port
access vlan
View
Ethernet port view
Parameters
vlan-id: Specifies
the ID of the VLAN to which you want to assign the current port, in the range
of 1 to 4094. The specified VLAN must already exist.
Caution:
By default, all
access ports belong to VLAN 1. You cannot assign an access port to or remove an
access port from VLAN 1 with the port access vlan command or its undo
form. To assign an access port that has been assigned to a VLAN other than VLAN
1, you can use the undo port access vlan command.
Description
Use the port access vlan command to assign
the current access port to the specified VLAN.
Use the undo port access vlan
command to remove the access port from the specified VLAN. After that, the
access port joins VLAN 1 automatically.
Examples
# Assign GigabitEthernet 1/0/1 to VLAN 3.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet1/0/1]
port access vlan 3
Syntax
port hybrid
pvid vlan vlan-id
undo port hybrid pvid
View
Ethernet port view
Parameters
vlan-id: Specifies
the default VLAN ID of the current hybrid port, in the range of 1 to 4094. The specified
VLAN can be one already created or not.
Description
Use the port hybrid pvid vlan
command to set the default VLAN ID of the hybrid port.
Use the undo port hybrid pvid
command to restore the default VLAN ID of the hybrid port.
If the specified default VLAN has been removed
or is not carried on the hybrid port, the port will be unable to receive VLAN untagged
packets. You can configure a hybrid port to permit the packets of its default
VLAN to pass through with the port hybrid vlan command.
Related commands: port link-type,
port hybrid vlan.
Caution:
The local and
remote hybrid ports must use the same default VLAN ID for the traffic of the
default VLAN to be transmitted properly.
Examples
# Set the default VLAN ID of the hybrid
port GigabitEthernet 1/0/1 to 100.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1]
port link-type hybrid
[Sysname-GigabitEthernet1/0/1]
port hybrid pvid vlan 100
Syntax
port hybrid vlan
vlan-id-list { tagged | untagged }
undo port hybrid vlan vlan-id-list
View
Ethernet port view
Parameters
vlan-id-list:
List of the VLANs that the current hybrid port will be assigned to or removed
from. In this list, you can specify individual VLAN IDs (each in the
form of vlan-id) and VLAN ID ranges (each in the form of vlan-id1
to vlan-id2). Specify each VLAN ID in the range of 1 to 4094 and ensure
that vlan-id2 is no less than vlan-id1. The total number of
individual VLAN IDs and VLAN ID ranges defined in the list must not exceed 10. Be sure that the specified VLANs already exist.
tagged:
Keeps VLAN tags when the packets of the specified VLANs are forwarded on the
port.
untagged: Removes
VLAN tags when the packets of the specified VLANs are forwarded on the port.
Description
Use the port hybrid vlan command to assign
the hybrid port to one or multiple VLANs and configure the port to send packets
tagged or untagged for the VLAN(s).
Use the undo port hybrid vlan
command to remove the hybrid port from the specified VLAN(s).
By default, a hybrid port only allows
packets from VLAN 1 to pass through untagged.
You can configure the port hybrid vlan
vlan-id-list { tagged | untagged } command multiple times.
The VLANs specified each time does not overwrite those configured before, if
any.
The VLAN specified by the vlan-id
argument must already exist. Otherwise, this command is invalid.
Related commands: port link-type.
Examples
# Assign hybrid port GigabitEthernet 1/0/1
to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100; configure the port to keep
VLAN tags when sending the packets of these VLANs.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet1/0/1]
port link-type hybrid
[Sysname-GigabitEthernet1/0/1]
port hybrid vlan 2 4 50 to 100 tagged
Syntax
port link-type { access | hybrid | trunk }
undo port link-type
View
Ethernet port view
Parameters
access: Sets
the link type of the current port to access.
hybrid: Sets
the link type of the current port to hybrid.
trunk: Sets
the link type of the current port to trunk.
Description
Use the port link-type command to
set the link type of the Ethernet port.
Use the undo port link-type command
to restore the default link type.
The default link type of an Ethernet port
is access.
To change the link
type of a port from hybrid to trunk or vice versa, you need to change the link
type to access first.
Examples
# Configure GigabitEthernet 1/0/1 as a
trunk port.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet1/0/1]
port link-type trunk
Syntax
port trunk permit vlan { vlan-id-list | all }
undo port trunk permit vlan { vlan-id-list | all }
View
Ethernet port view
Parameters
vlan-id-list:
List of the VLANs that the current trunk port will be assigned to or removed
from. In this list, you can specify individual VLAN IDs (each in the
form of vlan-id) and VLAN ID ranges (each in the form of vlan-id1
to vlan-id2). Specify each VLAN ID in the range of 1 to 4094 and
ensure that vlan-id2 is no less than vlan-id1. The total number
of individual VLAN IDs and VLAN ID ranges defined in the list must not exceed
10.
all: Assigns
the trunk port to all VLANs. On a GVRP-enabled trunk
port, you must configure the port trunk permit vlan all command to
ensure that the traffic of all dynamically registered VLANs can pass through.
However, When GVRP is disabled, you are discouraged to configure the keyword.
This is to prevent users of unauthorized VLANs from accessing restricted
resources through the port.
Description
Use the port trunk permit vlan
command to assign the trunk port to the specified VLAN(s), that is, to allow
packets from these VLANs to pass through the port.
Use the undo port trunk permit vlan
command to remove the hybrid port from the specified VLAN(s).
By default, a trunk port belongs to VLAN 1
only.
On a trunk port, only traffic of the default
VLAN can pass through untagged.
You can perform the command multiple times.
The VLANs specified each time does not overwrite those configured before, if
any.
Related commands: port link-type.
Examples
# Assign the trunk port GigabitEthernet 1/0/1
to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet1/0/1]
port link-type trunk
[Sysname-GigabitEthernet1/0/1]
port trunk permit vlan 2 4 50 to 100
Please wait... Done.
Syntax
port trunk pvid vlan vlan-id
undo port
trunk pvid
View
Ethernet port view
Parameters
vlan-id: Specifies
the default VLAN ID of the current port, in the range of 1 to 4094.
Description
Use the port
trunk pvid vlan command to set the default VLAN ID
for the trunk port. A trunk port sends packets of the default VLAN untagged.
Use the undo port trunk pvid command to restore the
default.
By default, the default VLAN ID of a trunk
port is VLAN 1.
After configuring the default VLAN of a
trunk port, you need to use the port trunk permit
vlan command to configure
the trunk port to allow the packets of the default VLAN to pass through.
If the specified default VLAN has been
removed or is not carried on the trunk port, the port will be unable to receive
VLAN untagged packets.
The local and
remote trunk ports must use the same default VLAN ID for the traffic of the
default VLAN to be transmitted properly.
Related commands: port link-type,
port trunk permit vlan.
Examples
# Set the default VLAN ID of the trunk port
GigabitEthernet 1/0/1 to 100.
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet1/0/1]
port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk pvid vlan 100
Syntax
display protocol-vlan interface { interface-type interface-number [ to interface-type
interface-number ] | all }
View
Any view
Parameters
interface-type interface-number: Specify a port by its type and number to display the protocol
VLAN(s) bound with the port. You can use the interface-type interface-number
to interface-type interface-number keyword and argument
combination to specify a port range to display the protocol template
information of the ports bound with protocol VLAN(s) in the range. When
defining a port range, note that the second port must not be less than the
first port.
all:
Displays all the ports bound with at least one protocol VLAN and the associated
protocol templates.
Description
Use the display protocol-vlan interface command
to display information about protocol-based VLANs and protocol templates for
the specified port(s).
Related commands: port hybrid
protocol-vlan vlan, protocol-vlan.
Examples
# Display the protocol VLAN information of
ports GigabitEthernet1/0/1 and GigabitEthernet1/0/2.
<Sysname>
display protocol-vlan interface GigabitEthernet 1/0/1 to GigabitEthernet 1/0/2
Interface: GigabitEthernet1/0/1
VLAN ID Protocol-Index
Protocol-type
50 0
ip
80 1
ip
100 0
ip
100 1
ipx ethernetii
Interface: GigabitEthernet1/0/2
VLAN ID Protocol-Index
Protocol-type
50 1
ipx raw
80 2
at
100 3
snap etype 0x0abc
100
4 llc dsap 0xac ssap 0xbd
Table 1-3
Description on the fields of the display vlan
command
|
Field
|
Description
|
|
Interface
|
Interface bound with at least one
protocol VLAN
|
|
VLAN ID
|
ID of a protocol VLAN bound with the
interface
|
|
Protocol-Index
|
Protocol template index
|
|
Protocol-type
|
Protocol type specified by the protocol
template. Refer to the protocol-vlan command for detailed description.
|
Syntax
display protocol-vlan vlan { vlan-id1 [ to
vlan-id2 ] | all }
View
Any view
Parameters
vlan-id1:
Specifies a VLAN ID in the range of 1 to 4094, of which the protocol VLAN
configuration information is to be displayed.
to vlan-id2: In conjunction with vlan-id1, define a VLAN range to
display the protocol template configurations of all protocol VLANs in the range.
The vlan-id2 argument takes a value in the range of 1 to 4094, and must
not be less than that of vlan-id1.
all: Displays
all protocol VLANs and their protocol template information.
Description
Use the display protocol-vlan vlan
command to display information about protocol VLANs.
Related commands: protocol-vlan.
Examples
# Display the protocol information and
protocol indexes configured for VLAN 10 through VLAN 20.
<Sysname> display protocol-vlan vlan 10 to 20
VLAN ID: 10
VLAN Type: Protocol-based VLAN
Protocol-Index
Protocol-Type
0 ip
1 ip
2 ipx ethernetii
3
at
VLAN ID: 15
VLAN Type: Protocol-based VLAN
Protocol-Index
Protocol-Type
0
ip
1 snap
etype 0x0abcd
Table 1-4
Description on the fields
of the display protocol-vlan vlan command
|
Field
|
Description
|
|
VLAN ID
|
Protocol VLAN ID
|
|
VLAN Type
|
VLAN type. Here, it refers to
Protocol-based VLAN
|
|
Protocol-Index
|
Protocol template index
|
|
Protocol-Type
|
Protocol
type specified in the protocol template. Refer to the protocol-vlan command
for detailed description.
|
Syntax
port
hybrid protocol-vlan vlan vlan-id { protocol-index
[ to protocol-index-end ] | all }
undo port
hybrid protocol-vlan vlan vlan-id { protocol-index [ to
protocol-index-end ] | all }
View
Ethernet port view
Parameters
vlan-id:
Specifies the ID of the protocol VLAN bound with the port. The value range is 1
to 4094. At least one protocol template must have been configured for the VLAN.
protocol-index: Specifies a protocol template, in the range of 0 to 4.
to protocol-index-end: In conjunction with protocol-index, specify a protocol
index range. The protocol-index-end argument takes a value in the range of
0 to 4 and must be greater than protocol-index.
all: Specifies
all protocol indexes. With the all keyword, the port hybrid
protocol-vlan vlan command binds the port with all the protocol templates of
the specified protocol VLAN, and the undo form of the command removes
the associations between the port and all the protocol templates of the
specified protocol VLAN.
Description
Use the port hybrid protocol-vlan vlan command
to bind the port with the specified protocol template(s) of a protocol VLAN.
Use the undo port hybrid
protocol-vlan vlan command to remove the binding between the port and the specified
protocol template(s) of a protocol VLAN.
l
The port hybrid protocol-vlan vlan
command is available on hybrid ports only.
l
Before you bind a port with a protocol VLAN, assign
the port to the VLAN with the port hybrid vlan command. Otherwise, the binding
will fail.
l
To bind a protocol template to a port in a VLAN
successfully, you must ensure that the protocol template has been created in
the VLAN. If the protocol template you are binding with the port has not been
created in the VLAN, the system will display the operation failure message. If
some of the protocol templates you are binding with the port have not been
created in the VLAN, the system does not display error messages while binding
those already created with the port.
l
When you removes the binding between a port and
a protocol template, the system will report operation failure if the index of
the specified protocol to be removed does not exist. If a part of the specified
protocol indexes to be removed do not exist, the switch will remove the
existing indexes when it prompts errors.
Related commands: display protocol-vlan
interface.
Examples
# Bind GigabitEthernet 1/0/1 with the protocols
indexed from 0 to 2 of VLAN 3 (assuming that VLAN 3 is a protocol VLAN).
<Sysname> system-view
System View: return to User View
with Ctrl+Z.
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet1/0/1] port
hybrid protocol-vlan vlan 3 0 to 2
# Remove the binding between GigabitEthernet
1/0/1 and protocols indexed from 1 to 4 of VLAN 3.
[Sysname-GigabitEthernet1/0/1] undo
port hybrid protocol-vlan vlan 3 1 to 4
Protocol index 1 does not exist in
VLAN 3
Protocol index 4 does not exist in
VLAN 3
1.3.4 protocol-vlan
Syntax
protocol-vlan [ protocol-index ] { at | ip | ipx {
ethernetii | llc | raw | snap } |
mode { ethernetii etype etype-id | llc
dsap dsap-id ssap ssap-id | snap etype etype-id
} }
undo protocol-vlan { protocol-index [ to protocol-index-end ] | all }
View
VLAN view
Parameters
at: Creates the
AppleTalk-based protocol template.
ip: Creates the
IP-based protocol template.
ipx: Creates
the IPX-based protocol template. The ethernetii, llc, raw and
snap keywords represent four IPX encapsulation formats. For more
information about encapsulation formats, refer to the accompanying operation
manual.
mode: Configures
a user-defined protocol template.
ethernetii etype-id:
Creates the protocol template that matches the Ethernet II encapsulation format
and the corresponding protocol type value of the packet. The etype-id
argument indicates the protocol type value and ranges from 0x0600 to 0xFFFF(excluding
0x0800, 0x8137, and 0x809b).
llc: Creates
the protocol template that matches LLC encapsulation format.