IP Address Assignment with PPP IPCP Negotiation

PPP provides a way to assign ip address to a remote client on a serial link using IPCP protocol. Remember IPCP is part of PPP protocol suite.

In it’s simplest form, assuming you have the topology shown below;

R2 (s1/2) ———————————-  R3 (s1/2)

Question:

Configure the serial link between R1 & R2 with PPP encapsulation

R2 should assign ip address to R1 interface

Answer:

To configure this, we need to configure an ip address to R2  interface with appropriate mask.

Enable R2 to supply ip address to R1 with “peer default ….” command

And finally disable peer neighbor route on both end of the link

R3:

interface Serial1/2
 ip address negotiated
 encapsulation ppp
 end 

R2:

interface Serial1/2
 ip address 160.1.4.2 255.255.255.0
 encapsulation ppp
 peer default ip address 160.1.4.3
 end

 

Output on R3:

Gateway of last resort is not set

     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     160.1.0.0/16 is variably subnetted, 4 subnets, 2 masks
C       160.1.1.0/24 is directly connected, Serial1/0
C       160.1.3.0/24 is directly connected, FastEthernet0/0
C       160.1.4.3/32 is directly connected, Serial1/2
C       160.1.4.2/32 is directly connected, Serial1/2

——–

Serial1/0                  160.1.1.3       YES NVRAM  up                    up     
Serial1/2                  160.1.4.3       YES IPCP   up                    up     
Loopback0                  3.3.3.3         YES NVRAM  up                    up

Output on R2:

Rack1R2#sh ip ro co
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     160.1.0.0/16 is variably subnetted, 5 subnets, 2 masks
C       160.1.1.0/24 is directly connected, Serial1/0
C       160.1.2.0/24 is directly connected, FastEthernet0/0
C       160.1.4.0/24 is directly connected, Serial1/2
C       160.1.4.3/32 is directly connected, Serial1/2

 

You can see from these outputs that ip address assigned to s1/2 interface on R3 is from IPCP. You also noticed that output from “sh ip route” displayed 2 routes with /32 pointing in the direction of the link.

By default, when PPP link is enabled on a link, PPP creates a host routes for it’s peer on that link in it’s RIB and this is why we have one of the /32 route.  Basically, the router adds it remote peer’s ip address to it’s routing table with a /32 mask (And infact on both end of the links). This is applicable to static ip address assignment or negotiated on a PPP enabled link.

Ok, so why is the assigned ip address for R3 displayed with a mask of /32 in R3 RIB ?

When a PPP client peers assigns ip address to it’s remote peer on the link, it by default assigns the route as a /32 route and this is why we have “160.1.4.3/32” in R3 RIB.

There are two issues here:

1) How doe we remove this peer route from the router’s routing table since we really do not need it

2) How do we make IPCP assign the remote peer address with the correct mask (instead of /32).

 

To fix the first issue, we need to add an extra command to the serial links on both end of the link and then shut/no shut. This is shown below

R3:

interface Serial1/2
 ip address negotiated
 encapsulation ppp
 no peer neighbor-route
end 

R2:

interface Serial1/2
 ip address 160.1.4.2 255.255.255.0
 encapsulation ppp
 peer default ip address 160.1.4.3
 no peer neighbor-route
end

One of the Pitfalls to watch out for here is that if the peer neighbor route is not removed, it may cause RIP routes failure if RIP is enabled on this link. The reason for this failure is that when the the 2 routers exchange RIP updates, the router with static /24 address assigned (R2 here) will see the route from R3 as being in a different link since it expects /24 and the updates are being sent from a /32 address. Best Workaround for this RIP issue is to disable source address validation in RIP updates.

So, to the second issue raised above, the way to go about this is by configuring R2 to send /24 mask to R3 during IPCP negotiation. I will test this out and update this post later with the result.

Advertisements

7 Responses

  1. Hi Sesano, your topic is what I desperately need at this time. I have case where branches need to dial to HQ. HQ does not have many lines to support all of them. And we have bought pvdm2-36dm to terminate E1 as with async interfaces. Problem is routing protocol can’t be bring up since HQ always be assigned /32 as opposed to /30. The ip address needs to be assigned by branches due to the limitation of lines at HQ.
    Please help. I have been working on this for days..

    • I am happy you found this useful.

      There is actually a lot to this interaction between PPP (IPCP) and addressing with DHCP and access authentication escpecially for dialin.

      My plan is to take discuss these areas one after theother in the next few topics.

      • Thanks Sesano.
        Let me know when you have started the discussion for this ppp ipcp especially for dialin. For the time being, I use dial profile where I end up have to put all of the branch profile in HQ router just to accommodate /30 subnet mask so that Routing Protocol can be brought up on this link.

  2. Hi
    please have a look at the following Cisco documentation about IPCP network mask negotiation.
    http://www.cisco.com/en/US/docs/ios/12_1/12_1dc/feature/guide/ipcp_msk.pdf
    The command is:

    ppp ipcp mask

    I don’t have a router with a serial interface and can not test it but according to Cisco it can be applied in Template and Interface configuration mode

    • Hi Dani

      Thanks for the comment. Prior to posting the original note, I actually knew the command and I tried it but I don’t seem to be getting the expected result. If it really works well, I expect to see the installed route on R3 be set to /24 not /32. However, I do not expect this to stop the installation of the peer hos route.

      The fact that it did not work was why I did not include it in the original note

      Thanks as I am still trying to figure this out.

  3. Wendry,

    This is the first note I have written concerning the PPP IPCP. The next topic I intend to cover is the assignment of ip address from a local or remote DHCP pool. In order if someone dialin, an address should be assigned from a DHCP pool to this client.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: