Hello
Networkers,
Today I want to show a magic of PPP. Have you ever thought to connect two directly connected interfaces with IPs of two different networks?
Look at the topology shown in the image below:
Today I want to show a magic of PPP. Have you ever thought to connect two directly connected interfaces with IPs of two different networks?
Look at the topology shown in the image below:
I have two routers R1 and R2 connected over a serial link. Both the routers have one loopback Lo0 each. Check the interface configurations of both the routers.
R1:-
Interface Loopback0
IP address 1.1.1.1 255.255.255.255
Interface Serial0/0
IP unnumbered Loopback0
Similar configuration at R2:-
Interface Loopback0
IP address 2.2.2.2 255.255.255.255
!
Interface Serial0/0
IP unnumbered Loopback0
Unnumbered just replicates IP of some other interface, usually a loopback interface, to configured interface. In this example, Serial interfaces will use the IP address of Loopback interface.
If you don’t want to mess up with IP unnumbered, you may configure similar IP with smaller mask value. ( ie. R1- Serial0/0 – 1.1.1.1/30 and R2-Serial0/0 -2.2.2.2/30)
Now try to ping other end router IP.
I believe that even without doing that you can say it’s going to fail and surely it does.
Now configure encapsulation PPP on serial interfaces of both end routers. Shut any one side serial interface and then no shut it (to let the PPP process restarted).
Try to ping other end interface IP.
It works…. That’s the magic of PPP.
Let me explain how it does. PPP installs a /32 prefix in the routing table of the other end interface IP. Check routing table.
R1
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Serial0/0
R2
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
If you want to dig deeper and want to look how other end IP got installed in your routing table.
Enable debug ppp negotiation and shut, no shut any one side interface one more time to see the negotiation process. Hopefully you will see the output as below, (Focus on the outputs highlighted in Yellow),
*Mar 1 00:09:54.427: Se0/0 LCP: I CONFREQ [Open] id 7 len 10
*Mar 1 00:09:54.427: Se0/0 LCP: MagicNumber 0x001A6C73 (0x0506001A6C73)
*Mar 1 00:09:54.431: Se0/0 CDPCP: State is Closed
*Mar 1 00:09:54.431: Se0/0 IPCP: State is Closed
*Mar 1 00:09:54.435: Se0/0 PPP: Phase is TERMINATING
*Mar 1 00:09:54.439: Se0/0 PPP: Phase is ESTABLISHING
*Mar 1 00:09:54.439: Se0/0 LCP: O CONFREQ [Open] id 2 len 10
*Mar 1 00:09:54.439: Se0/0 LCP: MagicNumber 0x011A6A28 (0x0506011A6A28)
*Mar 1 00:09:54.443: Se0/0 LCP: O CONFACK [Open] id 7 len 10
*Mar 1 00:09:54.443: Se0/0 LCP: MagicNumber 0x001A6C73 (0x0506001A6C73)
*Mar 1 00:09:54.447: Se0/0 IPCP: Remove route to 1.1.1.1
*Mar 1 00:09:54.567: Se0/0 LCP: I CONFACK [ACKsent] id 2 len 10
*Mar 1 00:09:54.567: Se0/0 LCP: MagicNumber 0x011A6A28 (0x0506011A6A28)
*Mar 1 00:09:54.567: Se0/0 LCP: State is Open
*Mar 1 00:09:54.571: Se0/0 PPP: Phase is FORWARDING, Attempting Forward
*Mar 1 00:09:54.571: Se0/0 PPP: Discarded CDPCP code[1] id[1]
*Mar 1 00:09:54.575: Se0/0 PPP: Queue IPCP code[1] id[1]
*Mar 1 00:09:54.579: Se0/0 PPP: Phase is ESTABLISHING, Finish LCP
*Mar 1 00:09:54.583: Se0/0 PPP: Phase is UP
*Mar 1 00:09:54.583: Se0/0 IPCP: O CONFREQ [Closed] id 1 len 10
*Mar 1 00:09:54.583: Se0/0 IPCP: Address 2.2.2.2 (0x030602020202)
*Mar 1 00:09:54.587: Se0/0 CDPCP: O CONFREQ [Closed] id 1 len 4
*Mar 1 00:09:54.587: Se0/0 PPP: Process pending ncp packets
*Mar 1 00:09:54.587: Se0/0 IPCP: Redirect packet to Se0/0
*Mar 1 00:09:54.587: Se0/0 IPCP: I CONFREQ [REQsent] id 1 len 10
*Mar 1 00:09:54.591: Se0/0 IPCP: Address 1.1.1.1 (0x030601010101)
*Mar 1 00:09:54.591: Se0/0 IPCP: O CONFACK [REQsent] id 1 len 10
*Mar 1 00:09:54.591: Se0/0 IPCP: Address 1.1.1.1 (0x030601010101)
*Mar 1 00:09:54.679: Se0/0 IPCP: I CONFACK [ACKsent] id 1 len 10
*Mar 1 00:09:54.679: Se0/0 IPCP: Address 2.2.2.2 (0x030602020202)
*Mar 1 00:09:54.679: Se0/0 IPCP: State is Open
*Mar 1 00:09:54.691: Se0/0 IPCP: Install route to 1.1.1.1
*Mar 1 00:09:54.695: Se0/0 CDPCP: I CONFACK [REQsent] id 1 len 4
*Mar 1 00:09:56.555: Se0/0 CDPCP: Timeout: State ACKrcvd
*Mar 1 00:09:56.559: Se0/0 CDPCP: O CONFREQ [ACKrcvd] id 2 len 4
*Mar 1 00:09:56.583: Se0/0 CDPCP: I CONFREQ [REQsent] id 2 len 4
*Mar 1 00:09:56.583: Se0/0 CDPCP: O CONFACK [REQsent] id 2 len 4
*Mar 1 00:09:56.587: Se0/0 CDPCP: I CONFACK [ACKsent] id 2 len 4
*Mar 1 00:09:56.587: Se0/0 CDPCP: State is Open
Interface Loopback0
IP address 1.1.1.1 255.255.255.255
Interface Serial0/0
IP unnumbered Loopback0
Similar configuration at R2:-
Interface Loopback0
IP address 2.2.2.2 255.255.255.255
!
Interface Serial0/0
IP unnumbered Loopback0
Unnumbered just replicates IP of some other interface, usually a loopback interface, to configured interface. In this example, Serial interfaces will use the IP address of Loopback interface.
If you don’t want to mess up with IP unnumbered, you may configure similar IP with smaller mask value. ( ie. R1- Serial0/0 – 1.1.1.1/30 and R2-Serial0/0 -2.2.2.2/30)
Now try to ping other end router IP.
I believe that even without doing that you can say it’s going to fail and surely it does.
Now configure encapsulation PPP on serial interfaces of both end routers. Shut any one side serial interface and then no shut it (to let the PPP process restarted).
Try to ping other end interface IP.
It works…. That’s the magic of PPP.
Let me explain how it does. PPP installs a /32 prefix in the routing table of the other end interface IP. Check routing table.
R1
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Serial0/0
R2
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
If you want to dig deeper and want to look how other end IP got installed in your routing table.
Enable debug ppp negotiation and shut, no shut any one side interface one more time to see the negotiation process. Hopefully you will see the output as below, (Focus on the outputs highlighted in Yellow),
*Mar 1 00:09:54.427: Se0/0 LCP: I CONFREQ [Open] id 7 len 10
*Mar 1 00:09:54.427: Se0/0 LCP: MagicNumber 0x001A6C73 (0x0506001A6C73)
*Mar 1 00:09:54.431: Se0/0 CDPCP: State is Closed
*Mar 1 00:09:54.431: Se0/0 IPCP: State is Closed
*Mar 1 00:09:54.435: Se0/0 PPP: Phase is TERMINATING
*Mar 1 00:09:54.439: Se0/0 PPP: Phase is ESTABLISHING
*Mar 1 00:09:54.439: Se0/0 LCP: O CONFREQ [Open] id 2 len 10
*Mar 1 00:09:54.439: Se0/0 LCP: MagicNumber 0x011A6A28 (0x0506011A6A28)
*Mar 1 00:09:54.443: Se0/0 LCP: O CONFACK [Open] id 7 len 10
*Mar 1 00:09:54.443: Se0/0 LCP: MagicNumber 0x001A6C73 (0x0506001A6C73)
*Mar 1 00:09:54.447: Se0/0 IPCP: Remove route to 1.1.1.1
*Mar 1 00:09:54.567: Se0/0 LCP: I CONFACK [ACKsent] id 2 len 10
*Mar 1 00:09:54.567: Se0/0 LCP: MagicNumber 0x011A6A28 (0x0506011A6A28)
*Mar 1 00:09:54.567: Se0/0 LCP: State is Open
*Mar 1 00:09:54.571: Se0/0 PPP: Phase is FORWARDING, Attempting Forward
*Mar 1 00:09:54.571: Se0/0 PPP: Discarded CDPCP code[1] id[1]
*Mar 1 00:09:54.575: Se0/0 PPP: Queue IPCP code[1] id[1]
*Mar 1 00:09:54.579: Se0/0 PPP: Phase is ESTABLISHING, Finish LCP
*Mar 1 00:09:54.583: Se0/0 PPP: Phase is UP
*Mar 1 00:09:54.583: Se0/0 IPCP: O CONFREQ [Closed] id 1 len 10
*Mar 1 00:09:54.583: Se0/0 IPCP: Address 2.2.2.2 (0x030602020202)
*Mar 1 00:09:54.587: Se0/0 CDPCP: O CONFREQ [Closed] id 1 len 4
*Mar 1 00:09:54.587: Se0/0 PPP: Process pending ncp packets
*Mar 1 00:09:54.587: Se0/0 IPCP: Redirect packet to Se0/0
*Mar 1 00:09:54.587: Se0/0 IPCP: I CONFREQ [REQsent] id 1 len 10
*Mar 1 00:09:54.591: Se0/0 IPCP: Address 1.1.1.1 (0x030601010101)
*Mar 1 00:09:54.591: Se0/0 IPCP: O CONFACK [REQsent] id 1 len 10
*Mar 1 00:09:54.591: Se0/0 IPCP: Address 1.1.1.1 (0x030601010101)
*Mar 1 00:09:54.679: Se0/0 IPCP: I CONFACK [ACKsent] id 1 len 10
*Mar 1 00:09:54.679: Se0/0 IPCP: Address 2.2.2.2 (0x030602020202)
*Mar 1 00:09:54.679: Se0/0 IPCP: State is Open
*Mar 1 00:09:54.691: Se0/0 IPCP: Install route to 1.1.1.1
*Mar 1 00:09:54.695: Se0/0 CDPCP: I CONFACK [REQsent] id 1 len 4
*Mar 1 00:09:56.555: Se0/0 CDPCP: Timeout: State ACKrcvd
*Mar 1 00:09:56.559: Se0/0 CDPCP: O CONFREQ [ACKrcvd] id 2 len 4
*Mar 1 00:09:56.583: Se0/0 CDPCP: I CONFREQ [REQsent] id 2 len 4
*Mar 1 00:09:56.583: Se0/0 CDPCP: O CONFACK [REQsent] id 2 len 4
*Mar 1 00:09:56.587: Se0/0 CDPCP: I CONFACK [ACKsent] id 2 len 4
*Mar 1 00:09:56.587: Se0/0 CDPCP: State is Open
As part of
the PPP negotiation process first Link Control Protocol gets negotiated using
some Sequence numbers (called as magic number). So Magic number offered by the
other end, has to be accepted and acknowledged by first end and the same has to
be done at the other end. After LCP phase establishment other higher level protocols
gets negotiated (i.e. IPCP for IPv4, IPv6CP for IPv6, CDPCP- for CDP, etc.).
Since IP address are configured initially, so during IPCP (IP Control Protocol) both ends exchange their own IP address telling what addresses are configured with. Here PPP installs other end’s IP address in the routing table with a subnet of /32. (Even if the interface has, other than /32 mask and also irrespective of checking if the other end IP belongs to the same subnet as of this end interface IP or not)
One more advantage which PPP offers, that it doesn’t depend on layer three to layer two translations, (e.g.- Ethernet segment translates MAC address, Frame Relay translate appropriate DLCI value against IP address it communicating with). Because PPP knows that whatever be the L2 medium, my next hop IP belongs to the other end and so it directly forward packet to the physical layer for transmission. And especially because of this feature many networkers love network type PPP, while configuring routing protocols or even implementing IPv6.
Your comments and suggestions will highly appreciated.
Since IP address are configured initially, so during IPCP (IP Control Protocol) both ends exchange their own IP address telling what addresses are configured with. Here PPP installs other end’s IP address in the routing table with a subnet of /32. (Even if the interface has, other than /32 mask and also irrespective of checking if the other end IP belongs to the same subnet as of this end interface IP or not)
One more advantage which PPP offers, that it doesn’t depend on layer three to layer two translations, (e.g.- Ethernet segment translates MAC address, Frame Relay translate appropriate DLCI value against IP address it communicating with). Because PPP knows that whatever be the L2 medium, my next hop IP belongs to the other end and so it directly forward packet to the physical layer for transmission. And especially because of this feature many networkers love network type PPP, while configuring routing protocols or even implementing IPv6.
Your comments and suggestions will highly appreciated.
No comments:
Post a Comment