Subject: State machine question

From: "Affan Ahmed" <[email-masked]>
Date: Wed, 20 Feb 2002 01:34:55 -0800

i was just going through the ppp state machine and one thing bothrs me, i know there is a very lucid explanation for all of this but please bear with me and explain it to me :).

 When u get a terminate request in any of the ReqSent, AckRcvd, AckSent states you goto req sent state and also send a terminate ack. but afterthat even if you get a terminate ack you stay in Req sent state. How does the complete teard down of the (fsm and thence the entire link) come about???. I mean you are supposed to leave any of the PPP phases by sending the terminate request packages right!

regards 
Affan.

Check out Cupid School where you will learn from Matchmaker's
best and brightest. Good Luck!

http://ecard.matchmaker.com/cupid0202/cupid0202.html

---

From: Archie Cobbs <[email-masked]>
Date: Wed, 20 Feb 2002 09:32:42 -0800

>  When u get a terminate request in any of the ReqSent, AckRcvd, AckSent states you goto req sent state and also send a terminate ack. but afterthat even if you get a terminate ack you stay in Req s…

If a peer sends a terminate-request, then that peer must have
transitioned to Closing or Stopping. So the link will soon be
disconnected no matter what.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com

---

From: William Allen Simpson <[email-masked]>
Date: Wed, 27 Feb 2002 17:18:03 -0500

I see that this has already been partly answered, but I was passing 
by -- and thought a little history might be a reminder.

The formatting will leave a lot to be desired, since he has really 
long lines.

>  When u get a terminate request in any of the ReqSent, AckRcvd, AckSent states you goto req sent state and also send a terminate ack. but afterthat even if you get a terminate ack you stay in Req s…
You are in one of those states because _you_ want to be open.

The other end is saying "go away."

But, _you_ want to be open, so you knock at the door again and again.

Well, this part of the FSM logic evolved because Cisco had a bad old 
implementation in the early days that would still have old messages 
queued on a link that had gone down.  Many of those old messages were 
terminate requests left over from the previous session.

So, you say, "sure I'll terminate, but I want to start again!"

If the other end is serious, the link will go down.

But, if the other end is really OK, you'll eventually open successfully.

Affan Ahmed wrote:
> 
> from what i have gathered from a extensive study of the rfc 1661 the Starting, Stopped and Stopping states are where the admin wants you to keep trying for negotiation of link but the lower link is not available. Hence in these states you are asking for the lower layer to come up with the UP event. Am i right?
> 
Not quite.  (For one thing, Stopped and Stopping are when the link is
going down, not up.)

In general, PPP doesn't ask the lower layer, it waits for events from 
the lower layer.

Your dialer might be asking the lower layer, but PPP isn't a dialer.

Don't try to combine the two functions, or you'll get really confused.

And remember, PPP was also designed for normal everyday wires.  The 
administrator/configuration may send the Open event to PPP when the box 
starts up, to cause PPP to be used on the link (instead of say, SLFP). 
But it's plugging in the wire that really starts things going.

Open/Close are administrative.

Up/Down are physical reality.
-- 
William Allen Simpson
    Key fingerprint =  17 40 5E 67 15 6F 31 26  DD 0D B9 9B 6A 15 2C 32