Vous êtes sur la page 1sur 31

XPAND-IP

CLI
(Command Line Interface)

User Guide
For R3A software series

Table of contents:
INTRODUCTION ........................................................................................................................................ 6
ACCESSING THE ELEMENT .................................................................................................................. 6
VALID USERS ............................................................................................................................................. 6
GETTING STARTED.................................................................................................................................. 7
GETTING HELP ......................................................................................................................................... 9
MODES ......................................................................................................................................................... 9
CHANGING MODES .................................................................................................................................. 9
NON PRIVILEGED USERS ..................................................................................................................... 10
CLI COMMANDS...................................................................................................................................... 11
MODE: USEREXEC................................................................................................................................. 11
clear screen......................................................................................................................................... 11
exit....................................................................................................................................................... 11
help ..................................................................................................................................................... 11
logout .................................................................................................................................................. 11
MODE: EXEC........................................................................................................................................... 12
clear screen......................................................................................................................................... 12
configure terminal............................................................................................................................... 12
end....................................................................................................................................................... 12
exit....................................................................................................................................................... 12
help ..................................................................................................................................................... 12
logout .................................................................................................................................................. 12
reset..................................................................................................................................................... 12
save-config .......................................................................................................................................... 12
setelementip ........................................................................................................................................ 12
show history ........................................................................................................................................ 12
show running-config ........................................................................................................................... 12
clear counters ..................................................................................................................................... 14
clear spanning-tree detected protocols............................................................................................... 14
show [provider-bridge] port config .................................................................................................... 14
show customer spanning-tree.............................................................................................................. 14
show flow-control................................................................................................................................ 14
show interface bridge port-type .......................................................................................................... 14
show interface mtu .............................................................................................................................. 14
show interfaces [{ <interface-type> <interface-id> ] counters ......................................................... 14
show dot1d mac-address-table............................................................................................................ 14
show interfaces ................................................................................................................................... 15
show lldp ............................................................................................................................................. 15
show lldp errors .................................................................................................................................. 15
show lldp interface.............................................................................................................................. 15
show lldp local .................................................................................................................................... 15
show lldp neighbors ............................................................................................................................ 15
show lldp statistics .............................................................................................................................. 15
show lldp traffic .................................................................................................................................. 16
show mac-address-table...................................................................................................................... 16
show mac-address-table aging-time ................................................................................................... 16
show rmon........................................................................................................................................... 16
show users........................................................................................................................................... 16
show vlan ............................................................................................................................................ 16

show vlan device info .......................................................................................................................... 16


show vlan port config.......................................................................................................................... 16
EXAMPLES OF EXEC MODE COMMANDS....................................................................................... 17
show running-config ........................................................................................................................... 17
show spanning-tree ............................................................................................................................. 17
show spanning-tree bridge.................................................................................................................. 17
show spanning-tree interface .............................................................................................................. 17
show spanning-tree detail ................................................................................................................... 18
show spanning-tree root ..................................................................................................................... 18
MODE: CONFIGURE .............................................................................................................................. 19
clear screen......................................................................................................................................... 19
end....................................................................................................................................................... 19
exit....................................................................................................................................................... 19
help ..................................................................................................................................................... 19
interface .............................................................................................................................................. 19
no spanning-tree ................................................................................................................................. 19
no spanning-tree priority ................................................................................................................... 19
no spanning-tree compatibility ........................................................................................................... 19
no spanning-tree pathcost dynamic .................................................................................................... 19
no spanning-tree transmit hold-count................................................................................................. 19
no spanning-tree forward-time ........................................................................................................... 19
no spanning-tree hello-time ................................................................................................................ 19
no spanning-tree max-age................................................................................................................... 19
shutdown spanning-tree ...................................................................................................................... 19
spanning-tree ...................................................................................................................................... 20
spanning-tree priority ......................................................................................................................... 20
spanning-tree compatibility ................................................................................................................ 20
spanning-tree mode............................................................................................................................. 20
spanning-tree pathcost dynamic ......................................................................................................... 20
spanning-tree transmit hold-count...................................................................................................... 20
spanning-tree forward-time ................................................................................................................ 20
spanning-tree hello-time ..................................................................................................................... 20
spanning-tree max-age........................................................................................................................ 20
bridge-mode ........................................................................................................................................ 21
clear lldp counters .............................................................................................................................. 21
clear lldp table .................................................................................................................................... 21
clear spanning-tree counters .............................................................................................................. 21
ether-type ............................................................................................................................................ 21
mac-address-table aging-time............................................................................................................. 21
no mac-address-table aging-time........................................................................................................ 21
spanning-tree provider........................................................................................................................ 21
no spanning-tree provider................................................................................................................... 21
vlan ..................................................................................................................................................... 21
no vlan ................................................................................................................................................ 21
set cli pagination................................................................................................................................. 21
EXAMPLES OF CONFIGURE MODE COMMANDS. ........................................................................ 22
spanning-tree forward-time ................................................................................................................ 22
no spanning-tree forward-time ........................................................................................................... 22
MODE: INTERFACE ............................................................................................................................... 23
clear screen......................................................................................................................................... 23
end....................................................................................................................................................... 23
exit....................................................................................................................................................... 23
help ..................................................................................................................................................... 23
no shutdown ........................................................................................................................................ 23

no spanning-tree pseudoRootId .......................................................................................................... 23


no spanning-tree auto-edge ................................................................................................................ 23
no spanning-tree layer2-gateway-port................................................................................................ 23
no spanning-tree restricted-role ......................................................................................................... 23
no spanning-tree restricted-tcn ........................................................................................................... 23
no spanning-tree cost.......................................................................................................................... 23
no spanning-tree disabled................................................................................................................... 23
no spanning-tree link-type .................................................................................................................. 23
no spanning-tree portfast .................................................................................................................... 23
no spanning-tree port-priority ............................................................................................................ 23
shutdown ............................................................................................................................................. 24
spanning-tree ...................................................................................................................................... 24
spanning-tree auto-edge ..................................................................................................................... 24
spanning-tree bpdu-receive................................................................................................................. 24
spanning-tree bpdu-transmit............................................................................................................... 24
spanning-tree layer2-gateway-port..................................................................................................... 24
spanning-tree restricted-role .............................................................................................................. 24
spanning-tree restricted-tcn................................................................................................................ 24
spanning-tree cost............................................................................................................................... 24
spanning-tree disable.......................................................................................................................... 24
duplex.................................................................................................................................................. 25
flowcontrol .......................................................................................................................................... 25
l2protocol-discard............................................................................................................................... 25
l2protocol-peer ................................................................................................................................... 25
l2protocol-tunnel................................................................................................................................. 25
lldp notification................................................................................................................................... 25
lldp tlv-select basic-tlv ........................................................................................................................ 25
lldp tlv-select dot1tlv........................................................................................................................... 26
lldp tlv-select dot3tlv........................................................................................................................... 26
lldp ...................................................................................................................................................... 26
negotiation .......................................................................................................................................... 26
no duplex............................................................................................................................................. 26
no l2protocol-tunnel............................................................................................................................ 26
no lldp notification.............................................................................................................................. 26
no lldp tlv-select basic-tlv ................................................................................................................... 26
no lldp tlv-select dot1tlv...................................................................................................................... 27
no lldp tlv-select dot3tlv...................................................................................................................... 27
no lldp ................................................................................................................................................. 27
no negotiation ..................................................................................................................................... 27
no spanning-tree bpdufilter................................................................................................................. 27
no spanning-tree loop-guard .............................................................................................................. 27
no speed .............................................................................................................................................. 27
no switchport....................................................................................................................................... 27
no switchport acceptable frame-type .................................................................................................. 27
no switchport pvid............................................................................................................................... 27
set-bridge port-type............................................................................................................................. 27
spanning-tree bpdufilter...................................................................................................................... 28
spanning-tree loop-guard ................................................................................................................... 28
no lldp ................................................................................................................................................. 28
no negotiation ..................................................................................................................................... 28
no spanning-tree bpdufilter................................................................................................................. 28
no spanning-tree loop-guard .............................................................................................................. 28
spanning-tree pseudoRootId priority .................................................................................................. 28
speed ................................................................................................................................................... 28
switchport............................................................................................................................................ 28
switchport acceptable-frame-type....................................................................................................... 28

switchport pvid.................................................................................................................................... 28
spanning-tree link-type ....................................................................................................................... 28
spanning-tree portfast......................................................................................................................... 28
spanning-tree port-priority ................................................................................................................. 28
EXAMPLES OF INTERFACE MODE COMMANDS. ......................................................................... 29
spanning-tree restricted-tcn................................................................................................................ 29
spanning-tree pseudoRootId ............................................................................................................... 29
MODE: VLAN_CONFIG ......................................................................................................................... 30
no ports ............................................................................................................................................... 30
ports .................................................................................................................................................... 30
vlan active ........................................................................................................................................... 30
EXAMPLES OF VLAN MODE COMMANDS. ..................................................................................... 31

Introduction
This guide explains how to use the command line interface (CLI) for XPAND-IP and
contains the list of commands with explanations of each command.
The user guide is for a specific software version, as availability of commands will depend
on the functionality of particular software release.
The valid software version for this user guide is printed on the first page.
The active software version of the element can be found by using the web interface on the
element and choosing the Configuration menu item, then the Software menu item.
The web page that appears will show the active software version on the element.

Accessing the element


Access to the XPAND-IP element requires a telnet session with the element; this may be
achieved by using a DOS box in Windows XP and using the command telnet with the ip
address of the element as a parameter. Other operating systems may have other
commands to achieve the same result though.

Valid users
All users of the CLI must be users contained in the elements user database. When a user
tries to log in via the CLI the user is checked by the elements security system. User
parameters like access rights and auto logout time will affect the commands available to
the user and the acceptable inactivity time before logout.
There are only two access rights in the CLI non-privileged or privileged users.
Element security levels of Active, Master or Admin correspond to privileged users of the
CLI all other element security levels correspond to un-privileged users with limited
abilities.

Getting started
The following description is for a Windows XP pc, if you are using another operating
system the general method should be the same but the details may differ.
First check connectivity to make sure your pc and element can talk to each other.
Open a Dos box and issue the command ping <ip-address of element>
See figure 1.
Figure 1

Issue the command telnet <ip-address of element> and press [ENTER]


The result should be as shown in figure 2.
Figure 2

You are now talking with the CLI at the login screen, type a valid user name and
press [ENTER], then the users password and press [ENTER].
A screen similar to that of figure 3 should appear.
Figure 3

Congratulations you have successfully logged in to the CLI.


The prompt on the left-hand side of the blinking cursor is context or mode
dependant and also indicates if you are a privileged user or not, a privileged user
is indicated by a # and a non-privileged user is indicated by a >.

Getting Help
At any time you may type the command help to list all commands available with their
parameter list. Typing a command and then help on the same line will give more detailed
help for that particular command. Typing the first few letters of a command and pressing
[TAB] will produce a list of commands beginning with that letter combination.

Modes
A mode is a subset of all commands available.
When you are in a mode the prompt will indicate the mode you are currently in.
Modes available
Mode name
Prompt
assuming privileged
user
EXEC
#
CONFIGURE (config)#
VLAN
(config-vlan)#
INTERFACE (config-if)#

Main purpose

Show commands
Configuring parameters
Configuring vlan ports
Configuring parameters for a particular
interface

When you first log in you will be in EXEC mode, typing help at the prompt will list all
commands available in this mode.

Changing modes
To enter CONFIGURE mode you will need to use the command configure terminal,
notice how the prompt changed from a # to (config)#. To enter INTERFACE mode
you must first be in CONFIGURE mode, the command to enter INTERFACE mode
requires two parameters, the interface-type and interface-id.
Example: interface gigabitethernet 0/1
Hint: Try to enter only the first few characters of each word then press tab
Like this:
in [TAB] gi [TAB] 0/1 notice how the tab expansion works.
When you have entered the INTERFACE mode the prompt will have changed to
(config-if)#
To move back to the previous mode use the exit command, to get back to EXEC mode
directly use the end command.

Non privileged users


Non privileged users only have access to a mode called USEREXEC, in this mode no
commands of value can be executed.
Mode available for non privileged users
Mode name Prompt Main purpose
USEREXEC >

None

CLI Commands
Mode: USEREXEC
Command

Parameter list

Description
Clears the screen

clear screen
exit
[ command ]
help
logout

Go back to previous mode


or log out from CLI
List commands or get more
help on a command
Log out from CLI

Mode: EXEC
Command

Parameter list

Description
Clears the screen

clear screen
Enters configuration mode
configure terminal
Exit from Configure mode
end
exit
[command]
help

Go back to previous mode


or log out from CLI
List commands or get more
help on a command
Log out from CLI

logout
Restarts the element
reset
save-config
setelementip

[ip-address subnetMask
gateway]

show history

show running-config

show spanning-tree

show spanning-tree active

show spanning-tree bridge

[{stp | vlan [ <integer(14094)>] | rmon}]

Permanently saves the


current config
Set the ip address
Shows a history of
commands executed in this
CLI session
Shows the configuration
currently running

The parameters above allow


you to only choose a
specific sub section
[{ summary | blockedports | Displays spanning tree
pathcost method }]
information
Shows the summary,
blocked ports or pathcost
method
[detail]
When detail is added more
detaild information is
shown
[{ address | forward-time |
hello-time | id |max-age |
protocol | priority | detail }]

spanning tree information


of active ports

Displays the spanning-tree


configuration of the bridge

Mode: EXEC continued


Command
Parameter list
show spanning-tree detail
show spanning-tree
interface

Description
Displays detailed spanning
tree information
<interface-type> <interface- Displays Spanning-tree port
id> [{ cost | priority |
configuration
portfast | rootcost |
restricted-role | restrictedNote this command is
tcn | state | stats | detail }]
displayed as two commands
[<interface-type>
when using the help
<interface-id>] layer2command to list all
gateway-port
commands
cost port cost
priority port priority
portfast enabled /
disabled
rootcost root cost
restricted-role enabled
/disabled
restricted-tcn enabled /
disabled
state example Forwarding
stats port statistics
detail detailed port
information

show spanning-tree root

root [{ address | cost |


Displays spanning tree root
forward-time | id | max-age | information
port | priority | detail }]
address - root bridge
address
cost root cost
forward-time forward
time delay
id root bridge id
max-age root max age
port root port
priority root priority
detail root details

Mode: EXEC continued


Command
Parameter list
[ <interface-type>
clear counters
<interface-id> ]
[{interface <interface-type>
clear spanning-tree detected <interface-id>}]
protocols
Restarts the protocol
migration process on
the specified interface
[{port <interface-type>
show [provider-bridge] port <interface-num>}]
config
Port related configuration
[cep interface <interfaceshow customer spanningtype><interface-number>]
tree
[{ detail [active] | active
[detail] }]
cep: Customer Edge Port
active: Displays the Bridge
and details of the active
detail: Displays in detail
about the port and bridge
show flow-control
show interface bridge porttype

[ interface <interface-type>
<interface-id>]
[ <interface-type> <ifnum>
]

Displays port information

Displays detailed customer


spanning tree information

Displays flow-control
information
Shows the Bridge Port Type
of interfaces in the switch
Shows the Maximum
Transmission Unit (MTU)
of interfaces in the switch
Counters for all the
available interfaces

show interface mtu

show interfaces [{
<interface-type> <interfaceid> ] counters
show dot1d mac-addresstable

Description
Clears the interface
counters
Restart the protocol
migration process

[address
<aa:aa:aa:aa:aa:aa>]
[{interface <interface-type>
<interface-id>}]

Displays Unicast and


Multicast Mac Address
table

Mode: EXEC continued


Command
Parameter list
[{ [<interface-type>
show interfaces
<interface-id>] [{
description | flowcontrol |
capabilities | status }] }]

Description
Displays interface status
and configuration

capabilities:
Capabilities of the interface
flowcontrol:
Receive or send flow
control value for an
interface
description:
Description about the
interface
Displays LLDP global
configuration details
Displays the information
about the errors like
memory allocation failures,
queue overflows, table
overflows, etc

show lldp
show lldp errors

show lldp interface

[<interface-type>
<interface-id>]

show lldp local

{[<interface-type>
<interface-id>] | [mgmtaddr]}

show lldp neighbors

show lldp statistics

[chassis-id <string(255)>
port-id <string(255)>]
[<interface-type>
<interface-id>][detail]

Displays LLDP
configuration details on a
particular interface or all
interfaces
Displays the current switch
information that will be
used to populate outbound
LLDP advertisements for a
specific interface or all
interfaces
Displays information about
neighbors learnt on an
interface or all interfaces
Displays the LLDP remote
table statistics
information

Mode: EXEC continued


Command
Parameter list
[<iftype> <ifnum>]
show lldp traffic

show mac-address-table

[vlan <vlan-range>]
[address
<aa:aa:aa:aa:aa:aa>]
[{interface <interface-type>
<interface-id>}]

show mac-address-table
aging-time
show rmon

[statistics [<stats-index (165535)>]] [alarms] [events]


[history [history-index (165535)] [overview]]

Description
Displays LLDP counters,
including the no. of frames
sent, received, discarded,
etc
Displays Unicast and
Multicast Mac Address
table

Displays the Aging Time


for the Mac Address Table
entries
Display RMON

alarms
Configured alarm details
events
Configured event details
history
Configured history details
statistics
Statistics related
information
show users
show vlan

[brief | id <vlan-range> |
summary]

show vlan device info


show vlan port config

[{port <interface-type>
<interface-id>}]

Display information about


terminal lines
Displays VLAN global
status for the
specified VLAN range
(ex.1-4)
Displays VLAN global
status variables
Displays Port information

Examples of EXEC mode commands.


show running-config
# show running-config stp
Building configuration...
spanning-tree pathcost dynamic
interface gigabitethernet 0/1
spanning-tree link-type point-to-point

show spanning-tree
# show spanning-tree
We are the root of the Spanning Tree
Root Id
Priority
32768
Address
00:60:c0:20:08:70
Cost
0
Max Age 20 Sec, Forward Delay 15 Sec
Spanning tree Protocol Enabled.
Bridge is executing the rstp compatible Spanning Tree Protocol
Bridge Id
Priority 32768
Address 00:60:c0:20:08:70
Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Dynamic Path Cost is Enabled
Name
Role
State
Cost
Prio
Type
---------------------Gi0/1
Designated
Forwarding
200000
128
P2P

show spanning-tree bridge


# show spanning-tree bridge
Bridge ID
--------80:00:00:60:c0:20:08:70

HelloTime MaxAge FwdDly Protocol


--------- ------ ------ -------2
20
15
rstp

show spanning-tree interface


# show spanning-tree interface gigabitethernet 0/1
Role
---Designated

State
----Forwarding

Cost
---200000

Prio Type
---- ---128 P2P

show spanning-tree detail


# show spanning-tree detail
Spanning tree Protocol Enabled.
Bridge is executing the rstp compatible Spanning Tree Protocol
Bridge Identifier has priority 32768, Address 00:60:c0:20:08:70
Configured Hello time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Dynamic Path Cost Enabled
We are the root of the spanning tree
Number of Topology Changes 0
Time since topology Change 0 seconds ago
Transmit Hold-Count 3
Max Age 20 Sec, Forward Delay 15 Sec
Hello Time 2 Sec
Port 1 [Gi0/1] is Designated, Forwarding
Port PathCost 200000, Port
Priority 128, Port Identifier 128.1
Designated Root has priority 32768, address 00:60:c0:20:08:70
Designated Bridge has priority 32768, address 00:60:c0:20:08:70
Designated Port Id is 128.1, Designated PathCost 0
No of Transitions to forwarding State :1
PortFast is enabled
LinkType is point to Point
BPDUs : sent 355 , recieved 0
Timers: Hello - 1, Forward Delay - 0, Topology Change - 0
Restricted Role is disabled.
Restricted TCN is disabled.
bpdu-transmit enabled
bpdu-receive enabled

show spanning-tree root


# show spanning-tree root
Root ID
------80:00:00:60:c0:20:08:70

RootCost MaxAge FwdDly RootPort


--------------- ------ -------0
20
15

Mode: CONFIGURE
Command

Parameter list

Description
Clears the screen

clear screen
Exit from Configure mode
end
exit
[ command ]
help
interface

{<interface-type>
<interface-id>}

no spanning-tree

Go back to previous mode


or log out from CLI
List commands or get more
help on a command
Enter interface
configuration mode
shuts down spanning tree
operation

no spanning-tree priority
no spanning-tree
compatibility
[lag-speed]
no spanning-tree pathcost
dynamic
no spanning-tree transmit
hold-count

Sets the compatibility


version for spanning tree
protocol to its default value
No dynamic path cost
calculations are done
Sets the transmit hold-count
to its default value
forward-time 15 secs

no spanning-tree forwardtime
hello-time 2 secs
no spanning-tree hello-time
max-age 20 secs
no spanning-tree max-age
shutdown spanning-tree

Shutdown spanning tree


operation

Mode: CONFIGURE continued


Command
Parameter list

<value(0-61440)>

Description
Start spanning tree
operation
Set priority

{stp | rst}

Set compatibility mode

rst

Set mode

[lag-speed]

The pathcost of all the ports


will be calculated
dynamically based on the
speed of the interface.
If the cost has already been
configured an rstp interface,
then this command has no
effect on those interfaces
Sets the transmit hold count

spanning-tree
spanning-tree priority
spanning-tree compatibility
spanning-tree mode
spanning-tree pathcost
dynamic

<value (1-10)>
spanning-tree transmit holdcount
<seconds(4-30)>
spanning-tree forward-time

<seconds(1-2)>
spanning-tree hello-time

<seconds(6-40)>
spanning-tree max-age

Controls how fast a port


changes its spanning tree
state from Blocking state to
Forwarding state
Determines how often the
switch broadcasts its hello
message to other switches
when it is the root of the
spanning tree
The maximum age allowed
for the Spanning Tree
Protocol information
learned from the network on
any port before it is
discarded

Mode: CONFIGURE continued


Command
Parameter list
{ vlan-unaware | customer |
bridge-mode
provider }

Clears LLDP transmit and


receive statistics
Clears LLDP neighbors
information
Reset all bridge and port
level statistics counters

clear lldp counters


clear lldp table
clear spanning-tree counters

ether-type

Description
Set switch mode

{ 0x88a8 | 0x9100 | 0x9200


}
<15-300 seconds>

mac-address-table agingtime

Set the TPID


Sets the mac aging time in
seconds
Set mac aging time to 300
(default)

no mac-address-table agingtime
spanning-tree provider
no spanning-tree provider
<vlan-id(1-4094)>
vlan
<vlan-id(1-4094)>

Enables spanning tree


operation
disables spanning tree
operation
Create a vlan with id and
enter VLAN_CONFIG
mode
Remove vlan with id

no vlan
{on | off}
set cli pagination

Pause before scrolling text


off top of terminal

Examples of CONFIGURE mode commands.


When you have issued the configuration commands in CONFIGURE mode they will take
effect immediately, but to save the changes between resets of the element you will have
to go back to EXEC mode and give the command save-config.
spanning-tree forward-time
(config)# spanning-tree forward-time 17

no spanning-tree forward-time
(config)# no spanning-tree forward-time

Mode: INTERFACE
Command

Parameter list

Description
Clears the screen

clear screen
Exit from Configure mode
end
exit
[ command ]
help

Go back to previous mode


or log out from CLI
List commands or get more
help on a command

no shutdown
no spanning-tree
pseudoRootId

[priority <value> macaddress <value>]

Set the pseudo root id macaddress and priority

priority priority of
pseudo root
mac-address macaddress
id of pseudo root
no spanning-tree auto-edge

no spanning-tree layer2gateway-port
no spanning-tree restrictedrole
no spanning-tree restrictedtcn

Disables automatic
detection of bridge attached
on an interface
withdraws layer two
gateway port status
Disables the root-guard /
restricted role feature on the
port
Disables the topology
change guard/ restricted
TCN feature on the port
Set cost 200000

no spanning-tree cost
no spanning-tree disabled

Enables the spanning tree


on the port
Set link type Auto

no spanning-tree link-type
Not in portfast
no spanning-tree portfast
Set port priority to 128
no spanning-tree portpriority

Mode: INTERFACE continued


Command
Parameter list

Description
Shutdown interface

shutdown
spanning-tree
spanning-tree auto-edge

{enabled | disabled}
spanning-tree bpdu-receive

The spanning-tree autoedge command enables


automatic detection of
bridge attached on an
interface
Configures the BPDU
receive status of the port

enabled - Receives the


BPDUs on the port
disabled - Ignores the
BPDUs received on the port
{enabled | disabled}
spanning-tree bpdu-transmit

Configures BPDU transmit


status of the port

enabled - The port


transmits BPDUs
disabled - The port does
not transmit BPDUs
Configures port as layer two
gateway port

spanning-tree layer2gateway-port
spanning-tree restricted-role

spanning-tree restricted-tcn

cost
spanning-tree cost
spanning-tree disable

Enables the root-guard /


restricted role feature
(prevents the specific port
from becomingthe root
port) on the port
Enables the topology
change guard / restricted
TCN feature (prevents the
Topology change caused by
that port ) on the port
The pathcost value
associated with the port
Disables the spanning tree
on the port

Mode: INTERFACE continued


Command
Parameter list
{ full | half }
duplex
{ on | off }
flowcontrol

l2protocol-discard

{dot1x | lacp | stp | gvrp |


gmrp | mvrp | mmrp}
Protocol to discard
{stp}

l2protocol-peer
l2protocol-tunnel

{dot1x | lacp | stp | gvrp |


gmrp| igmp | mvrp | mmrp}
Protocol to tunnel
[remote-table-chg]

lldp notification

lldp tlv-select basic-tlv

Trap notification for change


in neighbor table
{ [port-descr] [sys-name]
[sys-descr] [sys-capab]
[mgmt-addr {all | ipv4
<ucast_addr> }]}
port-descr
Port description TLV
sys-name
System name TLV
sys-descr
System description TLV
sys-capab
System capabilities TLV
mgmt-addr
Configures transmission of
managment

Description
Set port to half or full
duplex
off
Turns off attached devices
or local ports
ability to send packets
on
Allows an interface to send
or receive packets
Discard packets of a
specific protocol

Peer packets of a specific


protocol
Tunnel packets of a specific
protocol

Enables LLDP trap


notification on an interface

Enables the basic TLV


transmission on a given port

Mode: INTERFACE continued


Command
Parameter list
{[port-vlan-id] [protocollldp tlv-select dot1tlv
vlan-id {all |<vlan-id>}]
[vlan-name {all | <vlanid>}]}
port-vlan-id
Port VLAN identifier TLV
protocol-vlan-id
Protocol VLAN identifier
TLV
vlan-name
VLAN name TLV
{ [macphy-config] [maxlldp tlv-select dot3tlv
framesize] }
macphy-config
MAC or PHY TLV
max-framesize
Maximum frame size TLV
{transmit | receive}
lldp
negotiation
no duplex

no l2protocol-tunnel

{dot1x | lacp | stp | gvrp |


gmrp| igmp | mvrp | mmrp}

no lldp notification
no lldp tlv-select basic-tlv

{ [port-descr] [sys-name]
[sys-descr] [sys-capab]
[mgmt-addr {all | ipv4
<ucast_addr> }]}
port-descr
Port description TLV
sys-name
System name TLV
sys-descr
System description TLV
sys-capab
System capabilities TLV
mgmt-addr
Configures transmission of
managment

Description
Configure dot1 TLV types
on a port

Configure dot3 TLV types


on a port

Enables reception and


transmission of LLDPDU
Enables auto-negotiation on
the interface
Configures the duplex
operation to the default
value
Do not tunnel packets of a
specific protocol
Disables LLDP trap
notification on an interface
Disables the basic TLV
transmission on a given port

Mode: INTERFACE continued


Command
Parameter list
{[port-vlan-id] [protocolno lldp tlv-select dot1tlv
vlan-id {all |<vlan-id>}]
[vlan-name {all | <vlanid>}]}
port-vlan-id
Port VLAN identifier TLV
protocol-vlan-id
Protocol VLAN identifier
TLV
vlan-name
VLAN name TLV
{ [macphy-config] [maxno lldp tlv-select dot3tlv
framesize] }
macphy-config
MAC or PHY TLV
max-framesize
Maximum frame size TLV
{transmit | receive}
no lldp
no negotiation
no spanning-tree bpdufilter
no spanning-tree loop-guard

no speed
no switchport

no switchport acceptable
frame-type
no switchport pvid
set-bridge port-type

{ providerNetworkPort |
customerNetworkPort }

Description
Configure dot1 TLV types
on a port

Configure dot3 TLV types


on a port

Enables reception and


transmission of LLDPDU
Disables auto-negotiation
on the interface
Disables BPDU filter on the
interface
Disables loop guard/
restricted forwarding on an
interface
Sets the speed of the
interface to its default value
To set the interface to the
routed-interface status and
to erase all layer 2
configurations
Sets acceptable frame type
on port to default value
Sets PVID for the port to
default value
Set port type to customer or
provider

Mode: INTERFACE continued


Command
Parameter list
{disable | enable}
spanning-tree bpdufilter
spanning-tree loop-guard

no lldp
no negotiation
no spanning-tree bpdufilter
no spanning-tree loopguard
spanning-tree
pseudoRootId priority

speed
switchport

switchport acceptableframe-type

Description
Disables or enables BPDU
filtering
Enables loop guard/
restricted forwarding on an
interface
{transmit | receive}
Enables reception and
transmission of LLDPDU
Disables auto-negotiation
on the interface
Disables BPDU filter on the
interface
Disables loop guard/
restricted forwarding on an
interface
<value(0-61440)> macSets the PseudoRoot mac
address <ucast_mac>
address and priority for the
spanning tree only in steps
of 4096
{ 10 | 100 | 1000 }
Set port speed to 10, 100, or
1000 Mbps
To put an interface that is in
Layer 3 mode into Layer 2
mode for Layer 2
configuration
{tagged |
Accept tagged or
untaggedAndPrioritytagged} untaggedAndPrioritytagged
<vlan-id(1-4094)> }

switchport pvid
{point-to-point | shared}
spanning-tree link-type

spanning-tree portfast

<value(0-240)>
spanning-tree port-priority

PVID value to be
configured on the port
The link can be a point-topoint link or can be a shared
LAN segment on which
another bridge is present
Specifies that port has only
hosts connected and hence
can transition to forwarding
rapidly
Set priority

Examples of INTERFACE mode commands.


Many of the INTERFACE mode commands will not show the result, but if you navigate
to EXEC mode and use the show spanning-tree detail command you can observe the
effect of the command.
spanning-tree restricted-tcn
(config-if)# spanning-tree restricted-tcn disable

spanning-tree pseudoRootId
(config-if)# spanning-tree pseudoRootId priority 4096 mac-address
00:15:24:00:44:56

Mode: VLAN_CONFIG
Command
no ports

Parameter list
[<interface-type> <0/ab,0/c,...>] [untagged
([<interface-type> <0/ab,0/c,...>] )] [forbidden
([<interface-type> <0/ab,0/c,...>]
[add]

ports
([<interface-type> <0/ab,0/c,...>]) [untagged
(<interface-type> <0/ab,0/c,...>)] [forbidden
<interface-type> <0/ab,0/c,...>]
vlan active

Description
Resets port list for the
VLAN

Configures port list for the


VLAN
NOTE: without the add
parameter present the
command will act like a
replace
Make the particular VLAN
active in the switch

Examples of VLAN mode commands.


To enter Vlan config mode you must first be on configure mode.
Example: (config)# vlan 200
By executing the above command you will create a vlan with id 200 if it does not exist
and enter vlan config mode for vlan with id 200, if the vlan already exists you will only
enter vlan config mode for that vlan.
Examples:
To add ports to a vlan .
(config-vlan)# ports add gigabitethernet 0/2

The above command will add port 2 to the vlan.


(config-vlan)# ports add gigabitethernet 0/2-4

The above command will add port 2, 3 and 4 to the vlan.


(config-vlan)# ports add gigabitethernet 0/2 untagged gigabitethernet
0/2

The above command will add port 2 to the vlan and to the untagged list.
(config-vlan)# ports gigabitethernet 0/3-4

The above command will add port 3 and 4 to the vlan. Note that the add parameter was
ommited, This actually turns the command into a replace command and will remove all
ports not in the list of ports.
To remove ports from a vlan.
(config-vlan)# no ports gigabitethernet 0/3-4

The above command will remove ports 3 and 4 from the vlan.
(config-vlan)# no ports gigabitethernet 0/3,0/7

The above command will remove ports 3 and 7 from the vlan.

Vous aimerez peut-être aussi