Networking Forums

Networking Forums > Computer Networking > Linux Networking > Help in designing valid ethernet packets?

Reply
Thread Tools Display Modes

Help in designing valid ethernet packets?

 
 
avi01
Guest
Posts: n/a

 
      05-09-2008, 05:09 AM
Hi Guyz!!!

Newbie in the matter...Plz help,
My aim is to read raw packets from the eth0 interface, I'm using
Ubuntu 6.06, kernel 2.6.24-3, and to design valid packets.

I need to do this to read ethernet packets from an embedded device
we've developed. The device has no TCP/IP stack on it for the time-
being and we need to test reception and transmission to/from it.

I took 2 approaches to fulfill the above,

1) Used raw sockets to get ethernet packets
2) Used libpcap to read packets.

Both the approaches work when I'm recieving loopback ethernet packets
as well as packets from other computers.

I tried designing the following packets for the device viz:

a) Broadcast packet:
ff ff ff ff ff ff 00 01 02 03 04 05 08 06 00 01 ........G.......
08 00 06 04 00 01 01 02 03 04 05 06 c0 a8 01 c9 ........G.......
00 00 00 00 00 00 c0 a8 01 c8 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 ............

b) Ethernet frame:
00 19 db a7 9c dd 00 01 02 03 04 05 08 06 FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF

c) ARP request:
00 19 db a7 9c dd 00 01 02 03 04 05 08 06 00 01 ........G.......
08 00 06 04 00 01 01 02 03 04 05 06 c0 a8 01 c9 ........G.......
00 00 00 00 00 00 c0 a8 01 c8 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 ............

where 00:19:db:a7:9c:dd is my MAC address &
00:01:02:03:04:05 is MAC address of the device.

Another problem I face is that the wireshark S/W (which uses
libpcap) on windows detects packets, whereas ethereal on linux does
not detect any packets (ethereal also uses libpcap).

So guyz could U help me with either info about designing a packet so
that it will be detected, or tell me the reason of why the packets are
being discarded in my linux box? (is it something to do with the linux
packet filter discarding suspicious packets?),
Does windows treat packets very differently as compared to linux?

I would like to know if it is possible without a TCP/IP stack loaded
on the device?

Please also direct me to resources on the net.

Thanks Guyz!!!
Avinash.
 
Reply With Quote
 
 
 
 
avi01
Guest
Posts: n/a

 
      05-13-2008, 04:42 AM
Please guyz!!!
Help would really be appreciated...

Avinash...
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Designing a Network nummer31 Home Networking 1 05-25-2011 01:24 PM
linux api's to generate ethernet packets sudip05@mailcity.com Linux Networking 1 04-28-2008 12:34 PM
Designing a TCP/IP server for ARM Abdul Razaq Linux Networking 0 03-24-2006 03:28 AM
Help designing wireless network Thomas Hedden Linux Networking 7 01-09-2006 05:15 PM
raw ethernet packets Pirabhu Raman Linux Networking 1 12-17-2004 08:11 AM



1 2 3 4 5 6 7 8 9 10 11