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

PVSTP feature implementation #305

Merged
merged 7 commits into from
Nov 22, 2019
Merged

PVSTP feature implementation #305

merged 7 commits into from
Nov 22, 2019

Conversation

ph408077
Copy link
Contributor

PVSTP feature implementation

common/schema.h Outdated Show resolved Hide resolved
common/schema.h Outdated
#define CFG_STP_GLOBAL_TABLE_NAME "STP"
#define CFG_STP_VLAN_TABLE_NAME "STP_VLAN"
#define CFG_STP_VLAN_INTF_TABLE_NAME "STP_VLAN_INTF"
#define CFG_STP_INTF_TABLE_NAME "STP_INTF"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we prefer not to change these table names

common/schema.h Outdated Show resolved Hide resolved
Copy link
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as comments

common/schema.h Outdated Show resolved Hide resolved
@lguohan
Copy link
Contributor

lguohan commented Nov 22, 2019

retest this please

@ph408077
Copy link
Contributor Author

Verified STP on VS. Logs below:

VS1:
root@sonic:/home/admin# show spanning_tree
Spanning-tree Mode: PVST

VLAN 100 - STP instance 0

STP Bridge Parameters:
Bridge           Bridge Bridge Bridge Hold  LastTopology Topology
Identifier       MaxAge Hello  FwdDly Time  Change       Change
hex              sec    sec    sec    sec   sec          cnt
8064525400123457 20     2      15     1     18           2

RootBridge       RootPath  DesignatedBridge  RootPort           Max Hel Fwd
Identifier       Cost      Identifier                           Age lo  Dly
hex                        hex                                  sec sec sec
8064525400123456 500       8064525400123456  Ethernet0          20  2   15

STP Port Parameters:
Port             Prio Path      Port Uplink State         Designated  Designated       Designated
Name             rity Cost      Fast Fast                 Cost        Root             Bridge
Ethernet0        128  500       N    N      FORWARDING    0           8064525400123456 8064525400123456
Ethernet4        128  500       N    N      BLOCKING      0           8064525400123456 8064525400123456
root@sonic:/home/admin#

VS2:
root@sonic:/home/admin# show spanning_tree
Spanning-tree Mode: PVST

VLAN 100 - STP instance 0

STP Bridge Parameters:
Bridge           Bridge Bridge Bridge Hold  LastTopology Topology
Identifier       MaxAge Hello  FwdDly Time  Change       Change
hex              sec    sec    sec    sec   sec          cnt
8064525400123456 20     2      15     1     1            6

RootBridge       RootPath  DesignatedBridge  RootPort           Max Hel Fwd
Identifier       Cost      Identifier                           Age lo  Dly
hex                        hex                                  sec sec sec
8064525400123456 0         8064525400123456  Root               20  2   15

STP Port Parameters:
Port             Prio Path      Port Uplink State         Designated  Designated       Designated
Name             rity Cost      Fast Fast                 Cost        Root             Bridge
Ethernet0        128  500       N    N      FORWARDING    0           8064525400123456 8064525400123456
Ethernet4        128  500       N    N      FORWARDING    0           8064525400123456 8064525400123456
root@sonic:/home/admin#

Also verified same on BRCM:

root@sonic:/home/admin# config vlan add 100
root@sonic:/home/admin# config vlan member add 100 Ethernet49
root@sonic:/home/admin# config vlan member add 100 Ethernet48
root@sonic:/home/admin#
root@sonic:/home/admin# config spanning_tree enable pvst
root@sonic:/home/admin#
root@sonic:/home/admin# show spanning_tree vlan 100
Spanning-tree Mode: PVST

VLAN 100 - STP instance 0

STP Bridge Parameters:
Bridge           Bridge Bridge Bridge Hold  LastTopology Topology
Identifier       MaxAge Hello  FwdDly Time  Change       Change
hex              sec    sec    sec    sec   sec          cnt
80643c2c992d8235 20     2      15     1     7            3

RootBridge       RootPath  DesignatedBridge  RootPort           Max Hel Fwd
Identifier       Cost      Identifier                           Age lo  Dly
hex                        hex                                  sec sec sec
80643c2c992d8235 0         80643c2c992d8235  Root               20  2   15

STP Port Parameters:
Port             Prio Path      Port Uplink State         Designated  Designated       Designated
Name             rity Cost      Fast Fast                 Cost        Root             Bridge
Ethernet48       128  800       N    N      FORWARDING    0           80643c2c992d8235 80643c2c992d8235
Ethernet49       128  800       N    N      FORWARDING    0           80643c2c992d8235 80643c2c992d8235
root@sonic:/home/admin#
root@sonic:/home/admin# show spanning_tree statistics
VLAN 100 - STP instance 0

PortNum          BPDU Tx        BPDU Rx        TCN Tx         TCN Rx
Ethernet49       24             1              0              0
Ethernet48       24             1              0              1
root@sonic:/home/admin#
root@sonic:/home/admin# show runningconfiguration spanning_tree
"STP":
{
    "GLOBAL": {
        "forward_delay": "15",
        "hello_time": "2",
        "max_age": "20",
        "mode": "pvst",
        "priority": "32768",
        "rootguard_timeout": "30"
    }
}
"STP_PORT":
{
    "Ethernet48": {
        "bpdu_guard": "true",
        "bpdu_guard_do_disable": "false",
        "enabled": "true",
        "portfast": "true",
        "root_guard": "false",
        "uplink_fast": "false"
    },
    "Ethernet49": {
        "bpdu_guard": "false",
        "bpdu_guard_do_disable": "false",
        "enabled": "true",
        "portfast": "true",
        "root_guard": "false",
        "uplink_fast": "false"
    }
}
"STP_VLAN":
{
    "Vlan100": {
        "enabled": "true",
        "forward_delay": "15",
        "hello_time": "2",
        "max_age": "20",
        "priority": "32768"
    }
}
root@sonic:/home/admin#

@lguohan lguohan merged commit 95057b1 into sonic-net:master Nov 22, 2019
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

Successfully merging this pull request may close these issues.

4 participants