↪️
ccie.nyquist.eu
  • Table of Contents
  • Layer 2 Technologies
    • Ethernet Switching
      • L2 Switch Operations
      • Spanning Tree
        • 802.1d – STP
        • 802.1w – RSTP
        • 802.1s – MSTP
      • VTP 101
      • Private VLANs
      • VLANs
      • EtherChannel 101
    • Layer 2 WAN Protocols
      • HDLC
        • HDLC 101
      • PPP
        • PPP 101
        • PPP Authentication - PAP
        • PPP Authentication – CHAP
        • PPP Authentication – EAP
        • PPP Multilink
        • PPPoFR – PPP over Frame Relay
        • PPPoE – PPP over Ethernet
      • Frame Relay
        • Frame Relay 101
        • Frame Relay 102
        • Frame Relay Encapsulations – IETF vs Cisco
        • Multilink Frame Relay
        • Frame Relay Switching
        • Routing over Frame Relay
      • Bridging
        • Bridging on a router
        • MTU 101
    • Wireless
      • Wireless Principles
      • Wireless Implementations
      • Wireless Roaming
      • Wireless Authentication
        • WPA2 PSK
        • WPA2 802.1X
  • IPv4
    • IPv4 Addressing
      • Backup Interfaces
      • FHRP 101
      • DHCP 101
      • DNS 101
      • ARP 101
      • IPv4 101
      • Tunnel Interfaces
        • GRE Tunnels
      • BFD – Bidirectional Forwarding Detection
    • IPv4 Routing
      • How the routing table is built
        • How CEF works
        • Routing Order of Operations
        • NSF – Non Stop Forwarding
      • RIP
        • RIP 101
      • EIGRP
        • EIGRP 101
        • EIGRP Metric
        • More EIGRP Features
      • OSPF
        • OSPF 101
        • OSPF Areas
        • OSPF LSAs
        • OSPF Mechanics
      • IS-IS
        • IS-IS 101
        • IS-IS Mechanics – CLNP
      • BGP
        • BGP 101
        • BGP Attributes
        • More BGP
      • Route Redistribution
      • Policy based Routing
      • PfR 101 – Perfromance Routing
      • ODR
  • IPv6
    • IPv6-101
    • IPv6 Routing
    • Interconnecting IPv6 and IPv4
  • MPLS
    • MPLS 101
    • MPLS L3 VPN
  • Multicast
    • Multicast 101
    • PIM 101
    • IGMP 101
    • Inter Domain Multicast
    • IPv6 Multicast
    • Multicast features on switches
  • Security
    • NAT 101
    • NAT for Overlapping Networks
    • ACLs 101
    • ACLs 102
    • Cisco IOS Firewall
    • Zone Based Firewall
    • AAA 101
    • Controlling CLI Access
    • Control Plane
    • Switch Security
      • Switchport Traffic Control
      • Switchport Port Security
      • DHCP Snooping and DAI
      • 802.1x
      • Switch ACLs
    • IPSec VPN 101
      • IKE / ISAKMP 101
      • IPSEC Crypto Maps 101
      • IPSEC VTI 101
      • DMVPN 101
    • EAP 101
  • Network Services
    • NTP 101
    • HTTP 101
    • File Transfer 101 – TFTP & FTP
    • WCCP 101
  • QoS
    • QoS 101
    • Classification and Marking
    • Congestion Management
      • Legacy Congestion Management
      • SPD – Selective Packet Discard
      • CBWFQ
      • IP RTP Priority
    • Congestion Avoidance – WRED
    • Policing and Shaping
      • CAR 101
    • Compression and LFI
      • Header and Payload Compression
      • LFI for MultiLink PPP
    • Frame Relay QoS
      • Per VC Frame Relay QoS
    • RSVP 101
    • Switching QoS
  • Network Optimization
    • NetFlow 101 – TNF – Traditional NetFlow
    • NetFlow 102 – FNF – Flexible NetFlow
    • IP SLA 101
    • IP Accounting 101
    • Logging 101
    • SNMP and RMON 101
    • Cisco CLI Tips and Tricks
    • AutoInstall
    • Enhanced Object Tracking
    • Troubleshooting 101
    • SPAN, RSPAN, ERSPAN
  • Network Architecture
    • Hierarchical Network Architecture
    • SD Access
    • SD WAN
Powered by GitBook
On this page
  • Basic Configuration
  • Keepalives
  • Compression

Was this helpful?

  1. Layer 2 Technologies
  2. Layer 2 WAN Protocols
  3. HDLC

HDLC 101

Basic Configuration

The default encapsulation on serial interfaces on a Cisco Router is HDLC. Even though HDLC exists as an open standard, Cisco routers use a modified version of the original standard that includes a new field in the header used for identification of the upper layer protocol that is encapsulated. Many other vendors can interoperate with Cisco Routers even when using this version of the protocol, but technically it is considered a non-standard implementation. If the requirements are to implement a standard encapsulation on a Serial interface, a better option would be PPP.

Since HDLC is the default encapsulation, configuration is probably the easiest ever:

! On R1:
R1(config)# interface Serial0/0
R1(config-if)# ip address 99.0.0.1 255.255.255.0
R1(config-if)# no shut
! On R2:
R1(config)# interface Serial0/0
R1(config-if)# ip address 99.0.0.2 255.255.255.0
R1(config-if)# no shut
! Test
R1# ping 99.0.0.2
!!!!!

Normally, when connecting two routers on a serial link, one of them must be the DTE, the other must be the DCE. The DCE router must set a clock rate for the interface using:

R1(config-if)# clock rate CLOCK-RATE

In newer versions of the IOS, this is not needed anymore because by default, every serial interface has a clock rate set, but only the DCE end will use it.

How do we know which is the DCE end? The easiest method is to look at the command:

R1# show controllers serial0/0 | i DCE|DTE
cable type : V.11 (X.21) DCE cable, received clockrate 2015232

Keepalives

Cisco HDLC uses keepalives to monitor the link state. By default, keepalives are sent and expected every 10 seconds. Three missed keepalives will move the interface protocol to a “down” status.

R1(config-if)#keepalive ?
< 0-32767> Keepalive period (default 10 seconds)
< cr>

Hitting enter will set the default value of 10 seconds. To disable keepalives completly use:

R1(config-if)# no keepalive

To verify keepalive value use:

R1# show interface serial0/0 | i alive
Keepalive set (10 sec)

Compression

HDLC can be configured to use software compression using the Stacker(LZS) algorithm. Compression must be enabled on both ends of the link:

!On R1
R1(config-if)# compress stack
!On R2
R2(config-if)# compress stack

Compression can be verified using:

R1# show compress [detail]
Serial0/0
Software compression enabled
uncompressed bytes xmt/rcv 101850/100816
compressed bytes xmt/rcv 43041/42357
Compressed bytes sent: 43041 bytes 3 Kbits/sec ratio: 2.366
Compressed bytes recv: 42357 bytes 3 Kbits/sec ratio: 2.380
1 min avg ratio xmt/rcv 2.152/2.139
5 min avg ratio xmt/rcv 2.150/2.137
10 min avg ratio xmt/rcv 2.150/2.137
no bufs xmt 0 no bufs rcv 0
resyncs 0
Additional Stac Stats:
Transmit bytes: Uncompressed = 220 Compressed = 43041
Received bytes: Compressed = 46381 Uncompressed = 0

Notice the compression ratio. One byte was sent after compression for each 2.366 bytes of uncompressed data. In the other direction, 1 byte of data was received for each uncompressed 2.380 bytes of date. These are of course average values. Beware that compression can affect system performance!

PreviousHDLCNextPPP

Last updated 3 years ago

Was this helpful?