You are here: Home Research Network Function Forwarding Graph - Examples

Network Function Forwarding Graph - Examples

by Fabio Mignini last modified May 08, 2015 09:30 AM

This page contains a set of examples that helps to understand and write an NF-FG

Network Function Forwarding Graph - Example 2

  • Service Graph example:
  • NFFG example 1
     
  • NFFG associated to above SG:
  • {
      "profile": {
        "VNFs": [
          {
            "id": "vnf_1",
            "name": "Firewall",
            "ports": [
              {
                "id": "external:0",
                "ingoing_label": {
                  "flowrules": [
                    {
                      "action": {
                        "VNF": {
                          "id": "vnf_1",
                          "port": "external:0"
                        },
                        "type": "output"
                      },
                      "flowspec": {
                        "matches": [
                          {
                            "id": "1",
                            "priority": 32770
                          }
                        ]
                      },
                      "ingress_endpoint": "endpoint_1"
                    }
                  ]
                },
                "outgoing_label": {
                  "flowrules": [
                    {
                      "action": {
                        "endpoint": {
                          "id": "endpoint_1"
                        },
                        "type": "output"
                      },
                      "flowspec": {
                        "matches": [
                          {
                            "id": "2",
                            "priority": 32770
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "id": "internal:0",
                "ingoing_label": {
                  "flowrules": [
                    {
                      "action": {
                        "VNF": {
                          "id": "vnf_1",
                          "port": "internal:0"
                        },
                        "type": "output"
                      },
                      "flowspec": {
                        "matches": [
                          {
                            "id": "3",
                            "priority": 32770
                          }
                        ]
                      },
                      "ingress_endpoint": "endpoint_2"
                    }
                  ]
                },
                "outgoing_label": {
                  "flowrules": [
                    {
                      "action": {
                        "endpoint": {
                          "id": "endpoint_2"
                        },
                        "type": "output"
                      },
                      "flowspec": {
                        "matches": [
                          {
                            "id": "4",
                            "priority": 32770
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ],
            "vnf_descriptor": "Firewall.json"
          }
        ],
        "endpoints": [
          {
            "interface": "to-br-usr",
            "attached": true,
            "type": "physical",
            "id": "endpoint_1",
            "name": "user"
          },
          {
            "interface": "em1",
            "attached": true,
            "type": "physical",
            "id": "endpoint_2",
            "name": "internet"
          }
        ],
        "id": "1",
        "name": "firewall"
      }
    }


    Network Function Forwarding Graph - Example 2

    • Service Graph example:
    • Service graph example 
    • NFFG associated to above SG:
    • {
        "profile": {
          "VNFs": [
            {
              "vnf_descriptor": "switch.json",
              "id": "Switch",
              "name": "Switch",
              "ports": [
                {
                  "id": "L2Port:0",
                  "outgoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "VNF": {
                            "id": "dhcp_ISP",
                            "port": "inout:0"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "32770",
                              "id": "1"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                {
                  "ingoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "VNF": {
                            "id": "Switch",
                            "port": "L2Port:1"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "33770",
                              "id": "2"
                            }
                          ],
                          "ingress_endpoint": "ingress"
                        }
                      }
                    ]
                  },
                  "id": "L2Port:1",
                  "outgoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "endpoint": {
                            "port": "ingress"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "32770",
                              "id": "3"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                {
                  "id": "L2Port:2",
                  "outgoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "VNF": {
                            "id": "Router-Nat",
                            "port": "User:0"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "32770",
                              "id": "199433939"
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            },
            {
              "vnf_descriptor": "cisco_dhcp.json",
              "id": "dhcp_ISP",
              "name": "dhcp_isp",
              "ports": [
                {
                  "id": "inout:0",
                  "outgoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "VNF": {
                            "id": "Switch",
                            "port": "L2Port:0"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "32770",
                              "id": "4"
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            },
            {
              "vnf_descriptor": "cisco_nat.json",
              "id": "Router-Nat",
              "name": "Router-Nat",
              "ports": [
                {
                  "ingoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "VNF": {
                            "id": "Router-Nat",
                            "port": "WAN:0"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "32770",
                              "id": "5"
                            }
                          ],
                          "ingress_endpoint": "egress"
                        }
                      }
                    ]
                  },
                  "id": "WAN:0",
                  "outgoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "endpoint": {
                            "port": "egress"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "32770",
                              "id": "6"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                {
                  "id": "User:0",
                  "outgoing_label": {
                    "flowrules": [
                      {
                        "action": {
                          "VNF": {
                            "id": "Switch",
                            "port": "L2Port:2"
                          },
                          "type": "output"
                        },
                        "flowspec": {
                          "matches": [
                            {
                              "priority": "32770",
                              "id": "7"
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          ],
          "endpoints": [
            {
              "interface": "to-br-usr",
              "attached": true,
              "type": "physical",
              "id": "ingress",
              "name": "user"
            },
            {
              "interface": "em1",
              "attached": true,
              "type": "physical",
              "id": "egress",
              "name": "internet"
            }
          ],
          "id": "2",
          "name": "Plain_access_to_the_internet"
        }
      }
Document Actions