Implementing relaxed matching for layer 2 and layer 3.