cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4245
Views
15
Helpful
5
Replies

On which OSI layer PPP functions ?

Hisham1984
Level 1
Level 1

Hi Guys,

I didn't find all the answers I needed for this question on the forum history...

Let's put it that way:

 -PPP is clearly referred to as Layer 2 WAN Protocol... Yet, we can see that it uses NCP (Network Control Protocol) to negotiate IPCP and configure Layer 3 protocol over the link.

So, how come it's considered L2 protocol ? I thought that lower layers on OSI model can't interact or negotiate connection based on upper layers information.

- I also found this Ciscopress.com article describing PPP architecture from layer 1 up to 3 and mentioning the NCP functionality over layer 3  :

http://www.ciscopress.com/articles/article.asp?p=2202412&seqNum=5

 

Can you help me with it, may be I'm missing something here to understand the PPP correctly ..

Thanks,

1 Accepted Solution

Accepted Solutions

I would suggest that the original question is based on a faulty assumption that a protocol like ppp has to be a single layer protocol. While this may be true for some protocols like hdlc it is not true of ppp. ppp has some processes which operate at layer 2 and some processes that operate at layer 3. The delineation between the protocols is clear: LCP deals with layer 2 things while NCP deals with layer 3.

The original post reminds us of the principle that "lower layers on OSI model can't interact or negotiate connection based on upper layers information." and that is true when you think of the component processes within ppp. PPP as a complete protocol is in fact a multi layer protocol.

HTH

Rick

HTH

Rick

View solution in original post

5 Replies 5

Ben Gartland
Level 1
Level 1

It may help if you think about NCP and IPCP as sub functions of PPP rather than a separate layer.

When you see a packet trace of PPP traffic you will see:

The PPP negotiations start with LCP doing Config Requests, Ack, Negative Ack, Config Reject, for example, here you see the MRU, magic number and CHAP negotiated.  PPP is negotiated in both directions, A sends requests to B and B has to Acknowledge these as accepted or NACK or Reject the requested parameters, the same is done B to A with A accept or reject the parameters, only 1 side is shown here:

 

Remote to Local initial PPP packet

----- 4-4-2016 11:00:35.900 -------
FF 03 C0 21 01 F9 00 13 01 04 05 DC 03 05 C2 23 ...!...........#
05 05 06 69 67 E6 A0 ...ig..

PPP 0 From REM TO LOC
FF 03 ADD/CTL
C0 21 Protocol: LCP
01 Code: CFG REQ
F9 ID: 249
00 13 Len: 19
Options:
01 MRU 05 DC
03 Authentication C2 23 05
05 Magic Number 69 67 E6 A0
----------

Response from Local to Remote, ACKnowledging the requested parameters

----- 4-4-2016 11:00:35.900 -------
FF 03 C0 21 02 F9 00 13 01 04 05 DC 03 05 C2 23 ...!...........#
05 05 06 69 67 E6 A0 ...ig..

PPP 0 From LOC TO REM
FF 03 ADD/CTL
C0 21 Protocol: LCP
02 Code: CFG ACK
F9 ID: 249
00 13 Len: 19
Options:
01 MRU 05 DC
03 Authentication C2 23 05
05 Magic Number 69 67 E6 A0
----------

Next you will see Authentication happen, in this case, CHAP, First the CHAP challenge:

----- 4-4-2016 11:00:36.040 -------
FF 03 C2 23 01 02 00 21 10 B9 08 66 08 E7 21 F4 ...#...!...f..!.
B6 FA A5 BF 40 C6 C9 6E A8 52 32 31 43 42 49 52 ....@..n.R21CBIR
4C 4E 53 30 39 LNS09

PPP 0 From REM TO LOC
FF 03 ADD/CTL
C2 23 Protocol: CHAP
01 Code: Challenge
02 ID: 2
00 21 Len: 33
----------

Now the CHAP response


----- 4-4-2016 11:00:36.040 -------
FF 03 C2 23 02 02 00 2D 10 F4 33 8C AA A8 B8 2E ...#...-..3.....
EA 3B 79 XX XX XX XX XX XX XX XX XX 31 31 31 .;y.I`x..user.....
40 68 67 XX XX XX XX XX XX XX XX XX XX 63 6F @.btclick.com
6D m

PPP 0 From LOC TO REM
FF 03 ADD/CTL
C2 23 Protocol: CHAP
02 Code: Response
02 ID: 2
00 2D Len: 45
----------

And the ACKnowledgment that authentication was successful.


----- 4-4-2016 11:00:36.090 -------
FF 03 C2 23 03 02 00 04 ...#....

PPP 0 From REM TO LOC
FF 03 ADD/CTL
C2 23 Protocol: CHAP
03 Code: CFG ACK
02 ID: 2
00 04 Len: 4
----------

Finally, IPCP is used to negotiate an IP address, DNS servers and other options.

A request is sent using all zeros to request IP address and DNS servers.

----- 4-4-2016 11:00:36.090 -------
FF 03 80 21 01 02 00 16 03 06 00 00 00 00 81 06 ...!............
00 00 00 00 83 06 00 00 00 00 ..........

PPP 0 From LOC TO REM
FF 03 ADD/CTL
80 21 Protocol: IPCP
01 Code: CFG REQ
02 ID: 2
00 16 Len: 22
Options:
03 Address 00 00 00 00
81 Primary DNS 00 00 00 00
83 ??? (131) 00 00 00 00
----------

The server says use 22.22.22.2

----- 4-4-2016 11:00:36.090 -------
FF 03 80 21 01 01 00 0A 03 06 16 16 16 02 ...!......Q...

PPP 0 From REM TO LOC
FF 03 ADD/CTL
80 21 Protocol: IPCP
01 Code: CFG REQ
01 ID: 1
00 0A Len: 10
Options:
03 Address 16 16 16 02
----------

Local says OK, will use 22.22.22.2


----- 4-4-2016 11:00:36.090 -------
FF 03 80 21 02 01 00 0A 03 06 16 16 16 02 ...!......Q...

PPP 0 From LOC TO REM
FF 03 ADD/CTL
80 21 Protocol: IPCP
02 Code: CFG ACK
01 ID: 1
00 0A Len: 10
Options:
03 Address 16 16 16 02
----------

Server says, no, use this.  Sends IP address and DNS server.


----- 4-4-2016 11:00:36.100 -------
FF 03 80 21 03 02 00 16 03 06 16 16 16 02 81 06 ...!......Q.....
16 16 16 01 .H.r..>.(.

PPP 0 From REM TO LOC
FF 03 ADD/CTL
80 21 Protocol: IPCP
03 Code: CFG NAK
02 ID: 2
00 16 Len: 22
Options:
03 Address 16 16 16 02
81 Primary DNS 16 16 16 01
----------

Local requests the notified IP address and DNS server


----- 4-4-2016 11:00:36.100 -------
FF 03 80 21 01 03 00 16 03 06 16 16 16 02 81 06 ...!......Q.....
16 16 16 01 .H.r..>.(.

PPP 0 From LOC TO REM
FF 03 ADD/CTL
80 21 Protocol: IPCP
01 Code: CFG REQ
03 ID: 3
00 16 Len: 22
Options:
03 Address 16 16 16 02
81 Primary DNS 16 16 16 01
----------

Remote (PPP server) sends an ACK to the requested IP address and DNS server, and at this point the PPP link is up.


----- 4-4-2016 11:00:36.110 -------
FF 03 80 21 02 03 00 16 03 06 16 16 16 02 81 06 ...!......Q.....
16 16 16 01 .H.r..>.(.

PPP 0 From REM TO LOC
FF 03 ADD/CTL
80 21 Protocol: IPCP
02 Code: CFG ACK
03 ID: 3
00 16 Len: 22
Options:
03 Address 16 16 16 02
81 Primary DNS 16 16 16 01
----------

 

So you see, NCP and IPCP are not separate layers as such, just individual functions within the PPP negotiation.

 

Hope this helps.  Lab it and look at the traces, it will become a lot clearer for you.

 

Regards,

Ben

Thanks for the specific data Ben ... I think I'll need to lab it and check it closely as you recommended.

But back to my question ... Shouldn't Layer 2 protocols -such as HDLC and PPP- focus only on encapsulating Layer 3 packets and forward them without changing or negotiation their Layer 3 addresses ?

I quote from your data (Local says OK, will use 22.22.22.2) ... How come PPP on my local device suggest or negotiate a Layer 3 subnet ? 

My confusing comes from the thin line between OSI layer functions .... Why are we seeing IP negotiation on a Layer 2 protocol ?

Sorry if I missed something so basic to let me go stuck in this loop ..

Have a think about how this works on a LAN, the whole DHCP process is done using layer 3 broadcasts, but the DHCP client doesn't have an IP address, so as this packet is handled by the TCP/IP stack these packets becomes a layer 2 broadcast frames and are sent from the host's & server's source MAC address to the broadcast MAC address FF:FF:FF:FF:FF:FF.

This happens until the host has an IP address, and at that point, further TCP/IP traffic will start to use a layer 3 address (but not before).

The same happens with PPP negotiations, there is no layer 3 connectivity at this point, so something at a lower layer needs to be used to help the host obtain an IP address, IPCP in the case of PPP (instead of a broadcast frame as seen on an Ethernet LAN).

Both are handled/transported at layer 2 in the end, broadcast frames or IPCP within PPP, but in Ethernet we're used to seeing the UDP packet first before it is encapsulated as an ethernet frame.

I would suggest that the original question is based on a faulty assumption that a protocol like ppp has to be a single layer protocol. While this may be true for some protocols like hdlc it is not true of ppp. ppp has some processes which operate at layer 2 and some processes that operate at layer 3. The delineation between the protocols is clear: LCP deals with layer 2 things while NCP deals with layer 3.

The original post reminds us of the principle that "lower layers on OSI model can't interact or negotiate connection based on upper layers information." and that is true when you think of the component processes within ppp. PPP as a complete protocol is in fact a multi layer protocol.

HTH

Rick

HTH

Rick

So, does that mean that PPP is officially multi-layer protocol, or does it mean that we can just say PPP is L2 protocol but it permits multiple network layer protocols to operate on the same communication link.

I think there's a thin line between these two assumptions that may cause confusion among most networking communities ?? But which one is correct ??

Review Cisco Networking products for a $25 gift card