188
FiberstoreOS Ethernet Command Line Reference

S5800 Series Ethernet CLI | FS · 2017. 10. 26. · 11Layer2ProtocolsTunnelingCommands.....167 11.1l2protocolenable.....167

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

  • FiberstoreOS

    Ethernet Command Line Reference

  • Contents

    1 Interface Commands................................................................................................................................... 71.1 bandwidth.......................................................................................................................................................... 71.2 clear counters.....................................................................................................................................................81.3 description......................................................................................................................................................... 91.4 duplex.............................................................................................................................................................. 101.5 speed................................................................................................................................................................ 111.6 flowcontrol...................................................................................................................................................... 121.7 interface...........................................................................................................................................................131.8 interface range................................................................................................................................................. 141.9 interface range create vlan...............................................................................................................................151.10 jumboframe................................................................................................................................................... 161.11 system jumboframe size................................................................................................................................ 171.12 media-type.....................................................................................................................................................181.13 shutdown....................................................................................................................................................... 191.14 load-interval.................................................................................................................................................. 201.15 vlan dot1q tag native..................................................................................................................................... 211.16 show interface............................................................................................................................................... 221.17 show interface status..................................................................................................................................... 231.18 show interface summary................................................................................................................................241.19 show ip interface........................................................................................................................................... 251.20 switchport...................................................................................................................................................... 261.21 switchport access allowed............................................................................................................................. 271.22 switchport access vlan...................................................................................................................................281.23 switchport mode access.................................................................................................................................291.24 switchport mode trunk...................................................................................................................................291.25 switchport mode dot1q-tunnel.......................................................................................................................301.26 switchport mode trunk ingress-filter............................................................................................................. 311.27 switchport trunk allowed...............................................................................................................................321.28 switchport trunk native..................................................................................................................................33

    2 Interface Errdisable Commands..............................................................................................................352.1 errdisable detect...............................................................................................................................................352.2 errdisable recovery interval.............................................................................................................................362.3 errdisable recovery reason...............................................................................................................................372.4 errdisable flap..................................................................................................................................................382.5 show errdisable detect..................................................................................................................................... 392.6 show errdisable recovery.................................................................................................................................40

  • 2.7 show errdisable flap........................................................................................................................................ 41

    3 MAC Address Table Commands............................................................................................................ 423.1 mac-address-table ageing-time........................................................................................................................423.2 mac-address-table forward.............................................................................................................................. 433.3 mac-address-table discard............................................................................................................................... 443.4 clear mac address-table................................................................................................................................... 453.5 show mac address-table ageing-time...............................................................................................................463.6 show mac address-table...................................................................................................................................463.7 show mac address-table count.........................................................................................................................483.8 show mac-filter address-table..........................................................................................................................483.9 show resource mac-filter................................................................................................................................. 493.10 show resource static-fdb................................................................................................................................50

    4 VLAN Commands......................................................................................................................................524.1 vlan database................................................................................................................................................... 524.2 vlan replace dscp............................................................................................................................................. 534.3 vlan.................................................................................................................................................................. 544.4 vlan VLAN_LIST............................................................................................................................................554.5 show vlan.........................................................................................................................................................564.6 show vlan all....................................................................................................................................................564.7 show vlan brief................................................................................................................................................ 574.8 show interface switchport................................................................................................................................584.9 switchport access allowed............................................................................................................................... 594.10 switchport access vlan...................................................................................................................................604.11 switchport mode access................................................................................................................................. 604.12 switchport mode trunk...................................................................................................................................614.13 switchport mode trunk ingress-filter............................................................................................................. 624.14 switchport trunk allowed...............................................................................................................................634.15 switchport trunk native..................................................................................................................................644.16 vlan bridge disable........................................................................................................................................ 65

    5 Voice VLAN Commands.......................................................................................................................... 675.1 voice vlan........................................................................................................................................................ 675.2 voice vlan security enable............................................................................................................................... 685.3 voice vlan set phb to........................................................................................................................................685.4 voice vlan mac-address................................................................................................................................... 705.5 voice vlan enable.............................................................................................................................................715.6 show voice vlan state.......................................................................................................................................725.7 debug voice-vlan............................................................................................................................................. 73

    6 VLAN Classification Commands............................................................................................................746.1 vlan classifier activate..................................................................................................................................... 746.2 vlan classifier group........................................................................................................................................ 756.3 vlan classifier rule........................................................................................................................................... 766.4 show vlan classifier group...............................................................................................................................786.5 show vlan classifier interface.......................................................................................................................... 79

  • 6.6 show vlan classifier rule..................................................................................................................................806.7 show resource vlan-classification....................................................................................................................80

    7 VLANMaping Commands...................................................................................................................... 827.1 ethernet evc..................................................................................................................................................... 827.2 dot1q mapped-vlan..........................................................................................................................................837.3 dot1q mapped-double-vlan..............................................................................................................................837.4 vlan mapping table.......................................................................................................................................... 847.5 raw-vlan...........................................................................................................................................................857.6 show vlan mapping table.................................................................................................................................867.7 show vlan mapping table applied-interface.....................................................................................................877.8 switchport mode.............................................................................................................................................. 887.9 switchport dot1q-tunnel type...........................................................................................................................887.10 switchport dot1q-tunnel native......................................................................................................................897.11 switchport dot1q-tunnel allow vlan...............................................................................................................907.12 switchport dot1q-tunnel vlan mapping table.................................................................................................917.13 switchport trunk vlan-translation.................................................................................................................. 927.14 switchport trunk vlan-translation mapping table...........................................................................................937.15 vlan dot1q tag native..................................................................................................................................... 947.16 show resource vlan-mapping.........................................................................................................................94

    8 Link Aggregation Commands................................................................................................................. 968.1 channel-group..................................................................................................................................................968.2 static-channel-group........................................................................................................................................ 978.3 lacp port-priority............................................................................................................................................. 988.4 lacp timeout..................................................................................................................................................... 998.5 lacp system-priority.......................................................................................................................................1008.6 port-channel load-balance............................................................................................................................. 1018.7 show channel-group summary...................................................................................................................... 1028.8 show channel-group detail............................................................................................................................ 1038.9 show lacp internal..........................................................................................................................................1048.10 show lacp internal detail..............................................................................................................................1058.11 show lacp neighbor......................................................................................................................................1088.12 show lacp neighbor detail............................................................................................................................1108.13 show channel-group port............................................................................................................................. 1138.14 show lacp counters...................................................................................................................................... 1178.15 show lacp sys-id.......................................................................................................................................... 1188.16 clear lacp counters....................................................................................................................................... 119

    9 MSTP Commands.................................................................................................................................... 1209.1 spanning-tree enable......................................................................................................................................1209.2 spanning-tree priority.................................................................................................................................... 1219.3 spanning-tree instance priority...................................................................................................................... 1229.4 spanning-tree forward-time........................................................................................................................... 1239.5 spanning-tree hello-time................................................................................................................................1249.6 spanning-tree max-age.................................................................................................................................. 125

  • 9.7 spanning-tree max-hops................................................................................................................................ 1269.8 spanning-tree transmit-holdcount..................................................................................................................1279.9 spanning-tree edgeport bpdu-guard...............................................................................................................1279.10 spanning-tree edgeport bpdu-filter.............................................................................................................. 1289.11 spanning-tree port........................................................................................................................................1299.12 spanning-tree port-priority.......................................................................................................................... 1309.13 spanning-tree pathcost-standard..................................................................................................................1319.14 spanning-tree path-cost............................................................................................................................... 1329.15 spanning-tree link-type................................................................................................................................1339.16 spanning-tree edgeport................................................................................................................................ 1349.17 spanning-tree edgeport bpdu-guard.............................................................................................................1359.18 spanning-tree edgeport bpdu-filter.............................................................................................................. 1369.19 spanning-tree guard root..............................................................................................................................1379.20 spanning-tree guard loop.............................................................................................................................1389.21 spanning-tree force-version.........................................................................................................................1399.22 spanning-tree restricted-tcn......................................................................................................................... 1409.23 spanning-tree restricted-role........................................................................................................................1409.24 spanning-tree mode..................................................................................................................................... 1419.25 spanning-tree instance port-priority............................................................................................................ 1429.26 spanning-tree instance path-cost................................................................................................................. 1439.27 spanning-tree instance restricted-tcn...........................................................................................................1449.28 spanning-tree instance restricted-role..........................................................................................................1459.29 spanning-tree mst configuration..................................................................................................................1469.30 instance........................................................................................................................................................1479.31 region...........................................................................................................................................................1489.32 revision........................................................................................................................................................ 1499.33 clear spanning-tree detected protocols........................................................................................................ 1509.34 clear spanning-tree disabled-port................................................................................................................ 1509.35 show spanning-tree......................................................................................................................................1519.36 show spanning-tree interface.......................................................................................................................1529.37 show spanning-tree brief............................................................................................................................. 1549.38 show spanning-tree disabled-port................................................................................................................1559.39 show spanning-tree mst...............................................................................................................................1559.40 show spanning-tree mst config....................................................................................................................1569.41 show spanning-tree mst detail..................................................................................................................... 1579.42 show spanning-tree mst instance.................................................................................................................1599.43 show spanning-tree mst interface................................................................................................................1609.44 show spanning-tree mst brief...................................................................................................................... 1619.45 spanning-tree instance forward................................................................................................................... 162

    10 Flow Control Commands......................................................................................................................16410.1 flowcontrol send..........................................................................................................................................16410.2 flowcontrol receive......................................................................................................................................16510.3 show flowcontrol.........................................................................................................................................165

  • 11 Layer 2 Protocols Tunneling Commands.......................................................................................... 16711.1 l2protocol enable......................................................................................................................................... 16711.2 l2protocol tunnel-dmac................................................................................................................................16711.3 l2protocol mac............................................................................................................................................. 16811.4 l2protocol.....................................................................................................................................................16911.5 l2protocol uplink enable.............................................................................................................................. 17011.6 show l2protocol........................................................................................................................................... 17111.7 l2protocol cos.............................................................................................................................................. 17211.8 l2protocol full-mac...................................................................................................................................... 173

    12 Storm Control Commands....................................................................................................................17512.1 storm-control............................................................................................................................................... 17512.2 show storm-control......................................................................................................................................17612.3 ipg storm-control enable..............................................................................................................................177

    13 MLAG Commands.................................................................................................................................17813.1 mlag configuration...................................................................................................................................... 17813.2 peer-address.................................................................................................................................................17913.3 peer-link.......................................................................................................................................................17913.4 timers mlag..................................................................................................................................................18013.5 reload-delay.................................................................................................................................................18113.6 mlag.............................................................................................................................................................18313.7 clear mlag count.......................................................................................................................................... 18413.8 show mlag................................................................................................................................................... 18513.9 show mlag peer............................................................................................................................................18613.10 show mlag interface.................................................................................................................................. 188

  • 7

    1 Interface Commands

    1.1 bandwidthUse this command to set the bandwidth of the port.

    To return the bandwidth to default value, use the no form of this command.

    Command Syntax

    bandwidth bandwidth

    no bandwidth

    bandwidth port bandwidth, in kilobits

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    None

    Examples

    The following example set the bandwidth of the port:

    Switch(config)# interface eth-0-1

    Switch(config-if)# bandwidth 1000

    The following example returns the bandwidth to default value:

  • 8

    Switch(config-if)# no bandwidth

    Related Commands

    duplex

    speed

    1.2 clear countersUse this command to clear the counters on the physical interface.

    Command Syntax

    clear counters (IFNAME |)

    IFNAME Only clear the specified interface statistics

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    The clear counters command clears all current interface counters from the interface unless you specifyoptional arguments that clear only a specific interface type from a specific interface number.

    Examples

    The following example clears the counters on all interfaces:

    Switch# clear counters

    The following example clears the counters on the interface eth-0-1:

    Switch# clear counters eth-0-1

  • 9

    The following example clears the counters on the agg1:

    Switch# clear counters agg1

    Related Commands

    None

    1.3 descriptionUse this command to set the description on the interface.

    To remove the description on the interface, use the no form of this command.

    Command Syntax

    description LINE

    no description

    LINE The description on the interface, should be no more than 20 characters, andthe character must be “0-9A-Za-z.-_” with alphabet as prefix

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    None

    Examples

    The following example sets the description on the interface:

    Switch(config)# interface eth-0-1

    Switch(config-if)# description Ethernet

    The following example removes the description on the interface:

  • 10

    Switch(config-if)# no description

    Related Commands

    None

    1.4 duplexUse the duplex interface configuration command to specify the duplex mode of operation for a port.Use the no form of this command to return the port to its default value.

    Command Syntax

    duplex (auto |full |half)

    no duplex

    auto Enable automatic duplex configuration; port automatically detects whether itshould run in full-duplex or half-duplex mode, depending on the attacheddevice mode

    full Enable full-duplex mode

    half Enable half-duplex mode (only for interfaces operating at 10 or 100 Mb/s).You can not configure half-duplex mode for interfaces operating at 1000or10,000 Mb/s

    Command Mode

    Interface Configuration

    Default

    Auto

    Usage

    The command is not allowed to be set on 10G port or optical mode of combo port.

    Examples

    The following example sets the duplex mode to auto:

    Switch(config)# interface eth-0-1

  • 11

    Switch(config-if)# duplex auto

    The following example sets the duplex mode to full:

    Switch(config-if)# duplex full

    The following example returns the duplex mode to default:

    Switch(config-if)# no duplex

    Related Commands

    bandwidth

    speed

    1.5 speedUse the speed interface configuration command to specify the speed of a 10/100 Mb/s or 10/100/1000Mb/s port. Use the no of this command to return the port to its default value.

    Command Syntax

    speed (10 |100 |1000 |auto)

    no speed

    auto Port automatically detects the speed it should run

    10 Port runs at 10 Mb/s

    100 Port runs at 100 Mb/s

    1000 Port runs at 1000 Mb/s

    Command Mode

    Interface Configuration

    Default

    Auto

  • 12

    Usage

    The command is not allowed to be set on 10G port or optical mode of combo port.

    Examples

    This example shows how to set the speed on a port to 1000 Mb/s:

    Switch(config)# interface eth-0-1

    Switch(config-if)# speed 1000

    This example shows how to return the speed on a port to default value:

    Switch(config-if)# no speed

    Related Commands

    bandwidth

    duplex

    1.6 flowcontrolUse the flowcontrol interface configuration command to control the packet flow.

    Command Syntax

    flowcontrol (send|receive) (on|off)

    send Input direction

    receive Ouput direction

    on Enable flow control

    off Disable flow control

    Command Mode

    Interface Configuration

  • 13

    Default

    Disabled

    Usage

    By default, flow control is disabled.

    Examples

    The following example sets the flow control on in the tx direction:

    Switch(config)# interface eth-0-1

    Switch(config-if)# flowcontrol send on

    The following example sets the flow control on in the rx direction:

    Switch(config-if)# flowcontrol receive on

    Related Commands

    None

    1.7 interfaceUse this command to enter interface mode.

    Command Syntax

    interface IFNAME

    IFNAME The name of interface, i.e. eth-0-1, agg1, vlan1,loopback1

    Command Mode

    Global Configuration

    Default

    None

  • 14

    Usage

    The interface name can be either a port name (i.e. eth-0-1) or link-agg name (i.e. agg1) or vlan name(i.e. vlan2) or loop-back name (i.e. loopback10).

    Examples

    The following example enters the interface mode for eth-0-1:

    Switch(config)# interface eth-0-1

    The following example enters the interface mode for agg1:

    Switch(config)# interface agg1

    The following example enters the interface mode for vlan2:

    Switch(config)# interface vlan2

    Related Commands

    exit

    1.8 interface rangeUse this command to operate a list of interfaces, the interface include physical port, vlan interface,linkagg interface and loopback interface.

    Command Syntax

    interface range IFNAME

    IFNAME Interface range, can be separate by comma, dash

    Command Mode

    Global Configuration

    Default

    None

  • 15

    Usage

    None

    Examples

    The following example operate a list of physical interface:

    Switch(config)# interface range eth-0-1 – 24

    Switch(config-if-range)# shutdown

    The following example operate a list of vlan interface:

    Switch(config)# interface range vlan 1 - 20

    Switch(config-if-range)# shutdown

    The following example operate a list of linkagg interface:

    Switch(config)# interface range agg 10 - 20

    Switch(config-if-range)# shutdown

    The following example operate a list of loopback interface:

    Switch(config)# interface range loopback 0 - 5

    Switch(config-if-range)# shutdown

    Related Commands

    None

    1.9 interface range create vlanUse this command to create a list of vlan interface.

    Command Syntax

    interface range create vlan vid-range

    vid-range VLAN ID range, can be separate by comma, dash

  • 16

    Command Mode

    Global Configuration

    Default

    None

    Usage

    None

    Examples

    The following example create vlan interface 10 to 20:

    Switch(config)# interface range create vlan 10 - 20

    Switch(config-if-range)# shutdown

    Related Commands

    None

    1.10 jumboframeUse this command to enable jumbo frame. To disable jumbo frame, use the no form of this command.

    Command Syntax

    jumboframe enable

    no jumboframe enable

    Command Mode

    Interface Configuration

    Default

    Default is disabled.

  • 17

    Usage

    Jumboframe is disabled by default. The max frame which can be transmitted is 1534 bytes. Whenenable jumboframe, the max frame can be 9600 bytes.

    Examples

    The following example enables the jumboframe:

    Switch(config)# interface eth-0-1

    Switch(config-if)# jumboframe enable

    The following example disables the jumboframe:

    Switch(config-if)# no jumboframe enable

    Related Commands

    None

    1.11 system jumboframe sizeUse this command to set jumbo frame size.

    To return to default jumbo frame size, use the no form of this command.

    Command Syntax

    system jumboframe size SIZE

    no system jumboframe size

    SIZE Frame size of max jumbo frame, the range is 9216~16096

    Command Mode

    Global Configuration

    Default

    9600

  • 18

    Usage

    When jumboframe is enable, by default, the max frame size which can be transmitted is 9600 bytes.Use this command this set the max frame size.

    Examples

    The following example shows how to set the max jumboframe size:

    Switch(config)# system jumboframe size 16906

    Related Commands

    jumboframe

    1.12media-typeUse the media-type interface configuration command to select a media type for an interface. Use the noform of this command restore to the default value.

    Command Syntax

    media-type (auto-select|rj45|sfp)

    no media-type

    auto-select Enable the switch to dynamically select the type based on which one first linksup

    rj45 Select the RJ-45 interface

    sfp Select the small form-factor pluggable (SFP) module interface

    Command Mode

    Interface Configuration

    Default

    Auto-select

    Usage

    By default, we use auto-select mode.

  • 19

    Examples

    The following example shows how to configure the interface as a rj45 media:

    Switch(config)# interface eth-0-1

    Switch(config-if)# media-type rj45

    The following example shows how to restore to default value:

    Switch(config-if)# no media-type

    Related Commands

    None

    1.13 shutdownUse the shutdown interface configuration command to admin down an interface. Use the no form ofthis command to admin up an interface.

    Command Syntax

    shutdown

    no shutdown

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    None

    Examples

    The following example shows how to shutdown a port:

    Switch(config)# interface eth-0-1

    Switch(config-if)# shutdown

  • 20

    The following example shows how to admin up a port:

    Switch(config-if)# no shutdown

    Related Commands

    None

    1.14 load-intervalUse the load-inteval interface configuration command to specify the interval when calculating speed ofan interface. Use the no of this command to return the port to its default value.

    Command Syntax

    load-interval seconds

    no load-interval

    seconds Load interval in seconds, the range is 30~600

    Command Mode

    Interface Configuration

    Default

    300 seconds

    Usage

    Load-interval must be in increments of 30 second and its default value is 300 second.

    Examples

    This example shows how to set the load-interval on a port to 600 second:

    Switch(config)# interface eth-0-1

    Switch(config-if)# load-interval 600

  • 21

    This example shows how to return the load-interval on a port to default value:

    Switch(config-if)# no load-interval

    Related Commands

    show interface

    1.15 vlan dot1q tag nativeUse the vlan dot1q tag native global configuration command to configure the edge switch so that allpackets going out an 802.1Q trunk, including the native VLAN.

    Command Syntax

    vlan dot1q tag native

    no vlan dot1q tag native

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    If the switch is configured to tag native VLAN packets on all 802.1Q trunks, the switch acceptsuntagged packets, but sends only tagged packets. By default, vlan dot1q tag native is disabled.

    Examples

    This example shows how to tag native for trunk port:

    Switch(config)# interface eth-0-1

    Switch(config-if)# vlan dot1q tag native

    This example shows how to disable tagging native for trunk port:

    Switch(config-if)# no vlan dot1q tag native

  • 22

    Related Commands

    None

    1.16 show interfaceUse this command to display the configurations and statistics on all interfaces or an interface.

    Command Syntax

    show interface (IFNAME | )

    IFNAME The interface name, can be eth, vlan or agg

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    This example shows how to display the configurations and statistics on the interface eth-0-1.

    Switch# show interface eth-0-1

    Interface eth-0-1

    Interface current state: Administratively DOWN

    Hardware is Ethernet, address is bc3e.60b2.1601 (bia bc3e.60b2.1601)

    Bandwidth 1000000 kbits

    Index 1 , Metric 1 , Encapsulation ARPA

    Speed - 1000Mb/s , Duplex - Full , Media type is 1000BASE_T

    Link speed type is autonegotiation, Link duplex type is autonegotiation

    Input flow-control is off, output flow-control is off

    The Maximum Frame Size is 1534 bytes

    VRF binding: not bound

    Label switching is disabled

    No virtual circuit configured

    ARP timeout 01:00:00, ARP retry interval 1s

  • 23

    5 minute input rate 0 bits/sec, 0 packets/sec

    5 minute output rate 0 bits/sec, 0 packets/sec

    0 packets input, 0 bytes

    Received 0 unicast, 0 broadcast, 0 multicast

    0 runts, 0 giants, 0 input errors, 0 CRC

    0 frame, 0 overrun, 0 pause input

    0 input packets with dribble condition detected

    0 packets output, 0 bytes

    Transmitted 0 unicast, 0 broadcast, 0 multicast

    0 underruns, 0 output errors, 0 pause output

    Related Commands

    show interface status

    1.17 show interface statusUse this command to display the brief information on all Ethernet and link aggregation interfaces.

    Command Syntax

    show interface (IFNAME| ) status

    IFNAME The interface name, can be eth, agg

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    This command will not show VLAN and tunnel interfaces’ information.

    Examples

    This example shows how to display the brief information on all Ethernet and LAG interfaces:

    Switch# show interface status

    Port Status Duplex Speed Mode Type Description

    -----------------------------------------------------------------

  • 24

    eth-0-1 down a-full a-1000 ACCESS 1000BASE_T

    eth-0-2 down a-full a-1000 ACCESS 1000BASE_T

    eth-0-3 admin down auto auto ACCESS 1000BASE_T

    eth-0-4 admin down auto auto ACCESS 1000BASE_T

    eth-0-5 up a-full a-1000 routed 1000BASE_T

    eth-0-6 up a-full a-100 ACCESS 1000BASE_T

    eth-0-7 admin down auto auto ACCESS 1000BASE_T

    eth-0-8 admin down auto auto ACCESS 1000BASE_T

    eth-0-9 down a-full a-1000 ACCESS 1000BASE_T

    eth-0-10 down a-full a-1000 ACCESS 1000BASE_T

    eth-0-11 admin down auto auto ACCESS 1000BASE_T

    eth-0-12 admin down auto auto ACCESS 1000BASE_T

    eth-0-13 admin down auto auto ACCESS 1000BASE_T

    eth-0-14 admin down auto auto ACCESS 1000BASE_T

    eth-0-15 admin down auto auto ACCESS 1000BASE_T

    eth-0-16 admin down auto auto ACCESS 1000BASE_T

    eth-0-17 admin down auto auto ACCESS 1000BASE_T

    eth-0-18 admin down auto auto ACCESS 1000BASE_T

    eth-0-19 admin down auto auto ACCESS 1000BASE_T

    eth-0-20 admin down auto auto ACCESS 1000BASE_T

    Related Commands

    None

    1.18 show interface summaryUse this command to display the summary on all interfaces or an interface.

    Command Syntax

    show interface (IFNAME|) summary

    IFNAME The interface name

    Command Mode

    Privileged EXEC

    Default

    None

  • 25

    Usage

    This command will display the summary on all interfaces or an interface in the form of list.

    Examples

    This example shows how to display the summary on the interface eth-0-1.

    Switch# show interface eth-0-1 summary

    RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec)

    TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec)

    Interface Link RXBS RXPS TXBS TXPS

    -----------------------------------------------------------------------------

    eth-0-1 DOWN 2 0 0 0

    Related Commands

    show interface

    1.19 show ip interfaceUse this command to show layer3 interface information.

    Command Syntax

    show ip interface (IFNAME|)

    show ip interface brief

    IFNAME The interface name, can be eth, vlan or agg

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

  • 26

    Examples

    This example shows the vlan interface information:

    Switch# show interface vlan10

    Interface vlan10

    Interface current state: DOWN

    Hardware is VLAN, address is 8633.d260.6500 (bia 8633.d260.6500)

    Bandwidth 1000000 kbits

    Index 4098 , Metric 1 , Encapsulation ARPA

    The maximum transmit unit (MTU) is 1500 bytes

    VRF binding: not bound

    Label switching is disabled

    No virtual circuit configured

    VRRP master of : VRRP is not configured on this interface

    ARP timeout 01:00:00, ARP retry interval 1s

    Related Commands

    None

    1.20 switchportUse this command to configure a port to a bridge (layer 2) or routing (layer 3) mode.

    Command Syntax

    switchport

    no switchport

    Command Mode

    Interface Configuration

    Default

    Switchport

    Usage

    When using this command to change the mode of a port, all bridge or routing configurations of this portwill be cleared and not restored. By default, the port is a switchport.

  • 27

    Examples

    This example shows how to configure a port to bridge mode:

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport

    This example shows how to configure a port to routing mode:

    Switch(config-if)# no switchport

    Related Commands

    None

    1.21 switchport access allowedUse this command to configure whether the specified VLAN flow can pass this access port.

    Command Syntax

    switchport access allowed vlan (add | ove) vid

    add Allow the specified VLAN packet pass through this port

    remove Forbid the specified VLAN packet pass through this port

    vid VLAN ID

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    This command is used for vlan classification or dot1x guest vlan.

  • 28

    Examples

    This example shows how to configure the specified VLAN flow pass through the port:

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport access allowed vlan add 10

    Related Commands

    switchport trunk allowed vlan (add vid | remove vid| all | none)

    1.22 switchport access vlanUse this command to set the default VLAN for access port.

    Command Syntax

    switchport access vlan vid

    no switchport access vlan

    vid VLAN ID

    Command Mode

    Interface Configuration

    Default

    1

    Usage

    Before this command is used, port must be set to access port. By default, VLAN should be 1.

    Examples

    This example shows how to configure the access port to add to default vlan 10:

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport mode access

    Switch(config-if)# switchport access vlan 10

  • 29

    This example shows how to configure the access port to restore to default vlan 1:

    Switch(config-if)# no switchport access vlan

    Related Commands

    switchport trunk native

    1.23 switchport mode accessUse this command to configure the port work in access mode.

    Command Syntax

    switchport mode access

    Command Mode

    Interface Configuration

    Default

    Access port

    Usage

    When port mode changed, all the dynamic FDB will be cleared.

    Examples

    This example shows how to configure the port to access mode.

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport mode access

    Related Commands

    switchport mode trunk

    1.24 switchport mode trunkUse this command to configure the port work in trunk mode.

  • 30

    Command Syntax

    switchport mode trunk

    Command Mode

    Interface Configuration

    Default

    Access port

    Usage

    When port mode changed, all the dynamic FDB will be cleared.

    Examples

    This example shows how to configure the port to trunk mode.

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport mode trunk

    Related Commands

    switchport mode access

    1.25 switchport mode dot1q-tunnelUse this command to configure the port as QINQ port.

    Command Syntax

    switchport mode dot1q-tunnel

    Command Mode

    Interface Configuration

    Default

    Access Port

  • 31

    Usage

    When port mode changed, all the dynamic FDB will be cleared.

    Examples

    This example shows how to configure the port to QINQ mode.

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport mode dot1q-tunnel

    Related Commands

    switchport mode trunk

    1.26 switchport mode trunk ingress-filterUse this command to enable or disable VLAN ingress filter.

    Command Syntax

    switchport mode trunk ingress-filter (enable|disable)

    enable Enable the VLAN ingress filter

    disable Disable the VLAN ingress filter

    Command Mode

    Interface Configuration

    Default

    Ingress filter Enabled

    Usage

    This command should only be used with trunk port. If ingress filter check enabled, the port should onlyreceive packet of allowed VLANs; otherwise if ingress filter check disabled, the port should allowpacket of all VLANs.

  • 32

    Examples

    This example shows how to configure enable vlan ingress filter.

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport mode trunk

    Switch(config-if)# switchport mode trunk ingress-filter enable

    Related Commands

    switchport mode trunk

    1.27 switchport trunk allowedUse this command to configure whether the specified VLAN flow can pass this trunk port.

    Command Syntax

    switchport trunk allowed vlan (add vid | remove vid | all | none)

    add vid Allow the specified VLAN flow pass through this port

    remove vid Forbid the specified VLAN flow pass through this port

    all Allow all the VLAN flow pass through this port

    none Forbid all the VLAN flow pass through this port

    Command Mode

    Interface Configuration

    Default

    1

    Usage

    None

    Examples

    This example shows how to configure the specified VLAN flow pass through the port:

  • 33

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport trunk allowed vlan add 10

    This example shows how to configure the all VLAN flow pass through the port:

    Switch(config-if)# switchport trunk allowed vlan all

    This example shows how to configure the all VLAN flow can not pass through the port:

    Switch(config-if)# switchport trunk allowed vlan none

    Related Commands

    switchport access allowed vlan (add|remove) vid

    1.28 switchport trunk nativeUse this command to configure the default VLAN for this trunk port.

    Command Syntax

    switchport trunk native vlan vid

    vid VLAN ID, range is 2-4094

    Command Mode

    Interface Configuration

    Default

    1

    Usage

    Before this command is used, port must be set to trunk port.

    Examples

    This example shows how to configure default vlan 10 for trunk port:

  • 34

    Switch(config)# interface eth-0-1

    Switch(config-if)# switchport mode trunk

    Switch(config-if)# switchport trunk native vlan 10

    Related Commands

    switchport access vlan vid

  • 35

    2 Interface Errdisable Commands

    2.1 errdisable detectUse the interface errdisable detects configuration command to enable errdisable detection. Use the noform of this command to disable errdisable detection.

    Command Syntax

    errdisable detect reason (link-flap | udld | fdb-loop)

    no errdisable detect reason (link-flap | udld | fdb-loop)

    link-flap Enable detect Link flap error

    udld Enable detect UDLD error

    fdb-loop Enable detect FDB loop error

    Command Mode

    Global Configuration

    Default

    Enabled

    Usage

    Only the link flap can be configured, other errdisable reason can not be configured.

    Examples

    This example shows how to enable errdisable detect link flap:

    Switch(config)# errdisable detect reason link-flap

  • 36

    This example shows how to disable errdisable detect link flap:

    Switch(config)# no errdisable detect reason link-flap

    Related Commands

    show errdisable detect

    2.2 errdisable recovery intervalUse this command to set the specified timer to recover from the errdisable state. Use the no form of thiscommand to restore to the default interval.

    Command Syntax

    errdisable recovery interval RANGE

    no errdisable recovery interval

    RANGE Recovery interval range in seconds, from 30~86400

    Command Mode

    Global Configuration

    Default

    300

    Usage

    The change of interval will not affect already started errdisable recovery timer.

    Examples

    This example shows how to set errdisable recovery to 30 seconds.

    Switch(config)# errdisable recovery interval 30

    This example shows how to set errdisable recovery to default values.

    Switch(config)# no errdisable recovery interval

  • 37

    Related Commands

    errdisable recovery reason

    show errdisable recovery

    2.3 errdisable recovery reasonUse this command to enable error disable detection for a specified cause or all cause. Use the no formof this command to disable the error disable feature.

    Command Syntax

    errdisable recovery reason (all|bpduguard | bpduloop| port-security|link-flap|link-monitor-failure | oam-remote-failure|udld| fdb-loop)

    no errdisable recovery reason (all|bpduguard | bpduloop| port-security|link-flap|link-monitor-failure | oam-remote-failure|udld| fdb-loop)

    all Enable timer to recover from all reason

    bpduguard Enable timer to recover from BPDU Guard error disable state

    bpduloop Enable timer to recover from BPDU Loopback error disable state

    port-security Enable timer to recover from Port security failure

    link-flap Enable timer to recover from Link flap failure

    link-monitor-failure Enable timer to recover from link monitoring failure

    oam-remote-failure Enable timer to recover from OAM detected remote failure

    udld Enable timer to recover from UDLD failure

    fdb-loop Enable timer to recover from FDB loop

    Command Mode

    Global Configuration

    Default

    Disabled

    Usage

    The change of reason will not affect those interfaces have already enter errdisable state.

  • 38

    Examples

    This example shows how to enable link flap errdisable recovery:

    Switch(config)# errdisable recovery reason link-flap

    This example shows how to disable link flap errdisable recovery:

    Switch(config)# no errdisable recovery reason link-flap

    Related Commands

    errdisable recovery interval

    show errdisable recovery

    2.4 errdisable flapUse this command to set the parameters for link-flap error disable. Use the no form of this command torestore to default value.

    Command Syntax

    errdisable flap reason link-flap count seconds

    no errdisable flap reason link-flap

    link-flap Configure link flap conditions

    count Max flap count, the range is 1~100

    seconds Flap count time in seconds, the range is 1~120

    Command Mode

    Global Configuration

    Default

    count = 10, seconds = 10

  • 39

    Usage

    Only the link flap can be detected. is the threshold of flap count, and is the counttime in seconds for flap count. If the errdisable detect link flap is enabled, will result in link flaperrdisable, otherwise, will only print a message in log.

    Examples

    This example shows how to set link flap conditions to 20 times in 60 seconds:

    Switch(config)# errdisable flap reason link-flap 20 60

    This example shows how to disable link flap conditions to default:

    Switch(config)# no errdisable flap reason link-flap

    Related Commands

    show errdisable flap

    2.5 show errdisable detectUse this command to display the error disable detection reason.

    Command Syntax

    show errdisable detect

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    Switch# show errdisable detect

    ErrDisable Reason Detection status

  • 40

    ----------------- ----------------

    bpduguard Enabled

    bpduloop Enabled

    link-monitor-failure Enabled

    oam-remote-failure Enabled

    port-security Enabled

    link-flap Enabled

    monitor-link Enabled

    udld Enabled

    fdb-loop Enabled

    Related Commands

    errdisable detect

    2.6 show errdisable recoveryUse this command to display the error disable recovery timer.

    Command Syntax

    show errdisable recovery

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    Switch# show errdisable recovery

    ErrDisable Reason Timer Status

    ----------------- --------------

    bpduguard Disabled

    bpduloop Disabled

    link-monitor-failure Disabled

    oam-remote-failure Disabled

    port-security Disabled

    link-flap Enabled

    udld Disabled

  • 41

    Timer interval: 300 seconds

    Related Commands

    errdisable recovery interval

    errdisable recovery reason

    2.7 show errdisable flapUse this command to display error disable link flap parameters.

    Command Syntax

    show errdisable flap

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    Switch# show errdisable flap

    ErrDisable Reason Flaps Time (sec)

    ----------------- ------ ----------

    link-flap 10 10

    Related Commands

    errdisable flap

  • 42

    3 MACAddress Table Commands

    3.1mac-address-table ageing-timeUse the mac-address-table aging-time global configuration command on the switch to set the length oftime that a dynamic entry remains in the MAC address table after the entry is used or updated. Use theno form of this command to return to the default setting. The aging time applies to all VLANs.

    Command Syntax

    mac-address-table ageing-time ageing-time

    no mac-address-table ageing-time

    ageing-time Aging time in seconds. The range is 10 to 1000000 seconds

    Command Mode

    Global Configuration

    Default

    The default is 300 seconds

    Usage

    If packets are not received continuously, user can increase the aging time to make the system recordingthe dynamic entries for a longer time. Increasing the time can reduce the possibility of flooding whenthe hosts send again.

    Examples

    This example shows how to set the aging time to 200 seconds for all VLANs.

    Switch(config)# mac-address-table ageing-time 200

  • 43

    Related Commands

    show mac address-table ageing-time

    3.2mac-address-table forwardUse the mac-address-table forward global configuration command on the switch to add static addressesto the MAC address table. Use the no form of this command to remove static entries from the table.

    Command Syntax

    mac-address-table mac-addr forward interface-id vlan vlan-id

    no mac-address-table mac-addr forward interface-id vlan vlan-id

    mac-addr Destination MAC address (unicast or multicast) to add to the address table.Packets with this destination address received in the specified VLAN areforwarded to the specified interface

    interface-id Interface to which the received packet is forwarded. Valid interfaces includephysical ports and link aggregation ports

    vlan-id Specify the VLAN for which the packet with the specified MAC address isreceived. The range is 1 to 4094

    Command Mode

    Global Configuration

    Default

    None

    Usage

    The static address entries which are added by this command are not aged.

    Examples

    This example shows how to add the static address c2f3.220a.12f4 to the MAC address table. When apacket is received in VLAN 4 with this MAC address as its destination, the packet is forwarded to thespecified interface:

    Switch(config)# mac-address-table c2f3.220a.12f4 forward eth-0-1 vlan 4

  • 44

    Related Commands

    show mac address-table

    3.3mac-address-table discardUse the mac-address-table discard global configuration command on the switch to enable unicast MACaddress filtering and to configure the switch to drop traffic with a specific source or destination MACaddress. Use the no form of this command to return to the default setting.

    Command Syntax

    mac-address-table mac-addr discard

    no mac-address-table mac-addr discard

    mac-addr Source or Destination MAC address (unicast) to add to the address filteringtable

    Command Mode

    Global Configuration

    Default

    None

    Usage

    Follow these guidelines when using this feature:

    Multicast MAC addresses, broadcast MAC addresses, and router MAC addresses are not supported.Packets that are forwarded to the CPU are also not supported.

    Examples

    This example shows how to enable unicast MAC address filtering and to configure the switch to droppackets that have a source or destination address of c2f3.220a.12f4.When a packet is received with thisMAC address as its source or destination, the packet is dropped:

    Switch(config)# mac-address-table c2f3.220a.12f4 discard

    Related Commands

    mac-address-table forward

  • 45

    3.4 clear mac address-tableUse the clear mac address-table privileged EXEC command on the switch to delete a specific dynamicaddress, all dynamic addresses on a particular interface, all dynamic addresses on stack members, or alldynamic addresses on a particular VLAN from the MAC address table.

    Command Syntax

    clear mac address-table (static | dynamic| multicast) (address mac-addr | interface interface-id |vlan vlan-id)

    dynamic Delete the dynamic MAC address

    static Delete the static MAC address

    multicast Delete the multicast MAC address

    address mac-addr Delete the specified MAC address

    interfaceinterface-id

    Delete all MAC addresses on the specified physical port or link aggregationport

    vlan vlan-id Delete all MAC addresses for the specified VLAN. The range is 1 to 4094

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    This example shows how to remove a specific MAC address from the dynamic address table:

    Switch# clear mac address-table dynamic address 0008.0070.0007

    Related Commands

    show mac address-table

  • 46

    3.5 show mac address-table ageing-timeUse the show mac address-table ageing-time privileged EXEC command to display the aging time ofall address table instances on all VLANs.

    Command Syntax

    show mac address-table ageing-time

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    This is an example of output from the show mac address-table ageing-time command:

    Switch# show mac address-table ageing-time

    MAC address table ageing time is 300 seconds

    Related Commands

    mac-address-table ageing-time

    3.6 show mac address-tableUse the show mac address-table privileged EXEC command to display a specific MAC address tablestatic and dynamic entry or the MAC address table static and dynamic entries on a specific interface orVLAN.

    Command Syntax

    show mac address-table (dynamic | static | multicast | ) (address mac-addr | interface interface-id |vlan vlan-id | )

  • 47

    dynamic Display the dynamic MAC address

    static Display the static MAC address

    multicast Display the multicast MAC address

    address mac-addr Display the specified MAC address

    interfaceinterface-id

    Display all MAC addresses on the specified physical port or link aggregationport

    vlan vlan-id Display all MAC addresses for the specified VLAN. The range is 1 to 4094

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    This is an example of output from the show mac address-table command:

    Switch# show mac address-table

    Mac Address Table

    -------------------------------------------

    (*) - Security Entry

    Vlan Mac Address Type Ports

    ---- ----------- -------- -----

    1 0000.0000.0001 static eth-0-2

    1 0000.0001.0003 static(*) eth-0-1

    1 0000.0001.0002 static(*) eth-0-1

    2 26fc.72e5.0100 dynamic(*) eth-0-9

    1 0100.0000.0001 static eth-0-2

    eth-0-1

    Related Commands

    mac-address-table

  • 48

    3.7 show mac address-table countUse the show mac address-table count privileged EXEC command to display the number of addressespresent in all VLANs.

    Command Syntax

    show mac address-table count

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    This is an example of output from the show mac address-table count command:

    Switch# show mac address-table count

    Dynamic Address Count : 1 (Security: 0)

    Static Address Count : 1 (Security: 0)

    Total Mac Addresses : 2 (Security: 0)

    Related Commands

    show mac address-table

    3.8 show mac-filter address-tableUse the show mac-filter address-table privileged EXEC command to display the number of filteraddresses present in all VLANs.

    Command Syntax

    show mac-filter address-table

  • 49

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    This is an example of output from the show mac-filter address-table command:

    Switch# show mac-filter address-table

    MAC Filter Address Table

    ----------------------------------

    Current count : 1

    Max count : 256

    Left count : 255

    Filter address list :

    ----------------------------------

    0000.000a.000a

    Related Commands

    show mac address-table

    3.9 show resource mac-filterUse this command to display the resource statistic used by mac-filter.

    Command Syntax

    show resource mac-filter

    Command Mode

    Privileged EXEC

    Default

    None

  • 50

    Usage

    None

    Examples

    The following is sample output from the show resource mac-filter command.

    Switch# show resource mac-filter

    MAC-FILTER

    Resource Used Capability

    =============================================================

    Blackhole MAC Addresses 0 256

    Related Commands

    show resource static-fdb

    3.10 show resource static-fdbUse this command to display the resource statistic used by static FDB.

    Command Syntax

    show resource static-fdb

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    None

    Examples

    The following is sample output from the show resource static-fdb command:

    Switch# show resource static-fdb

    STATIC-FDB

    Resource Used Capability

    =============================================================

  • 51

    Static FDB 0 1024

    Related Commands

    show resource mac-filter

  • 52

    4 VLAN Commands

    4.1 vlan databaseUse this command to enter VLAN configure mode.

    Command Syntax

    vlan database

    Command Mode

    Global Configuration

    Default

    None

    Usage

    When you try to create or remove VLAN, you must use this command to enter VLAN configure modefirst. To exit VLAN configure mode, use exit command.

    Examples

    This example shows how to enter VLAN configure mode:

    Switch(config)# vlan database

    Switch(config-vlan)#

    This example shows how to exit VLAN configure mode:

    Switch(config-vlan)# exit

    Switch(config)#

  • 53

    Related Commands

    exit

    4.2 vlan replace dscpUse this command to enable DSCP on specific VLAN.

    To disable it, use the no form of this command.

    Command Syntax

    vlan vlan replace dscp-exp

    no vlan vlan replace dscp-exp

    vlan vlan id

    Command Mode

    VLAN Configuration

    Default

    None

    Usage

    This command is enabled the DSCP of the packet in the VLAN will be replaced.

    Examples

    This example shows how to enable dscp on VLAN 1:

    Switch(config-vlan)# vlan 1 replace dscp-exp

    This example shows how to disable dscp on VLAN 1:

    Switch(config-vlan)# no vlan 1 replace dscp-exp

    Related Commands

    qos enable

  • 54

    4.3 vlanUse the vlan VLAN configuration command to configure VLAN characteristics for a VLAN in theVLAN database. Use the no form of this command to delete a VLAN.

    Command Syntax

    vlan vlan (name name|) (state (enable |disable)|)

    no vlan vlan

    vlan Vlan id, the range is 1~4094

    name name the name for specific vlan, no more than 16 characters

    enable set the operational state of the VLAN to enable, and it is enabled by default

    disable set the operational state of the VLAN to disable

    Command Mode

    VLAN Configuration

    Default

    VLAN 1 is the default VLAN and all ports have been added to it by default.

    Usage

    Default VLAN 1 can not be removed.

    Examples

    This example shows how to create VLAN 11 and named it to “vlan11”:

    Switch(config-vlan)# vlan 11 name vlan11 state enable

    This example shows how to remove VLAN 11:

    Switch(config-vlan)# no vlan 11

    Related Commands

    vlan VLAN_LIST

  • 55

    show vlan vlan

    show vlan all

    4.4 vlan VLAN_LISTUse the vlan VLAN_LIST configuration command to add a normal-range VLANs to the VLANdatabase.

    Command Syntax

    vlan VLAN_LIST

    no vlan VLAN_LIST

    VLAN_LIST vlan list connected with ‘-’ and ‘,’, for example, “1-10,15,20,30-40”

    Command Mode

    VLAN Configuration

    Default

    Vlan 1 is the default vlan and all ports have been added to it by default.

    Usage

    The vlan list should be connected with ‘-’ and ‘,’, the value should be in the range of andshould be ascending order.

    Default VLAN 1 can not be removed.

    Examples

    This example shows how to add vlans of “100,200,300-400”:

    Switch(config-vlan)# vlan 100,200,300-400

    This example shows how to remove vlans of “100,200,300-400”:

    Switch(config-vlan)# no vlan 100,200,300-400

  • 56

    Related Commands

    vlan

    show vlan vlan

    show vlan all

    4.5 show vlanUse this command to display specific vlan information.

    Command Syntax

    show vlan vlan

    vlan Vlan id, the range is 1~4094

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    This command is used to display VLAN property includeing name, state, stp id, DSCP, member ports.

    Examples

    This example shows how to display the information on VLAN 11:

    Switch# show vlan 11

    Related Commands

    show vlan all

    4.6 show vlan allUse this command to show the information of all the VLAN.

  • 57

    Command Syntax

    show vlan all

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    This command is used to display all VLAN property includeing name, state, stp id, DSCP, memberports.

    Examples

    This example shows how to display the information on VLAN all:

    Switch# show vlan all

    Related Commands

    show vlan vlan

    4.7 show vlan briefUse this command to show the brief information on VLAN.

    Command Syntax

    show vlan brief

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    This command is used to display all VLAN information for all bridges, including static and dynamic.

  • 58

    Examples

    This example shows how to display the brief information on VLAN:

    Switch# show vlan brief

    Related Commands

    show vlan vlan

    4.8 show interface switchportUse this command to show the vlan configurations on all bridge ports or a bridge port.

    Command Syntax

    show interface switchport (interface IFNAME|)

    IFNAME Interface name

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    This command is used to display one or all VLAN’s L2 configurations.

    Examples

    This example shows how to display the vlan configurations on all bridge ports or a bridge port:

    Switch# show interface switchport interface eth-0-1

    Related Commands

    switchport mode access

    switchport mode trunk

  • 59

    4.9 switchport access allowedUse this command to allow or not allow the traffic from the specific VLAN to pass the access port.

    Command Syntax

    switchport access allowed vlan (add | remove) vlan

    add Allow the traffic from the vlan to pass the access port

    remove Not allow the traffic from the vlan to pass the access port

    vlan Vlan list connected with ‘-’ and ‘,’, for example, “1-10,15,20,30-40”

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    This command is used to allow the traffic from the specific VLAN to pass the access port.

    Examples

    This example shows how to allow the traffic from the vlan11 to pass the port:

    Switch(config-if)# switchport access allowed vlan add 11

    This example shows how to refuse the traffic from the vlan12 to pass the port:

    Switch(config-if)# switchport access allowed vlan remove 12

    Related Commands

    switchport trunk allowed

  • 60

    4.10 switchport access vlanUse this command to set the access port to a specified VLAN.

    To set the access port to default VLAN 1, use no form of this command.

    Command Syntax

    switchport access vlan vlan

    no switchport access vlan

    vlan Vlan id, the range is 2~4094

    Command Mode

    Interface Configuration

    Default

    All the ports are added to vlan 1 by default

    Usage

    The port should be an access port by switchport mode access command before add to vlan by thiscommand.

    Examples

    This example shows how to add the port to vlan 11:

    Switch(config-if)# switchport access vlan 11

    This example shows how to return the port to default vlan 1:

    Switch(config-if)# no switchport access vlan.

    Related Commands

    switchport mode access

    4.11 switchport mode accessUse this command to set the switchport mode to access.

  • 61

    Command Syntax

    switchport mode access

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    The access mode is usually used to connect the port to a terminal device, such as a PC.

    When the mode is changed, both the MAC learnt dynamically and configured statically on the port willbe cleared.

    Examples

    This example shows how to set the switchport mode to access:

    Switch(config-if)# switchport mode access

    Related Commands

    switchport mode trunk

    4.12 switchport mode trunkUse this command to set the switchport mode to trunk. Use the switchport mode access command to setthe switchport mode to default.

    Command Syntax

    switchport mode trunk

    Command Mode

    Interface Configuration

    Default

    None

  • 62

    Usage

    The trunk mode is usually used to connect the port with other switch.

    The trunk mode is can also used to connect the port with host device.

    When the mode is changed, both the MAC learnt dynamically and configured statically on the port willbe cleared.

    Examples

    This example shows how to set the switchport mode to trunk:

    Switch(config-if)# switchport mode trunk

    Related Commands

    switchport mode access

    4.13 switchport mode trunk ingress-filterUse this command to set ingress-filter configuration of the trunk port.

    Command Syntax

    switchport mode trunk ingress-filter (enable |disable)

    enable Enable the ingress-filter

    disable Disable the ingress-filter

    Command Mode

    Interface Configuration

    Default

    Enable

    Usage

    The trunk port ingress-filter configuration should only be allowed on a trunk port.

    When the ingress-filter is disabled, this port will not check the VLAN ID of received ingress packets.

  • 63

    Examples

    This example shows how to set the trunk port ingress-filter to disable.

    Switch(config-if)# switchport mode trunk ingress-filter disable

    Related Commands

    switchport mode trunk

    4.14 switchport trunk allowedUse this command to allow traffic from specified VLAN to transmit the trunk port.

    To remove this setting, use the no form of this command.

    Command Syntax

    switchport trunk allowed vlan (add vlan | remove vlan | all | none)

    no switchport trunk

    add vlan allow the traffic from the specified vlan to transmit the trunk port. Vlan listconnected with ‘-’ and ‘,’, for example, “1-10,15,20,30-40”

    remove vlan do not allow the traffic from the specified vlan to transmit the trunk port. Vlanlist connected with ‘-’ and ‘,’, for example, “1-10,15,20,30-40”

    all allow the traffic from all the vlan to transmit the trunk port

    none do not allow the traffic from all the vlan to transmit the trunk port

    Command Mode

    Interface Configuration

    Default

    None

    Usage

    This command is used to allow traffic from specified VLAN to transmit the trunk port.

    Examples

    This example shows how to allow traffic from vlan11,12 to transmit the trunk port:

  • 64

    Switch(config-if)# switchport trunk allowed vlan add 11,12

    This example shows how to refuse traffic from vlan11,12 to transmit the trunk port:

    Switch(config-if)# switchport trunk allowed vlan remove 11,12

    This example shows how to allow traffic from all vlan to transmit the trunk port:

    Switch(config-if)# switchport trunk allowed vlan all

    This example shows how to refuse traffic from all vlan to transmit the trunk port:

    Switch(config-if)# switchport trunk allowed vlan none

    Related Commands

    switchport access allowed

    4.15 switchport trunk nativeUse this command to set the native VLAN for sending and receiving untagged traffic.

    To return the native VLAN to default value, use the no form of this command.

    Command Syntax

    switchport trunk native vlan vlan

    no switchport trunk native vlan

    vlan An existing Vlan id, the range is 2~4094

    Command Mode

    Interface Configuration

    Default

    vlan 1

  • 65

    Usage

    This command is used to set the native VLAN for sending and receiving untagged traffic.

    Examples

    This example shows how to set the native vlan to vlan 10 on the interface:

    Switch(config-if)# switchport trunk native vlan 10

    This example shows how to return the native vlan to default on the interface:

    Switch(config-if)# no switchport trunk native vlan

    Related Commands

    switchport trunk allowed

    4.16 vlan bridge disableUse this command to disable bridge function on specific VLAN.To enable it, use the no form of thiscommand.

    Command Syntax

    vlan vlan bridge disable

    no vlan vlan bridge disable

    vlan Vlan id, the range is 1~4094

    Command Mode

    VLAN Configuration

    Default

    Vlan bridge enable

    Usage

    None

  • 66

    Examples

    This example shows how to disable bridge function on VLAN 2:

    Switch(config-vlan)# vlan 2 bridge disable

    This example shows how to enable bridge function on VLAN 2:

    Switch(config-vlan)# no vlan 2 bridge disable

    Related Commands

    None

  • 67

    5 Voice VLAN Commands

    5.1 voice vlanUse this command to specific VLAN as VOICE VLAN.

    Command Syntax

    voice vlan vlan_id

    no voice vlan

    vlan_id Vlan id, the range is 2~4094

    Command Mode

    Global Configuration

    Default

    Voice VLAN is disable

    Usage

    This command is enabled VOICE VLAN.

    Examples

    This example shows how to enable VLAN 2 as VOICE VLAN:

    Switch(config)# voice vlan 2

    Related Commands

    qos enable

  • 68

    5.2 voice vlan security enableUse this command to enable VOICE VLAN security.

    Command Syntax

    voice vlan security enable

    no voice vlan security enable

    Command Mode

    Global Configuration

    Default

    By default the mode is security

    Usage

    If the security is enable, all the packet whose MACmismatch with OUI will be drop in VOICE VLAN.

    Examples

    This example shows how to enable security:

    Switch(config)# voice vlan security enable

    Related Commands

    show voice vlan state

    5.3 voice vlan set phb toUse this command to set COS for VOICE packet.

    Command Syntax

    voice vlan set phb to(af11|af12|af13|af21|af22|af23|af31|af32|af33|af41|af42|af43|ef|df|cs1|cs2|cs3|cs4|cs5|cs6|cs7)

    no voice vlan set phb

  • 69

    af11 Assured forwarding class 1, low drop precedence, PHB of (priority 2, colorgreen)

    af12 Assured forwarding class 1, medium drop precedence, PHB of (priority 2,color yellow)

    af13 Assured forwarding class 1, high drop precedence, PHB of (priority 2, colorred)

    af21 Assured forwarding class 2, low drop precedence, PHB of (priority 3, colorgreen)

    af22 Assured forwarding class 2, medium drop precedence, PHB of (priority 3,color yellow)

    af23 Assured forwarding class 2, high drop precedence, PHB of (priority 3, colorred)

    af31 Assured forwarding class 3, low drop precedence, PHB of (priority 4, colorgreen)

    af32 Assured forwarding class 3, medium drop precedence, PHB of (priority 4,color yellow)

    af33 Assured forwarding class 3, high drop precedence, PHB of (priority 4, colorred)

    af41 Assured forwarding class 4, low drop precedence, PHB of (priority 5, colorgreen)

    af42 Assured forwarding class 4, medium drop precedence, PHB of (priority 5,color yellow)

    af43 Assured forwarding class 4, high drop precedence, PHB of (priority 5, colorred)

    ef Expedited forwarding, PHB of (priority 12, color green)

    df Default forwarding, PHB of (priority 1, color green)

    cs1 Class selector 1, PHB of (priority 0, color green)

    cs2 Class selector 2, PHB of (priority 6, color green)

    cs3 Class selector 3, PHB of (priority 7, color green)

    cs4 Class selector 4, PHB of (priority 8, color green)

    cs5 Class selector 5, PHB of (priority 9, color green)

    cs6 Class selector 6, PHB of (priority 10, color green)

    cs7 Class selector 7, PHB of (priority 11, color green)

  • 70

    Command Mode

    Global Configuration

    Default

    By default the phb is ef

    Usage

    This command is used to set COS for VOICE packet in global configuration.

    Examples

    This example shows how to set phb to df:

    Switch(config)# voice vlan set phb to df

    Related Commands

    show voice vlan state

    5.4 voice vlan mac-addressUse this command to add OUI to system.

    Command Syntax

    voice vlan mac-addressMAC MASK description LINE

    no voice vlan mac-addressMAC

    MAC Source MAC address (unicast or multicast) to add to the address table

    MASK The MASK for the Source MAC

    LINE The description for this OUI

    Command Mode

    Global Configuration

  • 71

    Default

    There are 5 default OUI in the system.:

    0003-6b00-0000 Cisco phone

    000f-e200-0000 H3CAolynk phone

    00d0-1e00-0000 Pingtel phone

    00e0-7500-0000 Polycom phone

    00e0-bb00-0000 3Com phone

    Usage

    This command is used to add OUI to system database. The packet will be consider as VOICEC packetwhen the sourec MAC match the OUI.

    Examples

    This example shows how to add OUI to system:

    Switch(config)# voice vlan mac-address 0034.3400.0000 FFFF.FF00.0000 description test

    Related Commands

    show voice vlan state

    5.5 voice vlan enableUse this command to enable VOICE VLAN on port.

    Command Syntax

    voice vlan enable

    no voice vlan enable

    Command Mode

    Interface Configuration

    Default

    VOICE VLAN is disable on port

  • 72

    Usage

    This command is used to enable VOICE VLAN on port.

    Examples

    This example shows how to enable VOICE VLAN on port:

    Switch(config-if)# voice vlan enable

    Related Commands

    show voice vlan state

    5.6 show voice vlan stateUse this command to show the current status of VOICEC VLAN.

    Command Syntax

    show voice vlan state

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    This command is used to show the current status of VOICEC VLAN.

    Examples

    This example shows how to show the current status of VOICEC VLAN:

    Switch# show voice vlan state

    Related Commands

    None

  • 73

    5.7 debug voice-vlanUse this command to show the current status of VOICEC VLAN.

    Command Syntax

    debug voice-vlan (all | events)

    no debug voice-vlan (all | events)

    all Debug all VOICEC VLAN info

    events Debug VOICEC VLAN event info

    Command Mode

    Privileged EXEC

    Default

    None

    Usage

    This command is used to debug VOICEC VLAN

    Examples

    This example shows how to debug VOICE VLAN

    Switch# debug voice-vlan all

    Relate