I have an Ethernet over MPLS over UDP packet. Wireshark wrongly parses it as it contains CW. Below is the pcap file. Since the UDP port is 51234 instead of 6635 as defined, I use following LUA script to make wireshark to parse the UDP payload as MPLS
Wireshark parses it as CW is present although it actually doesn't. Tried disable "Ethernet PW (with CW)"/"Ethernet PW(CW heuristic)". The MPLS payload is simply shown as Data. Is there any way to make Wireshark parse this packet as no CW is present? Thanks asked 04 Feb '16, 19:09 yacare edited 04 Feb '16, 19:22 |
One Answer:
In your first step, you've made a complex equivalent of "Decode as", telling the UDP dissector that it should invoke the mpls dissector also for By disabling the heuristic dissector So to compensate, you must use another "decode as" (or its equivalent in Lua), and similarly as if you would be configuring an MPLS switch/router, you have to say that packets with I don't think there is a reason to do this using Lua unless you want to use Lua to provide a better heuristic, allowing you to choose between I also don't think there is a need to create a special protocol name (MPLSoUDP) when you the only thing you actually needed to do was
and then, if you insist on use of Lua to create static "Decode as" equivalents,
answered 04 Feb '16, 23:17 sindy edited 04 Feb '16, 23:21 showing 5 of 6 show 1 more comments |
Hi Sindy,
Thanks for the reply. To make life easier, I don't want to use Lua when possible. :) The challenge I have it not how to make wireshark to parse UDP payload as MPLS. What I have been trying to figure out is how to parse the MPLS payload as ethernet with CW.
Looks like the packet matches some pattern such that Wireshark believes the bytes followed the MPLS header is a CW instead of the dst MAC. Unfortunately, this is not the case. Is there any way to correct it?
Matching label value in Lua doesn't seems feasible as I have lots of packets like this but having different MPLS label values.
Thanks,
I think you wanted to write "without CW", but that's not the essence. The essence is that the same way like the server-side TCP port distinguishes between different services using TCP transport, the MPLS label distinguishes between virtual paths, each potentially carrying a different protocol.
So the requirement above is quite similar to "I want to be able to tell Wireshark to decode all TCP packets as HTTP because I have lots of HTTP packets using various TCP ports at server side". Both make sense in particular context but it is not a typical application case.
You may want to file a "nice to have" category bug at Wireshark bugzilla, asking for a generic mechanism allowing this; some kind of reserved index value (such as
other
) for the dissector tables might be a useful way allowing you to set a default dissector (usingDecode as...
or Luadissectortable:add
) which could still be overridden by the individual ones.Until someone implements this or something alike, you'll have to run
dissectortable:add
in a cycle in Lua to fill the relevant dissector table with pointers to the same dissector for all possible index values. I admit that for a 20-bit MPLS label, doing so may take some time and use some memory.Thanks. It is good to know there is no easy solution here. I guess this is more because of the way MPLS header is designed. There is no indication on what the payload would be. Applications have to take a guess. This causes lots of issues like load balancing etc. :(
I would disagree - it is only an issue for monitoring applications, such as Wireshark. The real applications using MPLS don't need to guess because they know. The sending application (if we may call an edge router an application) knows what label to assign to the traffic, the receiving application knows what kind of payload it expects, and the transit elements between these two endpoints don't care, because they just choose the interface to which to forward a packet up to the value of the label and it is irrelevant for them what the payload is. So any kind of explicit payload type identifier included into each packet would be just a waste of bandwidth.
It is not only for monitoring applications. For better load balancing purpose, the routers in the middle may want to know more about the MPLS payload. For instance, rfc6790 has to add another MPLS label in order to address this.
I'm not sure whether it is still a Wireshark-related discussion, but when reading the RFC 6790's section "Motivation", I can see it points in the same direction I've suggested above - it should not be the transit LSR's job to analyze each packet's contents, as asking it to do so contradicts the original idea of MPLS as a means of simplification of the routing process in the transit network.
Yes, nowadays MPLS is mainly used for other reasons than the mapping of payload protocols' native addresses to simple routing labels, yet still the instruction what a transit LSR should do with a packet with a given label gets to it "out-of-band" - i.e. using either manual configuration or some configuration management communication, but definitely not inside each individual traffic packet. So even if the transit LSR has to analyse the packet contents in order to choose between several possible routes, the contents encapsulation scheme is invariant for any given label, and so the LSR should not depend on heuristic when handling packets but should get the information about the encapsulation scheme the same way it has got the information about its local route set for that label.