4
•
The
speed
and
speed auto
commands supersede each other, and whichever is configured last
takes effect.
Configuration procedure
To set speed options for auto negotiation on an Ethernet interface:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enter Ethernet interface view.
interface interface-type
interface-number
N/A
3.
Set speed options for auto
negotiation.
speed
auto
{
10
|
100
|
1000
} *
Optional.
Configuring flow control on an Ethernet interface
To avoid packet drops on a link, you can enable flow control at both ends of the link. When traffic
congestion occurs at the receiving end, the receiving end sends a flow control (Pause) frame to ask
the sending end to suspend sending packets.
Flow control is implemented by receiving and sending Pause frames on ports. Flow control can
operate in one of the following modes on an interface:
•
TxRx
mode
(configured by using the
flow-control
command)—The interface can both send
and receive flow control frames.
•
Rx
mode
(configured by using the
flow-control receive enable
command)—The interface can
receive, but not send flow control frames.
As shown in
, when both Port A and Port B forward packets at the rate of 1000 Mbps, Port C
is congested. To avoid packet loss, enable flow control on Port A and Port B.
Figure 2 Flow control on ports
Configure flow control in TxRx mode on Port B and flow control in Rx mode on Port A:
•
When congestion occurs on Port C, Switch B buffers frames. When the amount of buffered
frames exceeds a certain value, Switch B sends a common Pause frame out of Port B to ask
Port A to suspend sending packets. This Pause frame also tells Port A for how long it is
expected to pause.
•
Upon receiving the common Pause frame from Port B, Port A suspends sending packets to Port
B for a period.
•
If congestion persists, Port B keeps sending common Pause frames to Port A until the
congestion condition is removed.
To handle unidirectional traffic congestion on a link, configure the
flow-control receive enable
command at one end, and the
flow-control
command at the other. To enable both ends of the link to
handle traffic congestion, configure the
flow-control
command at both ends.
To implement flow control on the local Ethernet port, you must enable flow control on both the local
Ethernet port and the remote port. If flow control is enabled on the local Ethernet port but disabled on
the remote port, forwarding of packets received on the other Ethernet ports of the local switch is
affected.