-
Notifications
You must be signed in to change notification settings - Fork 56
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
Questions about Per-VLAN Spanning Tree (PVST+) #80
Comments
@PaulSD wrote it. As for STP/RSTP, I do remember it was running succesfully with Cisco, HP & Dell switches. |
Early this year I had a play and tried to hookup a Debian-based system (Vyatta router), running MSTPd to a Cisco switch running rapid-pvst. Most of the details have been flushed, but from what I can remember the basics worked. Never bothered with the etables thing, just wanted to see what would happen. In the end the thinking was that having to generate/manage lots of VLAN interfaces may not scale. Currently have a crude prototype (hack!) that generates internal virtual interfaces, bridges and STP instances based on some VLAN configuration extensions to mstpctl. Early days, trying to see if its a viable solution and may not see the light of day. Mark |
Have you tried following the README (ignoring the etables bit)? |
Thanks guys. This give me hope. and yea, I have tried to follow the README, but the mstpd doesn't seems to detect the cisco on the VLAN bridge, but tcpdump running on the VLAN bridge is showing the multicast packet coming from cisco. I'll try to summarize things up and post here. Hopefully @PaulSD can have time to take a look here :) |
So here are my test results. I have created 2 VLANs, 50 and 639. The trunk interface is eth0, on the cisco side Native VLAN is not allowed to avoid the ebtables stuffs. As shown below (some MAC addresses are masked):
You can see "Rcvd BPDU" is "no" for both VLAN. If I run tcpdump on eth0:
The cisco is sending their proprietary BPDU on both VLANs, I'm wondering mstpd may not understand the multicast MAC 01:00:0c:cc:cc:cd. |
I did have PVST+ successfully working back when I wrote README.VLANs.md, but I haven't used it recently. I'm currently using RSTP instead, with my Cisco switches configured in 'mst' mode, as described in the first section of README.VLANs.md. A copy of the rackspace blog post can be found here:
I'll update README.VLANs.md with this. |
Unfortunately, I don't have any switches I can flip to PVST+ mode right now for testing without breaking other things... (In theory it should be possible to get a Cisco switch in 'mst' mode to emulate PVST+ on a single port, but mstpd doesn't send the right packets to trigger that.) I might be able to try it later this week. Maybe try running |
Surely since mstpd uses a BPF that simply matches the IEEE link-local address, its never going to see the PVST frames (1:0:c:cc:cc:cd + SNAP, etc)? |
OK, here are the logs printed by mstpd and some other information:
I made mstpd run in background above and now tried tcpdump to make sure Cisco is sending out packets:
Then using mstpctl to add br_vlan50:
And tcpdump again you can see mstpd is sending out BPDU, and Cisco as well, the log "MSTP_OUT_tx_bpdu" is mixing in between because mstpd is running in background:
Unfortunately there is no Cisco packet received by mstpd at all, but tcpdump shows the Cisco packet is on the correct interface. Any ideas? Later today I'll check the source code hopefully I'll have more idea on this. |
Yeah, as @mg964 mentioned, it is likely that the packet filter simply isn't matching the PVST+ frames. My old notes on this aren't particularly detailed ... It is likely I tested this using old CatOS switches, not IOS or Nexus, so I wouldn't be surprised if the PVST+ frame format is slightly different on current switches than it was on old switches. For reference, the packet filter is defined here: |
Thanks for the information. Unfortunately I failed again, here are the details. This is the patch that I have modified in order to get pass bridge_bpdu_rcv():
With the above patch, mstpd received the Cisco BPDU on br_vlan50 (interface name refer to my reply above) instead of the bridge port interface eth0.50, and printing the following line from the patch above: Then I added a ebtables rule to drop this packet in BROUTING so it will appear on eth0.50 instead of br_vlan50:
However, although mstpd now successfully see the Cisco BPDU packets, but is now printing:
Looks like the mstpd doesn't like Cisco BPDU format and failed to parse the content. |
Looks like there may be plenty of places where this could happen.
|
The PVST frame has a SNAP (rather than LLC) header on the front; don't think the above change will work as its not properly snipping off the L2 header. Once you do that the actual frame content is the same as an IEEE frame (except for the trailing VLAN ID option, which just gets ignored). FWIW, I have a quilt patch used to allow filtering of PVST frames. This captures the frames and operates in a similar fashion to the current bpdu-filter & bpdu-guard options. As such it may not be of much value to you, but it'll give you the bare bones on how to process PVST frames. Mark |
Hi,
I'm reading the document on this page:
https://github.com/mstpd/mstpd/blob/master/README.VLANs.md
Regarding "Per-VLAN Spanning Tree (PVST+)", is there anyone tried to do this successfully with a Cisco?
The mentioned ebtables setting in the link (http://blog.rackspace.com/vms-vlans-and-bridges-oh-my-part-2) has been dead so I'm not sure if I'm configuring ebtables correctly.
If anyone has experience on setting up mstpd with a Cisco using Rapid-PVST, could you please point me a direction, or just stop me to try anymore if this is not supported?
Thank you so much. Your help is much appreciated.
Best regards,
Steve
The text was updated successfully, but these errors were encountered: