we have a mix of different mpls frames with and without cw. if a cw is present, then its value is always 0 - in our implementation we have no cw's with a value different from 0. so our question is how we might be able to write a small lua script to accomplish, that: in the case, that the first four bytes of the encapsulated ethernet frame are not all zero, then we assume that they contain the start of the destination mac address ... and hence just simply continue with the dissection. if on the other hand the first four bytes of the encapsulated ethernet frame are all zero then we assume to have a control-word and would like to strip it away before we may continue with the dissection of the frame. would that be possible ? any hints ? asked 04 Jan '17, 05:59 x42 edited 04 Jan '17, 09:28 |
One Answer:
now, that the missing dissectors
it would be even better if we knew how to “insert ourself into the mpls ethertype dissector” as suggested, but it’s ok … the script works satisfactory in our network. we are now able to analyze different cases in the (very buggy) mpls-implementation of a well-known hardware vendor ;-) thanks a lot to you all for your friendly, swift and very competent support and insight into mpls-related problems ! answered 08 Jan ‘17, 13:59 x42 edited 08 Jan ‘17, 14:01 |
Ugh, MPLS control words are just a pain to get right. Heuristically it's almost impossible to determine definitively (I experimenting with a Wireshark change, not done yet).
Anyway, your case should be possible, if you can insert yourself as MPLS ethertype dissector, then examine the first octets of the TVB and decide which dissector to call.
we have only a dirty and tedious workaround for the present case, that the cw's can only take on the value 0:
1) open the mixed trace (mpls packets with and without cw) and apply the lua-script
2) apply the display filter
eth.dst[0:4]==00:00:00:00
and save the displayed frames as capture-with-cw.pcap3) apply the complementary display filter
!(eth.dst[0:4]==00:00:00:00)
4) open the previously saved capture-with-cw.pcap in a second instance of wireshark (it must be 1.x because the
pw_eth_cw
dissector is not present in wireshark 2.x https://ask.wireshark.org/questions/58532/missing-dissector-pw_eth_cw )and apply the lua-script
5) analyze the original trace in the two wireshark instances …
so yes … we are hoping very much that your modifications/changes to the mpls-heuristic may be successfull :-)