PPP 101
Last updated
Last updated
PPP is an open-standard, media-independent Layer 2 protocol that can provide such features as authentication, multilink, compression, reliability.
PPP uses 2 negotiation phases. First, LCP (Link Control Protocol) is used to set up the link and to negotiate authentication, compression mechanisms, available MTU size, and so on, and then there’s a NCP phase (Network Control Protocol) specific for each network layer protocol. There’s IPCP – for IPv4, IPv6CP – for IPv6 or CDPCP – for CDP (CDP is a actually a Layer 2 protocol that works over PPP)
For example, after LCP phase is over, the IPCP protocol will be used to exchange IP related information, like getting the IP address of the interface.
For back to back connections between 2 routers, the easiest way is to use PPP encapsulation on the physical interfaces connecting them:
In other environments, you can define the server’s physical interface to use PPP encapsulation as above, and use a Dialer Interface on the client.
The connection between the Dialer interface and physical interfaces is done via a Dialer Pool
To configure the physical interface to be a member of a Dialer Pool, use:
From now on, all PPP configuration is done on the Dialer interface, which acts as a PPP Profile that is applied on the physical interfaces.
A Dial interfaces is activated whenever interesting traffic is sent over it. To define the interesting traffic you will have to configure the Dial interface to be part of a Dial Group.
Then, the Dial Group will reference a Dial List, which will define interesting traffic. This configuration is done globally:
Whenever there is interesting traffic to be sent over the Dial interface, it will generate a Dial Call. You can configure the Dial interface to be always up if you use:
You can verify the status of a Dialer interface using:
PPP uses keepalives to monitor the link state. By default, keepalives are sent and expected every 10 seconds. Unlike most protocols, five missed keepalives will move the interface protocol to a “down” status.
Hitting enter will set the default value of 10 seconds. To disable keepalives completly use:
To verify keepalives, use:
A PPP client can manually set its IP address with
But it can also use IPCP to discover the IP address it should use. To enable the use of IPCP for address assginement, use:
If the previous keyword is used, then the client will attempt to get the previously assigned address from the server. The server can ignore this request if it uses:
Addresses assigned using IPCP are always /32 addresses. Additional information may be requested by the client if it is explicitly configured:
In order to reply to these requests, the server must be explicitly configured to send them. See next section.
When a PPP client requests its IP Address from the PPP Dial-in server, the latter will send by default an IP address from a local pool. This default mechanism can be overridden globally or on the interface, Globally:
Per interface:
To define a local IP-POOL, then use:
To define a DHCP-POOL and enter DHCP Pool Configuration Mode, use:
For DHCP Proxy client, configure the remote DHCP Server, using:
There is a problem when using the DHCP client. The router will forward the request sourced from the PPP interface. The DHCP server will send the reply unicast to this address. But since the negotiation is not completed until the other side receives an address (or renounces after too many fails – which will be too late anyway), the interface will have an up/down status. This means that it won’t be advertised by routing protocols, so probably the DHCP server doesn’t have a route back to it. This can be resolved by using static routes on the path from the server to our router, or in a more dynamic way, by using a loopback address and setting the address on the PPP interface as unnumbered from that loopback. This will let the prefix to be advertised by routing protocols.
When an IPCP client requests additional information, the router has to explicitly define them with:
When a PPP link is up, it will add a /32 route to that points to the IP address on the other end of the PPP link. This makes it possible for hosts with IP addresses in different subnets to be directly connected over a PPP link.
This feature can be disabled using the command:
PPP supports multiple authentication protocols, like PAP, CHAP, MS-CHAP, MS-CHAPv2 and EAP.
PPP can be configured to use a software compression algortithm. Compared to HDLC, PPP supports more compression algorithms and can be configured with different algorithms on each end. PPP LCP phase will take care of the negotiation.
To see the available compression algorithms use:
To see compression statistics use:
Notice the compression ratio and that different protocols are used for compression (TX) and decompression (RX)