Re: Query on Sapnning tree implementation from standard point of view

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Jun 18, 2012 at 3:05 PM, Sujata Verma <sujataverma3@xxxxxxxxx> wrote:
Ok.

  I don't think STP std has mentioned this propagation, As far as I know this prorogation is wrong. I think this must be a bug in Netgear switch.

>>> My setup is 

    PC1( Windows PC) ----Switch------PC2 ( Windows PC)

Using Colasoft builder tool, i captured one STP packet modified the bridge priority such that it becomes root bridge , put all invalid values for timers as 255 and sent to the switch. My switch is linux PC, netgear switch and dlink switch for comparison purposes.

As switch receives the better BID packet it stop advertising it self as bridge and take values of timers from root bridge which is 255 for bridge, hello and forward delay in my case.

So the switch receives this packet and updates its cost, root information and sends out on another port on which PC2 is connected and where i am seeing it on wireshark with all timer values as received from root bridge. This is all fine, the only problem is, its not validating the timer values which seems a bug to me , as the timer values are defined within the limit in standard.

If Netgear is doing validation of the hello timer and is putting the maximum allowed value seems fine to me and not a bug. But still, i think forward delay and max age should also be validated before accepting new BPDU as root bridge.

As in linux/dlink it is not doing any validation and sending bpdu with  255 values, which is not correct as it could lead to delay of convergence time in case of root failure.

In netgear switch the command display before and after are as follows:

=========================================
(FSM726V3) #show spanning-tree

Bridge Priority................................ 32768
Bridge Identifier.............................. 80:00:00:26:F2:AF:93:A5
Time Since Topology Change..................... 0 day 0 hr 42 min 14 sec
Topology Change Count.......................... 1
Topology Change in progress.................... FALSE
Designated Root................................ 80:00:00:26:F2:AF:93:A5
Root Path Cost................................. 0
Root Port Identifier........................... 00:00
Bridge Max Age................................. 20
Bridge Max Hops................................ 20
Bridge Tx Hold Count........................... 6
Bridge Forwarding Delay........................ 15
Hello Time..................................... 2
Bridge Hold Time............................... 6
CST Regional Root.............................. 80:00:00:26:F2:AF:93:A5
Regional Root Path Cost........................ 0
--More-- or (q)uit



     Associated FIDs           Associated VLANs
     ---------------           ----------------
     1                         1
     100                        100
     200                        200

(FSM726V3) #show spanning-tree summary

Spanning Tree Adminmode........... Enabled
Spanning Tree Version............. IEEE 802.1d
BPDU Guard Mode................... Disabled
BPDU Filter Mode.................. Disabled
Configuration Name................ 00-26-F2-AF-93-A5
Configuration Revision Level...... 0
Configuration Digest Key.......... 0xac36177f50283cd4b83821d8ab26de62
Configuration Format Selector..... 0
No MST instances to display.

=======================================
After sending the invalid timer packet:

(FSM726V3) #
(FSM726V3) #
(FSM726V3) #show spanning-tree summary

Spanning Tree Adminmode........... Enabled
Spanning Tree Version............. IEEE 802.1d
BPDU Guard Mode................... Disabled
BPDU Filter Mode.................. Disabled
Configuration Name................ 00-26-F2-AF-93-A5
Configuration Revision Level...... 0
Configuration Digest Key.......... 0xac36177f50283cd4b83821d8ab26de62
Configuration Format Selector..... 0
No MST instances to display.

(FSM726V3) #show spanning-tree

Bridge Priority................................ 32768
Bridge Identifier.............................. 80:00:00:26:F2:AF:93:A5
Time Since Topology Change..................... 0 day 0 hr 0 min 12 sec
Topology Change Count.......................... 2
Topology Change in progress.................... TRUE
Designated Root................................ 10:00:00:20:A1:F0:88:50
Root Path Cost................................. 200004
Root Port Identifier........................... 80:01
Bridge Max Age................................. 255
Bridge Max Hops................................ 20
Bridge Tx Hold Count........................... 6
Bridge Forwarding Delay........................ 255
Hello Time..................................... 10
Bridge Hold Time............................... 6
CST Regional Root.............................. 80:00:00:26:F2:AF:93:A5
Regional Root Path Cost........................ 0
--More-- or (q)uit



     Associated FIDs           Associated VLANs
     ---------------           ----------------
     1                          1
     100                        100
     200                        200

(FSM726V3) #


=========================================
As Cisco doesnt accept this type of BPDU it means that it is a bug to be fixed on Linux, as i conclude.


    The Linux bridge does not do BPDU validations. And most of the implementations don't do validations, since STD doesn't mentioned anything about developers started ignoring it.
    The way people use linux bridges are different from Cisco or Brocade or Juniper routers. Bridge maintainer may have the right answer for this (Adding him in CC)
 
Please let me know if you think otherwise.

Regards,
Sujata





--- On Fri, 6/15/12, Sasikanth babu <sasikanth.v19@xxxxxxxxx> wrote:

From: Sasikanth babu <sasikanth.v19@xxxxxxxxx>
Subject: Re: Query on Sapnning tree implementation from standard point of view
To: "Sujata Verma" <sujataverma3@xxxxxxxxx>
Cc: bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
Date: Friday, June 15, 2012, 7:25 PM



On Fri, Jun 15, 2012 at 5:55 PM, Sujata Verma <sujataverma3@xxxxxxxxx> wrote:
Thanks. I was doing the same experiment on few switches, i could get hold of and this is the result:

Cisco Switch catalyst 2950 : Completely ignoring the packet, so validations are proper.

Netgear FSM726V3 : Hello timer is validated and is propagated as 10 instead of 255 ( which i sent) other max age and forward delay still it accepts as 255.

   I don't think STP std has mentioned this propagation, As far as I know this prorogation is wrong. I think this must be a bug in Netgear switch.

DLINK-DES-3026 : No validation done and accepts all as 255 ( max age, forward delay and hello timer)

In both Netgear and Dlink the message age is changed to 16, which i am not sure why it has happened ?

my setup is simple

  PC1------Switch------PC2

From PC1 i am sending invalid timer values and observing on PC2.

    Are you doing any port mirroring here to capture packets on PC2?. How are you sending packets from PC1 (running linux bridge?)?

I am attaching wireshark capture for Dlink and Netgear STP packets.

   Can you send out complete packet capture from start of your test to the end to analyze
  
    Thanks
    Sasi

Please let me know if any one has any idea or comment on this.

Thanks,
Sujata
 





--- On Thu, 6/14/12, Sasikanth babu <sasikanth.v19@xxxxxxxxx> wrote:

From: Sasikanth babu <sasikanth.v19@xxxxxxxxx>
Subject: Re: Query on Sapnning tree implementation from standard point of view
To: "Sujata Verma" <sujataverma3@xxxxxxxxx>
Cc: bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
Date: Thursday, June 14, 2012, 6:09 PM



On Thu, Jun 14, 2012 at 5:53 PM, Sujata Verma <sujataverma3@xxxxxxxxx> wrote:
Hi ,

I am going through spanning tree protocol and was testing it on Linux. My observation is there is no validation of timers for configuration BPDU.  Lets say Root bridge received another BPDU from new bridge with invalid timer values but less priority, the existing bridge is becoming non-root bridge and is advertising the invalid timer values.

As i have gone through 802.1D-1998 standard, i understand that 2004 is current one but i was looking into STP not RSTP, i preferred to read this standard. I find these lines:

===============================================
9.3.3 Validation of received BPDUs

A Bridge Protocol Entity shall process a received BPDU as specified in 8.7 if and only if the BPDU contains at least four octets and the Protocol Identifier has the value specified for BPDUs (9.3.2), and
a) The BPDU Type denotes a Configuration BPDU and the BPDU contains at least 35 octets, and the
value of the BPDUs Message Age parameter is less than that of its Max Age parameter; or

b) The BPDU Type denotes a Topology Change Notification BPDU.
In case a), any octets that are present beyond Octet 35 are ignored, as far as processing according to this
standard is concerned. Similarly, in case b), any octets beyond Octet 4 are ignored.

============================================

Does this implies that any value timer values present within octet 35 is valid value and there is no validation done. Even if range for hello timer, max age and forward delay is defined and is limited. Is it an issue or fine within the standard?

  Not all STP implementation do BPDU validations i.e validates all BPDU parameters present within 35 octet. The validation checks for invalid values present in the bpdu,
  if the BPDU validation fails it drops the BPDU. The have seen this validations in proprietary software.
 
Please help me understand this issue and thanks for any comments.

Regards,
Sujata


_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/bridge


_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/bridge


_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/bridge

[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux