Add routes and make ARP/NDP permanent when a VM is moved to a proxmox node
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
449 B

#!/usr/bin/python3
from scapy.all import *
etherDest= sys.argv[1]
iface= sys.argv[2]
ipDest= sys.argv[3]
ipSrc= sys.argv[4]
# send 10 IPv4 ICMP echo requests
sendp(Ether(dst=etherDest)/IP(dst=ipDest, src=ipSrc, ttl=(1,10))/ICMP(), iface=iface)
ipDest= sys.argv[5]
ipSrc= sys.argv[6]
# send 10 IPv6 ICMP echo requests
sendp(Ether(dst=etherDest)/IPv6(dst=ipDest, src=ipSrc, hlim=(1,10))/ICMPv6EchoRequest(), iface=iface)