The code doesn't seem to be changing the MAC addresses. Even if i specify some random MAC address for source and destinations, it looks like ethernet frame is sent out with source MAC of my interface and for destination MAC it is doing arp so basically its following the ARP table instead of the input that i am providing.

Can we upload file or paste image on perlmonks forums? It will be much easier looking at it.

FYI..this is the code i am trying to test
#!/usr/bin/perl use Net::Frame::Simple; use Net::Frame::Layer::IPv4; use Net::Frame::Layer::TCP; use Net::Frame::Layer::ETH; use Net::Frame::Device; use Net::Write::Layer3; use Net::Frame::Dump::Online; use Net::Write::Layer2; my $src = '1.1.1.39'; my $target = '1.1.1.99'; my $port = 22; my $eth = Net::Frame::Layer::ETH->new(src => "00:0c:29:d1:03:06", dst +=> "03:03:03:03:03:03"); my $ip4 = Net::Frame::Layer::IPv4->new(src => $src,dst => $target); my $tcp = Net::Frame::Layer::TCP->new(dst => $port, options => "\x02\x +04\x54\x0b",payload => 'test'); my $oSimple = Net::Frame::Simple->new(layers => [$eth, $ip4,$tcp], pad +ding => 'G'x2); my $oWrite = Net::Write::Layer3->new(dst => $target); $oWrite->open; $oSimple->send($oWrite);

In reply to Re^4: Setting MAC addresses with Net::Frame::Simple by iThunder
in thread Setting MAC addresses with Net::Frame::Simple by iThunder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.