[Contents] [Prev] [Next] [Index] [Report an Error]

Understanding Session Creation: First Packet Processing

This section explains how a session is set up to process the packets composing a flow. To illustrate the process, this section uses an example with a source “a” and a destination “b”. The direction from source to destination for the packets of the flow is referred to as (a -> b). The direction from destination to source is referred to as (b -> a).

  1. A Packet Arrives at an interface on the device and the IOC processes it.

    The IOC dequeues the packet and sends it to the NPU with which it communicates.

  2. The NPU receives the packet from the IOC and processes it.
    1. The NPU performs basic sanity checks on the packet and applies some screens configured for the interface to the packet.
    2. If a session match is found, the session has already been created on an SPU that was assigned to it, so the NPU forwards the packet to the SPU for processing along with the session ID.

    Example: Packet (a ->b) arrives at NPU1 from IOC1. NPU1 performs sanity checks and applies DoS screens to the packet. NPU1 checks its session table for a tuple match and no existing session is found. NPU1 forwards the packet to the central point on SPU1 for assignment to an SPU.

  3. The Central Point (CP) Creates a Session with a “Pending” State.

    The central point maintains a global session table that includes entries for all sessions that exist across all SPUs on the device. It participates in session creation and delegates and arbitrates session resources allocation.

    This process entails the following parts:

    1. The central point checks its session table and gate table to determine if a session or a gate exists for the packet it receives from the NPU. (An NPU has forwarded a packet to the central point because its table indicates there is no session for it. The central point verifies this information before allocating an SPU for the session.)
    2. If there is no entry that matches the packet in either table, the central point creates a pending wing for the session and selects an SPU to be used for the session, based on its load-balancing algorithm.
    3. The central point forwards the first packet of the flow to the selected SPU in a message telling it to set up a session locally to be used for the packet flow.

    Example: The central point creates pending wing (a ->b) for the session. It selects SPU1 to be used for the session. It sends SPU1 the (a->b) packet along with a message to create a session for it. (It happens to be the case that SPU1 is the SPU that runs in combo mode. Therefore, its session-management and flow-processing services are used for the session.)

  4. The SPU Sets Up the Session.

    Each SPU, too, has a session table, which contains information about its sessions. When the SPU receives a message from the central point to set up a session, it checks its session table to ensure that a session does not already exist for the packet.

    1. If there is no existing session for the packet, the SPU sets up the session locally.
    2. The SPU sends a message to the central point, telling it to install the session.

    During first-packet processing, if NAT is enabled, the SPU allocates IP address resources for NAT. In this case, the first-packet processing for the session is suspended until the NAT allocation process is completed.

    The SPU adds to the queue any additional packets for the flow that it might receive until the session has been installed.

    Example: SPU1 creates the session for (a ->b) and sends a message back to the central point (implemented on the same SPU) telling it to install the pending session.

  5. The Central Point Installs the Session.

    The central point receives the install message from the SPU.

    1. It sets the state for the session’s pending wing to active.
    2. It installs the reverse wing for the session as an active wing.
    3. It sends an ACK (acknowledge) message to the SPU, indicating that the session is installed.

    Example: The central point receives a message from SPU1 to install the session for (a->b). It sets the session state for (a->b) wing to active. It installs the reverse wing (b->a) for the session and makes it active; this allows for delivery of packets from the reverse direction of the flow: destination (b) to be delivered to the source (a).

  6. The SPU Sets Up the Session on the Ingress and Egress NPUs.

    NPUs maintain information about a session for packet forwarding and delivery. Session information is set up on the egress and ingress NPUs (which sometimes are the same) so that packets can be sent directly to the SPU that manages their flows and not to the central point for redirection.

  7. Fast-Path Processing Takes Place.

    For the remainder of the steps entailed in packet processing, proceed to Step 1 in “Understanding Fast-Path Processing”.


[Contents] [Prev] [Next] [Index] [Report an Error]