Commands and configurations related to HDLC Protocol

Source: Internet
Author: User

HDLC is the default protocol used by CISCO routers. A new router uses HDLC Encapsulation by default when no encapsulation protocol is specified. This blog will introduce the commands and configurations of the HDLC protocol in detail.

HDLC is a simple and efficient point-to-point link protocol. It is mainly used for communication between routers connected to point-to-point connections. HDLC protocols include Cisco HDLC and iso dhlc, which are not compatible with each other.

The synchronous serial port of the ruijie router encapsulates the Cisco HDLC by default. Therefore, the ruijie router can be directly connected to the Cisco router. However, if you connect the ruijie router to a router that does not support the Cisco HDLC, other protocols (such as PPP) are required ).

1. Related commands

Port Settings


Note: 1. The following example shows the Cisco synchronous serial port status.

Router # show interface serial 0

Serial 0 is up, line protocol is up

Hardware is MCI Serial

Internet address is 150.136.190.203, subnet mask is 255.255.255.0

MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255

Encapsulation HDLC, loopback not set, keepalive set (10 sec)

Last input 0:00:07, output 0:00:00, output hang never

Output queue 0/40, 0 drops; input queue 0/75, 0 drops

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

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

16263 packets input, 1347238 bytes, 0 no buffer

Received 13983 broadcasts, 0 runts, 0 giants

2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort

22146 packets output, 2383680 bytes, 0 underruns

0 output errors, 0 collisions, 2 interface resets, 0 restarts

1 carrier transitions

2. Example


The settings are as follows:

Router1:

Interface Serial0

Ip address 192.200.10.1 255.255.255.0

Clockrate 1000000

Router2:

Interface Serial0

Ip address 192.200.10.2 255.255.255.0

!

3. Use the E1 line as an example to connect multiple 64 k leased lines.

Related commands:


Note: 1. when the link is T1, the channel-group number is 0-23, and the Timeslot range is 1-24. When the link is E1, the channel-group number is 0-30, timeslot range: 1-31.

2. Use show controllers e1 to observe the controller status. The following figure shows the normal status of controllers when the frame type is crc4.

Router # show controllers e1

E1 0/0 is up.

Applique type is Channelized E1-unbalanced

Framing is CRC4, Line Code is HDB3 No alarms detected.

Data in current interval (725 seconds elapsed ):

0 Line Code Violations, 0 Path Code Violations

0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations,

0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

The following example shows how to connect three 64 k leased lines with a frame type of NO-CRC4 and a non-balanced link. The router configuration is as follows:

Shanxi # wri t

Building configuration...

Current configuration:

!

Version 11.2:

No service udp-small-servers

No service tcp-small-servers

!

Hostname shanxi

!

Enable secret 5 $1 $ XN08 $ Ttr8nfLoP9.2RgZhcBzkk/

Enable password shanxi

!

!

Ip subnet-zero

!

Controller E1 0

Framing NO-CRC4

Channel-group 0 timeslots 1

Channel-group 1 timeslots 2

Channel-group 2 timeslots 3

!

Interface Ethernet0

Ip address 133.118.40.1 255.255.0.0

Media-type 10 BaseT

!

Interface Ethernet1

No ip address

Shutdown

!

Interface Serial0: 0

Ip address 202.119.96.1 255.255.255.252

No ip mroute-cache

!

Interface Serial0: 1

Ip address 202.119.96.5 255.255.255.252

No ip mroute-cache

!

Interface Serial0: 2

Ip address 202.119.96.9 255.255.255.252

No ip mroute-cache

!

No ip classless

Ip route 133.210.40.0 255.255.255.0 Serial0: 0

Ip route 133.210.41.0 255.255.255.0 Serial0: 1

Ip route 133.210.42.0 route 255.255.0 Serial0: 2

!

Line con 0

Line aux 0

Line vty 0 4

Password shanxi

Login

!

End

3. Configure the keepalive time


HDLC sends a KeepAlive packet to each other every 10 seconds to check whether the link is interrupted. The packets sent and received each time are incremented by the serial number. If the serial number is out of order, the link is interrupted. When the interface does not receive confirmation of its own incremental serial number three times in a row (when the packet rate exceeds 1000 packets/s, the HDLC protocol changes the link status from Up to Down, and the link becomes unavailable.

The configurable parameters of HDLC only have the Keepalive interval. The default value is 10 seconds. You can modify the value based on the link traffic.

1. Configure the keepalive time:

Router (config) # interface-id

Router (config-if) # keepalive seconds

The interface command is used to specify the interface to be configured. It must be a Serial port, and interface-id is the interface number.

The keepalive command sets the keepalive time. seconds is the time value in seconds.

2. Ignore keepalive profiling:

Router (config) # interface-id

Router (config-if) # no keepalive

The no keepalive command indicates that no HDLC link status probe is performed, that is, no keepalive packets are sent or received.

Configuration example:

R1> enable R1 # configure terminal R1 (config) # interface s0/0 R1 (config-if) # encapsulation hdlc R1 (config-if) # keepalive 15

R2> enable R2 # configure terminal R2 (config) # interface s0/0 R2 (config-if) # encapsulation hdlc R2 (config-if) # keepalive 15

Note: You must ensure that the keepalive time at both ends of the connection is the same.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.