FPGARelated.com
Forums

How do i detect ethernet frames of layer 2 using ethereal?

Started by ashwin November 9, 2005
Hello everyone,
 I am trying to implement ethernet MAC on a fpga using vhdl. I  have a
transmit module which generates the ethernet frame and transmits to the
PC through the ethernet cable.
 The ethernet frame consists of  preamble, sfd, destination(MAC),
source(MAC), length,data,crc. I am using ethereal to detect this frame

 I definitely think that my crc is right. But i am not able to detect
any frames in the ethereal.
 I understand that by default ethereal has been set to detect ethernet
frame of layer 3 or above.

  But the ethernet frame which i am sending is layer2. How do i change
my options in ethereal so, that i can detect this type of frame.

Ashwin

ashwin wrote:
> Hello everyone, > I am trying to implement ethernet MAC on a fpga using vhdl. I have a > transmit module which generates the ethernet frame and transmits to the > PC through the ethernet cable. > The ethernet frame consists of preamble, sfd, destination(MAC), > source(MAC), length,data,crc. I am using ethereal to detect this frame > > I definitely think that my crc is right. But i am not able to detect > any frames in the ethereal. > I understand that by default ethereal has been set to detect ethernet > frame of layer 3 or above. > > But the ethernet frame which i am sending is layer2. How do i change > my options in ethereal so, that i can detect this type of frame. > > Ashwin
Ethereal will pick up any type of ethernet frame regardless of the layers contained therein. Have you verified your CRC against a known good frame? Are you using the right type of cable (crossover or straight-through)? Alan
As posted above, Ethereal can detect any frame if the capture and
display filters are clear... but it assumes that the NIC card in
your machine actually receives/accepts the packet.

If the packet must meet the minimum and maximum size
requirements  (try 70 bytes for example) and has a proper FCS.
You may be able to configure your Ethernet board to
accept error packets, which might help troubleshoot the problem.

You didn't say which OS you were using, if you were
capturing in "promiscuous" mode (may require admin rights),
and if you have a direct (cross-over) connection or are going
through a switch or hub.

Have you verified that you can receive the 'same' frame if it
is sent via a different source (not your FPGA)?


"ashwin" <achiluka@gmail.com> wrote in message
news:1131549976.998254.72060@f14g2000cwb.googlegroups.com...
> Hello everyone, > I am trying to implement ethernet MAC on a fpga using vhdl. I have a > transmit module which generates the ethernet frame and transmits to the > PC through the ethernet cable. > The ethernet frame consists of preamble, sfd, destination(MAC), > source(MAC), length,data,crc. I am using ethereal to detect this frame > > I definitely think that my crc is right. But i am not able to detect > any frames in the ethereal. > I understand that by default ethereal has been set to detect ethernet > frame of layer 3 or above. > > But the ethernet frame which i am sending is layer2. How do i change > my options in ethereal so, that i can detect this type of frame. > > Ashwin >
bh top posted:
[snip]
> Have you verified that you can receive the 'same' frame if it > is sent via a different source (not your FPGA)? > > > "ashwin" <achiluka@gmail.com> wrote in message
[snip] Ethereal uses WinPcap, which allows you to send test packets e.g. http://www.winpcap.org/docs/man/html/group__wpcap__tut8.html Have you tried setting the destination MAC address field to the broadcast address?
Definitely use a crossover for this kind of work, direct to your
computer, and no DHCP on either side - that way, there's only one place
your packet can go, so you on't have to worry about your switch/router
doing any funny stuff with it.