Openflow Swicth没有推送MPLS标签。 (OpenDayLight)

时间:2018-04-25 21:02:56

标签: sdn opendaylight

我有以下线性SDN架构和ODL控制器:

Host1 -- ZodiacFX1 -- ZodiacFX2 --- Host2

我使用2台笔记本电脑作为主机和2台ZodiacFX开放式交换机。

我希望ZodiacFX1将MPLS标签推送到从Host1和ZodiacFX2接收的所有IP数据包,以弹出MPLS标签并将IP数据包发送到Host2。

我在ZodiacFX1上添加了一个MPLS推送流程,我可以看到ZodiacFX1和ODL的运行数据存储区中的流量活跃。但如果我ping h1-> h2就没有推动。

流程是这样的:

注意:( Host1连接到ZodiacFX1的端口1,ZodiacFX1端口2连接到ZodiacFX2端口1.)

 GET  http://192.168.21.147:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:123917682137538/table/2

{
"flow-node-inventory:table": [
    {
        "id": 2,
        "opendaylight-flow-table-statistics:flow-table-statistics": {
            "active-flows": 1,
            "packets-looked-up": 0,
            "packets-matched": 0
        },
        "flow": [
            {
                "id": "125",
                "idle-timeout": 0,
                "cookie": 401,
                "flags": "",
                "hard-timeout": 0,
                "instructions": {
                    "instruction": [
                        {
                            "order": 0,
                            "apply-actions": {
                                "action": [
                                    {
                                        "order": 2,
                                        "output-action": {
                                            "output-node-connector": "2",
                                            "max-length": 0
                                        }
                                    },
                                    {
                                        "order": 1,
                                        "set-field": {
                                            "protocol-match-fields": {
                                                "mpls-label": 27
                                            }
                                        }
                                    },
                                    {
                                        "order": 0,
                                        "push-mpls-action": {
                                            "ethernet-type": 34887
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                },
                "cookie_mask": 0,
                "opendaylight-flow-statistics:flow-statistics": {
                    "duration": {
                        "nanosecond": 0,
                        "second": 7
                    },
                    "byte-count": 0,
                    "packet-count": 0
                },
                "priority": 0,
                "table_id": 2,
                "match": {
                    "in-port": "1",
                    "ethernet-match": {
                        "ethernet-type": {
                            "type": 2048
                        }
                    }
                }
            },
            {
                "id": "124",
                "idle-timeout": 0,
                "cookie": 401,
                "flags": "",
                "hard-timeout": 0,
                "instructions": {
                    "instruction": [
                        {
                            "order": 0,
                            "apply-actions": {
                                "action": [
                                    {
                                        "order": 2,
                                        "output-action": {
                                            "output-node-connector": "2",
                                            "max-length": 0
                                        }
                                    },
                                    {
                                        "order": 1,
                                        "set-field": {
                                            "protocol-match-fields": {
                                                "mpls-label": 27
                                            }
                                        }
                                    },
                                    {
                                        "order": 0,
                                        "push-mpls-action": {
                                            "ethernet-type": 34887
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                },
                "cookie_mask": 0,
                "opendaylight-flow-statistics:flow-statistics": {
                    "duration": {
                        "nanosecond": 0,
                        "second": 180
                    },
                    "byte-count": 0,
                    "packet-count": 0
                },
                "priority": 8,
                "table_id": 2,
                "match": {
                    "in-port": "1",
                    "ethernet-match": {
                        "ethernet-type": {
                            "type": 2048
                        }
                    }
                }
            }
        ]
    }
]
}

我也可以在Zodiac控制台界面中看到:

Flow 6
 Match:
  In Port: 1
  ETH Type: IPv4
 Attributes:
  Table ID: 2                           Cookie:0x191
  Priority: 8                           Duration: 247 secs
 Hard Timeout: 0 secs                  Idle Timeout: 0 secs
  Byte Count: 0                 Packet Count: 0
  Last Match: 00:04:07
  Instructions:
  Apply Actions:
   Push MPLS tag
   Set MPLS Label: 27
   Output Port: 2

可能是什么问题?我认为主要的问题是,在这种情况下,Zodiac正在遵循这个流程,我已经尝试了优先级为0的流程,并且没有MPLS推送。

Flow 5
Match:
In Port: 1
 Attributes:
 Table ID: 0                           Cookie:0x2b00000000000008
 Priority: 2                           Duration: 2845 secs
 Hard Timeout: 0 secs                  Idle Timeout: 0 secs
 Byte Count: 576265                    Packet Count: 5246
 Last Match: 00:00:00
Instructions:
 Apply Actions:
Output Port: 3
Output Port: 2
Output: CONTROLLER

1 个答案:

答案 0 :(得分:0)

看起来你有一些其他应用程序(也许是l2switch)推动 流向你的交换机。也许只需安装openflowplugin并尝试。

另外,尝试将mpls流放在表0而不是表2中。