xddxdd / bird-lg-go

BIRD looking glass in Go, for better maintainability, easier deployment & smaller memory footprint
GNU General Public License v3.0
135 stars 26 forks source link

BGPMAP only shows one path #38

Closed athompson-merlin closed 3 years ago

athompson-merlin commented 3 years ago

I'm seeing that the BGPMAP functionality only shows one path, not all paths like the original bird-lg project this tries to replace.

Example: http://lg2.merlin.ca/route_all/lg2/8.8.8.8 vs. http://lg2.merlin.ca/route_bgpmap/lg2/8.8.8.8

Also important is that bgpmap is not drawing the shortest path, for some reason.

Am I doing something wrong, or is this not implemented yet? Unfortunately, bgpmap of all routes is the feature I was looking for. (Well, that and compatibility with a newer runtime than Python2...)

For permanence:


lg2: show route for 8.8.8.8 all

Table master4:
8.8.8.0/24           unreachable [umrtr2_v4 17:43:58.084 from 206.211.216.52] * (100) [AS15169i]
    Type: BGP univ
    BGP.origin: IGP
    BGP.as_path: 10965 6509 15169
    BGP.next_hop: 206.211.216.52
    BGP.local_pref: 100
    BGP.community: (6509,65030) (10965,6509) (10965,64601)
    BGP.ext_community: (rt, 6509, 100)
    BGP.large_community: (16796, 1, 10965)
                     unreachable [umrtr1_v4 17:43:28.293 from 206.211.216.51] (100) [AS15169i]
    Type: BGP univ
    BGP.origin: IGP
    BGP.as_path: 7122 7122 577 15169
    BGP.next_hop: 206.211.216.51
    BGP.local_pref: 100
    BGP.community: (7122,1) (7122,3)
    BGP.large_community: (16796, 1, 7122)
                     unreachable [uwpg_rtr1_v4 17:43:20.593 from 206.211.216.50] (100) [AS15169i]
    Type: BGP univ
    BGP.origin: IGP
    BGP.as_path: 6327 6327 6327 15169
    BGP.next_hop: 206.211.216.50
    BGP.local_pref: 100
    BGP.community: (6327,2)
    BGP.large_community: (16796, 1, 6327)
                     unreachable [umrtr2_v4 17:43:58.030 from 206.211.216.52] (100) [AS15169i]
    Type: BGP univ
    BGP.origin: IGP
    BGP.as_path: 7122 7122 577 15169
    BGP.next_hop: 206.211.216.52
    BGP.local_pref: 100
    BGP.community: (7122,1) (7122,3)
    BGP.large_community: (16796, 1, 7122)

and

image

athompson-merlin commented 3 years ago

FWIW, yes, two of the BGP paths are identical, that's normal in my network on any device with ADD_PATH support, like BIRD.

xddxdd commented 3 years ago

Showing only one path is incorrect behavior, and this is because the split point "via" doesn't exist in your bird output.

This should be fixed now following the merge of #36.

athompson-merlin commented 3 years ago

OK, that's some impressive turn-around time! I'll update and test.

athompson-merlin commented 3 years ago

That's great, thank you. I now see this, which appears to be correct.

image