Point-to-Point Protocol – Part. 3

ppp

Una vez que finaliza el establecimiento del enlace con LCP, y no se posee autenticación, PPP pasa a la fase de negociación de los protocolos de red.PPP posee NCP independientes para los protocolos de capa de red, donde los más usados son:

  • IPCP: utilizado para IPv4.
  • IPV6CP: para IPv6.
  • IPXCP: usado en IPX.
  • CDPCP: para CDP.

La idea de tener NCPs independientes, es que estos pueden abrir y cerrar los módulos en cualquier momento, sin afectar a los demás protocolos de capa de red.

Estos protocolos pueden negociar los parámetros a usar como se hace en LCP donde, por ejemplo, si uno de los dispositivos negocia la IP, mediante NCP el dispositivo remoto puede entregar información de direccionamiento.

Con respecto a la implementación del protocolo en los equipos, se configura la encapsulación del protocolo con el comando encapsulation ppp, en R1 se indica que se negociará el direccionamiento IPv4, R2 tiene un pool local de direcciones, y ambos routers tienen dirección IPv6 (solo para ver cómo negocia NCP):

R1:

R1#sh run int s1/0
Building configuration...

Current configuration : 118 bytes
!
interface Serial1/0
 ip address negotiated
 encapsulation ppp
 ipv6 address 2000::1/64
 serial restart-delay 0
end

R2:

R2#sh run int s1/0
Building configuration...

Current configuration : 168 bytes
!
interface Serial1/0
 ip address 192.168.1.2 255.255.255.0
 encapsulation ppp
 peer default ip address pool POOL
 ipv6 address 2000::2/64
 serial restart-delay 0
end

R2#sh run | in ip local pool 
ip local pool POOL 192.168.1.5 192.168.1.10

Cuando levantamos las interfaces, podemos ver la negociación de los protocolos de capa red con el comando debug ppp negotiation:

R1#debug ppp negotiation 
PPP protocol negotiation debugging is on
R1#
*Jun 25 12:57:03.923: Se1/0 LCP: O CONFREQ [REQsent] id 4 len 10
*Jun 25 12:57:03.927: Se1/0 LCP:    MagicNumber 0x012A9886 (0x0506012A9886)
*Jun 25 12:57:03.927: Se1/0 LCP: Event[Timeout+] State[REQsent to REQsent]
R1#
*Jun 25 12:57:05.939: Se1/0 LCP: O CONFREQ [REQsent] id 5 len 10
*Jun 25 12:57:05.943: Se1/0 LCP:    MagicNumber 0x012A9886 (0x0506012A9886)
*Jun 25 12:57:05.943: Se1/0 LCP: Event[Timeout+] State[REQsent to REQsent]
*Jun 25 12:57:06.035: Se1/0 LCP: I CONFREQ [REQsent] id 1 len 10
*Jun 25 12:57:06.035: Se1/0 LCP:    MagicNumber 0x022ABA39 (0x0506022ABA39)
*Jun 25 12:57:06.039: Se1/0 LCP: O CONFACK [REQsent] id 1 len 10
*Jun 25 12:57:06.039: Se1/0 LCP:    MagicNumber 0x022ABA39 (0x0506022ABA39)
*Jun 25 12:57:06.043: Se1/0 LCP: Event[Receive ConfReq+] State[REQsent to ACKsent]
*Jun 25 12:57:06.071: Se1/0 LCP: I CONFACK [ACKsent] id 5 len 10
*Jun 25 12:57:06.071: Se1/0 LCP:    MagicNumber 0x012A9886 (0x0506012A9886)
*Jun 25 12:57:06.071: Se1/0 LCP: Event[Receive ConfAck] State[ACKsent to Open]
*Jun 25 12:57:06.099: Se1/0 PPP: Phase is FORWARDING, Attempting Forward
*Jun 25 12:57:06.103: Se1/0 LCP: State is Open
*Jun 25 12:57:06.135: Se1/0 PPP: Phase is ESTABLISHING, Finish 
R1#LCP
*Jun 25 12:57:06.135: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
*Jun 25 12:57:06.151: Se1/0 PPP: Phase is UP
*Jun 25 12:57:06.159: Se1/0 IPCP: Protocol configured, start CP. state[Initial]
*Jun 25 12:57:06.167: Se1/0 IPCP: Event[OPEN] State[Initial to Starting]
*Jun 25 12:57:06.175: Se1/0 IPCP: O CONFREQ [Starting] id 1 len 10
*Jun 25 12:57:06.175: Se1/0 IPCP:    Address 0.0.0.0 (0x030600000000)
*Jun 25 12:57:06.179: Se1/0 IPCP: Event[UP] State[Starting to REQsent]
*Jun 25 12:57:06.187: Se1/0 IPV6CP: Protocol configured, start CP. state[Initial]
*Jun 25 12:57:06.195: Se1/0 IPV6CP: Event[OPEN] State[Initial to Starting]
*Jun 25 12:57:06.199: Se1/0 IPV6CP: O CONFREQ [Starting] id 1 len 14
*Jun 25 12:57:06.203: Se1/0 IPV6CP:    Interface-Id C801:26FF:FE5C:0000 (0x010AC80126FFFE5C0000)
*Jun 25 12:57:06.203: Se1/0 IPV6CP: Event[UP] State[Starting to REQsent]
*Jun 25 12:57:06.211: Se1/0 CDPCP: Protocol configured, start CP. state[Initial
R1#]
*Jun 25 12:57:06.219: Se1/0 CDPCP: Event[OPEN] State[Initial to Starting]
*Jun 25 12:57:06.223: Se1/0 CDPCP: O CONFREQ [Starting] id 1 len 4
*Jun 25 12:57:06.223: Se1/0 CDPCP: Event[UP] State[Starting to REQsent]
*Jun 25 12:57:06.231: Se1/0 IPCP: I CONFREQ [REQsent] id 1 len 10
*Jun 25 12:57:06.231: Se1/0 IPCP:    Address 192.168.1.2 (0x0306C0A80102)
*Jun 25 12:57:06.235: Se1/0 IPCP: O CONFACK [REQsent] id 1 len 10
*Jun 25 12:57:06.235: Se1/0 IPCP:    Address 192.168.1.2 (0x0306C0A80102)
*Jun 25 12:57:06.235: Se1/0 IPCP: Event[Receive ConfReq+] State[REQsent to ACKsent]
*Jun 25 12:57:06.235: Se1/0 IPV6CP: I CONFREQ [REQsent] id 1 len 14
*Jun 25 12:57:06.235: Se1/0 IPV6CP:    Interface-Id C802:26FF:FE5E:0000 (0x010AC80226FFFE5E0000)
*Jun 25 12:57:06.235: Se1/0 IPV6CP: O CONFACK [REQsent] id 1 len 14
*Jun 25 12:57:06.239: Se1/0 IPV6CP:    Interface-Id C802:26FF:FE5E:0000 (0x010AC80226FFFE5E0000)
*Jun 25 12:57:06.239: Se1/0 IPV6CP: Event[Receive ConfReq+] State[REQsent to 
R1#ACKsent]
*Jun 25 12:57:06.239: Se1/0 CDPCP: I CONFREQ [REQsent] id 1 len 4
*Jun 25 12:57:06.239: Se1/0 CDPCP: O CONFACK [REQsent] id 1 len 4
*Jun 25 12:57:06.239: Se1/0 CDPCP: Event[Receive ConfReq+] State[REQsent to ACKsent]
*Jun 25 12:57:06.255: Se1/0 IPCP: I CONFNAK [ACKsent] id 1 len 10
*Jun 25 12:57:06.255: Se1/0 IPCP:    Address 192.168.1.5 (0x0306C0A80105)
*Jun 25 12:57:06.255: Se1/0 IPCP: O CONFREQ [ACKsent] id 2 len 10
*Jun 25 12:57:06.255: Se1/0 IPCP:    Address 192.168.1.5 (0x0306C0A80105)
*Jun 25 12:57:06.255: Se1/0 IPCP: Event[Receive ConfNak/Rej] State[ACKsent to ACKsent]
*Jun 25 12:57:06.263: Se1/0 IPV6CP: I CONFACK [ACKsent] id 1 len 14
*Jun 25 12:57:06.263: Se1/0 IPV6CP:    Interface-Id C801:26FF:FE5C:0000 (0x010AC80126FFFE5C0000)
*Jun 25 12:57:06.267: Se1/0 IPV6CP: Event[Receive ConfAck] State[ACKsent to Open]
*Jun 25 12:57:06.267: Se1/0 CDPCP: I CONFACK [ACKsent] id 1 len 4
*Jun 25 12:57:06.267: Se1/0 CDPCP: Event[Receive ConfAck] State[ACKsent to Open]
R1#
*Jun 25 12:57:06.307: Se1/0 IPV6CP: State is Open
*Jun 25 12:57:06.339: Se1/0 CDPCP: State is Open
*Jun 25 12:57:06.363: Se1/0 IPCP: I CONFACK [ACKsent] id 2 len 10
*Jun 25 12:57:06.367: Se1/0 IPCP:    Address 192.168.1.5 (0x0306C0A80105)
*Jun 25 12:57:06.367: Se1/0 IPCP: Event[Receive ConfAck] State[ACKsent to Open]
*Jun 25 12:57:06.367: Se1/0 IPCP: State is Open
*Jun 25 12:57:06.371: Se1/0 IPCP: Install negotiated IP interface address 192.168.1.5
*Jun 25 12:57:06.451: Se1/0 Added to neighbor route AVL tree: topoid 0, address 192.168.1.2
*Jun 25 12:57:06.455: Se1/0 IPCP: Install route to 192.168.1.2

Podemos ver que R1 se encuentra negociando el direccionamiento IPv4 para su interfaz, donde a través de NCP indica que no tiene dirección “Se1/0 IPCP: Address 0.0.0.0 (0x030600000000)“, y R2 responde con un Configure-Nak, confirmando que no acepta dicha configuración, pero ofrece una nueva: “Se1/0 IPCP: I CONFNAK [ACKsent] id 1 len 10“, “Se1/0 IPCP: Address 192.168.1.5 (0x0306C0A80105)“.

Con un show ip interface brief podemos ver que se aprende la dirección a través de IPCP:

R1#sh ip int br | in Serial1/0
Serial1/0                  192.168.1.5     YES IPCP   up                    up      
R1#sh ip route | be Gateway
Gateway of last resort is not set

      192.168.1.0/32 is subnetted, 2 subnets
C        192.168.1.2 is directly connected, Serial1/0
C        192.168.1.5 is directly connected, Serial1/0

Con respecto a IPv6, los equipos informan su dirección Link-Local (R1: “Se1/0 IPV6CP: Interface-Id C801:26FF:FE5C:0000 (0x010AC80126FFFE5C0000)“, R2: “Se1/0 IPV6CP: Interface-Id C802:26FF:FE5E:0000 (0x010AC80226FFFE5E0000)“):

----!# R1 #!----

R1#sh ipv6 interface brief | sec Serial1/0
Serial1/0              [up/up]
    FE80::C801:26FF:FE5C:0
    2000::1

----!# R2 #!----

R2#sh ipv6 interface brief | sec Serial1/0
Serial1/0              [up/up]
    FE80::C802:26FF:FE5E:0
    2000::2

Y por último, podemos ver que también se establece una comunicación a través de CDP: “Se1/0 CDPCP: Protocol configured, start CP. state[Initial]“.