Networking Forums

Networking Forums > Computer Networking > Linux Networking > fragmentation and sendip or hping2 with Linux

Reply
Thread Tools Display Modes

fragmentation and sendip or hping2 with Linux

 
 
Runesmoke
Guest
Posts: n/a

 
      04-07-2005, 04:16 PM
Hi

I'm trying to test IP fragmentation behaviur on some equipment by
crafting IPv4 packets with fragment offset or the more fragments flag
set. I've been trying to do this with either hping2 or sendip using
Redhat Fedora Core 3. In both cases the packets refuse to appear on
the wire when I set either the MF flag or the offset field.

Can anyone advise how to do this?

Many thanks

RS.

 
Reply With Quote
 
 
 
 
padam.singh@gmail.com
Guest
Posts: n/a

 
      04-07-2005, 04:35 PM
Hi RS,

Have you tried using libnet?

If you want to do some serious packet generation, try this library. Its
fairly easy to write a small program to generate the packet you want.
Samples included in the distribution itself will help you do so.

Padam.

 
Reply With Quote
 
padam.singh@gmail.com
Guest
Posts: n/a

 
      04-07-2005, 04:35 PM
Hi RS,

Have you tried using libnet?

If you want to do some serious packet generation, try this library. Its
fairly easy to write a small program to generate the packet you want.
Samples included in the distribution itself will help you do so.

Padam.

 
Reply With Quote
 
Rune Smoke
Guest
Posts: n/a

 
      04-08-2005, 01:53 PM
(E-Mail Removed) wrote in message news:<(E-Mail Removed) ups.com>...
> Hi RS,
>
> Have you tried using libnet?
>
> If you want to do some serious packet generation, try this library. Its
> fairly easy to write a small program to generate the packet you want.
> Samples included in the distribution itself will help you do so.
>
> Padam.


Thanks for the reply - I've not attempted using libnet because I'm
very much a beginner with C programming - libnet looked pretty tricky
for a beginner like me, but I will get there!

Coming back to the problem with sendip and hping2 - I've tried using
more fragment/fragment offset field settings with a machine running
Slackware rather than RedHat Fedora and, lo and behold, it works fine.
I don't know why Fedora should have a problem generating packets with
fragment headers. Perhaps there's some funny default firewall setting
or something. I've got no idea how to fix it!


RS.
 
Reply With Quote
 
padam.singh@gmail.com
Guest
Posts: n/a

 
      04-09-2005, 06:18 AM
Using libnet is actually very simple, just keep adding headers with
simple function calls like build_tcp, build_ipv4_options, build_ipv4,
build_ethernet and then issue a single write function... check the wire
with tcpdump and you'll have the packet.

hth,
Padam.

 
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
How to specify a big sequence number in hping2? Zheng Da Linux Networking 4 11-25-2006 07:15 PM
Fragmentation on Lan jasonsig Linux Networking 1 10-11-2006 05:45 PM
Emulate Fragmentation Giobbe Linux Networking 1 11-20-2004 07:18 PM
IP fragmentation with linux kernel 2.4.x Alain FORCIOLI Linux Networking 1 01-21-2004 03:01 AM
Fragmentation F... Wireless Internet 7 11-05-2003 04:48 AM



1 2 3 4 5 6 7 8 9 10 11