- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-HDLC commands | 103.88 KB |
HDLC commands
link-protocol hdlc
Use link-protocol hdlc to enable HDLC encapsulation on an interface.
Syntax
link-protocol hdlc
Default
PPP encapsulation is enabled on an interface.
Views
POS interface view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
HDLC can transport the network layer protocols, such as IP and IPv6.
Examples
# Enable HDLC encapsulation on Pos 1/2/2/1.
<Sysname> system-view
[Sysname] interface pos 1/2/2/1
[Sysname-Pos1/2/2/1] link-protocol hdlc
timer-hold
Use timer-hold to set the keepalive interval on an interface.
Use undo timer-hold to restore the default.
Syntax
timer-hold seconds
undo timer-hold
Default
The keepalive interval is 10 seconds on an interface.
Views
POS interface view
Predefined user roles
network-admin
mdc-admin
Parameters
seconds: Specifies the keepalive interval in the range 0 to 32767 seconds.
Usage guidelines
An HDLC-enabled interface can regularly check link status by sending keepalives to the peer at the keepalive interval at the link layer. A keepalive carries the local sender sequence number and the last received sequence number of the peer.
After sending a keepalive, an interface increments the sender sequence number by 1 in the next keepalive when the following conditions exist:
· The interface receives a response within the keepalive interval.
· The response carries the sender sequence number in the sent keepalive.
After sending a keepalive, if the interface does not receive a response within the keepalive interval, it resends the keepalive with an unchanged sequence number. When the keepalive retry limit is reached, the interface considers the link faulty and reports a link layer down event.
Link status check is disabled if you set the keepalive interval to 0.
As a best practice, set the same keepalive interval for the two ends of a link.
If the network has a long delay or is experiencing congestion, you can increase the keepalive interval to prevent the link from being closed.
Examples
# Set the keepalive interval to 100 seconds on Pos 1/2/2/1.
<Sysname> system-view
[Sysname] interface pos 1/2/2/1
[Sysname-Pos1/2/2/1] timer-hold 100
Related commands
timer-hold retry
timer-hold retry
Use timer-hold retry to set the keepalive retry limit on an interface.
Use undo timer-hold retry to restore the default.
Syntax
timer-hold retry retries
undo timer-hold retry
Default
The keepalive retry limit is 5 on an interface.
Views
POS interface view
Pre-defined user roles
network-admin
mdc-admin
Parameters
retries: Specifies the keepalive retry limit in the range of 1 to 255.
Usage guidelines
An HDLC-enabled interface can regularly check link status by sending keepalives to the peer at the keepalive interval at the link layer. A keepalive carries the local sender sequence number and the last received sequence number of the peer.
After sending a keepalive, an interface increments the sender sequence number by 1 in the next keepalive when the following conditions exist:
· The interface receives a response within the keepalive interval.
· The response carries the sender sequence number in the sent keepalive.
After sending a keepalive, if the interface does not receive a response within the keepalive interval, it resends the keepalive with an unchanged sequence number. When the keepalive retry limit is reached, the interface considers the link faulty and reports a link layer down event.
If the network has a long delay or is experiencing congestion, you can increase the keepalive retry limit to prevent the link from being closed.
Examples
# Set the keepalive retry limit to 10 on Pos 1/2/2/1.
<Sysname> system-view
[Sysname] interface pos 1/2/2/1
[Sysname-Pos1/2/2/1] timer-hold retry 10
Related commands
timer-hold
HDLC link bundling commands
bandwidth
Use bandwidth to set the expected bandwidth of an interface.
Use undo bandwidth to restore the default.
Syntax
bandwidth bandwidth-value
undo bandwidth
Default
The expected bandwidth (in kbps) is the interface baud rate divided by 1000.
Views
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Parameters
bandwidth-value: Specifies the expected bandwidth in the range of 1 to 400000000 kbps.
Usage guidelines
The expected bandwidth of an interface affects the link costs in OSPF, OSPFv3, and IS-IS. For more information, see Layer 3—IP Routing Configuration Guide.
Examples
# Set the expected bandwidth to 1000 kbps for HDLC link bundle interface 1.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] bandwidth 1000
bundle id
Use bundle id to assign an interface to an HDLC link bundle.
Use undo bundle id to restore the default.
Syntax
bundle id bundle-id
undo bundle id
Default
An interface is not assigned to any HDLC link bundle.
Views
POS interface view
Predefined user roles
network-admin
mdc-admin
Parameters
bundle-id: Specifies an HDLC link bundle by its number. The value range for this argument is 1 to 32.
Usage guidelines
An interface can be the member of only one HDLC link bundle. To move an interface from one HDLC link bundle to another HDLC link bundle, remove the interface from the current HDLC link bundle first.
You must enable HDLC encapsulation on an interface to be assigned to an HDLC link bundle.
You cannot assign interfaces to a nonexistent HDLC link bundle as members.
Examples
# Assign Pos 1/2/2/1 to HDLC link bundle 1.
<Sysname> system-view
[Sysname] interface pos 1/2/2/1
[Sysname-Pos1/2/2/1] bundle id 1
bundle max-active links
Use bundle max-active links to set the maximum number of Selected interfaces allowed in an HDLC link bundle.
Use undo bundle max-active links to restore the default.
Syntax
bundle max-active links number
undo bundle max-active links
Default
Views
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Parameters
number: Specifies the maximum number of Selected interfaces allowed in an HDLC link bundle. The value range for this argument is 1 to 16.
Usage guidelines
The value specified by using this command cannot be smaller than the value specified by using the bundle min-active links command.
Use the bundle max-active links command together with the bundle member-priority command to make sure both ends of a link always have the same Selected status. The communication fails when one end is Selected but the other end is Unselected.
Examples
# Set the maximum number of Selected interfaces allowed in HDLC link bundle 1 to 8.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] bundle max-active links 8
Related commands
bundle member-priority
bundle min-active links
bundle member-priority
Use bundle member-priority to set the bundling priority value for an HDLC-enabled interface.
Use undo bundle member-priority to restore the default.
Syntax
bundle member-priority priority
undo bundle member-priority
Default
The bundling priority value of an HDLC-enabled interface is 32768.
Views
POS interface view
Predefined user roles
network-admin
mdc-admin
Parameters
priority: Specifies the bundling priority value of an HDLC-enabled interface. The value range for this argument is 1 to 65535. A higher priority value means a lower bundling priority.
Examples
# Set the bundling priority value to 1 for HDLC-enabled interface Pos 1/2/2/1.
<Sysname> system-view
[Sysname] interface pos 1/2/2/1
[Sysname-Pos1/2/2/1] bundle member-priority 1
bundle min-active bandwidth
Use bundle min-active bandwidth to set the minimum bandwidth required for bringing up an HDLC link bundle interface.
Use undo bundle min-active bandwidth to restore the default.
Syntax
bundle min-active bandwidth bandwidth
undo bundle min-active bandwidth
Default
The minimum bandwidth required for bringing up an HDLC link bundle is not set.
Views
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Parameters
bandwidth: Specifies the minimum bandwidth (in kbps) required for bringing up an HDLC link bundle interface. The value range for this argument is 64 to 1342177280.
Examples
# Set the minimum bandwidth required for bringing up HDLC link bundle 1 to 1000 kbps.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] bundle min-active bandwidth 1000
bundle min-active links
Use bundle min-active links to set the minimum number of Selected interfaces required for bringing up an HDLC link bundle interface.
Use undo bundle min-active links to restore the default.
Syntax
bundle min-active links number
undo bundle min-active links
Default
The minimum number of Selected interfaces required for bringing up an HDLC link bundle is not set.
Views
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Parameters
number: Specifies the minimum number of Selected interfaces required for bringing up an HDLC link bundle interface. The value range for this argument is 1 to 16.
Usage guidelines
The value specified by using this command cannot be greater than the value specified by using the bundle max-active links command.
Examples
# Set the minimum number of Selected interfaces required for bringing up HDLC link bundle 1 to 5.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] bundle min-active links 5
Related commands
bundle max-active links
default
Use default to restore the default settings for an HDLC link bundle interface.
default
Views
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
CAUTION: The default command might interrupt ongoing network services. Make sure you are fully aware of the impact of this command when you use it on a live network. |
This command might fail to restore the default settings for some commands for reasons such as command dependencies or system restrictions. Use the display this command in interface view to identify these commands, and then use their undo forms or follow the command reference to individually restore their default settings. If your restoration attempt still fails, follow the error message instructions to resolve the problem.
Examples
# Restore the default settings for HDLC link bundle interface 1.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] default
description
Use description to configure the description of an interface.
Use undo description to restore the default.
Syntax
description text
undo description
Default
The description of an interface is the interface name followed by the Interface string, for example, Hdlc-bundle1 Interface.
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Parameters
text: Specifies an interface description, a case-sensitive string of 1 to 255 characters.
Examples
# Set the description of HDLC link bundle interface 1 to HDLC-bundle interface.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] description HDLC-bundle interface
display bundle hdlc-bundle
Use display bundle hdlc-bundle to display information about an HDLC link bundle.
Syntax
display bundle hdlc-bundle [ bundle-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
bundle-id: Specifies an HDLC link bundle by its number. If this argument is not specified, this command displays information for all HDLC link bundles.
Usage guidelines
The HDLC link bundle information displayed includes information about all member interfaces.
Examples
# Display information about HDLC link bundle 1.
<Sysname> display bundle hdlc-bundle 1
Bundle: HDLC-bundle1
max-active links: 2, min-active links: 2, min-active bandwidth: 1000000 kbps
Selected members: 2, Total bandwidth: 19906560 kbps
Member State Bandwidth(kbps) Priority
Pos1/2/2/1 Selected 9953280 1
Pos1/2/2/2 Selected 9953280 2
Table 1 Command output
Field |
Description |
Bundle |
Name of the HDLC link bundle. |
max-active links |
Maximum number of Selected interfaces allowed in the HDLC link bundle interface. This field will not be displayed if you have not set the limit. |
min-active links |
Minimum number of Selected interfaces required for bringing up the HDLC link bundle interface. This field will not be displayed if you have not set the limit. |
min-active bandwidth |
Minimum bandwidth required for bringing up the HDLC link bundle interface. This field will not be displayed if you have not set the limit. |
Selected members |
Current number of Selected interfaces. |
Total bandwidth |
Total bandwidth of all the Selected interfaces in the HDLC link bundle. |
Member |
Name of a member interface. |
State |
State of a member interface: · Selected—On an interface card, only information about Selected interfaces is displayed. · Ready. · Negotiated. · Initial. |
Bandwidth(kbps) |
Bandwidth (in kbps) of a member interface. |
Priority |
Bundling priority of a member interface. |
display interface hdlc-bundle
Use display interface hdlc-bundle to display information about an HDLC link bundle interface.
Syntax
display interface [ hdlc-bundle [ bundle-id ] ] [ brief [ description | down ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
hdlc-bundle [ bundle-id ]: Specifies an HDLC link bundle interface by its number. If you do not specify the hdlc-bundle keyword, this command displays information about all interfaces. If you specify the hdlc-bundle keyword without any HDLC link bundle interface number, this command displays information about all HDLC link bundle interfaces.
brief: Displays brief interface information. If you do not specify this keyword, this command displays detailed interface information.
description: Displays complete interface descriptions. If you do not specify this keyword, the command displays only the first 27 characters of each interface description.
down: Displays information about interfaces in DOWN state and the link down causes. If you do not specify this keyword, the command displays information about interfaces in all states.
Examples
# Display detailed information about HDLC link bundle interface 1.
<Sysname> display interface hdlc-bundle 1
HDLC-bundle1
Current state: UP
Line protocol state: UP
Description: HDLC-bundle1 Interface
Bandwidth: 128kbps
Maximum Transmit Unit: 1500
Hold timer: 10 seconds, retry times: 5
Internet address: 1.1.1.2/24 (primary)
Link layer protocol: HDLC
Physical: HDLC-BUNDLE, baudrate: 128000 bps
Output queue - Urgent queuing: Size/Length/Discards 0/1024/0
Output queue - Protocol queuing: Size/Length/Discards 0/500/0
Output queue - FIFO queuing: Size/Length/Discards 0/75/0
Last clearing of counters: Never
Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Input: 32 packets, 1842 bytes, 0 drops
Output: 27 packets, 1512 bytes, 0 drops
# Display brief information about HDLC link bundle interface 1.
<Sysname> display interface hdlc-bundle 1 brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
HDLC-B1 UP UP(s) 1.1.1.2
# Display information about all HDLC link bundle interfaces in down state and the link down reasons.
<Sysname> display interface hdlc-bundle brief down
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Interface Link Cause
HDLC-B2 ADM Administratively
Table 2 Command output
Field |
Description |
Current state |
Physical link state of the interface: · Administratively DOWN—The interface has been shut down by using the shutdown command. · DOWN—The interface is administratively up, but its physical state is down (possibly because no physical link exists or the link has failed). · UP—The interface is both administratively and physically up. |
Line protocol state |
Data link layer state of the interface. The state is determined through automatic parameter negotiation at the data link layer. · UP—The data link layer protocol is up. · DOWN—The data link layer protocol is down. |
Description |
Description of the interface. |
Bandwidth |
Expected bandwidth of the interface. |
Maximum Transmit Unit |
MTU on the interface. |
Hold timer |
Keepalive transmission interval of the interface. This field is ineffective for an HDLC link bundle interface because an HDLC link bundle interface does not transmit keepalives. |
Retry times |
Maximum number of keepalive retransmission attempts. A link is removed after the maximum number of retransmission attempts is reached. |
Internet protocol processing: Disabled |
The interface is not assigned an IP address and cannot process IP packets. |
Internet address: 1.1.1.2/24 (primary) |
Primary IP address of the interface. |
Link layer protocol |
Link layer protocol encapsulation on the HDLC link bundle interface. |
Physical |
Physical type of the HDLC link bundle interface. |
Baudrate |
Baudrate of the HDLC link bundle interface. |
Output queue - Urgent queuing: Size/Length/Discards 0/1024/0 Output queue - Protocol queuing: Size/Length/Discards 0/500/0 Output queue - FIFO queuing: Size/Length/Discards 0/75/0 |
Traffic statistics for each output queue on the HDLC link bundle interface, including: · The number of packets in the queue (the queue size). · The maximum number of packets that the queue can hold (queue length). · The number of dropped packets. The output queues on the HDLC link bundle interface include the following types: · Urgent queue. · Protocol queue. · FIFO queue. |
Last clearing of counters |
Time when the reset counters interface command was last used to clear the interface statistics. This field displays Never if the reset counters interface command has never been used on the interface since device startup. |
Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec |
Average rate of input packets in the last 300 seconds, in Bps, bps, and pps. |
Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec |
Average rate of output packets in the last 300 seconds, in Bps, bps, and pps. |
Input: 32 packets, 1842 bytes, 0 drops |
Incoming traffic size in packets and bytes and the number of dropped incoming packets on the interface. |
Output: 27 packets, 1512 bytes, 0 drops |
Outgoing traffic size in packets and bytes and the number of dropped outgoing packets on the interface. |
Brief information on interfaces in route mode |
Brief information about Layer 3 interfaces. |
Interface |
Abbreviated interface name. |
Link |
Physical link state of the interface: · UP—The interface is physically up. · DOWN—The interface is physically down. · ADM—The interface has been shut down by using the shutdown command. To restore the physical state of the interface, use the undo shutdown command. · Stby—The interface is a backup interface in standby state. To see the primary interface, use the display interface-backup state command. |
Protocol |
Data link layer protocol state of the interface: · UP—The data link layer protocol of the interface is up. · DOWN—The data link layer protocol of the interface is down. · UP(s)—The data link layer protocol of the interface is up, but the link is an on-demand link or does not exist. The (s) attribute represents the spoofing flag. This value is typical of null interfaces and loopback interfaces. |
Primary IP |
Primary IP address of the interface. This field displays two hyphens (--) if the interface does not have an IP address. |
Cause |
Cause for the physical link state of an interface to be DOWN. Administratively indicates that the interface has been manually shut down by using the shutdown command. To restore the physical state of the interface, use the undo shutdown command. |
Related commands
reset counters interface
interface hdlc-bundle
Use interface hdlc-bundle to create an HDLC link bundle interface and enter its view, or enter the view of an existing HDLC link bundle interface.
Use undo interface hdlc-bundle to delete an HDLC link bundle interface.
Syntax
interface hdlc-bundle bundle-id
undo interface hdlc-bundle bundle-id
Default
No HDLC link bundle interface exists.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
Examples
# Create HDLC link bundle interface 1 and enter its view.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1]
mtu
Use mtu to set the MTU size for an HDLC link bundle interface.
Use undo mtu to restore the default.
Syntax
mtu size
undo mtu
Default
The MTU size of an HDLC link bundle interface is 1500 bytes.
Views
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Parameters
size: Specifies the MTU in bytes for an HDLC link bundle interface. The value range for this argument is 1280 to 9600 bytes.
Usage guidelines
The MTU size of an interface affects IP packet fragmentation and reassembly on the interface.
To make the MTU configuration take effect on an interface, you must re-enable the interface by using the shutdown command and the undo shutdown command.
Examples
# Set the MTU size of HDLC link bundle interface 1 to 1430 bytes.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] mtu 1430
reset counters interface hdlc-bundle
Use reset counters interface hdlc-bundle to clear the statistics of an HDLC link bundle interface.
Syntax
reset counters interface [ hdlc-bundle [ bundle-id ] ]
Views
User view
Predefined user roles
network-admin
mdc-admin
Parameters
hdlc-bundle [ bundle-id ]: Specifies an HDLC link bundle interface by its number. The value range for this argument is 1 to 32.If you do not specify hdlc-bundle, this command clears the statistics of all interfaces. If you specify hdlc-bundle but not bundle-id, this command clears the statistics of all HDLC link bundle interfaces. If you specify both hdlc-bundle and bundle-id, this command clears the statistics of the specified HDLC link bundle interface.
Usage guidelines
Before collecting traffic statistics within a period of time on an interface, you must clear the existing statistics.
Examples
# Clear the statistics of HDLC link bundle interface 1.
<Sysname> reset counters interface hdlc-bundle 1
display interface hdlc-bundle
shutdown
Use shutdown to shut down an HDLC link bundle interface.
Use undo shutdown to bring up an HDLC link bundle interface.
Syntax
shutdown
undo shutdown
Default
An HDLC link bundle interface is up.
Views
HDLC link bundle interface view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
When an HDLC link bundle interface is brought up, the state of each member interface is re-determined.
When an HDLC link bundle interface is shut down, the state of each Selected interface is placed into the Negotiated state.
Examples
# Shut down HDLC link bundle interface 1.
<Sysname> system-view
[Sysname] interface hdlc-bundle 1
[Sysname-HDLC-bundle1] shutdown