kytos-ng / sdntrace

Napp that traces OpenFlow paths in the dataplane
https://kytos-ng.github.io/api/sdntrace.html
GNU Lesser General Public License v3.0
0 stars 5 forks source link

sdntrace with an evpl (without telemetry_int) isn't working between Novi01 and Novi06 #58

Open viniarck opened 7 months ago

viniarck commented 7 months ago

When I was working on issue #57, I realized that sdntrace still needs to be augmented multiple fold to still be able to work with telemetry_int

1 - TCP and UDP payloads aren't completely supported yet when PacketOuts are generated, for telemetry_int the network protocol needs to match, so it's important that the rest of the packet is also properly generated 2 - Even without telemetry_int, creating this EVPL between Novi01 and Novi06 on AmLight INT Lab:

{
  "name": "inter_evpl_2222",
  "service_level": 6,
  "dynamic_backup_path": true,
  "uni_a": {
    "interface_id": "00:00:00:00:00:00:00:01:15",
    "tag": {
      "tag_type": 1,
      "value": 2222
    }
  },
  "uni_z": {
    "interface_id": "00:00:00:00:00:00:00:06:22",
    "tag": {
      "tag_type": 1,
      "value": 2222
    }
  }
}

With sdntrace_cp it works (to first make sure the evpl flows were properly installed too):

❯ echo '{ "trace": { "switch": { "dpid": "00:00:00:00:00:00:00:01", "in_port": 15}, "eth": {"dl_vlan": 2222} } }' | http PUT http://127.0.0.1:8181/api/amlight/sdntrace_cp/v1/trace
HTTP/1.1 200 OK
content-length: 257
content-type: application/json
date: Wed, 29 Nov 2023 17:10:20 GMT
server: uvicorn

{
    "result": [
        {
            "dpid": "00:00:00:00:00:00:00:01",
            "port": 15,
            "time": "2023-11-29 14:10:20.321468",
            "type": "starting",
            "vlan": 2222
        },
        {
            "dpid": "00:00:00:00:00:00:00:06",
            "out": {
                "port": 22,
                "vlan": 2222
            },
            "port": 11,
            "time": "2023-11-29 14:10:20.321503",
            "type": "last",
            "vlan": 1
        }
    ]
}
❯ echo '{ "trace": { "switch": { "dpid": "00:00:00:00:00:00:00:01", "in_port": 15}, "eth": {"dl_vlan": 2222} } }' | http PUT http://127.0.0.1:8181/api/amlight/sdntrace/trace
HTTP/1.1 200 OK
content-length: 29
content-type: application/json
date: Wed, 29 Nov 2023 17:21:59 GMT
server: uvicorn

{
    "result": {
        "trace_id": 30003
    }
}
❯ http http://127.0.0.1:8181/api/amlight/sdntrace/trace/30003
HTTP/1.1 200 OK
content-length: 373
content-type: application/json
date: Wed, 29 Nov 2023 17:22:08 GMT
server: uvicorn

{
    "request": {
        "trace": {
            "eth": {
                "dl_vlan": 2222
            },
            "switch": {
                "dpid": "00:00:00:00:00:00:00:01",
                "in_port": 15
            }
        }
    },
    "request_id": 30003,
    "result": [
        {
            "dpid": "00:00:00:00:00:00:00:01",
            "port": 15,
            "time": "2023-11-29 14:22:01.585566",
            "type": "starting"
        },
        {
            "msg": "none",
            "reason": "done",
            "time": "0:00:01.524891",
            "type": "last"
        }
    ],
    "start_time": "2023-11-29 14:22:01.585566",
    "total_time": "0:00:01.525643"
}

It was observed that Novi06 wasn't packet count wasn't being incremented, so apparently the packet that was supposed to be match is being dropped, maybe the packet is malformed? This needs further investigation, and debugging, I'll continue with the other tasks. On OvS, it works, and there's no other flow installed on Novi06 that I'm seeing with higher priority that could be dropping this.

    [FLOW_ID1]
        Timestamp        = Wed Nov 29 17:06:13 2023
        TableId          = 0
        ofp_version      = 4
        ControllerGroup  = vinicius-ctrl
        ControllerId     = 1
        Priority         = 50000
        Idle_timeout     = 0
        Hard_timeout     = 0
        Packet_count     = 0
        Byte_count       = 0
        Cookie           = ac00000000000006
        Send_flow_rem    = true
        Persistent       = false
        [MATCHFIELDS]
            OFPXMT_OFB_ETH_SRC = ee:ee:ee:ee:ee:01
        [INSTRUCTIONS]
            [OFPIT_APPLY_ACTIONS]
                 [ACTIONS]
                    [OFPAT_OUTPUT]
                        port = ctrl
                        mlen = 65535

20231129_131612

viniarck commented 7 months ago

The priority of this issue will be reassed on 2024.1 planning

viniarck commented 1 month ago

Related issue https://github.com/kytos-ng/sdntrace/issues/70

viniarck commented 4 days ago

Try out in the new NoviFlow release cc'ing @Alopalao @italovalcy