iThunder has asked for the wisdom of the Perl Monks concerning the following question:

Since Net::Frame has been replaced Net::Packet, how can we set the ethernet header information with this new module? In Net::packet, we can set it by using module Net::Packet::ETH and then when constructing the frame, it can be called in Net::Packet::Frame. But how can we do it in Net::Frame? I have been trying to set Src/DST MACs using Net::Frame::Layer::ETH but so far could not find a way to "push" those values when constructing frame. Net::Frame::Simple doesn't seem to take ethernet as "layers" value.

  • Comment on Setting MAC addresses with Net::Frame::Simple

Replies are listed 'Best First'.
Re: Setting MAC addresses with Net::Frame::Simple
by beech (Parson) on Nov 19, 2016 at 07:44 UTC

      Thanks. This example was useful but i am running into two ethernet headers issue. With that code, i can see that my client sends out the packet but it has one ethernet header (first one) that has src/dst MACs that machine inserts . After that are the src/dst mac addresses that i am inserting using the code. That is causing a bogus ip packet. Not sure if this is my client issue or code.

        I'm sorry I'm having a hard time understanding what you're trying to say