LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2012, 09:43 AM   #1
sj114
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
How to generate inner IP fragments?


Hi all,

I have a test program that sends UDP packets over an IPSec tunnel. Both outer and inner IP are IPv4. This is on an Ubuntu 10.04.

When the packet size is > MTU, I notice that the fragmentation occurs at the outer IP. However, in order to test a particular scenario, I wish to generate encrypted packets where the inner IP is fragmented.

Are there any options through which I can configure inner IP fragmentation instead of outer?

Thanks!
 
Old 08-03-2012, 02:28 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,854

Rep: Reputation: 161Reputation: 161
The path-mtu-discovery can adjust tunnel MTU and avoid outer IP fragments.
 
Old 08-07-2012, 08:56 AM   #3
sj114
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
That's correct, but my goal is to generate inner IP fragments in order to test my inner IP reassembly algorithm. So I am wondering if there is any option that can be set to do this instead of fragment at the outer IP.
 
Old 08-08-2012, 02:29 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,854

Rep: Reputation: 161Reputation: 161
1)Test IPSec MTU by ping manually.
2)Configure IPSec interface MTU.

You can use extended ping to see the size of packet that you can send over the tunnel with DF bit set do not fragment.

if you have two windows machines , one on each side of the vpn with ip add 10.2.2.10 and 10.3.3.10.

ping from 10.2.2.10 using :-

ping 10.3.3.10
reply success

ping 10.3.3.10 -l 1500 -f { where -l 1500 sets the MTU to 1500 and -f says do not fragment }
packet needs to be fragmentated but df set
packet needs to be fragmentated but df set

ping 10.3.3.10 -l 1300 -f
packets needs fragmentation but df set

ping 10.3.3.10 -l 1270 -f
reply success
reply success
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.img file with no-fragments, why? sluge Linux - Software 1 05-13-2012 06:21 PM
Consistently Losing Fragments with Large Packets chewygumstix Linux - Networking 1 12-16-2008 10:48 PM
LXer: Protecting against evil code fragments with HTML Purifier LXer Syndicated Linux News 0 07-08-2008 01:12 PM
svg link to fragments cyb0rg777 Programming 0 02-24-2008 05:01 AM
OSS not allowing small fragments linuxmandrake Linux - Software 0 06-03-2007 04:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration