Setting a serial connection between two routers using PPP with CHAP authentication:
Set PC0: IP 192.168.1.2 gateway 192.168.1.1
Set PC1: IP 192.168.2.2 gateway 192.168.2.1
Issue the following commands in Router0:
enable configure terminal hostname Router0 no ip domain lookup line con 0 logging synchronous interface g0/0 ip address 192.168.1.1 255.255.255.0 no shutdown interface s0/0/0 ip address 10.1.1.1 255.255.255.0 no shutdown
Then in Router1:
enable configure terminal hostname Router1 no ip domain lookup line con 0 logging synchronous interface g0/0 ip address 192.168.2.1 255.255.255.0 no shutdown interface s0/0/0 ip address 10.1.1.2 255.255.255.0 no shutdown
Setting up the routing protocol, in this case, OSPF:
router ospf 1 network 192.168.1.0 0.0.0.255 area 0 network 10.1.1.0 0.0.0.255 area 0 passive-interface G0/0
Note: use the bold number as 1 for Router0 and 2 for Router1.
You should be able to ping from any to any device now.
Let’s set up the encapsulation type as PPP and CHAP authentication.
In Router0
username Router1 password cisco interface s0/0/0 encapsulation ppp ppp authentication chap
In Router1
username Router0 password cisco interface s0/0/0 encapsulation ppp ppp authentication chap
Note: in Router0 we create one user for Router1, and vice-versa. Replace “cisco” by the desired password.
Check the connectivity and if necessary shut the interface off and on again to speed the process up.
Relevant debugging commands:
debug ppp negotiation debug ppp packet debug ppp negotiation debug ppp packet debug ppp authentication undebug all