strange ARP requests from emu-ping example

32 views
Skip to first unread message

andreas

unread,
Aug 17, 2010, 5:24:07 AM8/17/10
to ns-3-users
Hi,
I just tried to use the examples/emulation/emu-ping.cc to get some
traffic to my network.
After some debugging I figured out the arp requests sent by ns-3 are
not answered by the
target host (which receives it, already checked that).
From the same host where ns-3 is installed, an arp packet sent by the
OS (default linux)
to the same target IP address looks like this:
0000 ff ff ff ff ff ff 00 07 e9 19 9f ee 08 06 00 01
0010 08 00 06 04 00 01 00 07 e9 19 9f ee 0a fd 01 95
0020 00 00 00 00 00 00 0a fd 00 01
This one gets a reply.

From ns-3:
0000 ff ff ff ff ff ff 00 07 e9 19 9f ee 00 24 aa aa
0010 03 00 00 00 08 06 00 01 08 00 06 04 00 01 00 07
0020 e9 19 9f ee 0a fd 01 95 ff ff ff ff ff ff 0a fd
0030 00 03
This one not.

Note that after the sender MAC, the ns-3 generated packet contains
something
else than the "08 06" which would be an arp request. It does not look
like
a standard Ethernet II frame.

Any ideas what could be wrong here? Thanks in advance.

Best regards,

Andreas Fiessler

Gustavo Carneiro

unread,
Aug 17, 2010, 6:39:42 AM8/17/10
to ns-3-...@googlegroups.com
It is probably that EmuNetDevice uses LLC/SNAP encapsulation by default.  You can change it via an attribute:

    .AddAttribute ("EncapsulationMode", 
                   "The link-layer encapsulation type to use.",
                   EnumValue (LLC),
                   MakeEnumAccessor (&EmuNetDevice::SetEncapsulationMode),
                   MakeEnumChecker (DIX, "Dix",
                                    LLC, "Llc"))

 

Best regards,

Andreas Fiessler

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
Gustavo J. A. M. Carneiro
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
"The universe is always one step beyond logic." -- Frank Herbert

Andreas Fiessler

unread,
Aug 17, 2010, 7:16:55 AM8/17/10
to ns-3-...@googlegroups.com
Thanks! It works with DIX.
Anyway, is LLC a good choice for the default setting? I tried several
different hosts, they all seem to ignore those LLC encapsulated
arp requests.

--
Andreas Fießler, GeNUA GmbH, Domagkstr. 7, 85551 Kirchheim,
Tel: +49 (89) 991950-124, Fax: +49 (89) 991950-999
and...@genua.de, http://www.genua.de

Geschäftsführer: Dr. Magnus Harlander, Dr. Michaela Harlander,
Bernhard Schneck. Amtsgericht München HRB 98238

Gustavo Carneiro

unread,
Aug 17, 2010, 7:39:20 AM8/17/10
to ns-3-...@googlegroups.com, ns-dev...@isi.edu
I think that LLC/SNAP has been historically the more "canonical" encapsulation, at least in theory.  However, you are right; in practice LLC/SNAP is almost never used nowadays in real equipment.  I am inclined to agree with you in that probably DIX should be the default encapsulation.
 

--
Andreas Fießler, GeNUA GmbH, Domagkstr. 7, 85551 Kirchheim,
Tel: +49 (89) 991950-124, Fax: +49 (89) 991950-999
and...@genua.de, http://www.genua.de

Geschäftsführer: Dr. Magnus Harlander, Dr. Michaela Harlander,
Bernhard Schneck. Amtsgericht München HRB 98238

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

Mathieu Lacage

unread,
Aug 18, 2010, 3:14:04 AM8/18/10
to ns-3-...@googlegroups.com, ns-dev...@isi.edu
On Tue, Aug 17, 2010 at 13:39, Gustavo Carneiro <gjcar...@gmail.com> wrote:
>> Thanks! It works with DIX.
>> Anyway, is LLC a good choice for the default setting? I tried several
>> different hosts, they all seem to ignore those LLC encapsulated
>> arp requests.
>
> I think that LLC/SNAP has been historically the more "canonical"
> encapsulation, at least in theory.  However, you are right; in practice
> LLC/SNAP is almost never used nowadays in real equipment.  I am inclined to
> agree with you in that probably DIX should be the default encapsulation.

Would someone mind file a bug to keep track of this issue ?

Mathieu
--
Mathieu Lacage <mathieu...@gmail.com>

Gustavo Carneiro

unread,
Aug 18, 2010, 5:38:14 AM8/18/10
to ns-3-...@googlegroups.com, ns-dev...@isi.edu

Mathieu
--
Mathieu Lacage <mathieu...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

Craig Dowell

unread,
Aug 18, 2010, 12:54:50 PM8/18/10
to ns-3-...@googlegroups.com, ns-dev...@isi.edu

> I think that LLC/SNAP has been historically the more "canonical"
> encapsulation, at least in theory. However, you are right; in
> practice LLC/SNAP is almost never used nowadays in real equipment. I
> am inclined to agree with you in that probably DIX should be the
> default encapsulation.

The reason that LLC/SNAP is the default is only because this
encapsulation was used in the original device (since ns-3.0?) and
everyone (including regression tests) expected it to be that way.
Adding DIX encapsulation was required when we started the emulation work
because, as Gustavo says, LLC/SNAP is almost never used nowadays in real
equipment.

+1 for changing the default (and regenerating all of the trace files).

-- Craig


Reply all
Reply to author
Forward
0 new messages