Configuration

HDLC and PPP configuration is pretty simple. You just need to be sure to configure the same WAN data-link protocol on each end of the serial link. Otherwise, the routers will misinterpret the incoming frames, because each WAN data-link protocol uses a different frame format. The following table summarize the configuration commands and EXEC commands used for HDLC and PPP configuration.

Command Description
encapsulation {hdlc | ppp} Interface subcommand
compress [predictor | stac | mppc [ignore-pfc]] Interface subcommand
show interfaces [type number] Lists statistics and details of interface configuration, including the encapsulation type.
show compress Lists compression ratios.
show processes [cpu] Lists processor and task utilization. Is useful for watching for increased utilization because of compression.

The following example shows the configuration for PPP, followed by the changed configuration for a migration to HDLC. Assume that Router R1 and Router R2 have a serial link attached to their serial 1/0 interfaces.

Router R1

R1(config)#
R1(config)#int se 1/0
R1(config-if)#
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#encap
R1(config-if)#encapsulation ppp
R1(config-if)#no shu
R1(config-if)#
R1(config-if)#end
R1#
R1#
*Mar 1 00:04:23.367: %SYS-5-CONFIG_I: Configured from console by console
R1#
*Mar 1 00:04:23.599: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
R1#

Router R2

R2(config)#
R2(config)#int se 1/0
R2(config-if)#ip addr 10.0.0.2 255.0.0.0
R2(config-if)#encap ppp
R2(config-if)#no shu
R2(config-if)#end
R2#
*Mar 1 00:04:38.623: %SYS-5-CONFIG_I: Configured from console by console
R2#
*Mar 1 00:04:39.191: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
R2#
*Mar 1 00:04:40.275: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R2#
R2#ping 10.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/75/124 ms
R2#

And here there are two different ways to switch to HDLC encapsulation:

Router R1

R1(config)#int se 1/0
R1(config-if)#
R1(config-if)#encap hdlc
R1(config-if)#end
R1#
*Mar 1 00:07:55.255: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
*Mar 1 00:07:55.479: %SYS-5-CONFIG_I: Configured from console by console
R1#
*Mar 1 00:07:57.283: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R1#

Router R2

R2(config)#int se 1/0
R2(config-if)#no encap ppp
R2(config-if)#
R2(config-if)#end
R2#
R2#
*Mar 1 00:07:53.843: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
*Mar 1 00:07:54.559: %SYS-5-CONFIG_I: Configured from console by console
R2#
*Mar 1 00:07:55.883: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R2#
R2#ping 10.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/79/188 ms
R2#

Did you see the trick? Yes, because HDLC is the default encapsulation you can switch from PPP to HDLC with executing the command no encapsulation ppp instead ofencapsulation hdlc.

PPP Features

PPP was defined much later than the original HDLC specifications. As a result, the creators of PPP included many additional features that had not been seen in WAN data-link protocols up to that time. As a result, PPP has become the most popular and feature-rich WAN data link layer protocol.

PPP uses a protocol that focuses on the features that apply regardless of the Layer 3 protocol used and another protocol to support each Layer 3 protocol supported on the link. The PPP Link Control Protocol (LCP) provides the core features for PPP. For features related to a specific Layer 3 protocol, PPP uses a series of PPP control protocols, such as IP Control Protocol (IPCP). For example, IPCP provides for IP address assignment; this feature is used extensively with Internet dialup connections today.

PPP uses one LCP per link and one Control Protocol for each Layer 3 protocol defined on the link. If a router is configured for IPX, AppleTalk, and IP on a PPP serial link, the router configured for PPP encapsulation automatically tries to bring up the appropriate control protocols for each Layer 3 protocol (for example, IPCP). Cisco routers also use a PPP CP for supporting CDP traffic, called CDPCP.

LCP provides a variety of optional features for PPP. You should at least be aware of the concepts behind these features. They are summarized in the following table.

Function LCP Feature Description
Error detection Link Quality Monitoring (LQM) PPP can take down a link based on the percentage of errors on the link. LQM exchanges statistics about lost packets versus sent packets in each direction. When compared to packets and bytes sent, this yields a percentage of errored traffic. The percentage of loss that causes a link to be taken down is enabled and defined by a configuration setting.
Looped link detection Magic number Using different magic numbers, routers send messages to each other. If you receive your own magic number, the link is looped. A configuration setting determines whether the link should be taken down when looped.
Multilink support Multilink PPP Fragments of packets are load-balanced across multiple links.
Authentication PAP and CHAP Exchanges names and passwords so that each device can verify the identity of the device on the other end of the link.

Our Recommended Premium CCNA Training Resources

These are the best CCNA training resources online:

Click Here to get the Cisco CCNA Gold Bootcamp, the most comprehensive and highest rated CCNA course online with a 4.8 star rating from over 30,000 public reviews. I recommend this as your primary study source to learn all the topics on the exam. Cisco CCNA Gold Bootcamp
Want to take your practice tests to the next level? AlphaPreps purpose-built Cisco test engine has the largest question bank, adaptive questions, and advanced reporting which tells you exactly when you are ready to pass the real exam. Click here for your free trial. Cisco CCNA Gold Bootcamp