Most of the examples in this section use IPv4 addressing. But there is nothing special about IPv4 in the mechanisms described in this document, and they are equally applicable to IPv6. A few examples using IPv6 addressing are provided in
Section 8.10.
Assume we have a service function overlay network with four SFFs (SFF1, SFF2, SFF3, and SFF4). The SFFs have addresses in the underlay network as follows:
SFF1 192.0.2.1
SFF2 192.0.2.2
SFF3 192.0.2.3
SFF4 192.0.2.4
Each SFF provides access to some SFIs from the four SFTs, SFT=41, SFT=42, SFT=43, and SFT=44, as follows:
SFF1 SFT=41 and SFT=42
SFF2 SFT=41 and SFT=43
SFF3 SFT=42 and SFT=44
SFF4 SFT=43 and SFT=44
The service function network also contains a controller with address 198.51.100.1.
This example service function overlay network is shown in
Figure 11.
--------------
| Controller |
| 198.51.100.1 | ------ ------ ------ ------
-------------- | SFI | | SFI | | SFI | | SFI |
|SFT=41| |SFT=42| |SFT=41| |SFT=43|
------ ------ ------ ------
\ / \ /
--------- ---------
---------- | SFF1 | | SFF2 |
Packet --> | | |192.0.2.1| |192.0.2.2|
Flows --> |Classifier| --------- --------- -->Dest
| | -->
---------- --------- ---------
| SFF3 | | SFF4 |
|192.0.2.3| |192.0.2.4|
--------- ---------
/ \ / \
------ ------ ------ ------
| SFI | | SFI | | SFI | | SFI |
|SFT=42| |SFT=44| |SFT=43| |SFT=44|
------ ------ ------ ------
The SFFs advertise routes to the SFIs they support. These advertisements contain RDs that are set according to the network operator's configuration model. In all of these IPv4 examples, we use RDs of Type 1 such that the available six octets are partitioned as four octets for the IPv4 address of the advertising SFF, and two octets that are a local index of the SFI. This scheme is chosen purely for convenience of documentation, and an operator is totally free to use any other scheme so long as it conforms to the definitions of SFIR and SFPR in Sections [
3.1] and [
3.2].
Thus, we see the following SFIRs advertised:
RD = 192.0.2.1/1, SFT = 41
RD = 192.0.2.1/2, SFT = 42
RD = 192.0.2.2/1, SFT = 41
RD = 192.0.2.2/2, SFT = 43
RD = 192.0.2.3/7, SFT = 42
RD = 192.0.2.3/8, SFT = 44
RD = 192.0.2.4/5, SFT = 43
RD = 192.0.2.4/6, SFT = 44
Note that the addressing used for communicating between SFFs is taken from the tunnel encapsulation attribute of the SFIR and not from the SFIR-RD.
Consider the following SFPR.
SFP1: RD = 198.51.100.1/101, SPI = 15,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 43, RD = 192.0.2.2/2]
The SFP consists of an SF of Type 41 located at SFF1, followed by an SF of Type 43 located at SFF2. This path is fully explicit, and each SFF is offered no choice in forwarding packets along the path.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (15). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 has no flexibility in the choice of SFF to support the next-hop SFI and will forward the packet to SFF2, which will send the packets to the SFI that supports SFT 43 before forwarding the packets to their destinations.
SFP2: RD = 198.51.100.1/102, SPI = 16,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 43, {RD = 192.0.2.2/2,
RD = 192.0.2.4/5 } ]
In this example, the path also consists of an SF of Type 41 located at SFF1, and this is followed by an SF of Type 43. However, in this case, the SI = 250 contains a choice between the SFI located at SFF2 and the SFI located at SFF4.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (16). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 now has a choice of next-hop SFFs to execute the next hop in the path. It can either forward packets to SFF2 or SFF4 to execute a function of Type 43. It uses its local load-balancing algorithm to make this choice. The chosen SFF will send the packets to the SFI that supports SFT 43 before forwarding the packets to their destinations.
SFP3: RD = 198.51.100.1/103, SPI = 17,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 44, RD = 0]
In this example, the path also consists of an SF of Type 41 located at SFF1, and this is followed by an SI with an RD of zero and SF of Type 44. This means that a choice can be made between any SFF that supports an SFI of Type 44.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (17). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 now has a free choice of next-hop SFFs to execute the next hop in the path, selecting between all SFFs that support SFs of Type 44. Looking at the SFIRs it has received, SFF1 knows that SF Type 44 is supported by SFF3 and SFF4. SFF1 uses its local load-balancing algorithm to make this choice. The chosen SFF will send the packets to the SFI that supports SFT 44 before forwarding the packets to their destinations.
SFP4: RD = 198.51.100.1/104, SPI = 18,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, {SFT = 43, RD = 192.0.2.2/2,
SFT = 44, RD = 192.0.2.3/8 } ]
This example provides a choice of SF type in the second hop in the path. The SI of 250 indicates a choice between SF Type 43 located at SF2 and SF Type 44 located at SF3.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (18). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 now has a free choice of next-hop SFFs to execute the next hop in the path, selecting between all SFFs that support an SF of Type 43 and SFF3, which supports an SF of Type 44. These may be completely different functions that are to be executed dependent on specific conditions, or they may be similar functions identified with different type identifiers (such as firewalls from different vendors). SFF1 uses its local policy and load-balancing algorithm to make this choice and may use additional information passed back from the local SFI to help inform its selection. The chosen SFF will send the packets to the SFI that supports the chosen SFT before forwarding the packets to their destinations.
SFP5: RD = 198.51.100.1/105, SPI = 19,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/106, Assoc-SPI = 20,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 43, RD = 192.0.2.2/2]
SFP6: RD = 198.51.100.1/106, SPI = 20,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/105, Assoc-SPI = 19,
[SI = 254, SFT = 43, RD = 192.0.2.2/2],
[SI = 249, SFT = 41, RD = 192.0.2.1/1]
This example demonstrates correlation of two SFPs to form a bidirectional SFP, as described in
Section 7.1.
Two SFPRs are advertised by the controller. They have different SPIs (19 and 20), so they are known to be separate SFPs, but they both have Association TLVs with Association Type set to 1, indicating bidirectional SFPs. Each has an "Associated SFPR-RD" field containing the value of the other SFPR-RD to correlate the two SFPs as a bidirectional pair.
As can be seen from the SFPRs in this example, the paths are symmetric: the hops in SFP5 appear in the reverse order in SFP6.
SFP7: RD = 198.51.100.1/107, SPI = 21,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/108, Assoc-SPI = 22,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 43, RD = 192.0.2.2/2]
SFP8: RD = 198.51.100.1/108, SPI = 22,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/107, Assoc-SPI = 21,
[SI = 254, SFT = 44, RD = 192.0.2.4/6],
[SI = 249, SFT = 41, RD = 192.0.2.1/1]
Asymmetric bidirectional SFPs can also be created. This example shows a pair of SFPs with distinct SPIs (21 and 22) that are correlated in the same way as in the example in
Section 8.5.
However, unlike in that example, the SFPs are different in each direction. Both paths include a hop of SF Type 41, but SFP7 includes a hop of SF Type 43 supported at SFF2, while SFP8 includes a hop of SF Type 44 supported at SFF4.
SFP9: RD = 198.51.100.1/109, SPI = 23,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 44, RD = 192.0.2.4/5],
[SI = 245, {SFT = 1, RD = {SPI=23, SI=255, Rsv=0},
SFT = 42, RD = 192.0.2.3/7 } ]
Looping and jumping are described in
Section 6. This example shows an SFP that contains an explicit loop-back instruction that is presented as a choice within an SFP hop.
The first two hops in the path (SI = 255 and SI = 250) are normal. That is, the packets will be delivered to SFF1 and SFF4 in turn for execution of SFs of Type 41 and 44, respectively.
The third hop (SI = 245) presents SFF4 with a choice of next hop. It can either forward the packets to SFF3 for an SF of Type 42 (the second choice) or it can loop back.
The loop-back entry in the SFPR for SI = 245 is indicated by the special-purpose SFT value 1 ("Change Sequence"). Within this hop, the RD is interpreted as encoding the SPI and SI of the next hop (see
Section 6.1). In this case, the SPI is 23, which indicates that this is a loop or branch, i.e., the next hop is on the same SFP. The SI is set to 255; this is a higher number than the current SI (245), indicating a loop.
SFF4 must make a choice between these two next hops. The packet will be either forwarded to SFF3 with the NSH SI decreased to 245 or looped back to SFF1 with the NSH SI reset to 255. This choice will be made according to local policy, information passed back by the local SFI, and details in the packets' metadata that are used to prevent infinite looping.
SFP10: RD = 198.51.100.1/110, SPI = 24,
[SI = 254, SFT = 42, RD = 192.0.2.3/7],
[SI = 249, SFT = 43, RD = 192.0.2.2/2]
SFP11: RD = 198.51.100.1/111, SPI = 25,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 1, RD = {SPI=24, SI=254, Rsv=0}]
Branching follows a similar procedure to that for looping (and jumping), as shown in
Section 8.7. However, there are two SFPs involved.
SFP10 shows a normal path with packets forwarded to SFF3 and SFF2 for execution of service functions of Type 42 and 43, respectively.
SFP11 starts as normal (SFF1 for an SF of Type 41), but then SFF1 processes the next hop in the path and finds a "Change Sequence" special-purpose SFT. The "SFIR-RD" field includes an SPI of 24, which indicates SFP10, not the current SFP. The SI in the SFIR-RD is 254, so SFF1 knows that it must set the SPI/SI in the NSH to 24/254 and send the packets to the appropriate SFF, as advertised in the SFPR for SFP10 (that is, SFF3).
This section provides some examples to demonstrate establishing SFPs when there is a choice of service functions at a particular hop, and where consistency of choice is required in both directions. The scenarios that give rise to this requirement are discussed in
Section 7.2.
Consider the topology shown in
Figure 12. There are three SFFs arranged neatly in a line, and the middle one (SFF2) supports three SFIs all of SFT 42. These three instances can be used by SFF2 to load balance so that no one instance is swamped.
------ ------ ------ ------ ------
| SFI | | SFIa | | SFIb | | SFIc | | SFI |
|SFT=41| |SFT=42| |SFT=42| |SFT=42| |SFT=43|
------ ------\ ------ /------ ------
\ \ | / /
--------- --------- ---------
---------- | SFF1 | | SFF2 | | SFF3 |
--> | |..|192.0.2.1|...|192.0.2.2|...|192.0.2.3|-->
--> |Classifier| --------- --------- ---------
| |
----------
This leads to the following SFIRs being advertised.
RD = 192.0.2.1/11, SFT = 41
RD = 192.0.2.2/11, SFT = 42 (for SFIa)
RD = 192.0.2.2/12, SFT = 42 (for SFIb)
RD = 192.0.2.2/13, SFT = 42 (for SFIc)
RD = 192.0.2.3/11, SFT = 43
The controller can create a single forward SFP (SFP12), giving SFF2 the choice of which SFI to use to provide a function of SFT 42, as follows. The load-balancing choice between the three available SFIs is assumed to be within the capabilities of the SFF, and if the SFs are stateful, it is assumed that the SFF knows this and arranges load balancing in a stable, flow-dependent way.
SFP12: RD = 198.51.100.1/112, SPI = 26,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/113, Assoc-SPI = 27,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, {RD = 192.0.2.2/11,
192.0.2.2/12,
192.0.2.2/13 }],
[SI = 253, SFT = 43, RD = 192.0.2.3/11]
The reverse SFP (SFP13) in this case may also be created as shown below, using association with the forward SFP and giving the load-balancing choice to SFF2. This is safe, even in the case that the SFs of Type 42 are stateful, because SFF2 is doing the load balancing in both directions and can apply the same algorithm to ensure that packets associated with the same flow use the same SFI regardless of the direction of travel.
SFP13: RD = 198.51.100.1/113, SPI = 27,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/112, Assoc-SPI = 26,
[SI = 255, SFT = 43, RD = 192.0.2.3/11],
[SI = 254, SFT = 42, {RD = 192.0.2.2/11,
192.0.2.2/12,
192.0.2.2/13 }],
[SI = 253, SFT = 41, RD = 192.0.2.1/11]
How an SFF knows that an attached SFI is stateful is out of the scope of this document. It is assumed that this will form part of the process by which SFIs are registered as local to SFFs.
Section 7.2 provides additional observations about the coordination of the use of stateful SFIs in the case of bidirectional SFPs.
In general, the problems of load balancing and the selection of the same SFIs in both directions of a bidirectional SFP can be addressed by using sufficiently precisely specified SFPs (specifying the exact SFIs to use) and suitable programming of the classifiers at each end of the SFPs to make sure that the matching pair of SFPs are used.
The mechanism described in
Section 8.9.1 might not be desirable because of the functional assumptions it places on SFF2 to be able to load balance with suitable flow identification, stability, and equality in both directions. Instead, it may be desirable to place the responsibility for flow classification in the classifier and let it determine load balancing with the implied choice of SFIs.
Consider the network graph as shown in
Figure 12 and with the same set of SFIRs as listed in
Section 8.9.1. In this case, the controller could specify three forward SFPs with their corresponding associated reverse SFPs. Each bidirectional pair of SFPs uses a different SFI for the SF of Type 42. The controller can instruct the classifier how to place traffic on the three bidirectional SFPs, or it can treat them as a group, leaving the classifier responsible for balancing the load.
SFP14: RD = 198.51.100.1/114, SPI = 28,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/117, Assoc-SPI = 31,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, RD = 192.0.2.2/11],
[SI = 253, SFT = 43, RD = 192.0.2.3/11]
SFP15: RD = 198.51.100.1/115, SPI = 29,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/118, Assoc-SPI = 32,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, RD = 192.0.2.2/12],
[SI = 253, SFT = 43, RD = 192.0.2.3/11]
SFP16: RD = 198.51.100.1/116, SPI = 30,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/119, Assoc-SPI = 33,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, RD = 192.0.2.2/13],
[SI = 253, SFT = 43, RD = 192.0.2.3/11]
SFP17: RD = 198.51.100.1/117, SPI = 31,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/114, Assoc-SPI = 28,
[SI = 255, SFT = 43, RD = 192.0.2.3/11],
[SI = 254, SFT = 42, RD = 192.0.2.2/11],
[SI = 253, SFT = 41, RD = 192.0.2.1/11]
SFP18: RD = 198.51.100.1/118, SPI = 32,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/115, Assoc-SPI = 29,
[SI = 255, SFT = 43, RD = 192.0.2.3/11],
[SI = 254, SFT = 42, RD = 192.0.2.2/12],
[SI = 253, SFT = 41, RD = 192.0.2.1/11]
SFP19: RD = 198.51.100.1/119, SPI = 33,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/116, Assoc-SPI = 30,
[SI = 255, SFT = 43, RD = 192.0.2.3/11],
[SI = 254, SFT = 42, RD = 192.0.2.2/13],
[SI = 253, SFT = 41, RD = 192.0.2.1/11]
While the examples in Sections [
8.9.1] and [
8.9.2] place the choice of SFI as subtended from the same SFF, it is also possible that the SFIs are each subtended from a different SFF, as shown in
Figure 13. In this case, it is harder to coordinate the choices for forward and reverse paths without some form of coordination between SFF1 and SFF3. Therefore, it would be normal to consider end-to-end parallel SFPs, as described in
Section 8.9.2.
------
| SFIa |
|SFT=42|
------
------ |
| SFI | ---------
|SFT=41| | SFF5 |
------ ..|192.0.2.5|..
| ..: --------- :..
---------.: :.---------
---------- | SFF1 | --------- | SFF3 |
--> | |..|192.0.2.1|....| SFF6 |....|192.0.2.3| -->
--> |Classifier| ---------: |192.0.2.6| :---------
| | : --------- : |
---------- : | : ------
: ------ : | SFI |
:.. | SFIb | ..: |SFT=43|
:.. |SFT=42| ..: ------
: ------ :
:.---------.:
| SFF7 |
|192.0.2.7|
---------
|
------
| SFIc |
|SFT=42|
------
In this case, five SFIRs are advertised as follows:
RD = 192.0.2.1/11, SFT = 41
RD = 192.0.2.5/11, SFT = 42 (for SFIa)
RD = 192.0.2.6/11, SFT = 42 (for SFIb)
RD = 192.0.2.7/11, SFT = 42 (for SFIc)
RD = 192.0.2.3/11, SFT = 43
In this case, the controller could specify three forward SFPs with their corresponding associated reverse SFPs. Each bidirectional pair of SFPs uses a different SFF and SFI for the middle hop (for an SF of Type 42). The controller can instruct the classifier how to place traffic on the three bidirectional SFPs, or it can treat them as a group, leaving the classifier responsible for balancing the load.
SFP20: RD = 198.51.100.1/120, SPI = 34,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/123, Assoc-SPI = 37,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, RD = 192.0.2.5/11],
[SI = 253, SFT = 43, RD = 192.0.2.3/11]
SFP21: RD = 198.51.100.1/121, SPI = 35,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/124, Assoc-SPI = 38,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, RD = 192.0.2.6/11],
[SI = 253, SFT = 43, RD = 192.0.2.3/11]
SFP22: RD = 198.51.100.1/122, SPI = 36,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/125, Assoc-SPI = 39,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, RD = 192.0.2.7/11],
[SI = 253, SFT = 43, RD = 192.0.2.3/11]
SFP23: RD = 198.51.100.1/123, SPI = 37,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/120, Assoc-SPI = 34,
[SI = 255, SFT = 43, RD = 192.0.2.3/11],
[SI = 254, SFT = 42, RD = 192.0.2.5/11],
[SI = 253, SFT = 41, RD = 192.0.2.1/11]
SFP24: RD = 198.51.100.1/124, SPI = 38,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/121, Assoc-SPI = 35,
[SI = 255, SFT = 43, RD = 192.0.2.3/11],
[SI = 254, SFT = 42, RD = 192.0.2.6/11],
[SI = 253, SFT = 41, RD = 192.0.2.1/11]
SFP25: RD = 198.51.100.1/125, SPI = 39,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/122, Assoc-SPI = 36,
[SI = 255, SFT = 43, RD = 192.0.2.3/11],
[SI = 254, SFT = 42, RD = 192.0.2.7/11],
[SI = 253, SFT = 41, RD = 192.0.2.1/11]
The mechanism of parallel SFPs demonstrated in
Section 8.9.3 is perfectly functional and may be practical in many environments. However, there may be scaling concerns because of the large amount of state (knowledge of SFPs -- i.e., SFPR advertisements retained) if there is a very large number of possible SFIs (for example, tens of instances of the same stateful SF) or if there are multiple choices of stateful SF along a path. This situation may be mitigated using SFP fragments that are combined to form the end-to-end SFPs.
The example presented here is necessarily simplistic but should convey the basic principle. The example presented in
Figure 14 is similar to that in
Section 8.9.3 but with an additional first hop.
------
| SFIa |
|SFT=43|
------
------ ------ |
| SFI | | SFI | ---------
|SFT=41| |SFT=42| | SFF5 |
------ ------ ..|192.0.2.5|..
| | ..: --------- :..
--------- ---------.: :.---------
------ | SFF1 | | SFF2 | --------- | SFF3 |
-->|Class-|.|192.0.2.1|.|192.0.2.2|....| SFF6 |....|192.0.2.3|-->
-->| ifier| --------- ---------: |192.0.2.6| :---------
------ : --------- : |
: | : ------
: ------ : | SFI |
:.. | SFIb | ..: |SFT=44|
:.. |SFT=43| ..: ------
: ------ :
:.---------.:
| SFF7 |
|192.0.2.7|
---------
|
------
| SFIc |
|SFT=43|
------
The six SFIs are advertised as follows:
RD = 192.0.2.1/11, SFT = 41
RD = 192.0.2.2/11, SFT = 42
RD = 192.0.2.5/11, SFT = 43 (for SFIa)
RD = 192.0.2.6/11, SFT = 43 (for SFIb)
RD = 192.0.2.7/11, SFT = 43 (for SFIc)
RD = 192.0.2.3/11, SFT = 44
SFF2 is the point at which a load-balancing choice must be made. So "tail-end" SFPs are constructed as follows. Each takes in a different SFF that provides access to an SF of Type 43.
SFP26: RD = 198.51.100.1/126, SPI = 40,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/130, Assoc-SPI = 44,
[SI = 255, SFT = 43, RD = 192.0.2.5/11],
[SI = 254, SFT = 44, RD = 192.0.2.3/11]
SFP27: RD = 198.51.100.1/127, SPI = 41,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/131, Assoc-SPI = 45,
[SI = 255, SFT = 43, RD = 192.0.2.6/11],
[SI = 254, SFT = 44, RD = 192.0.2.3/11]
SFP28: RD = 198.51.100.1/128, SPI = 42,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/132, Assoc-SPI = 46,
[SI = 255, SFT = 43, RD = 192.0.2.7/11],
[SI = 254, SFT = 44, RD = 192.0.2.3/11]
Now an end-to-end SFP with load-balancing choice can be constructed as follows. The choice made by SFF2 is expressed in terms of entering one of the three "tail-end" SFPs.
SFP29: RD = 198.51.100.1/129, SPI = 43,
[SI = 255, SFT = 41, RD = 192.0.2.1/11],
[SI = 254, SFT = 42, RD = 192.0.2.2/11],
[SI = 253, {SFT = 1, RD = {SPI=40, SI=255, Rsv=0},
RD = {SPI=41, SI=255, Rsv=0},
RD = {SPI=42, SI=255, Rsv=0} } ]
Now, despite the load-balancing choice being made elsewhere than at the initial classifier, it is possible for the reverse SFPs to be well constructed without any ambiguity. The three reverse paths appear as follows.
SFP30: RD = 198.51.100.1/130, SPI = 44,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/126, Assoc-SPI = 40,
[SI = 255, SFT = 44, RD = 192.0.2.4/11],
[SI = 254, SFT = 43, RD = 192.0.2.5/11],
[SI = 253, SFT = 42, RD = 192.0.2.2/11],
[SI = 252, SFT = 41, RD = 192.0.2.1/11]
SFP31: RD = 198.51.100.1/131, SPI = 45,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/127, Assoc-SPI = 41,
[SI = 255, SFT = 44, RD = 192.0.2.4/11],
[SI = 254, SFT = 43, RD = 192.0.2.6/11],
[SI = 253, SFT = 42, RD = 192.0.2.2/11],
[SI = 252, SFT = 41, RD = 192.0.2.1/11]
SFP32: RD = 198.51.100.1/132, SPI = 46,
Assoc-Type = 1, Assoc-RD = 198.51.100.1/128, Assoc-SPI = 42,
[SI = 255, SFT = 44, RD = 192.0.2.4/11],
[SI = 254, SFT = 43, RD = 192.0.2.7/11],
[SI = 253, SFT = 42, RD = 192.0.2.2/11],
[SI = 252, SFT = 41, RD = 192.0.2.1/11]
This section provides several examples using IPv6 addressing. As will be seen from the examples, there is nothing special or clever about using IPv6 addressing rather than IPv4 addressing.
The reference network for these IPv6 examples is based on that described at the top of
Section 8 and shown in
Figure 11.
Assume we have a service function overlay network with four SFFs (SFF1, SFF3, SFF3, and SFF4). The SFFs have addresses in the underlay network as follows:
SFF1 2001:db8::192:0:2:1
SFF2 2001:db8::192:0:2:2
SFF3 2001:db8::192:0:2:3
SFF4 2001:db8::192:0:2:4
Each SFF provides access to some SFIs from the four service function types SFT=41, SFT=42, SFT=43, and SFT=44, just as before:
SFF1 SFT=41 and SFT=42
SFF2 SFT=41 and SFT=43
SFF3 SFT=42 and SFT=44
SFF4 SFT=43 and SFT=44
The service function network also contains a controller with address 2001:db8::198:51:100:1.
This example service function overlay network is shown in
Figure 15.
------------------------
| Controller |
| 2001:db8::198:51:100:1 |
------------------------
------ ------ ------ ------
| SFI | | SFI | | SFI | | SFI |
|SFT=41| |SFT=42| |SFT=41| |SFT=43|
------ ------ ------ ------
\ / \ /
------------------- -------------------
| SFF1 | | SFF2 |
|2001:db8::192:0:2:1| |2001:db8::192:0:2:2|
------------------- -------------------
----------
Packet --> | | -->
Flows --> |Classifier| -->Dest
| | -->
----------
------------------- -------------------
| SFF3 | | SFF4 |
|2001:db8::192:0:2:3| |2001:db8::192:0:2:4|
------------------- -------------------
/ \ / \
------ ------ ------ ------
| SFI | | SFI | | SFI | | SFI |
|SFT=42| |SFT=44| |SFT=43| |SFT=44|
------ ------ ------ ------
The SFFs advertise routes to the SFIs they support. These advertisements contain RDs that are set according to the network operator's configuration model. Note that in an IPv6 network, the RD is not large enough to contain the full IPv6 address, as only six octets are available. So, in all of these IPv6 examples, we use RDs of Type 1 such that the available six octets are partitioned as four octets for an IPv4 address of the advertising SFF, and two octets that are a local index of the SFI. Furthermore, we have chosen an IPv6 addressing scheme so that the low-order four octets of the IPv6 address match an IPv4 address of the advertising node. This scheme is chosen purely for convenience of documentation, and an operator is totally free to use any other scheme so long as it conforms to the definitions of SFIR and SFPR in Sections [
3.1] and [
3.2].
Observant readers will notice that this makes the BGP advertisements shown in these examples exactly the same as in the previous examples. All that is different is that the advertising SFFs and controller have IPv6 addresses.
Thus, we see the following SFIRs advertised.
The SFFs advertise routes to the SFIs they support. So we see the following SFIRs:
RD = 192.0.2.1/1, SFT = 41
RD = 192.0.2.1/2, SFT = 42
RD = 192.0.2.2/1, SFT = 41
RD = 192.0.2.2/2, SFT = 43
RD = 192.0.2.3/7, SFT = 42
RD = 192.0.2.3/8, SFT = 44
RD = 192.0.2.4/5, SFT = 43
RD = 192.0.2.4/6, SFT = 44
Note that the addressing used for communicating between SFFs is taken from the tunnel encapsulation attribute of the SFIR and not from the SFIR-RD.
Consider the following SFPR similar to that in
Section 8.1.
SFP1: RD = 198.51.100.1/101, SPI = 15,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 43, RD = 192.0.2.2/2]
The SFP consists of an SF of Type 41 located at SFF1, followed by an SF of Type 43 located at SFF2. This path is fully explicit, and each SFF is offered no choice in forwarding a packet along the path.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (15). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 has no flexibility in the choice of SFF to support the next-hop SFI and will forward the packet to SFF2, which will send the packets to the SFI that supports SFT 43 before forwarding the packets to their destinations.
SFP2: RD = 198.51.100.1/102, SPI = 16,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 43, {RD = 192.0.2.2/2,
RD = 192.0.2.4/5 } ]
In this example, like that in
Section 8.2, the path also consists of an SF of Type 41 located at SFF1, and this is followed by an SF of Type 43; but in this case, the SI = 250 contains a choice between the SFI located at SFF2 and the SFI located at SFF4.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (16). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 now has a choice of next-hop SFFs to execute the next hop in the path. It can either forward packets to SFF2 or SFF4 to execute a function of Type 43. It uses its local load-balancing algorithm to make this choice. The chosen SFF will send the packets to the SFI that supports SFT 43 before forwarding the packets to their destinations.
SFP3: RD = 198.51.100.1/103, SPI = 17,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, SFT = 44, RD = 0]
In this example, like that in
Section 8.3, the path also consists of an SF of Type 41 located at SFF1, and this is followed by an SI with an RD of zero and SF of Type 44. This means that a choice can be made between any SFF that supports an SFI of Type 44.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (17). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 now has a free choice of next-hop SFFs to execute the next hop in the path, selecting between all SFFs that support SFs of Type 44. Looking at the SFIRs it has received, SFF1 knows that SF Type 44 is supported by SFF3 and SFF4. SFF1 uses its local load-balancing algorithm to make this choice. The chosen SFF will send the packets to the SFI that supports SFT 44 before forwarding the packets to their destinations.
SFP4: RD = 198.51.100.1/104, SPI = 18,
[SI = 255, SFT = 41, RD = 192.0.2.1/1],
[SI = 250, {SFT = 43, RD = 192.0.2.2/2,
SFT = 44, RD = 192.0.2.3/8 } ]
This example, similar to that in
Section 8.4, provides a choice of SF type in the second hop in the path. The SI of 250 indicates a choice between SF Type 43 located through SF2 and SF Type 44 located at SF3.
SFF1 will receive packets on the path from the classifier and will identify the path from the SPI (18). The initial SI will be 255, and so SFF1 will deliver the packets to the SFI for SFT 41.
When the packets are returned to SFF1 by the SFI, the SI will be decreased to 250 for the next hop. SFF1 now has a free choice of next-hop SFFs to execute the next hop in the path, selecting between all SFFs that support an SF of Type 43 and SFF3, which supports an SF of Type 44. These may be completely different functions that are to be executed dependent on specific conditions, or they may be similar functions identified with different type identifiers (such as firewalls from different vendors). SFF1 uses its local policy and load-balancing algorithm to make this choice, and it may use additional information passed back from the local SFI to help inform its selection. The chosen SFF will send the packets to the SFI that supports the chosen SFT before forwarding the packets to their destinations.