Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does bmp not support MultiPathList? #2746

Open
sephiroth81 opened this issue Nov 23, 2023 · 7 comments
Open

Why does bmp not support MultiPathList? #2746

sephiroth81 opened this issue Nov 23, 2023 · 7 comments

Comments

@sephiroth81
Copy link

case *watchEventBestPath:
info := &table.PeerInfo{
Address: net.ParseIP("0.0.0.0").To4(),
AS: b.s.bgpConfig.Global.Config.As,
ID: net.ParseIP(b.s.bgpConfig.Global.Config.RouterId).To4(),
}
for _, p := range msg.PathList {
u := table.CreateUpdateMsgFromPaths([]*table.Path{p})[0]
if payload, err := u.Serialize(); err != nil {
return false
} else if err = write(bmpPeerRoute(bmp.BMP_PEER_TYPE_LOCAL_RIB, false, 0, true, info, p.GetTimestamp().Unix(), payload)); err != nil {
return false
}
}
This one only takes the data from the PathList, but doesn't care about the MultiPathList. So multipath only receives the bmp message of the first rib, can I ask why it is designed this way?

@sephiroth81
Copy link
Author

Could you give me some advise, thank you. @fujita

@fujita
Copy link
Member

fujita commented Dec 7, 2023

multiple paths are converted into multiple BMP messages?

@sephiroth81
Copy link
Author

sephiroth81 commented Dec 8, 2023

Yes. The question is if only take the PathList's path, only the first path will have the bmp message, so the route information get from the bmp message won't be the same as the real one. But if open multiple paths also sends bmp messages, I'm not sure if it will carry different pathID. @fujita

@sephiroth81
Copy link
Author

@fujita I try to convert multiple paths to BMP messages, then I do get a bmp message for each route changes. But the new question is updates from multiple paths will only send the full paths, couldn't know which path is withdraw. If I want to use BMP to track path changes, how can i do? please give me some advises, thank you.

@fujita
Copy link
Member

fujita commented Dec 18, 2023

I'm not sure what you want to do. When gobgpd receives a BGP update message including multiple paths, each path separately is stored in a routing table. gobgpd doesn't store which paths were received in one message.

@sephiroth81
Copy link
Author

I mean gobgpd receive the same route prefix from different peers(but different next-hop) or add global rib with the same prefix but different identify and next-hop. In these cases, seems gobgpd send bmp RM message(global rib)only when first path added. So from bmp message, it just There is only one next-hop route, but in fact this is multiple next hops route.
@fujita

@sephiroth81
Copy link
Author

@fujita Could you give some advises? Or I have some misconceptions about the use of BMP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants