osrg / gobgp

BGP implemented in the Go Programming Language
https://osrg.github.io/gobgp/
Apache License 2.0
3.62k stars 688 forks source link

sFlow-RT BGP Flowspec #2258

Open lointaly opened 4 years ago

lointaly commented 4 years ago

Hello,

Gobgp does not accept the bgp flowspec route sent from sFlow-RT.

Do you have any idea please ?

{"Key":"172.17.0.2","Topic":"Peer","attributes":[{"type":14,"nexthop":"0.0.0.0","afi":1,"safi":133,"value":[{"value":[{"type":1,"value":{"prefix":"10.10.10.10/32"}},{"type":3,"value":[{"op":129,"value":17}]},{"type":5,"value":[{"op":145,"value":1112}]}]}]},{"type":1,"value":0},{"type":2,"as_paths":[{"segment_type":2,"num":1,"asns":[65000]}]},{"type":5,"value":100},{"type":16,"value":[{"type":128,"subtype":6,"as":0,"rate":0}]}],"level":"debug","msg":"received update","nlri":[],"time":"2020-03-27T11:51:18+01:00","withdrawals":[]}
{"Key":"[destination: 10.10.10.10/32][protocol: ==udp][destination-port: ==1112]","Topic":"Table","level":"debug","msg":"create Destination","time":"2020-03-27T11:51:18+01:00"}
{"Key":"[destination: 10.10.10.10/32][protocol: ==udp][destination-port: ==1112]","Topic":"table","level":"debug","msg":"Processing destination","time":"2020-03-27T11:51:18+01:00"}
{"Key":"[destination: 10.10.10.10/32][protocol: ==udp][destination-port: ==1112]","Length":1,"Topic":"Table","level":"debug","msg":"Removing withdrawals","time":"2020-03-27T11:51:18+01:00"}
{"Key":"[destination: 10.10.10.10/32][protocol: ==udp][destination-port: ==1112]","Length":1,"Topic":"Table","level":"debug","msg":"Found withdrawals for path(s) that did not get installed","time":"2020-03-27T11:51:18+01:00"}
root@ubuntu:~# gobgp neighbor 172.17.0.2  
BGP neighbor is 172.17.0.2, remote AS 65000
  BGP version 4, remote router ID 172.17.0.2
  BGP state = established, up for 00:19:03
  BGP OutQ = 0, Flops = 0
  Hold time is 90, keepalive interval is 30 seconds
  Configured hold time is 90, keepalive interval is 30 seconds

  Neighbor capabilities:
    multiprotocol:
        ipv4-flowspec:  advertised and received
        ipv4-unicast:   advertised and received
        ipv6-unicast:   received
        ipv6-flowspec:  received
    route-refresh:      advertised
    4-octet-as: advertised and received
  Message statistics:
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                0          5
    Keepalives:            39         37
    Route Refresh:          0          0
    Discarded:              0          0
    Total:                 40         43
  Route statistics:
    Advertised:             0
    Received:               5
    Accepted:               0

[global.config]
    as = 65000
    router-id = "172.17.0.1"
    # listen port (by default 179)
    # to disable listening
    #port = -1

[[neighbors]]
    [neighbors.config]
        peer-as = 65000
        neighbor-address = "172.17.0.2"
        local-as = 65000
    [neighbors.transport.config]
        remote-port = 1179
    [neighbors.timers.config]
        connect-retry = 10
    [[neighbors.afi-safis]]
      [neighbors.afi-safis.config]
        afi-safi-name = "ipv4-flowspec"
    [[neighbors.afi-safis]]
      [neighbors.afi-safis.config]
        afi-safi-name = "ipv4-unicast"
pavel-odintsov commented 4 years ago

Hello!

Would be nice to see .pcap dump of interactions between GoBGP and sFlow-RT. Can you collect it, please?

I suppose sFlow-RT does some fancy redirect encoding which causes this problem.