PPP PAP Configuration on Cisco Routers in Packet Tracer

Aisyah Aldina

Cartoon open envelope with a key card inside for a Cisco PPP PAP guide

In this lab we configure PPP with PAP authentication on Cisco routers in Cisco Packet Tracer. PPP (Point-to-Point Protocol) runs on serial links between two routers, such as a head office and a branch. Its big advantage over Cisco’s default HDLC is that PPP can ask for a username and password before the link may carry traffic.

PAP (Password Authentication Protocol) is the simplest PPP authentication method. The branch router sends a username and password, and the head office router checks them against its own list. This lab has one head office and two branches, one-way and two-way PAP, a wrong password test, and an important Packet Tracer finding that stops one-way PAP from working. Everything was done in Cisco Packet Tracer 8.2.1.

Download the Packet Tracer lab file
Opens in Cisco Packet Tracer 8.2.1 or newer · 3 routers, 1 server, 2 PCs · two-way PPP PAP already running on both serial links
Download .pkt

Lab Topology and Devices

Router HQ in the middle is the head office, with a server on its LAN. Routers BR1 and BR2 are branch offices, each with one PC. The branches connect to HQ over serial cables, just like a leased line in the real world.

All three routers are Router-PT, Packet Tracer’s generic router that already has Serial2/0 and Serial3/0 ports, so no modules need to be added.

HQ in the middle, BR1 left, BR2 right, server on top

Topology of an HQ router with a server, BR1 and BR2 over red serial links, and two PCs in Packet Tracer

The red zigzag lines are serial cables. The small clock icon on HQ marks the DCE side.

Device      Interface    IP                   To
HQ          Fa0/0        10.0.0.1/24          Server0 (10.0.0.10)
HQ          Se2/0        172.16.1.1/30        BR1 Se2/0 (DCE, clock 64000)
HQ          Se3/0        172.16.2.1/30        BR2 Se2/0 (DCE, clock 64000)
BR1         Se2/0        172.16.1.2/30        HQ
BR1         Fa0/0        192.168.1.1/24       PC0 (192.168.1.10)
BR2         Se2/0        172.16.2.2/30        HQ
BR2         Fa0/0        192.168.2.1/24       PC1 (192.168.2.10)

PAP accounts
HQ stores       : username BR1 password cabang1, username BR2 password cabang2
Branches store  : username HQ password pusat123

Serial DCE cable from HQ to a branch

Zoomed red zigzag serial cable from HQ to BR1 marked with a red box

The HQ to BR1 and HQ to BR2 links use Serial DCE, drawn starting from HQ so HQ becomes the DCE end. The DCE end must supply a clock rate. The server and PCs connect to their routers with Copper Cross-Over because router and host are linked directly.

Setting IP Addresses on the Server and PCs

The server and PCs get static IPs and a gateway, which is the router’s IP on their LAN. Without a gateway, packets for another branch have nowhere to go.

The steps are the same on every host, so I only show PC0.

Open PC0

PC0 under BR1 circled in red

Click PC0 at the bottom left.

PC0 IP and gateway

PC0 IP Configuration 192.168.1.10 with gateway 192.168.1.1

Desktop tab, IP Configuration, Static, then 192.168.1.10, mask 255.255.255.0, gateway 192.168.1.1. Server0 gets 10.0.0.10 with gateway 10.0.0.1, and PC1 gets 192.168.2.10 with gateway 192.168.2.1.

Base Configuration on All Three Routers

Before adding PPP, we make sure every link works with HDLC, Cisco’s default encapsulation. If something breaks later, we know the cause is PPP, not IP or cabling.

Routing uses static routes. HQ knows the way to both branch LANs, and each branch just gets a default route to HQ.

Open HQ

HQ router in the centre circled in red

Click Router0 in the middle, then the CLI tab. Answer no to the initial configuration dialog.

enable
configure terminal
hostname HQ
interface fa0/0
 ip address 10.0.0.1 255.255.255.0
 no shutdown
interface serial2/0
 ip address 172.16.1.1 255.255.255.252
 clock rate 64000
 no shutdown
interface serial3/0
 ip address 172.16.2.1 255.255.255.252
 clock rate 64000
 no shutdown
exit
ip route 192.168.1.0 255.255.255.0 172.16.1.2
ip route 192.168.2.0 255.255.255.0 172.16.2.2
end
write memory

HQ base configuration saved

HQ setting serial IPs, clock rate 64000, and static routes to both branches

clock rate 64000 only goes on HQ because HQ is the DCE end. Set the hostname carefully, because PAP and CHAP use the hostname as a username.

Open BR1

BR1 router on the left circled in red

Click Router1 on the left, then the CLI tab.

enable
configure terminal
hostname BR1
interface fa0/0
 ip address 192.168.1.1 255.255.255.0
 no shutdown
interface serial2/0
 ip address 172.16.1.2 255.255.255.252
 no shutdown
exit
ip route 0.0.0.0 0.0.0.0 172.16.1.1
end
write memory
show interfaces serial2/0 | include Serial|Encap

BR2 is set up the same way with 192.168.2.1 on Fa0/0, 172.16.2.2 on Serial2/0, and a default route to 172.16.2.1.

The link is still HDLC and up

BR1 Serial2/0 up with Encapsulation HDLC before PPP

Serial2/0 is up, line protocol is up, and Encapsulation HDLC. That is our starting point before PPP.

One-Way PAP: HQ Checks BR1

With one-way PAP, only HQ asks for proof of identity. BR1 sends its username and password, but BR1 does not check HQ in return.

HQ needs two things: an account list created with the username command, and ppp authentication pap on the interface to make authentication mandatory.

HQ requires PAP on Serial2/0

HQ encapsulation ppp and ppp authentication pap leaving Serial2/0 down with LCP Closed
configure terminal
username BR1 password cabang1
interface serial2/0
 encapsulation ppp
 ppp authentication pap
end
show interfaces serial2/0 | include Serial|Encap|LCP

As soon as encapsulation ppp goes on, the line protocol drops and LCP shows Closed. HQ now speaks PPP while BR1 still speaks HDLC. Both ends of a serial link must use the same encapsulation.

Before moving to BR1, I turned on debug ppp authentication on HQ so we can watch PAP at work.

BR1 sends its username and password

BR1 ppp pap sent-username BR1 while the link is still down
configure terminal
interface serial2/0
 encapsulation ppp
 ppp pap sent-username BR1 password cabang1
end
write memory

ppp pap sent-username is the account BR1 sends to HQ. It must match HQ’s username line exactly. Even so, after 35 seconds the link was still down with LCP Closed.

The link comes up after an interface reset

After an interface reset BR1 Serial2/0 is up with LCP Open and IPCP
configure terminal
interface serial2/0
 shutdown
 no shutdown
end

After shutdown and no shutdown the link came straight up with LCP Open and Open: IPCP, CDPCP. IPCP means IP can now cross this PPP link. In Packet Tracer, PPP changes often only take effect after an interface reset like this.

PAP debug on HQ

HQ debug showing PAP I AUTH-REQ, Authenticating peer, Phase is FORWARDING

HQ shows PAP: I AUTH-REQ (HQ received a login request from BR1), Authenticating peer, then Phase is FORWARDING. The I means incoming, a packet arriving at HQ.

Finding: One-Way PAP Does Not Work in Packet Tracer

BR1 reported the link as up, so I assumed everything was fine. Then a ping from PC0 to the HQ server failed 100%.

I checked the HQ side with show ip interface brief, and it disagreed with BR1.

Serial2/0 on HQ stays down

show ip interface brief on HQ with Serial2/0 protocol down under one-way PAP

Serial2/0 on HQ is up but protocol down, even after resetting it on HQ too. Serial3/0 (to BR2, running two-way PAP) is fine.

BR1 believes the link is up

BR1 LCP Open with only ppp pap sent-username in the running-config

At the same time, BR1 shows LCP Open. BR1’s running-config only has encapsulation ppp and ppp pap sent-username, exactly like the one-way PAP example in Cisco’s documentation.

My experience: On a real Cisco router, the one-way PAP configuration above works normally. In the Packet Tracer 8.2.1 I used, the side asking for authentication (HQ) never came up. The fix in Packet Tracer is to make PAP two-way. If your exam or lab requires one-way PAP, check whether your Packet Tracer version behaves the same.

BR1 made two-way, HQ Serial2/0 comes up

After two-way PAP both HQ Serial2/0 and Serial3/0 are up

On BR1 I added username HQ password pusat123 and ppp authentication pap on Serial2/0. On HQ Serial2/0 I added ppp pap sent-username HQ password pusat123 and reset the interface. Now Serial2/0 and Serial3/0 on HQ are both up.

Two-Way PAP: HQ and BR2 Check Each Other

With two-way PAP every router plays both roles. It demands authentication from the other side and sends its own account at the same time.

So each router needs three things: the other side’s username, ppp authentication pap, and its own ppp pap sent-username.

HQ to BR2 on Serial3/0

HQ Serial3/0 with ppp authentication pap and ppp pap sent-username HQ
configure terminal
username BR2 password cabang2
interface serial3/0
 encapsulation ppp
 ppp authentication pap
 ppp pap sent-username HQ password pusat123
end
write memory

BR2 to HQ, the link comes up

BR2 two-way PAP with Serial2/0 up and LCP Open
configure terminal
username HQ password pusat123
interface serial2/0
 encapsulation ppp
 ppp authentication pap
 ppp pap sent-username BR2 password cabang2
 shutdown
 no shutdown
end
write memory
show interfaces serial2/0 | include Serial|LCP|Open

The link is up with LCP Open and IPCP running.

Wrong Password Test

Now let us see what happens when a branch sends the wrong password. On BR2 I changed the password it sends to salah123.

This mirrors a real situation: a branch admin mistypes the password, or HQ changes it without telling the branch.

The BR2 link drops at once

BR2 password salah123 bringing Serial2/0 down with LCP Closed
configure terminal
interface serial2/0
 ppp pap sent-username BR2 password salah123
 shutdown
 no shutdown
end
show interfaces serial2/0 | include Serial|LCP

Serial2/0 is up, line protocol is down (disabled) and LCP Closed.

HQ debug: Authentication failed

HQ debug with Unauthenticated User and O AUTH-NAK Authentication failed

The top of the debug shows the successful two-way PAP: O AUTH-REQ (HQ sending its account) and I AUTH-REQ (HQ receiving BR2’s). After the password change you see Phase is AUTHENTICATING, Unauthenticated User and O AUTH-NAK with the message Authentication failed. NAK means HQ rejected BR2’s login.

Serial3/0 status on HQ

HQ still showing Serial3/0 up and LCP Open

Oddly, HQ still shows Serial3/0 up with LCP Open. That is another Packet Tracer quirk. What matters is the real result: can traffic get through?

A ping from BR2 to the server fails

BR2 ping to 10.0.0.10 failing at 0 percent with the link down
ping 10.0.0.10

Success rate 0 percent. Even though HQ shows the link up, no traffic passes, so PAP successfully locked out the branch with the wrong password. After the test I set BR2’s password back to cabang2.

The BR2 link recovers

BR2 Serial2/0 back up with LCP Open after the correct password

With the correct password and two interface resets, LCP is Open again. The first reset was not enough because HQ was still holding the old state.

End-to-End Test

Finally we test from the PC in branch 1 to the HQ server and to the PC in branch 2. Packets to PC1 have to cross both PPP links.

This screenshot also shows the before and after of the one-way PAP fix.

PC0 pings the server and PC1

PC0 ping to the server failing under one-way PAP, then succeeding with TTL 126, and PC1 replying with TTL 125
ping 10.0.0.10
ping 192.168.2.10

The first ping to the server failed 100% while the BR1 link was still one-way PAP. After switching to two-way, the ping to the server works with 0% loss and TTL=126, and the ping to PC1 works with TTL=125. The TTL drops by 3 because the packet crosses BR1, HQ, and BR2.

PAP vs CHAP

PAP and CHAP are both PPP authentication methods. They differ in how the password travels.

PAP sends the password as plain text, once, at the start. Anyone tapping the link can read it. CHAP never sends the password, only a hash calculated from it, and it can re-check periodically.

                 PAP                          CHAP
Password         sent in plain text           never sent, only a hash
Checking         once at the start            at the start and periodically
Who starts       the router being checked     the router doing the checking
Key command      ppp pap sent-username        username = peer hostname
Security         low                          stronger

That is why PAP is rarely used on production networks today. It is still worth learning, because the ideas of username, sent-username, and authentication direction are the foundation for understanding CHAP.

Common Problems and Fixes

Most PPP problems show up as line protocol down with no clear error. debug ppp authentication is the most useful tool to find the cause.

Remember to turn debugging off with undebug all when you are done, because debug output can bury the results of other commands.

Line protocol goes down after encapsulation ppp

The other end is still HDLC. Put encapsulation ppp on both ends of the serial link.

Configuration looks right but the link stays down

In Packet Tracer, reset the interface with shutdown and no shutdown. Sometimes it takes two resets, or a reset on both ends.

Debug shows Authentication failed

The username or password in ppp pap sent-username does not match the username line on the other router. Upper and lower case matter.

One side is up and the other is down

In Packet Tracer this happens with one-way PAP and after a password change. Make PAP two-way and reset both ends.

The link is up but pings to the other branch fail

A static or default route is missing. Check show ip route on every router.

We now have PPP PAP on two serial links, watched authentication happen in debug, proved that a wrong password locks a branch out, and found the one-way PAP limitation in Packet Tracer ourselves. To connect offices over the internet instead of serial lines, see static and dynamic NAT configuration on a Cisco router. If something breaks while you follow along, leave a comment below.

Leave a Comment