15.3. Phy Loopback Commands

15.3.1. loopback phy

Command Purpose

Use this command to configure a physical interface as phy level loopback mode. Use the no loopback command to cancel this configuration.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

loopback phy ( internal IFPHYSICAL | external )

Parameter

Parameter Description

Parameter Value

internal IFPHYSICAL

Packets transmitted to the interface should be looped back to a specified physical interface without any modification. The destination physical interface

-

external

Packets received from the interface should be looped back to the interface itself without any modification

-

Command Mode

Interface Configuration

Default

None

Usage

Only one type of loopback can be applied on a physical interface. A new configuration should replace the old configuration.

Examples

In the following example, the physical interface is set to phy level loopback mode:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# loopback phy internal eth-0-2

15.3.2. loopback port

Command Purpose

Use this command to configure a physical interface as port level loopback mode. Use the no loopback command to cancel this configuration.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

loopback port ( mac-address swap | )

Parameter

Parameter Description

Parameter Value

mac-address swap

If this flied is entered, the packet`s SMAC incoming from port level loopback interface will be swapped with its DMAC, and the FCS will be updated

-

Command Mode

Interface Configuration

Default

None

Usage

Only one type of loopback can be applied on a physical interface. A new configuration should replace the old configuration.

Examples

In the following example, the physical interface is set to port level loopback mode:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# loopback port

Related Commands

no loopback

15.3.3. no loopback

Command Purpose

Use this command to cancel a physical interface from phy level or port level loopback to normal interface.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

no loopback

Command Mode

Interface Configuration

Default

None

Usage

Phy or port level loopback can be canceled by this command.

Examples

In the following example, port level loopback is canceled by this command:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# loopback port
Switch(config-if)# no loopback

Related Commands

loopback phy

loopback port

15.3.4. show phy loopback

Command Purpose

Use this command to show the configuration of phy loopback.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show phy loopback

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

In the following example shows how to show the configuration:

Switch# show phy loopback

Interface   Type       DestIntf    SwapMac
 -------------------------------------------------------------
 eth-0-1    port       -          no     
 eth-0-2    port       -          yes    
 eth-0-3    external   -           -
 eth-0-4    internal   eth-0-5      -
 -------------------------------------------------------------

Related Commands

loopback phy

loopback port

15.3.5. l2 ping

Command Purpose

Use this command to ping specified DMAC from specified physical interface, using protocol packet with ethertype 0x9009.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

l2 ping HHHH.HHHH.HHHH interface IFPHYSICAL ( { vlan VLAN_ID | interval INTERVAL | timeout TIMEOUT | count COUNT | size SIZE } | )

Parameter

Parameter Description

Parameter Value

HHHH.HHHH.HHHH

The DMAC to ping

MAC Address in HHHH.HHHH.HHHH format

interface IFPHYSICAL

The interface to ping from

Support physical ports

VLAN_ID

The vlan id of the protocol ping packet

1-4094

INTERVAL

The interval time between two ping action, second

1-65535

TIMEOUT

The time wait for a ping action, second

1-65535

COUNT

Total ping times

1-65535

SIZE

The size of the protocol ping packet

64-1518

Command Mode

Privileged EXEC

Default

The ping protocol packet is without vlan tag by default.

The default interval ping time is 200 milliseconds.

The default count is 5.

The default size of the ping protocol packet is 64.

Usage

The ping action can be canceled by “Ctrl + C”.

Examples

The following example shows how to ping a specified destination mac:

Switch# l2 ping 0000.0000.0001 interface eth-0-1 vlan 101 interval 200 timeout 1000 count 10 size 1500

Related Commands

l2 ping response

15.3.6. l2 ping response

Command Purpose

Use this command to enable l2 ping response globally. Use the no form of this command to disable it.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

l2 ping response enable

no l2 ping response enable

Command Mode

Interface Configuration

Default

None

Usage

If l2 ping response is not enabled, the l2 ping request packet should be dropped.

Examples

In the following example shows how to enable l2 ping response on interface:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# l2 ping response enable

Related Commands

l2 ping

show l2ping response

15.3.7. show l2ping response

Command Purpose

Use this command to show the configuration of l2 ping.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show l2ping response

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

In the following example shows how to use this command:

Switch# show l2 ping response

Interface       L2pingResp
 -------------------------------------
 eth-0-7       Enable
 eth-0-8       Enable
 -------------------------------------

Related Commands

l2 ping response

15.3.8. show l2ping state

Command Purpose

The show l2ping state command is used to display the status of l2ping.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show l2ping state

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

In the following example shows the status of l2ping:

Switch# show l2ping response

L2 ping state.
 -------------------------------------------------------------
 Total count  Interval  Timeout  VlanId  Packet size  Sequence
 100 1515010
 10 packet(s) transmitted, 0 received, 100 % packet loss

Related Commands

None

15.3.9. l2 ping stop

Command Purpose

The purpose of the l2 ping stop command is to stop the execution of the l2 ping command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

l2 ping stop

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

In the following example shows how to stop L2 ping:

Switch# l2 ping stop

Related Commands

None

15.3.10. l2 ping forward enable

Command Purpose

The l2 ping forward enable command is used to enable L2 ping forwarding on an interface. To disable forwarding, use the no l2 ping forward enable command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

l2 ping forward enable

no l2 ping forward enable

Command Mode

Interface Configuration

Default

Enable

Usage

None

Examples

In the following example shows how to enable l2 ping forward on interface:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# l2 ping forward enable

Related Commands

None

15.3.11. debug l2ping

Command Purpose

Use this command to enable debugging l2 ping.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

debug l2ping ( all | packet | send | receive | response )

no debug l2ping ( all | packet | send | receive | response )

Parameter

Parameter Description

Parameter Value

all

All l2ping debug

-

packet

Packet

-

send

Send packets

-

receive

Receive packets

-

response

Response Log

-

Command Mode

Privileged EXEC

Default

All these three debugging types is off.

Usage

If packet, send, or receive debugging is on, the corresponding message will be printed.

Examples

In the following example shows how to use this command:

Switch# debug l2ping all

Related Commands

l2 ping response

15.3.12. show debugging l2ping

Command Purpose

Use this command to show the status of l2ping debugging

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show debugging l2ping

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

In the following example shows the status of l2ping debugging:

Switch# show debugging l2ping

L2ping debugging status:
l2ping packet debugging is on
l2ping receive debugging is on
l2ping send debugging is on
l2ping response debugging is on

Related Commands

l2 ping response